40628 lines
5.5 MiB
40628 lines
5.5 MiB
/******/ (function(modules) { // webpackBootstrap
|
||
/******/ // The module cache
|
||
/******/ var installedModules = {};
|
||
/******/
|
||
/******/ // The require function
|
||
/******/ function __webpack_require__(moduleId) {
|
||
/******/
|
||
/******/ // Check if module is in cache
|
||
/******/ if(installedModules[moduleId]) {
|
||
/******/ return installedModules[moduleId].exports;
|
||
/******/ }
|
||
/******/ // Create a new module (and put it into the cache)
|
||
/******/ var module = installedModules[moduleId] = {
|
||
/******/ i: moduleId,
|
||
/******/ l: false,
|
||
/******/ exports: {}
|
||
/******/ };
|
||
/******/
|
||
/******/ // Execute the module function
|
||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||
/******/
|
||
/******/ // Flag the module as loaded
|
||
/******/ module.l = true;
|
||
/******/
|
||
/******/ // Return the exports of the module
|
||
/******/ return module.exports;
|
||
/******/ }
|
||
/******/
|
||
/******/
|
||
/******/ // expose the modules object (__webpack_modules__)
|
||
/******/ __webpack_require__.m = modules;
|
||
/******/
|
||
/******/ // expose the module cache
|
||
/******/ __webpack_require__.c = installedModules;
|
||
/******/
|
||
/******/ // define getter function for harmony exports
|
||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||
/******/ }
|
||
/******/ };
|
||
/******/
|
||
/******/ // define __esModule on exports
|
||
/******/ __webpack_require__.r = function(exports) {
|
||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||
/******/ }
|
||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||
/******/ };
|
||
/******/
|
||
/******/ // create a fake namespace object
|
||
/******/ // mode & 1: value is a module id, require it
|
||
/******/ // mode & 2: merge all properties of value into the ns
|
||
/******/ // mode & 4: return value when already ns object
|
||
/******/ // mode & 8|1: behave like require
|
||
/******/ __webpack_require__.t = function(value, mode) {
|
||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||
/******/ if(mode & 8) return value;
|
||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||
/******/ var ns = Object.create(null);
|
||
/******/ __webpack_require__.r(ns);
|
||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||
/******/ return ns;
|
||
/******/ };
|
||
/******/
|
||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||
/******/ __webpack_require__.n = function(module) {
|
||
/******/ var getter = module && module.__esModule ?
|
||
/******/ function getDefault() { return module['default']; } :
|
||
/******/ function getModuleExports() { return module; };
|
||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||
/******/ return getter;
|
||
/******/ };
|
||
/******/
|
||
/******/ // Object.prototype.hasOwnProperty.call
|
||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||
/******/
|
||
/******/ // __webpack_public_path__
|
||
/******/ __webpack_require__.p = "";
|
||
/******/
|
||
/******/
|
||
/******/ // Load entry module and return exports
|
||
/******/ return __webpack_require__(__webpack_require__.s = "./src/ts/app/index.tsx");
|
||
/******/ })
|
||
/************************************************************************/
|
||
/******/ ({
|
||
|
||
/***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
|
||
/*!**************************************************************************!*\
|
||
!*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
|
||
\**************************************************************************/
|
||
/*! exports provided: default */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _assertThisInitialized; });
|
||
function _assertThisInitialized(self) {
|
||
if (self === void 0) {
|
||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||
}
|
||
|
||
return self;
|
||
}
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/@babel/runtime/helpers/esm/extends.js":
|
||
/*!************************************************************!*\
|
||
!*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***!
|
||
\************************************************************/
|
||
/*! exports provided: default */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _extends; });
|
||
function _extends() {
|
||
_extends = Object.assign || function (target) {
|
||
for (var i = 1; i < arguments.length; i++) {
|
||
var source = arguments[i];
|
||
|
||
for (var key in source) {
|
||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||
target[key] = source[key];
|
||
}
|
||
}
|
||
}
|
||
|
||
return target;
|
||
};
|
||
|
||
return _extends.apply(this, arguments);
|
||
}
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js":
|
||
/*!******************************************************************!*\
|
||
!*** ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js ***!
|
||
\******************************************************************/
|
||
/*! exports provided: default */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _inheritsLoose; });
|
||
function _inheritsLoose(subClass, superClass) {
|
||
subClass.prototype = Object.create(superClass.prototype);
|
||
subClass.prototype.constructor = subClass;
|
||
subClass.__proto__ = superClass;
|
||
}
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js ***!
|
||
\*********************************************************************************/
|
||
/*! exports provided: default */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectWithoutPropertiesLoose; });
|
||
function _objectWithoutPropertiesLoose(source, excluded) {
|
||
if (source == null) return {};
|
||
var target = {};
|
||
var sourceKeys = Object.keys(source);
|
||
var key, i;
|
||
|
||
for (i = 0; i < sourceKeys.length; i++) {
|
||
key = sourceKeys[i];
|
||
if (excluded.indexOf(key) >= 0) continue;
|
||
target[key] = source[key];
|
||
}
|
||
|
||
return target;
|
||
}
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/@protobufjs/aspromise/index.js":
|
||
/*!*****************************************************!*\
|
||
!*** ./node_modules/@protobufjs/aspromise/index.js ***!
|
||
\*****************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
module.exports = asPromise;
|
||
|
||
/**
|
||
* Callback as used by {@link util.asPromise}.
|
||
* @typedef asPromiseCallback
|
||
* @type {function}
|
||
* @param {Error|null} error Error, if any
|
||
* @param {...*} params Additional arguments
|
||
* @returns {undefined}
|
||
*/
|
||
|
||
/**
|
||
* Returns a promise from a node-style callback function.
|
||
* @memberof util
|
||
* @param {asPromiseCallback} fn Function to call
|
||
* @param {*} ctx Function context
|
||
* @param {...*} params Function arguments
|
||
* @returns {Promise<*>} Promisified function
|
||
*/
|
||
function asPromise(fn, ctx/*, varargs */) {
|
||
var params = new Array(arguments.length - 1),
|
||
offset = 0,
|
||
index = 2,
|
||
pending = true;
|
||
while (index < arguments.length)
|
||
params[offset++] = arguments[index++];
|
||
return new Promise(function executor(resolve, reject) {
|
||
params[offset] = function callback(err/*, varargs */) {
|
||
if (pending) {
|
||
pending = false;
|
||
if (err)
|
||
reject(err);
|
||
else {
|
||
var params = new Array(arguments.length - 1),
|
||
offset = 0;
|
||
while (offset < params.length)
|
||
params[offset++] = arguments[offset];
|
||
resolve.apply(null, params);
|
||
}
|
||
}
|
||
};
|
||
try {
|
||
fn.apply(ctx || null, params);
|
||
} catch (err) {
|
||
if (pending) {
|
||
pending = false;
|
||
reject(err);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/@protobufjs/base64/index.js":
|
||
/*!**************************************************!*\
|
||
!*** ./node_modules/@protobufjs/base64/index.js ***!
|
||
\**************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
/**
|
||
* A minimal base64 implementation for number arrays.
|
||
* @memberof util
|
||
* @namespace
|
||
*/
|
||
var base64 = exports;
|
||
|
||
/**
|
||
* Calculates the byte length of a base64 encoded string.
|
||
* @param {string} string Base64 encoded string
|
||
* @returns {number} Byte length
|
||
*/
|
||
base64.length = function length(string) {
|
||
var p = string.length;
|
||
if (!p)
|
||
return 0;
|
||
var n = 0;
|
||
while (--p % 4 > 1 && string.charAt(p) === "=")
|
||
++n;
|
||
return Math.ceil(string.length * 3) / 4 - n;
|
||
};
|
||
|
||
// Base64 encoding table
|
||
var b64 = new Array(64);
|
||
|
||
// Base64 decoding table
|
||
var s64 = new Array(123);
|
||
|
||
// 65..90, 97..122, 48..57, 43, 47
|
||
for (var i = 0; i < 64;)
|
||
s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
|
||
|
||
/**
|
||
* Encodes a buffer to a base64 encoded string.
|
||
* @param {Uint8Array} buffer Source buffer
|
||
* @param {number} start Source start
|
||
* @param {number} end Source end
|
||
* @returns {string} Base64 encoded string
|
||
*/
|
||
base64.encode = function encode(buffer, start, end) {
|
||
var parts = null,
|
||
chunk = [];
|
||
var i = 0, // output index
|
||
j = 0, // goto index
|
||
t; // temporary
|
||
while (start < end) {
|
||
var b = buffer[start++];
|
||
switch (j) {
|
||
case 0:
|
||
chunk[i++] = b64[b >> 2];
|
||
t = (b & 3) << 4;
|
||
j = 1;
|
||
break;
|
||
case 1:
|
||
chunk[i++] = b64[t | b >> 4];
|
||
t = (b & 15) << 2;
|
||
j = 2;
|
||
break;
|
||
case 2:
|
||
chunk[i++] = b64[t | b >> 6];
|
||
chunk[i++] = b64[b & 63];
|
||
j = 0;
|
||
break;
|
||
}
|
||
if (i > 8191) {
|
||
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
|
||
i = 0;
|
||
}
|
||
}
|
||
if (j) {
|
||
chunk[i++] = b64[t];
|
||
chunk[i++] = 61;
|
||
if (j === 1)
|
||
chunk[i++] = 61;
|
||
}
|
||
if (parts) {
|
||
if (i)
|
||
parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
|
||
return parts.join("");
|
||
}
|
||
return String.fromCharCode.apply(String, chunk.slice(0, i));
|
||
};
|
||
|
||
var invalidEncoding = "invalid encoding";
|
||
|
||
/**
|
||
* Decodes a base64 encoded string to a buffer.
|
||
* @param {string} string Source string
|
||
* @param {Uint8Array} buffer Destination buffer
|
||
* @param {number} offset Destination offset
|
||
* @returns {number} Number of bytes written
|
||
* @throws {Error} If encoding is invalid
|
||
*/
|
||
base64.decode = function decode(string, buffer, offset) {
|
||
var start = offset;
|
||
var j = 0, // goto index
|
||
t; // temporary
|
||
for (var i = 0; i < string.length;) {
|
||
var c = string.charCodeAt(i++);
|
||
if (c === 61 && j > 1)
|
||
break;
|
||
if ((c = s64[c]) === undefined)
|
||
throw Error(invalidEncoding);
|
||
switch (j) {
|
||
case 0:
|
||
t = c;
|
||
j = 1;
|
||
break;
|
||
case 1:
|
||
buffer[offset++] = t << 2 | (c & 48) >> 4;
|
||
t = c;
|
||
j = 2;
|
||
break;
|
||
case 2:
|
||
buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
|
||
t = c;
|
||
j = 3;
|
||
break;
|
||
case 3:
|
||
buffer[offset++] = (t & 3) << 6 | c;
|
||
j = 0;
|
||
break;
|
||
}
|
||
}
|
||
if (j === 1)
|
||
throw Error(invalidEncoding);
|
||
return offset - start;
|
||
};
|
||
|
||
/**
|
||
* Tests if the specified string appears to be base64 encoded.
|
||
* @param {string} string String to test
|
||
* @returns {boolean} `true` if probably base64 encoded, otherwise false
|
||
*/
|
||
base64.test = function test(string) {
|
||
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/@protobufjs/eventemitter/index.js":
|
||
/*!********************************************************!*\
|
||
!*** ./node_modules/@protobufjs/eventemitter/index.js ***!
|
||
\********************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
module.exports = EventEmitter;
|
||
|
||
/**
|
||
* Constructs a new event emitter instance.
|
||
* @classdesc A minimal event emitter.
|
||
* @memberof util
|
||
* @constructor
|
||
*/
|
||
function EventEmitter() {
|
||
|
||
/**
|
||
* Registered listeners.
|
||
* @type {Object.<string,*>}
|
||
* @private
|
||
*/
|
||
this._listeners = {};
|
||
}
|
||
|
||
/**
|
||
* Registers an event listener.
|
||
* @param {string} evt Event name
|
||
* @param {function} fn Listener
|
||
* @param {*} [ctx] Listener context
|
||
* @returns {util.EventEmitter} `this`
|
||
*/
|
||
EventEmitter.prototype.on = function on(evt, fn, ctx) {
|
||
(this._listeners[evt] || (this._listeners[evt] = [])).push({
|
||
fn : fn,
|
||
ctx : ctx || this
|
||
});
|
||
return this;
|
||
};
|
||
|
||
/**
|
||
* Removes an event listener or any matching listeners if arguments are omitted.
|
||
* @param {string} [evt] Event name. Removes all listeners if omitted.
|
||
* @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.
|
||
* @returns {util.EventEmitter} `this`
|
||
*/
|
||
EventEmitter.prototype.off = function off(evt, fn) {
|
||
if (evt === undefined)
|
||
this._listeners = {};
|
||
else {
|
||
if (fn === undefined)
|
||
this._listeners[evt] = [];
|
||
else {
|
||
var listeners = this._listeners[evt];
|
||
for (var i = 0; i < listeners.length;)
|
||
if (listeners[i].fn === fn)
|
||
listeners.splice(i, 1);
|
||
else
|
||
++i;
|
||
}
|
||
}
|
||
return this;
|
||
};
|
||
|
||
/**
|
||
* Emits an event by calling its listeners with the specified arguments.
|
||
* @param {string} evt Event name
|
||
* @param {...*} args Arguments
|
||
* @returns {util.EventEmitter} `this`
|
||
*/
|
||
EventEmitter.prototype.emit = function emit(evt) {
|
||
var listeners = this._listeners[evt];
|
||
if (listeners) {
|
||
var args = [],
|
||
i = 1;
|
||
for (; i < arguments.length;)
|
||
args.push(arguments[i++]);
|
||
for (i = 0; i < listeners.length;)
|
||
listeners[i].fn.apply(listeners[i++].ctx, args);
|
||
}
|
||
return this;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/@protobufjs/float/index.js":
|
||
/*!*************************************************!*\
|
||
!*** ./node_modules/@protobufjs/float/index.js ***!
|
||
\*************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
module.exports = factory(factory);
|
||
|
||
/**
|
||
* Reads / writes floats / doubles from / to buffers.
|
||
* @name util.float
|
||
* @namespace
|
||
*/
|
||
|
||
/**
|
||
* Writes a 32 bit float to a buffer using little endian byte order.
|
||
* @name util.float.writeFloatLE
|
||
* @function
|
||
* @param {number} val Value to write
|
||
* @param {Uint8Array} buf Target buffer
|
||
* @param {number} pos Target buffer offset
|
||
* @returns {undefined}
|
||
*/
|
||
|
||
/**
|
||
* Writes a 32 bit float to a buffer using big endian byte order.
|
||
* @name util.float.writeFloatBE
|
||
* @function
|
||
* @param {number} val Value to write
|
||
* @param {Uint8Array} buf Target buffer
|
||
* @param {number} pos Target buffer offset
|
||
* @returns {undefined}
|
||
*/
|
||
|
||
/**
|
||
* Reads a 32 bit float from a buffer using little endian byte order.
|
||
* @name util.float.readFloatLE
|
||
* @function
|
||
* @param {Uint8Array} buf Source buffer
|
||
* @param {number} pos Source buffer offset
|
||
* @returns {number} Value read
|
||
*/
|
||
|
||
/**
|
||
* Reads a 32 bit float from a buffer using big endian byte order.
|
||
* @name util.float.readFloatBE
|
||
* @function
|
||
* @param {Uint8Array} buf Source buffer
|
||
* @param {number} pos Source buffer offset
|
||
* @returns {number} Value read
|
||
*/
|
||
|
||
/**
|
||
* Writes a 64 bit double to a buffer using little endian byte order.
|
||
* @name util.float.writeDoubleLE
|
||
* @function
|
||
* @param {number} val Value to write
|
||
* @param {Uint8Array} buf Target buffer
|
||
* @param {number} pos Target buffer offset
|
||
* @returns {undefined}
|
||
*/
|
||
|
||
/**
|
||
* Writes a 64 bit double to a buffer using big endian byte order.
|
||
* @name util.float.writeDoubleBE
|
||
* @function
|
||
* @param {number} val Value to write
|
||
* @param {Uint8Array} buf Target buffer
|
||
* @param {number} pos Target buffer offset
|
||
* @returns {undefined}
|
||
*/
|
||
|
||
/**
|
||
* Reads a 64 bit double from a buffer using little endian byte order.
|
||
* @name util.float.readDoubleLE
|
||
* @function
|
||
* @param {Uint8Array} buf Source buffer
|
||
* @param {number} pos Source buffer offset
|
||
* @returns {number} Value read
|
||
*/
|
||
|
||
/**
|
||
* Reads a 64 bit double from a buffer using big endian byte order.
|
||
* @name util.float.readDoubleBE
|
||
* @function
|
||
* @param {Uint8Array} buf Source buffer
|
||
* @param {number} pos Source buffer offset
|
||
* @returns {number} Value read
|
||
*/
|
||
|
||
// Factory function for the purpose of node-based testing in modified global environments
|
||
function factory(exports) {
|
||
|
||
// float: typed array
|
||
if (typeof Float32Array !== "undefined") (function() {
|
||
|
||
var f32 = new Float32Array([ -0 ]),
|
||
f8b = new Uint8Array(f32.buffer),
|
||
le = f8b[3] === 128;
|
||
|
||
function writeFloat_f32_cpy(val, buf, pos) {
|
||
f32[0] = val;
|
||
buf[pos ] = f8b[0];
|
||
buf[pos + 1] = f8b[1];
|
||
buf[pos + 2] = f8b[2];
|
||
buf[pos + 3] = f8b[3];
|
||
}
|
||
|
||
function writeFloat_f32_rev(val, buf, pos) {
|
||
f32[0] = val;
|
||
buf[pos ] = f8b[3];
|
||
buf[pos + 1] = f8b[2];
|
||
buf[pos + 2] = f8b[1];
|
||
buf[pos + 3] = f8b[0];
|
||
}
|
||
|
||
/* istanbul ignore next */
|
||
exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;
|
||
/* istanbul ignore next */
|
||
exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;
|
||
|
||
function readFloat_f32_cpy(buf, pos) {
|
||
f8b[0] = buf[pos ];
|
||
f8b[1] = buf[pos + 1];
|
||
f8b[2] = buf[pos + 2];
|
||
f8b[3] = buf[pos + 3];
|
||
return f32[0];
|
||
}
|
||
|
||
function readFloat_f32_rev(buf, pos) {
|
||
f8b[3] = buf[pos ];
|
||
f8b[2] = buf[pos + 1];
|
||
f8b[1] = buf[pos + 2];
|
||
f8b[0] = buf[pos + 3];
|
||
return f32[0];
|
||
}
|
||
|
||
/* istanbul ignore next */
|
||
exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;
|
||
/* istanbul ignore next */
|
||
exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;
|
||
|
||
// float: ieee754
|
||
})(); else (function() {
|
||
|
||
function writeFloat_ieee754(writeUint, val, buf, pos) {
|
||
var sign = val < 0 ? 1 : 0;
|
||
if (sign)
|
||
val = -val;
|
||
if (val === 0)
|
||
writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);
|
||
else if (isNaN(val))
|
||
writeUint(2143289344, buf, pos);
|
||
else if (val > 3.4028234663852886e+38) // +-Infinity
|
||
writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);
|
||
else if (val < 1.1754943508222875e-38) // denormal
|
||
writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);
|
||
else {
|
||
var exponent = Math.floor(Math.log(val) / Math.LN2),
|
||
mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;
|
||
writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);
|
||
}
|
||
}
|
||
|
||
exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);
|
||
exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);
|
||
|
||
function readFloat_ieee754(readUint, buf, pos) {
|
||
var uint = readUint(buf, pos),
|
||
sign = (uint >> 31) * 2 + 1,
|
||
exponent = uint >>> 23 & 255,
|
||
mantissa = uint & 8388607;
|
||
return exponent === 255
|
||
? mantissa
|
||
? NaN
|
||
: sign * Infinity
|
||
: exponent === 0 // denormal
|
||
? sign * 1.401298464324817e-45 * mantissa
|
||
: sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);
|
||
}
|
||
|
||
exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);
|
||
exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);
|
||
|
||
})();
|
||
|
||
// double: typed array
|
||
if (typeof Float64Array !== "undefined") (function() {
|
||
|
||
var f64 = new Float64Array([-0]),
|
||
f8b = new Uint8Array(f64.buffer),
|
||
le = f8b[7] === 128;
|
||
|
||
function writeDouble_f64_cpy(val, buf, pos) {
|
||
f64[0] = val;
|
||
buf[pos ] = f8b[0];
|
||
buf[pos + 1] = f8b[1];
|
||
buf[pos + 2] = f8b[2];
|
||
buf[pos + 3] = f8b[3];
|
||
buf[pos + 4] = f8b[4];
|
||
buf[pos + 5] = f8b[5];
|
||
buf[pos + 6] = f8b[6];
|
||
buf[pos + 7] = f8b[7];
|
||
}
|
||
|
||
function writeDouble_f64_rev(val, buf, pos) {
|
||
f64[0] = val;
|
||
buf[pos ] = f8b[7];
|
||
buf[pos + 1] = f8b[6];
|
||
buf[pos + 2] = f8b[5];
|
||
buf[pos + 3] = f8b[4];
|
||
buf[pos + 4] = f8b[3];
|
||
buf[pos + 5] = f8b[2];
|
||
buf[pos + 6] = f8b[1];
|
||
buf[pos + 7] = f8b[0];
|
||
}
|
||
|
||
/* istanbul ignore next */
|
||
exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;
|
||
/* istanbul ignore next */
|
||
exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;
|
||
|
||
function readDouble_f64_cpy(buf, pos) {
|
||
f8b[0] = buf[pos ];
|
||
f8b[1] = buf[pos + 1];
|
||
f8b[2] = buf[pos + 2];
|
||
f8b[3] = buf[pos + 3];
|
||
f8b[4] = buf[pos + 4];
|
||
f8b[5] = buf[pos + 5];
|
||
f8b[6] = buf[pos + 6];
|
||
f8b[7] = buf[pos + 7];
|
||
return f64[0];
|
||
}
|
||
|
||
function readDouble_f64_rev(buf, pos) {
|
||
f8b[7] = buf[pos ];
|
||
f8b[6] = buf[pos + 1];
|
||
f8b[5] = buf[pos + 2];
|
||
f8b[4] = buf[pos + 3];
|
||
f8b[3] = buf[pos + 4];
|
||
f8b[2] = buf[pos + 5];
|
||
f8b[1] = buf[pos + 6];
|
||
f8b[0] = buf[pos + 7];
|
||
return f64[0];
|
||
}
|
||
|
||
/* istanbul ignore next */
|
||
exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;
|
||
/* istanbul ignore next */
|
||
exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;
|
||
|
||
// double: ieee754
|
||
})(); else (function() {
|
||
|
||
function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {
|
||
var sign = val < 0 ? 1 : 0;
|
||
if (sign)
|
||
val = -val;
|
||
if (val === 0) {
|
||
writeUint(0, buf, pos + off0);
|
||
writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);
|
||
} else if (isNaN(val)) {
|
||
writeUint(0, buf, pos + off0);
|
||
writeUint(2146959360, buf, pos + off1);
|
||
} else if (val > 1.7976931348623157e+308) { // +-Infinity
|
||
writeUint(0, buf, pos + off0);
|
||
writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);
|
||
} else {
|
||
var mantissa;
|
||
if (val < 2.2250738585072014e-308) { // denormal
|
||
mantissa = val / 5e-324;
|
||
writeUint(mantissa >>> 0, buf, pos + off0);
|
||
writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);
|
||
} else {
|
||
var exponent = Math.floor(Math.log(val) / Math.LN2);
|
||
if (exponent === 1024)
|
||
exponent = 1023;
|
||
mantissa = val * Math.pow(2, -exponent);
|
||
writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);
|
||
writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);
|
||
}
|
||
}
|
||
}
|
||
|
||
exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);
|
||
exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);
|
||
|
||
function readDouble_ieee754(readUint, off0, off1, buf, pos) {
|
||
var lo = readUint(buf, pos + off0),
|
||
hi = readUint(buf, pos + off1);
|
||
var sign = (hi >> 31) * 2 + 1,
|
||
exponent = hi >>> 20 & 2047,
|
||
mantissa = 4294967296 * (hi & 1048575) + lo;
|
||
return exponent === 2047
|
||
? mantissa
|
||
? NaN
|
||
: sign * Infinity
|
||
: exponent === 0 // denormal
|
||
? sign * 5e-324 * mantissa
|
||
: sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);
|
||
}
|
||
|
||
exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);
|
||
exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);
|
||
|
||
})();
|
||
|
||
return exports;
|
||
}
|
||
|
||
// uint helpers
|
||
|
||
function writeUintLE(val, buf, pos) {
|
||
buf[pos ] = val & 255;
|
||
buf[pos + 1] = val >>> 8 & 255;
|
||
buf[pos + 2] = val >>> 16 & 255;
|
||
buf[pos + 3] = val >>> 24;
|
||
}
|
||
|
||
function writeUintBE(val, buf, pos) {
|
||
buf[pos ] = val >>> 24;
|
||
buf[pos + 1] = val >>> 16 & 255;
|
||
buf[pos + 2] = val >>> 8 & 255;
|
||
buf[pos + 3] = val & 255;
|
||
}
|
||
|
||
function readUintLE(buf, pos) {
|
||
return (buf[pos ]
|
||
| buf[pos + 1] << 8
|
||
| buf[pos + 2] << 16
|
||
| buf[pos + 3] << 24) >>> 0;
|
||
}
|
||
|
||
function readUintBE(buf, pos) {
|
||
return (buf[pos ] << 24
|
||
| buf[pos + 1] << 16
|
||
| buf[pos + 2] << 8
|
||
| buf[pos + 3]) >>> 0;
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/@protobufjs/inquire/index.js":
|
||
/*!***************************************************!*\
|
||
!*** ./node_modules/@protobufjs/inquire/index.js ***!
|
||
\***************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
module.exports = inquire;
|
||
|
||
/**
|
||
* Requires a module only if available.
|
||
* @memberof util
|
||
* @param {string} moduleName Module to require
|
||
* @returns {?Object} Required module if available and not empty, otherwise `null`
|
||
*/
|
||
function inquire(moduleName) {
|
||
try {
|
||
var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval
|
||
if (mod && (mod.length || Object.keys(mod).length))
|
||
return mod;
|
||
} catch (e) {} // eslint-disable-line no-empty
|
||
return null;
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/@protobufjs/pool/index.js":
|
||
/*!************************************************!*\
|
||
!*** ./node_modules/@protobufjs/pool/index.js ***!
|
||
\************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
module.exports = pool;
|
||
|
||
/**
|
||
* An allocator as used by {@link util.pool}.
|
||
* @typedef PoolAllocator
|
||
* @type {function}
|
||
* @param {number} size Buffer size
|
||
* @returns {Uint8Array} Buffer
|
||
*/
|
||
|
||
/**
|
||
* A slicer as used by {@link util.pool}.
|
||
* @typedef PoolSlicer
|
||
* @type {function}
|
||
* @param {number} start Start offset
|
||
* @param {number} end End offset
|
||
* @returns {Uint8Array} Buffer slice
|
||
* @this {Uint8Array}
|
||
*/
|
||
|
||
/**
|
||
* A general purpose buffer pool.
|
||
* @memberof util
|
||
* @function
|
||
* @param {PoolAllocator} alloc Allocator
|
||
* @param {PoolSlicer} slice Slicer
|
||
* @param {number} [size=8192] Slab size
|
||
* @returns {PoolAllocator} Pooled allocator
|
||
*/
|
||
function pool(alloc, slice, size) {
|
||
var SIZE = size || 8192;
|
||
var MAX = SIZE >>> 1;
|
||
var slab = null;
|
||
var offset = SIZE;
|
||
return function pool_alloc(size) {
|
||
if (size < 1 || size > MAX)
|
||
return alloc(size);
|
||
if (offset + size > SIZE) {
|
||
slab = alloc(SIZE);
|
||
offset = 0;
|
||
}
|
||
var buf = slice.call(slab, offset, offset += size);
|
||
if (offset & 7) // align to 32 bit
|
||
offset = (offset | 7) + 1;
|
||
return buf;
|
||
};
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/@protobufjs/utf8/index.js":
|
||
/*!************************************************!*\
|
||
!*** ./node_modules/@protobufjs/utf8/index.js ***!
|
||
\************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
/**
|
||
* A minimal UTF8 implementation for number arrays.
|
||
* @memberof util
|
||
* @namespace
|
||
*/
|
||
var utf8 = exports;
|
||
|
||
/**
|
||
* Calculates the UTF8 byte length of a string.
|
||
* @param {string} string String
|
||
* @returns {number} Byte length
|
||
*/
|
||
utf8.length = function utf8_length(string) {
|
||
var len = 0,
|
||
c = 0;
|
||
for (var i = 0; i < string.length; ++i) {
|
||
c = string.charCodeAt(i);
|
||
if (c < 128)
|
||
len += 1;
|
||
else if (c < 2048)
|
||
len += 2;
|
||
else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {
|
||
++i;
|
||
len += 4;
|
||
} else
|
||
len += 3;
|
||
}
|
||
return len;
|
||
};
|
||
|
||
/**
|
||
* Reads UTF8 bytes as a string.
|
||
* @param {Uint8Array} buffer Source buffer
|
||
* @param {number} start Source start
|
||
* @param {number} end Source end
|
||
* @returns {string} String read
|
||
*/
|
||
utf8.read = function utf8_read(buffer, start, end) {
|
||
var len = end - start;
|
||
if (len < 1)
|
||
return "";
|
||
var parts = null,
|
||
chunk = [],
|
||
i = 0, // char offset
|
||
t; // temporary
|
||
while (start < end) {
|
||
t = buffer[start++];
|
||
if (t < 128)
|
||
chunk[i++] = t;
|
||
else if (t > 191 && t < 224)
|
||
chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;
|
||
else if (t > 239 && t < 365) {
|
||
t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;
|
||
chunk[i++] = 0xD800 + (t >> 10);
|
||
chunk[i++] = 0xDC00 + (t & 1023);
|
||
} else
|
||
chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
|
||
if (i > 8191) {
|
||
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
|
||
i = 0;
|
||
}
|
||
}
|
||
if (parts) {
|
||
if (i)
|
||
parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
|
||
return parts.join("");
|
||
}
|
||
return String.fromCharCode.apply(String, chunk.slice(0, i));
|
||
};
|
||
|
||
/**
|
||
* Writes a string as UTF8 bytes.
|
||
* @param {string} string Source string
|
||
* @param {Uint8Array} buffer Destination buffer
|
||
* @param {number} offset Destination offset
|
||
* @returns {number} Bytes written
|
||
*/
|
||
utf8.write = function utf8_write(string, buffer, offset) {
|
||
var start = offset,
|
||
c1, // character 1
|
||
c2; // character 2
|
||
for (var i = 0; i < string.length; ++i) {
|
||
c1 = string.charCodeAt(i);
|
||
if (c1 < 128) {
|
||
buffer[offset++] = c1;
|
||
} else if (c1 < 2048) {
|
||
buffer[offset++] = c1 >> 6 | 192;
|
||
buffer[offset++] = c1 & 63 | 128;
|
||
} else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {
|
||
c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);
|
||
++i;
|
||
buffer[offset++] = c1 >> 18 | 240;
|
||
buffer[offset++] = c1 >> 12 & 63 | 128;
|
||
buffer[offset++] = c1 >> 6 & 63 | 128;
|
||
buffer[offset++] = c1 & 63 | 128;
|
||
} else {
|
||
buffer[offset++] = c1 >> 12 | 224;
|
||
buffer[offset++] = c1 >> 6 & 63 | 128;
|
||
buffer[offset++] = c1 & 63 | 128;
|
||
}
|
||
}
|
||
return offset - start;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/classnames/index.js":
|
||
/*!******************************************!*\
|
||
!*** ./node_modules/classnames/index.js ***!
|
||
\******************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
||
Copyright (c) 2017 Jed Watson.
|
||
Licensed under the MIT License (MIT), see
|
||
http://jedwatson.github.io/classnames
|
||
*/
|
||
/* global define */
|
||
|
||
(function () {
|
||
'use strict';
|
||
|
||
var hasOwn = {}.hasOwnProperty;
|
||
|
||
function classNames () {
|
||
var classes = [];
|
||
|
||
for (var i = 0; i < arguments.length; i++) {
|
||
var arg = arguments[i];
|
||
if (!arg) continue;
|
||
|
||
var argType = typeof arg;
|
||
|
||
if (argType === 'string' || argType === 'number') {
|
||
classes.push(arg);
|
||
} else if (Array.isArray(arg) && arg.length) {
|
||
var inner = classNames.apply(null, arg);
|
||
if (inner) {
|
||
classes.push(inner);
|
||
}
|
||
} else if (argType === 'object') {
|
||
for (var key in arg) {
|
||
if (hasOwn.call(arg, key) && arg[key]) {
|
||
classes.push(key);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
return classes.join(' ');
|
||
}
|
||
|
||
if ( true && module.exports) {
|
||
classNames.default = classNames;
|
||
module.exports = classNames;
|
||
} else if (true) {
|
||
// register as 'classnames', consistent with npm package name
|
||
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
|
||
return classNames;
|
||
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
||
} else {}
|
||
}());
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/history/node_modules/warning/browser.js":
|
||
/*!**************************************************************!*\
|
||
!*** ./node_modules/history/node_modules/warning/browser.js ***!
|
||
\**************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright 2014-2015, Facebook, Inc.
|
||
* All rights reserved.
|
||
*
|
||
* This source code is licensed under the BSD-style license found in the
|
||
* LICENSE file in the root directory of this source tree. An additional grant
|
||
* of patent rights can be found in the PATENTS file in the same directory.
|
||
*/
|
||
|
||
|
||
|
||
/**
|
||
* Similar to invariant but only logs a warning if the condition is not met.
|
||
* This can be used to log issues in development environments in critical
|
||
* paths. Removing the logging code for production environments will keep the
|
||
* same logic and follow the same code paths.
|
||
*/
|
||
|
||
var warning = function() {};
|
||
|
||
if (true) {
|
||
warning = function(condition, format, args) {
|
||
var len = arguments.length;
|
||
args = new Array(len > 2 ? len - 2 : 0);
|
||
for (var key = 2; key < len; key++) {
|
||
args[key - 2] = arguments[key];
|
||
}
|
||
if (format === undefined) {
|
||
throw new Error(
|
||
'`warning(condition, format, ...args)` requires a warning ' +
|
||
'message argument'
|
||
);
|
||
}
|
||
|
||
if (format.length < 10 || (/^[s\W]*$/).test(format)) {
|
||
throw new Error(
|
||
'The warning format should be able to uniquely identify this ' +
|
||
'warning. Please, use a more descriptive format than: ' + format
|
||
);
|
||
}
|
||
|
||
if (!condition) {
|
||
var argIndex = 0;
|
||
var message = 'Warning: ' +
|
||
format.replace(/%s/g, function() {
|
||
return args[argIndex++];
|
||
});
|
||
if (typeof console !== 'undefined') {
|
||
console.error(message);
|
||
}
|
||
try {
|
||
// This error was thrown as a convenience so that you can use this stack
|
||
// to find the callsite that caused this warning to fire.
|
||
throw new Error(message);
|
||
} catch(x) {}
|
||
}
|
||
};
|
||
}
|
||
|
||
module.exports = warning;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":
|
||
/*!**********************************************************************************!*\
|
||
!*** ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***!
|
||
\**********************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
/**
|
||
* Copyright 2015, Yahoo! Inc.
|
||
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
||
*/
|
||
var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
|
||
var REACT_STATICS = {
|
||
childContextTypes: true,
|
||
contextType: true,
|
||
contextTypes: true,
|
||
defaultProps: true,
|
||
displayName: true,
|
||
getDefaultProps: true,
|
||
getDerivedStateFromError: true,
|
||
getDerivedStateFromProps: true,
|
||
mixins: true,
|
||
propTypes: true,
|
||
type: true
|
||
};
|
||
|
||
var KNOWN_STATICS = {
|
||
name: true,
|
||
length: true,
|
||
prototype: true,
|
||
caller: true,
|
||
callee: true,
|
||
arguments: true,
|
||
arity: true
|
||
};
|
||
|
||
var FORWARD_REF_STATICS = {
|
||
'$$typeof': true,
|
||
render: true,
|
||
defaultProps: true,
|
||
displayName: true,
|
||
propTypes: true
|
||
};
|
||
|
||
var TYPE_STATICS = {};
|
||
TYPE_STATICS[ReactIs.ForwardRef] = FORWARD_REF_STATICS;
|
||
|
||
var defineProperty = Object.defineProperty;
|
||
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
||
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||
var getPrototypeOf = Object.getPrototypeOf;
|
||
var objectPrototype = Object.prototype;
|
||
|
||
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
||
if (typeof sourceComponent !== 'string') {
|
||
// don't hoist over string (html) components
|
||
|
||
if (objectPrototype) {
|
||
var inheritedComponent = getPrototypeOf(sourceComponent);
|
||
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
||
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
||
}
|
||
}
|
||
|
||
var keys = getOwnPropertyNames(sourceComponent);
|
||
|
||
if (getOwnPropertySymbols) {
|
||
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
||
}
|
||
|
||
var targetStatics = TYPE_STATICS[targetComponent['$$typeof']] || REACT_STATICS;
|
||
var sourceStatics = TYPE_STATICS[sourceComponent['$$typeof']] || REACT_STATICS;
|
||
|
||
for (var i = 0; i < keys.length; ++i) {
|
||
var key = keys[i];
|
||
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
||
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
||
try {
|
||
// Avoid failures from read-only properties
|
||
defineProperty(targetComponent, key, descriptor);
|
||
} catch (e) {}
|
||
}
|
||
}
|
||
|
||
return targetComponent;
|
||
}
|
||
|
||
return targetComponent;
|
||
}
|
||
|
||
module.exports = hoistNonReactStatics;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/invariant/browser.js":
|
||
/*!*******************************************!*\
|
||
!*** ./node_modules/invariant/browser.js ***!
|
||
\*******************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
/**
|
||
* Use invariant() to assert state which your program assumes to be true.
|
||
*
|
||
* Provide sprintf-style format (only %s is supported) and arguments
|
||
* to provide information about what broke and what you were
|
||
* expecting.
|
||
*
|
||
* The invariant message will be stripped in production, but the invariant
|
||
* will remain to ensure logic does not differ in production.
|
||
*/
|
||
|
||
var invariant = function(condition, format, a, b, c, d, e, f) {
|
||
if (true) {
|
||
if (format === undefined) {
|
||
throw new Error('invariant requires an error message argument');
|
||
}
|
||
}
|
||
|
||
if (!condition) {
|
||
var error;
|
||
if (format === undefined) {
|
||
error = new Error(
|
||
'Minified exception occurred; use the non-minified dev environment ' +
|
||
'for the full error message and additional helpful warnings.'
|
||
);
|
||
} else {
|
||
var args = [a, b, c, d, e, f];
|
||
var argIndex = 0;
|
||
error = new Error(
|
||
format.replace(/%s/g, function() { return args[argIndex++]; })
|
||
);
|
||
error.name = 'Invariant Violation';
|
||
}
|
||
|
||
error.framesToPop = 1; // we don't care about invariant's own frame
|
||
throw error;
|
||
}
|
||
};
|
||
|
||
module.exports = invariant;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/object-assign/index.js":
|
||
/*!*********************************************!*\
|
||
!*** ./node_modules/object-assign/index.js ***!
|
||
\*********************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/*
|
||
object-assign
|
||
(c) Sindre Sorhus
|
||
@license MIT
|
||
*/
|
||
|
||
|
||
/* eslint-disable no-unused-vars */
|
||
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
||
|
||
function toObject(val) {
|
||
if (val === null || val === undefined) {
|
||
throw new TypeError('Object.assign cannot be called with null or undefined');
|
||
}
|
||
|
||
return Object(val);
|
||
}
|
||
|
||
function shouldUseNative() {
|
||
try {
|
||
if (!Object.assign) {
|
||
return false;
|
||
}
|
||
|
||
// Detect buggy property enumeration order in older V8 versions.
|
||
|
||
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
||
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
||
test1[5] = 'de';
|
||
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
||
return false;
|
||
}
|
||
|
||
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
||
var test2 = {};
|
||
for (var i = 0; i < 10; i++) {
|
||
test2['_' + String.fromCharCode(i)] = i;
|
||
}
|
||
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
||
return test2[n];
|
||
});
|
||
if (order2.join('') !== '0123456789') {
|
||
return false;
|
||
}
|
||
|
||
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
||
var test3 = {};
|
||
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
||
test3[letter] = letter;
|
||
});
|
||
if (Object.keys(Object.assign({}, test3)).join('') !==
|
||
'abcdefghijklmnopqrst') {
|
||
return false;
|
||
}
|
||
|
||
return true;
|
||
} catch (err) {
|
||
// We don't expect any of the above to throw, but better to be safe.
|
||
return false;
|
||
}
|
||
}
|
||
|
||
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
||
var from;
|
||
var to = toObject(target);
|
||
var symbols;
|
||
|
||
for (var s = 1; s < arguments.length; s++) {
|
||
from = Object(arguments[s]);
|
||
|
||
for (var key in from) {
|
||
if (hasOwnProperty.call(from, key)) {
|
||
to[key] = from[key];
|
||
}
|
||
}
|
||
|
||
if (getOwnPropertySymbols) {
|
||
symbols = getOwnPropertySymbols(from);
|
||
for (var i = 0; i < symbols.length; i++) {
|
||
if (propIsEnumerable.call(from, symbols[i])) {
|
||
to[symbols[i]] = from[symbols[i]];
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
return to;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/pogo-protos/compiled.js":
|
||
/*!**********************************************!*\
|
||
!*** ./node_modules/pogo-protos/compiled.js ***!
|
||
\**********************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(global,factory){if(true)!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! protobufjs/minimal */ "./node_modules/protobufjs/minimal.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
||
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
||
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
||
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}})(this,function($protobuf){"use strict";var $Reader=$protobuf.Reader,$Writer=$protobuf.Writer,$util=$protobuf.util;var $root=$protobuf.roots["default"]||($protobuf.roots["default"]={});$root.POGOProtos=function(){var POGOProtos={};POGOProtos.Data=function(){var Data={};Data.Analytics=function(){var Analytics={};Analytics.ClientTelemetryBatch=function(){function ClientTelemetryBatch(p){this.events=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ClientTelemetryBatch.prototype.telemetry_scope_id=0;ClientTelemetryBatch.prototype.events=$util.emptyArray;ClientTelemetryBatch.prototype.api_version="";ClientTelemetryBatch.prototype.message_version="";ClientTelemetryBatch.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.telemetry_scope_id!=null&&m.hasOwnProperty("telemetry_scope_id"))w.uint32(8).int32(m.telemetry_scope_id);if(m.events!=null&&m.events.length){for(var i=0;i<m.events.length;++i)$root.POGOProtos.Data.Analytics.ClientTelemetryRecord.encode(m.events[i],w.uint32(18).fork()).ldelim()}if(m.api_version!=null&&m.hasOwnProperty("api_version"))w.uint32(26).string(m.api_version);if(m.message_version!=null&&m.hasOwnProperty("message_version"))w.uint32(34).string(m.message_version);return w};ClientTelemetryBatch.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Analytics.ClientTelemetryBatch;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.telemetry_scope_id=r.int32();break;case 2:if(!(m.events&&m.events.length))m.events=[];m.events.push($root.POGOProtos.Data.Analytics.ClientTelemetryRecord.decode(r,r.uint32()));break;case 3:m.api_version=r.string();break;case 4:m.message_version=r.string();break;default:r.skipType(t&7);break}}return m};ClientTelemetryBatch.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Analytics.ClientTelemetryBatch)return d;var m=new $root.POGOProtos.Data.Analytics.ClientTelemetryBatch;switch(d.telemetry_scope_id){case"UNSET":case 0:m.telemetry_scope_id=0;break;case"DITTO":case 1:m.telemetry_scope_id=1;break;case"GAME":case 2:m.telemetry_scope_id=2;break}if(d.events){if(!Array.isArray(d.events))throw TypeError(".POGOProtos.Data.Analytics.ClientTelemetryBatch.events: array expected");m.events=[];for(var i=0;i<d.events.length;++i){if(typeof d.events[i]!=="object")throw TypeError(".POGOProtos.Data.Analytics.ClientTelemetryBatch.events: object expected");m.events[i]=$root.POGOProtos.Data.Analytics.ClientTelemetryRecord.fromObject(d.events[i])}}if(d.api_version!=null){m.api_version=String(d.api_version)}if(d.message_version!=null){m.message_version=String(d.message_version)}return m};ClientTelemetryBatch.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.events=[]}if(o.defaults){d.telemetry_scope_id=o.enums===String?"UNSET":0;d.api_version="";d.message_version=""}if(m.telemetry_scope_id!=null&&m.hasOwnProperty("telemetry_scope_id")){d.telemetry_scope_id=o.enums===String?$root.POGOProtos.Data.Analytics.ClientTelemetryBatch.TelemetryScopeId[m.telemetry_scope_id]:m.telemetry_scope_id}if(m.events&&m.events.length){d.events=[];for(var j=0;j<m.events.length;++j){d.events[j]=$root.POGOProtos.Data.Analytics.ClientTelemetryRecord.toObject(m.events[j],o)}}if(m.api_version!=null&&m.hasOwnProperty("api_version")){d.api_version=m.api_version}if(m.message_version!=null&&m.hasOwnProperty("message_version")){d.message_version=m.message_version}return d};ClientTelemetryBatch.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ClientTelemetryBatch.TelemetryScopeId=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="DITTO"]=1;values[valuesById[2]="GAME"]=2;return values}();return ClientTelemetryBatch}();Analytics.ClientTelemetryClientSettings=function(){function ClientTelemetryClientSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ClientTelemetryClientSettings.prototype.is_upload_enabled=false;ClientTelemetryClientSettings.prototype.max_upload_size_in_bytes=$util.Long?$util.Long.fromBits(0,0,false):0;ClientTelemetryClientSettings.prototype.update_interval_in_sec=$util.Long?$util.Long.fromBits(0,0,false):0;ClientTelemetryClientSettings.prototype.settings_update_interval_in_sec=$util.Long?$util.Long.fromBits(0,0,false):0;ClientTelemetryClientSettings.prototype.max_envelope_queue_size=$util.Long?$util.Long.fromBits(0,0,false):0;ClientTelemetryClientSettings.prototype.sampling_probability=0;ClientTelemetryClientSettings.prototype.use_player_based_sampling=false;ClientTelemetryClientSettings.prototype.player_hash=0;ClientTelemetryClientSettings.prototype.player_external_omni_id="";ClientTelemetryClientSettings.prototype.disable_omni_sending=false;ClientTelemetryClientSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.is_upload_enabled!=null&&m.hasOwnProperty("is_upload_enabled"))w.uint32(8).bool(m.is_upload_enabled);if(m.max_upload_size_in_bytes!=null&&m.hasOwnProperty("max_upload_size_in_bytes"))w.uint32(16).int64(m.max_upload_size_in_bytes);if(m.update_interval_in_sec!=null&&m.hasOwnProperty("update_interval_in_sec"))w.uint32(24).int64(m.update_interval_in_sec);if(m.settings_update_interval_in_sec!=null&&m.hasOwnProperty("settings_update_interval_in_sec"))w.uint32(32).int64(m.settings_update_interval_in_sec);if(m.max_envelope_queue_size!=null&&m.hasOwnProperty("max_envelope_queue_size"))w.uint32(40).int64(m.max_envelope_queue_size);if(m.sampling_probability!=null&&m.hasOwnProperty("sampling_probability"))w.uint32(49).double(m.sampling_probability);if(m.use_player_based_sampling!=null&&m.hasOwnProperty("use_player_based_sampling"))w.uint32(56).bool(m.use_player_based_sampling);if(m.player_hash!=null&&m.hasOwnProperty("player_hash"))w.uint32(65).double(m.player_hash);if(m.player_external_omni_id!=null&&m.hasOwnProperty("player_external_omni_id"))w.uint32(74).string(m.player_external_omni_id);if(m.disable_omni_sending!=null&&m.hasOwnProperty("disable_omni_sending"))w.uint32(80).bool(m.disable_omni_sending);return w};ClientTelemetryClientSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Analytics.ClientTelemetryClientSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.is_upload_enabled=r.bool();break;case 2:m.max_upload_size_in_bytes=r.int64();break;case 3:m.update_interval_in_sec=r.int64();break;case 4:m.settings_update_interval_in_sec=r.int64();break;case 5:m.max_envelope_queue_size=r.int64();break;case 6:m.sampling_probability=r.double();break;case 7:m.use_player_based_sampling=r.bool();break;case 8:m.player_hash=r.double();break;case 9:m.player_external_omni_id=r.string();break;case 10:m.disable_omni_sending=r.bool();break;default:r.skipType(t&7);break}}return m};ClientTelemetryClientSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Analytics.ClientTelemetryClientSettings)return d;var m=new $root.POGOProtos.Data.Analytics.ClientTelemetryClientSettings;if(d.is_upload_enabled!=null){m.is_upload_enabled=Boolean(d.is_upload_enabled)}if(d.max_upload_size_in_bytes!=null){if($util.Long)(m.max_upload_size_in_bytes=$util.Long.fromValue(d.max_upload_size_in_bytes)).unsigned=false;else if(typeof d.max_upload_size_in_bytes==="string")m.max_upload_size_in_bytes=parseInt(d.max_upload_size_in_bytes,10);else if(typeof d.max_upload_size_in_bytes==="number")m.max_upload_size_in_bytes=d.max_upload_size_in_bytes;else if(typeof d.max_upload_size_in_bytes==="object")m.max_upload_size_in_bytes=new $util.LongBits(d.max_upload_size_in_bytes.low>>>0,d.max_upload_size_in_bytes.high>>>0).toNumber()}if(d.update_interval_in_sec!=null){if($util.Long)(m.update_interval_in_sec=$util.Long.fromValue(d.update_interval_in_sec)).unsigned=false;else if(typeof d.update_interval_in_sec==="string")m.update_interval_in_sec=parseInt(d.update_interval_in_sec,10);else if(typeof d.update_interval_in_sec==="number")m.update_interval_in_sec=d.update_interval_in_sec;else if(typeof d.update_interval_in_sec==="object")m.update_interval_in_sec=new $util.LongBits(d.update_interval_in_sec.low>>>0,d.update_interval_in_sec.high>>>0).toNumber()}if(d.settings_update_interval_in_sec!=null){if($util.Long)(m.settings_update_interval_in_sec=$util.Long.fromValue(d.settings_update_interval_in_sec)).unsigned=false;else if(typeof d.settings_update_interval_in_sec==="string")m.settings_update_interval_in_sec=parseInt(d.settings_update_interval_in_sec,10);else if(typeof d.settings_update_interval_in_sec==="number")m.settings_update_interval_in_sec=d.settings_update_interval_in_sec;else if(typeof d.settings_update_interval_in_sec==="object")m.settings_update_interval_in_sec=new $util.LongBits(d.settings_update_interval_in_sec.low>>>0,d.settings_update_interval_in_sec.high>>>0).toNumber()}if(d.max_envelope_queue_size!=null){if($util.Long)(m.max_envelope_queue_size=$util.Long.fromValue(d.max_envelope_queue_size)).unsigned=false;else if(typeof d.max_envelope_queue_size==="string")m.max_envelope_queue_size=parseInt(d.max_envelope_queue_size,10);else if(typeof d.max_envelope_queue_size==="number")m.max_envelope_queue_size=d.max_envelope_queue_size;else if(typeof d.max_envelope_queue_size==="object")m.max_envelope_queue_size=new $util.LongBits(d.max_envelope_queue_size.low>>>0,d.max_envelope_queue_size.high>>>0).toNumber()}if(d.sampling_probability!=null){m.sampling_probability=Number(d.sampling_probability)}if(d.use_player_based_sampling!=null){m.use_player_based_sampling=Boolean(d.use_player_based_sampling)}if(d.player_hash!=null){m.player_hash=Number(d.player_hash)}if(d.player_external_omni_id!=null){m.player_external_omni_id=String(d.player_external_omni_id)}if(d.disable_omni_sending!=null){m.disable_omni_sending=Boolean(d.disable_omni_sending)}return m};ClientTelemetryClientSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.is_upload_enabled=false;if($util.Long){var n=new $util.Long(0,0,false);d.max_upload_size_in_bytes=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.max_upload_size_in_bytes=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.update_interval_in_sec=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.update_interval_in_sec=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.settings_update_interval_in_sec=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.settings_update_interval_in_sec=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.max_envelope_queue_size=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.max_envelope_queue_size=o.longs===String?"0":0;d.sampling_probability=0;d.use_player_based_sampling=false;d.player_hash=0;d.player_external_omni_id="";d.disable_omni_sending=false}if(m.is_upload_enabled!=null&&m.hasOwnProperty("is_upload_enabled")){d.is_upload_enabled=m.is_upload_enabled}if(m.max_upload_size_in_bytes!=null&&m.hasOwnProperty("max_upload_size_in_bytes")){if(typeof m.max_upload_size_in_bytes==="number")d.max_upload_size_in_bytes=o.longs===String?String(m.max_upload_size_in_bytes):m.max_upload_size_in_bytes;else d.max_upload_size_in_bytes=o.longs===String?$util.Long.prototype.toString.call(m.max_upload_size_in_bytes):o.longs===Number?new $util.LongBits(m.max_upload_size_in_bytes.low>>>0,m.max_upload_size_in_bytes.high>>>0).toNumber():m.max_upload_size_in_bytes}if(m.update_interval_in_sec!=null&&m.hasOwnProperty("update_interval_in_sec")){if(typeof m.update_interval_in_sec==="number")d.update_interval_in_sec=o.longs===String?String(m.update_interval_in_sec):m.update_interval_in_sec;else d.update_interval_in_sec=o.longs===String?$util.Long.prototype.toString.call(m.update_interval_in_sec):o.longs===Number?new $util.LongBits(m.update_interval_in_sec.low>>>0,m.update_interval_in_sec.high>>>0).toNumber():m.update_interval_in_sec}if(m.settings_update_interval_in_sec!=null&&m.hasOwnProperty("settings_update_interval_in_sec")){if(typeof m.settings_update_interval_in_sec==="number")d.settings_update_interval_in_sec=o.longs===String?String(m.settings_update_interval_in_sec):m.settings_update_interval_in_sec;else d.settings_update_interval_in_sec=o.longs===String?$util.Long.prototype.toString.call(m.settings_update_interval_in_sec):o.longs===Number?new $util.LongBits(m.settings_update_interval_in_sec.low>>>0,m.settings_update_interval_in_sec.high>>>0).toNumber():m.settings_update_interval_in_sec}if(m.max_envelope_queue_size!=null&&m.hasOwnProperty("max_envelope_queue_size")){if(typeof m.max_envelope_queue_size==="number")d.max_envelope_queue_size=o.longs===String?String(m.max_envelope_queue_size):m.max_envelope_queue_size;else d.max_envelope_queue_size=o.longs===String?$util.Long.prototype.toString.call(m.max_envelope_queue_size):o.longs===Number?new $util.LongBits(m.max_envelope_queue_size.low>>>0,m.max_envelope_queue_size.high>>>0).toNumber():m.max_envelope_queue_size}if(m.sampling_probability!=null&&m.hasOwnProperty("sampling_probability")){d.sampling_probability=o.json&&!isFinite(m.sampling_probability)?String(m.sampling_probability):m.sampling_probability}if(m.use_player_based_sampling!=null&&m.hasOwnProperty("use_player_based_sampling")){d.use_player_based_sampling=m.use_player_based_sampling}if(m.player_hash!=null&&m.hasOwnProperty("player_hash")){d.player_hash=o.json&&!isFinite(m.player_hash)?String(m.player_hash):m.player_hash}if(m.player_external_omni_id!=null&&m.hasOwnProperty("player_external_omni_id")){d.player_external_omni_id=m.player_external_omni_id}if(m.disable_omni_sending!=null&&m.hasOwnProperty("disable_omni_sending")){d.disable_omni_sending=m.disable_omni_sending}return d};ClientTelemetryClientSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ClientTelemetryClientSettings}();Analytics.ClientTelemetryRecord=function(){function ClientTelemetryRecord(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ClientTelemetryRecord.prototype.record_id="";ClientTelemetryRecord.prototype.encoded_message=$util.newBuffer([]);ClientTelemetryRecord.prototype.client_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;ClientTelemetryRecord.prototype.metric_id=$util.Long?$util.Long.fromBits(0,0,false):0;ClientTelemetryRecord.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.record_id!=null&&m.hasOwnProperty("record_id"))w.uint32(10).string(m.record_id);if(m.encoded_message!=null&&m.hasOwnProperty("encoded_message"))w.uint32(18).bytes(m.encoded_message);if(m.client_timestamp_ms!=null&&m.hasOwnProperty("client_timestamp_ms"))w.uint32(24).int64(m.client_timestamp_ms);if(m.metric_id!=null&&m.hasOwnProperty("metric_id"))w.uint32(32).int64(m.metric_id);return w};ClientTelemetryRecord.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Analytics.ClientTelemetryRecord;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.record_id=r.string();break;case 2:m.encoded_message=r.bytes();break;case 3:m.client_timestamp_ms=r.int64();break;case 4:m.metric_id=r.int64();break;default:r.skipType(t&7);break}}return m};ClientTelemetryRecord.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Analytics.ClientTelemetryRecord)return d;var m=new $root.POGOProtos.Data.Analytics.ClientTelemetryRecord;if(d.record_id!=null){m.record_id=String(d.record_id)}if(d.encoded_message!=null){if(typeof d.encoded_message==="string")$util.base64.decode(d.encoded_message,m.encoded_message=$util.newBuffer($util.base64.length(d.encoded_message)),0);else if(d.encoded_message.length)m.encoded_message=d.encoded_message}if(d.client_timestamp_ms!=null){if($util.Long)(m.client_timestamp_ms=$util.Long.fromValue(d.client_timestamp_ms)).unsigned=false;else if(typeof d.client_timestamp_ms==="string")m.client_timestamp_ms=parseInt(d.client_timestamp_ms,10);else if(typeof d.client_timestamp_ms==="number")m.client_timestamp_ms=d.client_timestamp_ms;else if(typeof d.client_timestamp_ms==="object")m.client_timestamp_ms=new $util.LongBits(d.client_timestamp_ms.low>>>0,d.client_timestamp_ms.high>>>0).toNumber()}if(d.metric_id!=null){if($util.Long)(m.metric_id=$util.Long.fromValue(d.metric_id)).unsigned=false;else if(typeof d.metric_id==="string")m.metric_id=parseInt(d.metric_id,10);else if(typeof d.metric_id==="number")m.metric_id=d.metric_id;else if(typeof d.metric_id==="object")m.metric_id=new $util.LongBits(d.metric_id.low>>>0,d.metric_id.high>>>0).toNumber()}return m};ClientTelemetryRecord.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.record_id="";if(o.bytes===String)d.encoded_message="";else{d.encoded_message=[];if(o.bytes!==Array)d.encoded_message=$util.newBuffer(d.encoded_message)}if($util.Long){var n=new $util.Long(0,0,false);d.client_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.client_timestamp_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.metric_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.metric_id=o.longs===String?"0":0}if(m.record_id!=null&&m.hasOwnProperty("record_id")){d.record_id=m.record_id}if(m.encoded_message!=null&&m.hasOwnProperty("encoded_message")){d.encoded_message=o.bytes===String?$util.base64.encode(m.encoded_message,0,m.encoded_message.length):o.bytes===Array?Array.prototype.slice.call(m.encoded_message):m.encoded_message}if(m.client_timestamp_ms!=null&&m.hasOwnProperty("client_timestamp_ms")){if(typeof m.client_timestamp_ms==="number")d.client_timestamp_ms=o.longs===String?String(m.client_timestamp_ms):m.client_timestamp_ms;else d.client_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.client_timestamp_ms):o.longs===Number?new $util.LongBits(m.client_timestamp_ms.low>>>0,m.client_timestamp_ms.high>>>0).toNumber():m.client_timestamp_ms}if(m.metric_id!=null&&m.hasOwnProperty("metric_id")){if(typeof m.metric_id==="number")d.metric_id=o.longs===String?String(m.metric_id):m.metric_id;else d.metric_id=o.longs===String?$util.Long.prototype.toString.call(m.metric_id):o.longs===Number?new $util.LongBits(m.metric_id.low>>>0,m.metric_id.high>>>0).toNumber():m.metric_id}return d};ClientTelemetryRecord.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ClientTelemetryRecord}();Analytics.ClientTelemetrySettingsRequest=function(){function ClientTelemetrySettingsRequest(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ClientTelemetrySettingsRequest.encode=function encode(m,w){if(!w)w=$Writer.create();return w};ClientTelemetrySettingsRequest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Analytics.ClientTelemetrySettingsRequest;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};ClientTelemetrySettingsRequest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Analytics.ClientTelemetrySettingsRequest)return d;return new $root.POGOProtos.Data.Analytics.ClientTelemetrySettingsRequest};ClientTelemetrySettingsRequest.toObject=function toObject(){return{}};ClientTelemetrySettingsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ClientTelemetrySettingsRequest}();return Analytics}();Data.ARPlusEncounterValues=function(){function ARPlusEncounterValues(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ARPlusEncounterValues.prototype.proximity=0;ARPlusEncounterValues.prototype.awareness=0;ARPlusEncounterValues.prototype.pokemon_frightened=false;ARPlusEncounterValues.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.proximity!=null&&m.hasOwnProperty("proximity"))w.uint32(13).float(m.proximity);if(m.awareness!=null&&m.hasOwnProperty("awareness"))w.uint32(21).float(m.awareness);if(m.pokemon_frightened!=null&&m.hasOwnProperty("pokemon_frightened"))w.uint32(24).bool(m.pokemon_frightened);return w};ARPlusEncounterValues.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.ARPlusEncounterValues;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.proximity=r.float();break;case 2:m.awareness=r.float();break;case 3:m.pokemon_frightened=r.bool();break;default:r.skipType(t&7);break}}return m};ARPlusEncounterValues.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.ARPlusEncounterValues)return d;var m=new $root.POGOProtos.Data.ARPlusEncounterValues;if(d.proximity!=null){m.proximity=Number(d.proximity)}if(d.awareness!=null){m.awareness=Number(d.awareness)}if(d.pokemon_frightened!=null){m.pokemon_frightened=Boolean(d.pokemon_frightened)}return m};ARPlusEncounterValues.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.proximity=0;d.awareness=0;d.pokemon_frightened=false}if(m.proximity!=null&&m.hasOwnProperty("proximity")){d.proximity=o.json&&!isFinite(m.proximity)?String(m.proximity):m.proximity}if(m.awareness!=null&&m.hasOwnProperty("awareness")){d.awareness=o.json&&!isFinite(m.awareness)?String(m.awareness):m.awareness}if(m.pokemon_frightened!=null&&m.hasOwnProperty("pokemon_frightened")){d.pokemon_frightened=m.pokemon_frightened}return d};ARPlusEncounterValues.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ARPlusEncounterValues}();Data.AssetCache=function(){var AssetCache={};AssetCache.HashedKey=function(){function HashedKey(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}HashedKey.prototype.hashed_key_raw="";HashedKey.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.hashed_key_raw!=null&&m.hasOwnProperty("hashed_key_raw"))w.uint32(10).string(m.hashed_key_raw);return w};HashedKey.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.AssetCache.HashedKey;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.hashed_key_raw=r.string();break;default:r.skipType(t&7);break}}return m};HashedKey.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.AssetCache.HashedKey)return d;var m=new $root.POGOProtos.Data.AssetCache.HashedKey;if(d.hashed_key_raw!=null){m.hashed_key_raw=String(d.hashed_key_raw)}return m};HashedKey.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.hashed_key_raw=""}if(m.hashed_key_raw!=null&&m.hasOwnProperty("hashed_key_raw")){d.hashed_key_raw=m.hashed_key_raw}return d};HashedKey.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return HashedKey}();AssetCache.JournalAddEntry=function(){function JournalAddEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}JournalAddEntry.prototype.hashed_key=null;JournalAddEntry.prototype.entry_size=$util.Long?$util.Long.fromBits(0,0,false):0;JournalAddEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.hashed_key!=null&&m.hasOwnProperty("hashed_key"))$root.POGOProtos.Data.AssetCache.HashedKey.encode(m.hashed_key,w.uint32(10).fork()).ldelim();if(m.entry_size!=null&&m.hasOwnProperty("entry_size"))w.uint32(16).int64(m.entry_size);return w};JournalAddEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.AssetCache.JournalAddEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.hashed_key=$root.POGOProtos.Data.AssetCache.HashedKey.decode(r,r.uint32());break;case 2:m.entry_size=r.int64();break;default:r.skipType(t&7);break}}return m};JournalAddEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.AssetCache.JournalAddEntry)return d;var m=new $root.POGOProtos.Data.AssetCache.JournalAddEntry;if(d.hashed_key!=null){if(typeof d.hashed_key!=="object")throw TypeError(".POGOProtos.Data.AssetCache.JournalAddEntry.hashed_key: object expected");m.hashed_key=$root.POGOProtos.Data.AssetCache.HashedKey.fromObject(d.hashed_key)}if(d.entry_size!=null){if($util.Long)(m.entry_size=$util.Long.fromValue(d.entry_size)).unsigned=false;else if(typeof d.entry_size==="string")m.entry_size=parseInt(d.entry_size,10);else if(typeof d.entry_size==="number")m.entry_size=d.entry_size;else if(typeof d.entry_size==="object")m.entry_size=new $util.LongBits(d.entry_size.low>>>0,d.entry_size.high>>>0).toNumber()}return m};JournalAddEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.hashed_key=null;if($util.Long){var n=new $util.Long(0,0,false);d.entry_size=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.entry_size=o.longs===String?"0":0}if(m.hashed_key!=null&&m.hasOwnProperty("hashed_key")){d.hashed_key=$root.POGOProtos.Data.AssetCache.HashedKey.toObject(m.hashed_key,o)}if(m.entry_size!=null&&m.hasOwnProperty("entry_size")){if(typeof m.entry_size==="number")d.entry_size=o.longs===String?String(m.entry_size):m.entry_size;else d.entry_size=o.longs===String?$util.Long.prototype.toString.call(m.entry_size):o.longs===Number?new $util.LongBits(m.entry_size.low>>>0,m.entry_size.high>>>0).toNumber():m.entry_size}return d};JournalAddEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return JournalAddEntry}();AssetCache.JournalEntry=function(){function JournalEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}JournalEntry.prototype.add_entry=null;JournalEntry.prototype.read_entry=null;JournalEntry.prototype.remove_entry=null;var $oneOfFields;Object.defineProperty(JournalEntry.prototype,"Subentry",{get:$util.oneOfGetter($oneOfFields=["add_entry","read_entry","remove_entry"]),set:$util.oneOfSetter($oneOfFields)});JournalEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.add_entry!=null&&m.hasOwnProperty("add_entry"))$root.POGOProtos.Data.AssetCache.JournalAddEntry.encode(m.add_entry,w.uint32(10).fork()).ldelim();if(m.read_entry!=null&&m.hasOwnProperty("read_entry"))$root.POGOProtos.Data.AssetCache.JournalReadEntry.encode(m.read_entry,w.uint32(18).fork()).ldelim();if(m.remove_entry!=null&&m.hasOwnProperty("remove_entry"))$root.POGOProtos.Data.AssetCache.JournalRemoveEntry.encode(m.remove_entry,w.uint32(26).fork()).ldelim();return w};JournalEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.AssetCache.JournalEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.add_entry=$root.POGOProtos.Data.AssetCache.JournalAddEntry.decode(r,r.uint32());break;case 2:m.read_entry=$root.POGOProtos.Data.AssetCache.JournalReadEntry.decode(r,r.uint32());break;case 3:m.remove_entry=$root.POGOProtos.Data.AssetCache.JournalRemoveEntry.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};JournalEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.AssetCache.JournalEntry)return d;var m=new $root.POGOProtos.Data.AssetCache.JournalEntry;if(d.add_entry!=null){if(typeof d.add_entry!=="object")throw TypeError(".POGOProtos.Data.AssetCache.JournalEntry.add_entry: object expected");m.add_entry=$root.POGOProtos.Data.AssetCache.JournalAddEntry.fromObject(d.add_entry)}if(d.read_entry!=null){if(typeof d.read_entry!=="object")throw TypeError(".POGOProtos.Data.AssetCache.JournalEntry.read_entry: object expected");m.read_entry=$root.POGOProtos.Data.AssetCache.JournalReadEntry.fromObject(d.read_entry)}if(d.remove_entry!=null){if(typeof d.remove_entry!=="object")throw TypeError(".POGOProtos.Data.AssetCache.JournalEntry.remove_entry: object expected");m.remove_entry=$root.POGOProtos.Data.AssetCache.JournalRemoveEntry.fromObject(d.remove_entry)}return m};JournalEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(m.add_entry!=null&&m.hasOwnProperty("add_entry")){d.add_entry=$root.POGOProtos.Data.AssetCache.JournalAddEntry.toObject(m.add_entry,o);if(o.oneofs)d.Subentry="add_entry"}if(m.read_entry!=null&&m.hasOwnProperty("read_entry")){d.read_entry=$root.POGOProtos.Data.AssetCache.JournalReadEntry.toObject(m.read_entry,o);if(o.oneofs)d.Subentry="read_entry"}if(m.remove_entry!=null&&m.hasOwnProperty("remove_entry")){d.remove_entry=$root.POGOProtos.Data.AssetCache.JournalRemoveEntry.toObject(m.remove_entry,o);if(o.oneofs)d.Subentry="remove_entry"}return d};JournalEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return JournalEntry}();AssetCache.JournalReadEntry=function(){function JournalReadEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}JournalReadEntry.prototype.hashed_key=null;JournalReadEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.hashed_key!=null&&m.hasOwnProperty("hashed_key"))$root.POGOProtos.Data.AssetCache.HashedKey.encode(m.hashed_key,w.uint32(10).fork()).ldelim();return w};JournalReadEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.AssetCache.JournalReadEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.hashed_key=$root.POGOProtos.Data.AssetCache.HashedKey.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};JournalReadEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.AssetCache.JournalReadEntry)return d;var m=new $root.POGOProtos.Data.AssetCache.JournalReadEntry;if(d.hashed_key!=null){if(typeof d.hashed_key!=="object")throw TypeError(".POGOProtos.Data.AssetCache.JournalReadEntry.hashed_key: object expected");m.hashed_key=$root.POGOProtos.Data.AssetCache.HashedKey.fromObject(d.hashed_key)}return m};JournalReadEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.hashed_key=null}if(m.hashed_key!=null&&m.hasOwnProperty("hashed_key")){d.hashed_key=$root.POGOProtos.Data.AssetCache.HashedKey.toObject(m.hashed_key,o)}return d};JournalReadEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return JournalReadEntry}();AssetCache.JournalRemoveEntry=function(){function JournalRemoveEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}JournalRemoveEntry.prototype.hashed_key=null;JournalRemoveEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.hashed_key!=null&&m.hasOwnProperty("hashed_key"))$root.POGOProtos.Data.AssetCache.HashedKey.encode(m.hashed_key,w.uint32(10).fork()).ldelim();return w};JournalRemoveEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.AssetCache.JournalRemoveEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.hashed_key=$root.POGOProtos.Data.AssetCache.HashedKey.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};JournalRemoveEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.AssetCache.JournalRemoveEntry)return d;var m=new $root.POGOProtos.Data.AssetCache.JournalRemoveEntry;if(d.hashed_key!=null){if(typeof d.hashed_key!=="object")throw TypeError(".POGOProtos.Data.AssetCache.JournalRemoveEntry.hashed_key: object expected");m.hashed_key=$root.POGOProtos.Data.AssetCache.HashedKey.fromObject(d.hashed_key)}return m};JournalRemoveEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.hashed_key=null}if(m.hashed_key!=null&&m.hasOwnProperty("hashed_key")){d.hashed_key=$root.POGOProtos.Data.AssetCache.HashedKey.toObject(m.hashed_key,o)}return d};JournalRemoveEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return JournalRemoveEntry}();AssetCache.JournalVersion=function(){function JournalVersion(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}JournalVersion.prototype.version=0;JournalVersion.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.version!=null&&m.hasOwnProperty("version"))w.uint32(8).int32(m.version);return w};JournalVersion.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.AssetCache.JournalVersion;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.version=r.int32();break;default:r.skipType(t&7);break}}return m};JournalVersion.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.AssetCache.JournalVersion)return d;var m=new $root.POGOProtos.Data.AssetCache.JournalVersion;if(d.version!=null){m.version=d.version|0}return m};JournalVersion.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.version=0}if(m.version!=null&&m.hasOwnProperty("version")){d.version=m.version}return d};JournalVersion.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return JournalVersion}();return AssetCache}();Data.AssetDigestEntry=function(){function AssetDigestEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AssetDigestEntry.prototype.asset_id="";AssetDigestEntry.prototype.bundle_name="";AssetDigestEntry.prototype.version=$util.Long?$util.Long.fromBits(0,0,false):0;AssetDigestEntry.prototype.checksum=0;AssetDigestEntry.prototype.size=0;AssetDigestEntry.prototype.key=$util.newBuffer([]);AssetDigestEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.asset_id!=null&&m.hasOwnProperty("asset_id"))w.uint32(10).string(m.asset_id);if(m.bundle_name!=null&&m.hasOwnProperty("bundle_name"))w.uint32(18).string(m.bundle_name);if(m.version!=null&&m.hasOwnProperty("version"))w.uint32(24).int64(m.version);if(m.checksum!=null&&m.hasOwnProperty("checksum"))w.uint32(37).fixed32(m.checksum);if(m.size!=null&&m.hasOwnProperty("size"))w.uint32(40).int32(m.size);if(m.key!=null&&m.hasOwnProperty("key"))w.uint32(50).bytes(m.key);return w};AssetDigestEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.AssetDigestEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.asset_id=r.string();break;case 2:m.bundle_name=r.string();break;case 3:m.version=r.int64();break;case 4:m.checksum=r.fixed32();break;case 5:m.size=r.int32();break;case 6:m.key=r.bytes();break;default:r.skipType(t&7);break}}return m};AssetDigestEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.AssetDigestEntry)return d;var m=new $root.POGOProtos.Data.AssetDigestEntry;if(d.asset_id!=null){m.asset_id=String(d.asset_id)}if(d.bundle_name!=null){m.bundle_name=String(d.bundle_name)}if(d.version!=null){if($util.Long)(m.version=$util.Long.fromValue(d.version)).unsigned=false;else if(typeof d.version==="string")m.version=parseInt(d.version,10);else if(typeof d.version==="number")m.version=d.version;else if(typeof d.version==="object")m.version=new $util.LongBits(d.version.low>>>0,d.version.high>>>0).toNumber()}if(d.checksum!=null){m.checksum=d.checksum>>>0}if(d.size!=null){m.size=d.size|0}if(d.key!=null){if(typeof d.key==="string")$util.base64.decode(d.key,m.key=$util.newBuffer($util.base64.length(d.key)),0);else if(d.key.length)m.key=d.key}return m};AssetDigestEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.asset_id="";d.bundle_name="";if($util.Long){var n=new $util.Long(0,0,false);d.version=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.version=o.longs===String?"0":0;d.checksum=0;d.size=0;if(o.bytes===String)d.key="";else{d.key=[];if(o.bytes!==Array)d.key=$util.newBuffer(d.key)}}if(m.asset_id!=null&&m.hasOwnProperty("asset_id")){d.asset_id=m.asset_id}if(m.bundle_name!=null&&m.hasOwnProperty("bundle_name")){d.bundle_name=m.bundle_name}if(m.version!=null&&m.hasOwnProperty("version")){if(typeof m.version==="number")d.version=o.longs===String?String(m.version):m.version;else d.version=o.longs===String?$util.Long.prototype.toString.call(m.version):o.longs===Number?new $util.LongBits(m.version.low>>>0,m.version.high>>>0).toNumber():m.version}if(m.checksum!=null&&m.hasOwnProperty("checksum")){d.checksum=m.checksum}if(m.size!=null&&m.hasOwnProperty("size")){d.size=m.size}if(m.key!=null&&m.hasOwnProperty("key")){d.key=o.bytes===String?$util.base64.encode(m.key,0,m.key.length):o.bytes===Array?Array.prototype.slice.call(m.key):m.key}return d};AssetDigestEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AssetDigestEntry}();Data.Avatar=function(){var Avatar={};Avatar.AvatarCustomization=function(){function AvatarCustomization(p){this.slot=[];this.promo_type=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AvatarCustomization.prototype.enabled=false;AvatarCustomization.prototype.avatar_type=0;AvatarCustomization.prototype.slot=$util.emptyArray;AvatarCustomization.prototype.bundle_name="";AvatarCustomization.prototype.asset_name="";AvatarCustomization.prototype.group_name="";AvatarCustomization.prototype.sort_order=0;AvatarCustomization.prototype.unlock_type=0;AvatarCustomization.prototype.promo_type=$util.emptyArray;AvatarCustomization.prototype.unlock_badge_type=0;AvatarCustomization.prototype.iap_sku="";AvatarCustomization.prototype.unlock_badge_level=0;AvatarCustomization.prototype.icon_name="";AvatarCustomization.prototype.unlock_player_level=0;AvatarCustomization.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.enabled!=null&&m.hasOwnProperty("enabled"))w.uint32(8).bool(m.enabled);if(m.avatar_type!=null&&m.hasOwnProperty("avatar_type"))w.uint32(16).int32(m.avatar_type);if(m.slot!=null&&m.slot.length){w.uint32(26).fork();for(var i=0;i<m.slot.length;++i)w.int32(m.slot[i]);w.ldelim()}if(m.bundle_name!=null&&m.hasOwnProperty("bundle_name"))w.uint32(34).string(m.bundle_name);if(m.asset_name!=null&&m.hasOwnProperty("asset_name"))w.uint32(42).string(m.asset_name);if(m.group_name!=null&&m.hasOwnProperty("group_name"))w.uint32(50).string(m.group_name);if(m.sort_order!=null&&m.hasOwnProperty("sort_order"))w.uint32(56).int32(m.sort_order);if(m.unlock_type!=null&&m.hasOwnProperty("unlock_type"))w.uint32(64).int32(m.unlock_type);if(m.promo_type!=null&&m.promo_type.length){w.uint32(74).fork();for(var i=0;i<m.promo_type.length;++i)w.int32(m.promo_type[i]);w.ldelim()}if(m.unlock_badge_type!=null&&m.hasOwnProperty("unlock_badge_type"))w.uint32(80).int32(m.unlock_badge_type);if(m.iap_sku!=null&&m.hasOwnProperty("iap_sku"))w.uint32(90).string(m.iap_sku);if(m.unlock_badge_level!=null&&m.hasOwnProperty("unlock_badge_level"))w.uint32(96).int32(m.unlock_badge_level);if(m.icon_name!=null&&m.hasOwnProperty("icon_name"))w.uint32(106).string(m.icon_name);if(m.unlock_player_level!=null&&m.hasOwnProperty("unlock_player_level"))w.uint32(112).int32(m.unlock_player_level);return w};AvatarCustomization.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Avatar.AvatarCustomization;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.enabled=r.bool();break;case 2:m.avatar_type=r.int32();break;case 3:if(!(m.slot&&m.slot.length))m.slot=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.slot.push(r.int32())}else m.slot.push(r.int32());break;case 4:m.bundle_name=r.string();break;case 5:m.asset_name=r.string();break;case 6:m.group_name=r.string();break;case 7:m.sort_order=r.int32();break;case 8:m.unlock_type=r.int32();break;case 9:if(!(m.promo_type&&m.promo_type.length))m.promo_type=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.promo_type.push(r.int32())}else m.promo_type.push(r.int32());break;case 10:m.unlock_badge_type=r.int32();break;case 11:m.iap_sku=r.string();break;case 12:m.unlock_badge_level=r.int32();break;case 13:m.icon_name=r.string();break;case 14:m.unlock_player_level=r.int32();break;default:r.skipType(t&7);break}}return m};AvatarCustomization.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Avatar.AvatarCustomization)return d;var m=new $root.POGOProtos.Data.Avatar.AvatarCustomization;if(d.enabled!=null){m.enabled=Boolean(d.enabled)}switch(d.avatar_type){case"PLAYER_AVATAR_MALE":case 0:m.avatar_type=0;break;case"PLAYER_AVATAR_FEMALE":case 1:m.avatar_type=1;break}if(d.slot){if(!Array.isArray(d.slot))throw TypeError(".POGOProtos.Data.Avatar.AvatarCustomization.slot: array expected");m.slot=[];for(var i=0;i<d.slot.length;++i){switch(d.slot[i]){default:case"UNSET_SLOT":case 0:m.slot[i]=0;break;case"HAIR":case 1:m.slot[i]=1;break;case"SHIRT":case 2:m.slot[i]=2;break;case"PANTS":case 3:m.slot[i]=3;break;case"HAT":case 4:m.slot[i]=4;break;case"SHOES":case 5:m.slot[i]=5;break;case"EYES":case 6:m.slot[i]=6;break;case"BACKPACK":case 7:m.slot[i]=7;break;case"GLOVES":case 8:m.slot[i]=8;break;case"SOCKS":case 9:m.slot[i]=9;break;case"BELT":case 10:m.slot[i]=10;break;case"GLASSES":case 11:m.slot[i]=11;break;case"NECKLACE":case 12:m.slot[i]=12;break;case"SKIN":case 13:m.slot[i]=13;break}}}if(d.bundle_name!=null){m.bundle_name=String(d.bundle_name)}if(d.asset_name!=null){m.asset_name=String(d.asset_name)}if(d.group_name!=null){m.group_name=String(d.group_name)}if(d.sort_order!=null){m.sort_order=d.sort_order|0}switch(d.unlock_type){case"UNSET_UNLOCK_TYPE":case 0:m.unlock_type=0;break;case"DEFAULT":case 1:m.unlock_type=1;break;case"MEDAL_REWARD":case 2:m.unlock_type=2;break;case"IAP_CLOTHING":case 3:m.unlock_type=3;break;case"LEVEL_REWARD":case 4:m.unlock_type=4;break}if(d.promo_type){if(!Array.isArray(d.promo_type))throw TypeError(".POGOProtos.Data.Avatar.AvatarCustomization.promo_type: array expected");m.promo_type=[];for(var i=0;i<d.promo_type.length;++i){switch(d.promo_type[i]){default:case"UNSET_PROMO_TYPE":case 0:m.promo_type[i]=0;break;case"SALE":case 1:m.promo_type[i]=1;break;case"FEATURED":case 2:m.promo_type[i]=2;break}}}switch(d.unlock_badge_type){case"BADGE_UNSET":case 0:m.unlock_badge_type=0;break;case"BADGE_TRAVEL_KM":case 1:m.unlock_badge_type=1;break;case"BADGE_POKEDEX_ENTRIES":case 2:m.unlock_badge_type=2;break;case"BADGE_CAPTURE_TOTAL":case 3:m.unlock_badge_type=3;break;case"BADGE_DEFEATED_FORT":case 4:m.unlock_badge_type=4;break;case"BADGE_EVOLVED_TOTAL":case 5:m.unlock_badge_type=5;break;case"BADGE_HATCHED_TOTAL":case 6:m.unlock_badge_type=6;break;case"BADGE_ENCOUNTERED_TOTAL":case 7:m.unlock_badge_type=7;break;case"BADGE_POKESTOPS_VISITED":case 8:m.unlock_badge_type=8;break;case"BADGE_UNIQUE_POKESTOPS":case 9:m.unlock_badge_type=9;break;case"BADGE_POKEBALL_THROWN":case 10:m.unlock_badge_type=10;break;case"BADGE_BIG_MAGIKARP":case 11:m.unlock_badge_type=11;break;case"BADGE_DEPLOYED_TOTAL":case 12:m.unlock_badge_type=12;break;case"BADGE_BATTLE_ATTACK_WON":case 13:m.unlock_badge_type=13;break;case"BADGE_BATTLE_TRAINING_WON":case 14:m.unlock_badge_type=14;break;case"BADGE_BATTLE_DEFEND_WON":case 15:m.unlock_badge_type=15;break;case"BADGE_PRESTIGE_RAISED":case 16:m.unlock_badge_type=16;break;case"BADGE_PRESTIGE_DROPPED":case 17:m.unlock_badge_type=17;break;case"BADGE_TYPE_NORMAL":case 18:m.unlock_badge_type=18;break;case"BADGE_TYPE_FIGHTING":case 19:m.unlock_badge_type=19;break;case"BADGE_TYPE_FLYING":case 20:m.unlock_badge_type=20;break;case"BADGE_TYPE_POISON":case 21:m.unlock_badge_type=21;break;case"BADGE_TYPE_GROUND":case 22:m.unlock_badge_type=22;break;case"BADGE_TYPE_ROCK":case 23:m.unlock_badge_type=23;break;case"BADGE_TYPE_BUG":case 24:m.unlock_badge_type=24;break;case"BADGE_TYPE_GHOST":case 25:m.unlock_badge_type=25;break;case"BADGE_TYPE_STEEL":case 26:m.unlock_badge_type=26;break;case"BADGE_TYPE_FIRE":case 27:m.unlock_badge_type=27;break;case"BADGE_TYPE_WATER":case 28:m.unlock_badge_type=28;break;case"BADGE_TYPE_GRASS":case 29:m.unlock_badge_type=29;break;case"BADGE_TYPE_ELECTRIC":case 30:m.unlock_badge_type=30;break;case"BADGE_TYPE_PSYCHIC":case 31:m.unlock_badge_type=31;break;case"BADGE_TYPE_ICE":case 32:m.unlock_badge_type=32;break;case"BADGE_TYPE_DRAGON":case 33:m.unlock_badge_type=33;break;case"BADGE_TYPE_DARK":case 34:m.unlock_badge_type=34;break;case"BADGE_TYPE_FAIRY":case 35:m.unlock_badge_type=35;break;case"BADGE_SMALL_RATTATA":case 36:m.unlock_badge_type=36;break;case"BADGE_PIKACHU":case 37:m.unlock_badge_type=37;break;case"BADGE_UNOWN":case 38:m.unlock_badge_type=38;break;case"BADGE_POKEDEX_ENTRIES_GEN2":case 39:m.unlock_badge_type=39;break;case"BADGE_RAID_BATTLE_WON":case 40:m.unlock_badge_type=40;break;case"BADGE_LEGENDARY_BATTLE_WON":case 41:m.unlock_badge_type=41;break;case"BADGE_BERRIES_FED":case 42:m.unlock_badge_type=42;break;case"BADGE_HOURS_DEFENDED":case 43:m.unlock_badge_type=43;break;case"BADGE_PLACE_HOLDER":case 44:m.unlock_badge_type=44;break;case"BADGE_POKEDEX_ENTRIES_GEN3":case 45:m.unlock_badge_type=45;break;case"BADGE_CHALLENGE_QUESTS":case 46:m.unlock_badge_type=46;break;case"BADGE_MEW_ENCOUNTER":case 47:m.unlock_badge_type=47;break;case"BADGE_MAX_LEVEL_FRIENDS":case 48:m.unlock_badge_type=48;break;case"BADGE_TRADING":case 49:m.unlock_badge_type=49;break;case"BADGE_TRADING_DISTANCE":case 50:m.unlock_badge_type=50;break;case"BADGE_POKEDEX_ENTRIES_GEN4":case 51:m.unlock_badge_type=51;break;case"BADGE_GREAT_LEAGUE":case 52:m.unlock_badge_type=52;break;case"BADGE_ULTRA_LEAGUE":case 53:m.unlock_badge_type=53;break;case"BADGE_MASTER_LEAGUE":case 54:m.unlock_badge_type=54;break;case"BADGE_EVENT_MIN":case 2e3:m.unlock_badge_type=2e3;break;case"BADGE_CHICAGO_FEST_JULY_2017":case 2001:m.unlock_badge_type=2001;break;case"BADGE_PIKACHU_OUTBREAK_YOKOHAMA_2017":case 2002:m.unlock_badge_type=2002;break;case"BADGE_SAFARI_ZONE_EUROPE_2017":case 2003:m.unlock_badge_type=2003;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_07":case 2004:m.unlock_badge_type=2004;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_14":case 2005:m.unlock_badge_type=2005;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_NORTH":case 2006:m.unlock_badge_type=2006;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_SOUTH":case 2007:m.unlock_badge_type=2007;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_NORTH":case 2008:m.unlock_badge_type=2008;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_SOUTH":case 2009:m.unlock_badge_type=2009;break;case"BADGE_APAC_PARTNER_JULY_2018_0":case 2010:m.unlock_badge_type=2010;break;case"BADGE_APAC_PARTNER_JULY_2018_1":case 2011:m.unlock_badge_type=2011;break;case"BADGE_APAC_PARTNER_JULY_2018_2":case 2012:m.unlock_badge_type=2012;break;case"BADGE_APAC_PARTNER_JULY_2018_3":case 2013:m.unlock_badge_type=2013;break;case"BADGE_APAC_PARTNER_JULY_2018_4":case 2014:m.unlock_badge_type=2014;break;case"BADGE_APAC_PARTNER_JULY_2018_5":case 2015:m.unlock_badge_type=2015;break;case"BADGE_APAC_PARTNER_JULY_2018_6":case 2016:m.unlock_badge_type=2016;break;case"BADGE_APAC_PARTNER_JULY_2018_7":case 2017:m.unlock_badge_type=2017;break;case"BADGE_APAC_PARTNER_JULY_2018_8":case 2018:m.unlock_badge_type=2018;break;case"BADGE_APAC_PARTNER_JULY_2018_9":case 2019:m.unlock_badge_type=2019;break;case"BADGE_YOKOSUKA_29_AUG_2018_MIKASA":case 2020:m.unlock_badge_type=2020;break;case"BADGE_YOKOSUKA_29_AUG_2018_VERNY":case 2021:m.unlock_badge_type=2021;break;case"BADGE_YOKOSUKA_29_AUG_2018_KURIHAMA":case 2022:m.unlock_badge_type=2022;break;case"BADGE_YOKOSUKA_30_AUG_2018_MIKASA":case 2023:m.unlock_badge_type=2023;break;case"BADGE_YOKOSUKA_30_AUG_2018_VERNY":case 2024:m.unlock_badge_type=2024;break;case"BADGE_YOKOSUKA_30_AUG_2018_KURIHAMA":case 2025:m.unlock_badge_type=2025;break;case"BADGE_YOKOSUKA_31_AUG_2018_MIKASA":case 2026:m.unlock_badge_type=2026;break;case"BADGE_YOKOSUKA_31_AUG_2018_VERNY":case 2027:m.unlock_badge_type=2027;break;case"BADGE_YOKOSUKA_31_AUG_2018_KURIHAMA":case 2028:m.unlock_badge_type=2028;break;case"BADGE_YOKOSUKA_1_SEP_2018_MIKASA":case 2029:m.unlock_badge_type=2029;break;case"BADGE_YOKOSUKA_1_SEP_2018_VERNY":case 2030:m.unlock_badge_type=2030;break;case"BADGE_YOKOSUKA_1_SEP_2018_KURIHAMA":case 2031:m.unlock_badge_type=2031;break;case"BADGE_YOKOSUKA_2_SEP_2018_MIKASA":case 2032:m.unlock_badge_type=2032;break;case"BADGE_YOKOSUKA_2_SEP_2018_VERNY":case 2033:m.unlock_badge_type=2033;break;case"BADGE_YOKOSUKA_2_SEP_2018_KURIHAMA":case 2034:m.unlock_badge_type=2034;break;case"BADGE_TOP_BANANA_1":case 2035:m.unlock_badge_type=2035;break;case"BADGE_TOP_BANANA_2":case 2036:m.unlock_badge_type=2036;break;case"BADGE_TOP_BANANA_3":case 2037:m.unlock_badge_type=2037;break}if(d.iap_sku!=null){m.iap_sku=String(d.iap_sku)}if(d.unlock_badge_level!=null){m.unlock_badge_level=d.unlock_badge_level|0}if(d.icon_name!=null){m.icon_name=String(d.icon_name)}if(d.unlock_player_level!=null){m.unlock_player_level=d.unlock_player_level|0}return m};AvatarCustomization.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.slot=[];d.promo_type=[]}if(o.defaults){d.enabled=false;d.avatar_type=o.enums===String?"PLAYER_AVATAR_MALE":0;d.bundle_name="";d.asset_name="";d.group_name="";d.sort_order=0;d.unlock_type=o.enums===String?"UNSET_UNLOCK_TYPE":0;d.unlock_badge_type=o.enums===String?"BADGE_UNSET":0;d.iap_sku="";d.unlock_badge_level=0;d.icon_name="";d.unlock_player_level=0}if(m.enabled!=null&&m.hasOwnProperty("enabled")){d.enabled=m.enabled}if(m.avatar_type!=null&&m.hasOwnProperty("avatar_type")){d.avatar_type=o.enums===String?$root.POGOProtos.Data.Player.PlayerAvatarType[m.avatar_type]:m.avatar_type}if(m.slot&&m.slot.length){d.slot=[];for(var j=0;j<m.slot.length;++j){d.slot[j]=o.enums===String?$root.POGOProtos.Data.Avatar.AvatarCustomization.Slot[m.slot[j]]:m.slot[j]}}if(m.bundle_name!=null&&m.hasOwnProperty("bundle_name")){d.bundle_name=m.bundle_name}if(m.asset_name!=null&&m.hasOwnProperty("asset_name")){d.asset_name=m.asset_name}if(m.group_name!=null&&m.hasOwnProperty("group_name")){d.group_name=m.group_name}if(m.sort_order!=null&&m.hasOwnProperty("sort_order")){d.sort_order=m.sort_order}if(m.unlock_type!=null&&m.hasOwnProperty("unlock_type")){d.unlock_type=o.enums===String?$root.POGOProtos.Data.Avatar.AvatarCustomization.AvatarCustomizationUnlockType[m.unlock_type]:m.unlock_type}if(m.promo_type&&m.promo_type.length){d.promo_type=[];for(var j=0;j<m.promo_type.length;++j){d.promo_type[j]=o.enums===String?$root.POGOProtos.Data.Avatar.AvatarCustomization.AvatarCustomizationPromoType[m.promo_type[j]]:m.promo_type[j]}}if(m.unlock_badge_type!=null&&m.hasOwnProperty("unlock_badge_type")){d.unlock_badge_type=o.enums===String?$root.POGOProtos.Enums.BadgeType[m.unlock_badge_type]:m.unlock_badge_type}if(m.iap_sku!=null&&m.hasOwnProperty("iap_sku")){d.iap_sku=m.iap_sku}if(m.unlock_badge_level!=null&&m.hasOwnProperty("unlock_badge_level")){d.unlock_badge_level=m.unlock_badge_level}if(m.icon_name!=null&&m.hasOwnProperty("icon_name")){d.icon_name=m.icon_name}if(m.unlock_player_level!=null&&m.hasOwnProperty("unlock_player_level")){d.unlock_player_level=m.unlock_player_level}return d};AvatarCustomization.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AvatarCustomization.AvatarCustomizationPromoType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_PROMO_TYPE"]=0;values[valuesById[1]="SALE"]=1;values[valuesById[2]="FEATURED"]=2;return values}();AvatarCustomization.AvatarCustomizationUnlockType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_UNLOCK_TYPE"]=0;values[valuesById[1]="DEFAULT"]=1;values[valuesById[2]="MEDAL_REWARD"]=2;values[valuesById[3]="IAP_CLOTHING"]=3;values[valuesById[4]="LEVEL_REWARD"]=4;return values}();AvatarCustomization.Slot=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_SLOT"]=0;values[valuesById[1]="HAIR"]=1;values[valuesById[2]="SHIRT"]=2;values[valuesById[3]="PANTS"]=3;values[valuesById[4]="HAT"]=4;values[valuesById[5]="SHOES"]=5;values[valuesById[6]="EYES"]=6;values[valuesById[7]="BACKPACK"]=7;values[valuesById[8]="GLOVES"]=8;values[valuesById[9]="SOCKS"]=9;values[valuesById[10]="BELT"]=10;values[valuesById[11]="GLASSES"]=11;values[valuesById[12]="NECKLACE"]=12;values[valuesById[13]="SKIN"]=13;return values}();return AvatarCustomization}();Avatar.AvatarItem=function(){function AvatarItem(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AvatarItem.prototype.avatar_template_id="";AvatarItem.prototype.new_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;AvatarItem.prototype.viewed=false;AvatarItem.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.avatar_template_id!=null&&m.hasOwnProperty("avatar_template_id"))w.uint32(10).string(m.avatar_template_id);if(m.new_timestamp_ms!=null&&m.hasOwnProperty("new_timestamp_ms"))w.uint32(16).int64(m.new_timestamp_ms);if(m.viewed!=null&&m.hasOwnProperty("viewed"))w.uint32(24).bool(m.viewed);return w};AvatarItem.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Avatar.AvatarItem;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.avatar_template_id=r.string();break;case 2:m.new_timestamp_ms=r.int64();break;case 3:m.viewed=r.bool();break;default:r.skipType(t&7);break}}return m};AvatarItem.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Avatar.AvatarItem)return d;var m=new $root.POGOProtos.Data.Avatar.AvatarItem;if(d.avatar_template_id!=null){m.avatar_template_id=String(d.avatar_template_id)}if(d.new_timestamp_ms!=null){if($util.Long)(m.new_timestamp_ms=$util.Long.fromValue(d.new_timestamp_ms)).unsigned=false;else if(typeof d.new_timestamp_ms==="string")m.new_timestamp_ms=parseInt(d.new_timestamp_ms,10);else if(typeof d.new_timestamp_ms==="number")m.new_timestamp_ms=d.new_timestamp_ms;else if(typeof d.new_timestamp_ms==="object")m.new_timestamp_ms=new $util.LongBits(d.new_timestamp_ms.low>>>0,d.new_timestamp_ms.high>>>0).toNumber()}if(d.viewed!=null){m.viewed=Boolean(d.viewed)}return m};AvatarItem.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.avatar_template_id="";if($util.Long){var n=new $util.Long(0,0,false);d.new_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.new_timestamp_ms=o.longs===String?"0":0;d.viewed=false}if(m.avatar_template_id!=null&&m.hasOwnProperty("avatar_template_id")){d.avatar_template_id=m.avatar_template_id}if(m.new_timestamp_ms!=null&&m.hasOwnProperty("new_timestamp_ms")){if(typeof m.new_timestamp_ms==="number")d.new_timestamp_ms=o.longs===String?String(m.new_timestamp_ms):m.new_timestamp_ms;else d.new_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.new_timestamp_ms):o.longs===Number?new $util.LongBits(m.new_timestamp_ms.low>>>0,m.new_timestamp_ms.high>>>0).toNumber():m.new_timestamp_ms}if(m.viewed!=null&&m.hasOwnProperty("viewed")){d.viewed=m.viewed}return d};AvatarItem.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AvatarItem}();return Avatar}();Data.BackgroundToken=function(){function BackgroundToken(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BackgroundToken.prototype.token=$util.newBuffer([]);BackgroundToken.prototype.expiration_time=$util.Long?$util.Long.fromBits(0,0,false):0;BackgroundToken.prototype.iv=$util.newBuffer([]);BackgroundToken.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.token!=null&&m.hasOwnProperty("token"))w.uint32(10).bytes(m.token);if(m.expiration_time!=null&&m.hasOwnProperty("expiration_time"))w.uint32(16).int64(m.expiration_time);if(m.iv!=null&&m.hasOwnProperty("iv"))w.uint32(26).bytes(m.iv);return w};BackgroundToken.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.BackgroundToken;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.token=r.bytes();break;case 2:m.expiration_time=r.int64();break;case 3:m.iv=r.bytes();break;default:r.skipType(t&7);break}}return m};BackgroundToken.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.BackgroundToken)return d;var m=new $root.POGOProtos.Data.BackgroundToken;if(d.token!=null){if(typeof d.token==="string")$util.base64.decode(d.token,m.token=$util.newBuffer($util.base64.length(d.token)),0);else if(d.token.length)m.token=d.token}if(d.expiration_time!=null){if($util.Long)(m.expiration_time=$util.Long.fromValue(d.expiration_time)).unsigned=false;else if(typeof d.expiration_time==="string")m.expiration_time=parseInt(d.expiration_time,10);else if(typeof d.expiration_time==="number")m.expiration_time=d.expiration_time;else if(typeof d.expiration_time==="object")m.expiration_time=new $util.LongBits(d.expiration_time.low>>>0,d.expiration_time.high>>>0).toNumber()}if(d.iv!=null){if(typeof d.iv==="string")$util.base64.decode(d.iv,m.iv=$util.newBuffer($util.base64.length(d.iv)),0);else if(d.iv.length)m.iv=d.iv}return m};BackgroundToken.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if(o.bytes===String)d.token="";else{d.token=[];if(o.bytes!==Array)d.token=$util.newBuffer(d.token)}if($util.Long){var n=new $util.Long(0,0,false);d.expiration_time=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.expiration_time=o.longs===String?"0":0;if(o.bytes===String)d.iv="";else{d.iv=[];if(o.bytes!==Array)d.iv=$util.newBuffer(d.iv)}}if(m.token!=null&&m.hasOwnProperty("token")){d.token=o.bytes===String?$util.base64.encode(m.token,0,m.token.length):o.bytes===Array?Array.prototype.slice.call(m.token):m.token}if(m.expiration_time!=null&&m.hasOwnProperty("expiration_time")){if(typeof m.expiration_time==="number")d.expiration_time=o.longs===String?String(m.expiration_time):m.expiration_time;else d.expiration_time=o.longs===String?$util.Long.prototype.toString.call(m.expiration_time):o.longs===Number?new $util.LongBits(m.expiration_time.low>>>0,m.expiration_time.high>>>0).toNumber():m.expiration_time}if(m.iv!=null&&m.hasOwnProperty("iv")){d.iv=o.bytes===String?$util.base64.encode(m.iv,0,m.iv.length):o.bytes===Array?Array.prototype.slice.call(m.iv):m.iv}return d};BackgroundToken.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BackgroundToken}();Data.Badge=function(){var Badge={};Badge.AwardedGymBadge=function(){function AwardedGymBadge(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AwardedGymBadge.prototype.fort_id="";AwardedGymBadge.prototype.gym_badge_type=0;AwardedGymBadge.prototype.score=0;AwardedGymBadge.prototype.gym_badge_stats=null;AwardedGymBadge.prototype.last_update_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,true):0;AwardedGymBadge.prototype.last_check_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,true):0;AwardedGymBadge.prototype.earned_points=0;AwardedGymBadge.prototype.progress=0;AwardedGymBadge.prototype.level_up=false;AwardedGymBadge.prototype.name="";AwardedGymBadge.prototype.image_url="";AwardedGymBadge.prototype.description="";AwardedGymBadge.prototype.latitude=0;AwardedGymBadge.prototype.longitude=0;AwardedGymBadge.prototype.raids=null;AwardedGymBadge.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(10).string(m.fort_id);if(m.gym_badge_type!=null&&m.hasOwnProperty("gym_badge_type"))w.uint32(16).int32(m.gym_badge_type);if(m.score!=null&&m.hasOwnProperty("score"))w.uint32(24).uint32(m.score);if(m.gym_badge_stats!=null&&m.hasOwnProperty("gym_badge_stats"))$root.POGOProtos.Data.Badge.GymBadgeStats.encode(m.gym_badge_stats,w.uint32(34).fork()).ldelim();if(m.last_update_timestamp_ms!=null&&m.hasOwnProperty("last_update_timestamp_ms"))w.uint32(40).uint64(m.last_update_timestamp_ms);if(m.name!=null&&m.hasOwnProperty("name"))w.uint32(50).string(m.name);if(m.image_url!=null&&m.hasOwnProperty("image_url"))w.uint32(58).string(m.image_url);if(m.description!=null&&m.hasOwnProperty("description"))w.uint32(66).string(m.description);if(m.latitude!=null&&m.hasOwnProperty("latitude"))w.uint32(73).double(m.latitude);if(m.longitude!=null&&m.hasOwnProperty("longitude"))w.uint32(81).double(m.longitude);if(m.last_check_timestamp_ms!=null&&m.hasOwnProperty("last_check_timestamp_ms"))w.uint32(88).uint64(m.last_check_timestamp_ms);if(m.earned_points!=null&&m.hasOwnProperty("earned_points"))w.uint32(96).uint32(m.earned_points);if(m.progress!=null&&m.hasOwnProperty("progress"))w.uint32(109).float(m.progress);if(m.level_up!=null&&m.hasOwnProperty("level_up"))w.uint32(112).bool(m.level_up);if(m.raids!=null&&m.hasOwnProperty("raids"))$root.POGOProtos.Data.Raid.PlayerRaidInfo.encode(m.raids,w.uint32(122).fork()).ldelim();return w};AwardedGymBadge.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Badge.AwardedGymBadge;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fort_id=r.string();break;case 2:m.gym_badge_type=r.int32();break;case 3:m.score=r.uint32();break;case 4:m.gym_badge_stats=$root.POGOProtos.Data.Badge.GymBadgeStats.decode(r,r.uint32());break;case 5:m.last_update_timestamp_ms=r.uint64();break;case 11:m.last_check_timestamp_ms=r.uint64();break;case 12:m.earned_points=r.uint32();break;case 13:m.progress=r.float();break;case 14:m.level_up=r.bool();break;case 6:m.name=r.string();break;case 7:m.image_url=r.string();break;case 8:m.description=r.string();break;case 9:m.latitude=r.double();break;case 10:m.longitude=r.double();break;case 15:m.raids=$root.POGOProtos.Data.Raid.PlayerRaidInfo.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};AwardedGymBadge.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Badge.AwardedGymBadge)return d;var m=new $root.POGOProtos.Data.Badge.AwardedGymBadge;if(d.fort_id!=null){m.fort_id=String(d.fort_id)}switch(d.gym_badge_type){case"GYM_BADGE_UNSET":case 0:m.gym_badge_type=0;break;case"GYM_BADGE_VANILLA":case 1:m.gym_badge_type=1;break;case"GYM_BADGE_BRONZE":case 2:m.gym_badge_type=2;break;case"GYM_BADGE_SILVER":case 3:m.gym_badge_type=3;break;case"GYM_BADGE_GOLD":case 4:m.gym_badge_type=4;break}if(d.score!=null){m.score=d.score>>>0}if(d.gym_badge_stats!=null){if(typeof d.gym_badge_stats!=="object")throw TypeError(".POGOProtos.Data.Badge.AwardedGymBadge.gym_badge_stats: object expected");m.gym_badge_stats=$root.POGOProtos.Data.Badge.GymBadgeStats.fromObject(d.gym_badge_stats)}if(d.last_update_timestamp_ms!=null){if($util.Long)(m.last_update_timestamp_ms=$util.Long.fromValue(d.last_update_timestamp_ms)).unsigned=true;else if(typeof d.last_update_timestamp_ms==="string")m.last_update_timestamp_ms=parseInt(d.last_update_timestamp_ms,10);else if(typeof d.last_update_timestamp_ms==="number")m.last_update_timestamp_ms=d.last_update_timestamp_ms;else if(typeof d.last_update_timestamp_ms==="object")m.last_update_timestamp_ms=new $util.LongBits(d.last_update_timestamp_ms.low>>>0,d.last_update_timestamp_ms.high>>>0).toNumber(true)}if(d.last_check_timestamp_ms!=null){if($util.Long)(m.last_check_timestamp_ms=$util.Long.fromValue(d.last_check_timestamp_ms)).unsigned=true;else if(typeof d.last_check_timestamp_ms==="string")m.last_check_timestamp_ms=parseInt(d.last_check_timestamp_ms,10);else if(typeof d.last_check_timestamp_ms==="number")m.last_check_timestamp_ms=d.last_check_timestamp_ms;else if(typeof d.last_check_timestamp_ms==="object")m.last_check_timestamp_ms=new $util.LongBits(d.last_check_timestamp_ms.low>>>0,d.last_check_timestamp_ms.high>>>0).toNumber(true)}if(d.earned_points!=null){m.earned_points=d.earned_points>>>0}if(d.progress!=null){m.progress=Number(d.progress)}if(d.level_up!=null){m.level_up=Boolean(d.level_up)}if(d.name!=null){m.name=String(d.name)}if(d.image_url!=null){m.image_url=String(d.image_url)}if(d.description!=null){m.description=String(d.description)}if(d.latitude!=null){m.latitude=Number(d.latitude)}if(d.longitude!=null){m.longitude=Number(d.longitude)}if(d.raids!=null){if(typeof d.raids!=="object")throw TypeError(".POGOProtos.Data.Badge.AwardedGymBadge.raids: object expected");m.raids=$root.POGOProtos.Data.Raid.PlayerRaidInfo.fromObject(d.raids)}return m};AwardedGymBadge.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.fort_id="";d.gym_badge_type=o.enums===String?"GYM_BADGE_UNSET":0;d.score=0;d.gym_badge_stats=null;if($util.Long){var n=new $util.Long(0,0,true);d.last_update_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.last_update_timestamp_ms=o.longs===String?"0":0;d.name="";d.image_url="";d.description="";d.latitude=0;d.longitude=0;if($util.Long){var n=new $util.Long(0,0,true);d.last_check_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.last_check_timestamp_ms=o.longs===String?"0":0;d.earned_points=0;d.progress=0;d.level_up=false;d.raids=null}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.gym_badge_type!=null&&m.hasOwnProperty("gym_badge_type")){d.gym_badge_type=o.enums===String?$root.POGOProtos.Enums.GymBadgeType[m.gym_badge_type]:m.gym_badge_type}if(m.score!=null&&m.hasOwnProperty("score")){d.score=m.score}if(m.gym_badge_stats!=null&&m.hasOwnProperty("gym_badge_stats")){d.gym_badge_stats=$root.POGOProtos.Data.Badge.GymBadgeStats.toObject(m.gym_badge_stats,o)}if(m.last_update_timestamp_ms!=null&&m.hasOwnProperty("last_update_timestamp_ms")){if(typeof m.last_update_timestamp_ms==="number")d.last_update_timestamp_ms=o.longs===String?String(m.last_update_timestamp_ms):m.last_update_timestamp_ms;else d.last_update_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.last_update_timestamp_ms):o.longs===Number?new $util.LongBits(m.last_update_timestamp_ms.low>>>0,m.last_update_timestamp_ms.high>>>0).toNumber(true):m.last_update_timestamp_ms}if(m.name!=null&&m.hasOwnProperty("name")){d.name=m.name}if(m.image_url!=null&&m.hasOwnProperty("image_url")){d.image_url=m.image_url}if(m.description!=null&&m.hasOwnProperty("description")){d.description=m.description}if(m.latitude!=null&&m.hasOwnProperty("latitude")){d.latitude=o.json&&!isFinite(m.latitude)?String(m.latitude):m.latitude}if(m.longitude!=null&&m.hasOwnProperty("longitude")){d.longitude=o.json&&!isFinite(m.longitude)?String(m.longitude):m.longitude}if(m.last_check_timestamp_ms!=null&&m.hasOwnProperty("last_check_timestamp_ms")){if(typeof m.last_check_timestamp_ms==="number")d.last_check_timestamp_ms=o.longs===String?String(m.last_check_timestamp_ms):m.last_check_timestamp_ms;else d.last_check_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.last_check_timestamp_ms):o.longs===Number?new $util.LongBits(m.last_check_timestamp_ms.low>>>0,m.last_check_timestamp_ms.high>>>0).toNumber(true):m.last_check_timestamp_ms}if(m.earned_points!=null&&m.hasOwnProperty("earned_points")){d.earned_points=m.earned_points}if(m.progress!=null&&m.hasOwnProperty("progress")){d.progress=o.json&&!isFinite(m.progress)?String(m.progress):m.progress}if(m.level_up!=null&&m.hasOwnProperty("level_up")){d.level_up=m.level_up}if(m.raids!=null&&m.hasOwnProperty("raids")){d.raids=$root.POGOProtos.Data.Raid.PlayerRaidInfo.toObject(m.raids,o)}return d};AwardedGymBadge.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AwardedGymBadge}();Badge.BadgeCaptureReward=function(){function BadgeCaptureReward(p){this.avatar_template_ids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BadgeCaptureReward.prototype.capture_reward_multiplier=0;BadgeCaptureReward.prototype.avatar_template_ids=$util.emptyArray;BadgeCaptureReward.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.capture_reward_multiplier!=null&&m.hasOwnProperty("capture_reward_multiplier"))w.uint32(13).float(m.capture_reward_multiplier);if(m.avatar_template_ids!=null&&m.avatar_template_ids.length){for(var i=0;i<m.avatar_template_ids.length;++i)w.uint32(18).string(m.avatar_template_ids[i])}return w};BadgeCaptureReward.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Badge.BadgeCaptureReward;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.capture_reward_multiplier=r.float();break;case 2:if(!(m.avatar_template_ids&&m.avatar_template_ids.length))m.avatar_template_ids=[];m.avatar_template_ids.push(r.string());break;default:r.skipType(t&7);break}}return m};BadgeCaptureReward.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Badge.BadgeCaptureReward)return d;var m=new $root.POGOProtos.Data.Badge.BadgeCaptureReward;if(d.capture_reward_multiplier!=null){m.capture_reward_multiplier=Number(d.capture_reward_multiplier)}if(d.avatar_template_ids){if(!Array.isArray(d.avatar_template_ids))throw TypeError(".POGOProtos.Data.Badge.BadgeCaptureReward.avatar_template_ids: array expected");m.avatar_template_ids=[];for(var i=0;i<d.avatar_template_ids.length;++i){m.avatar_template_ids[i]=String(d.avatar_template_ids[i])}}return m};BadgeCaptureReward.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.avatar_template_ids=[]}if(o.defaults){d.capture_reward_multiplier=0}if(m.capture_reward_multiplier!=null&&m.hasOwnProperty("capture_reward_multiplier")){d.capture_reward_multiplier=o.json&&!isFinite(m.capture_reward_multiplier)?String(m.capture_reward_multiplier):m.capture_reward_multiplier}if(m.avatar_template_ids&&m.avatar_template_ids.length){d.avatar_template_ids=[];for(var j=0;j<m.avatar_template_ids.length;++j){d.avatar_template_ids[j]=m.avatar_template_ids[j]}}return d};BadgeCaptureReward.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BadgeCaptureReward}();Badge.GymBadgeStats=function(){function GymBadgeStats(p){this.gym_battles=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymBadgeStats.prototype.total_time_defended_ms=$util.Long?$util.Long.fromBits(0,0,true):0;GymBadgeStats.prototype.num_battles_won=0;GymBadgeStats.prototype.num_battles_lost=0;GymBadgeStats.prototype.num_berries_fed=0;GymBadgeStats.prototype.num_deploys=0;GymBadgeStats.prototype.gym_battles=$util.emptyArray;GymBadgeStats.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.total_time_defended_ms!=null&&m.hasOwnProperty("total_time_defended_ms"))w.uint32(8).uint64(m.total_time_defended_ms);if(m.num_battles_won!=null&&m.hasOwnProperty("num_battles_won"))w.uint32(16).uint32(m.num_battles_won);if(m.num_berries_fed!=null&&m.hasOwnProperty("num_berries_fed"))w.uint32(24).uint32(m.num_berries_fed);if(m.num_deploys!=null&&m.hasOwnProperty("num_deploys"))w.uint32(32).uint32(m.num_deploys);if(m.num_battles_lost!=null&&m.hasOwnProperty("num_battles_lost"))w.uint32(40).uint32(m.num_battles_lost);if(m.gym_battles!=null&&m.gym_battles.length){for(var i=0;i<m.gym_battles.length;++i)$root.POGOProtos.Data.Gym.GymBattle.encode(m.gym_battles[i],w.uint32(122).fork()).ldelim()}return w};GymBadgeStats.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Badge.GymBadgeStats;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.total_time_defended_ms=r.uint64();break;case 2:m.num_battles_won=r.uint32();break;case 5:m.num_battles_lost=r.uint32();break;case 3:m.num_berries_fed=r.uint32();break;case 4:m.num_deploys=r.uint32();break;case 15:if(!(m.gym_battles&&m.gym_battles.length))m.gym_battles=[];m.gym_battles.push($root.POGOProtos.Data.Gym.GymBattle.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};GymBadgeStats.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Badge.GymBadgeStats)return d;var m=new $root.POGOProtos.Data.Badge.GymBadgeStats;if(d.total_time_defended_ms!=null){if($util.Long)(m.total_time_defended_ms=$util.Long.fromValue(d.total_time_defended_ms)).unsigned=true;else if(typeof d.total_time_defended_ms==="string")m.total_time_defended_ms=parseInt(d.total_time_defended_ms,10);else if(typeof d.total_time_defended_ms==="number")m.total_time_defended_ms=d.total_time_defended_ms;else if(typeof d.total_time_defended_ms==="object")m.total_time_defended_ms=new $util.LongBits(d.total_time_defended_ms.low>>>0,d.total_time_defended_ms.high>>>0).toNumber(true)}if(d.num_battles_won!=null){m.num_battles_won=d.num_battles_won>>>0}if(d.num_battles_lost!=null){m.num_battles_lost=d.num_battles_lost>>>0}if(d.num_berries_fed!=null){m.num_berries_fed=d.num_berries_fed>>>0}if(d.num_deploys!=null){m.num_deploys=d.num_deploys>>>0}if(d.gym_battles){if(!Array.isArray(d.gym_battles))throw TypeError(".POGOProtos.Data.Badge.GymBadgeStats.gym_battles: array expected");m.gym_battles=[];for(var i=0;i<d.gym_battles.length;++i){if(typeof d.gym_battles[i]!=="object")throw TypeError(".POGOProtos.Data.Badge.GymBadgeStats.gym_battles: object expected");m.gym_battles[i]=$root.POGOProtos.Data.Gym.GymBattle.fromObject(d.gym_battles[i])}}return m};GymBadgeStats.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.gym_battles=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,true);d.total_time_defended_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.total_time_defended_ms=o.longs===String?"0":0;d.num_battles_won=0;d.num_berries_fed=0;d.num_deploys=0;d.num_battles_lost=0}if(m.total_time_defended_ms!=null&&m.hasOwnProperty("total_time_defended_ms")){if(typeof m.total_time_defended_ms==="number")d.total_time_defended_ms=o.longs===String?String(m.total_time_defended_ms):m.total_time_defended_ms;else d.total_time_defended_ms=o.longs===String?$util.Long.prototype.toString.call(m.total_time_defended_ms):o.longs===Number?new $util.LongBits(m.total_time_defended_ms.low>>>0,m.total_time_defended_ms.high>>>0).toNumber(true):m.total_time_defended_ms}if(m.num_battles_won!=null&&m.hasOwnProperty("num_battles_won")){d.num_battles_won=m.num_battles_won}if(m.num_berries_fed!=null&&m.hasOwnProperty("num_berries_fed")){d.num_berries_fed=m.num_berries_fed}if(m.num_deploys!=null&&m.hasOwnProperty("num_deploys")){d.num_deploys=m.num_deploys}if(m.num_battles_lost!=null&&m.hasOwnProperty("num_battles_lost")){d.num_battles_lost=m.num_battles_lost}if(m.gym_battles&&m.gym_battles.length){d.gym_battles=[];for(var j=0;j<m.gym_battles.length;++j){d.gym_battles[j]=$root.POGOProtos.Data.Gym.GymBattle.toObject(m.gym_battles[j],o)}}return d};GymBadgeStats.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GymBadgeStats}();return Badge}();Data.Battle=function(){var Battle={};Battle.Battle=function(){function Battle(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Battle.prototype.battle_start_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Battle.prototype.battle_end_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Battle.prototype.battle_id="";Battle.prototype.defender=null;Battle.prototype.battle_log=null;Battle.prototype.attacker=null;Battle.prototype.weather_condition=0;Battle.prototype.highest_friendship_milestone=0;Battle.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.battle_start_ms!=null&&m.hasOwnProperty("battle_start_ms"))w.uint32(8).int64(m.battle_start_ms);if(m.battle_end_ms!=null&&m.hasOwnProperty("battle_end_ms"))w.uint32(16).int64(m.battle_end_ms);if(m.battle_id!=null&&m.hasOwnProperty("battle_id"))w.uint32(26).string(m.battle_id);if(m.defender!=null&&m.hasOwnProperty("defender"))$root.POGOProtos.Data.Battle.BattleParticipant.encode(m.defender,w.uint32(34).fork()).ldelim();if(m.battle_log!=null&&m.hasOwnProperty("battle_log"))$root.POGOProtos.Data.Battle.BattleLog.encode(m.battle_log,w.uint32(42).fork()).ldelim();if(m.attacker!=null&&m.hasOwnProperty("attacker"))$root.POGOProtos.Data.Battle.BattleParticipant.encode(m.attacker,w.uint32(50).fork()).ldelim();if(m.weather_condition!=null&&m.hasOwnProperty("weather_condition"))w.uint32(56).int32(m.weather_condition);if(m.highest_friendship_milestone!=null&&m.hasOwnProperty("highest_friendship_milestone"))w.uint32(64).int32(m.highest_friendship_milestone);return w};Battle.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Battle.Battle;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.battle_start_ms=r.int64();break;case 2:m.battle_end_ms=r.int64();break;case 3:m.battle_id=r.string();break;case 4:m.defender=$root.POGOProtos.Data.Battle.BattleParticipant.decode(r,r.uint32());break;case 5:m.battle_log=$root.POGOProtos.Data.Battle.BattleLog.decode(r,r.uint32());break;case 6:m.attacker=$root.POGOProtos.Data.Battle.BattleParticipant.decode(r,r.uint32());break;case 7:m.weather_condition=r.int32();break;case 8:m.highest_friendship_milestone=r.int32();break;default:r.skipType(t&7);break}}return m};Battle.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Battle.Battle)return d;var m=new $root.POGOProtos.Data.Battle.Battle;if(d.battle_start_ms!=null){if($util.Long)(m.battle_start_ms=$util.Long.fromValue(d.battle_start_ms)).unsigned=false;else if(typeof d.battle_start_ms==="string")m.battle_start_ms=parseInt(d.battle_start_ms,10);else if(typeof d.battle_start_ms==="number")m.battle_start_ms=d.battle_start_ms;else if(typeof d.battle_start_ms==="object")m.battle_start_ms=new $util.LongBits(d.battle_start_ms.low>>>0,d.battle_start_ms.high>>>0).toNumber()}if(d.battle_end_ms!=null){if($util.Long)(m.battle_end_ms=$util.Long.fromValue(d.battle_end_ms)).unsigned=false;else if(typeof d.battle_end_ms==="string")m.battle_end_ms=parseInt(d.battle_end_ms,10);else if(typeof d.battle_end_ms==="number")m.battle_end_ms=d.battle_end_ms;else if(typeof d.battle_end_ms==="object")m.battle_end_ms=new $util.LongBits(d.battle_end_ms.low>>>0,d.battle_end_ms.high>>>0).toNumber()}if(d.battle_id!=null){m.battle_id=String(d.battle_id)}if(d.defender!=null){if(typeof d.defender!=="object")throw TypeError(".POGOProtos.Data.Battle.Battle.defender: object expected");m.defender=$root.POGOProtos.Data.Battle.BattleParticipant.fromObject(d.defender)}if(d.battle_log!=null){if(typeof d.battle_log!=="object")throw TypeError(".POGOProtos.Data.Battle.Battle.battle_log: object expected");m.battle_log=$root.POGOProtos.Data.Battle.BattleLog.fromObject(d.battle_log)}if(d.attacker!=null){if(typeof d.attacker!=="object")throw TypeError(".POGOProtos.Data.Battle.Battle.attacker: object expected");m.attacker=$root.POGOProtos.Data.Battle.BattleParticipant.fromObject(d.attacker)}switch(d.weather_condition){case"NONE":case 0:m.weather_condition=0;break;case"CLEAR":case 1:m.weather_condition=1;break;case"RAINY":case 2:m.weather_condition=2;break;case"PARTLY_CLOUDY":case 3:m.weather_condition=3;break;case"OVERCAST":case 4:m.weather_condition=4;break;case"WINDY":case 5:m.weather_condition=5;break;case"SNOW":case 6:m.weather_condition=6;break;case"FOG":case 7:m.weather_condition=7;break}switch(d.highest_friendship_milestone){case"FRIENDSHIP_LEVEL_UNSET":case 0:m.highest_friendship_milestone=0;break;case"FRIENDSHIP_LEVEL_0":case 1:m.highest_friendship_milestone=1;break;case"FRIENDSHIP_LEVEL_1":case 2:m.highest_friendship_milestone=2;break;case"FRIENDSHIP_LEVEL_2":case 3:m.highest_friendship_milestone=3;break;case"FRIENDSHIP_LEVEL_3":case 4:m.highest_friendship_milestone=4;break;case"FRIENDSHIP_LEVEL_4":case 5:m.highest_friendship_milestone=5;break}return m};Battle.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.battle_start_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.battle_start_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.battle_end_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.battle_end_ms=o.longs===String?"0":0;d.battle_id="";d.defender=null;d.battle_log=null;d.attacker=null;d.weather_condition=o.enums===String?"NONE":0;d.highest_friendship_milestone=o.enums===String?"FRIENDSHIP_LEVEL_UNSET":0}if(m.battle_start_ms!=null&&m.hasOwnProperty("battle_start_ms")){if(typeof m.battle_start_ms==="number")d.battle_start_ms=o.longs===String?String(m.battle_start_ms):m.battle_start_ms;else d.battle_start_ms=o.longs===String?$util.Long.prototype.toString.call(m.battle_start_ms):o.longs===Number?new $util.LongBits(m.battle_start_ms.low>>>0,m.battle_start_ms.high>>>0).toNumber():m.battle_start_ms}if(m.battle_end_ms!=null&&m.hasOwnProperty("battle_end_ms")){if(typeof m.battle_end_ms==="number")d.battle_end_ms=o.longs===String?String(m.battle_end_ms):m.battle_end_ms;else d.battle_end_ms=o.longs===String?$util.Long.prototype.toString.call(m.battle_end_ms):o.longs===Number?new $util.LongBits(m.battle_end_ms.low>>>0,m.battle_end_ms.high>>>0).toNumber():m.battle_end_ms}if(m.battle_id!=null&&m.hasOwnProperty("battle_id")){d.battle_id=m.battle_id}if(m.defender!=null&&m.hasOwnProperty("defender")){d.defender=$root.POGOProtos.Data.Battle.BattleParticipant.toObject(m.defender,o)}if(m.battle_log!=null&&m.hasOwnProperty("battle_log")){d.battle_log=$root.POGOProtos.Data.Battle.BattleLog.toObject(m.battle_log,o)}if(m.attacker!=null&&m.hasOwnProperty("attacker")){d.attacker=$root.POGOProtos.Data.Battle.BattleParticipant.toObject(m.attacker,o)}if(m.weather_condition!=null&&m.hasOwnProperty("weather_condition")){d.weather_condition=o.enums===String?$root.POGOProtos.Enums.WeatherCondition[m.weather_condition]:m.weather_condition}if(m.highest_friendship_milestone!=null&&m.hasOwnProperty("highest_friendship_milestone")){d.highest_friendship_milestone=o.enums===String?$root.POGOProtos.Enums.FriendshipLevelMilestone[m.highest_friendship_milestone]:m.highest_friendship_milestone}return d};Battle.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Battle}();Battle.BattleAction=function(){function BattleAction(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BattleAction.prototype.type=0;BattleAction.prototype.action_start_ms=$util.Long?$util.Long.fromBits(0,0,false):0;BattleAction.prototype.duration_ms=0;BattleAction.prototype.energy_delta=0;BattleAction.prototype.attacker_index=0;BattleAction.prototype.target_index=0;BattleAction.prototype.active_pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;BattleAction.prototype.player_joined=null;BattleAction.prototype.battle_results=null;BattleAction.prototype.damage_windows_start_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;BattleAction.prototype.damage_windows_end_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;BattleAction.prototype.player_left=null;BattleAction.prototype.target_pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;BattleAction.prototype.leveled_up_friends=null;BattleAction.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(8).int32(m.type);if(m.action_start_ms!=null&&m.hasOwnProperty("action_start_ms"))w.uint32(16).int64(m.action_start_ms);if(m.duration_ms!=null&&m.hasOwnProperty("duration_ms"))w.uint32(24).int32(m.duration_ms);if(m.energy_delta!=null&&m.hasOwnProperty("energy_delta"))w.uint32(40).int32(m.energy_delta);if(m.attacker_index!=null&&m.hasOwnProperty("attacker_index"))w.uint32(48).int32(m.attacker_index);if(m.target_index!=null&&m.hasOwnProperty("target_index"))w.uint32(56).int32(m.target_index);if(m.active_pokemon_id!=null&&m.hasOwnProperty("active_pokemon_id"))w.uint32(65).fixed64(m.active_pokemon_id);if(m.player_joined!=null&&m.hasOwnProperty("player_joined"))$root.POGOProtos.Data.Battle.BattleParticipant.encode(m.player_joined,w.uint32(74).fork()).ldelim();if(m.battle_results!=null&&m.hasOwnProperty("battle_results"))$root.POGOProtos.Data.Battle.BattleResults.encode(m.battle_results,w.uint32(82).fork()).ldelim();if(m.damage_windows_start_timestamp_ms!=null&&m.hasOwnProperty("damage_windows_start_timestamp_ms"))w.uint32(88).int64(m.damage_windows_start_timestamp_ms);if(m.damage_windows_end_timestamp_ms!=null&&m.hasOwnProperty("damage_windows_end_timestamp_ms"))w.uint32(96).int64(m.damage_windows_end_timestamp_ms);if(m.player_left!=null&&m.hasOwnProperty("player_left"))$root.POGOProtos.Data.Battle.BattleParticipant.encode(m.player_left,w.uint32(106).fork()).ldelim();if(m.target_pokemon_id!=null&&m.hasOwnProperty("target_pokemon_id"))w.uint32(113).fixed64(m.target_pokemon_id);if(m.leveled_up_friends!=null&&m.hasOwnProperty("leveled_up_friends"))$root.POGOProtos.Data.Friends.LeveledUpFriends.encode(m.leveled_up_friends,w.uint32(122).fork()).ldelim();return w};BattleAction.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Battle.BattleAction;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.type=r.int32();break;case 2:m.action_start_ms=r.int64();break;case 3:m.duration_ms=r.int32();break;case 5:m.energy_delta=r.int32();break;case 6:m.attacker_index=r.int32();break;case 7:m.target_index=r.int32();break;case 8:m.active_pokemon_id=r.fixed64();break;case 9:m.player_joined=$root.POGOProtos.Data.Battle.BattleParticipant.decode(r,r.uint32());break;case 10:m.battle_results=$root.POGOProtos.Data.Battle.BattleResults.decode(r,r.uint32());break;case 11:m.damage_windows_start_timestamp_ms=r.int64();break;case 12:m.damage_windows_end_timestamp_ms=r.int64();break;case 13:m.player_left=$root.POGOProtos.Data.Battle.BattleParticipant.decode(r,r.uint32());break;case 14:m.target_pokemon_id=r.fixed64();break;case 15:m.leveled_up_friends=$root.POGOProtos.Data.Friends.LeveledUpFriends.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};BattleAction.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Battle.BattleAction)return d;var m=new $root.POGOProtos.Data.Battle.BattleAction;switch(d.type){case"ACTION_UNSET":case 0:m.type=0;break;case"ACTION_ATTACK":case 1:m.type=1;break;case"ACTION_DODGE":case 2:m.type=2;break;case"ACTION_SPECIAL_ATTACK":case 3:m.type=3;break;case"ACTION_SWAP_POKEMON":case 4:m.type=4;break;case"ACTION_FAINT":case 5:m.type=5;break;case"ACTION_PLAYER_JOIN":case 6:m.type=6;break;case"ACTION_PLAYER_QUIT":case 7:m.type=7;break;case"ACTION_VICTORY":case 8:m.type=8;break;case"ACTION_DEFEAT":case 9:m.type=9;break;case"ACTION_TIMED_OUT":case 10:m.type=10;break;case"ACTION_SPECIAL_ATTACK_2":case 11:m.type=11;break}if(d.action_start_ms!=null){if($util.Long)(m.action_start_ms=$util.Long.fromValue(d.action_start_ms)).unsigned=false;else if(typeof d.action_start_ms==="string")m.action_start_ms=parseInt(d.action_start_ms,10);else if(typeof d.action_start_ms==="number")m.action_start_ms=d.action_start_ms;else if(typeof d.action_start_ms==="object")m.action_start_ms=new $util.LongBits(d.action_start_ms.low>>>0,d.action_start_ms.high>>>0).toNumber()}if(d.duration_ms!=null){m.duration_ms=d.duration_ms|0}if(d.energy_delta!=null){m.energy_delta=d.energy_delta|0}if(d.attacker_index!=null){m.attacker_index=d.attacker_index|0}if(d.target_index!=null){m.target_index=d.target_index|0}if(d.active_pokemon_id!=null){if($util.Long)(m.active_pokemon_id=$util.Long.fromValue(d.active_pokemon_id)).unsigned=false;else if(typeof d.active_pokemon_id==="string")m.active_pokemon_id=parseInt(d.active_pokemon_id,10);else if(typeof d.active_pokemon_id==="number")m.active_pokemon_id=d.active_pokemon_id;else if(typeof d.active_pokemon_id==="object")m.active_pokemon_id=new $util.LongBits(d.active_pokemon_id.low>>>0,d.active_pokemon_id.high>>>0).toNumber()}if(d.player_joined!=null){if(typeof d.player_joined!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleAction.player_joined: object expected");m.player_joined=$root.POGOProtos.Data.Battle.BattleParticipant.fromObject(d.player_joined)}if(d.battle_results!=null){if(typeof d.battle_results!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleAction.battle_results: object expected");m.battle_results=$root.POGOProtos.Data.Battle.BattleResults.fromObject(d.battle_results)}if(d.damage_windows_start_timestamp_ms!=null){if($util.Long)(m.damage_windows_start_timestamp_ms=$util.Long.fromValue(d.damage_windows_start_timestamp_ms)).unsigned=false;else if(typeof d.damage_windows_start_timestamp_ms==="string")m.damage_windows_start_timestamp_ms=parseInt(d.damage_windows_start_timestamp_ms,10);else if(typeof d.damage_windows_start_timestamp_ms==="number")m.damage_windows_start_timestamp_ms=d.damage_windows_start_timestamp_ms;else if(typeof d.damage_windows_start_timestamp_ms==="object")m.damage_windows_start_timestamp_ms=new $util.LongBits(d.damage_windows_start_timestamp_ms.low>>>0,d.damage_windows_start_timestamp_ms.high>>>0).toNumber()}if(d.damage_windows_end_timestamp_ms!=null){if($util.Long)(m.damage_windows_end_timestamp_ms=$util.Long.fromValue(d.damage_windows_end_timestamp_ms)).unsigned=false;else if(typeof d.damage_windows_end_timestamp_ms==="string")m.damage_windows_end_timestamp_ms=parseInt(d.damage_windows_end_timestamp_ms,10);else if(typeof d.damage_windows_end_timestamp_ms==="number")m.damage_windows_end_timestamp_ms=d.damage_windows_end_timestamp_ms;else if(typeof d.damage_windows_end_timestamp_ms==="object")m.damage_windows_end_timestamp_ms=new $util.LongBits(d.damage_windows_end_timestamp_ms.low>>>0,d.damage_windows_end_timestamp_ms.high>>>0).toNumber()}if(d.player_left!=null){if(typeof d.player_left!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleAction.player_left: object expected");m.player_left=$root.POGOProtos.Data.Battle.BattleParticipant.fromObject(d.player_left)}if(d.target_pokemon_id!=null){if($util.Long)(m.target_pokemon_id=$util.Long.fromValue(d.target_pokemon_id)).unsigned=false;else if(typeof d.target_pokemon_id==="string")m.target_pokemon_id=parseInt(d.target_pokemon_id,10);else if(typeof d.target_pokemon_id==="number")m.target_pokemon_id=d.target_pokemon_id;else if(typeof d.target_pokemon_id==="object")m.target_pokemon_id=new $util.LongBits(d.target_pokemon_id.low>>>0,d.target_pokemon_id.high>>>0).toNumber()}if(d.leveled_up_friends!=null){if(typeof d.leveled_up_friends!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleAction.leveled_up_friends: object expected");m.leveled_up_friends=$root.POGOProtos.Data.Friends.LeveledUpFriends.fromObject(d.leveled_up_friends)}return m};BattleAction.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.type=o.enums===String?"ACTION_UNSET":0;if($util.Long){var n=new $util.Long(0,0,false);d.action_start_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.action_start_ms=o.longs===String?"0":0;d.duration_ms=0;d.energy_delta=0;d.attacker_index=0;d.target_index=0;if($util.Long){var n=new $util.Long(0,0,false);d.active_pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.active_pokemon_id=o.longs===String?"0":0;d.player_joined=null;d.battle_results=null;if($util.Long){var n=new $util.Long(0,0,false);d.damage_windows_start_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.damage_windows_start_timestamp_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.damage_windows_end_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.damage_windows_end_timestamp_ms=o.longs===String?"0":0;d.player_left=null;if($util.Long){var n=new $util.Long(0,0,false);d.target_pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.target_pokemon_id=o.longs===String?"0":0;d.leveled_up_friends=null}if(m.type!=null&&m.hasOwnProperty("type")){d.type=o.enums===String?$root.POGOProtos.Data.Battle.BattleActionType[m.type]:m.type}if(m.action_start_ms!=null&&m.hasOwnProperty("action_start_ms")){if(typeof m.action_start_ms==="number")d.action_start_ms=o.longs===String?String(m.action_start_ms):m.action_start_ms;else d.action_start_ms=o.longs===String?$util.Long.prototype.toString.call(m.action_start_ms):o.longs===Number?new $util.LongBits(m.action_start_ms.low>>>0,m.action_start_ms.high>>>0).toNumber():m.action_start_ms}if(m.duration_ms!=null&&m.hasOwnProperty("duration_ms")){d.duration_ms=m.duration_ms}if(m.energy_delta!=null&&m.hasOwnProperty("energy_delta")){d.energy_delta=m.energy_delta}if(m.attacker_index!=null&&m.hasOwnProperty("attacker_index")){d.attacker_index=m.attacker_index}if(m.target_index!=null&&m.hasOwnProperty("target_index")){d.target_index=m.target_index}if(m.active_pokemon_id!=null&&m.hasOwnProperty("active_pokemon_id")){if(typeof m.active_pokemon_id==="number")d.active_pokemon_id=o.longs===String?String(m.active_pokemon_id):m.active_pokemon_id;else d.active_pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.active_pokemon_id):o.longs===Number?new $util.LongBits(m.active_pokemon_id.low>>>0,m.active_pokemon_id.high>>>0).toNumber():m.active_pokemon_id}if(m.player_joined!=null&&m.hasOwnProperty("player_joined")){d.player_joined=$root.POGOProtos.Data.Battle.BattleParticipant.toObject(m.player_joined,o)}if(m.battle_results!=null&&m.hasOwnProperty("battle_results")){d.battle_results=$root.POGOProtos.Data.Battle.BattleResults.toObject(m.battle_results,o)}if(m.damage_windows_start_timestamp_ms!=null&&m.hasOwnProperty("damage_windows_start_timestamp_ms")){if(typeof m.damage_windows_start_timestamp_ms==="number")d.damage_windows_start_timestamp_ms=o.longs===String?String(m.damage_windows_start_timestamp_ms):m.damage_windows_start_timestamp_ms;else d.damage_windows_start_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.damage_windows_start_timestamp_ms):o.longs===Number?new $util.LongBits(m.damage_windows_start_timestamp_ms.low>>>0,m.damage_windows_start_timestamp_ms.high>>>0).toNumber():m.damage_windows_start_timestamp_ms}if(m.damage_windows_end_timestamp_ms!=null&&m.hasOwnProperty("damage_windows_end_timestamp_ms")){if(typeof m.damage_windows_end_timestamp_ms==="number")d.damage_windows_end_timestamp_ms=o.longs===String?String(m.damage_windows_end_timestamp_ms):m.damage_windows_end_timestamp_ms;else d.damage_windows_end_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.damage_windows_end_timestamp_ms):o.longs===Number?new $util.LongBits(m.damage_windows_end_timestamp_ms.low>>>0,m.damage_windows_end_timestamp_ms.high>>>0).toNumber():m.damage_windows_end_timestamp_ms}if(m.player_left!=null&&m.hasOwnProperty("player_left")){d.player_left=$root.POGOProtos.Data.Battle.BattleParticipant.toObject(m.player_left,o)}if(m.target_pokemon_id!=null&&m.hasOwnProperty("target_pokemon_id")){if(typeof m.target_pokemon_id==="number")d.target_pokemon_id=o.longs===String?String(m.target_pokemon_id):m.target_pokemon_id;else d.target_pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.target_pokemon_id):o.longs===Number?new $util.LongBits(m.target_pokemon_id.low>>>0,m.target_pokemon_id.high>>>0).toNumber():m.target_pokemon_id}if(m.leveled_up_friends!=null&&m.hasOwnProperty("leveled_up_friends")){d.leveled_up_friends=$root.POGOProtos.Data.Friends.LeveledUpFriends.toObject(m.leveled_up_friends,o)}return d};BattleAction.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BattleAction}();Battle.BattleActionType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ACTION_UNSET"]=0;values[valuesById[1]="ACTION_ATTACK"]=1;values[valuesById[2]="ACTION_DODGE"]=2;values[valuesById[3]="ACTION_SPECIAL_ATTACK"]=3;values[valuesById[4]="ACTION_SWAP_POKEMON"]=4;values[valuesById[5]="ACTION_FAINT"]=5;values[valuesById[6]="ACTION_PLAYER_JOIN"]=6;values[valuesById[7]="ACTION_PLAYER_QUIT"]=7;values[valuesById[8]="ACTION_VICTORY"]=8;values[valuesById[9]="ACTION_DEFEAT"]=9;values[valuesById[10]="ACTION_TIMED_OUT"]=10;values[valuesById[11]="ACTION_SPECIAL_ATTACK_2"]=11;return values}();Battle.BattleLog=function(){function BattleLog(p){this.battle_actions=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BattleLog.prototype.state=0;BattleLog.prototype.battle_type=0;BattleLog.prototype.server_ms=$util.Long?$util.Long.fromBits(0,0,false):0;BattleLog.prototype.battle_actions=$util.emptyArray;BattleLog.prototype.battle_start_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;BattleLog.prototype.battle_end_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;BattleLog.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.state!=null&&m.hasOwnProperty("state"))w.uint32(8).int32(m.state);if(m.battle_type!=null&&m.hasOwnProperty("battle_type"))w.uint32(16).int32(m.battle_type);if(m.server_ms!=null&&m.hasOwnProperty("server_ms"))w.uint32(24).int64(m.server_ms);if(m.battle_actions!=null&&m.battle_actions.length){for(var i=0;i<m.battle_actions.length;++i)$root.POGOProtos.Data.Battle.BattleAction.encode(m.battle_actions[i],w.uint32(34).fork()).ldelim()}if(m.battle_start_timestamp_ms!=null&&m.hasOwnProperty("battle_start_timestamp_ms"))w.uint32(40).int64(m.battle_start_timestamp_ms);if(m.battle_end_timestamp_ms!=null&&m.hasOwnProperty("battle_end_timestamp_ms"))w.uint32(48).int64(m.battle_end_timestamp_ms);return w};BattleLog.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Battle.BattleLog;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.state=r.int32();break;case 2:m.battle_type=r.int32();break;case 3:m.server_ms=r.int64();break;case 4:if(!(m.battle_actions&&m.battle_actions.length))m.battle_actions=[];m.battle_actions.push($root.POGOProtos.Data.Battle.BattleAction.decode(r,r.uint32()));break;case 5:m.battle_start_timestamp_ms=r.int64();break;case 6:m.battle_end_timestamp_ms=r.int64();break;default:r.skipType(t&7);break}}return m};BattleLog.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Battle.BattleLog)return d;var m=new $root.POGOProtos.Data.Battle.BattleLog;switch(d.state){case"STATE_UNSET":case 0:m.state=0;break;case"ACTIVE":case 1:m.state=1;break;case"VICTORY":case 2:m.state=2;break;case"DEFEATED":case 3:m.state=3;break;case"TIMED_OUT":case 4:m.state=4;break}switch(d.battle_type){case"BATTLE_TYPE_UNSET":case 0:m.battle_type=0;break;case"BATTLE_TYPE_NORMAL":case 1:m.battle_type=1;break;case"BATTLE_TYPE_TRAINING":case 2:m.battle_type=2;break;case"BATTLE_TYPE_RAID":case 3:m.battle_type=3;break}if(d.server_ms!=null){if($util.Long)(m.server_ms=$util.Long.fromValue(d.server_ms)).unsigned=false;else if(typeof d.server_ms==="string")m.server_ms=parseInt(d.server_ms,10);else if(typeof d.server_ms==="number")m.server_ms=d.server_ms;else if(typeof d.server_ms==="object")m.server_ms=new $util.LongBits(d.server_ms.low>>>0,d.server_ms.high>>>0).toNumber()}if(d.battle_actions){if(!Array.isArray(d.battle_actions))throw TypeError(".POGOProtos.Data.Battle.BattleLog.battle_actions: array expected");m.battle_actions=[];for(var i=0;i<d.battle_actions.length;++i){if(typeof d.battle_actions[i]!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleLog.battle_actions: object expected");m.battle_actions[i]=$root.POGOProtos.Data.Battle.BattleAction.fromObject(d.battle_actions[i])}}if(d.battle_start_timestamp_ms!=null){if($util.Long)(m.battle_start_timestamp_ms=$util.Long.fromValue(d.battle_start_timestamp_ms)).unsigned=false;else if(typeof d.battle_start_timestamp_ms==="string")m.battle_start_timestamp_ms=parseInt(d.battle_start_timestamp_ms,10);else if(typeof d.battle_start_timestamp_ms==="number")m.battle_start_timestamp_ms=d.battle_start_timestamp_ms;else if(typeof d.battle_start_timestamp_ms==="object")m.battle_start_timestamp_ms=new $util.LongBits(d.battle_start_timestamp_ms.low>>>0,d.battle_start_timestamp_ms.high>>>0).toNumber()}if(d.battle_end_timestamp_ms!=null){if($util.Long)(m.battle_end_timestamp_ms=$util.Long.fromValue(d.battle_end_timestamp_ms)).unsigned=false;else if(typeof d.battle_end_timestamp_ms==="string")m.battle_end_timestamp_ms=parseInt(d.battle_end_timestamp_ms,10);else if(typeof d.battle_end_timestamp_ms==="number")m.battle_end_timestamp_ms=d.battle_end_timestamp_ms;else if(typeof d.battle_end_timestamp_ms==="object")m.battle_end_timestamp_ms=new $util.LongBits(d.battle_end_timestamp_ms.low>>>0,d.battle_end_timestamp_ms.high>>>0).toNumber()}return m};BattleLog.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.battle_actions=[]}if(o.defaults){d.state=o.enums===String?"STATE_UNSET":0;d.battle_type=o.enums===String?"BATTLE_TYPE_UNSET":0;if($util.Long){var n=new $util.Long(0,0,false);d.server_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.server_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.battle_start_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.battle_start_timestamp_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.battle_end_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.battle_end_timestamp_ms=o.longs===String?"0":0}if(m.state!=null&&m.hasOwnProperty("state")){d.state=o.enums===String?$root.POGOProtos.Data.Battle.BattleState[m.state]:m.state}if(m.battle_type!=null&&m.hasOwnProperty("battle_type")){d.battle_type=o.enums===String?$root.POGOProtos.Data.Battle.BattleType[m.battle_type]:m.battle_type}if(m.server_ms!=null&&m.hasOwnProperty("server_ms")){if(typeof m.server_ms==="number")d.server_ms=o.longs===String?String(m.server_ms):m.server_ms;else d.server_ms=o.longs===String?$util.Long.prototype.toString.call(m.server_ms):o.longs===Number?new $util.LongBits(m.server_ms.low>>>0,m.server_ms.high>>>0).toNumber():m.server_ms}if(m.battle_actions&&m.battle_actions.length){d.battle_actions=[];for(var j=0;j<m.battle_actions.length;++j){d.battle_actions[j]=$root.POGOProtos.Data.Battle.BattleAction.toObject(m.battle_actions[j],o)}}if(m.battle_start_timestamp_ms!=null&&m.hasOwnProperty("battle_start_timestamp_ms")){if(typeof m.battle_start_timestamp_ms==="number")d.battle_start_timestamp_ms=o.longs===String?String(m.battle_start_timestamp_ms):m.battle_start_timestamp_ms;else d.battle_start_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.battle_start_timestamp_ms):o.longs===Number?new $util.LongBits(m.battle_start_timestamp_ms.low>>>0,m.battle_start_timestamp_ms.high>>>0).toNumber():m.battle_start_timestamp_ms}if(m.battle_end_timestamp_ms!=null&&m.hasOwnProperty("battle_end_timestamp_ms")){if(typeof m.battle_end_timestamp_ms==="number")d.battle_end_timestamp_ms=o.longs===String?String(m.battle_end_timestamp_ms):m.battle_end_timestamp_ms;else d.battle_end_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.battle_end_timestamp_ms):o.longs===Number?new $util.LongBits(m.battle_end_timestamp_ms.low>>>0,m.battle_end_timestamp_ms.high>>>0).toNumber():m.battle_end_timestamp_ms}return d};BattleLog.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BattleLog}();Battle.BattleParticipant=function(){function BattleParticipant(p){this.reverse_pokemon=[];this.defeated_pokemon=[];this.lobby_pokemon=[];this.friend_codename=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BattleParticipant.prototype.active_pokemon=null;BattleParticipant.prototype.trainer_public_profile=null;BattleParticipant.prototype.reverse_pokemon=$util.emptyArray;BattleParticipant.prototype.defeated_pokemon=$util.emptyArray;BattleParticipant.prototype.lobby_pokemon=$util.emptyArray;BattleParticipant.prototype.damage_dealt=0;BattleParticipant.prototype.super_effective_charge_move=false;BattleParticipant.prototype.weather_boosted=false;BattleParticipant.prototype.highest_friendship_milestone=0;BattleParticipant.prototype.friend_codename=$util.emptyArray;BattleParticipant.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.active_pokemon!=null&&m.hasOwnProperty("active_pokemon"))$root.POGOProtos.Data.Battle.BattlePokemonInfo.encode(m.active_pokemon,w.uint32(10).fork()).ldelim();if(m.trainer_public_profile!=null&&m.hasOwnProperty("trainer_public_profile"))$root.POGOProtos.Data.Player.PlayerPublicProfile.encode(m.trainer_public_profile,w.uint32(18).fork()).ldelim();if(m.reverse_pokemon!=null&&m.reverse_pokemon.length){for(var i=0;i<m.reverse_pokemon.length;++i)$root.POGOProtos.Data.Battle.BattlePokemonInfo.encode(m.reverse_pokemon[i],w.uint32(26).fork()).ldelim()}if(m.defeated_pokemon!=null&&m.defeated_pokemon.length){for(var i=0;i<m.defeated_pokemon.length;++i)$root.POGOProtos.Data.Battle.BattlePokemonInfo.encode(m.defeated_pokemon[i],w.uint32(34).fork()).ldelim()}if(m.lobby_pokemon!=null&&m.lobby_pokemon.length){for(var i=0;i<m.lobby_pokemon.length;++i)$root.POGOProtos.Map.Pokemon.LobbyPokemon.encode(m.lobby_pokemon[i],w.uint32(42).fork()).ldelim()}if(m.damage_dealt!=null&&m.hasOwnProperty("damage_dealt"))w.uint32(48).int32(m.damage_dealt);if(m.super_effective_charge_move!=null&&m.hasOwnProperty("super_effective_charge_move"))w.uint32(56).bool(m.super_effective_charge_move);if(m.weather_boosted!=null&&m.hasOwnProperty("weather_boosted"))w.uint32(64).bool(m.weather_boosted);if(m.highest_friendship_milestone!=null&&m.hasOwnProperty("highest_friendship_milestone"))w.uint32(72).int32(m.highest_friendship_milestone);if(m.friend_codename!=null&&m.friend_codename.length){for(var i=0;i<m.friend_codename.length;++i)w.uint32(82).string(m.friend_codename[i])}return w};BattleParticipant.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Battle.BattleParticipant;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.active_pokemon=$root.POGOProtos.Data.Battle.BattlePokemonInfo.decode(r,r.uint32());break;case 2:m.trainer_public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.decode(r,r.uint32());break;case 3:if(!(m.reverse_pokemon&&m.reverse_pokemon.length))m.reverse_pokemon=[];m.reverse_pokemon.push($root.POGOProtos.Data.Battle.BattlePokemonInfo.decode(r,r.uint32()));break;case 4:if(!(m.defeated_pokemon&&m.defeated_pokemon.length))m.defeated_pokemon=[];m.defeated_pokemon.push($root.POGOProtos.Data.Battle.BattlePokemonInfo.decode(r,r.uint32()));break;case 5:if(!(m.lobby_pokemon&&m.lobby_pokemon.length))m.lobby_pokemon=[];m.lobby_pokemon.push($root.POGOProtos.Map.Pokemon.LobbyPokemon.decode(r,r.uint32()));break;case 6:m.damage_dealt=r.int32();break;case 7:m.super_effective_charge_move=r.bool();break;case 8:m.weather_boosted=r.bool();break;case 9:m.highest_friendship_milestone=r.int32();break;case 10:if(!(m.friend_codename&&m.friend_codename.length))m.friend_codename=[];m.friend_codename.push(r.string());break;default:r.skipType(t&7);break}}return m};BattleParticipant.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Battle.BattleParticipant)return d;var m=new $root.POGOProtos.Data.Battle.BattleParticipant;if(d.active_pokemon!=null){if(typeof d.active_pokemon!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleParticipant.active_pokemon: object expected");m.active_pokemon=$root.POGOProtos.Data.Battle.BattlePokemonInfo.fromObject(d.active_pokemon)}if(d.trainer_public_profile!=null){if(typeof d.trainer_public_profile!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleParticipant.trainer_public_profile: object expected");m.trainer_public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.fromObject(d.trainer_public_profile)}if(d.reverse_pokemon){if(!Array.isArray(d.reverse_pokemon))throw TypeError(".POGOProtos.Data.Battle.BattleParticipant.reverse_pokemon: array expected");m.reverse_pokemon=[];for(var i=0;i<d.reverse_pokemon.length;++i){if(typeof d.reverse_pokemon[i]!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleParticipant.reverse_pokemon: object expected");m.reverse_pokemon[i]=$root.POGOProtos.Data.Battle.BattlePokemonInfo.fromObject(d.reverse_pokemon[i])}}if(d.defeated_pokemon){if(!Array.isArray(d.defeated_pokemon))throw TypeError(".POGOProtos.Data.Battle.BattleParticipant.defeated_pokemon: array expected");m.defeated_pokemon=[];for(var i=0;i<d.defeated_pokemon.length;++i){if(typeof d.defeated_pokemon[i]!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleParticipant.defeated_pokemon: object expected");m.defeated_pokemon[i]=$root.POGOProtos.Data.Battle.BattlePokemonInfo.fromObject(d.defeated_pokemon[i])}}if(d.lobby_pokemon){if(!Array.isArray(d.lobby_pokemon))throw TypeError(".POGOProtos.Data.Battle.BattleParticipant.lobby_pokemon: array expected");m.lobby_pokemon=[];for(var i=0;i<d.lobby_pokemon.length;++i){if(typeof d.lobby_pokemon[i]!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleParticipant.lobby_pokemon: object expected");m.lobby_pokemon[i]=$root.POGOProtos.Map.Pokemon.LobbyPokemon.fromObject(d.lobby_pokemon[i])}}if(d.damage_dealt!=null){m.damage_dealt=d.damage_dealt|0}if(d.super_effective_charge_move!=null){m.super_effective_charge_move=Boolean(d.super_effective_charge_move)}if(d.weather_boosted!=null){m.weather_boosted=Boolean(d.weather_boosted)}switch(d.highest_friendship_milestone){case"FRIENDSHIP_LEVEL_UNSET":case 0:m.highest_friendship_milestone=0;break;case"FRIENDSHIP_LEVEL_0":case 1:m.highest_friendship_milestone=1;break;case"FRIENDSHIP_LEVEL_1":case 2:m.highest_friendship_milestone=2;break;case"FRIENDSHIP_LEVEL_2":case 3:m.highest_friendship_milestone=3;break;case"FRIENDSHIP_LEVEL_3":case 4:m.highest_friendship_milestone=4;break;case"FRIENDSHIP_LEVEL_4":case 5:m.highest_friendship_milestone=5;break}if(d.friend_codename){if(!Array.isArray(d.friend_codename))throw TypeError(".POGOProtos.Data.Battle.BattleParticipant.friend_codename: array expected");m.friend_codename=[];for(var i=0;i<d.friend_codename.length;++i){m.friend_codename[i]=String(d.friend_codename[i])}}return m};BattleParticipant.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.reverse_pokemon=[];d.defeated_pokemon=[];d.lobby_pokemon=[];d.friend_codename=[]}if(o.defaults){d.active_pokemon=null;d.trainer_public_profile=null;d.damage_dealt=0;d.super_effective_charge_move=false;d.weather_boosted=false;d.highest_friendship_milestone=o.enums===String?"FRIENDSHIP_LEVEL_UNSET":0}if(m.active_pokemon!=null&&m.hasOwnProperty("active_pokemon")){d.active_pokemon=$root.POGOProtos.Data.Battle.BattlePokemonInfo.toObject(m.active_pokemon,o)}if(m.trainer_public_profile!=null&&m.hasOwnProperty("trainer_public_profile")){d.trainer_public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.toObject(m.trainer_public_profile,o)}if(m.reverse_pokemon&&m.reverse_pokemon.length){d.reverse_pokemon=[];for(var j=0;j<m.reverse_pokemon.length;++j){d.reverse_pokemon[j]=$root.POGOProtos.Data.Battle.BattlePokemonInfo.toObject(m.reverse_pokemon[j],o)}}if(m.defeated_pokemon&&m.defeated_pokemon.length){d.defeated_pokemon=[];for(var j=0;j<m.defeated_pokemon.length;++j){d.defeated_pokemon[j]=$root.POGOProtos.Data.Battle.BattlePokemonInfo.toObject(m.defeated_pokemon[j],o)}}if(m.lobby_pokemon&&m.lobby_pokemon.length){d.lobby_pokemon=[];for(var j=0;j<m.lobby_pokemon.length;++j){d.lobby_pokemon[j]=$root.POGOProtos.Map.Pokemon.LobbyPokemon.toObject(m.lobby_pokemon[j],o)}}if(m.damage_dealt!=null&&m.hasOwnProperty("damage_dealt")){d.damage_dealt=m.damage_dealt}if(m.super_effective_charge_move!=null&&m.hasOwnProperty("super_effective_charge_move")){d.super_effective_charge_move=m.super_effective_charge_move}if(m.weather_boosted!=null&&m.hasOwnProperty("weather_boosted")){d.weather_boosted=m.weather_boosted}if(m.highest_friendship_milestone!=null&&m.hasOwnProperty("highest_friendship_milestone")){d.highest_friendship_milestone=o.enums===String?$root.POGOProtos.Enums.FriendshipLevelMilestone[m.highest_friendship_milestone]:m.highest_friendship_milestone}if(m.friend_codename&&m.friend_codename.length){d.friend_codename=[];for(var j=0;j<m.friend_codename.length;++j){d.friend_codename[j]=m.friend_codename[j]}}return d};BattleParticipant.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BattleParticipant}();Battle.BattleParties=function(){function BattleParties(p){this.battle_parties=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BattleParties.prototype.battle_parties=$util.emptyArray;BattleParties.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.battle_parties!=null&&m.battle_parties.length){for(var i=0;i<m.battle_parties.length;++i)$root.POGOProtos.Data.Battle.BattleParty.encode(m.battle_parties[i],w.uint32(10).fork()).ldelim()}return w};BattleParties.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Battle.BattleParties;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.battle_parties&&m.battle_parties.length))m.battle_parties=[];m.battle_parties.push($root.POGOProtos.Data.Battle.BattleParty.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};BattleParties.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Battle.BattleParties)return d;var m=new $root.POGOProtos.Data.Battle.BattleParties;if(d.battle_parties){if(!Array.isArray(d.battle_parties))throw TypeError(".POGOProtos.Data.Battle.BattleParties.battle_parties: array expected");m.battle_parties=[];for(var i=0;i<d.battle_parties.length;++i){if(typeof d.battle_parties[i]!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleParties.battle_parties: object expected");m.battle_parties[i]=$root.POGOProtos.Data.Battle.BattleParty.fromObject(d.battle_parties[i])}}return m};BattleParties.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.battle_parties=[]}if(m.battle_parties&&m.battle_parties.length){d.battle_parties=[];for(var j=0;j<m.battle_parties.length;++j){d.battle_parties[j]=$root.POGOProtos.Data.Battle.BattleParty.toObject(m.battle_parties[j],o)}}return d};BattleParties.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BattleParties}();Battle.BattleParty=function(){function BattleParty(p){this.ids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BattleParty.prototype.name="";BattleParty.prototype.team_number=0;BattleParty.prototype.ids=$util.emptyArray;BattleParty.prototype.combat_league_id="";BattleParty.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.name!=null&&m.hasOwnProperty("name"))w.uint32(10).string(m.name);if(m.team_number!=null&&m.hasOwnProperty("team_number"))w.uint32(16).int32(m.team_number);if(m.ids!=null&&m.ids.length){w.uint32(26).fork();for(var i=0;i<m.ids.length;++i)w.uint64(m.ids[i]);w.ldelim()}if(m.combat_league_id!=null&&m.hasOwnProperty("combat_league_id"))w.uint32(34).string(m.combat_league_id);return w};BattleParty.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Battle.BattleParty;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.name=r.string();break;case 2:m.team_number=r.int32();break;case 3:if(!(m.ids&&m.ids.length))m.ids=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.ids.push(r.uint64())}else m.ids.push(r.uint64());break;case 4:m.combat_league_id=r.string();break;default:r.skipType(t&7);break}}return m};BattleParty.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Battle.BattleParty)return d;var m=new $root.POGOProtos.Data.Battle.BattleParty;if(d.name!=null){m.name=String(d.name)}if(d.team_number!=null){m.team_number=d.team_number|0}if(d.ids){if(!Array.isArray(d.ids))throw TypeError(".POGOProtos.Data.Battle.BattleParty.ids: array expected");m.ids=[];for(var i=0;i<d.ids.length;++i){if($util.Long)(m.ids[i]=$util.Long.fromValue(d.ids[i])).unsigned=true;else if(typeof d.ids[i]==="string")m.ids[i]=parseInt(d.ids[i],10);else if(typeof d.ids[i]==="number")m.ids[i]=d.ids[i];else if(typeof d.ids[i]==="object")m.ids[i]=new $util.LongBits(d.ids[i].low>>>0,d.ids[i].high>>>0).toNumber(true)}}if(d.combat_league_id!=null){m.combat_league_id=String(d.combat_league_id)}return m};BattleParty.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.ids=[]}if(o.defaults){d.name="";d.team_number=0;d.combat_league_id=""}if(m.name!=null&&m.hasOwnProperty("name")){d.name=m.name}if(m.team_number!=null&&m.hasOwnProperty("team_number")){d.team_number=m.team_number}if(m.ids&&m.ids.length){d.ids=[];for(var j=0;j<m.ids.length;++j){if(typeof m.ids[j]==="number")d.ids[j]=o.longs===String?String(m.ids[j]):m.ids[j];else d.ids[j]=o.longs===String?$util.Long.prototype.toString.call(m.ids[j]):o.longs===Number?new $util.LongBits(m.ids[j].low>>>0,m.ids[j].high>>>0).toNumber(true):m.ids[j]}}if(m.combat_league_id!=null&&m.hasOwnProperty("combat_league_id")){d.combat_league_id=m.combat_league_id}return d};BattleParty.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BattleParty}();Battle.BattlePokemonInfo=function(){function BattlePokemonInfo(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BattlePokemonInfo.prototype.pokemon_data=null;BattlePokemonInfo.prototype.current_health=0;BattlePokemonInfo.prototype.current_energy=0;BattlePokemonInfo.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data"))$root.POGOProtos.Data.PokemonData.encode(m.pokemon_data,w.uint32(10).fork()).ldelim();if(m.current_health!=null&&m.hasOwnProperty("current_health"))w.uint32(16).int32(m.current_health);if(m.current_energy!=null&&m.hasOwnProperty("current_energy"))w.uint32(24).int32(m.current_energy);return w};BattlePokemonInfo.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Battle.BattlePokemonInfo;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_data=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 2:m.current_health=r.int32();break;case 3:m.current_energy=r.int32();break;default:r.skipType(t&7);break}}return m};BattlePokemonInfo.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Battle.BattlePokemonInfo)return d;var m=new $root.POGOProtos.Data.Battle.BattlePokemonInfo;if(d.pokemon_data!=null){if(typeof d.pokemon_data!=="object")throw TypeError(".POGOProtos.Data.Battle.BattlePokemonInfo.pokemon_data: object expected");m.pokemon_data=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon_data)}if(d.current_health!=null){m.current_health=d.current_health|0}if(d.current_energy!=null){m.current_energy=d.current_energy|0}return m};BattlePokemonInfo.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon_data=null;d.current_health=0;d.current_energy=0}if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data")){d.pokemon_data=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon_data,o)}if(m.current_health!=null&&m.hasOwnProperty("current_health")){d.current_health=m.current_health}if(m.current_energy!=null&&m.hasOwnProperty("current_energy")){d.current_energy=m.current_energy}return d};BattlePokemonInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BattlePokemonInfo}();Battle.BattleResults=function(){function BattleResults(p){this.attackers=[];this.player_xp_awarded=[];this.participation=[];this.raid_item_rewards=[];this.post_raid_encounter=[];this.gym_badge=[];this.default_raid_item_rewards=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BattleResults.prototype.gym_state=null;BattleResults.prototype.attackers=$util.emptyArray;BattleResults.prototype.player_xp_awarded=$util.emptyArray;BattleResults.prototype.next_defender_pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;BattleResults.prototype.gym_points_delta=0;BattleResults.prototype.gym_status=null;BattleResults.prototype.participation=$util.emptyArray;BattleResults.prototype.raid_item_rewards=$util.emptyArray;BattleResults.prototype.post_raid_encounter=$util.emptyArray;BattleResults.prototype.gym_badge=$util.emptyArray;BattleResults.prototype.default_raid_item_rewards=$util.emptyArray;BattleResults.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_state!=null&&m.hasOwnProperty("gym_state"))$root.POGOProtos.Data.Gym.GymState.encode(m.gym_state,w.uint32(10).fork()).ldelim();if(m.attackers!=null&&m.attackers.length){for(var i=0;i<m.attackers.length;++i)$root.POGOProtos.Data.Battle.BattleParticipant.encode(m.attackers[i],w.uint32(18).fork()).ldelim()}if(m.player_xp_awarded!=null&&m.player_xp_awarded.length){w.uint32(26).fork();for(var i=0;i<m.player_xp_awarded.length;++i)w.int32(m.player_xp_awarded[i]);w.ldelim()}if(m.next_defender_pokemon_id!=null&&m.hasOwnProperty("next_defender_pokemon_id"))w.uint32(32).int64(m.next_defender_pokemon_id);if(m.gym_points_delta!=null&&m.hasOwnProperty("gym_points_delta"))w.uint32(40).int32(m.gym_points_delta);if(m.gym_status!=null&&m.hasOwnProperty("gym_status"))$root.POGOProtos.Data.Gym.GymStatusAndDefenders.encode(m.gym_status,w.uint32(50).fork()).ldelim();if(m.participation!=null&&m.participation.length){for(var i=0;i<m.participation.length;++i)$root.POGOProtos.Data.Raid.Participation.encode(m.participation[i],w.uint32(58).fork()).ldelim()}if(m.raid_item_rewards!=null&&m.raid_item_rewards.length){for(var i=0;i<m.raid_item_rewards.length;++i)$root.POGOProtos.Inventory.Loot.encode(m.raid_item_rewards[i],w.uint32(66).fork()).ldelim()}if(m.post_raid_encounter!=null&&m.post_raid_encounter.length){for(var i=0;i<m.post_raid_encounter.length;++i)$root.POGOProtos.Data.Raid.RaidEncounter.encode(m.post_raid_encounter[i],w.uint32(74).fork()).ldelim()}if(m.gym_badge!=null&&m.gym_badge.length){for(var i=0;i<m.gym_badge.length;++i)$root.POGOProtos.Data.Badge.AwardedGymBadge.encode(m.gym_badge[i],w.uint32(82).fork()).ldelim()}if(m.default_raid_item_rewards!=null&&m.default_raid_item_rewards.length){for(var i=0;i<m.default_raid_item_rewards.length;++i)$root.POGOProtos.Inventory.Loot.encode(m.default_raid_item_rewards[i],w.uint32(90).fork()).ldelim()}return w};BattleResults.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Battle.BattleResults;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gym_state=$root.POGOProtos.Data.Gym.GymState.decode(r,r.uint32());break;case 2:if(!(m.attackers&&m.attackers.length))m.attackers=[];m.attackers.push($root.POGOProtos.Data.Battle.BattleParticipant.decode(r,r.uint32()));break;case 3:if(!(m.player_xp_awarded&&m.player_xp_awarded.length))m.player_xp_awarded=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.player_xp_awarded.push(r.int32())}else m.player_xp_awarded.push(r.int32());break;case 4:m.next_defender_pokemon_id=r.int64();break;case 5:m.gym_points_delta=r.int32();break;case 6:m.gym_status=$root.POGOProtos.Data.Gym.GymStatusAndDefenders.decode(r,r.uint32());break;case 7:if(!(m.participation&&m.participation.length))m.participation=[];m.participation.push($root.POGOProtos.Data.Raid.Participation.decode(r,r.uint32()));break;case 8:if(!(m.raid_item_rewards&&m.raid_item_rewards.length))m.raid_item_rewards=[];m.raid_item_rewards.push($root.POGOProtos.Inventory.Loot.decode(r,r.uint32()));break;case 9:if(!(m.post_raid_encounter&&m.post_raid_encounter.length))m.post_raid_encounter=[];m.post_raid_encounter.push($root.POGOProtos.Data.Raid.RaidEncounter.decode(r,r.uint32()));break;case 10:if(!(m.gym_badge&&m.gym_badge.length))m.gym_badge=[];m.gym_badge.push($root.POGOProtos.Data.Badge.AwardedGymBadge.decode(r,r.uint32()));break;case 11:if(!(m.default_raid_item_rewards&&m.default_raid_item_rewards.length))m.default_raid_item_rewards=[];m.default_raid_item_rewards.push($root.POGOProtos.Inventory.Loot.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};BattleResults.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Battle.BattleResults)return d;var m=new $root.POGOProtos.Data.Battle.BattleResults;if(d.gym_state!=null){if(typeof d.gym_state!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleResults.gym_state: object expected");m.gym_state=$root.POGOProtos.Data.Gym.GymState.fromObject(d.gym_state)}if(d.attackers){if(!Array.isArray(d.attackers))throw TypeError(".POGOProtos.Data.Battle.BattleResults.attackers: array expected");m.attackers=[];for(var i=0;i<d.attackers.length;++i){if(typeof d.attackers[i]!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleResults.attackers: object expected");m.attackers[i]=$root.POGOProtos.Data.Battle.BattleParticipant.fromObject(d.attackers[i])}}if(d.player_xp_awarded){if(!Array.isArray(d.player_xp_awarded))throw TypeError(".POGOProtos.Data.Battle.BattleResults.player_xp_awarded: array expected");m.player_xp_awarded=[];for(var i=0;i<d.player_xp_awarded.length;++i){m.player_xp_awarded[i]=d.player_xp_awarded[i]|0}}if(d.next_defender_pokemon_id!=null){if($util.Long)(m.next_defender_pokemon_id=$util.Long.fromValue(d.next_defender_pokemon_id)).unsigned=false;else if(typeof d.next_defender_pokemon_id==="string")m.next_defender_pokemon_id=parseInt(d.next_defender_pokemon_id,10);else if(typeof d.next_defender_pokemon_id==="number")m.next_defender_pokemon_id=d.next_defender_pokemon_id;else if(typeof d.next_defender_pokemon_id==="object")m.next_defender_pokemon_id=new $util.LongBits(d.next_defender_pokemon_id.low>>>0,d.next_defender_pokemon_id.high>>>0).toNumber()}if(d.gym_points_delta!=null){m.gym_points_delta=d.gym_points_delta|0}if(d.gym_status!=null){if(typeof d.gym_status!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleResults.gym_status: object expected");m.gym_status=$root.POGOProtos.Data.Gym.GymStatusAndDefenders.fromObject(d.gym_status)}if(d.participation){if(!Array.isArray(d.participation))throw TypeError(".POGOProtos.Data.Battle.BattleResults.participation: array expected");m.participation=[];for(var i=0;i<d.participation.length;++i){if(typeof d.participation[i]!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleResults.participation: object expected");m.participation[i]=$root.POGOProtos.Data.Raid.Participation.fromObject(d.participation[i])}}if(d.raid_item_rewards){if(!Array.isArray(d.raid_item_rewards))throw TypeError(".POGOProtos.Data.Battle.BattleResults.raid_item_rewards: array expected");m.raid_item_rewards=[];for(var i=0;i<d.raid_item_rewards.length;++i){if(typeof d.raid_item_rewards[i]!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleResults.raid_item_rewards: object expected");m.raid_item_rewards[i]=$root.POGOProtos.Inventory.Loot.fromObject(d.raid_item_rewards[i])}}if(d.post_raid_encounter){if(!Array.isArray(d.post_raid_encounter))throw TypeError(".POGOProtos.Data.Battle.BattleResults.post_raid_encounter: array expected");m.post_raid_encounter=[];for(var i=0;i<d.post_raid_encounter.length;++i){if(typeof d.post_raid_encounter[i]!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleResults.post_raid_encounter: object expected");m.post_raid_encounter[i]=$root.POGOProtos.Data.Raid.RaidEncounter.fromObject(d.post_raid_encounter[i])}}if(d.gym_badge){if(!Array.isArray(d.gym_badge))throw TypeError(".POGOProtos.Data.Battle.BattleResults.gym_badge: array expected");m.gym_badge=[];for(var i=0;i<d.gym_badge.length;++i){if(typeof d.gym_badge[i]!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleResults.gym_badge: object expected");m.gym_badge[i]=$root.POGOProtos.Data.Badge.AwardedGymBadge.fromObject(d.gym_badge[i])}}if(d.default_raid_item_rewards){if(!Array.isArray(d.default_raid_item_rewards))throw TypeError(".POGOProtos.Data.Battle.BattleResults.default_raid_item_rewards: array expected");m.default_raid_item_rewards=[];for(var i=0;i<d.default_raid_item_rewards.length;++i){if(typeof d.default_raid_item_rewards[i]!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleResults.default_raid_item_rewards: object expected");m.default_raid_item_rewards[i]=$root.POGOProtos.Inventory.Loot.fromObject(d.default_raid_item_rewards[i])}}return m};BattleResults.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.attackers=[];d.player_xp_awarded=[];d.participation=[];d.raid_item_rewards=[];d.post_raid_encounter=[];d.gym_badge=[];d.default_raid_item_rewards=[]}if(o.defaults){d.gym_state=null;if($util.Long){var n=new $util.Long(0,0,false);d.next_defender_pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.next_defender_pokemon_id=o.longs===String?"0":0;d.gym_points_delta=0;d.gym_status=null}if(m.gym_state!=null&&m.hasOwnProperty("gym_state")){d.gym_state=$root.POGOProtos.Data.Gym.GymState.toObject(m.gym_state,o)}if(m.attackers&&m.attackers.length){d.attackers=[];for(var j=0;j<m.attackers.length;++j){d.attackers[j]=$root.POGOProtos.Data.Battle.BattleParticipant.toObject(m.attackers[j],o)}}if(m.player_xp_awarded&&m.player_xp_awarded.length){d.player_xp_awarded=[];for(var j=0;j<m.player_xp_awarded.length;++j){d.player_xp_awarded[j]=m.player_xp_awarded[j]}}if(m.next_defender_pokemon_id!=null&&m.hasOwnProperty("next_defender_pokemon_id")){if(typeof m.next_defender_pokemon_id==="number")d.next_defender_pokemon_id=o.longs===String?String(m.next_defender_pokemon_id):m.next_defender_pokemon_id;else d.next_defender_pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.next_defender_pokemon_id):o.longs===Number?new $util.LongBits(m.next_defender_pokemon_id.low>>>0,m.next_defender_pokemon_id.high>>>0).toNumber():m.next_defender_pokemon_id}if(m.gym_points_delta!=null&&m.hasOwnProperty("gym_points_delta")){d.gym_points_delta=m.gym_points_delta}if(m.gym_status!=null&&m.hasOwnProperty("gym_status")){d.gym_status=$root.POGOProtos.Data.Gym.GymStatusAndDefenders.toObject(m.gym_status,o)}if(m.participation&&m.participation.length){d.participation=[];for(var j=0;j<m.participation.length;++j){d.participation[j]=$root.POGOProtos.Data.Raid.Participation.toObject(m.participation[j],o)}}if(m.raid_item_rewards&&m.raid_item_rewards.length){d.raid_item_rewards=[];for(var j=0;j<m.raid_item_rewards.length;++j){d.raid_item_rewards[j]=$root.POGOProtos.Inventory.Loot.toObject(m.raid_item_rewards[j],o)}}if(m.post_raid_encounter&&m.post_raid_encounter.length){d.post_raid_encounter=[];for(var j=0;j<m.post_raid_encounter.length;++j){d.post_raid_encounter[j]=$root.POGOProtos.Data.Raid.RaidEncounter.toObject(m.post_raid_encounter[j],o)}}if(m.gym_badge&&m.gym_badge.length){d.gym_badge=[];for(var j=0;j<m.gym_badge.length;++j){d.gym_badge[j]=$root.POGOProtos.Data.Badge.AwardedGymBadge.toObject(m.gym_badge[j],o)}}if(m.default_raid_item_rewards&&m.default_raid_item_rewards.length){d.default_raid_item_rewards=[];for(var j=0;j<m.default_raid_item_rewards.length;++j){d.default_raid_item_rewards[j]=$root.POGOProtos.Inventory.Loot.toObject(m.default_raid_item_rewards[j],o)}}return d};BattleResults.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BattleResults}();Battle.BattleState=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="STATE_UNSET"]=0;values[valuesById[1]="ACTIVE"]=1;values[valuesById[2]="VICTORY"]=2;values[valuesById[3]="DEFEATED"]=3;values[valuesById[4]="TIMED_OUT"]=4;return values}();Battle.BattleType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="BATTLE_TYPE_UNSET"]=0;values[valuesById[1]="BATTLE_TYPE_NORMAL"]=1;values[valuesById[2]="BATTLE_TYPE_TRAINING"]=2;values[valuesById[3]="BATTLE_TYPE_RAID"]=3;return values}();Battle.BattleUpdate=function(){function BattleUpdate(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BattleUpdate.prototype.battle_log=null;BattleUpdate.prototype.battle_id="";BattleUpdate.prototype.active_defender=null;BattleUpdate.prototype.active_attacker=null;BattleUpdate.prototype.highest_friendship_milestone=0;BattleUpdate.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.battle_log!=null&&m.hasOwnProperty("battle_log"))$root.POGOProtos.Data.Battle.BattleLog.encode(m.battle_log,w.uint32(10).fork()).ldelim();if(m.battle_id!=null&&m.hasOwnProperty("battle_id"))w.uint32(18).string(m.battle_id);if(m.active_defender!=null&&m.hasOwnProperty("active_defender"))$root.POGOProtos.Data.Battle.BattlePokemonInfo.encode(m.active_defender,w.uint32(26).fork()).ldelim();if(m.active_attacker!=null&&m.hasOwnProperty("active_attacker"))$root.POGOProtos.Data.Battle.BattlePokemonInfo.encode(m.active_attacker,w.uint32(34).fork()).ldelim();if(m.highest_friendship_milestone!=null&&m.hasOwnProperty("highest_friendship_milestone"))w.uint32(40).int32(m.highest_friendship_milestone);return w};BattleUpdate.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Battle.BattleUpdate;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.battle_log=$root.POGOProtos.Data.Battle.BattleLog.decode(r,r.uint32());break;case 2:m.battle_id=r.string();break;case 3:m.active_defender=$root.POGOProtos.Data.Battle.BattlePokemonInfo.decode(r,r.uint32());break;case 4:m.active_attacker=$root.POGOProtos.Data.Battle.BattlePokemonInfo.decode(r,r.uint32());break;case 5:m.highest_friendship_milestone=r.int32();break;default:r.skipType(t&7);break}}return m};BattleUpdate.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Battle.BattleUpdate)return d;var m=new $root.POGOProtos.Data.Battle.BattleUpdate;if(d.battle_log!=null){if(typeof d.battle_log!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleUpdate.battle_log: object expected");m.battle_log=$root.POGOProtos.Data.Battle.BattleLog.fromObject(d.battle_log)}if(d.battle_id!=null){m.battle_id=String(d.battle_id)}if(d.active_defender!=null){if(typeof d.active_defender!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleUpdate.active_defender: object expected");m.active_defender=$root.POGOProtos.Data.Battle.BattlePokemonInfo.fromObject(d.active_defender)}if(d.active_attacker!=null){if(typeof d.active_attacker!=="object")throw TypeError(".POGOProtos.Data.Battle.BattleUpdate.active_attacker: object expected");m.active_attacker=$root.POGOProtos.Data.Battle.BattlePokemonInfo.fromObject(d.active_attacker)}switch(d.highest_friendship_milestone){case"FRIENDSHIP_LEVEL_UNSET":case 0:m.highest_friendship_milestone=0;break;case"FRIENDSHIP_LEVEL_0":case 1:m.highest_friendship_milestone=1;break;case"FRIENDSHIP_LEVEL_1":case 2:m.highest_friendship_milestone=2;break;case"FRIENDSHIP_LEVEL_2":case 3:m.highest_friendship_milestone=3;break;case"FRIENDSHIP_LEVEL_3":case 4:m.highest_friendship_milestone=4;break;case"FRIENDSHIP_LEVEL_4":case 5:m.highest_friendship_milestone=5;break}return m};BattleUpdate.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.battle_log=null;d.battle_id="";d.active_defender=null;d.active_attacker=null;d.highest_friendship_milestone=o.enums===String?"FRIENDSHIP_LEVEL_UNSET":0}if(m.battle_log!=null&&m.hasOwnProperty("battle_log")){d.battle_log=$root.POGOProtos.Data.Battle.BattleLog.toObject(m.battle_log,o)}if(m.battle_id!=null&&m.hasOwnProperty("battle_id")){d.battle_id=m.battle_id}if(m.active_defender!=null&&m.hasOwnProperty("active_defender")){d.active_defender=$root.POGOProtos.Data.Battle.BattlePokemonInfo.toObject(m.active_defender,o)}if(m.active_attacker!=null&&m.hasOwnProperty("active_attacker")){d.active_attacker=$root.POGOProtos.Data.Battle.BattlePokemonInfo.toObject(m.active_attacker,o)}if(m.highest_friendship_milestone!=null&&m.hasOwnProperty("highest_friendship_milestone")){d.highest_friendship_milestone=o.enums===String?$root.POGOProtos.Enums.FriendshipLevelMilestone[m.highest_friendship_milestone]:m.highest_friendship_milestone}return d};BattleUpdate.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BattleUpdate}();return Battle}();Data.Beluga=function(){var Beluga={};Beluga.BelugaBleCompleteTransferRequest=function(){function BelugaBleCompleteTransferRequest(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BelugaBleCompleteTransferRequest.prototype.transaction_id=$util.Long?$util.Long.fromBits(0,0,false):0;BelugaBleCompleteTransferRequest.prototype.beluga_requested_item_id=0;BelugaBleCompleteTransferRequest.prototype.nonce="";BelugaBleCompleteTransferRequest.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.transaction_id!=null&&m.hasOwnProperty("transaction_id"))w.uint32(8).int64(m.transaction_id);if(m.beluga_requested_item_id!=null&&m.hasOwnProperty("beluga_requested_item_id"))w.uint32(16).int32(m.beluga_requested_item_id);if(m.nonce!=null&&m.hasOwnProperty("nonce"))w.uint32(26).string(m.nonce);return w};BelugaBleCompleteTransferRequest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Beluga.BelugaBleCompleteTransferRequest;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.transaction_id=r.int64();break;case 2:m.beluga_requested_item_id=r.int32();break;case 3:m.nonce=r.string();break;default:r.skipType(t&7);break}}return m};BelugaBleCompleteTransferRequest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Beluga.BelugaBleCompleteTransferRequest)return d;var m=new $root.POGOProtos.Data.Beluga.BelugaBleCompleteTransferRequest;if(d.transaction_id!=null){if($util.Long)(m.transaction_id=$util.Long.fromValue(d.transaction_id)).unsigned=false;else if(typeof d.transaction_id==="string")m.transaction_id=parseInt(d.transaction_id,10);else if(typeof d.transaction_id==="number")m.transaction_id=d.transaction_id;else if(typeof d.transaction_id==="object")m.transaction_id=new $util.LongBits(d.transaction_id.low>>>0,d.transaction_id.high>>>0).toNumber()}if(d.beluga_requested_item_id!=null){m.beluga_requested_item_id=d.beluga_requested_item_id|0}if(d.nonce!=null){m.nonce=String(d.nonce)}return m};BelugaBleCompleteTransferRequest.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.transaction_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.transaction_id=o.longs===String?"0":0;d.beluga_requested_item_id=0;d.nonce=""}if(m.transaction_id!=null&&m.hasOwnProperty("transaction_id")){if(typeof m.transaction_id==="number")d.transaction_id=o.longs===String?String(m.transaction_id):m.transaction_id;else d.transaction_id=o.longs===String?$util.Long.prototype.toString.call(m.transaction_id):o.longs===Number?new $util.LongBits(m.transaction_id.low>>>0,m.transaction_id.high>>>0).toNumber():m.transaction_id}if(m.beluga_requested_item_id!=null&&m.hasOwnProperty("beluga_requested_item_id")){d.beluga_requested_item_id=m.beluga_requested_item_id}if(m.nonce!=null&&m.hasOwnProperty("nonce")){d.nonce=m.nonce}return d};BelugaBleCompleteTransferRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BelugaBleCompleteTransferRequest}();Beluga.BelugaBleFinalizeTransfer=function(){function BelugaBleFinalizeTransfer(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BelugaBleFinalizeTransfer.prototype.beluga_transfer_complete=null;BelugaBleFinalizeTransfer.prototype.server_signature=$util.newBuffer([]);BelugaBleFinalizeTransfer.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.beluga_transfer_complete!=null&&m.hasOwnProperty("beluga_transfer_complete"))$root.POGOProtos.Data.Beluga.BelugaBleTransferComplete.encode(m.beluga_transfer_complete,w.uint32(10).fork()).ldelim();if(m.server_signature!=null&&m.hasOwnProperty("server_signature"))w.uint32(18).bytes(m.server_signature);return w};BelugaBleFinalizeTransfer.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Beluga.BelugaBleFinalizeTransfer;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.beluga_transfer_complete=$root.POGOProtos.Data.Beluga.BelugaBleTransferComplete.decode(r,r.uint32());break;case 2:m.server_signature=r.bytes();break;default:r.skipType(t&7);break}}return m};BelugaBleFinalizeTransfer.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Beluga.BelugaBleFinalizeTransfer)return d;var m=new $root.POGOProtos.Data.Beluga.BelugaBleFinalizeTransfer;if(d.beluga_transfer_complete!=null){if(typeof d.beluga_transfer_complete!=="object")throw TypeError(".POGOProtos.Data.Beluga.BelugaBleFinalizeTransfer.beluga_transfer_complete: object expected");m.beluga_transfer_complete=$root.POGOProtos.Data.Beluga.BelugaBleTransferComplete.fromObject(d.beluga_transfer_complete)}if(d.server_signature!=null){if(typeof d.server_signature==="string")$util.base64.decode(d.server_signature,m.server_signature=$util.newBuffer($util.base64.length(d.server_signature)),0);else if(d.server_signature.length)m.server_signature=d.server_signature}return m};BelugaBleFinalizeTransfer.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.beluga_transfer_complete=null;if(o.bytes===String)d.server_signature="";else{d.server_signature=[];if(o.bytes!==Array)d.server_signature=$util.newBuffer(d.server_signature)}}if(m.beluga_transfer_complete!=null&&m.hasOwnProperty("beluga_transfer_complete")){d.beluga_transfer_complete=$root.POGOProtos.Data.Beluga.BelugaBleTransferComplete.toObject(m.beluga_transfer_complete,o)}if(m.server_signature!=null&&m.hasOwnProperty("server_signature")){d.server_signature=o.bytes===String?$util.base64.encode(m.server_signature,0,m.server_signature.length):o.bytes===Array?Array.prototype.slice.call(m.server_signature):m.server_signature}return d};BelugaBleFinalizeTransfer.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BelugaBleFinalizeTransfer}();Beluga.BelugaBleTransferProto=function(){function BelugaBleTransferProto(p){this.localized_origins=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BelugaBleTransferProto.prototype.server_response=null;BelugaBleTransferProto.prototype.server_signature=$util.newBuffer([]);BelugaBleTransferProto.prototype.localized_origins=$util.emptyArray;BelugaBleTransferProto.prototype.language="";BelugaBleTransferProto.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.server_response!=null&&m.hasOwnProperty("server_response"))$root.POGOProtos.Data.Beluga.BelugaBleTransferPrep.encode(m.server_response,w.uint32(10).fork()).ldelim();if(m.server_signature!=null&&m.hasOwnProperty("server_signature"))w.uint32(18).bytes(m.server_signature);if(m.localized_origins!=null&&m.localized_origins.length){for(var i=0;i<m.localized_origins.length;++i)w.uint32(26).string(m.localized_origins[i])}if(m.language!=null&&m.hasOwnProperty("language"))w.uint32(34).string(m.language);return w};BelugaBleTransferProto.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Beluga.BelugaBleTransferProto;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.server_response=$root.POGOProtos.Data.Beluga.BelugaBleTransferPrep.decode(r,r.uint32());break;case 2:m.server_signature=r.bytes();break;case 3:if(!(m.localized_origins&&m.localized_origins.length))m.localized_origins=[];m.localized_origins.push(r.string());break;case 4:m.language=r.string();break;default:r.skipType(t&7);break}}return m};BelugaBleTransferProto.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Beluga.BelugaBleTransferProto)return d;var m=new $root.POGOProtos.Data.Beluga.BelugaBleTransferProto;if(d.server_response!=null){if(typeof d.server_response!=="object")throw TypeError(".POGOProtos.Data.Beluga.BelugaBleTransferProto.server_response: object expected");m.server_response=$root.POGOProtos.Data.Beluga.BelugaBleTransferPrep.fromObject(d.server_response)}if(d.server_signature!=null){if(typeof d.server_signature==="string")$util.base64.decode(d.server_signature,m.server_signature=$util.newBuffer($util.base64.length(d.server_signature)),0);else if(d.server_signature.length)m.server_signature=d.server_signature}if(d.localized_origins){if(!Array.isArray(d.localized_origins))throw TypeError(".POGOProtos.Data.Beluga.BelugaBleTransferProto.localized_origins: array expected");m.localized_origins=[];for(var i=0;i<d.localized_origins.length;++i){m.localized_origins[i]=String(d.localized_origins[i])}}if(d.language!=null){m.language=String(d.language)}return m};BelugaBleTransferProto.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.localized_origins=[]}if(o.defaults){d.server_response=null;if(o.bytes===String)d.server_signature="";else{d.server_signature=[];if(o.bytes!==Array)d.server_signature=$util.newBuffer(d.server_signature)}d.language=""}if(m.server_response!=null&&m.hasOwnProperty("server_response")){d.server_response=$root.POGOProtos.Data.Beluga.BelugaBleTransferPrep.toObject(m.server_response,o)}if(m.server_signature!=null&&m.hasOwnProperty("server_signature")){d.server_signature=o.bytes===String?$util.base64.encode(m.server_signature,0,m.server_signature.length):o.bytes===Array?Array.prototype.slice.call(m.server_signature):m.server_signature}if(m.localized_origins&&m.localized_origins.length){d.localized_origins=[];for(var j=0;j<m.localized_origins.length;++j){d.localized_origins[j]=m.localized_origins[j]}}if(m.language!=null&&m.hasOwnProperty("language")){d.language=m.language}return d};BelugaBleTransferProto.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BelugaBleTransferProto}();Beluga.BelugaBleTransferComplete=function(){function BelugaBleTransferComplete(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BelugaBleTransferComplete.prototype.nonce="";BelugaBleTransferComplete.prototype.beluga_id="";BelugaBleTransferComplete.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.nonce!=null&&m.hasOwnProperty("nonce"))w.uint32(10).string(m.nonce);if(m.beluga_id!=null&&m.hasOwnProperty("beluga_id"))w.uint32(18).string(m.beluga_id);return w};BelugaBleTransferComplete.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Beluga.BelugaBleTransferComplete;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.nonce=r.string();break;case 2:m.beluga_id=r.string();break;default:r.skipType(t&7);break}}return m};BelugaBleTransferComplete.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Beluga.BelugaBleTransferComplete)return d;var m=new $root.POGOProtos.Data.Beluga.BelugaBleTransferComplete;if(d.nonce!=null){m.nonce=String(d.nonce)}if(d.beluga_id!=null){m.beluga_id=String(d.beluga_id)}return m};BelugaBleTransferComplete.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.nonce="";d.beluga_id=""}if(m.nonce!=null&&m.hasOwnProperty("nonce")){d.nonce=m.nonce}if(m.beluga_id!=null&&m.hasOwnProperty("beluga_id")){d.beluga_id=m.beluga_id}return d};BelugaBleTransferComplete.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BelugaBleTransferComplete}();Beluga.BelugaBleTransferPrep=function(){function BelugaBleTransferPrep(p){this.pokemon_list=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BelugaBleTransferPrep.prototype.pokemon_list=$util.emptyArray;BelugaBleTransferPrep.prototype.eligble_for_item=false;BelugaBleTransferPrep.prototype.transaction_id=$util.Long?$util.Long.fromBits(0,0,false):0;BelugaBleTransferPrep.prototype.beluga_id="";BelugaBleTransferPrep.prototype.nonce="";BelugaBleTransferPrep.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_list!=null&&m.pokemon_list.length){for(var i=0;i<m.pokemon_list.length;++i)$root.POGOProtos.Data.Beluga.BelugaPokemon.encode(m.pokemon_list[i],w.uint32(10).fork()).ldelim()}if(m.eligble_for_item!=null&&m.hasOwnProperty("eligble_for_item"))w.uint32(16).bool(m.eligble_for_item);if(m.transaction_id!=null&&m.hasOwnProperty("transaction_id"))w.uint32(24).int64(m.transaction_id);if(m.beluga_id!=null&&m.hasOwnProperty("beluga_id"))w.uint32(34).string(m.beluga_id);if(m.nonce!=null&&m.hasOwnProperty("nonce"))w.uint32(42).string(m.nonce);return w};BelugaBleTransferPrep.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Beluga.BelugaBleTransferPrep;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.pokemon_list&&m.pokemon_list.length))m.pokemon_list=[];m.pokemon_list.push($root.POGOProtos.Data.Beluga.BelugaPokemon.decode(r,r.uint32()));break;case 2:m.eligble_for_item=r.bool();break;case 3:m.transaction_id=r.int64();break;case 4:m.beluga_id=r.string();break;case 5:m.nonce=r.string();break;default:r.skipType(t&7);break}}return m};BelugaBleTransferPrep.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Beluga.BelugaBleTransferPrep)return d;var m=new $root.POGOProtos.Data.Beluga.BelugaBleTransferPrep;if(d.pokemon_list){if(!Array.isArray(d.pokemon_list))throw TypeError(".POGOProtos.Data.Beluga.BelugaBleTransferPrep.pokemon_list: array expected");m.pokemon_list=[];for(var i=0;i<d.pokemon_list.length;++i){if(typeof d.pokemon_list[i]!=="object")throw TypeError(".POGOProtos.Data.Beluga.BelugaBleTransferPrep.pokemon_list: object expected");m.pokemon_list[i]=$root.POGOProtos.Data.Beluga.BelugaPokemon.fromObject(d.pokemon_list[i])}}if(d.eligble_for_item!=null){m.eligble_for_item=Boolean(d.eligble_for_item)}if(d.transaction_id!=null){if($util.Long)(m.transaction_id=$util.Long.fromValue(d.transaction_id)).unsigned=false;else if(typeof d.transaction_id==="string")m.transaction_id=parseInt(d.transaction_id,10);else if(typeof d.transaction_id==="number")m.transaction_id=d.transaction_id;else if(typeof d.transaction_id==="object")m.transaction_id=new $util.LongBits(d.transaction_id.low>>>0,d.transaction_id.high>>>0).toNumber()}if(d.beluga_id!=null){m.beluga_id=String(d.beluga_id)}if(d.nonce!=null){m.nonce=String(d.nonce)}return m};BelugaBleTransferPrep.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.pokemon_list=[]}if(o.defaults){d.eligble_for_item=false;if($util.Long){var n=new $util.Long(0,0,false);d.transaction_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.transaction_id=o.longs===String?"0":0;d.beluga_id="";d.nonce=""}if(m.pokemon_list&&m.pokemon_list.length){d.pokemon_list=[];for(var j=0;j<m.pokemon_list.length;++j){d.pokemon_list[j]=$root.POGOProtos.Data.Beluga.BelugaPokemon.toObject(m.pokemon_list[j],o)}}if(m.eligble_for_item!=null&&m.hasOwnProperty("eligble_for_item")){d.eligble_for_item=m.eligble_for_item}if(m.transaction_id!=null&&m.hasOwnProperty("transaction_id")){if(typeof m.transaction_id==="number")d.transaction_id=o.longs===String?String(m.transaction_id):m.transaction_id;else d.transaction_id=o.longs===String?$util.Long.prototype.toString.call(m.transaction_id):o.longs===Number?new $util.LongBits(m.transaction_id.low>>>0,m.transaction_id.high>>>0).toNumber():m.transaction_id}if(m.beluga_id!=null&&m.hasOwnProperty("beluga_id")){d.beluga_id=m.beluga_id}if(m.nonce!=null&&m.hasOwnProperty("nonce")){d.nonce=m.nonce}return d};BelugaBleTransferPrep.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BelugaBleTransferPrep}();Beluga.BelugaIncenseBox=function(){function BelugaIncenseBox(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BelugaIncenseBox.prototype.is_usable=false;BelugaIncenseBox.prototype.cool_down_finished_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;BelugaIncenseBox.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.is_usable!=null&&m.hasOwnProperty("is_usable"))w.uint32(8).bool(m.is_usable);if(m.cool_down_finished_timestamp_ms!=null&&m.hasOwnProperty("cool_down_finished_timestamp_ms"))w.uint32(16).int64(m.cool_down_finished_timestamp_ms);return w};BelugaIncenseBox.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Beluga.BelugaIncenseBox;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.is_usable=r.bool();break;case 2:m.cool_down_finished_timestamp_ms=r.int64();break;default:r.skipType(t&7);break}}return m};BelugaIncenseBox.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Beluga.BelugaIncenseBox)return d;var m=new $root.POGOProtos.Data.Beluga.BelugaIncenseBox;if(d.is_usable!=null){m.is_usable=Boolean(d.is_usable)}if(d.cool_down_finished_timestamp_ms!=null){if($util.Long)(m.cool_down_finished_timestamp_ms=$util.Long.fromValue(d.cool_down_finished_timestamp_ms)).unsigned=false;else if(typeof d.cool_down_finished_timestamp_ms==="string")m.cool_down_finished_timestamp_ms=parseInt(d.cool_down_finished_timestamp_ms,10);else if(typeof d.cool_down_finished_timestamp_ms==="number")m.cool_down_finished_timestamp_ms=d.cool_down_finished_timestamp_ms;else if(typeof d.cool_down_finished_timestamp_ms==="object")m.cool_down_finished_timestamp_ms=new $util.LongBits(d.cool_down_finished_timestamp_ms.low>>>0,d.cool_down_finished_timestamp_ms.high>>>0).toNumber()}return m};BelugaIncenseBox.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.is_usable=false;if($util.Long){var n=new $util.Long(0,0,false);d.cool_down_finished_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.cool_down_finished_timestamp_ms=o.longs===String?"0":0}if(m.is_usable!=null&&m.hasOwnProperty("is_usable")){d.is_usable=m.is_usable}if(m.cool_down_finished_timestamp_ms!=null&&m.hasOwnProperty("cool_down_finished_timestamp_ms")){if(typeof m.cool_down_finished_timestamp_ms==="number")d.cool_down_finished_timestamp_ms=o.longs===String?String(m.cool_down_finished_timestamp_ms):m.cool_down_finished_timestamp_ms;else d.cool_down_finished_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.cool_down_finished_timestamp_ms):o.longs===Number?new $util.LongBits(m.cool_down_finished_timestamp_ms.low>>>0,m.cool_down_finished_timestamp_ms.high>>>0).toNumber():m.cool_down_finished_timestamp_ms}return d};BelugaIncenseBox.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BelugaIncenseBox}();Beluga.BelugaPokemon=function(){function BelugaPokemon(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BelugaPokemon.prototype.trainer_name="";BelugaPokemon.prototype.trainer_gender=0;BelugaPokemon.prototype.trainer_team=0;BelugaPokemon.prototype.trainer_level=0;BelugaPokemon.prototype.pokedex_id=0;BelugaPokemon.prototype.cp=0;BelugaPokemon.prototype.pokemon_level=0;BelugaPokemon.prototype.max_hp=0;BelugaPokemon.prototype.origin_lat=0;BelugaPokemon.prototype.origin_lng=0;BelugaPokemon.prototype.height=0;BelugaPokemon.prototype.weight=0;BelugaPokemon.prototype.individual_attack=0;BelugaPokemon.prototype.individual_defense=0;BelugaPokemon.prototype.individual_stamina=0;BelugaPokemon.prototype.creation_day=0;BelugaPokemon.prototype.creation_month=0;BelugaPokemon.prototype.creation_year=0;BelugaPokemon.prototype.nickname="";BelugaPokemon.prototype.gender=0;BelugaPokemon.prototype.costume=0;BelugaPokemon.prototype.form=0;BelugaPokemon.prototype.shiny=false;BelugaPokemon.prototype.move1=0;BelugaPokemon.prototype.move2=0;BelugaPokemon.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.trainer_name!=null&&m.hasOwnProperty("trainer_name"))w.uint32(10).string(m.trainer_name);if(m.trainer_gender!=null&&m.hasOwnProperty("trainer_gender"))w.uint32(16).int32(m.trainer_gender);if(m.trainer_team!=null&&m.hasOwnProperty("trainer_team"))w.uint32(24).int32(m.trainer_team);if(m.trainer_level!=null&&m.hasOwnProperty("trainer_level"))w.uint32(32).int32(m.trainer_level);if(m.pokedex_id!=null&&m.hasOwnProperty("pokedex_id"))w.uint32(40).int32(m.pokedex_id);if(m.cp!=null&&m.hasOwnProperty("cp"))w.uint32(48).int32(m.cp);if(m.pokemon_level!=null&&m.hasOwnProperty("pokemon_level"))w.uint32(61).float(m.pokemon_level);if(m.max_hp!=null&&m.hasOwnProperty("max_hp"))w.uint32(64).int32(m.max_hp);if(m.origin_lat!=null&&m.hasOwnProperty("origin_lat"))w.uint32(73).double(m.origin_lat);if(m.origin_lng!=null&&m.hasOwnProperty("origin_lng"))w.uint32(81).double(m.origin_lng);if(m.height!=null&&m.hasOwnProperty("height"))w.uint32(93).float(m.height);if(m.weight!=null&&m.hasOwnProperty("weight"))w.uint32(101).float(m.weight);if(m.individual_attack!=null&&m.hasOwnProperty("individual_attack"))w.uint32(104).int32(m.individual_attack);if(m.individual_defense!=null&&m.hasOwnProperty("individual_defense"))w.uint32(112).int32(m.individual_defense);if(m.individual_stamina!=null&&m.hasOwnProperty("individual_stamina"))w.uint32(120).int32(m.individual_stamina);if(m.creation_day!=null&&m.hasOwnProperty("creation_day"))w.uint32(128).int32(m.creation_day);if(m.creation_month!=null&&m.hasOwnProperty("creation_month"))w.uint32(136).int32(m.creation_month);if(m.creation_year!=null&&m.hasOwnProperty("creation_year"))w.uint32(144).int32(m.creation_year);if(m.nickname!=null&&m.hasOwnProperty("nickname"))w.uint32(154).string(m.nickname);if(m.gender!=null&&m.hasOwnProperty("gender"))w.uint32(160).int32(m.gender);if(m.costume!=null&&m.hasOwnProperty("costume"))w.uint32(168).int32(m.costume);if(m.form!=null&&m.hasOwnProperty("form"))w.uint32(176).int32(m.form);if(m.shiny!=null&&m.hasOwnProperty("shiny"))w.uint32(184).bool(m.shiny);if(m.move1!=null&&m.hasOwnProperty("move1"))w.uint32(192).int32(m.move1);if(m.move2!=null&&m.hasOwnProperty("move2"))w.uint32(200).int32(m.move2);return w};BelugaPokemon.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Beluga.BelugaPokemon;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.trainer_name=r.string();break;case 2:m.trainer_gender=r.int32();break;case 3:m.trainer_team=r.int32();break;case 4:m.trainer_level=r.int32();break;case 5:m.pokedex_id=r.int32();break;case 6:m.cp=r.int32();break;case 7:m.pokemon_level=r.float();break;case 8:m.max_hp=r.int32();break;case 9:m.origin_lat=r.double();break;case 10:m.origin_lng=r.double();break;case 11:m.height=r.float();break;case 12:m.weight=r.float();break;case 13:m.individual_attack=r.int32();break;case 14:m.individual_defense=r.int32();break;case 15:m.individual_stamina=r.int32();break;case 16:m.creation_day=r.int32();break;case 17:m.creation_month=r.int32();break;case 18:m.creation_year=r.int32();break;case 19:m.nickname=r.string();break;case 20:m.gender=r.int32();break;case 21:m.costume=r.int32();break;case 22:m.form=r.int32();break;case 23:m.shiny=r.bool();break;case 24:m.move1=r.int32();break;case 25:m.move2=r.int32();break;default:r.skipType(t&7);break}}return m};BelugaPokemon.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Beluga.BelugaPokemon)return d;var m=new $root.POGOProtos.Data.Beluga.BelugaPokemon;if(d.trainer_name!=null){m.trainer_name=String(d.trainer_name)}switch(d.trainer_gender){case"TRAINER_MALE":case 0:m.trainer_gender=0;break;case"TRAINER_FEMALE":case 1:m.trainer_gender=1;break}switch(d.trainer_team){case"NEUTRAL":case 0:m.trainer_team=0;break;case"BLUE":case 1:m.trainer_team=1;break;case"RED":case 2:m.trainer_team=2;break;case"YELLOW":case 3:m.trainer_team=3;break}if(d.trainer_level!=null){m.trainer_level=d.trainer_level|0}if(d.pokedex_id!=null){m.pokedex_id=d.pokedex_id|0}if(d.cp!=null){m.cp=d.cp|0}if(d.pokemon_level!=null){m.pokemon_level=Number(d.pokemon_level)}if(d.max_hp!=null){m.max_hp=d.max_hp|0}if(d.origin_lat!=null){m.origin_lat=Number(d.origin_lat)}if(d.origin_lng!=null){m.origin_lng=Number(d.origin_lng)}if(d.height!=null){m.height=Number(d.height)}if(d.weight!=null){m.weight=Number(d.weight)}if(d.individual_attack!=null){m.individual_attack=d.individual_attack|0}if(d.individual_defense!=null){m.individual_defense=d.individual_defense|0}if(d.individual_stamina!=null){m.individual_stamina=d.individual_stamina|0}if(d.creation_day!=null){m.creation_day=d.creation_day|0}if(d.creation_month!=null){m.creation_month=d.creation_month|0}if(d.creation_year!=null){m.creation_year=d.creation_year|0}if(d.nickname!=null){m.nickname=String(d.nickname)}switch(d.gender){case"GENDER_UNSET":case 0:m.gender=0;break;case"MALE":case 1:m.gender=1;break;case"FEMALE":case 2:m.gender=2;break;case"GENDERLESS":case 3:m.gender=3;break}switch(d.costume){case"COSTUME_UNSET":case 0:m.costume=0;break;case"HOLIDAY_2016":case 1:m.costume=1;break;case"ANNIVERSARY":case 2:m.costume=2;break;case"ONE_YEAR_ANNIVERSARY":case 3:m.costume=3;break;case"HALLOWEEN_2017":case 4:m.costume=4;break;case"SUMMER_2018":case 5:m.costume=5;break;case"FALL_2018":case 6:m.costume=6;break;case"NOVEMBER_2018":case 7:m.costume=7;break;case"WINTER_2018":case 8:m.costume=8;break}switch(d.form){case"FORM_UNSET":case 0:m.form=0;break;case"ALOLA":case 1:m.form=1;break}if(d.shiny!=null){m.shiny=Boolean(d.shiny)}switch(d.move1){case"MOVE_UNSET":case 0:m.move1=0;break;case"THUNDER_SHOCK":case 1:m.move1=1;break;case"QUICK_ATTACK":case 2:m.move1=2;break;case"SCRATCH":case 3:m.move1=3;break;case"EMBER":case 4:m.move1=4;break;case"VINE_WHIP":case 5:m.move1=5;break;case"TACKLE":case 6:m.move1=6;break;case"RAZOR_LEAF":case 7:m.move1=7;break;case"TAKE_DOWN":case 8:m.move1=8;break;case"WATER_GUN":case 9:m.move1=9;break;case"BITE":case 10:m.move1=10;break;case"POUND":case 11:m.move1=11;break;case"DOUBLE_SLAP":case 12:m.move1=12;break;case"WRAP":case 13:m.move1=13;break;case"HYPER_BEAM":case 14:m.move1=14;break;case"LICK":case 15:m.move1=15;break;case"DARK_PULSE":case 16:m.move1=16;break;case"SMOG":case 17:m.move1=17;break;case"SLUDGE":case 18:m.move1=18;break;case"METAL_CLAW":case 19:m.move1=19;break;case"VICE_GRIP":case 20:m.move1=20;break;case"FLAME_WHEEL":case 21:m.move1=21;break;case"MEGAHORN":case 22:m.move1=22;break;case"WING_ATTACK":case 23:m.move1=23;break;case"FLAMETHROWER":case 24:m.move1=24;break;case"SUCKER_PUNCH":case 25:m.move1=25;break;case"DIG":case 26:m.move1=26;break;case"LOW_KICK":case 27:m.move1=27;break;case"CROSS_CHOP":case 28:m.move1=28;break;case"PSYCHO_CUT":case 29:m.move1=29;break;case"PSYBEAM":case 30:m.move1=30;break;case"EARTHQUAKE":case 31:m.move1=31;break;case"STONE_EDGE":case 32:m.move1=32;break;case"ICE_PUNCH":case 33:m.move1=33;break;case"HEART_STAMP":case 34:m.move1=34;break;case"DISCHARGE":case 35:m.move1=35;break;case"FLASH_CANNON":case 36:m.move1=36;break;case"PECK":case 37:m.move1=37;break;case"DRILL_PECK":case 38:m.move1=38;break;case"ICE_BEAM":case 39:m.move1=39;break;case"BLIZZARD":case 40:m.move1=40;break;case"AIR_SLASH":case 41:m.move1=41;break;case"HEAT_WAVE":case 42:m.move1=42;break;case"TWINEEDLE":case 43:m.move1=43;break;case"POISON_JAB":case 44:m.move1=44;break;case"AERIAL_ACE":case 45:m.move1=45;break;case"DRILL_RUN":case 46:m.move1=46;break;case"PETAL_BLIZZARD":case 47:m.move1=47;break;case"MEGA_DRAIN":case 48:m.move1=48;break;case"BUG_BUZZ":case 49:m.move1=49;break;case"POISON_FANG":case 50:m.move1=50;break;case"NIGHT_SLASH":case 51:m.move1=51;break;case"SLASH":case 52:m.move1=52;break;case"BUBBLE_BEAM":case 53:m.move1=53;break;case"SUBMISSION":case 54:m.move1=54;break;case"KARATE_CHOP":case 55:m.move1=55;break;case"LOW_SWEEP":case 56:m.move1=56;break;case"AQUA_JET":case 57:m.move1=57;break;case"AQUA_TAIL":case 58:m.move1=58;break;case"SEED_BOMB":case 59:m.move1=59;break;case"PSYSHOCK":case 60:m.move1=60;break;case"ROCK_THROW":case 61:m.move1=61;break;case"ANCIENT_POWER":case 62:m.move1=62;break;case"ROCK_TOMB":case 63:m.move1=63;break;case"ROCK_SLIDE":case 64:m.move1=64;break;case"POWER_GEM":case 65:m.move1=65;break;case"SHADOW_SNEAK":case 66:m.move1=66;break;case"SHADOW_PUNCH":case 67:m.move1=67;break;case"SHADOW_CLAW":case 68:m.move1=68;break;case"OMINOUS_WIND":case 69:m.move1=69;break;case"SHADOW_BALL":case 70:m.move1=70;break;case"BULLET_PUNCH":case 71:m.move1=71;break;case"MAGNET_BOMB":case 72:m.move1=72;break;case"STEEL_WING":case 73:m.move1=73;break;case"IRON_HEAD":case 74:m.move1=74;break;case"PARABOLIC_CHARGE":case 75:m.move1=75;break;case"SPARK":case 76:m.move1=76;break;case"THUNDER_PUNCH":case 77:m.move1=77;break;case"THUNDER":case 78:m.move1=78;break;case"THUNDERBOLT":case 79:m.move1=79;break;case"TWISTER":case 80:m.move1=80;break;case"DRAGON_BREATH":case 81:m.move1=81;break;case"DRAGON_PULSE":case 82:m.move1=82;break;case"DRAGON_CLAW":case 83:m.move1=83;break;case"DISARMING_VOICE":case 84:m.move1=84;break;case"DRAINING_KISS":case 85:m.move1=85;break;case"DAZZLING_GLEAM":case 86:m.move1=86;break;case"MOONBLAST":case 87:m.move1=87;break;case"PLAY_ROUGH":case 88:m.move1=88;break;case"CROSS_POISON":case 89:m.move1=89;break;case"SLUDGE_BOMB":case 90:m.move1=90;break;case"SLUDGE_WAVE":case 91:m.move1=91;break;case"GUNK_SHOT":case 92:m.move1=92;break;case"MUD_SHOT":case 93:m.move1=93;break;case"BONE_CLUB":case 94:m.move1=94;break;case"BULLDOZE":case 95:m.move1=95;break;case"MUD_BOMB":case 96:m.move1=96;break;case"FURY_CUTTER":case 97:m.move1=97;break;case"BUG_BITE":case 98:m.move1=98;break;case"SIGNAL_BEAM":case 99:m.move1=99;break;case"X_SCISSOR":case 100:m.move1=100;break;case"FLAME_CHARGE":case 101:m.move1=101;break;case"FLAME_BURST":case 102:m.move1=102;break;case"FIRE_BLAST":case 103:m.move1=103;break;case"BRINE":case 104:m.move1=104;break;case"WATER_PULSE":case 105:m.move1=105;break;case"SCALD":case 106:m.move1=106;break;case"HYDRO_PUMP":case 107:m.move1=107;break;case"PSYCHIC":case 108:m.move1=108;break;case"PSYSTRIKE":case 109:m.move1=109;break;case"ICE_SHARD":case 110:m.move1=110;break;case"ICY_WIND":case 111:m.move1=111;break;case"FROST_BREATH":case 112:m.move1=112;break;case"ABSORB":case 113:m.move1=113;break;case"GIGA_DRAIN":case 114:m.move1=114;break;case"FIRE_PUNCH":case 115:m.move1=115;break;case"SOLAR_BEAM":case 116:m.move1=116;break;case"LEAF_BLADE":case 117:m.move1=117;break;case"POWER_WHIP":case 118:m.move1=118;break;case"SPLASH":case 119:m.move1=119;break;case"ACID":case 120:m.move1=120;break;case"AIR_CUTTER":case 121:m.move1=121;break;case"HURRICANE":case 122:m.move1=122;break;case"BRICK_BREAK":case 123:m.move1=123;break;case"CUT":case 124:m.move1=124;break;case"SWIFT":case 125:m.move1=125;break;case"HORN_ATTACK":case 126:m.move1=126;break;case"STOMP":case 127:m.move1=127;break;case"HEADBUTT":case 128:m.move1=128;break;case"HYPER_FANG":case 129:m.move1=129;break;case"SLAM":case 130:m.move1=130;break;case"BODY_SLAM":case 131:m.move1=131;break;case"REST":case 132:m.move1=132;break;case"STRUGGLE":case 133:m.move1=133;break;case"SCALD_BLASTOISE":case 134:m.move1=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.move1=135;break;case"WRAP_GREEN":case 136:m.move1=136;break;case"WRAP_PINK":case 137:m.move1=137;break;case"FURY_CUTTER_FAST":case 200:m.move1=200;break;case"BUG_BITE_FAST":case 201:m.move1=201;break;case"BITE_FAST":case 202:m.move1=202;break;case"SUCKER_PUNCH_FAST":case 203:m.move1=203;break;case"DRAGON_BREATH_FAST":case 204:m.move1=204;break;case"THUNDER_SHOCK_FAST":case 205:m.move1=205;break;case"SPARK_FAST":case 206:m.move1=206;break;case"LOW_KICK_FAST":case 207:m.move1=207;break;case"KARATE_CHOP_FAST":case 208:m.move1=208;break;case"EMBER_FAST":case 209:m.move1=209;break;case"WING_ATTACK_FAST":case 210:m.move1=210;break;case"PECK_FAST":case 211:m.move1=211;break;case"LICK_FAST":case 212:m.move1=212;break;case"SHADOW_CLAW_FAST":case 213:m.move1=213;break;case"VINE_WHIP_FAST":case 214:m.move1=214;break;case"RAZOR_LEAF_FAST":case 215:m.move1=215;break;case"MUD_SHOT_FAST":case 216:m.move1=216;break;case"ICE_SHARD_FAST":case 217:m.move1=217;break;case"FROST_BREATH_FAST":case 218:m.move1=218;break;case"QUICK_ATTACK_FAST":case 219:m.move1=219;break;case"SCRATCH_FAST":case 220:m.move1=220;break;case"TACKLE_FAST":case 221:m.move1=221;break;case"POUND_FAST":case 222:m.move1=222;break;case"CUT_FAST":case 223:m.move1=223;break;case"POISON_JAB_FAST":case 224:m.move1=224;break;case"ACID_FAST":case 225:m.move1=225;break;case"PSYCHO_CUT_FAST":case 226:m.move1=226;break;case"ROCK_THROW_FAST":case 227:m.move1=227;break;case"METAL_CLAW_FAST":case 228:m.move1=228;break;case"BULLET_PUNCH_FAST":case 229:m.move1=229;break;case"WATER_GUN_FAST":case 230:m.move1=230;break;case"SPLASH_FAST":case 231:m.move1=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.move1=232;break;case"MUD_SLAP_FAST":case 233:m.move1=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.move1=234;break;case"CONFUSION_FAST":case 235:m.move1=235;break;case"POISON_STING_FAST":case 236:m.move1=236;break;case"BUBBLE_FAST":case 237:m.move1=237;break;case"FEINT_ATTACK_FAST":case 238:m.move1=238;break;case"STEEL_WING_FAST":case 239:m.move1=239;break;case"FIRE_FANG_FAST":case 240:m.move1=240;break;case"ROCK_SMASH_FAST":case 241:m.move1=241;break;case"TRANSFORM_FAST":case 242:m.move1=242;break;case"COUNTER_FAST":case 243:m.move1=243;break;case"POWDER_SNOW_FAST":case 244:m.move1=244;break;case"CLOSE_COMBAT":case 245:m.move1=245;break;case"DYNAMIC_PUNCH":case 246:m.move1=246;break;case"FOCUS_BLAST":case 247:m.move1=247;break;case"AURORA_BEAM":case 248:m.move1=248;break;case"CHARGE_BEAM_FAST":case 249:m.move1=249;break;case"VOLT_SWITCH_FAST":case 250:m.move1=250;break;case"WILD_CHARGE":case 251:m.move1=251;break;case"ZAP_CANNON":case 252:m.move1=252;break;case"DRAGON_TAIL_FAST":case 253:m.move1=253;break;case"AVALANCHE":case 254:m.move1=254;break;case"AIR_SLASH_FAST":case 255:m.move1=255;break;case"BRAVE_BIRD":case 256:m.move1=256;break;case"SKY_ATTACK":case 257:m.move1=257;break;case"SAND_TOMB":case 258:m.move1=258;break;case"ROCK_BLAST":case 259:m.move1=259;break;case"INFESTATION_FAST":case 260:m.move1=260;break;case"STRUGGLE_BUG_FAST":case 261:m.move1=261;break;case"SILVER_WIND":case 262:m.move1=262;break;case"ASTONISH_FAST":case 263:m.move1=263;break;case"HEX_FAST":case 264:m.move1=264;break;case"NIGHT_SHADE":case 265:m.move1=265;break;case"IRON_TAIL_FAST":case 266:m.move1=266;break;case"GYRO_BALL":case 267:m.move1=267;break;case"HEAVY_SLAM":case 268:m.move1=268;break;case"FIRE_SPIN_FAST":case 269:m.move1=269;break;case"OVERHEAT":case 270:m.move1=270;break;case"BULLET_SEED_FAST":case 271:m.move1=271;break;case"GRASS_KNOT":case 272:m.move1=272;break;case"ENERGY_BALL":case 273:m.move1=273;break;case"EXTRASENSORY_FAST":case 274:m.move1=274;break;case"FUTURESIGHT":case 275:m.move1=275;break;case"MIRROR_COAT":case 276:m.move1=276;break;case"OUTRAGE":case 277:m.move1=277;break;case"SNARL_FAST":case 278:m.move1=278;break;case"CRUNCH":case 279:m.move1=279;break;case"FOUL_PLAY":case 280:m.move1=280;break;case"HIDDEN_POWER_FAST":case 281:m.move1=281;break;case"TAKE_DOWN_FAST":case 282:m.move1=282;break;case"WATERFALL_FAST":case 283:m.move1=283;break;case"SURF":case 284:m.move1=284;break;case"DRACO_METEOR":case 285:m.move1=285;break;case"DOOM_DESIRE":case 286:m.move1=286;break;case"YAWN_FAST":case 287:m.move1=287;break;case"PSYCHO_BOOST":case 288:m.move1=288;break;case"ORIGIN_PULSE":case 289:m.move1=289;break;case"PRECIPICE_BLADES":case 290:m.move1=290;break;case"PRESENT_FAST":case 291:m.move1=291;break;case"WEATHER_BALL_FIRE":case 292:m.move1=292;break;case"WEATHER_BALL_ICE":case 293:m.move1=293;break;case"WEATHER_BALL_ROCK":case 294:m.move1=294;break;case"WEATHER_BALL_WATER":case 295:m.move1=295;break;case"FRENZY_PLANT":case 296:m.move1=296;break;case"SMACK_DOWN_FAST":case 297:m.move1=297;break;case"BLAST_BURN":case 298:m.move1=298;break;case"HYDRO_CANNON":case 299:m.move1=299;break;case"LAST_RESORT":case 300:m.move1=300;break;case"METEOR_MASH":case 301:m.move1=301;break;case"SKULL_BASH":case 302:m.move1=302;break;case"ACID_SPRAY":case 303:m.move1=303;break;case"EARTH_POWER":case 304:m.move1=304;break;case"CRABHAMMER":case 305:m.move1=305;break;case"LUNGE":case 306:m.move1=306;break;case"CRUSH_CLAW":case 307:m.move1=307;break;case"OCTAZOOKA":case 308:m.move1=308;break;case"MIRROR_SHOT":case 309:m.move1=309;break;case"SUPER_POWER":case 310:m.move1=310;break;case"FELL_STINGER":case 311:m.move1=311;break;case"LEAF_TORNADO":case 312:m.move1=312;break;case"LEECH_LIFE":case 313:m.move1=313;break;case"DRAIN_PUNCH":case 314:m.move1=314;break;case"SHADOW_BONE":case 315:m.move1=315;break;case"MUDDY_WATER":case 316:m.move1=316;break;case"BLAZE_KICK":case 317:m.move1=317;break;case"RAZOR_SHELL":case 318:m.move1=318;break;case"POWER_UP_PUNCH":case 319:m.move1=319;break}switch(d.move2){case"MOVE_UNSET":case 0:m.move2=0;break;case"THUNDER_SHOCK":case 1:m.move2=1;break;case"QUICK_ATTACK":case 2:m.move2=2;break;case"SCRATCH":case 3:m.move2=3;break;case"EMBER":case 4:m.move2=4;break;case"VINE_WHIP":case 5:m.move2=5;break;case"TACKLE":case 6:m.move2=6;break;case"RAZOR_LEAF":case 7:m.move2=7;break;case"TAKE_DOWN":case 8:m.move2=8;break;case"WATER_GUN":case 9:m.move2=9;break;case"BITE":case 10:m.move2=10;break;case"POUND":case 11:m.move2=11;break;case"DOUBLE_SLAP":case 12:m.move2=12;break;case"WRAP":case 13:m.move2=13;break;case"HYPER_BEAM":case 14:m.move2=14;break;case"LICK":case 15:m.move2=15;break;case"DARK_PULSE":case 16:m.move2=16;break;case"SMOG":case 17:m.move2=17;break;case"SLUDGE":case 18:m.move2=18;break;case"METAL_CLAW":case 19:m.move2=19;break;case"VICE_GRIP":case 20:m.move2=20;break;case"FLAME_WHEEL":case 21:m.move2=21;break;case"MEGAHORN":case 22:m.move2=22;break;case"WING_ATTACK":case 23:m.move2=23;break;case"FLAMETHROWER":case 24:m.move2=24;break;case"SUCKER_PUNCH":case 25:m.move2=25;break;case"DIG":case 26:m.move2=26;break;case"LOW_KICK":case 27:m.move2=27;break;case"CROSS_CHOP":case 28:m.move2=28;break;case"PSYCHO_CUT":case 29:m.move2=29;break;case"PSYBEAM":case 30:m.move2=30;break;case"EARTHQUAKE":case 31:m.move2=31;break;case"STONE_EDGE":case 32:m.move2=32;break;case"ICE_PUNCH":case 33:m.move2=33;break;case"HEART_STAMP":case 34:m.move2=34;break;case"DISCHARGE":case 35:m.move2=35;break;case"FLASH_CANNON":case 36:m.move2=36;break;case"PECK":case 37:m.move2=37;break;case"DRILL_PECK":case 38:m.move2=38;break;case"ICE_BEAM":case 39:m.move2=39;break;case"BLIZZARD":case 40:m.move2=40;break;case"AIR_SLASH":case 41:m.move2=41;break;case"HEAT_WAVE":case 42:m.move2=42;break;case"TWINEEDLE":case 43:m.move2=43;break;case"POISON_JAB":case 44:m.move2=44;break;case"AERIAL_ACE":case 45:m.move2=45;break;case"DRILL_RUN":case 46:m.move2=46;break;case"PETAL_BLIZZARD":case 47:m.move2=47;break;case"MEGA_DRAIN":case 48:m.move2=48;break;case"BUG_BUZZ":case 49:m.move2=49;break;case"POISON_FANG":case 50:m.move2=50;break;case"NIGHT_SLASH":case 51:m.move2=51;break;case"SLASH":case 52:m.move2=52;break;case"BUBBLE_BEAM":case 53:m.move2=53;break;case"SUBMISSION":case 54:m.move2=54;break;case"KARATE_CHOP":case 55:m.move2=55;break;case"LOW_SWEEP":case 56:m.move2=56;break;case"AQUA_JET":case 57:m.move2=57;break;case"AQUA_TAIL":case 58:m.move2=58;break;case"SEED_BOMB":case 59:m.move2=59;break;case"PSYSHOCK":case 60:m.move2=60;break;case"ROCK_THROW":case 61:m.move2=61;break;case"ANCIENT_POWER":case 62:m.move2=62;break;case"ROCK_TOMB":case 63:m.move2=63;break;case"ROCK_SLIDE":case 64:m.move2=64;break;case"POWER_GEM":case 65:m.move2=65;break;case"SHADOW_SNEAK":case 66:m.move2=66;break;case"SHADOW_PUNCH":case 67:m.move2=67;break;case"SHADOW_CLAW":case 68:m.move2=68;break;case"OMINOUS_WIND":case 69:m.move2=69;break;case"SHADOW_BALL":case 70:m.move2=70;break;case"BULLET_PUNCH":case 71:m.move2=71;break;case"MAGNET_BOMB":case 72:m.move2=72;break;case"STEEL_WING":case 73:m.move2=73;break;case"IRON_HEAD":case 74:m.move2=74;break;case"PARABOLIC_CHARGE":case 75:m.move2=75;break;case"SPARK":case 76:m.move2=76;break;case"THUNDER_PUNCH":case 77:m.move2=77;break;case"THUNDER":case 78:m.move2=78;break;case"THUNDERBOLT":case 79:m.move2=79;break;case"TWISTER":case 80:m.move2=80;break;case"DRAGON_BREATH":case 81:m.move2=81;break;case"DRAGON_PULSE":case 82:m.move2=82;break;case"DRAGON_CLAW":case 83:m.move2=83;break;case"DISARMING_VOICE":case 84:m.move2=84;break;case"DRAINING_KISS":case 85:m.move2=85;break;case"DAZZLING_GLEAM":case 86:m.move2=86;break;case"MOONBLAST":case 87:m.move2=87;break;case"PLAY_ROUGH":case 88:m.move2=88;break;case"CROSS_POISON":case 89:m.move2=89;break;case"SLUDGE_BOMB":case 90:m.move2=90;break;case"SLUDGE_WAVE":case 91:m.move2=91;break;case"GUNK_SHOT":case 92:m.move2=92;break;case"MUD_SHOT":case 93:m.move2=93;break;case"BONE_CLUB":case 94:m.move2=94;break;case"BULLDOZE":case 95:m.move2=95;break;case"MUD_BOMB":case 96:m.move2=96;break;case"FURY_CUTTER":case 97:m.move2=97;break;case"BUG_BITE":case 98:m.move2=98;break;case"SIGNAL_BEAM":case 99:m.move2=99;break;case"X_SCISSOR":case 100:m.move2=100;break;case"FLAME_CHARGE":case 101:m.move2=101;break;case"FLAME_BURST":case 102:m.move2=102;break;case"FIRE_BLAST":case 103:m.move2=103;break;case"BRINE":case 104:m.move2=104;break;case"WATER_PULSE":case 105:m.move2=105;break;case"SCALD":case 106:m.move2=106;break;case"HYDRO_PUMP":case 107:m.move2=107;break;case"PSYCHIC":case 108:m.move2=108;break;case"PSYSTRIKE":case 109:m.move2=109;break;case"ICE_SHARD":case 110:m.move2=110;break;case"ICY_WIND":case 111:m.move2=111;break;case"FROST_BREATH":case 112:m.move2=112;break;case"ABSORB":case 113:m.move2=113;break;case"GIGA_DRAIN":case 114:m.move2=114;break;case"FIRE_PUNCH":case 115:m.move2=115;break;case"SOLAR_BEAM":case 116:m.move2=116;break;case"LEAF_BLADE":case 117:m.move2=117;break;case"POWER_WHIP":case 118:m.move2=118;break;case"SPLASH":case 119:m.move2=119;break;case"ACID":case 120:m.move2=120;break;case"AIR_CUTTER":case 121:m.move2=121;break;case"HURRICANE":case 122:m.move2=122;break;case"BRICK_BREAK":case 123:m.move2=123;break;case"CUT":case 124:m.move2=124;break;case"SWIFT":case 125:m.move2=125;break;case"HORN_ATTACK":case 126:m.move2=126;break;case"STOMP":case 127:m.move2=127;break;case"HEADBUTT":case 128:m.move2=128;break;case"HYPER_FANG":case 129:m.move2=129;break;case"SLAM":case 130:m.move2=130;break;case"BODY_SLAM":case 131:m.move2=131;break;case"REST":case 132:m.move2=132;break;case"STRUGGLE":case 133:m.move2=133;break;case"SCALD_BLASTOISE":case 134:m.move2=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.move2=135;break;case"WRAP_GREEN":case 136:m.move2=136;break;case"WRAP_PINK":case 137:m.move2=137;break;case"FURY_CUTTER_FAST":case 200:m.move2=200;break;case"BUG_BITE_FAST":case 201:m.move2=201;break;case"BITE_FAST":case 202:m.move2=202;break;case"SUCKER_PUNCH_FAST":case 203:m.move2=203;break;case"DRAGON_BREATH_FAST":case 204:m.move2=204;break;case"THUNDER_SHOCK_FAST":case 205:m.move2=205;break;case"SPARK_FAST":case 206:m.move2=206;break;case"LOW_KICK_FAST":case 207:m.move2=207;break;case"KARATE_CHOP_FAST":case 208:m.move2=208;break;case"EMBER_FAST":case 209:m.move2=209;break;case"WING_ATTACK_FAST":case 210:m.move2=210;break;case"PECK_FAST":case 211:m.move2=211;break;case"LICK_FAST":case 212:m.move2=212;break;case"SHADOW_CLAW_FAST":case 213:m.move2=213;break;case"VINE_WHIP_FAST":case 214:m.move2=214;break;case"RAZOR_LEAF_FAST":case 215:m.move2=215;break;case"MUD_SHOT_FAST":case 216:m.move2=216;break;case"ICE_SHARD_FAST":case 217:m.move2=217;break;case"FROST_BREATH_FAST":case 218:m.move2=218;break;case"QUICK_ATTACK_FAST":case 219:m.move2=219;break;case"SCRATCH_FAST":case 220:m.move2=220;break;case"TACKLE_FAST":case 221:m.move2=221;break;case"POUND_FAST":case 222:m.move2=222;break;case"CUT_FAST":case 223:m.move2=223;break;case"POISON_JAB_FAST":case 224:m.move2=224;break;case"ACID_FAST":case 225:m.move2=225;break;case"PSYCHO_CUT_FAST":case 226:m.move2=226;break;case"ROCK_THROW_FAST":case 227:m.move2=227;break;case"METAL_CLAW_FAST":case 228:m.move2=228;break;case"BULLET_PUNCH_FAST":case 229:m.move2=229;break;case"WATER_GUN_FAST":case 230:m.move2=230;break;case"SPLASH_FAST":case 231:m.move2=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.move2=232;break;case"MUD_SLAP_FAST":case 233:m.move2=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.move2=234;break;case"CONFUSION_FAST":case 235:m.move2=235;break;case"POISON_STING_FAST":case 236:m.move2=236;break;case"BUBBLE_FAST":case 237:m.move2=237;break;case"FEINT_ATTACK_FAST":case 238:m.move2=238;break;case"STEEL_WING_FAST":case 239:m.move2=239;break;case"FIRE_FANG_FAST":case 240:m.move2=240;break;case"ROCK_SMASH_FAST":case 241:m.move2=241;break;case"TRANSFORM_FAST":case 242:m.move2=242;break;case"COUNTER_FAST":case 243:m.move2=243;break;case"POWDER_SNOW_FAST":case 244:m.move2=244;break;case"CLOSE_COMBAT":case 245:m.move2=245;break;case"DYNAMIC_PUNCH":case 246:m.move2=246;break;case"FOCUS_BLAST":case 247:m.move2=247;break;case"AURORA_BEAM":case 248:m.move2=248;break;case"CHARGE_BEAM_FAST":case 249:m.move2=249;break;case"VOLT_SWITCH_FAST":case 250:m.move2=250;break;case"WILD_CHARGE":case 251:m.move2=251;break;case"ZAP_CANNON":case 252:m.move2=252;break;case"DRAGON_TAIL_FAST":case 253:m.move2=253;break;case"AVALANCHE":case 254:m.move2=254;break;case"AIR_SLASH_FAST":case 255:m.move2=255;break;case"BRAVE_BIRD":case 256:m.move2=256;break;case"SKY_ATTACK":case 257:m.move2=257;break;case"SAND_TOMB":case 258:m.move2=258;break;case"ROCK_BLAST":case 259:m.move2=259;break;case"INFESTATION_FAST":case 260:m.move2=260;break;case"STRUGGLE_BUG_FAST":case 261:m.move2=261;break;case"SILVER_WIND":case 262:m.move2=262;break;case"ASTONISH_FAST":case 263:m.move2=263;break;case"HEX_FAST":case 264:m.move2=264;break;case"NIGHT_SHADE":case 265:m.move2=265;break;case"IRON_TAIL_FAST":case 266:m.move2=266;break;case"GYRO_BALL":case 267:m.move2=267;break;case"HEAVY_SLAM":case 268:m.move2=268;break;case"FIRE_SPIN_FAST":case 269:m.move2=269;break;case"OVERHEAT":case 270:m.move2=270;break;case"BULLET_SEED_FAST":case 271:m.move2=271;break;case"GRASS_KNOT":case 272:m.move2=272;break;case"ENERGY_BALL":case 273:m.move2=273;break;case"EXTRASENSORY_FAST":case 274:m.move2=274;break;case"FUTURESIGHT":case 275:m.move2=275;break;case"MIRROR_COAT":case 276:m.move2=276;break;case"OUTRAGE":case 277:m.move2=277;break;case"SNARL_FAST":case 278:m.move2=278;break;case"CRUNCH":case 279:m.move2=279;break;case"FOUL_PLAY":case 280:m.move2=280;break;case"HIDDEN_POWER_FAST":case 281:m.move2=281;break;case"TAKE_DOWN_FAST":case 282:m.move2=282;break;case"WATERFALL_FAST":case 283:m.move2=283;break;case"SURF":case 284:m.move2=284;break;case"DRACO_METEOR":case 285:m.move2=285;break;case"DOOM_DESIRE":case 286:m.move2=286;break;case"YAWN_FAST":case 287:m.move2=287;break;case"PSYCHO_BOOST":case 288:m.move2=288;break;case"ORIGIN_PULSE":case 289:m.move2=289;break;case"PRECIPICE_BLADES":case 290:m.move2=290;break;case"PRESENT_FAST":case 291:m.move2=291;break;case"WEATHER_BALL_FIRE":case 292:m.move2=292;break;case"WEATHER_BALL_ICE":case 293:m.move2=293;break;case"WEATHER_BALL_ROCK":case 294:m.move2=294;break;case"WEATHER_BALL_WATER":case 295:m.move2=295;break;case"FRENZY_PLANT":case 296:m.move2=296;break;case"SMACK_DOWN_FAST":case 297:m.move2=297;break;case"BLAST_BURN":case 298:m.move2=298;break;case"HYDRO_CANNON":case 299:m.move2=299;break;case"LAST_RESORT":case 300:m.move2=300;break;case"METEOR_MASH":case 301:m.move2=301;break;case"SKULL_BASH":case 302:m.move2=302;break;case"ACID_SPRAY":case 303:m.move2=303;break;case"EARTH_POWER":case 304:m.move2=304;break;case"CRABHAMMER":case 305:m.move2=305;break;case"LUNGE":case 306:m.move2=306;break;case"CRUSH_CLAW":case 307:m.move2=307;break;case"OCTAZOOKA":case 308:m.move2=308;break;case"MIRROR_SHOT":case 309:m.move2=309;break;case"SUPER_POWER":case 310:m.move2=310;break;case"FELL_STINGER":case 311:m.move2=311;break;case"LEAF_TORNADO":case 312:m.move2=312;break;case"LEECH_LIFE":case 313:m.move2=313;break;case"DRAIN_PUNCH":case 314:m.move2=314;break;case"SHADOW_BONE":case 315:m.move2=315;break;case"MUDDY_WATER":case 316:m.move2=316;break;case"BLAZE_KICK":case 317:m.move2=317;break;case"RAZOR_SHELL":case 318:m.move2=318;break;case"POWER_UP_PUNCH":case 319:m.move2=319;break}return m};BelugaPokemon.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.trainer_name="";d.trainer_gender=o.enums===String?"TRAINER_MALE":0;d.trainer_team=o.enums===String?"NEUTRAL":0;d.trainer_level=0;d.pokedex_id=0;d.cp=0;d.pokemon_level=0;d.max_hp=0;d.origin_lat=0;d.origin_lng=0;d.height=0;d.weight=0;d.individual_attack=0;d.individual_defense=0;d.individual_stamina=0;d.creation_day=0;d.creation_month=0;d.creation_year=0;d.nickname="";d.gender=o.enums===String?"GENDER_UNSET":0;d.costume=o.enums===String?"COSTUME_UNSET":0;d.form=o.enums===String?"FORM_UNSET":0;d.shiny=false;d.move1=o.enums===String?"MOVE_UNSET":0;d.move2=o.enums===String?"MOVE_UNSET":0}if(m.trainer_name!=null&&m.hasOwnProperty("trainer_name")){d.trainer_name=m.trainer_name}if(m.trainer_gender!=null&&m.hasOwnProperty("trainer_gender")){d.trainer_gender=o.enums===String?$root.POGOProtos.Data.Beluga.BelugaPokemon.TrainerGender[m.trainer_gender]:m.trainer_gender}if(m.trainer_team!=null&&m.hasOwnProperty("trainer_team")){d.trainer_team=o.enums===String?$root.POGOProtos.Enums.TeamColor[m.trainer_team]:m.trainer_team}if(m.trainer_level!=null&&m.hasOwnProperty("trainer_level")){d.trainer_level=m.trainer_level}if(m.pokedex_id!=null&&m.hasOwnProperty("pokedex_id")){d.pokedex_id=m.pokedex_id}if(m.cp!=null&&m.hasOwnProperty("cp")){d.cp=m.cp}if(m.pokemon_level!=null&&m.hasOwnProperty("pokemon_level")){d.pokemon_level=o.json&&!isFinite(m.pokemon_level)?String(m.pokemon_level):m.pokemon_level}if(m.max_hp!=null&&m.hasOwnProperty("max_hp")){d.max_hp=m.max_hp}if(m.origin_lat!=null&&m.hasOwnProperty("origin_lat")){d.origin_lat=o.json&&!isFinite(m.origin_lat)?String(m.origin_lat):m.origin_lat}if(m.origin_lng!=null&&m.hasOwnProperty("origin_lng")){d.origin_lng=o.json&&!isFinite(m.origin_lng)?String(m.origin_lng):m.origin_lng}if(m.height!=null&&m.hasOwnProperty("height")){d.height=o.json&&!isFinite(m.height)?String(m.height):m.height}if(m.weight!=null&&m.hasOwnProperty("weight")){d.weight=o.json&&!isFinite(m.weight)?String(m.weight):m.weight}if(m.individual_attack!=null&&m.hasOwnProperty("individual_attack")){d.individual_attack=m.individual_attack}if(m.individual_defense!=null&&m.hasOwnProperty("individual_defense")){d.individual_defense=m.individual_defense}if(m.individual_stamina!=null&&m.hasOwnProperty("individual_stamina")){d.individual_stamina=m.individual_stamina}if(m.creation_day!=null&&m.hasOwnProperty("creation_day")){d.creation_day=m.creation_day}if(m.creation_month!=null&&m.hasOwnProperty("creation_month")){d.creation_month=m.creation_month}if(m.creation_year!=null&&m.hasOwnProperty("creation_year")){d.creation_year=m.creation_year}if(m.nickname!=null&&m.hasOwnProperty("nickname")){d.nickname=m.nickname}if(m.gender!=null&&m.hasOwnProperty("gender")){d.gender=o.enums===String?$root.POGOProtos.Enums.Gender[m.gender]:m.gender}if(m.costume!=null&&m.hasOwnProperty("costume")){d.costume=o.enums===String?$root.POGOProtos.Enums.Costume[m.costume]:m.costume}if(m.form!=null&&m.hasOwnProperty("form")){d.form=o.enums===String?$root.POGOProtos.Data.Beluga.BelugaPokemon.PokemonForm[m.form]:m.form}if(m.shiny!=null&&m.hasOwnProperty("shiny")){d.shiny=m.shiny}if(m.move1!=null&&m.hasOwnProperty("move1")){d.move1=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.move1]:m.move1}if(m.move2!=null&&m.hasOwnProperty("move2")){d.move2=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.move2]:m.move2}return d};BelugaPokemon.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BelugaPokemon.PokemonForm=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="FORM_UNSET"]=0;values[valuesById[1]="ALOLA"]=1;return values}();BelugaPokemon.TrainerGender=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="TRAINER_MALE"]=0;values[valuesById[1]="TRAINER_FEMALE"]=1;return values}();return BelugaPokemon}();return Beluga}();Data.BuddyPokemon=function(){function BuddyPokemon(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BuddyPokemon.prototype.id=$util.Long?$util.Long.fromBits(0,0,false):0;BuddyPokemon.prototype.start_km_walked=0;BuddyPokemon.prototype.last_km_awarded=0;BuddyPokemon.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.id!=null&&m.hasOwnProperty("id"))w.uint32(9).fixed64(m.id);if(m.start_km_walked!=null&&m.hasOwnProperty("start_km_walked"))w.uint32(17).double(m.start_km_walked);if(m.last_km_awarded!=null&&m.hasOwnProperty("last_km_awarded"))w.uint32(25).double(m.last_km_awarded);return w};BuddyPokemon.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.BuddyPokemon;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.id=r.fixed64();break;case 2:m.start_km_walked=r.double();break;case 3:m.last_km_awarded=r.double();break;default:r.skipType(t&7);break}}return m};BuddyPokemon.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.BuddyPokemon)return d;var m=new $root.POGOProtos.Data.BuddyPokemon;if(d.id!=null){if($util.Long)(m.id=$util.Long.fromValue(d.id)).unsigned=false;else if(typeof d.id==="string")m.id=parseInt(d.id,10);else if(typeof d.id==="number")m.id=d.id;else if(typeof d.id==="object")m.id=new $util.LongBits(d.id.low>>>0,d.id.high>>>0).toNumber()}if(d.start_km_walked!=null){m.start_km_walked=Number(d.start_km_walked)}if(d.last_km_awarded!=null){m.last_km_awarded=Number(d.last_km_awarded)}return m};BuddyPokemon.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.id=o.longs===String?"0":0;d.start_km_walked=0;d.last_km_awarded=0}if(m.id!=null&&m.hasOwnProperty("id")){if(typeof m.id==="number")d.id=o.longs===String?String(m.id):m.id;else d.id=o.longs===String?$util.Long.prototype.toString.call(m.id):o.longs===Number?new $util.LongBits(m.id.low>>>0,m.id.high>>>0).toNumber():m.id}if(m.start_km_walked!=null&&m.hasOwnProperty("start_km_walked")){d.start_km_walked=o.json&&!isFinite(m.start_km_walked)?String(m.start_km_walked):m.start_km_walked}if(m.last_km_awarded!=null&&m.hasOwnProperty("last_km_awarded")){d.last_km_awarded=o.json&&!isFinite(m.last_km_awarded)?String(m.last_km_awarded):m.last_km_awarded}return d};BuddyPokemon.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BuddyPokemon}();Data.Capture=function(){var Capture={};Capture.CaptureAward=function(){function CaptureAward(p){this.activity_type=[];this.xp=[];this.candy=[];this.stardust=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CaptureAward.prototype.activity_type=$util.emptyArray;CaptureAward.prototype.xp=$util.emptyArray;CaptureAward.prototype.candy=$util.emptyArray;CaptureAward.prototype.stardust=$util.emptyArray;CaptureAward.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.activity_type!=null&&m.activity_type.length){w.uint32(10).fork();for(var i=0;i<m.activity_type.length;++i)w.int32(m.activity_type[i]);w.ldelim()}if(m.xp!=null&&m.xp.length){w.uint32(18).fork();for(var i=0;i<m.xp.length;++i)w.int32(m.xp[i]);w.ldelim()}if(m.candy!=null&&m.candy.length){w.uint32(26).fork();for(var i=0;i<m.candy.length;++i)w.int32(m.candy[i]);w.ldelim()}if(m.stardust!=null&&m.stardust.length){w.uint32(34).fork();for(var i=0;i<m.stardust.length;++i)w.int32(m.stardust[i]);w.ldelim()}return w};CaptureAward.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Capture.CaptureAward;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.activity_type&&m.activity_type.length))m.activity_type=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.activity_type.push(r.int32())}else m.activity_type.push(r.int32());break;case 2:if(!(m.xp&&m.xp.length))m.xp=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.xp.push(r.int32())}else m.xp.push(r.int32());break;case 3:if(!(m.candy&&m.candy.length))m.candy=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.candy.push(r.int32())}else m.candy.push(r.int32());break;case 4:if(!(m.stardust&&m.stardust.length))m.stardust=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.stardust.push(r.int32())}else m.stardust.push(r.int32());break;default:r.skipType(t&7);break}}return m};CaptureAward.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Capture.CaptureAward)return d;var m=new $root.POGOProtos.Data.Capture.CaptureAward;if(d.activity_type){if(!Array.isArray(d.activity_type))throw TypeError(".POGOProtos.Data.Capture.CaptureAward.activity_type: array expected");m.activity_type=[];for(var i=0;i<d.activity_type.length;++i){switch(d.activity_type[i]){default:case"ACTIVITY_UNKNOWN":case 0:m.activity_type[i]=0;break;case"ACTIVITY_CATCH_POKEMON":case 1:m.activity_type[i]=1;break;case"ACTIVITY_CATCH_LEGEND_POKEMON":case 2:m.activity_type[i]=2;break;case"ACTIVITY_FLEE_POKEMON":case 3:m.activity_type[i]=3;break;case"ACTIVITY_DEFEAT_FORT":case 4:m.activity_type[i]=4;break;case"ACTIVITY_EVOLVE_POKEMON":case 5:m.activity_type[i]=5;break;case"ACTIVITY_HATCH_EGG":case 6:m.activity_type[i]=6;break;case"ACTIVITY_WALK_KM":case 7:m.activity_type[i]=7;break;case"ACTIVITY_POKEDEX_ENTRY_NEW":case 8:m.activity_type[i]=8;break;case"ACTIVITY_CATCH_FIRST_THROW":case 9:m.activity_type[i]=9;break;case"ACTIVITY_CATCH_NICE_THROW":case 10:m.activity_type[i]=10;break;case"ACTIVITY_CATCH_GREAT_THROW":case 11:m.activity_type[i]=11;break;case"ACTIVITY_CATCH_EXCELLENT_THROW":case 12:m.activity_type[i]=12;break;case"ACTIVITY_CATCH_CURVEBALL":case 13:m.activity_type[i]=13;break;case"ACTIVITY_CATCH_FIRST_CATCH_OF_DAY":case 14:m.activity_type[i]=14;break;case"ACTIVITY_CATCH_MILESTONE":case 15:m.activity_type[i]=15;break;case"ACTIVITY_TRAIN_POKEMON":case 16:m.activity_type[i]=16;break;case"ACTIVITY_SEARCH_FORT":case 17:m.activity_type[i]=17;break;case"ACTIVITY_RELEASE_POKEMON":case 18:m.activity_type[i]=18;break;case"ACTIVITY_HATCH_EGG_SMALL_BONUS":case 19:m.activity_type[i]=19;break;case"ACTIVITY_HATCH_EGG_MEDIUM_BONUS":case 20:m.activity_type[i]=20;break;case"ACTIVITY_HATCH_EGG_LARGE_BONUS":case 21:m.activity_type[i]=21;break;case"ACTIVITY_DEFEAT_GYM_DEFENDER":case 22:m.activity_type[i]=22;break;case"ACTIVITY_DEFEAT_GYM_LEADER":case 23:m.activity_type[i]=23;break;case"ACTIVITY_CATCH_FIRST_CATCH_STREAK_BONUS":case 24:m.activity_type[i]=24;break;case"ACTIVITY_SEARCH_FORT_FIRST_OF_THE_DAY":case 25:m.activity_type[i]=25;break;case"ACTIVITY_SEARCH_FORT_STREAK_BONUS":case 26:m.activity_type[i]=26;break;case"ACTIVITY_DEFEAT_RAID_POKEMON":case 27:m.activity_type[i]=27;break;case"ACTIVITY_FEED_BERRY":case 28:m.activity_type[i]=28;break;case"ACTIVITY_SEARCH_GYM":case 29:m.activity_type[i]=29;break;case"ACTIVITY_NEW_POKESTOP":case 30:m.activity_type[i]=30;break;case"ACTIVITY_GYM_BATTLE_LOSS":case 31:m.activity_type[i]=31;break;case"ACTIVITY_CATCH_AR_PLUS_BONUS":case 32:m.activity_type[i]=32;break;case"ACTIVITY_CATCH_QUEST_POKEMON_ENCOUNTER":case 33:m.activity_type[i]=33;break;case"ACTIVITY_FRIENDSHIP_LEVEL_UP_0":case 35:m.activity_type[i]=35;break;case"ACTIVITY_FRIENDSHIP_LEVEL_UP_1":case 36:m.activity_type[i]=36;break;case"ACTIVITY_FRIENDSHIP_LEVEL_UP_2":case 37:m.activity_type[i]=37;break;case"ACTIVITY_FRIENDSHIP_LEVEL_UP_3":case 38:m.activity_type[i]=38;break;case"ACTIVITY_FRIENDSHIP_LEVEL_UP_4":case 39:m.activity_type[i]=39;break;case"ACTIVITY_SEND_GIFT":case 40:m.activity_type[i]=40;break;case"ACTIVITY_SHARE_EX_RAID_PASS":case 41:m.activity_type[i]=41;break;case"ACTIVITY_RAID_LEVEL_1_ADDITIONAL_XP":case 42:m.activity_type[i]=42;break;case"ACTIVITY_RAID_LEVEL_2_ADDITIONAL_XP":case 43:m.activity_type[i]=43;break;case"ACTIVITY_RAID_LEVEL_3_ADDITIONAL_XP":case 44:m.activity_type[i]=44;break;case"ACTIVITY_RAID_LEVEL_4_ADDITIONAL_XP":case 45:m.activity_type[i]=45;break;case"ACTIVITY_RAID_LEVEL_5_ADDITIONAL_XP":case 46:m.activity_type[i]=46;break}}}if(d.xp){if(!Array.isArray(d.xp))throw TypeError(".POGOProtos.Data.Capture.CaptureAward.xp: array expected");m.xp=[];for(var i=0;i<d.xp.length;++i){m.xp[i]=d.xp[i]|0}}if(d.candy){if(!Array.isArray(d.candy))throw TypeError(".POGOProtos.Data.Capture.CaptureAward.candy: array expected");m.candy=[];for(var i=0;i<d.candy.length;++i){m.candy[i]=d.candy[i]|0}}if(d.stardust){if(!Array.isArray(d.stardust))throw TypeError(".POGOProtos.Data.Capture.CaptureAward.stardust: array expected");m.stardust=[];for(var i=0;i<d.stardust.length;++i){m.stardust[i]=d.stardust[i]|0}}return m};CaptureAward.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.activity_type=[];d.xp=[];d.candy=[];d.stardust=[]}if(m.activity_type&&m.activity_type.length){d.activity_type=[];for(var j=0;j<m.activity_type.length;++j){d.activity_type[j]=o.enums===String?$root.POGOProtos.Enums.ActivityType[m.activity_type[j]]:m.activity_type[j]}}if(m.xp&&m.xp.length){d.xp=[];for(var j=0;j<m.xp.length;++j){d.xp[j]=m.xp[j]}}if(m.candy&&m.candy.length){d.candy=[];for(var j=0;j<m.candy.length;++j){d.candy[j]=m.candy[j]}}if(m.stardust&&m.stardust.length){d.stardust=[];for(var j=0;j<m.stardust.length;++j){d.stardust[j]=m.stardust[j]}}return d};CaptureAward.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CaptureAward}();Capture.CaptureProbability=function(){function CaptureProbability(p){this.pokeball_type=[];this.capture_probability=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CaptureProbability.prototype.pokeball_type=$util.emptyArray;CaptureProbability.prototype.capture_probability=$util.emptyArray;CaptureProbability.prototype.reticle_difficulty_scale=0;CaptureProbability.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokeball_type!=null&&m.pokeball_type.length){w.uint32(10).fork();for(var i=0;i<m.pokeball_type.length;++i)w.int32(m.pokeball_type[i]);w.ldelim()}if(m.capture_probability!=null&&m.capture_probability.length){w.uint32(18).fork();for(var i=0;i<m.capture_probability.length;++i)w.float(m.capture_probability[i]);w.ldelim()}if(m.reticle_difficulty_scale!=null&&m.hasOwnProperty("reticle_difficulty_scale"))w.uint32(97).double(m.reticle_difficulty_scale);return w};CaptureProbability.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Capture.CaptureProbability;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.pokeball_type&&m.pokeball_type.length))m.pokeball_type=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.pokeball_type.push(r.int32())}else m.pokeball_type.push(r.int32());break;case 2:if(!(m.capture_probability&&m.capture_probability.length))m.capture_probability=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.capture_probability.push(r.float())}else m.capture_probability.push(r.float());break;case 12:m.reticle_difficulty_scale=r.double();break;default:r.skipType(t&7);break}}return m};CaptureProbability.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Capture.CaptureProbability)return d;var m=new $root.POGOProtos.Data.Capture.CaptureProbability;if(d.pokeball_type){if(!Array.isArray(d.pokeball_type))throw TypeError(".POGOProtos.Data.Capture.CaptureProbability.pokeball_type: array expected");m.pokeball_type=[];for(var i=0;i<d.pokeball_type.length;++i){switch(d.pokeball_type[i]){default:case"ITEM_UNKNOWN":case 0:m.pokeball_type[i]=0;break;case"ITEM_POKE_BALL":case 1:m.pokeball_type[i]=1;break;case"ITEM_GREAT_BALL":case 2:m.pokeball_type[i]=2;break;case"ITEM_ULTRA_BALL":case 3:m.pokeball_type[i]=3;break;case"ITEM_MASTER_BALL":case 4:m.pokeball_type[i]=4;break;case"ITEM_PREMIER_BALL":case 5:m.pokeball_type[i]=5;break;case"ITEM_POTION":case 101:m.pokeball_type[i]=101;break;case"ITEM_SUPER_POTION":case 102:m.pokeball_type[i]=102;break;case"ITEM_HYPER_POTION":case 103:m.pokeball_type[i]=103;break;case"ITEM_MAX_POTION":case 104:m.pokeball_type[i]=104;break;case"ITEM_REVIVE":case 201:m.pokeball_type[i]=201;break;case"ITEM_MAX_REVIVE":case 202:m.pokeball_type[i]=202;break;case"ITEM_LUCKY_EGG":case 301:m.pokeball_type[i]=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.pokeball_type[i]=401;break;case"ITEM_INCENSE_SPICY":case 402:m.pokeball_type[i]=402;break;case"ITEM_INCENSE_COOL":case 403:m.pokeball_type[i]=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.pokeball_type[i]=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.pokeball_type[i]=405;break;case"ITEM_TROY_DISK":case 501:m.pokeball_type[i]=501;break;case"ITEM_X_ATTACK":case 602:m.pokeball_type[i]=602;break;case"ITEM_X_DEFENSE":case 603:m.pokeball_type[i]=603;break;case"ITEM_X_MIRACLE":case 604:m.pokeball_type[i]=604;break;case"ITEM_RAZZ_BERRY":case 701:m.pokeball_type[i]=701;break;case"ITEM_BLUK_BERRY":case 702:m.pokeball_type[i]=702;break;case"ITEM_NANAB_BERRY":case 703:m.pokeball_type[i]=703;break;case"ITEM_WEPAR_BERRY":case 704:m.pokeball_type[i]=704;break;case"ITEM_PINAP_BERRY":case 705:m.pokeball_type[i]=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.pokeball_type[i]=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.pokeball_type[i]=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.pokeball_type[i]=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.pokeball_type[i]=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.pokeball_type[i]=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.pokeball_type[i]=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.pokeball_type[i]=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.pokeball_type[i]=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.pokeball_type[i]=1002;break;case"ITEM_SUN_STONE":case 1101:m.pokeball_type[i]=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.pokeball_type[i]=1102;break;case"ITEM_METAL_COAT":case 1103:m.pokeball_type[i]=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.pokeball_type[i]=1104;break;case"ITEM_UP_GRADE":case 1105:m.pokeball_type[i]=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.pokeball_type[i]=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.pokeball_type[i]=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.pokeball_type[i]=1202;break;case"ITEM_RARE_CANDY":case 1301:m.pokeball_type[i]=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.pokeball_type[i]=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.pokeball_type[i]=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.pokeball_type[i]=1403;break;case"ITEM_STAR_PIECE":case 1404:m.pokeball_type[i]=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.pokeball_type[i]=1405;break}}}if(d.capture_probability){if(!Array.isArray(d.capture_probability))throw TypeError(".POGOProtos.Data.Capture.CaptureProbability.capture_probability: array expected");m.capture_probability=[];for(var i=0;i<d.capture_probability.length;++i){m.capture_probability[i]=Number(d.capture_probability[i])}}if(d.reticle_difficulty_scale!=null){m.reticle_difficulty_scale=Number(d.reticle_difficulty_scale)}return m};CaptureProbability.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.pokeball_type=[];d.capture_probability=[]}if(o.defaults){d.reticle_difficulty_scale=0}if(m.pokeball_type&&m.pokeball_type.length){d.pokeball_type=[];for(var j=0;j<m.pokeball_type.length;++j){d.pokeball_type[j]=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.pokeball_type[j]]:m.pokeball_type[j]}}if(m.capture_probability&&m.capture_probability.length){d.capture_probability=[];for(var j=0;j<m.capture_probability.length;++j){d.capture_probability[j]=o.json&&!isFinite(m.capture_probability[j])?String(m.capture_probability[j]):m.capture_probability[j]}}if(m.reticle_difficulty_scale!=null&&m.hasOwnProperty("reticle_difficulty_scale")){d.reticle_difficulty_scale=o.json&&!isFinite(m.reticle_difficulty_scale)?String(m.reticle_difficulty_scale):m.reticle_difficulty_scale}return d};CaptureProbability.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CaptureProbability}();Capture.CaptureScore=function(){function CaptureScore(p){this.activity_type=[];this.exp=[];this.candy=[];this.stardust=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CaptureScore.prototype.activity_type=$util.emptyArray;CaptureScore.prototype.exp=$util.emptyArray;CaptureScore.prototype.candy=$util.emptyArray;CaptureScore.prototype.stardust=$util.emptyArray;CaptureScore.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.activity_type!=null&&m.activity_type.length){w.uint32(10).fork();for(var i=0;i<m.activity_type.length;++i)w.int32(m.activity_type[i]);w.ldelim()}if(m.exp!=null&&m.exp.length){w.uint32(18).fork();for(var i=0;i<m.exp.length;++i)w.int32(m.exp[i]);w.ldelim()}if(m.candy!=null&&m.candy.length){w.uint32(26).fork();for(var i=0;i<m.candy.length;++i)w.int32(m.candy[i]);w.ldelim()}if(m.stardust!=null&&m.stardust.length){w.uint32(34).fork();for(var i=0;i<m.stardust.length;++i)w.int32(m.stardust[i]);w.ldelim()}return w};CaptureScore.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Capture.CaptureScore;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.activity_type&&m.activity_type.length))m.activity_type=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.activity_type.push(r.int32())}else m.activity_type.push(r.int32());break;case 2:if(!(m.exp&&m.exp.length))m.exp=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.exp.push(r.int32())}else m.exp.push(r.int32());break;case 3:if(!(m.candy&&m.candy.length))m.candy=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.candy.push(r.int32())}else m.candy.push(r.int32());break;case 4:if(!(m.stardust&&m.stardust.length))m.stardust=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.stardust.push(r.int32())}else m.stardust.push(r.int32());break;default:r.skipType(t&7);break}}return m};CaptureScore.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Capture.CaptureScore)return d;var m=new $root.POGOProtos.Data.Capture.CaptureScore;if(d.activity_type){if(!Array.isArray(d.activity_type))throw TypeError(".POGOProtos.Data.Capture.CaptureScore.activity_type: array expected");m.activity_type=[];for(var i=0;i<d.activity_type.length;++i){switch(d.activity_type[i]){default:case"ACTIVITY_UNKNOWN":case 0:m.activity_type[i]=0;break;case"ACTIVITY_CATCH_POKEMON":case 1:m.activity_type[i]=1;break;case"ACTIVITY_CATCH_LEGEND_POKEMON":case 2:m.activity_type[i]=2;break;case"ACTIVITY_FLEE_POKEMON":case 3:m.activity_type[i]=3;break;case"ACTIVITY_DEFEAT_FORT":case 4:m.activity_type[i]=4;break;case"ACTIVITY_EVOLVE_POKEMON":case 5:m.activity_type[i]=5;break;case"ACTIVITY_HATCH_EGG":case 6:m.activity_type[i]=6;break;case"ACTIVITY_WALK_KM":case 7:m.activity_type[i]=7;break;case"ACTIVITY_POKEDEX_ENTRY_NEW":case 8:m.activity_type[i]=8;break;case"ACTIVITY_CATCH_FIRST_THROW":case 9:m.activity_type[i]=9;break;case"ACTIVITY_CATCH_NICE_THROW":case 10:m.activity_type[i]=10;break;case"ACTIVITY_CATCH_GREAT_THROW":case 11:m.activity_type[i]=11;break;case"ACTIVITY_CATCH_EXCELLENT_THROW":case 12:m.activity_type[i]=12;break;case"ACTIVITY_CATCH_CURVEBALL":case 13:m.activity_type[i]=13;break;case"ACTIVITY_CATCH_FIRST_CATCH_OF_DAY":case 14:m.activity_type[i]=14;break;case"ACTIVITY_CATCH_MILESTONE":case 15:m.activity_type[i]=15;break;case"ACTIVITY_TRAIN_POKEMON":case 16:m.activity_type[i]=16;break;case"ACTIVITY_SEARCH_FORT":case 17:m.activity_type[i]=17;break;case"ACTIVITY_RELEASE_POKEMON":case 18:m.activity_type[i]=18;break;case"ACTIVITY_HATCH_EGG_SMALL_BONUS":case 19:m.activity_type[i]=19;break;case"ACTIVITY_HATCH_EGG_MEDIUM_BONUS":case 20:m.activity_type[i]=20;break;case"ACTIVITY_HATCH_EGG_LARGE_BONUS":case 21:m.activity_type[i]=21;break;case"ACTIVITY_DEFEAT_GYM_DEFENDER":case 22:m.activity_type[i]=22;break;case"ACTIVITY_DEFEAT_GYM_LEADER":case 23:m.activity_type[i]=23;break;case"ACTIVITY_CATCH_FIRST_CATCH_STREAK_BONUS":case 24:m.activity_type[i]=24;break;case"ACTIVITY_SEARCH_FORT_FIRST_OF_THE_DAY":case 25:m.activity_type[i]=25;break;case"ACTIVITY_SEARCH_FORT_STREAK_BONUS":case 26:m.activity_type[i]=26;break;case"ACTIVITY_DEFEAT_RAID_POKEMON":case 27:m.activity_type[i]=27;break;case"ACTIVITY_FEED_BERRY":case 28:m.activity_type[i]=28;break;case"ACTIVITY_SEARCH_GYM":case 29:m.activity_type[i]=29;break;case"ACTIVITY_NEW_POKESTOP":case 30:m.activity_type[i]=30;break;case"ACTIVITY_GYM_BATTLE_LOSS":case 31:m.activity_type[i]=31;break;case"ACTIVITY_CATCH_AR_PLUS_BONUS":case 32:m.activity_type[i]=32;break;case"ACTIVITY_CATCH_QUEST_POKEMON_ENCOUNTER":case 33:m.activity_type[i]=33;break;case"ACTIVITY_FRIENDSHIP_LEVEL_UP_0":case 35:m.activity_type[i]=35;break;case"ACTIVITY_FRIENDSHIP_LEVEL_UP_1":case 36:m.activity_type[i]=36;break;case"ACTIVITY_FRIENDSHIP_LEVEL_UP_2":case 37:m.activity_type[i]=37;break;case"ACTIVITY_FRIENDSHIP_LEVEL_UP_3":case 38:m.activity_type[i]=38;break;case"ACTIVITY_FRIENDSHIP_LEVEL_UP_4":case 39:m.activity_type[i]=39;break;case"ACTIVITY_SEND_GIFT":case 40:m.activity_type[i]=40;break;case"ACTIVITY_SHARE_EX_RAID_PASS":case 41:m.activity_type[i]=41;break;case"ACTIVITY_RAID_LEVEL_1_ADDITIONAL_XP":case 42:m.activity_type[i]=42;break;case"ACTIVITY_RAID_LEVEL_2_ADDITIONAL_XP":case 43:m.activity_type[i]=43;break;case"ACTIVITY_RAID_LEVEL_3_ADDITIONAL_XP":case 44:m.activity_type[i]=44;break;case"ACTIVITY_RAID_LEVEL_4_ADDITIONAL_XP":case 45:m.activity_type[i]=45;break;case"ACTIVITY_RAID_LEVEL_5_ADDITIONAL_XP":case 46:m.activity_type[i]=46;break}}}if(d.exp){if(!Array.isArray(d.exp))throw TypeError(".POGOProtos.Data.Capture.CaptureScore.exp: array expected");m.exp=[];for(var i=0;i<d.exp.length;++i){m.exp[i]=d.exp[i]|0}}if(d.candy){if(!Array.isArray(d.candy))throw TypeError(".POGOProtos.Data.Capture.CaptureScore.candy: array expected");m.candy=[];for(var i=0;i<d.candy.length;++i){m.candy[i]=d.candy[i]|0}}if(d.stardust){if(!Array.isArray(d.stardust))throw TypeError(".POGOProtos.Data.Capture.CaptureScore.stardust: array expected");m.stardust=[];for(var i=0;i<d.stardust.length;++i){m.stardust[i]=d.stardust[i]|0}}return m};CaptureScore.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.activity_type=[];d.exp=[];d.candy=[];d.stardust=[]}if(m.activity_type&&m.activity_type.length){d.activity_type=[];for(var j=0;j<m.activity_type.length;++j){d.activity_type[j]=o.enums===String?$root.POGOProtos.Enums.ActivityType[m.activity_type[j]]:m.activity_type[j]}}if(m.exp&&m.exp.length){d.exp=[];for(var j=0;j<m.exp.length;++j){d.exp[j]=m.exp[j]}}if(m.candy&&m.candy.length){d.candy=[];for(var j=0;j<m.candy.length;++j){d.candy[j]=m.candy[j]}}if(m.stardust&&m.stardust.length){d.stardust=[];for(var j=0;j<m.stardust.length;++j){d.stardust[j]=m.stardust[j]}}return d};CaptureScore.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CaptureScore}();return Capture}();Data.ClientVersion=function(){function ClientVersion(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ClientVersion.prototype.min_version="";ClientVersion.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.min_version!=null&&m.hasOwnProperty("min_version"))w.uint32(10).string(m.min_version);return w};ClientVersion.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.ClientVersion;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.min_version=r.string();break;default:r.skipType(t&7);break}}return m};ClientVersion.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.ClientVersion)return d;var m=new $root.POGOProtos.Data.ClientVersion;if(d.min_version!=null){m.min_version=String(d.min_version)}return m};ClientVersion.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.min_version=""}if(m.min_version!=null&&m.hasOwnProperty("min_version")){d.min_version=m.min_version}return d};ClientVersion.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ClientVersion}();Data.Combat=function(){var Combat={};Combat.ChallengePlayer=function(){function ChallengePlayer(p){this.attacking_pokemon_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ChallengePlayer.prototype.player_id="";ChallengePlayer.prototype.player_avatar=null;ChallengePlayer.prototype.combat_player_s2_cell_id=$util.Long?$util.Long.fromBits(0,0,false):0;ChallengePlayer.prototype.attacking_pokemon_id=$util.emptyArray;ChallengePlayer.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);if(m.player_avatar!=null&&m.hasOwnProperty("player_avatar"))$root.POGOProtos.Data.Player.PlayerAvatar.encode(m.player_avatar,w.uint32(18).fork()).ldelim();if(m.combat_player_s2_cell_id!=null&&m.hasOwnProperty("combat_player_s2_cell_id"))w.uint32(24).int64(m.combat_player_s2_cell_id);if(m.attacking_pokemon_id!=null&&m.attacking_pokemon_id.length){w.uint32(34).fork();for(var i=0;i<m.attacking_pokemon_id.length;++i)w.fixed64(m.attacking_pokemon_id[i]);w.ldelim()}return w};ChallengePlayer.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.ChallengePlayer;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;case 2:m.player_avatar=$root.POGOProtos.Data.Player.PlayerAvatar.decode(r,r.uint32());break;case 3:m.combat_player_s2_cell_id=r.int64();break;case 4:if(!(m.attacking_pokemon_id&&m.attacking_pokemon_id.length))m.attacking_pokemon_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.attacking_pokemon_id.push(r.fixed64())}else m.attacking_pokemon_id.push(r.fixed64());break;default:r.skipType(t&7);break}}return m};ChallengePlayer.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.ChallengePlayer)return d;var m=new $root.POGOProtos.Data.Combat.ChallengePlayer;if(d.player_id!=null){m.player_id=String(d.player_id)}if(d.player_avatar!=null){if(typeof d.player_avatar!=="object")throw TypeError(".POGOProtos.Data.Combat.ChallengePlayer.player_avatar: object expected");m.player_avatar=$root.POGOProtos.Data.Player.PlayerAvatar.fromObject(d.player_avatar)}if(d.combat_player_s2_cell_id!=null){if($util.Long)(m.combat_player_s2_cell_id=$util.Long.fromValue(d.combat_player_s2_cell_id)).unsigned=false;else if(typeof d.combat_player_s2_cell_id==="string")m.combat_player_s2_cell_id=parseInt(d.combat_player_s2_cell_id,10);else if(typeof d.combat_player_s2_cell_id==="number")m.combat_player_s2_cell_id=d.combat_player_s2_cell_id;else if(typeof d.combat_player_s2_cell_id==="object")m.combat_player_s2_cell_id=new $util.LongBits(d.combat_player_s2_cell_id.low>>>0,d.combat_player_s2_cell_id.high>>>0).toNumber()}if(d.attacking_pokemon_id){if(!Array.isArray(d.attacking_pokemon_id))throw TypeError(".POGOProtos.Data.Combat.ChallengePlayer.attacking_pokemon_id: array expected");m.attacking_pokemon_id=[];for(var i=0;i<d.attacking_pokemon_id.length;++i){if($util.Long)(m.attacking_pokemon_id[i]=$util.Long.fromValue(d.attacking_pokemon_id[i])).unsigned=false;else if(typeof d.attacking_pokemon_id[i]==="string")m.attacking_pokemon_id[i]=parseInt(d.attacking_pokemon_id[i],10);else if(typeof d.attacking_pokemon_id[i]==="number")m.attacking_pokemon_id[i]=d.attacking_pokemon_id[i];else if(typeof d.attacking_pokemon_id[i]==="object")m.attacking_pokemon_id[i]=new $util.LongBits(d.attacking_pokemon_id[i].low>>>0,d.attacking_pokemon_id[i].high>>>0).toNumber()}}return m};ChallengePlayer.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.attacking_pokemon_id=[]}if(o.defaults){d.player_id="";d.player_avatar=null;if($util.Long){var n=new $util.Long(0,0,false);d.combat_player_s2_cell_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.combat_player_s2_cell_id=o.longs===String?"0":0}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}if(m.player_avatar!=null&&m.hasOwnProperty("player_avatar")){d.player_avatar=$root.POGOProtos.Data.Player.PlayerAvatar.toObject(m.player_avatar,o)}if(m.combat_player_s2_cell_id!=null&&m.hasOwnProperty("combat_player_s2_cell_id")){if(typeof m.combat_player_s2_cell_id==="number")d.combat_player_s2_cell_id=o.longs===String?String(m.combat_player_s2_cell_id):m.combat_player_s2_cell_id;else d.combat_player_s2_cell_id=o.longs===String?$util.Long.prototype.toString.call(m.combat_player_s2_cell_id):o.longs===Number?new $util.LongBits(m.combat_player_s2_cell_id.low>>>0,m.combat_player_s2_cell_id.high>>>0).toNumber():m.combat_player_s2_cell_id}if(m.attacking_pokemon_id&&m.attacking_pokemon_id.length){d.attacking_pokemon_id=[];for(var j=0;j<m.attacking_pokemon_id.length;++j){if(typeof m.attacking_pokemon_id[j]==="number")d.attacking_pokemon_id[j]=o.longs===String?String(m.attacking_pokemon_id[j]):m.attacking_pokemon_id[j];else d.attacking_pokemon_id[j]=o.longs===String?$util.Long.prototype.toString.call(m.attacking_pokemon_id[j]):o.longs===Number?new $util.LongBits(m.attacking_pokemon_id[j].low>>>0,m.attacking_pokemon_id[j].high>>>0).toNumber():m.attacking_pokemon_id[j]}}return d};ChallengePlayer.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ChallengePlayer}();Combat.Combat=function(){function Combat(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Combat.prototype.combat_state=0;Combat.prototype.combat_id="";Combat.prototype.player=null;Combat.prototype.opponent=null;Combat.prototype.combat_start_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Combat.prototype.combat_end_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Combat.prototype.server_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Combat.prototype.current_turn=0;Combat.prototype.turn_start_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Combat.prototype.minigame_end_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Combat.prototype.minigame_submit_score_end_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Combat.prototype.change_pokemon_end_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Combat.prototype.quick_swap_cooldown_duration_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Combat.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.combat_state!=null&&m.hasOwnProperty("combat_state"))w.uint32(8).int32(m.combat_state);if(m.combat_id!=null&&m.hasOwnProperty("combat_id"))w.uint32(18).string(m.combat_id);if(m.player!=null&&m.hasOwnProperty("player"))$root.POGOProtos.Data.Combat.CombatPlayer.encode(m.player,w.uint32(26).fork()).ldelim();if(m.opponent!=null&&m.hasOwnProperty("opponent"))$root.POGOProtos.Data.Combat.CombatPlayer.encode(m.opponent,w.uint32(34).fork()).ldelim();if(m.combat_start_ms!=null&&m.hasOwnProperty("combat_start_ms"))w.uint32(40).int64(m.combat_start_ms);if(m.combat_end_ms!=null&&m.hasOwnProperty("combat_end_ms"))w.uint32(48).int64(m.combat_end_ms);if(m.server_ms!=null&&m.hasOwnProperty("server_ms"))w.uint32(56).int64(m.server_ms);if(m.current_turn!=null&&m.hasOwnProperty("current_turn"))w.uint32(64).int32(m.current_turn);if(m.turn_start_ms!=null&&m.hasOwnProperty("turn_start_ms"))w.uint32(72).int64(m.turn_start_ms);if(m.minigame_end_ms!=null&&m.hasOwnProperty("minigame_end_ms"))w.uint32(80).int64(m.minigame_end_ms);if(m.minigame_submit_score_end_ms!=null&&m.hasOwnProperty("minigame_submit_score_end_ms"))w.uint32(88).int64(m.minigame_submit_score_end_ms);if(m.change_pokemon_end_ms!=null&&m.hasOwnProperty("change_pokemon_end_ms"))w.uint32(96).int64(m.change_pokemon_end_ms);if(m.quick_swap_cooldown_duration_ms!=null&&m.hasOwnProperty("quick_swap_cooldown_duration_ms"))w.uint32(104).int64(m.quick_swap_cooldown_duration_ms);return w};Combat.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.Combat;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.combat_state=r.int32();break;case 2:m.combat_id=r.string();break;case 3:m.player=$root.POGOProtos.Data.Combat.CombatPlayer.decode(r,r.uint32());break;case 4:m.opponent=$root.POGOProtos.Data.Combat.CombatPlayer.decode(r,r.uint32());break;case 5:m.combat_start_ms=r.int64();break;case 6:m.combat_end_ms=r.int64();break;case 7:m.server_ms=r.int64();break;case 8:m.current_turn=r.int32();break;case 9:m.turn_start_ms=r.int64();break;case 10:m.minigame_end_ms=r.int64();break;case 11:m.minigame_submit_score_end_ms=r.int64();break;case 12:m.change_pokemon_end_ms=r.int64();break;case 13:m.quick_swap_cooldown_duration_ms=r.int64();break;default:r.skipType(t&7);break}}return m};Combat.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.Combat)return d;var m=new $root.POGOProtos.Data.Combat.Combat;switch(d.combat_state){case"UNSET":case 0:m.combat_state=0;break;case"WAITING_FOR_PLAYERS":case 1:m.combat_state=1;break;case"READY":case 2:m.combat_state=2;break;case"ACTIVE":case 3:m.combat_state=3;break;case"SPECIAL_ATTACK":case 4:m.combat_state=4;break;case"WAITING_FOR_CHANGE_POKEMON":case 5:m.combat_state=5;break;case"FINISHED":case 6:m.combat_state=6;break;case"PLAYER_QUIT":case 7:m.combat_state=7;break;case"TIMEOUT":case 8:m.combat_state=8;break}if(d.combat_id!=null){m.combat_id=String(d.combat_id)}if(d.player!=null){if(typeof d.player!=="object")throw TypeError(".POGOProtos.Data.Combat.Combat.player: object expected");m.player=$root.POGOProtos.Data.Combat.CombatPlayer.fromObject(d.player)}if(d.opponent!=null){if(typeof d.opponent!=="object")throw TypeError(".POGOProtos.Data.Combat.Combat.opponent: object expected");m.opponent=$root.POGOProtos.Data.Combat.CombatPlayer.fromObject(d.opponent)}if(d.combat_start_ms!=null){if($util.Long)(m.combat_start_ms=$util.Long.fromValue(d.combat_start_ms)).unsigned=false;else if(typeof d.combat_start_ms==="string")m.combat_start_ms=parseInt(d.combat_start_ms,10);else if(typeof d.combat_start_ms==="number")m.combat_start_ms=d.combat_start_ms;else if(typeof d.combat_start_ms==="object")m.combat_start_ms=new $util.LongBits(d.combat_start_ms.low>>>0,d.combat_start_ms.high>>>0).toNumber()}if(d.combat_end_ms!=null){if($util.Long)(m.combat_end_ms=$util.Long.fromValue(d.combat_end_ms)).unsigned=false;else if(typeof d.combat_end_ms==="string")m.combat_end_ms=parseInt(d.combat_end_ms,10);else if(typeof d.combat_end_ms==="number")m.combat_end_ms=d.combat_end_ms;else if(typeof d.combat_end_ms==="object")m.combat_end_ms=new $util.LongBits(d.combat_end_ms.low>>>0,d.combat_end_ms.high>>>0).toNumber()}if(d.server_ms!=null){if($util.Long)(m.server_ms=$util.Long.fromValue(d.server_ms)).unsigned=false;else if(typeof d.server_ms==="string")m.server_ms=parseInt(d.server_ms,10);else if(typeof d.server_ms==="number")m.server_ms=d.server_ms;else if(typeof d.server_ms==="object")m.server_ms=new $util.LongBits(d.server_ms.low>>>0,d.server_ms.high>>>0).toNumber()}if(d.current_turn!=null){m.current_turn=d.current_turn|0}if(d.turn_start_ms!=null){if($util.Long)(m.turn_start_ms=$util.Long.fromValue(d.turn_start_ms)).unsigned=false;else if(typeof d.turn_start_ms==="string")m.turn_start_ms=parseInt(d.turn_start_ms,10);else if(typeof d.turn_start_ms==="number")m.turn_start_ms=d.turn_start_ms;else if(typeof d.turn_start_ms==="object")m.turn_start_ms=new $util.LongBits(d.turn_start_ms.low>>>0,d.turn_start_ms.high>>>0).toNumber()}if(d.minigame_end_ms!=null){if($util.Long)(m.minigame_end_ms=$util.Long.fromValue(d.minigame_end_ms)).unsigned=false;else if(typeof d.minigame_end_ms==="string")m.minigame_end_ms=parseInt(d.minigame_end_ms,10);else if(typeof d.minigame_end_ms==="number")m.minigame_end_ms=d.minigame_end_ms;else if(typeof d.minigame_end_ms==="object")m.minigame_end_ms=new $util.LongBits(d.minigame_end_ms.low>>>0,d.minigame_end_ms.high>>>0).toNumber()}if(d.minigame_submit_score_end_ms!=null){if($util.Long)(m.minigame_submit_score_end_ms=$util.Long.fromValue(d.minigame_submit_score_end_ms)).unsigned=false;else if(typeof d.minigame_submit_score_end_ms==="string")m.minigame_submit_score_end_ms=parseInt(d.minigame_submit_score_end_ms,10);else if(typeof d.minigame_submit_score_end_ms==="number")m.minigame_submit_score_end_ms=d.minigame_submit_score_end_ms;else if(typeof d.minigame_submit_score_end_ms==="object")m.minigame_submit_score_end_ms=new $util.LongBits(d.minigame_submit_score_end_ms.low>>>0,d.minigame_submit_score_end_ms.high>>>0).toNumber()}if(d.change_pokemon_end_ms!=null){if($util.Long)(m.change_pokemon_end_ms=$util.Long.fromValue(d.change_pokemon_end_ms)).unsigned=false;else if(typeof d.change_pokemon_end_ms==="string")m.change_pokemon_end_ms=parseInt(d.change_pokemon_end_ms,10);else if(typeof d.change_pokemon_end_ms==="number")m.change_pokemon_end_ms=d.change_pokemon_end_ms;else if(typeof d.change_pokemon_end_ms==="object")m.change_pokemon_end_ms=new $util.LongBits(d.change_pokemon_end_ms.low>>>0,d.change_pokemon_end_ms.high>>>0).toNumber()}if(d.quick_swap_cooldown_duration_ms!=null){if($util.Long)(m.quick_swap_cooldown_duration_ms=$util.Long.fromValue(d.quick_swap_cooldown_duration_ms)).unsigned=false;else if(typeof d.quick_swap_cooldown_duration_ms==="string")m.quick_swap_cooldown_duration_ms=parseInt(d.quick_swap_cooldown_duration_ms,10);else if(typeof d.quick_swap_cooldown_duration_ms==="number")m.quick_swap_cooldown_duration_ms=d.quick_swap_cooldown_duration_ms;else if(typeof d.quick_swap_cooldown_duration_ms==="object")m.quick_swap_cooldown_duration_ms=new $util.LongBits(d.quick_swap_cooldown_duration_ms.low>>>0,d.quick_swap_cooldown_duration_ms.high>>>0).toNumber()}return m};Combat.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.combat_state=o.enums===String?"UNSET":0;d.combat_id="";d.player=null;d.opponent=null;if($util.Long){var n=new $util.Long(0,0,false);d.combat_start_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.combat_start_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.combat_end_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.combat_end_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.server_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.server_ms=o.longs===String?"0":0;d.current_turn=0;if($util.Long){var n=new $util.Long(0,0,false);d.turn_start_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.turn_start_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.minigame_end_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.minigame_end_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.minigame_submit_score_end_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.minigame_submit_score_end_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.change_pokemon_end_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.change_pokemon_end_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.quick_swap_cooldown_duration_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.quick_swap_cooldown_duration_ms=o.longs===String?"0":0}if(m.combat_state!=null&&m.hasOwnProperty("combat_state")){d.combat_state=o.enums===String?$root.POGOProtos.Data.Combat.Combat.CombatState[m.combat_state]:m.combat_state}if(m.combat_id!=null&&m.hasOwnProperty("combat_id")){d.combat_id=m.combat_id}if(m.player!=null&&m.hasOwnProperty("player")){d.player=$root.POGOProtos.Data.Combat.CombatPlayer.toObject(m.player,o)}if(m.opponent!=null&&m.hasOwnProperty("opponent")){d.opponent=$root.POGOProtos.Data.Combat.CombatPlayer.toObject(m.opponent,o)}if(m.combat_start_ms!=null&&m.hasOwnProperty("combat_start_ms")){if(typeof m.combat_start_ms==="number")d.combat_start_ms=o.longs===String?String(m.combat_start_ms):m.combat_start_ms;else d.combat_start_ms=o.longs===String?$util.Long.prototype.toString.call(m.combat_start_ms):o.longs===Number?new $util.LongBits(m.combat_start_ms.low>>>0,m.combat_start_ms.high>>>0).toNumber():m.combat_start_ms}if(m.combat_end_ms!=null&&m.hasOwnProperty("combat_end_ms")){if(typeof m.combat_end_ms==="number")d.combat_end_ms=o.longs===String?String(m.combat_end_ms):m.combat_end_ms;else d.combat_end_ms=o.longs===String?$util.Long.prototype.toString.call(m.combat_end_ms):o.longs===Number?new $util.LongBits(m.combat_end_ms.low>>>0,m.combat_end_ms.high>>>0).toNumber():m.combat_end_ms}if(m.server_ms!=null&&m.hasOwnProperty("server_ms")){if(typeof m.server_ms==="number")d.server_ms=o.longs===String?String(m.server_ms):m.server_ms;else d.server_ms=o.longs===String?$util.Long.prototype.toString.call(m.server_ms):o.longs===Number?new $util.LongBits(m.server_ms.low>>>0,m.server_ms.high>>>0).toNumber():m.server_ms}if(m.current_turn!=null&&m.hasOwnProperty("current_turn")){d.current_turn=m.current_turn}if(m.turn_start_ms!=null&&m.hasOwnProperty("turn_start_ms")){if(typeof m.turn_start_ms==="number")d.turn_start_ms=o.longs===String?String(m.turn_start_ms):m.turn_start_ms;else d.turn_start_ms=o.longs===String?$util.Long.prototype.toString.call(m.turn_start_ms):o.longs===Number?new $util.LongBits(m.turn_start_ms.low>>>0,m.turn_start_ms.high>>>0).toNumber():m.turn_start_ms}if(m.minigame_end_ms!=null&&m.hasOwnProperty("minigame_end_ms")){if(typeof m.minigame_end_ms==="number")d.minigame_end_ms=o.longs===String?String(m.minigame_end_ms):m.minigame_end_ms;else d.minigame_end_ms=o.longs===String?$util.Long.prototype.toString.call(m.minigame_end_ms):o.longs===Number?new $util.LongBits(m.minigame_end_ms.low>>>0,m.minigame_end_ms.high>>>0).toNumber():m.minigame_end_ms}if(m.minigame_submit_score_end_ms!=null&&m.hasOwnProperty("minigame_submit_score_end_ms")){if(typeof m.minigame_submit_score_end_ms==="number")d.minigame_submit_score_end_ms=o.longs===String?String(m.minigame_submit_score_end_ms):m.minigame_submit_score_end_ms;else d.minigame_submit_score_end_ms=o.longs===String?$util.Long.prototype.toString.call(m.minigame_submit_score_end_ms):o.longs===Number?new $util.LongBits(m.minigame_submit_score_end_ms.low>>>0,m.minigame_submit_score_end_ms.high>>>0).toNumber():m.minigame_submit_score_end_ms}if(m.change_pokemon_end_ms!=null&&m.hasOwnProperty("change_pokemon_end_ms")){if(typeof m.change_pokemon_end_ms==="number")d.change_pokemon_end_ms=o.longs===String?String(m.change_pokemon_end_ms):m.change_pokemon_end_ms;else d.change_pokemon_end_ms=o.longs===String?$util.Long.prototype.toString.call(m.change_pokemon_end_ms):o.longs===Number?new $util.LongBits(m.change_pokemon_end_ms.low>>>0,m.change_pokemon_end_ms.high>>>0).toNumber():m.change_pokemon_end_ms}if(m.quick_swap_cooldown_duration_ms!=null&&m.hasOwnProperty("quick_swap_cooldown_duration_ms")){if(typeof m.quick_swap_cooldown_duration_ms==="number")d.quick_swap_cooldown_duration_ms=o.longs===String?String(m.quick_swap_cooldown_duration_ms):m.quick_swap_cooldown_duration_ms;else d.quick_swap_cooldown_duration_ms=o.longs===String?$util.Long.prototype.toString.call(m.quick_swap_cooldown_duration_ms):o.longs===Number?new $util.LongBits(m.quick_swap_cooldown_duration_ms.low>>>0,m.quick_swap_cooldown_duration_ms.high>>>0).toNumber():m.quick_swap_cooldown_duration_ms}return d};Combat.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Combat.CombatState=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="WAITING_FOR_PLAYERS"]=1;values[valuesById[2]="READY"]=2;values[valuesById[3]="ACTIVE"]=3;values[valuesById[4]="SPECIAL_ATTACK"]=4;values[valuesById[5]="WAITING_FOR_CHANGE_POKEMON"]=5;values[valuesById[6]="FINISHED"]=6;values[valuesById[7]="PLAYER_QUIT"]=7;values[valuesById[8]="TIMEOUT"]=8;return values}();return Combat}();Combat.CombatAction=function(){function CombatAction(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatAction.prototype.type=0;CombatAction.prototype.action_start_turn=0;CombatAction.prototype.duration_turns=0;CombatAction.prototype.attacker_index=0;CombatAction.prototype.target_index=0;CombatAction.prototype.active_pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;CombatAction.prototype.target_pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;CombatAction.prototype.minigame_score=0;CombatAction.prototype.move=0;CombatAction.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(8).int32(m.type);if(m.action_start_turn!=null&&m.hasOwnProperty("action_start_turn"))w.uint32(24).int32(m.action_start_turn);if(m.duration_turns!=null&&m.hasOwnProperty("duration_turns"))w.uint32(40).int32(m.duration_turns);if(m.attacker_index!=null&&m.hasOwnProperty("attacker_index"))w.uint32(48).int32(m.attacker_index);if(m.target_index!=null&&m.hasOwnProperty("target_index"))w.uint32(56).int32(m.target_index);if(m.active_pokemon_id!=null&&m.hasOwnProperty("active_pokemon_id"))w.uint32(65).fixed64(m.active_pokemon_id);if(m.target_pokemon_id!=null&&m.hasOwnProperty("target_pokemon_id"))w.uint32(113).fixed64(m.target_pokemon_id);if(m.minigame_score!=null&&m.hasOwnProperty("minigame_score"))w.uint32(125).float(m.minigame_score);if(m.move!=null&&m.hasOwnProperty("move"))w.uint32(128).int32(m.move);return w};CombatAction.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.CombatAction;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.type=r.int32();break;case 3:m.action_start_turn=r.int32();break;case 5:m.duration_turns=r.int32();break;case 6:m.attacker_index=r.int32();break;case 7:m.target_index=r.int32();break;case 8:m.active_pokemon_id=r.fixed64();break;case 14:m.target_pokemon_id=r.fixed64();break;case 15:m.minigame_score=r.float();break;case 16:m.move=r.int32();break;default:r.skipType(t&7);break}}return m};CombatAction.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.CombatAction)return d;var m=new $root.POGOProtos.Data.Combat.CombatAction;switch(d.type){case"UNSET":case 0:m.type=0;break;case"ATTACK":case 1:m.type=1;break;case"SPECIAL_ATTACK":case 2:m.type=2;break;case"SPECIAL_ATTACK_2":case 3:m.type=3;break;case"MINIGAME_OFFENSIVE_FINISH":case 4:m.type=4;break;case"MINIGAME_DEFENSIVE_START":case 5:m.type=5;break;case"MINIGAME_DEFENSIVE_FINISH":case 6:m.type=6;break;case"FAINT":case 7:m.type=7;break;case"CHANGE_POKEMON":case 8:m.type=8;break;case"QUICK_SWAP_POKEMON":case 9:m.type=9;break}if(d.action_start_turn!=null){m.action_start_turn=d.action_start_turn|0}if(d.duration_turns!=null){m.duration_turns=d.duration_turns|0}if(d.attacker_index!=null){m.attacker_index=d.attacker_index|0}if(d.target_index!=null){m.target_index=d.target_index|0}if(d.active_pokemon_id!=null){if($util.Long)(m.active_pokemon_id=$util.Long.fromValue(d.active_pokemon_id)).unsigned=false;else if(typeof d.active_pokemon_id==="string")m.active_pokemon_id=parseInt(d.active_pokemon_id,10);else if(typeof d.active_pokemon_id==="number")m.active_pokemon_id=d.active_pokemon_id;else if(typeof d.active_pokemon_id==="object")m.active_pokemon_id=new $util.LongBits(d.active_pokemon_id.low>>>0,d.active_pokemon_id.high>>>0).toNumber()}if(d.target_pokemon_id!=null){if($util.Long)(m.target_pokemon_id=$util.Long.fromValue(d.target_pokemon_id)).unsigned=false;else if(typeof d.target_pokemon_id==="string")m.target_pokemon_id=parseInt(d.target_pokemon_id,10);else if(typeof d.target_pokemon_id==="number")m.target_pokemon_id=d.target_pokemon_id;else if(typeof d.target_pokemon_id==="object")m.target_pokemon_id=new $util.LongBits(d.target_pokemon_id.low>>>0,d.target_pokemon_id.high>>>0).toNumber()}if(d.minigame_score!=null){m.minigame_score=Number(d.minigame_score)}if(d.move!=null){m.move=d.move|0}return m};CombatAction.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.type=o.enums===String?"UNSET":0;d.action_start_turn=0;d.duration_turns=0;d.attacker_index=0;d.target_index=0;if($util.Long){var n=new $util.Long(0,0,false);d.active_pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.active_pokemon_id=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.target_pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.target_pokemon_id=o.longs===String?"0":0;d.minigame_score=0;d.move=0}if(m.type!=null&&m.hasOwnProperty("type")){d.type=o.enums===String?$root.POGOProtos.Data.Combat.CombatAction.ActionType[m.type]:m.type}if(m.action_start_turn!=null&&m.hasOwnProperty("action_start_turn")){d.action_start_turn=m.action_start_turn}if(m.duration_turns!=null&&m.hasOwnProperty("duration_turns")){d.duration_turns=m.duration_turns}if(m.attacker_index!=null&&m.hasOwnProperty("attacker_index")){d.attacker_index=m.attacker_index}if(m.target_index!=null&&m.hasOwnProperty("target_index")){d.target_index=m.target_index}if(m.active_pokemon_id!=null&&m.hasOwnProperty("active_pokemon_id")){if(typeof m.active_pokemon_id==="number")d.active_pokemon_id=o.longs===String?String(m.active_pokemon_id):m.active_pokemon_id;else d.active_pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.active_pokemon_id):o.longs===Number?new $util.LongBits(m.active_pokemon_id.low>>>0,m.active_pokemon_id.high>>>0).toNumber():m.active_pokemon_id}if(m.target_pokemon_id!=null&&m.hasOwnProperty("target_pokemon_id")){if(typeof m.target_pokemon_id==="number")d.target_pokemon_id=o.longs===String?String(m.target_pokemon_id):m.target_pokemon_id;else d.target_pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.target_pokemon_id):o.longs===Number?new $util.LongBits(m.target_pokemon_id.low>>>0,m.target_pokemon_id.high>>>0).toNumber():m.target_pokemon_id}if(m.minigame_score!=null&&m.hasOwnProperty("minigame_score")){d.minigame_score=o.json&&!isFinite(m.minigame_score)?String(m.minigame_score):m.minigame_score}if(m.move!=null&&m.hasOwnProperty("move")){d.move=m.move}return d};CombatAction.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CombatAction.ActionType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="ATTACK"]=1;values[valuesById[2]="SPECIAL_ATTACK"]=2;values[valuesById[3]="SPECIAL_ATTACK_2"]=3;values[valuesById[4]="MINIGAME_OFFENSIVE_FINISH"]=4;values[valuesById[5]="MINIGAME_DEFENSIVE_START"]=5;values[valuesById[6]="MINIGAME_DEFENSIVE_FINISH"]=6;values[valuesById[7]="FAINT"]=7;values[valuesById[8]="CHANGE_POKEMON"]=8;values[valuesById[9]="QUICK_SWAP_POKEMON"]=9;return values}();return CombatAction}();Combat.CombatChallenge=function(){function CombatChallenge(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatChallenge.prototype.challenge_id="";CombatChallenge.prototype.type=0;CombatChallenge.prototype.combat_league_template_id="";CombatChallenge.prototype.challenger=null;CombatChallenge.prototype.opponent=null;CombatChallenge.prototype.state=0;CombatChallenge.prototype.created_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;CombatChallenge.prototype.expiration_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;CombatChallenge.prototype.combat_id="";CombatChallenge.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id"))w.uint32(10).string(m.challenge_id);if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(16).int32(m.type);if(m.combat_league_template_id!=null&&m.hasOwnProperty("combat_league_template_id"))w.uint32(26).string(m.combat_league_template_id);if(m.challenger!=null&&m.hasOwnProperty("challenger"))$root.POGOProtos.Data.Combat.ChallengePlayer.encode(m.challenger,w.uint32(42).fork()).ldelim();if(m.opponent!=null&&m.hasOwnProperty("opponent"))$root.POGOProtos.Data.Combat.ChallengePlayer.encode(m.opponent,w.uint32(50).fork()).ldelim();if(m.state!=null&&m.hasOwnProperty("state"))w.uint32(56).int32(m.state);if(m.created_timestamp_ms!=null&&m.hasOwnProperty("created_timestamp_ms"))w.uint32(64).int64(m.created_timestamp_ms);if(m.combat_id!=null&&m.hasOwnProperty("combat_id"))w.uint32(82).string(m.combat_id);if(m.expiration_timestamp_ms!=null&&m.hasOwnProperty("expiration_timestamp_ms"))w.uint32(152).int64(m.expiration_timestamp_ms);return w};CombatChallenge.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.CombatChallenge;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.challenge_id=r.string();break;case 2:m.type=r.int32();break;case 3:m.combat_league_template_id=r.string();break;case 5:m.challenger=$root.POGOProtos.Data.Combat.ChallengePlayer.decode(r,r.uint32());break;case 6:m.opponent=$root.POGOProtos.Data.Combat.ChallengePlayer.decode(r,r.uint32());break;case 7:m.state=r.int32();break;case 8:m.created_timestamp_ms=r.int64();break;case 19:m.expiration_timestamp_ms=r.int64();break;case 10:m.combat_id=r.string();break;default:r.skipType(t&7);break}}return m};CombatChallenge.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.CombatChallenge)return d;var m=new $root.POGOProtos.Data.Combat.CombatChallenge;if(d.challenge_id!=null){m.challenge_id=String(d.challenge_id)}switch(d.type){case"COMBAT_TYPE_UNSET":case 0:m.type=0;break;case"SOLO":case 1:m.type=1;break;case"QR_CODE":case 2:m.type=2;break;case"FRIENDS":case 3:m.type=3;break;case"NEARBY_COMBAT":case 4:m.type=4;break}if(d.combat_league_template_id!=null){m.combat_league_template_id=String(d.combat_league_template_id)}if(d.challenger!=null){if(typeof d.challenger!=="object")throw TypeError(".POGOProtos.Data.Combat.CombatChallenge.challenger: object expected");m.challenger=$root.POGOProtos.Data.Combat.ChallengePlayer.fromObject(d.challenger)}if(d.opponent!=null){if(typeof d.opponent!=="object")throw TypeError(".POGOProtos.Data.Combat.CombatChallenge.opponent: object expected");m.opponent=$root.POGOProtos.Data.Combat.ChallengePlayer.fromObject(d.opponent)}switch(d.state){case"UNSET":case 0:m.state=0;break;case"CREATED":case 1:m.state=1;break;case"OPENED":case 2:m.state=2;break;case"CANCELLED":case 3:m.state=3;break;case"ACCEPTED":case 4:m.state=4;break;case"DECLINED":case 5:m.state=5;break;case"READY":case 6:m.state=6;break;case"TIMEOUT":case 7:m.state=7;break}if(d.created_timestamp_ms!=null){if($util.Long)(m.created_timestamp_ms=$util.Long.fromValue(d.created_timestamp_ms)).unsigned=false;else if(typeof d.created_timestamp_ms==="string")m.created_timestamp_ms=parseInt(d.created_timestamp_ms,10);else if(typeof d.created_timestamp_ms==="number")m.created_timestamp_ms=d.created_timestamp_ms;else if(typeof d.created_timestamp_ms==="object")m.created_timestamp_ms=new $util.LongBits(d.created_timestamp_ms.low>>>0,d.created_timestamp_ms.high>>>0).toNumber()}if(d.expiration_timestamp_ms!=null){if($util.Long)(m.expiration_timestamp_ms=$util.Long.fromValue(d.expiration_timestamp_ms)).unsigned=false;else if(typeof d.expiration_timestamp_ms==="string")m.expiration_timestamp_ms=parseInt(d.expiration_timestamp_ms,10);else if(typeof d.expiration_timestamp_ms==="number")m.expiration_timestamp_ms=d.expiration_timestamp_ms;else if(typeof d.expiration_timestamp_ms==="object")m.expiration_timestamp_ms=new $util.LongBits(d.expiration_timestamp_ms.low>>>0,d.expiration_timestamp_ms.high>>>0).toNumber()}if(d.combat_id!=null){m.combat_id=String(d.combat_id)}return m};CombatChallenge.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.challenge_id="";d.type=o.enums===String?"COMBAT_TYPE_UNSET":0;d.combat_league_template_id="";d.challenger=null;d.opponent=null;d.state=o.enums===String?"UNSET":0;if($util.Long){var n=new $util.Long(0,0,false);d.created_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.created_timestamp_ms=o.longs===String?"0":0;d.combat_id="";if($util.Long){var n=new $util.Long(0,0,false);d.expiration_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.expiration_timestamp_ms=o.longs===String?"0":0}if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id")){d.challenge_id=m.challenge_id}if(m.type!=null&&m.hasOwnProperty("type")){d.type=o.enums===String?$root.POGOProtos.Enums.CombatType[m.type]:m.type}if(m.combat_league_template_id!=null&&m.hasOwnProperty("combat_league_template_id")){d.combat_league_template_id=m.combat_league_template_id}if(m.challenger!=null&&m.hasOwnProperty("challenger")){d.challenger=$root.POGOProtos.Data.Combat.ChallengePlayer.toObject(m.challenger,o)}if(m.opponent!=null&&m.hasOwnProperty("opponent")){d.opponent=$root.POGOProtos.Data.Combat.ChallengePlayer.toObject(m.opponent,o)}if(m.state!=null&&m.hasOwnProperty("state")){d.state=o.enums===String?$root.POGOProtos.Data.Combat.CombatChallenge.CombatChallengeState[m.state]:m.state}if(m.created_timestamp_ms!=null&&m.hasOwnProperty("created_timestamp_ms")){if(typeof m.created_timestamp_ms==="number")d.created_timestamp_ms=o.longs===String?String(m.created_timestamp_ms):m.created_timestamp_ms;else d.created_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.created_timestamp_ms):o.longs===Number?new $util.LongBits(m.created_timestamp_ms.low>>>0,m.created_timestamp_ms.high>>>0).toNumber():m.created_timestamp_ms}if(m.combat_id!=null&&m.hasOwnProperty("combat_id")){d.combat_id=m.combat_id}if(m.expiration_timestamp_ms!=null&&m.hasOwnProperty("expiration_timestamp_ms")){if(typeof m.expiration_timestamp_ms==="number")d.expiration_timestamp_ms=o.longs===String?String(m.expiration_timestamp_ms):m.expiration_timestamp_ms;else d.expiration_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.expiration_timestamp_ms):o.longs===Number?new $util.LongBits(m.expiration_timestamp_ms.low>>>0,m.expiration_timestamp_ms.high>>>0).toNumber():m.expiration_timestamp_ms}return d};CombatChallenge.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CombatChallenge.CombatChallengeState=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="CREATED"]=1;values[valuesById[2]="OPENED"]=2;values[valuesById[3]="CANCELLED"]=3;values[valuesById[4]="ACCEPTED"]=4;values[valuesById[5]="DECLINED"]=5;values[valuesById[6]="READY"]=6;values[valuesById[7]="TIMEOUT"]=7;return values}();return CombatChallenge}();Combat.CombatMoveBuffs=function(){function CombatMoveBuffs(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatMoveBuffs.prototype.attacker_attack_stat_stage_change=0;CombatMoveBuffs.prototype.attacker_defense_stat_stage_change=0;CombatMoveBuffs.prototype.target_attack_stat_stage_change=0;CombatMoveBuffs.prototype.target_defense_stat_stage_change=0;CombatMoveBuffs.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.attacker_attack_stat_stage_change!=null&&m.hasOwnProperty("attacker_attack_stat_stage_change"))w.uint32(8).int32(m.attacker_attack_stat_stage_change);if(m.attacker_defense_stat_stage_change!=null&&m.hasOwnProperty("attacker_defense_stat_stage_change"))w.uint32(16).int32(m.attacker_defense_stat_stage_change);if(m.target_attack_stat_stage_change!=null&&m.hasOwnProperty("target_attack_stat_stage_change"))w.uint32(24).int32(m.target_attack_stat_stage_change);if(m.target_defense_stat_stage_change!=null&&m.hasOwnProperty("target_defense_stat_stage_change"))w.uint32(32).int32(m.target_defense_stat_stage_change);return w};CombatMoveBuffs.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.CombatMoveBuffs;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.attacker_attack_stat_stage_change=r.int32();break;case 2:m.attacker_defense_stat_stage_change=r.int32();break;case 3:m.target_attack_stat_stage_change=r.int32();break;case 4:m.target_defense_stat_stage_change=r.int32();break;default:r.skipType(t&7);break}}return m};CombatMoveBuffs.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.CombatMoveBuffs)return d;var m=new $root.POGOProtos.Data.Combat.CombatMoveBuffs;if(d.attacker_attack_stat_stage_change!=null){m.attacker_attack_stat_stage_change=d.attacker_attack_stat_stage_change|0}if(d.attacker_defense_stat_stage_change!=null){m.attacker_defense_stat_stage_change=d.attacker_defense_stat_stage_change|0}if(d.target_attack_stat_stage_change!=null){m.target_attack_stat_stage_change=d.target_attack_stat_stage_change|0}if(d.target_defense_stat_stage_change!=null){m.target_defense_stat_stage_change=d.target_defense_stat_stage_change|0}return m};CombatMoveBuffs.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.attacker_attack_stat_stage_change=0;d.attacker_defense_stat_stage_change=0;d.target_attack_stat_stage_change=0;d.target_defense_stat_stage_change=0}if(m.attacker_attack_stat_stage_change!=null&&m.hasOwnProperty("attacker_attack_stat_stage_change")){d.attacker_attack_stat_stage_change=m.attacker_attack_stat_stage_change}if(m.attacker_defense_stat_stage_change!=null&&m.hasOwnProperty("attacker_defense_stat_stage_change")){d.attacker_defense_stat_stage_change=m.attacker_defense_stat_stage_change}if(m.target_attack_stat_stage_change!=null&&m.hasOwnProperty("target_attack_stat_stage_change")){d.target_attack_stat_stage_change=m.target_attack_stat_stage_change}if(m.target_defense_stat_stage_change!=null&&m.hasOwnProperty("target_defense_stat_stage_change")){d.target_defense_stat_stage_change=m.target_defense_stat_stage_change}return d};CombatMoveBuffs.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatMoveBuffs}();Combat.CombatPlayer=function(){function CombatPlayer(p){this.reserve_pokemon=[];this.fainted_pokemon=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatPlayer.prototype.public_profile=null;CombatPlayer.prototype.active_pokemon=null;CombatPlayer.prototype.reserve_pokemon=$util.emptyArray;CombatPlayer.prototype.fainted_pokemon=$util.emptyArray;CombatPlayer.prototype.current_action=null;CombatPlayer.prototype.lockstep_ack=false;CombatPlayer.prototype.last_updated_turn=0;CombatPlayer.prototype.minigame_action=null;CombatPlayer.prototype.quick_swap_available_ms=$util.Long?$util.Long.fromBits(0,0,false):0;CombatPlayer.prototype.minigame_defense_chances_left=0;CombatPlayer.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.public_profile!=null&&m.hasOwnProperty("public_profile"))$root.POGOProtos.Data.Player.PlayerPublicProfile.encode(m.public_profile,w.uint32(10).fork()).ldelim();if(m.active_pokemon!=null&&m.hasOwnProperty("active_pokemon"))$root.POGOProtos.Data.Combat.CombatPokemon.encode(m.active_pokemon,w.uint32(18).fork()).ldelim();if(m.reserve_pokemon!=null&&m.reserve_pokemon.length){for(var i=0;i<m.reserve_pokemon.length;++i)$root.POGOProtos.Data.Combat.CombatPokemon.encode(m.reserve_pokemon[i],w.uint32(26).fork()).ldelim()}if(m.fainted_pokemon!=null&&m.fainted_pokemon.length){for(var i=0;i<m.fainted_pokemon.length;++i)$root.POGOProtos.Data.Combat.CombatPokemon.encode(m.fainted_pokemon[i],w.uint32(34).fork()).ldelim()}if(m.current_action!=null&&m.hasOwnProperty("current_action"))$root.POGOProtos.Data.Combat.CombatAction.encode(m.current_action,w.uint32(42).fork()).ldelim();if(m.lockstep_ack!=null&&m.hasOwnProperty("lockstep_ack"))w.uint32(48).bool(m.lockstep_ack);if(m.last_updated_turn!=null&&m.hasOwnProperty("last_updated_turn"))w.uint32(56).int32(m.last_updated_turn);if(m.minigame_action!=null&&m.hasOwnProperty("minigame_action"))$root.POGOProtos.Data.Combat.CombatAction.encode(m.minigame_action,w.uint32(66).fork()).ldelim();if(m.quick_swap_available_ms!=null&&m.hasOwnProperty("quick_swap_available_ms"))w.uint32(72).int64(m.quick_swap_available_ms);if(m.minigame_defense_chances_left!=null&&m.hasOwnProperty("minigame_defense_chances_left"))w.uint32(80).int32(m.minigame_defense_chances_left);return w};CombatPlayer.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.CombatPlayer;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.decode(r,r.uint32());break;case 2:m.active_pokemon=$root.POGOProtos.Data.Combat.CombatPokemon.decode(r,r.uint32());break;case 3:if(!(m.reserve_pokemon&&m.reserve_pokemon.length))m.reserve_pokemon=[];m.reserve_pokemon.push($root.POGOProtos.Data.Combat.CombatPokemon.decode(r,r.uint32()));break;case 4:if(!(m.fainted_pokemon&&m.fainted_pokemon.length))m.fainted_pokemon=[];m.fainted_pokemon.push($root.POGOProtos.Data.Combat.CombatPokemon.decode(r,r.uint32()));break;case 5:m.current_action=$root.POGOProtos.Data.Combat.CombatAction.decode(r,r.uint32());break;case 6:m.lockstep_ack=r.bool();break;case 7:m.last_updated_turn=r.int32();break;case 8:m.minigame_action=$root.POGOProtos.Data.Combat.CombatAction.decode(r,r.uint32());break;case 9:m.quick_swap_available_ms=r.int64();break;case 10:m.minigame_defense_chances_left=r.int32();break;default:r.skipType(t&7);break}}return m};CombatPlayer.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.CombatPlayer)return d;var m=new $root.POGOProtos.Data.Combat.CombatPlayer;if(d.public_profile!=null){if(typeof d.public_profile!=="object")throw TypeError(".POGOProtos.Data.Combat.CombatPlayer.public_profile: object expected");m.public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.fromObject(d.public_profile)}if(d.active_pokemon!=null){if(typeof d.active_pokemon!=="object")throw TypeError(".POGOProtos.Data.Combat.CombatPlayer.active_pokemon: object expected");m.active_pokemon=$root.POGOProtos.Data.Combat.CombatPokemon.fromObject(d.active_pokemon)}if(d.reserve_pokemon){if(!Array.isArray(d.reserve_pokemon))throw TypeError(".POGOProtos.Data.Combat.CombatPlayer.reserve_pokemon: array expected");m.reserve_pokemon=[];for(var i=0;i<d.reserve_pokemon.length;++i){if(typeof d.reserve_pokemon[i]!=="object")throw TypeError(".POGOProtos.Data.Combat.CombatPlayer.reserve_pokemon: object expected");m.reserve_pokemon[i]=$root.POGOProtos.Data.Combat.CombatPokemon.fromObject(d.reserve_pokemon[i])}}if(d.fainted_pokemon){if(!Array.isArray(d.fainted_pokemon))throw TypeError(".POGOProtos.Data.Combat.CombatPlayer.fainted_pokemon: array expected");m.fainted_pokemon=[];for(var i=0;i<d.fainted_pokemon.length;++i){if(typeof d.fainted_pokemon[i]!=="object")throw TypeError(".POGOProtos.Data.Combat.CombatPlayer.fainted_pokemon: object expected");m.fainted_pokemon[i]=$root.POGOProtos.Data.Combat.CombatPokemon.fromObject(d.fainted_pokemon[i])}}if(d.current_action!=null){if(typeof d.current_action!=="object")throw TypeError(".POGOProtos.Data.Combat.CombatPlayer.current_action: object expected");m.current_action=$root.POGOProtos.Data.Combat.CombatAction.fromObject(d.current_action)}if(d.lockstep_ack!=null){m.lockstep_ack=Boolean(d.lockstep_ack)}if(d.last_updated_turn!=null){m.last_updated_turn=d.last_updated_turn|0}if(d.minigame_action!=null){if(typeof d.minigame_action!=="object")throw TypeError(".POGOProtos.Data.Combat.CombatPlayer.minigame_action: object expected");m.minigame_action=$root.POGOProtos.Data.Combat.CombatAction.fromObject(d.minigame_action)}if(d.quick_swap_available_ms!=null){if($util.Long)(m.quick_swap_available_ms=$util.Long.fromValue(d.quick_swap_available_ms)).unsigned=false;else if(typeof d.quick_swap_available_ms==="string")m.quick_swap_available_ms=parseInt(d.quick_swap_available_ms,10);else if(typeof d.quick_swap_available_ms==="number")m.quick_swap_available_ms=d.quick_swap_available_ms;else if(typeof d.quick_swap_available_ms==="object")m.quick_swap_available_ms=new $util.LongBits(d.quick_swap_available_ms.low>>>0,d.quick_swap_available_ms.high>>>0).toNumber()}if(d.minigame_defense_chances_left!=null){m.minigame_defense_chances_left=d.minigame_defense_chances_left|0}return m};CombatPlayer.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.reserve_pokemon=[];d.fainted_pokemon=[]}if(o.defaults){d.public_profile=null;d.active_pokemon=null;d.current_action=null;d.lockstep_ack=false;d.last_updated_turn=0;d.minigame_action=null;if($util.Long){var n=new $util.Long(0,0,false);d.quick_swap_available_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.quick_swap_available_ms=o.longs===String?"0":0;d.minigame_defense_chances_left=0}if(m.public_profile!=null&&m.hasOwnProperty("public_profile")){d.public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.toObject(m.public_profile,o)}if(m.active_pokemon!=null&&m.hasOwnProperty("active_pokemon")){d.active_pokemon=$root.POGOProtos.Data.Combat.CombatPokemon.toObject(m.active_pokemon,o)}if(m.reserve_pokemon&&m.reserve_pokemon.length){d.reserve_pokemon=[];for(var j=0;j<m.reserve_pokemon.length;++j){d.reserve_pokemon[j]=$root.POGOProtos.Data.Combat.CombatPokemon.toObject(m.reserve_pokemon[j],o)}}if(m.fainted_pokemon&&m.fainted_pokemon.length){d.fainted_pokemon=[];for(var j=0;j<m.fainted_pokemon.length;++j){d.fainted_pokemon[j]=$root.POGOProtos.Data.Combat.CombatPokemon.toObject(m.fainted_pokemon[j],o)}}if(m.current_action!=null&&m.hasOwnProperty("current_action")){d.current_action=$root.POGOProtos.Data.Combat.CombatAction.toObject(m.current_action,o)}if(m.lockstep_ack!=null&&m.hasOwnProperty("lockstep_ack")){d.lockstep_ack=m.lockstep_ack}if(m.last_updated_turn!=null&&m.hasOwnProperty("last_updated_turn")){d.last_updated_turn=m.last_updated_turn}if(m.minigame_action!=null&&m.hasOwnProperty("minigame_action")){d.minigame_action=$root.POGOProtos.Data.Combat.CombatAction.toObject(m.minigame_action,o)}if(m.quick_swap_available_ms!=null&&m.hasOwnProperty("quick_swap_available_ms")){if(typeof m.quick_swap_available_ms==="number")d.quick_swap_available_ms=o.longs===String?String(m.quick_swap_available_ms):m.quick_swap_available_ms;else d.quick_swap_available_ms=o.longs===String?$util.Long.prototype.toString.call(m.quick_swap_available_ms):o.longs===Number?new $util.LongBits(m.quick_swap_available_ms.low>>>0,m.quick_swap_available_ms.high>>>0).toNumber():m.quick_swap_available_ms}if(m.minigame_defense_chances_left!=null&&m.hasOwnProperty("minigame_defense_chances_left")){d.minigame_defense_chances_left=m.minigame_defense_chances_left}return d};CombatPlayer.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatPlayer}();Combat.CombatPlayerPreferences=function(){function CombatPlayerPreferences(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatPlayerPreferences.prototype.friends_combat_opt_out=false;CombatPlayerPreferences.prototype.nearby_combat_opt_in=false;CombatPlayerPreferences.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.friends_combat_opt_out!=null&&m.hasOwnProperty("friends_combat_opt_out"))w.uint32(8).bool(m.friends_combat_opt_out);if(m.nearby_combat_opt_in!=null&&m.hasOwnProperty("nearby_combat_opt_in"))w.uint32(16).bool(m.nearby_combat_opt_in);return w};CombatPlayerPreferences.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.CombatPlayerPreferences;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.friends_combat_opt_out=r.bool();break;case 2:m.nearby_combat_opt_in=r.bool();break;default:r.skipType(t&7);break}}return m};CombatPlayerPreferences.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.CombatPlayerPreferences)return d;var m=new $root.POGOProtos.Data.Combat.CombatPlayerPreferences;if(d.friends_combat_opt_out!=null){m.friends_combat_opt_out=Boolean(d.friends_combat_opt_out)}if(d.nearby_combat_opt_in!=null){m.nearby_combat_opt_in=Boolean(d.nearby_combat_opt_in)}return m};CombatPlayerPreferences.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.friends_combat_opt_out=false;d.nearby_combat_opt_in=false}if(m.friends_combat_opt_out!=null&&m.hasOwnProperty("friends_combat_opt_out")){d.friends_combat_opt_out=m.friends_combat_opt_out}if(m.nearby_combat_opt_in!=null&&m.hasOwnProperty("nearby_combat_opt_in")){d.nearby_combat_opt_in=m.nearby_combat_opt_in}return d};CombatPlayerPreferences.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatPlayerPreferences}();Combat.CombatPlayerProfile=function(){function CombatPlayerProfile(p){this.combat_league_template_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatPlayerProfile.prototype.player_id="";CombatPlayerProfile.prototype.public_profile=null;CombatPlayerProfile.prototype.combat_league_template_id=$util.emptyArray;CombatPlayerProfile.prototype.buddy_pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;CombatPlayerProfile.prototype.location=null;CombatPlayerProfile.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);if(m.public_profile!=null&&m.hasOwnProperty("public_profile"))$root.POGOProtos.Data.Player.PlayerPublicProfile.encode(m.public_profile,w.uint32(18).fork()).ldelim();if(m.combat_league_template_id!=null&&m.combat_league_template_id.length){for(var i=0;i<m.combat_league_template_id.length;++i)w.uint32(26).string(m.combat_league_template_id[i])}if(m.buddy_pokemon_id!=null&&m.hasOwnProperty("buddy_pokemon_id"))w.uint32(33).fixed64(m.buddy_pokemon_id);if(m.location!=null&&m.hasOwnProperty("location"))$root.POGOProtos.Data.Location.encode(m.location,w.uint32(42).fork()).ldelim();return w};CombatPlayerProfile.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.CombatPlayerProfile;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;case 2:m.public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.decode(r,r.uint32());break;case 3:if(!(m.combat_league_template_id&&m.combat_league_template_id.length))m.combat_league_template_id=[];m.combat_league_template_id.push(r.string());break;case 4:m.buddy_pokemon_id=r.fixed64();break;case 5:m.location=$root.POGOProtos.Data.Location.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};CombatPlayerProfile.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.CombatPlayerProfile)return d;var m=new $root.POGOProtos.Data.Combat.CombatPlayerProfile;if(d.player_id!=null){m.player_id=String(d.player_id)}if(d.public_profile!=null){if(typeof d.public_profile!=="object")throw TypeError(".POGOProtos.Data.Combat.CombatPlayerProfile.public_profile: object expected");m.public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.fromObject(d.public_profile)}if(d.combat_league_template_id){if(!Array.isArray(d.combat_league_template_id))throw TypeError(".POGOProtos.Data.Combat.CombatPlayerProfile.combat_league_template_id: array expected");m.combat_league_template_id=[];for(var i=0;i<d.combat_league_template_id.length;++i){m.combat_league_template_id[i]=String(d.combat_league_template_id[i])}}if(d.buddy_pokemon_id!=null){if($util.Long)(m.buddy_pokemon_id=$util.Long.fromValue(d.buddy_pokemon_id)).unsigned=false;else if(typeof d.buddy_pokemon_id==="string")m.buddy_pokemon_id=parseInt(d.buddy_pokemon_id,10);else if(typeof d.buddy_pokemon_id==="number")m.buddy_pokemon_id=d.buddy_pokemon_id;else if(typeof d.buddy_pokemon_id==="object")m.buddy_pokemon_id=new $util.LongBits(d.buddy_pokemon_id.low>>>0,d.buddy_pokemon_id.high>>>0).toNumber()}if(d.location!=null){if(typeof d.location!=="object")throw TypeError(".POGOProtos.Data.Combat.CombatPlayerProfile.location: object expected");m.location=$root.POGOProtos.Data.Location.fromObject(d.location)}return m};CombatPlayerProfile.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.combat_league_template_id=[]}if(o.defaults){d.player_id="";d.public_profile=null;if($util.Long){var n=new $util.Long(0,0,false);d.buddy_pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.buddy_pokemon_id=o.longs===String?"0":0;d.location=null}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}if(m.public_profile!=null&&m.hasOwnProperty("public_profile")){d.public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.toObject(m.public_profile,o)}if(m.combat_league_template_id&&m.combat_league_template_id.length){d.combat_league_template_id=[];for(var j=0;j<m.combat_league_template_id.length;++j){d.combat_league_template_id[j]=m.combat_league_template_id[j]}}if(m.buddy_pokemon_id!=null&&m.hasOwnProperty("buddy_pokemon_id")){if(typeof m.buddy_pokemon_id==="number")d.buddy_pokemon_id=o.longs===String?String(m.buddy_pokemon_id):m.buddy_pokemon_id;else d.buddy_pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.buddy_pokemon_id):o.longs===Number?new $util.LongBits(m.buddy_pokemon_id.low>>>0,m.buddy_pokemon_id.high>>>0).toNumber():m.buddy_pokemon_id}if(m.location!=null&&m.hasOwnProperty("location")){d.location=$root.POGOProtos.Data.Location.toObject(m.location,o)}return d};CombatPlayerProfile.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatPlayerProfile}();Combat.CombatPokemon=function(){function CombatPokemon(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatPokemon.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;CombatPokemon.prototype.pokedex_id=0;CombatPokemon.prototype.cp=0;CombatPokemon.prototype.cp_multiplier=0;CombatPokemon.prototype.stamina=0;CombatPokemon.prototype.max_stamina=0;CombatPokemon.prototype.move1=0;CombatPokemon.prototype.move2=0;CombatPokemon.prototype.move3=0;CombatPokemon.prototype.energy=0;CombatPokemon.prototype.pokemon_display=null;CombatPokemon.prototype.individual_attack=0;CombatPokemon.prototype.individual_defense=0;CombatPokemon.prototype.individual_stamina=0;CombatPokemon.prototype.attack_stat_stage=0;CombatPokemon.prototype.defense_stat_stage=0;CombatPokemon.prototype.battles_won=0;CombatPokemon.prototype.battles_lost=0;CombatPokemon.prototype.nickname="";CombatPokemon.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(9).fixed64(m.pokemon_id);if(m.pokedex_id!=null&&m.hasOwnProperty("pokedex_id"))w.uint32(16).int32(m.pokedex_id);if(m.cp!=null&&m.hasOwnProperty("cp"))w.uint32(24).int32(m.cp);if(m.cp_multiplier!=null&&m.hasOwnProperty("cp_multiplier"))w.uint32(37).float(m.cp_multiplier);if(m.stamina!=null&&m.hasOwnProperty("stamina"))w.uint32(40).int32(m.stamina);if(m.max_stamina!=null&&m.hasOwnProperty("max_stamina"))w.uint32(48).int32(m.max_stamina);if(m.move1!=null&&m.hasOwnProperty("move1"))w.uint32(56).int32(m.move1);if(m.move2!=null&&m.hasOwnProperty("move2"))w.uint32(64).int32(m.move2);if(m.move3!=null&&m.hasOwnProperty("move3"))w.uint32(72).int32(m.move3);if(m.energy!=null&&m.hasOwnProperty("energy"))w.uint32(80).int32(m.energy);if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display"))$root.POGOProtos.Data.PokemonDisplay.encode(m.pokemon_display,w.uint32(90).fork()).ldelim();if(m.individual_attack!=null&&m.hasOwnProperty("individual_attack"))w.uint32(96).int32(m.individual_attack);if(m.individual_defense!=null&&m.hasOwnProperty("individual_defense"))w.uint32(104).int32(m.individual_defense);if(m.individual_stamina!=null&&m.hasOwnProperty("individual_stamina"))w.uint32(112).int32(m.individual_stamina);if(m.attack_stat_stage!=null&&m.hasOwnProperty("attack_stat_stage"))w.uint32(120).int32(m.attack_stat_stage);if(m.defense_stat_stage!=null&&m.hasOwnProperty("defense_stat_stage"))w.uint32(128).int32(m.defense_stat_stage);if(m.battles_won!=null&&m.hasOwnProperty("battles_won"))w.uint32(136).int32(m.battles_won);if(m.battles_lost!=null&&m.hasOwnProperty("battles_lost"))w.uint32(144).int32(m.battles_lost);if(m.nickname!=null&&m.hasOwnProperty("nickname"))w.uint32(154).string(m.nickname);return w};CombatPokemon.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.CombatPokemon;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.fixed64();break;case 2:m.pokedex_id=r.int32();break;case 3:m.cp=r.int32();break;case 4:m.cp_multiplier=r.float();break;case 5:m.stamina=r.int32();break;case 6:m.max_stamina=r.int32();break;case 7:m.move1=r.int32();break;case 8:m.move2=r.int32();break;case 9:m.move3=r.int32();break;case 10:m.energy=r.int32();break;case 11:m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;case 12:m.individual_attack=r.int32();break;case 13:m.individual_defense=r.int32();break;case 14:m.individual_stamina=r.int32();break;case 15:m.attack_stat_stage=r.int32();break;case 16:m.defense_stat_stage=r.int32();break;case 17:m.battles_won=r.int32();break;case 18:m.battles_lost=r.int32();break;case 19:m.nickname=r.string();break;default:r.skipType(t&7);break}}return m};CombatPokemon.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.CombatPokemon)return d;var m=new $root.POGOProtos.Data.Combat.CombatPokemon;if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}switch(d.pokedex_id){case"MISSINGNO":case 0:m.pokedex_id=0;break;case"BULBASAUR":case 1:m.pokedex_id=1;break;case"IVYSAUR":case 2:m.pokedex_id=2;break;case"VENUSAUR":case 3:m.pokedex_id=3;break;case"CHARMANDER":case 4:m.pokedex_id=4;break;case"CHARMELEON":case 5:m.pokedex_id=5;break;case"CHARIZARD":case 6:m.pokedex_id=6;break;case"SQUIRTLE":case 7:m.pokedex_id=7;break;case"WARTORTLE":case 8:m.pokedex_id=8;break;case"BLASTOISE":case 9:m.pokedex_id=9;break;case"CATERPIE":case 10:m.pokedex_id=10;break;case"METAPOD":case 11:m.pokedex_id=11;break;case"BUTTERFREE":case 12:m.pokedex_id=12;break;case"WEEDLE":case 13:m.pokedex_id=13;break;case"KAKUNA":case 14:m.pokedex_id=14;break;case"BEEDRILL":case 15:m.pokedex_id=15;break;case"PIDGEY":case 16:m.pokedex_id=16;break;case"PIDGEOTTO":case 17:m.pokedex_id=17;break;case"PIDGEOT":case 18:m.pokedex_id=18;break;case"RATTATA":case 19:m.pokedex_id=19;break;case"RATICATE":case 20:m.pokedex_id=20;break;case"SPEAROW":case 21:m.pokedex_id=21;break;case"FEAROW":case 22:m.pokedex_id=22;break;case"EKANS":case 23:m.pokedex_id=23;break;case"ARBOK":case 24:m.pokedex_id=24;break;case"PIKACHU":case 25:m.pokedex_id=25;break;case"RAICHU":case 26:m.pokedex_id=26;break;case"SANDSHREW":case 27:m.pokedex_id=27;break;case"SANDSLASH":case 28:m.pokedex_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokedex_id=29;break;case"NIDORINA":case 30:m.pokedex_id=30;break;case"NIDOQUEEN":case 31:m.pokedex_id=31;break;case"NIDORAN_MALE":case 32:m.pokedex_id=32;break;case"NIDORINO":case 33:m.pokedex_id=33;break;case"NIDOKING":case 34:m.pokedex_id=34;break;case"CLEFAIRY":case 35:m.pokedex_id=35;break;case"CLEFABLE":case 36:m.pokedex_id=36;break;case"VULPIX":case 37:m.pokedex_id=37;break;case"NINETALES":case 38:m.pokedex_id=38;break;case"JIGGLYPUFF":case 39:m.pokedex_id=39;break;case"WIGGLYTUFF":case 40:m.pokedex_id=40;break;case"ZUBAT":case 41:m.pokedex_id=41;break;case"GOLBAT":case 42:m.pokedex_id=42;break;case"ODDISH":case 43:m.pokedex_id=43;break;case"GLOOM":case 44:m.pokedex_id=44;break;case"VILEPLUME":case 45:m.pokedex_id=45;break;case"PARAS":case 46:m.pokedex_id=46;break;case"PARASECT":case 47:m.pokedex_id=47;break;case"VENONAT":case 48:m.pokedex_id=48;break;case"VENOMOTH":case 49:m.pokedex_id=49;break;case"DIGLETT":case 50:m.pokedex_id=50;break;case"DUGTRIO":case 51:m.pokedex_id=51;break;case"MEOWTH":case 52:m.pokedex_id=52;break;case"PERSIAN":case 53:m.pokedex_id=53;break;case"PSYDUCK":case 54:m.pokedex_id=54;break;case"GOLDUCK":case 55:m.pokedex_id=55;break;case"MANKEY":case 56:m.pokedex_id=56;break;case"PRIMEAPE":case 57:m.pokedex_id=57;break;case"GROWLITHE":case 58:m.pokedex_id=58;break;case"ARCANINE":case 59:m.pokedex_id=59;break;case"POLIWAG":case 60:m.pokedex_id=60;break;case"POLIWHIRL":case 61:m.pokedex_id=61;break;case"POLIWRATH":case 62:m.pokedex_id=62;break;case"ABRA":case 63:m.pokedex_id=63;break;case"KADABRA":case 64:m.pokedex_id=64;break;case"ALAKAZAM":case 65:m.pokedex_id=65;break;case"MACHOP":case 66:m.pokedex_id=66;break;case"MACHOKE":case 67:m.pokedex_id=67;break;case"MACHAMP":case 68:m.pokedex_id=68;break;case"BELLSPROUT":case 69:m.pokedex_id=69;break;case"WEEPINBELL":case 70:m.pokedex_id=70;break;case"VICTREEBEL":case 71:m.pokedex_id=71;break;case"TENTACOOL":case 72:m.pokedex_id=72;break;case"TENTACRUEL":case 73:m.pokedex_id=73;break;case"GEODUDE":case 74:m.pokedex_id=74;break;case"GRAVELER":case 75:m.pokedex_id=75;break;case"GOLEM":case 76:m.pokedex_id=76;break;case"PONYTA":case 77:m.pokedex_id=77;break;case"RAPIDASH":case 78:m.pokedex_id=78;break;case"SLOWPOKE":case 79:m.pokedex_id=79;break;case"SLOWBRO":case 80:m.pokedex_id=80;break;case"MAGNEMITE":case 81:m.pokedex_id=81;break;case"MAGNETON":case 82:m.pokedex_id=82;break;case"FARFETCHD":case 83:m.pokedex_id=83;break;case"DODUO":case 84:m.pokedex_id=84;break;case"DODRIO":case 85:m.pokedex_id=85;break;case"SEEL":case 86:m.pokedex_id=86;break;case"DEWGONG":case 87:m.pokedex_id=87;break;case"GRIMER":case 88:m.pokedex_id=88;break;case"MUK":case 89:m.pokedex_id=89;break;case"SHELLDER":case 90:m.pokedex_id=90;break;case"CLOYSTER":case 91:m.pokedex_id=91;break;case"GASTLY":case 92:m.pokedex_id=92;break;case"HAUNTER":case 93:m.pokedex_id=93;break;case"GENGAR":case 94:m.pokedex_id=94;break;case"ONIX":case 95:m.pokedex_id=95;break;case"DROWZEE":case 96:m.pokedex_id=96;break;case"HYPNO":case 97:m.pokedex_id=97;break;case"KRABBY":case 98:m.pokedex_id=98;break;case"KINGLER":case 99:m.pokedex_id=99;break;case"VOLTORB":case 100:m.pokedex_id=100;break;case"ELECTRODE":case 101:m.pokedex_id=101;break;case"EXEGGCUTE":case 102:m.pokedex_id=102;break;case"EXEGGUTOR":case 103:m.pokedex_id=103;break;case"CUBONE":case 104:m.pokedex_id=104;break;case"MAROWAK":case 105:m.pokedex_id=105;break;case"HITMONLEE":case 106:m.pokedex_id=106;break;case"HITMONCHAN":case 107:m.pokedex_id=107;break;case"LICKITUNG":case 108:m.pokedex_id=108;break;case"KOFFING":case 109:m.pokedex_id=109;break;case"WEEZING":case 110:m.pokedex_id=110;break;case"RHYHORN":case 111:m.pokedex_id=111;break;case"RHYDON":case 112:m.pokedex_id=112;break;case"CHANSEY":case 113:m.pokedex_id=113;break;case"TANGELA":case 114:m.pokedex_id=114;break;case"KANGASKHAN":case 115:m.pokedex_id=115;break;case"HORSEA":case 116:m.pokedex_id=116;break;case"SEADRA":case 117:m.pokedex_id=117;break;case"GOLDEEN":case 118:m.pokedex_id=118;break;case"SEAKING":case 119:m.pokedex_id=119;break;case"STARYU":case 120:m.pokedex_id=120;break;case"STARMIE":case 121:m.pokedex_id=121;break;case"MR_MIME":case 122:m.pokedex_id=122;break;case"SCYTHER":case 123:m.pokedex_id=123;break;case"JYNX":case 124:m.pokedex_id=124;break;case"ELECTABUZZ":case 125:m.pokedex_id=125;break;case"MAGMAR":case 126:m.pokedex_id=126;break;case"PINSIR":case 127:m.pokedex_id=127;break;case"TAUROS":case 128:m.pokedex_id=128;break;case"MAGIKARP":case 129:m.pokedex_id=129;break;case"GYARADOS":case 130:m.pokedex_id=130;break;case"LAPRAS":case 131:m.pokedex_id=131;break;case"DITTO":case 132:m.pokedex_id=132;break;case"EEVEE":case 133:m.pokedex_id=133;break;case"VAPOREON":case 134:m.pokedex_id=134;break;case"JOLTEON":case 135:m.pokedex_id=135;break;case"FLAREON":case 136:m.pokedex_id=136;break;case"PORYGON":case 137:m.pokedex_id=137;break;case"OMANYTE":case 138:m.pokedex_id=138;break;case"OMASTAR":case 139:m.pokedex_id=139;break;case"KABUTO":case 140:m.pokedex_id=140;break;case"KABUTOPS":case 141:m.pokedex_id=141;break;case"AERODACTYL":case 142:m.pokedex_id=142;break;case"SNORLAX":case 143:m.pokedex_id=143;break;case"ARTICUNO":case 144:m.pokedex_id=144;break;case"ZAPDOS":case 145:m.pokedex_id=145;break;case"MOLTRES":case 146:m.pokedex_id=146;break;case"DRATINI":case 147:m.pokedex_id=147;break;case"DRAGONAIR":case 148:m.pokedex_id=148;break;case"DRAGONITE":case 149:m.pokedex_id=149;break;case"MEWTWO":case 150:m.pokedex_id=150;break;case"MEW":case 151:m.pokedex_id=151;break;case"CHIKORITA":case 152:m.pokedex_id=152;break;case"BAYLEEF":case 153:m.pokedex_id=153;break;case"MEGANIUM":case 154:m.pokedex_id=154;break;case"CYNDAQUIL":case 155:m.pokedex_id=155;break;case"QUILAVA":case 156:m.pokedex_id=156;break;case"TYPHLOSION":case 157:m.pokedex_id=157;break;case"TOTODILE":case 158:m.pokedex_id=158;break;case"CROCONAW":case 159:m.pokedex_id=159;break;case"FERALIGATR":case 160:m.pokedex_id=160;break;case"SENTRET":case 161:m.pokedex_id=161;break;case"FURRET":case 162:m.pokedex_id=162;break;case"HOOTHOOT":case 163:m.pokedex_id=163;break;case"NOCTOWL":case 164:m.pokedex_id=164;break;case"LEDYBA":case 165:m.pokedex_id=165;break;case"LEDIAN":case 166:m.pokedex_id=166;break;case"SPINARAK":case 167:m.pokedex_id=167;break;case"ARIADOS":case 168:m.pokedex_id=168;break;case"CROBAT":case 169:m.pokedex_id=169;break;case"CHINCHOU":case 170:m.pokedex_id=170;break;case"LANTURN":case 171:m.pokedex_id=171;break;case"PICHU":case 172:m.pokedex_id=172;break;case"CLEFFA":case 173:m.pokedex_id=173;break;case"IGGLYBUFF":case 174:m.pokedex_id=174;break;case"TOGEPI":case 175:m.pokedex_id=175;break;case"TOGETIC":case 176:m.pokedex_id=176;break;case"NATU":case 177:m.pokedex_id=177;break;case"XATU":case 178:m.pokedex_id=178;break;case"MAREEP":case 179:m.pokedex_id=179;break;case"FLAAFFY":case 180:m.pokedex_id=180;break;case"AMPHAROS":case 181:m.pokedex_id=181;break;case"BELLOSSOM":case 182:m.pokedex_id=182;break;case"MARILL":case 183:m.pokedex_id=183;break;case"AZUMARILL":case 184:m.pokedex_id=184;break;case"SUDOWOODO":case 185:m.pokedex_id=185;break;case"POLITOED":case 186:m.pokedex_id=186;break;case"HOPPIP":case 187:m.pokedex_id=187;break;case"SKIPLOOM":case 188:m.pokedex_id=188;break;case"JUMPLUFF":case 189:m.pokedex_id=189;break;case"AIPOM":case 190:m.pokedex_id=190;break;case"SUNKERN":case 191:m.pokedex_id=191;break;case"SUNFLORA":case 192:m.pokedex_id=192;break;case"YANMA":case 193:m.pokedex_id=193;break;case"WOOPER":case 194:m.pokedex_id=194;break;case"QUAGSIRE":case 195:m.pokedex_id=195;break;case"ESPEON":case 196:m.pokedex_id=196;break;case"UMBREON":case 197:m.pokedex_id=197;break;case"MURKROW":case 198:m.pokedex_id=198;break;case"SLOWKING":case 199:m.pokedex_id=199;break;case"MISDREAVUS":case 200:m.pokedex_id=200;break;case"UNOWN":case 201:m.pokedex_id=201;break;case"WOBBUFFET":case 202:m.pokedex_id=202;break;case"GIRAFARIG":case 203:m.pokedex_id=203;break;case"PINECO":case 204:m.pokedex_id=204;break;case"FORRETRESS":case 205:m.pokedex_id=205;break;case"DUNSPARCE":case 206:m.pokedex_id=206;break;case"GLIGAR":case 207:m.pokedex_id=207;break;case"STEELIX":case 208:m.pokedex_id=208;break;case"SNUBBULL":case 209:m.pokedex_id=209;break;case"GRANBULL":case 210:m.pokedex_id=210;break;case"QWILFISH":case 211:m.pokedex_id=211;break;case"SCIZOR":case 212:m.pokedex_id=212;break;case"SHUCKLE":case 213:m.pokedex_id=213;break;case"HERACROSS":case 214:m.pokedex_id=214;break;case"SNEASEL":case 215:m.pokedex_id=215;break;case"TEDDIURSA":case 216:m.pokedex_id=216;break;case"URSARING":case 217:m.pokedex_id=217;break;case"SLUGMA":case 218:m.pokedex_id=218;break;case"MAGCARGO":case 219:m.pokedex_id=219;break;case"SWINUB":case 220:m.pokedex_id=220;break;case"PILOSWINE":case 221:m.pokedex_id=221;break;case"CORSOLA":case 222:m.pokedex_id=222;break;case"REMORAID":case 223:m.pokedex_id=223;break;case"OCTILLERY":case 224:m.pokedex_id=224;break;case"DELIBIRD":case 225:m.pokedex_id=225;break;case"MANTINE":case 226:m.pokedex_id=226;break;case"SKARMORY":case 227:m.pokedex_id=227;break;case"HOUNDOUR":case 228:m.pokedex_id=228;break;case"HOUNDOOM":case 229:m.pokedex_id=229;break;case"KINGDRA":case 230:m.pokedex_id=230;break;case"PHANPY":case 231:m.pokedex_id=231;break;case"DONPHAN":case 232:m.pokedex_id=232;break;case"PORYGON2":case 233:m.pokedex_id=233;break;case"STANTLER":case 234:m.pokedex_id=234;break;case"SMEARGLE":case 235:m.pokedex_id=235;break;case"TYROGUE":case 236:m.pokedex_id=236;break;case"HITMONTOP":case 237:m.pokedex_id=237;break;case"SMOOCHUM":case 238:m.pokedex_id=238;break;case"ELEKID":case 239:m.pokedex_id=239;break;case"MAGBY":case 240:m.pokedex_id=240;break;case"MILTANK":case 241:m.pokedex_id=241;break;case"BLISSEY":case 242:m.pokedex_id=242;break;case"RAIKOU":case 243:m.pokedex_id=243;break;case"ENTEI":case 244:m.pokedex_id=244;break;case"SUICUNE":case 245:m.pokedex_id=245;break;case"LARVITAR":case 246:m.pokedex_id=246;break;case"PUPITAR":case 247:m.pokedex_id=247;break;case"TYRANITAR":case 248:m.pokedex_id=248;break;case"LUGIA":case 249:m.pokedex_id=249;break;case"HO_OH":case 250:m.pokedex_id=250;break;case"CELEBI":case 251:m.pokedex_id=251;break;case"TREECKO":case 252:m.pokedex_id=252;break;case"GROVYLE":case 253:m.pokedex_id=253;break;case"SCEPTILE":case 254:m.pokedex_id=254;break;case"TORCHIC":case 255:m.pokedex_id=255;break;case"COMBUSKEN":case 256:m.pokedex_id=256;break;case"BLAZIKEN":case 257:m.pokedex_id=257;break;case"MUDKIP":case 258:m.pokedex_id=258;break;case"MARSHTOMP":case 259:m.pokedex_id=259;break;case"SWAMPERT":case 260:m.pokedex_id=260;break;case"POOCHYENA":case 261:m.pokedex_id=261;break;case"MIGHTYENA":case 262:m.pokedex_id=262;break;case"ZIGZAGOON":case 263:m.pokedex_id=263;break;case"LINOONE":case 264:m.pokedex_id=264;break;case"WURMPLE":case 265:m.pokedex_id=265;break;case"SILCOON":case 266:m.pokedex_id=266;break;case"BEAUTIFLY":case 267:m.pokedex_id=267;break;case"CASCOON":case 268:m.pokedex_id=268;break;case"DUSTOX":case 269:m.pokedex_id=269;break;case"LOTAD":case 270:m.pokedex_id=270;break;case"LOMBRE":case 271:m.pokedex_id=271;break;case"LUDICOLO":case 272:m.pokedex_id=272;break;case"SEEDOT":case 273:m.pokedex_id=273;break;case"NUZLEAF":case 274:m.pokedex_id=274;break;case"SHIFTRY":case 275:m.pokedex_id=275;break;case"TAILLOW":case 276:m.pokedex_id=276;break;case"SWELLOW":case 277:m.pokedex_id=277;break;case"WINGULL":case 278:m.pokedex_id=278;break;case"PELIPPER":case 279:m.pokedex_id=279;break;case"RALTS":case 280:m.pokedex_id=280;break;case"KIRLIA":case 281:m.pokedex_id=281;break;case"GARDEVOIR":case 282:m.pokedex_id=282;break;case"SURSKIT":case 283:m.pokedex_id=283;break;case"MASQUERAIN":case 284:m.pokedex_id=284;break;case"SHROOMISH":case 285:m.pokedex_id=285;break;case"BRELOOM":case 286:m.pokedex_id=286;break;case"SLAKOTH":case 287:m.pokedex_id=287;break;case"VIGOROTH":case 288:m.pokedex_id=288;break;case"SLAKING":case 289:m.pokedex_id=289;break;case"NINCADA":case 290:m.pokedex_id=290;break;case"NINJASK":case 291:m.pokedex_id=291;break;case"SHEDINJA":case 292:m.pokedex_id=292;break;case"WHISMUR":case 293:m.pokedex_id=293;break;case"LOUDRED":case 294:m.pokedex_id=294;break;case"EXPLOUD":case 295:m.pokedex_id=295;break;case"MAKUHITA":case 296:m.pokedex_id=296;break;case"HARIYAMA":case 297:m.pokedex_id=297;break;case"AZURILL":case 298:m.pokedex_id=298;break;case"NOSEPASS":case 299:m.pokedex_id=299;break;case"SKITTY":case 300:m.pokedex_id=300;break;case"DELCATTY":case 301:m.pokedex_id=301;break;case"SABLEYE":case 302:m.pokedex_id=302;break;case"MAWILE":case 303:m.pokedex_id=303;break;case"ARON":case 304:m.pokedex_id=304;break;case"LAIRON":case 305:m.pokedex_id=305;break;case"AGGRON":case 306:m.pokedex_id=306;break;case"MEDITITE":case 307:m.pokedex_id=307;break;case"MEDICHAM":case 308:m.pokedex_id=308;break;case"ELECTRIKE":case 309:m.pokedex_id=309;break;case"MANECTRIC":case 310:m.pokedex_id=310;break;case"PLUSLE":case 311:m.pokedex_id=311;break;case"MINUN":case 312:m.pokedex_id=312;break;case"VOLBEAT":case 313:m.pokedex_id=313;break;case"ILLUMISE":case 314:m.pokedex_id=314;break;case"ROSELIA":case 315:m.pokedex_id=315;break;case"GULPIN":case 316:m.pokedex_id=316;break;case"SWALOT":case 317:m.pokedex_id=317;break;case"CARVANHA":case 318:m.pokedex_id=318;break;case"SHARPEDO":case 319:m.pokedex_id=319;break;case"WAILMER":case 320:m.pokedex_id=320;break;case"WAILORD":case 321:m.pokedex_id=321;break;case"NUMEL":case 322:m.pokedex_id=322;break;case"CAMERUPT":case 323:m.pokedex_id=323;break;case"TORKOAL":case 324:m.pokedex_id=324;break;case"SPOINK":case 325:m.pokedex_id=325;break;case"GRUMPIG":case 326:m.pokedex_id=326;break;case"SPINDA":case 327:m.pokedex_id=327;break;case"TRAPINCH":case 328:m.pokedex_id=328;break;case"VIBRAVA":case 329:m.pokedex_id=329;break;case"FLYGON":case 330:m.pokedex_id=330;break;case"CACNEA":case 331:m.pokedex_id=331;break;case"CACTURNE":case 332:m.pokedex_id=332;break;case"SWABLU":case 333:m.pokedex_id=333;break;case"ALTARIA":case 334:m.pokedex_id=334;break;case"ZANGOOSE":case 335:m.pokedex_id=335;break;case"SEVIPER":case 336:m.pokedex_id=336;break;case"LUNATONE":case 337:m.pokedex_id=337;break;case"SOLROCK":case 338:m.pokedex_id=338;break;case"BARBOACH":case 339:m.pokedex_id=339;break;case"WHISCASH":case 340:m.pokedex_id=340;break;case"CORPHISH":case 341:m.pokedex_id=341;break;case"CRAWDAUNT":case 342:m.pokedex_id=342;break;case"BALTOY":case 343:m.pokedex_id=343;break;case"CLAYDOL":case 344:m.pokedex_id=344;break;case"LILEEP":case 345:m.pokedex_id=345;break;case"CRADILY":case 346:m.pokedex_id=346;break;case"ANORITH":case 347:m.pokedex_id=347;break;case"ARMALDO":case 348:m.pokedex_id=348;break;case"FEEBAS":case 349:m.pokedex_id=349;break;case"MILOTIC":case 350:m.pokedex_id=350;break;case"CASTFORM":case 351:m.pokedex_id=351;break;case"KECLEON":case 352:m.pokedex_id=352;break;case"SHUPPET":case 353:m.pokedex_id=353;break;case"BANETTE":case 354:m.pokedex_id=354;break;case"DUSKULL":case 355:m.pokedex_id=355;break;case"DUSCLOPS":case 356:m.pokedex_id=356;break;case"TROPIUS":case 357:m.pokedex_id=357;break;case"CHIMECHO":case 358:m.pokedex_id=358;break;case"ABSOL":case 359:m.pokedex_id=359;break;case"WYNAUT":case 360:m.pokedex_id=360;break;case"SNORUNT":case 361:m.pokedex_id=361;break;case"GLALIE":case 362:m.pokedex_id=362;break;case"SPHEAL":case 363:m.pokedex_id=363;break;case"SEALEO":case 364:m.pokedex_id=364;break;case"WALREIN":case 365:m.pokedex_id=365;break;case"CLAMPERL":case 366:m.pokedex_id=366;break;case"HUNTAIL":case 367:m.pokedex_id=367;break;case"GOREBYSS":case 368:m.pokedex_id=368;break;case"RELICANTH":case 369:m.pokedex_id=369;break;case"LUVDISC":case 370:m.pokedex_id=370;break;case"BAGON":case 371:m.pokedex_id=371;break;case"SHELGON":case 372:m.pokedex_id=372;break;case"SALAMENCE":case 373:m.pokedex_id=373;break;case"BELDUM":case 374:m.pokedex_id=374;break;case"METANG":case 375:m.pokedex_id=375;break;case"METAGROSS":case 376:m.pokedex_id=376;break;case"REGIROCK":case 377:m.pokedex_id=377;break;case"REGICE":case 378:m.pokedex_id=378;break;case"REGISTEEL":case 379:m.pokedex_id=379;break;case"LATIAS":case 380:m.pokedex_id=380;break;case"LATIOS":case 381:m.pokedex_id=381;break;case"KYOGRE":case 382:m.pokedex_id=382;break;case"GROUDON":case 383:m.pokedex_id=383;break;case"RAYQUAZA":case 384:m.pokedex_id=384;break;case"JIRACHI":case 385:m.pokedex_id=385;break;case"DEOXYS":case 386:m.pokedex_id=386;break;case"TURTWIG":case 387:m.pokedex_id=387;break;case"GROTLE":case 388:m.pokedex_id=388;break;case"TORTERRA":case 389:m.pokedex_id=389;break;case"CHIMCHAR":case 390:m.pokedex_id=390;break;case"MONFERNO":case 391:m.pokedex_id=391;break;case"INFERNAPE":case 392:m.pokedex_id=392;break;case"PIPLUP":case 393:m.pokedex_id=393;break;case"PRINPLUP":case 394:m.pokedex_id=394;break;case"EMPOLEON":case 395:m.pokedex_id=395;break;case"STARLY":case 396:m.pokedex_id=396;break;case"STARAVIA":case 397:m.pokedex_id=397;break;case"STARAPTOR":case 398:m.pokedex_id=398;break;case"BIDOOF":case 399:m.pokedex_id=399;break;case"BIBAREL":case 400:m.pokedex_id=400;break;case"KRICKETOT":case 401:m.pokedex_id=401;break;case"KRICKETUNE":case 402:m.pokedex_id=402;break;case"SHINX":case 403:m.pokedex_id=403;break;case"LUXIO":case 404:m.pokedex_id=404;break;case"LUXRAY":case 405:m.pokedex_id=405;break;case"BUDEW":case 406:m.pokedex_id=406;break;case"ROSERADE":case 407:m.pokedex_id=407;break;case"CRANIDOS":case 408:m.pokedex_id=408;break;case"RAMPARDOS":case 409:m.pokedex_id=409;break;case"SHIELDON":case 410:m.pokedex_id=410;break;case"BASTIODON":case 411:m.pokedex_id=411;break;case"BURMY":case 412:m.pokedex_id=412;break;case"WORMADAM":case 413:m.pokedex_id=413;break;case"MOTHIM":case 414:m.pokedex_id=414;break;case"COMBEE":case 415:m.pokedex_id=415;break;case"VESPIQUEN":case 416:m.pokedex_id=416;break;case"PACHIRISU":case 417:m.pokedex_id=417;break;case"BUIZEL":case 418:m.pokedex_id=418;break;case"FLOATZEL":case 419:m.pokedex_id=419;break;case"CHERUBI":case 420:m.pokedex_id=420;break;case"CHERRIM":case 421:m.pokedex_id=421;break;case"SHELLOS":case 422:m.pokedex_id=422;break;case"GASTRODON":case 423:m.pokedex_id=423;break;case"AMBIPOM":case 424:m.pokedex_id=424;break;case"DRIFLOON":case 425:m.pokedex_id=425;break;case"DRIFBLIM":case 426:m.pokedex_id=426;break;case"BUNEARY":case 427:m.pokedex_id=427;break;case"LOPUNNY":case 428:m.pokedex_id=428;break;case"MISMAGIUS":case 429:m.pokedex_id=429;break;case"HONCHKROW":case 430:m.pokedex_id=430;break;case"GLAMEOW":case 431:m.pokedex_id=431;break;case"PURUGLY":case 432:m.pokedex_id=432;break;case"CHINGLING":case 433:m.pokedex_id=433;break;case"STUNKY":case 434:m.pokedex_id=434;break;case"SKUNTANK":case 435:m.pokedex_id=435;break;case"BRONZOR":case 436:m.pokedex_id=436;break;case"BRONZONG":case 437:m.pokedex_id=437;break;case"BONSLY":case 438:m.pokedex_id=438;break;case"MIME_JR":case 439:m.pokedex_id=439;break;case"HAPPINY":case 440:m.pokedex_id=440;break;case"CHATOT":case 441:m.pokedex_id=441;break;case"SPIRITOMB":case 442:m.pokedex_id=442;break;case"GIBLE":case 443:m.pokedex_id=443;break;case"GABITE":case 444:m.pokedex_id=444;break;case"GARCHOMP":case 445:m.pokedex_id=445;break;case"MUNCHLAX":case 446:m.pokedex_id=446;break;case"RIOLU":case 447:m.pokedex_id=447;break;case"LUCARIO":case 448:m.pokedex_id=448;break;case"HIPPOPOTAS":case 449:m.pokedex_id=449;break;case"HIPPOWDON":case 450:m.pokedex_id=450;break;case"SKORUPI":case 451:m.pokedex_id=451;break;case"DRAPION":case 452:m.pokedex_id=452;break;case"CROAGUNK":case 453:m.pokedex_id=453;break;case"TOXICROAK":case 454:m.pokedex_id=454;break;case"CARNIVINE":case 455:m.pokedex_id=455;break;case"FINNEON":case 456:m.pokedex_id=456;break;case"LUMINEON":case 457:m.pokedex_id=457;break;case"MANTYKE":case 458:m.pokedex_id=458;break;case"SNOVER":case 459:m.pokedex_id=459;break;case"ABOMASNOW":case 460:m.pokedex_id=460;break;case"WEAVILE":case 461:m.pokedex_id=461;break;case"MAGNEZONE":case 462:m.pokedex_id=462;break;case"LICKILICKY":case 463:m.pokedex_id=463;break;case"RHYPERIOR":case 464:m.pokedex_id=464;break;case"TANGROWTH":case 465:m.pokedex_id=465;break;case"ELECTIVIRE":case 466:m.pokedex_id=466;break;case"MAGMORTAR":case 467:m.pokedex_id=467;break;case"TOGEKISS":case 468:m.pokedex_id=468;break;case"YANMEGA":case 469:m.pokedex_id=469;break;case"LEAFEON":case 470:m.pokedex_id=470;break;case"GLACEON":case 471:m.pokedex_id=471;break;case"GLISCOR":case 472:m.pokedex_id=472;break;case"MAMOSWINE":case 473:m.pokedex_id=473;break;case"PORYGON_Z":case 474:m.pokedex_id=474;break;case"GALLADE":case 475:m.pokedex_id=475;break;case"PROBOPASS":case 476:m.pokedex_id=476;break;case"DUSKNOIR":case 477:m.pokedex_id=477;break;case"FROSLASS":case 478:m.pokedex_id=478;break;case"ROTOM":case 479:m.pokedex_id=479;break;case"UXIE":case 480:m.pokedex_id=480;break;case"MESPRIT":case 481:m.pokedex_id=481;break;case"AZELF":case 482:m.pokedex_id=482;break;case"DIALGA":case 483:m.pokedex_id=483;break;case"PALKIA":case 484:m.pokedex_id=484;break;case"HEATRAN":case 485:m.pokedex_id=485;break;case"REGIGIGAS":case 486:m.pokedex_id=486;break;case"GIRATINA":case 487:m.pokedex_id=487;break;case"CRESSELIA":case 488:m.pokedex_id=488;break;case"PHIONE":case 489:m.pokedex_id=489;break;case"MANAPHY":case 490:m.pokedex_id=490;break;case"DARKRAI":case 491:m.pokedex_id=491;break;case"SHAYMIN":case 492:m.pokedex_id=492;break;case"ARCEUS":case 493:m.pokedex_id=493;break;case"MELTAN":case 808:m.pokedex_id=808;break;case"MELMETAL":case 809:m.pokedex_id=809;break}if(d.cp!=null){m.cp=d.cp|0}if(d.cp_multiplier!=null){m.cp_multiplier=Number(d.cp_multiplier)}if(d.stamina!=null){m.stamina=d.stamina|0}if(d.max_stamina!=null){m.max_stamina=d.max_stamina|0}switch(d.move1){case"MOVE_UNSET":case 0:m.move1=0;break;case"THUNDER_SHOCK":case 1:m.move1=1;break;case"QUICK_ATTACK":case 2:m.move1=2;break;case"SCRATCH":case 3:m.move1=3;break;case"EMBER":case 4:m.move1=4;break;case"VINE_WHIP":case 5:m.move1=5;break;case"TACKLE":case 6:m.move1=6;break;case"RAZOR_LEAF":case 7:m.move1=7;break;case"TAKE_DOWN":case 8:m.move1=8;break;case"WATER_GUN":case 9:m.move1=9;break;case"BITE":case 10:m.move1=10;break;case"POUND":case 11:m.move1=11;break;case"DOUBLE_SLAP":case 12:m.move1=12;break;case"WRAP":case 13:m.move1=13;break;case"HYPER_BEAM":case 14:m.move1=14;break;case"LICK":case 15:m.move1=15;break;case"DARK_PULSE":case 16:m.move1=16;break;case"SMOG":case 17:m.move1=17;break;case"SLUDGE":case 18:m.move1=18;break;case"METAL_CLAW":case 19:m.move1=19;break;case"VICE_GRIP":case 20:m.move1=20;break;case"FLAME_WHEEL":case 21:m.move1=21;break;case"MEGAHORN":case 22:m.move1=22;break;case"WING_ATTACK":case 23:m.move1=23;break;case"FLAMETHROWER":case 24:m.move1=24;break;case"SUCKER_PUNCH":case 25:m.move1=25;break;case"DIG":case 26:m.move1=26;break;case"LOW_KICK":case 27:m.move1=27;break;case"CROSS_CHOP":case 28:m.move1=28;break;case"PSYCHO_CUT":case 29:m.move1=29;break;case"PSYBEAM":case 30:m.move1=30;break;case"EARTHQUAKE":case 31:m.move1=31;break;case"STONE_EDGE":case 32:m.move1=32;break;case"ICE_PUNCH":case 33:m.move1=33;break;case"HEART_STAMP":case 34:m.move1=34;break;case"DISCHARGE":case 35:m.move1=35;break;case"FLASH_CANNON":case 36:m.move1=36;break;case"PECK":case 37:m.move1=37;break;case"DRILL_PECK":case 38:m.move1=38;break;case"ICE_BEAM":case 39:m.move1=39;break;case"BLIZZARD":case 40:m.move1=40;break;case"AIR_SLASH":case 41:m.move1=41;break;case"HEAT_WAVE":case 42:m.move1=42;break;case"TWINEEDLE":case 43:m.move1=43;break;case"POISON_JAB":case 44:m.move1=44;break;case"AERIAL_ACE":case 45:m.move1=45;break;case"DRILL_RUN":case 46:m.move1=46;break;case"PETAL_BLIZZARD":case 47:m.move1=47;break;case"MEGA_DRAIN":case 48:m.move1=48;break;case"BUG_BUZZ":case 49:m.move1=49;break;case"POISON_FANG":case 50:m.move1=50;break;case"NIGHT_SLASH":case 51:m.move1=51;break;case"SLASH":case 52:m.move1=52;break;case"BUBBLE_BEAM":case 53:m.move1=53;break;case"SUBMISSION":case 54:m.move1=54;break;case"KARATE_CHOP":case 55:m.move1=55;break;case"LOW_SWEEP":case 56:m.move1=56;break;case"AQUA_JET":case 57:m.move1=57;break;case"AQUA_TAIL":case 58:m.move1=58;break;case"SEED_BOMB":case 59:m.move1=59;break;case"PSYSHOCK":case 60:m.move1=60;break;case"ROCK_THROW":case 61:m.move1=61;break;case"ANCIENT_POWER":case 62:m.move1=62;break;case"ROCK_TOMB":case 63:m.move1=63;break;case"ROCK_SLIDE":case 64:m.move1=64;break;case"POWER_GEM":case 65:m.move1=65;break;case"SHADOW_SNEAK":case 66:m.move1=66;break;case"SHADOW_PUNCH":case 67:m.move1=67;break;case"SHADOW_CLAW":case 68:m.move1=68;break;case"OMINOUS_WIND":case 69:m.move1=69;break;case"SHADOW_BALL":case 70:m.move1=70;break;case"BULLET_PUNCH":case 71:m.move1=71;break;case"MAGNET_BOMB":case 72:m.move1=72;break;case"STEEL_WING":case 73:m.move1=73;break;case"IRON_HEAD":case 74:m.move1=74;break;case"PARABOLIC_CHARGE":case 75:m.move1=75;break;case"SPARK":case 76:m.move1=76;break;case"THUNDER_PUNCH":case 77:m.move1=77;break;case"THUNDER":case 78:m.move1=78;break;case"THUNDERBOLT":case 79:m.move1=79;break;case"TWISTER":case 80:m.move1=80;break;case"DRAGON_BREATH":case 81:m.move1=81;break;case"DRAGON_PULSE":case 82:m.move1=82;break;case"DRAGON_CLAW":case 83:m.move1=83;break;case"DISARMING_VOICE":case 84:m.move1=84;break;case"DRAINING_KISS":case 85:m.move1=85;break;case"DAZZLING_GLEAM":case 86:m.move1=86;break;case"MOONBLAST":case 87:m.move1=87;break;case"PLAY_ROUGH":case 88:m.move1=88;break;case"CROSS_POISON":case 89:m.move1=89;break;case"SLUDGE_BOMB":case 90:m.move1=90;break;case"SLUDGE_WAVE":case 91:m.move1=91;break;case"GUNK_SHOT":case 92:m.move1=92;break;case"MUD_SHOT":case 93:m.move1=93;break;case"BONE_CLUB":case 94:m.move1=94;break;case"BULLDOZE":case 95:m.move1=95;break;case"MUD_BOMB":case 96:m.move1=96;break;case"FURY_CUTTER":case 97:m.move1=97;break;case"BUG_BITE":case 98:m.move1=98;break;case"SIGNAL_BEAM":case 99:m.move1=99;break;case"X_SCISSOR":case 100:m.move1=100;break;case"FLAME_CHARGE":case 101:m.move1=101;break;case"FLAME_BURST":case 102:m.move1=102;break;case"FIRE_BLAST":case 103:m.move1=103;break;case"BRINE":case 104:m.move1=104;break;case"WATER_PULSE":case 105:m.move1=105;break;case"SCALD":case 106:m.move1=106;break;case"HYDRO_PUMP":case 107:m.move1=107;break;case"PSYCHIC":case 108:m.move1=108;break;case"PSYSTRIKE":case 109:m.move1=109;break;case"ICE_SHARD":case 110:m.move1=110;break;case"ICY_WIND":case 111:m.move1=111;break;case"FROST_BREATH":case 112:m.move1=112;break;case"ABSORB":case 113:m.move1=113;break;case"GIGA_DRAIN":case 114:m.move1=114;break;case"FIRE_PUNCH":case 115:m.move1=115;break;case"SOLAR_BEAM":case 116:m.move1=116;break;case"LEAF_BLADE":case 117:m.move1=117;break;case"POWER_WHIP":case 118:m.move1=118;break;case"SPLASH":case 119:m.move1=119;break;case"ACID":case 120:m.move1=120;break;case"AIR_CUTTER":case 121:m.move1=121;break;case"HURRICANE":case 122:m.move1=122;break;case"BRICK_BREAK":case 123:m.move1=123;break;case"CUT":case 124:m.move1=124;break;case"SWIFT":case 125:m.move1=125;break;case"HORN_ATTACK":case 126:m.move1=126;break;case"STOMP":case 127:m.move1=127;break;case"HEADBUTT":case 128:m.move1=128;break;case"HYPER_FANG":case 129:m.move1=129;break;case"SLAM":case 130:m.move1=130;break;case"BODY_SLAM":case 131:m.move1=131;break;case"REST":case 132:m.move1=132;break;case"STRUGGLE":case 133:m.move1=133;break;case"SCALD_BLASTOISE":case 134:m.move1=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.move1=135;break;case"WRAP_GREEN":case 136:m.move1=136;break;case"WRAP_PINK":case 137:m.move1=137;break;case"FURY_CUTTER_FAST":case 200:m.move1=200;break;case"BUG_BITE_FAST":case 201:m.move1=201;break;case"BITE_FAST":case 202:m.move1=202;break;case"SUCKER_PUNCH_FAST":case 203:m.move1=203;break;case"DRAGON_BREATH_FAST":case 204:m.move1=204;break;case"THUNDER_SHOCK_FAST":case 205:m.move1=205;break;case"SPARK_FAST":case 206:m.move1=206;break;case"LOW_KICK_FAST":case 207:m.move1=207;break;case"KARATE_CHOP_FAST":case 208:m.move1=208;break;case"EMBER_FAST":case 209:m.move1=209;break;case"WING_ATTACK_FAST":case 210:m.move1=210;break;case"PECK_FAST":case 211:m.move1=211;break;case"LICK_FAST":case 212:m.move1=212;break;case"SHADOW_CLAW_FAST":case 213:m.move1=213;break;case"VINE_WHIP_FAST":case 214:m.move1=214;break;case"RAZOR_LEAF_FAST":case 215:m.move1=215;break;case"MUD_SHOT_FAST":case 216:m.move1=216;break;case"ICE_SHARD_FAST":case 217:m.move1=217;break;case"FROST_BREATH_FAST":case 218:m.move1=218;break;case"QUICK_ATTACK_FAST":case 219:m.move1=219;break;case"SCRATCH_FAST":case 220:m.move1=220;break;case"TACKLE_FAST":case 221:m.move1=221;break;case"POUND_FAST":case 222:m.move1=222;break;case"CUT_FAST":case 223:m.move1=223;break;case"POISON_JAB_FAST":case 224:m.move1=224;break;case"ACID_FAST":case 225:m.move1=225;break;case"PSYCHO_CUT_FAST":case 226:m.move1=226;break;case"ROCK_THROW_FAST":case 227:m.move1=227;break;case"METAL_CLAW_FAST":case 228:m.move1=228;break;case"BULLET_PUNCH_FAST":case 229:m.move1=229;break;case"WATER_GUN_FAST":case 230:m.move1=230;break;case"SPLASH_FAST":case 231:m.move1=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.move1=232;break;case"MUD_SLAP_FAST":case 233:m.move1=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.move1=234;break;case"CONFUSION_FAST":case 235:m.move1=235;break;case"POISON_STING_FAST":case 236:m.move1=236;break;case"BUBBLE_FAST":case 237:m.move1=237;break;case"FEINT_ATTACK_FAST":case 238:m.move1=238;break;case"STEEL_WING_FAST":case 239:m.move1=239;break;case"FIRE_FANG_FAST":case 240:m.move1=240;break;case"ROCK_SMASH_FAST":case 241:m.move1=241;break;case"TRANSFORM_FAST":case 242:m.move1=242;break;case"COUNTER_FAST":case 243:m.move1=243;break;case"POWDER_SNOW_FAST":case 244:m.move1=244;break;case"CLOSE_COMBAT":case 245:m.move1=245;break;case"DYNAMIC_PUNCH":case 246:m.move1=246;break;case"FOCUS_BLAST":case 247:m.move1=247;break;case"AURORA_BEAM":case 248:m.move1=248;break;case"CHARGE_BEAM_FAST":case 249:m.move1=249;break;case"VOLT_SWITCH_FAST":case 250:m.move1=250;break;case"WILD_CHARGE":case 251:m.move1=251;break;case"ZAP_CANNON":case 252:m.move1=252;break;case"DRAGON_TAIL_FAST":case 253:m.move1=253;break;case"AVALANCHE":case 254:m.move1=254;break;case"AIR_SLASH_FAST":case 255:m.move1=255;break;case"BRAVE_BIRD":case 256:m.move1=256;break;case"SKY_ATTACK":case 257:m.move1=257;break;case"SAND_TOMB":case 258:m.move1=258;break;case"ROCK_BLAST":case 259:m.move1=259;break;case"INFESTATION_FAST":case 260:m.move1=260;break;case"STRUGGLE_BUG_FAST":case 261:m.move1=261;break;case"SILVER_WIND":case 262:m.move1=262;break;case"ASTONISH_FAST":case 263:m.move1=263;break;case"HEX_FAST":case 264:m.move1=264;break;case"NIGHT_SHADE":case 265:m.move1=265;break;case"IRON_TAIL_FAST":case 266:m.move1=266;break;case"GYRO_BALL":case 267:m.move1=267;break;case"HEAVY_SLAM":case 268:m.move1=268;break;case"FIRE_SPIN_FAST":case 269:m.move1=269;break;case"OVERHEAT":case 270:m.move1=270;break;case"BULLET_SEED_FAST":case 271:m.move1=271;break;case"GRASS_KNOT":case 272:m.move1=272;break;case"ENERGY_BALL":case 273:m.move1=273;break;case"EXTRASENSORY_FAST":case 274:m.move1=274;break;case"FUTURESIGHT":case 275:m.move1=275;break;case"MIRROR_COAT":case 276:m.move1=276;break;case"OUTRAGE":case 277:m.move1=277;break;case"SNARL_FAST":case 278:m.move1=278;break;case"CRUNCH":case 279:m.move1=279;break;case"FOUL_PLAY":case 280:m.move1=280;break;case"HIDDEN_POWER_FAST":case 281:m.move1=281;break;case"TAKE_DOWN_FAST":case 282:m.move1=282;break;case"WATERFALL_FAST":case 283:m.move1=283;break;case"SURF":case 284:m.move1=284;break;case"DRACO_METEOR":case 285:m.move1=285;break;case"DOOM_DESIRE":case 286:m.move1=286;break;case"YAWN_FAST":case 287:m.move1=287;break;case"PSYCHO_BOOST":case 288:m.move1=288;break;case"ORIGIN_PULSE":case 289:m.move1=289;break;case"PRECIPICE_BLADES":case 290:m.move1=290;break;case"PRESENT_FAST":case 291:m.move1=291;break;case"WEATHER_BALL_FIRE":case 292:m.move1=292;break;case"WEATHER_BALL_ICE":case 293:m.move1=293;break;case"WEATHER_BALL_ROCK":case 294:m.move1=294;break;case"WEATHER_BALL_WATER":case 295:m.move1=295;break;case"FRENZY_PLANT":case 296:m.move1=296;break;case"SMACK_DOWN_FAST":case 297:m.move1=297;break;case"BLAST_BURN":case 298:m.move1=298;break;case"HYDRO_CANNON":case 299:m.move1=299;break;case"LAST_RESORT":case 300:m.move1=300;break;case"METEOR_MASH":case 301:m.move1=301;break;case"SKULL_BASH":case 302:m.move1=302;break;case"ACID_SPRAY":case 303:m.move1=303;break;case"EARTH_POWER":case 304:m.move1=304;break;case"CRABHAMMER":case 305:m.move1=305;break;case"LUNGE":case 306:m.move1=306;break;case"CRUSH_CLAW":case 307:m.move1=307;break;case"OCTAZOOKA":case 308:m.move1=308;break;case"MIRROR_SHOT":case 309:m.move1=309;break;case"SUPER_POWER":case 310:m.move1=310;break;case"FELL_STINGER":case 311:m.move1=311;break;case"LEAF_TORNADO":case 312:m.move1=312;break;case"LEECH_LIFE":case 313:m.move1=313;break;case"DRAIN_PUNCH":case 314:m.move1=314;break;case"SHADOW_BONE":case 315:m.move1=315;break;case"MUDDY_WATER":case 316:m.move1=316;break;case"BLAZE_KICK":case 317:m.move1=317;break;case"RAZOR_SHELL":case 318:m.move1=318;break;case"POWER_UP_PUNCH":case 319:m.move1=319;break}switch(d.move2){case"MOVE_UNSET":case 0:m.move2=0;break;case"THUNDER_SHOCK":case 1:m.move2=1;break;case"QUICK_ATTACK":case 2:m.move2=2;break;case"SCRATCH":case 3:m.move2=3;break;case"EMBER":case 4:m.move2=4;break;case"VINE_WHIP":case 5:m.move2=5;break;case"TACKLE":case 6:m.move2=6;break;case"RAZOR_LEAF":case 7:m.move2=7;break;case"TAKE_DOWN":case 8:m.move2=8;break;case"WATER_GUN":case 9:m.move2=9;break;case"BITE":case 10:m.move2=10;break;case"POUND":case 11:m.move2=11;break;case"DOUBLE_SLAP":case 12:m.move2=12;break;case"WRAP":case 13:m.move2=13;break;case"HYPER_BEAM":case 14:m.move2=14;break;case"LICK":case 15:m.move2=15;break;case"DARK_PULSE":case 16:m.move2=16;break;case"SMOG":case 17:m.move2=17;break;case"SLUDGE":case 18:m.move2=18;break;case"METAL_CLAW":case 19:m.move2=19;break;case"VICE_GRIP":case 20:m.move2=20;break;case"FLAME_WHEEL":case 21:m.move2=21;break;case"MEGAHORN":case 22:m.move2=22;break;case"WING_ATTACK":case 23:m.move2=23;break;case"FLAMETHROWER":case 24:m.move2=24;break;case"SUCKER_PUNCH":case 25:m.move2=25;break;case"DIG":case 26:m.move2=26;break;case"LOW_KICK":case 27:m.move2=27;break;case"CROSS_CHOP":case 28:m.move2=28;break;case"PSYCHO_CUT":case 29:m.move2=29;break;case"PSYBEAM":case 30:m.move2=30;break;case"EARTHQUAKE":case 31:m.move2=31;break;case"STONE_EDGE":case 32:m.move2=32;break;case"ICE_PUNCH":case 33:m.move2=33;break;case"HEART_STAMP":case 34:m.move2=34;break;case"DISCHARGE":case 35:m.move2=35;break;case"FLASH_CANNON":case 36:m.move2=36;break;case"PECK":case 37:m.move2=37;break;case"DRILL_PECK":case 38:m.move2=38;break;case"ICE_BEAM":case 39:m.move2=39;break;case"BLIZZARD":case 40:m.move2=40;break;case"AIR_SLASH":case 41:m.move2=41;break;case"HEAT_WAVE":case 42:m.move2=42;break;case"TWINEEDLE":case 43:m.move2=43;break;case"POISON_JAB":case 44:m.move2=44;break;case"AERIAL_ACE":case 45:m.move2=45;break;case"DRILL_RUN":case 46:m.move2=46;break;case"PETAL_BLIZZARD":case 47:m.move2=47;break;case"MEGA_DRAIN":case 48:m.move2=48;break;case"BUG_BUZZ":case 49:m.move2=49;break;case"POISON_FANG":case 50:m.move2=50;break;case"NIGHT_SLASH":case 51:m.move2=51;break;case"SLASH":case 52:m.move2=52;break;case"BUBBLE_BEAM":case 53:m.move2=53;break;case"SUBMISSION":case 54:m.move2=54;break;case"KARATE_CHOP":case 55:m.move2=55;break;case"LOW_SWEEP":case 56:m.move2=56;break;case"AQUA_JET":case 57:m.move2=57;break;case"AQUA_TAIL":case 58:m.move2=58;break;case"SEED_BOMB":case 59:m.move2=59;break;case"PSYSHOCK":case 60:m.move2=60;break;case"ROCK_THROW":case 61:m.move2=61;break;case"ANCIENT_POWER":case 62:m.move2=62;break;case"ROCK_TOMB":case 63:m.move2=63;break;case"ROCK_SLIDE":case 64:m.move2=64;break;case"POWER_GEM":case 65:m.move2=65;break;case"SHADOW_SNEAK":case 66:m.move2=66;break;case"SHADOW_PUNCH":case 67:m.move2=67;break;case"SHADOW_CLAW":case 68:m.move2=68;break;case"OMINOUS_WIND":case 69:m.move2=69;break;case"SHADOW_BALL":case 70:m.move2=70;break;case"BULLET_PUNCH":case 71:m.move2=71;break;case"MAGNET_BOMB":case 72:m.move2=72;break;case"STEEL_WING":case 73:m.move2=73;break;case"IRON_HEAD":case 74:m.move2=74;break;case"PARABOLIC_CHARGE":case 75:m.move2=75;break;case"SPARK":case 76:m.move2=76;break;case"THUNDER_PUNCH":case 77:m.move2=77;break;case"THUNDER":case 78:m.move2=78;break;case"THUNDERBOLT":case 79:m.move2=79;break;case"TWISTER":case 80:m.move2=80;break;case"DRAGON_BREATH":case 81:m.move2=81;break;case"DRAGON_PULSE":case 82:m.move2=82;break;case"DRAGON_CLAW":case 83:m.move2=83;break;case"DISARMING_VOICE":case 84:m.move2=84;break;case"DRAINING_KISS":case 85:m.move2=85;break;case"DAZZLING_GLEAM":case 86:m.move2=86;break;case"MOONBLAST":case 87:m.move2=87;break;case"PLAY_ROUGH":case 88:m.move2=88;break;case"CROSS_POISON":case 89:m.move2=89;break;case"SLUDGE_BOMB":case 90:m.move2=90;break;case"SLUDGE_WAVE":case 91:m.move2=91;break;case"GUNK_SHOT":case 92:m.move2=92;break;case"MUD_SHOT":case 93:m.move2=93;break;case"BONE_CLUB":case 94:m.move2=94;break;case"BULLDOZE":case 95:m.move2=95;break;case"MUD_BOMB":case 96:m.move2=96;break;case"FURY_CUTTER":case 97:m.move2=97;break;case"BUG_BITE":case 98:m.move2=98;break;case"SIGNAL_BEAM":case 99:m.move2=99;break;case"X_SCISSOR":case 100:m.move2=100;break;case"FLAME_CHARGE":case 101:m.move2=101;break;case"FLAME_BURST":case 102:m.move2=102;break;case"FIRE_BLAST":case 103:m.move2=103;break;case"BRINE":case 104:m.move2=104;break;case"WATER_PULSE":case 105:m.move2=105;break;case"SCALD":case 106:m.move2=106;break;case"HYDRO_PUMP":case 107:m.move2=107;break;case"PSYCHIC":case 108:m.move2=108;break;case"PSYSTRIKE":case 109:m.move2=109;break;case"ICE_SHARD":case 110:m.move2=110;break;case"ICY_WIND":case 111:m.move2=111;break;case"FROST_BREATH":case 112:m.move2=112;break;case"ABSORB":case 113:m.move2=113;break;case"GIGA_DRAIN":case 114:m.move2=114;break;case"FIRE_PUNCH":case 115:m.move2=115;break;case"SOLAR_BEAM":case 116:m.move2=116;break;case"LEAF_BLADE":case 117:m.move2=117;break;case"POWER_WHIP":case 118:m.move2=118;break;case"SPLASH":case 119:m.move2=119;break;case"ACID":case 120:m.move2=120;break;case"AIR_CUTTER":case 121:m.move2=121;break;case"HURRICANE":case 122:m.move2=122;break;case"BRICK_BREAK":case 123:m.move2=123;break;case"CUT":case 124:m.move2=124;break;case"SWIFT":case 125:m.move2=125;break;case"HORN_ATTACK":case 126:m.move2=126;break;case"STOMP":case 127:m.move2=127;break;case"HEADBUTT":case 128:m.move2=128;break;case"HYPER_FANG":case 129:m.move2=129;break;case"SLAM":case 130:m.move2=130;break;case"BODY_SLAM":case 131:m.move2=131;break;case"REST":case 132:m.move2=132;break;case"STRUGGLE":case 133:m.move2=133;break;case"SCALD_BLASTOISE":case 134:m.move2=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.move2=135;break;case"WRAP_GREEN":case 136:m.move2=136;break;case"WRAP_PINK":case 137:m.move2=137;break;case"FURY_CUTTER_FAST":case 200:m.move2=200;break;case"BUG_BITE_FAST":case 201:m.move2=201;break;case"BITE_FAST":case 202:m.move2=202;break;case"SUCKER_PUNCH_FAST":case 203:m.move2=203;break;case"DRAGON_BREATH_FAST":case 204:m.move2=204;break;case"THUNDER_SHOCK_FAST":case 205:m.move2=205;break;case"SPARK_FAST":case 206:m.move2=206;break;case"LOW_KICK_FAST":case 207:m.move2=207;break;case"KARATE_CHOP_FAST":case 208:m.move2=208;break;case"EMBER_FAST":case 209:m.move2=209;break;case"WING_ATTACK_FAST":case 210:m.move2=210;break;case"PECK_FAST":case 211:m.move2=211;break;case"LICK_FAST":case 212:m.move2=212;break;case"SHADOW_CLAW_FAST":case 213:m.move2=213;break;case"VINE_WHIP_FAST":case 214:m.move2=214;break;case"RAZOR_LEAF_FAST":case 215:m.move2=215;break;case"MUD_SHOT_FAST":case 216:m.move2=216;break;case"ICE_SHARD_FAST":case 217:m.move2=217;break;case"FROST_BREATH_FAST":case 218:m.move2=218;break;case"QUICK_ATTACK_FAST":case 219:m.move2=219;break;case"SCRATCH_FAST":case 220:m.move2=220;break;case"TACKLE_FAST":case 221:m.move2=221;break;case"POUND_FAST":case 222:m.move2=222;break;case"CUT_FAST":case 223:m.move2=223;break;case"POISON_JAB_FAST":case 224:m.move2=224;break;case"ACID_FAST":case 225:m.move2=225;break;case"PSYCHO_CUT_FAST":case 226:m.move2=226;break;case"ROCK_THROW_FAST":case 227:m.move2=227;break;case"METAL_CLAW_FAST":case 228:m.move2=228;break;case"BULLET_PUNCH_FAST":case 229:m.move2=229;break;case"WATER_GUN_FAST":case 230:m.move2=230;break;case"SPLASH_FAST":case 231:m.move2=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.move2=232;break;case"MUD_SLAP_FAST":case 233:m.move2=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.move2=234;break;case"CONFUSION_FAST":case 235:m.move2=235;break;case"POISON_STING_FAST":case 236:m.move2=236;break;case"BUBBLE_FAST":case 237:m.move2=237;break;case"FEINT_ATTACK_FAST":case 238:m.move2=238;break;case"STEEL_WING_FAST":case 239:m.move2=239;break;case"FIRE_FANG_FAST":case 240:m.move2=240;break;case"ROCK_SMASH_FAST":case 241:m.move2=241;break;case"TRANSFORM_FAST":case 242:m.move2=242;break;case"COUNTER_FAST":case 243:m.move2=243;break;case"POWDER_SNOW_FAST":case 244:m.move2=244;break;case"CLOSE_COMBAT":case 245:m.move2=245;break;case"DYNAMIC_PUNCH":case 246:m.move2=246;break;case"FOCUS_BLAST":case 247:m.move2=247;break;case"AURORA_BEAM":case 248:m.move2=248;break;case"CHARGE_BEAM_FAST":case 249:m.move2=249;break;case"VOLT_SWITCH_FAST":case 250:m.move2=250;break;case"WILD_CHARGE":case 251:m.move2=251;break;case"ZAP_CANNON":case 252:m.move2=252;break;case"DRAGON_TAIL_FAST":case 253:m.move2=253;break;case"AVALANCHE":case 254:m.move2=254;break;case"AIR_SLASH_FAST":case 255:m.move2=255;break;case"BRAVE_BIRD":case 256:m.move2=256;break;case"SKY_ATTACK":case 257:m.move2=257;break;case"SAND_TOMB":case 258:m.move2=258;break;case"ROCK_BLAST":case 259:m.move2=259;break;case"INFESTATION_FAST":case 260:m.move2=260;break;case"STRUGGLE_BUG_FAST":case 261:m.move2=261;break;case"SILVER_WIND":case 262:m.move2=262;break;case"ASTONISH_FAST":case 263:m.move2=263;break;case"HEX_FAST":case 264:m.move2=264;break;case"NIGHT_SHADE":case 265:m.move2=265;break;case"IRON_TAIL_FAST":case 266:m.move2=266;break;case"GYRO_BALL":case 267:m.move2=267;break;case"HEAVY_SLAM":case 268:m.move2=268;break;case"FIRE_SPIN_FAST":case 269:m.move2=269;break;case"OVERHEAT":case 270:m.move2=270;break;case"BULLET_SEED_FAST":case 271:m.move2=271;break;case"GRASS_KNOT":case 272:m.move2=272;break;case"ENERGY_BALL":case 273:m.move2=273;break;case"EXTRASENSORY_FAST":case 274:m.move2=274;break;case"FUTURESIGHT":case 275:m.move2=275;break;case"MIRROR_COAT":case 276:m.move2=276;break;case"OUTRAGE":case 277:m.move2=277;break;case"SNARL_FAST":case 278:m.move2=278;break;case"CRUNCH":case 279:m.move2=279;break;case"FOUL_PLAY":case 280:m.move2=280;break;case"HIDDEN_POWER_FAST":case 281:m.move2=281;break;case"TAKE_DOWN_FAST":case 282:m.move2=282;break;case"WATERFALL_FAST":case 283:m.move2=283;break;case"SURF":case 284:m.move2=284;break;case"DRACO_METEOR":case 285:m.move2=285;break;case"DOOM_DESIRE":case 286:m.move2=286;break;case"YAWN_FAST":case 287:m.move2=287;break;case"PSYCHO_BOOST":case 288:m.move2=288;break;case"ORIGIN_PULSE":case 289:m.move2=289;break;case"PRECIPICE_BLADES":case 290:m.move2=290;break;case"PRESENT_FAST":case 291:m.move2=291;break;case"WEATHER_BALL_FIRE":case 292:m.move2=292;break;case"WEATHER_BALL_ICE":case 293:m.move2=293;break;case"WEATHER_BALL_ROCK":case 294:m.move2=294;break;case"WEATHER_BALL_WATER":case 295:m.move2=295;break;case"FRENZY_PLANT":case 296:m.move2=296;break;case"SMACK_DOWN_FAST":case 297:m.move2=297;break;case"BLAST_BURN":case 298:m.move2=298;break;case"HYDRO_CANNON":case 299:m.move2=299;break;case"LAST_RESORT":case 300:m.move2=300;break;case"METEOR_MASH":case 301:m.move2=301;break;case"SKULL_BASH":case 302:m.move2=302;break;case"ACID_SPRAY":case 303:m.move2=303;break;case"EARTH_POWER":case 304:m.move2=304;break;case"CRABHAMMER":case 305:m.move2=305;break;case"LUNGE":case 306:m.move2=306;break;case"CRUSH_CLAW":case 307:m.move2=307;break;case"OCTAZOOKA":case 308:m.move2=308;break;case"MIRROR_SHOT":case 309:m.move2=309;break;case"SUPER_POWER":case 310:m.move2=310;break;case"FELL_STINGER":case 311:m.move2=311;break;case"LEAF_TORNADO":case 312:m.move2=312;break;case"LEECH_LIFE":case 313:m.move2=313;break;case"DRAIN_PUNCH":case 314:m.move2=314;break;case"SHADOW_BONE":case 315:m.move2=315;break;case"MUDDY_WATER":case 316:m.move2=316;break;case"BLAZE_KICK":case 317:m.move2=317;break;case"RAZOR_SHELL":case 318:m.move2=318;break;case"POWER_UP_PUNCH":case 319:m.move2=319;break}switch(d.move3){case"MOVE_UNSET":case 0:m.move3=0;break;case"THUNDER_SHOCK":case 1:m.move3=1;break;case"QUICK_ATTACK":case 2:m.move3=2;break;case"SCRATCH":case 3:m.move3=3;break;case"EMBER":case 4:m.move3=4;break;case"VINE_WHIP":case 5:m.move3=5;break;case"TACKLE":case 6:m.move3=6;break;case"RAZOR_LEAF":case 7:m.move3=7;break;case"TAKE_DOWN":case 8:m.move3=8;break;case"WATER_GUN":case 9:m.move3=9;break;case"BITE":case 10:m.move3=10;break;case"POUND":case 11:m.move3=11;break;case"DOUBLE_SLAP":case 12:m.move3=12;break;case"WRAP":case 13:m.move3=13;break;case"HYPER_BEAM":case 14:m.move3=14;break;case"LICK":case 15:m.move3=15;break;case"DARK_PULSE":case 16:m.move3=16;break;case"SMOG":case 17:m.move3=17;break;case"SLUDGE":case 18:m.move3=18;break;case"METAL_CLAW":case 19:m.move3=19;break;case"VICE_GRIP":case 20:m.move3=20;break;case"FLAME_WHEEL":case 21:m.move3=21;break;case"MEGAHORN":case 22:m.move3=22;break;case"WING_ATTACK":case 23:m.move3=23;break;case"FLAMETHROWER":case 24:m.move3=24;break;case"SUCKER_PUNCH":case 25:m.move3=25;break;case"DIG":case 26:m.move3=26;break;case"LOW_KICK":case 27:m.move3=27;break;case"CROSS_CHOP":case 28:m.move3=28;break;case"PSYCHO_CUT":case 29:m.move3=29;break;case"PSYBEAM":case 30:m.move3=30;break;case"EARTHQUAKE":case 31:m.move3=31;break;case"STONE_EDGE":case 32:m.move3=32;break;case"ICE_PUNCH":case 33:m.move3=33;break;case"HEART_STAMP":case 34:m.move3=34;break;case"DISCHARGE":case 35:m.move3=35;break;case"FLASH_CANNON":case 36:m.move3=36;break;case"PECK":case 37:m.move3=37;break;case"DRILL_PECK":case 38:m.move3=38;break;case"ICE_BEAM":case 39:m.move3=39;break;case"BLIZZARD":case 40:m.move3=40;break;case"AIR_SLASH":case 41:m.move3=41;break;case"HEAT_WAVE":case 42:m.move3=42;break;case"TWINEEDLE":case 43:m.move3=43;break;case"POISON_JAB":case 44:m.move3=44;break;case"AERIAL_ACE":case 45:m.move3=45;break;case"DRILL_RUN":case 46:m.move3=46;break;case"PETAL_BLIZZARD":case 47:m.move3=47;break;case"MEGA_DRAIN":case 48:m.move3=48;break;case"BUG_BUZZ":case 49:m.move3=49;break;case"POISON_FANG":case 50:m.move3=50;break;case"NIGHT_SLASH":case 51:m.move3=51;break;case"SLASH":case 52:m.move3=52;break;case"BUBBLE_BEAM":case 53:m.move3=53;break;case"SUBMISSION":case 54:m.move3=54;break;case"KARATE_CHOP":case 55:m.move3=55;break;case"LOW_SWEEP":case 56:m.move3=56;break;case"AQUA_JET":case 57:m.move3=57;break;case"AQUA_TAIL":case 58:m.move3=58;break;case"SEED_BOMB":case 59:m.move3=59;break;case"PSYSHOCK":case 60:m.move3=60;break;case"ROCK_THROW":case 61:m.move3=61;break;case"ANCIENT_POWER":case 62:m.move3=62;break;case"ROCK_TOMB":case 63:m.move3=63;break;case"ROCK_SLIDE":case 64:m.move3=64;break;case"POWER_GEM":case 65:m.move3=65;break;case"SHADOW_SNEAK":case 66:m.move3=66;break;case"SHADOW_PUNCH":case 67:m.move3=67;break;case"SHADOW_CLAW":case 68:m.move3=68;break;case"OMINOUS_WIND":case 69:m.move3=69;break;case"SHADOW_BALL":case 70:m.move3=70;break;case"BULLET_PUNCH":case 71:m.move3=71;break;case"MAGNET_BOMB":case 72:m.move3=72;break;case"STEEL_WING":case 73:m.move3=73;break;case"IRON_HEAD":case 74:m.move3=74;break;case"PARABOLIC_CHARGE":case 75:m.move3=75;break;case"SPARK":case 76:m.move3=76;break;case"THUNDER_PUNCH":case 77:m.move3=77;break;case"THUNDER":case 78:m.move3=78;break;case"THUNDERBOLT":case 79:m.move3=79;break;case"TWISTER":case 80:m.move3=80;break;case"DRAGON_BREATH":case 81:m.move3=81;break;case"DRAGON_PULSE":case 82:m.move3=82;break;case"DRAGON_CLAW":case 83:m.move3=83;break;case"DISARMING_VOICE":case 84:m.move3=84;break;case"DRAINING_KISS":case 85:m.move3=85;break;case"DAZZLING_GLEAM":case 86:m.move3=86;break;case"MOONBLAST":case 87:m.move3=87;break;case"PLAY_ROUGH":case 88:m.move3=88;break;case"CROSS_POISON":case 89:m.move3=89;break;case"SLUDGE_BOMB":case 90:m.move3=90;break;case"SLUDGE_WAVE":case 91:m.move3=91;break;case"GUNK_SHOT":case 92:m.move3=92;break;case"MUD_SHOT":case 93:m.move3=93;break;case"BONE_CLUB":case 94:m.move3=94;break;case"BULLDOZE":case 95:m.move3=95;break;case"MUD_BOMB":case 96:m.move3=96;break;case"FURY_CUTTER":case 97:m.move3=97;break;case"BUG_BITE":case 98:m.move3=98;break;case"SIGNAL_BEAM":case 99:m.move3=99;break;case"X_SCISSOR":case 100:m.move3=100;break;case"FLAME_CHARGE":case 101:m.move3=101;break;case"FLAME_BURST":case 102:m.move3=102;break;case"FIRE_BLAST":case 103:m.move3=103;break;case"BRINE":case 104:m.move3=104;break;case"WATER_PULSE":case 105:m.move3=105;break;case"SCALD":case 106:m.move3=106;break;case"HYDRO_PUMP":case 107:m.move3=107;break;case"PSYCHIC":case 108:m.move3=108;break;case"PSYSTRIKE":case 109:m.move3=109;break;case"ICE_SHARD":case 110:m.move3=110;break;case"ICY_WIND":case 111:m.move3=111;break;case"FROST_BREATH":case 112:m.move3=112;break;case"ABSORB":case 113:m.move3=113;break;case"GIGA_DRAIN":case 114:m.move3=114;break;case"FIRE_PUNCH":case 115:m.move3=115;break;case"SOLAR_BEAM":case 116:m.move3=116;break;case"LEAF_BLADE":case 117:m.move3=117;break;case"POWER_WHIP":case 118:m.move3=118;break;case"SPLASH":case 119:m.move3=119;break;case"ACID":case 120:m.move3=120;break;case"AIR_CUTTER":case 121:m.move3=121;break;case"HURRICANE":case 122:m.move3=122;break;case"BRICK_BREAK":case 123:m.move3=123;break;case"CUT":case 124:m.move3=124;break;case"SWIFT":case 125:m.move3=125;break;case"HORN_ATTACK":case 126:m.move3=126;break;case"STOMP":case 127:m.move3=127;break;case"HEADBUTT":case 128:m.move3=128;break;case"HYPER_FANG":case 129:m.move3=129;break;case"SLAM":case 130:m.move3=130;break;case"BODY_SLAM":case 131:m.move3=131;break;case"REST":case 132:m.move3=132;break;case"STRUGGLE":case 133:m.move3=133;break;case"SCALD_BLASTOISE":case 134:m.move3=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.move3=135;break;case"WRAP_GREEN":case 136:m.move3=136;break;case"WRAP_PINK":case 137:m.move3=137;break;case"FURY_CUTTER_FAST":case 200:m.move3=200;break;case"BUG_BITE_FAST":case 201:m.move3=201;break;case"BITE_FAST":case 202:m.move3=202;break;case"SUCKER_PUNCH_FAST":case 203:m.move3=203;break;case"DRAGON_BREATH_FAST":case 204:m.move3=204;break;case"THUNDER_SHOCK_FAST":case 205:m.move3=205;break;case"SPARK_FAST":case 206:m.move3=206;break;case"LOW_KICK_FAST":case 207:m.move3=207;break;case"KARATE_CHOP_FAST":case 208:m.move3=208;break;case"EMBER_FAST":case 209:m.move3=209;break;case"WING_ATTACK_FAST":case 210:m.move3=210;break;case"PECK_FAST":case 211:m.move3=211;break;case"LICK_FAST":case 212:m.move3=212;break;case"SHADOW_CLAW_FAST":case 213:m.move3=213;break;case"VINE_WHIP_FAST":case 214:m.move3=214;break;case"RAZOR_LEAF_FAST":case 215:m.move3=215;break;case"MUD_SHOT_FAST":case 216:m.move3=216;break;case"ICE_SHARD_FAST":case 217:m.move3=217;break;case"FROST_BREATH_FAST":case 218:m.move3=218;break;case"QUICK_ATTACK_FAST":case 219:m.move3=219;break;case"SCRATCH_FAST":case 220:m.move3=220;break;case"TACKLE_FAST":case 221:m.move3=221;break;case"POUND_FAST":case 222:m.move3=222;break;case"CUT_FAST":case 223:m.move3=223;break;case"POISON_JAB_FAST":case 224:m.move3=224;break;case"ACID_FAST":case 225:m.move3=225;break;case"PSYCHO_CUT_FAST":case 226:m.move3=226;break;case"ROCK_THROW_FAST":case 227:m.move3=227;break;case"METAL_CLAW_FAST":case 228:m.move3=228;break;case"BULLET_PUNCH_FAST":case 229:m.move3=229;break;case"WATER_GUN_FAST":case 230:m.move3=230;break;case"SPLASH_FAST":case 231:m.move3=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.move3=232;break;case"MUD_SLAP_FAST":case 233:m.move3=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.move3=234;break;case"CONFUSION_FAST":case 235:m.move3=235;break;case"POISON_STING_FAST":case 236:m.move3=236;break;case"BUBBLE_FAST":case 237:m.move3=237;break;case"FEINT_ATTACK_FAST":case 238:m.move3=238;break;case"STEEL_WING_FAST":case 239:m.move3=239;break;case"FIRE_FANG_FAST":case 240:m.move3=240;break;case"ROCK_SMASH_FAST":case 241:m.move3=241;break;case"TRANSFORM_FAST":case 242:m.move3=242;break;case"COUNTER_FAST":case 243:m.move3=243;break;case"POWDER_SNOW_FAST":case 244:m.move3=244;break;case"CLOSE_COMBAT":case 245:m.move3=245;break;case"DYNAMIC_PUNCH":case 246:m.move3=246;break;case"FOCUS_BLAST":case 247:m.move3=247;break;case"AURORA_BEAM":case 248:m.move3=248;break;case"CHARGE_BEAM_FAST":case 249:m.move3=249;break;case"VOLT_SWITCH_FAST":case 250:m.move3=250;break;case"WILD_CHARGE":case 251:m.move3=251;break;case"ZAP_CANNON":case 252:m.move3=252;break;case"DRAGON_TAIL_FAST":case 253:m.move3=253;break;case"AVALANCHE":case 254:m.move3=254;break;case"AIR_SLASH_FAST":case 255:m.move3=255;break;case"BRAVE_BIRD":case 256:m.move3=256;break;case"SKY_ATTACK":case 257:m.move3=257;break;case"SAND_TOMB":case 258:m.move3=258;break;case"ROCK_BLAST":case 259:m.move3=259;break;case"INFESTATION_FAST":case 260:m.move3=260;break;case"STRUGGLE_BUG_FAST":case 261:m.move3=261;break;case"SILVER_WIND":case 262:m.move3=262;break;case"ASTONISH_FAST":case 263:m.move3=263;break;case"HEX_FAST":case 264:m.move3=264;break;case"NIGHT_SHADE":case 265:m.move3=265;break;case"IRON_TAIL_FAST":case 266:m.move3=266;break;case"GYRO_BALL":case 267:m.move3=267;break;case"HEAVY_SLAM":case 268:m.move3=268;break;case"FIRE_SPIN_FAST":case 269:m.move3=269;break;case"OVERHEAT":case 270:m.move3=270;break;case"BULLET_SEED_FAST":case 271:m.move3=271;break;case"GRASS_KNOT":case 272:m.move3=272;break;case"ENERGY_BALL":case 273:m.move3=273;break;case"EXTRASENSORY_FAST":case 274:m.move3=274;break;case"FUTURESIGHT":case 275:m.move3=275;break;case"MIRROR_COAT":case 276:m.move3=276;break;case"OUTRAGE":case 277:m.move3=277;break;case"SNARL_FAST":case 278:m.move3=278;break;case"CRUNCH":case 279:m.move3=279;break;case"FOUL_PLAY":case 280:m.move3=280;break;case"HIDDEN_POWER_FAST":case 281:m.move3=281;break;case"TAKE_DOWN_FAST":case 282:m.move3=282;break;case"WATERFALL_FAST":case 283:m.move3=283;break;case"SURF":case 284:m.move3=284;break;case"DRACO_METEOR":case 285:m.move3=285;break;case"DOOM_DESIRE":case 286:m.move3=286;break;case"YAWN_FAST":case 287:m.move3=287;break;case"PSYCHO_BOOST":case 288:m.move3=288;break;case"ORIGIN_PULSE":case 289:m.move3=289;break;case"PRECIPICE_BLADES":case 290:m.move3=290;break;case"PRESENT_FAST":case 291:m.move3=291;break;case"WEATHER_BALL_FIRE":case 292:m.move3=292;break;case"WEATHER_BALL_ICE":case 293:m.move3=293;break;case"WEATHER_BALL_ROCK":case 294:m.move3=294;break;case"WEATHER_BALL_WATER":case 295:m.move3=295;break;case"FRENZY_PLANT":case 296:m.move3=296;break;case"SMACK_DOWN_FAST":case 297:m.move3=297;break;case"BLAST_BURN":case 298:m.move3=298;break;case"HYDRO_CANNON":case 299:m.move3=299;break;case"LAST_RESORT":case 300:m.move3=300;break;case"METEOR_MASH":case 301:m.move3=301;break;case"SKULL_BASH":case 302:m.move3=302;break;case"ACID_SPRAY":case 303:m.move3=303;break;case"EARTH_POWER":case 304:m.move3=304;break;case"CRABHAMMER":case 305:m.move3=305;break;case"LUNGE":case 306:m.move3=306;break;case"CRUSH_CLAW":case 307:m.move3=307;break;case"OCTAZOOKA":case 308:m.move3=308;break;case"MIRROR_SHOT":case 309:m.move3=309;break;case"SUPER_POWER":case 310:m.move3=310;break;case"FELL_STINGER":case 311:m.move3=311;break;case"LEAF_TORNADO":case 312:m.move3=312;break;case"LEECH_LIFE":case 313:m.move3=313;break;case"DRAIN_PUNCH":case 314:m.move3=314;break;case"SHADOW_BONE":case 315:m.move3=315;break;case"MUDDY_WATER":case 316:m.move3=316;break;case"BLAZE_KICK":case 317:m.move3=317;break;case"RAZOR_SHELL":case 318:m.move3=318;break;case"POWER_UP_PUNCH":case 319:m.move3=319;break}if(d.energy!=null){m.energy=d.energy|0}if(d.pokemon_display!=null){if(typeof d.pokemon_display!=="object")throw TypeError(".POGOProtos.Data.Combat.CombatPokemon.pokemon_display: object expected");m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.pokemon_display)}if(d.individual_attack!=null){m.individual_attack=d.individual_attack|0}if(d.individual_defense!=null){m.individual_defense=d.individual_defense|0}if(d.individual_stamina!=null){m.individual_stamina=d.individual_stamina|0}if(d.attack_stat_stage!=null){m.attack_stat_stage=d.attack_stat_stage|0}if(d.defense_stat_stage!=null){m.defense_stat_stage=d.defense_stat_stage|0}if(d.battles_won!=null){m.battles_won=d.battles_won|0}if(d.battles_lost!=null){m.battles_lost=d.battles_lost|0}if(d.nickname!=null){m.nickname=String(d.nickname)}return m};CombatPokemon.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0;d.pokedex_id=o.enums===String?"MISSINGNO":0;d.cp=0;d.cp_multiplier=0;d.stamina=0;d.max_stamina=0;d.move1=o.enums===String?"MOVE_UNSET":0;d.move2=o.enums===String?"MOVE_UNSET":0;d.move3=o.enums===String?"MOVE_UNSET":0;d.energy=0;d.pokemon_display=null;d.individual_attack=0;d.individual_defense=0;d.individual_stamina=0;d.attack_stat_stage=0;d.defense_stat_stage=0;d.battles_won=0;d.battles_lost=0;d.nickname=""}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}if(m.pokedex_id!=null&&m.hasOwnProperty("pokedex_id")){d.pokedex_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokedex_id]:m.pokedex_id}if(m.cp!=null&&m.hasOwnProperty("cp")){d.cp=m.cp}if(m.cp_multiplier!=null&&m.hasOwnProperty("cp_multiplier")){d.cp_multiplier=o.json&&!isFinite(m.cp_multiplier)?String(m.cp_multiplier):m.cp_multiplier}if(m.stamina!=null&&m.hasOwnProperty("stamina")){d.stamina=m.stamina}if(m.max_stamina!=null&&m.hasOwnProperty("max_stamina")){d.max_stamina=m.max_stamina}if(m.move1!=null&&m.hasOwnProperty("move1")){d.move1=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.move1]:m.move1}if(m.move2!=null&&m.hasOwnProperty("move2")){d.move2=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.move2]:m.move2}if(m.move3!=null&&m.hasOwnProperty("move3")){d.move3=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.move3]:m.move3}if(m.energy!=null&&m.hasOwnProperty("energy")){d.energy=m.energy}if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display")){d.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.toObject(m.pokemon_display,o)}if(m.individual_attack!=null&&m.hasOwnProperty("individual_attack")){d.individual_attack=m.individual_attack}if(m.individual_defense!=null&&m.hasOwnProperty("individual_defense")){d.individual_defense=m.individual_defense}if(m.individual_stamina!=null&&m.hasOwnProperty("individual_stamina")){d.individual_stamina=m.individual_stamina}if(m.attack_stat_stage!=null&&m.hasOwnProperty("attack_stat_stage")){d.attack_stat_stage=m.attack_stat_stage}if(m.defense_stat_stage!=null&&m.hasOwnProperty("defense_stat_stage")){d.defense_stat_stage=m.defense_stat_stage}if(m.battles_won!=null&&m.hasOwnProperty("battles_won")){d.battles_won=m.battles_won}if(m.battles_lost!=null&&m.hasOwnProperty("battles_lost")){d.battles_lost=m.battles_lost}if(m.nickname!=null&&m.hasOwnProperty("nickname")){d.nickname=m.nickname}return d};CombatPokemon.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatPokemon}();Combat.PlayerCombatStats=function(){function PlayerCombatStats(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerCombatStats.encode=function encode(m,w){if(!w)w=$Writer.create();return w};PlayerCombatStats.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.PlayerCombatStats;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};PlayerCombatStats.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.PlayerCombatStats)return d;return new $root.POGOProtos.Data.Combat.PlayerCombatStats};PlayerCombatStats.toObject=function toObject(){return{}};PlayerCombatStats.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PlayerCombatStats.PlayerCombatBadgeStatsProto=function(){function PlayerCombatBadgeStatsProto(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerCombatBadgeStatsProto.prototype.num_won=0;PlayerCombatBadgeStatsProto.prototype.num_total=0;PlayerCombatBadgeStatsProto.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.num_won!=null&&m.hasOwnProperty("num_won"))w.uint32(8).int32(m.num_won);if(m.num_total!=null&&m.hasOwnProperty("num_total"))w.uint32(16).int32(m.num_total);return w};PlayerCombatBadgeStatsProto.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.PlayerCombatStats.PlayerCombatBadgeStatsProto;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.num_won=r.int32();break;case 2:m.num_total=r.int32();break;default:r.skipType(t&7);break}}return m};PlayerCombatBadgeStatsProto.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.PlayerCombatStats.PlayerCombatBadgeStatsProto)return d;var m=new $root.POGOProtos.Data.Combat.PlayerCombatStats.PlayerCombatBadgeStatsProto;if(d.num_won!=null){m.num_won=d.num_won|0}if(d.num_total!=null){m.num_total=d.num_total|0}return m};PlayerCombatBadgeStatsProto.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.num_won=0;d.num_total=0}if(m.num_won!=null&&m.hasOwnProperty("num_won")){d.num_won=m.num_won}if(m.num_total!=null&&m.hasOwnProperty("num_total")){d.num_total=m.num_total}return d};PlayerCombatBadgeStatsProto.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlayerCombatBadgeStatsProto}();return PlayerCombatStats}();Combat.PokemonCombatStats=function(){function PokemonCombatStats(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokemonCombatStats.prototype.num_won=0;PokemonCombatStats.prototype.num_total=0;PokemonCombatStats.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.num_won!=null&&m.hasOwnProperty("num_won"))w.uint32(8).int32(m.num_won);if(m.num_total!=null&&m.hasOwnProperty("num_total"))w.uint32(16).int32(m.num_total);return w};PokemonCombatStats.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.PokemonCombatStats;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.num_won=r.int32();break;case 2:m.num_total=r.int32();break;default:r.skipType(t&7);break}}return m};PokemonCombatStats.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.PokemonCombatStats)return d;var m=new $root.POGOProtos.Data.Combat.PokemonCombatStats;if(d.num_won!=null){m.num_won=d.num_won|0}if(d.num_total!=null){m.num_total=d.num_total|0}return m};PokemonCombatStats.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.num_won=0;d.num_total=0}if(m.num_won!=null&&m.hasOwnProperty("num_won")){d.num_won=m.num_won}if(m.num_total!=null&&m.hasOwnProperty("num_total")){d.num_total=m.num_total}return d};PokemonCombatStats.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokemonCombatStats}();Combat.PokemonCondition=function(){function PokemonCondition(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokemonCondition.prototype.type=0;PokemonCondition.prototype.with_pokemon_cp_limit=null;PokemonCondition.prototype.with_pokemon_type=null;PokemonCondition.prototype.with_pokemon_category=null;PokemonCondition.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(8).int32(m.type);if(m.with_pokemon_cp_limit!=null&&m.hasOwnProperty("with_pokemon_cp_limit"))$root.POGOProtos.Data.Combat.WithPokemonCpLimit.encode(m.with_pokemon_cp_limit,w.uint32(18).fork()).ldelim();if(m.with_pokemon_type!=null&&m.hasOwnProperty("with_pokemon_type"))$root.POGOProtos.Data.Combat.WithPokemonType.encode(m.with_pokemon_type,w.uint32(26).fork()).ldelim();if(m.with_pokemon_category!=null&&m.hasOwnProperty("with_pokemon_category"))$root.POGOProtos.Data.Combat.WithPokemonCategory.encode(m.with_pokemon_category,w.uint32(34).fork()).ldelim();return w};PokemonCondition.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.PokemonCondition;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.type=r.int32();break;case 2:m.with_pokemon_cp_limit=$root.POGOProtos.Data.Combat.WithPokemonCpLimit.decode(r,r.uint32());break;case 3:m.with_pokemon_type=$root.POGOProtos.Data.Combat.WithPokemonType.decode(r,r.uint32());break;case 4:m.with_pokemon_category=$root.POGOProtos.Data.Combat.WithPokemonCategory.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};PokemonCondition.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.PokemonCondition)return d;var m=new $root.POGOProtos.Data.Combat.PokemonCondition;switch(d.type){case"UNSET_CONDITION":case 0:m.type=0;break;case"WITH_POKEMON_CP_LIMIT":case 1:m.type=1;break;case"WITH_PLAYER_LEVEL":case 2:m.type=2;break;case"WITH_POKEMON_TYPE":case 3:m.type=3;break;case"WITH_POKEMON_CATEGORY":case 4:m.type=4;break}if(d.with_pokemon_cp_limit!=null){if(typeof d.with_pokemon_cp_limit!=="object")throw TypeError(".POGOProtos.Data.Combat.PokemonCondition.with_pokemon_cp_limit: object expected");m.with_pokemon_cp_limit=$root.POGOProtos.Data.Combat.WithPokemonCpLimit.fromObject(d.with_pokemon_cp_limit)}if(d.with_pokemon_type!=null){if(typeof d.with_pokemon_type!=="object")throw TypeError(".POGOProtos.Data.Combat.PokemonCondition.with_pokemon_type: object expected");m.with_pokemon_type=$root.POGOProtos.Data.Combat.WithPokemonType.fromObject(d.with_pokemon_type)}if(d.with_pokemon_category!=null){if(typeof d.with_pokemon_category!=="object")throw TypeError(".POGOProtos.Data.Combat.PokemonCondition.with_pokemon_category: object expected");m.with_pokemon_category=$root.POGOProtos.Data.Combat.WithPokemonCategory.fromObject(d.with_pokemon_category)}return m};PokemonCondition.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.type=o.enums===String?"UNSET_CONDITION":0;d.with_pokemon_cp_limit=null;d.with_pokemon_type=null;d.with_pokemon_category=null}if(m.type!=null&&m.hasOwnProperty("type")){d.type=o.enums===String?$root.POGOProtos.Enums.ConditionType[m.type]:m.type}if(m.with_pokemon_cp_limit!=null&&m.hasOwnProperty("with_pokemon_cp_limit")){d.with_pokemon_cp_limit=$root.POGOProtos.Data.Combat.WithPokemonCpLimit.toObject(m.with_pokemon_cp_limit,o)}if(m.with_pokemon_type!=null&&m.hasOwnProperty("with_pokemon_type")){d.with_pokemon_type=$root.POGOProtos.Data.Combat.WithPokemonType.toObject(m.with_pokemon_type,o)}if(m.with_pokemon_category!=null&&m.hasOwnProperty("with_pokemon_category")){d.with_pokemon_category=$root.POGOProtos.Data.Combat.WithPokemonCategory.toObject(m.with_pokemon_category,o)}return d};PokemonCondition.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokemonCondition}();Combat.UnlockCondition=function(){function UnlockCondition(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UnlockCondition.prototype.type=0;UnlockCondition.prototype.min_pokemon_count=0;UnlockCondition.prototype.with_player_level=null;UnlockCondition.prototype.with_pokemon_cp_limit=null;UnlockCondition.prototype.with_pokemon_type=null;UnlockCondition.prototype.with_pokemon_category=null;UnlockCondition.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(8).int32(m.type);if(m.min_pokemon_count!=null&&m.hasOwnProperty("min_pokemon_count"))w.uint32(16).int32(m.min_pokemon_count);if(m.with_player_level!=null&&m.hasOwnProperty("with_player_level"))$root.POGOProtos.Data.Combat.WithPlayerLevel.encode(m.with_player_level,w.uint32(26).fork()).ldelim();if(m.with_pokemon_cp_limit!=null&&m.hasOwnProperty("with_pokemon_cp_limit"))$root.POGOProtos.Data.Combat.WithPokemonCpLimit.encode(m.with_pokemon_cp_limit,w.uint32(34).fork()).ldelim();if(m.with_pokemon_type!=null&&m.hasOwnProperty("with_pokemon_type"))$root.POGOProtos.Data.Combat.WithPokemonType.encode(m.with_pokemon_type,w.uint32(42).fork()).ldelim();if(m.with_pokemon_category!=null&&m.hasOwnProperty("with_pokemon_category"))$root.POGOProtos.Data.Combat.WithPokemonCategory.encode(m.with_pokemon_category,w.uint32(50).fork()).ldelim();return w};UnlockCondition.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.UnlockCondition;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.type=r.int32();break;case 2:m.min_pokemon_count=r.int32();break;case 3:m.with_player_level=$root.POGOProtos.Data.Combat.WithPlayerLevel.decode(r,r.uint32());break;case 4:m.with_pokemon_cp_limit=$root.POGOProtos.Data.Combat.WithPokemonCpLimit.decode(r,r.uint32());break;case 5:m.with_pokemon_type=$root.POGOProtos.Data.Combat.WithPokemonType.decode(r,r.uint32());break;case 6:m.with_pokemon_category=$root.POGOProtos.Data.Combat.WithPokemonCategory.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};UnlockCondition.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.UnlockCondition)return d;var m=new $root.POGOProtos.Data.Combat.UnlockCondition;switch(d.type){case"UNSET_CONDITION":case 0:m.type=0;break;case"WITH_POKEMON_CP_LIMIT":case 1:m.type=1;break;case"WITH_PLAYER_LEVEL":case 2:m.type=2;break;case"WITH_POKEMON_TYPE":case 3:m.type=3;break;case"WITH_POKEMON_CATEGORY":case 4:m.type=4;break}if(d.min_pokemon_count!=null){m.min_pokemon_count=d.min_pokemon_count|0}if(d.with_player_level!=null){if(typeof d.with_player_level!=="object")throw TypeError(".POGOProtos.Data.Combat.UnlockCondition.with_player_level: object expected");m.with_player_level=$root.POGOProtos.Data.Combat.WithPlayerLevel.fromObject(d.with_player_level)}if(d.with_pokemon_cp_limit!=null){if(typeof d.with_pokemon_cp_limit!=="object")throw TypeError(".POGOProtos.Data.Combat.UnlockCondition.with_pokemon_cp_limit: object expected");m.with_pokemon_cp_limit=$root.POGOProtos.Data.Combat.WithPokemonCpLimit.fromObject(d.with_pokemon_cp_limit)}if(d.with_pokemon_type!=null){if(typeof d.with_pokemon_type!=="object")throw TypeError(".POGOProtos.Data.Combat.UnlockCondition.with_pokemon_type: object expected");m.with_pokemon_type=$root.POGOProtos.Data.Combat.WithPokemonType.fromObject(d.with_pokemon_type)}if(d.with_pokemon_category!=null){if(typeof d.with_pokemon_category!=="object")throw TypeError(".POGOProtos.Data.Combat.UnlockCondition.with_pokemon_category: object expected");m.with_pokemon_category=$root.POGOProtos.Data.Combat.WithPokemonCategory.fromObject(d.with_pokemon_category)}return m};UnlockCondition.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.type=o.enums===String?"UNSET_CONDITION":0;d.min_pokemon_count=0;d.with_player_level=null;d.with_pokemon_cp_limit=null;d.with_pokemon_type=null;d.with_pokemon_category=null}if(m.type!=null&&m.hasOwnProperty("type")){d.type=o.enums===String?$root.POGOProtos.Enums.ConditionType[m.type]:m.type}if(m.min_pokemon_count!=null&&m.hasOwnProperty("min_pokemon_count")){d.min_pokemon_count=m.min_pokemon_count}if(m.with_player_level!=null&&m.hasOwnProperty("with_player_level")){d.with_player_level=$root.POGOProtos.Data.Combat.WithPlayerLevel.toObject(m.with_player_level,o)}if(m.with_pokemon_cp_limit!=null&&m.hasOwnProperty("with_pokemon_cp_limit")){d.with_pokemon_cp_limit=$root.POGOProtos.Data.Combat.WithPokemonCpLimit.toObject(m.with_pokemon_cp_limit,o)}if(m.with_pokemon_type!=null&&m.hasOwnProperty("with_pokemon_type")){d.with_pokemon_type=$root.POGOProtos.Data.Combat.WithPokemonType.toObject(m.with_pokemon_type,o)}if(m.with_pokemon_category!=null&&m.hasOwnProperty("with_pokemon_category")){d.with_pokemon_category=$root.POGOProtos.Data.Combat.WithPokemonCategory.toObject(m.with_pokemon_category,o)}return d};UnlockCondition.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UnlockCondition}();Combat.WithPlayerLevel=function(){function WithPlayerLevel(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithPlayerLevel.prototype.level=0;WithPlayerLevel.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.level!=null&&m.hasOwnProperty("level"))w.uint32(8).int32(m.level);return w};WithPlayerLevel.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.WithPlayerLevel;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.level=r.int32();break;default:r.skipType(t&7);break}}return m};WithPlayerLevel.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.WithPlayerLevel)return d;var m=new $root.POGOProtos.Data.Combat.WithPlayerLevel;if(d.level!=null){m.level=d.level|0}return m};WithPlayerLevel.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.level=0}if(m.level!=null&&m.hasOwnProperty("level")){d.level=m.level}return d};WithPlayerLevel.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithPlayerLevel}();Combat.WithPokemonCategory=function(){function WithPokemonCategory(p){this.pokemon_ids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithPokemonCategory.prototype.category_name="";WithPokemonCategory.prototype.pokemon_ids=$util.emptyArray;WithPokemonCategory.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.category_name!=null&&m.hasOwnProperty("category_name"))w.uint32(10).string(m.category_name);if(m.pokemon_ids!=null&&m.pokemon_ids.length){w.uint32(18).fork();for(var i=0;i<m.pokemon_ids.length;++i)w.int32(m.pokemon_ids[i]);w.ldelim()}return w};WithPokemonCategory.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.WithPokemonCategory;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.category_name=r.string();break;case 2:if(!(m.pokemon_ids&&m.pokemon_ids.length))m.pokemon_ids=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.pokemon_ids.push(r.int32())}else m.pokemon_ids.push(r.int32());break;default:r.skipType(t&7);break}}return m};WithPokemonCategory.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.WithPokemonCategory)return d;var m=new $root.POGOProtos.Data.Combat.WithPokemonCategory;if(d.category_name!=null){m.category_name=String(d.category_name)}if(d.pokemon_ids){if(!Array.isArray(d.pokemon_ids))throw TypeError(".POGOProtos.Data.Combat.WithPokemonCategory.pokemon_ids: array expected");m.pokemon_ids=[];for(var i=0;i<d.pokemon_ids.length;++i){switch(d.pokemon_ids[i]){default:case"POKEMON_TYPE_NONE":case 0:m.pokemon_ids[i]=0;break;case"POKEMON_TYPE_NORMAL":case 1:m.pokemon_ids[i]=1;break;case"POKEMON_TYPE_FIGHTING":case 2:m.pokemon_ids[i]=2;break;case"POKEMON_TYPE_FLYING":case 3:m.pokemon_ids[i]=3;break;case"POKEMON_TYPE_POISON":case 4:m.pokemon_ids[i]=4;break;case"POKEMON_TYPE_GROUND":case 5:m.pokemon_ids[i]=5;break;case"POKEMON_TYPE_ROCK":case 6:m.pokemon_ids[i]=6;break;case"POKEMON_TYPE_BUG":case 7:m.pokemon_ids[i]=7;break;case"POKEMON_TYPE_GHOST":case 8:m.pokemon_ids[i]=8;break;case"POKEMON_TYPE_STEEL":case 9:m.pokemon_ids[i]=9;break;case"POKEMON_TYPE_FIRE":case 10:m.pokemon_ids[i]=10;break;case"POKEMON_TYPE_WATER":case 11:m.pokemon_ids[i]=11;break;case"POKEMON_TYPE_GRASS":case 12:m.pokemon_ids[i]=12;break;case"POKEMON_TYPE_ELECTRIC":case 13:m.pokemon_ids[i]=13;break;case"POKEMON_TYPE_PSYCHIC":case 14:m.pokemon_ids[i]=14;break;case"POKEMON_TYPE_ICE":case 15:m.pokemon_ids[i]=15;break;case"POKEMON_TYPE_DRAGON":case 16:m.pokemon_ids[i]=16;break;case"POKEMON_TYPE_DARK":case 17:m.pokemon_ids[i]=17;break;case"POKEMON_TYPE_FAIRY":case 18:m.pokemon_ids[i]=18;break}}}return m};WithPokemonCategory.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.pokemon_ids=[]}if(o.defaults){d.category_name=""}if(m.category_name!=null&&m.hasOwnProperty("category_name")){d.category_name=m.category_name}if(m.pokemon_ids&&m.pokemon_ids.length){d.pokemon_ids=[];for(var j=0;j<m.pokemon_ids.length;++j){d.pokemon_ids[j]=o.enums===String?$root.POGOProtos.Enums.PokemonType[m.pokemon_ids[j]]:m.pokemon_ids[j]}}return d};WithPokemonCategory.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithPokemonCategory}();Combat.WithPokemonCpLimit=function(){function WithPokemonCpLimit(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithPokemonCpLimit.prototype.min_cp=0;WithPokemonCpLimit.prototype.max_cp=0;WithPokemonCpLimit.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.min_cp!=null&&m.hasOwnProperty("min_cp"))w.uint32(8).int32(m.min_cp);if(m.max_cp!=null&&m.hasOwnProperty("max_cp"))w.uint32(16).int32(m.max_cp);return w};WithPokemonCpLimit.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.WithPokemonCpLimit;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.min_cp=r.int32();break;case 2:m.max_cp=r.int32();break;default:r.skipType(t&7);break}}return m};WithPokemonCpLimit.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.WithPokemonCpLimit)return d;var m=new $root.POGOProtos.Data.Combat.WithPokemonCpLimit;if(d.min_cp!=null){m.min_cp=d.min_cp|0}if(d.max_cp!=null){m.max_cp=d.max_cp|0}return m};WithPokemonCpLimit.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.min_cp=0;d.max_cp=0}if(m.min_cp!=null&&m.hasOwnProperty("min_cp")){d.min_cp=m.min_cp}if(m.max_cp!=null&&m.hasOwnProperty("max_cp")){d.max_cp=m.max_cp}return d};WithPokemonCpLimit.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithPokemonCpLimit}();Combat.WithPokemonType=function(){function WithPokemonType(p){this.pokemon_type=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithPokemonType.prototype.pokemon_type=$util.emptyArray;WithPokemonType.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_type!=null&&m.pokemon_type.length){w.uint32(10).fork();for(var i=0;i<m.pokemon_type.length;++i)w.int32(m.pokemon_type[i]);w.ldelim()}return w};WithPokemonType.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Combat.WithPokemonType;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.pokemon_type&&m.pokemon_type.length))m.pokemon_type=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.pokemon_type.push(r.int32())}else m.pokemon_type.push(r.int32());break;default:r.skipType(t&7);break}}return m};WithPokemonType.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Combat.WithPokemonType)return d;var m=new $root.POGOProtos.Data.Combat.WithPokemonType;if(d.pokemon_type){if(!Array.isArray(d.pokemon_type))throw TypeError(".POGOProtos.Data.Combat.WithPokemonType.pokemon_type: array expected");m.pokemon_type=[];for(var i=0;i<d.pokemon_type.length;++i){switch(d.pokemon_type[i]){default:case"POKEMON_TYPE_NONE":case 0:m.pokemon_type[i]=0;break;case"POKEMON_TYPE_NORMAL":case 1:m.pokemon_type[i]=1;break;case"POKEMON_TYPE_FIGHTING":case 2:m.pokemon_type[i]=2;break;case"POKEMON_TYPE_FLYING":case 3:m.pokemon_type[i]=3;break;case"POKEMON_TYPE_POISON":case 4:m.pokemon_type[i]=4;break;case"POKEMON_TYPE_GROUND":case 5:m.pokemon_type[i]=5;break;case"POKEMON_TYPE_ROCK":case 6:m.pokemon_type[i]=6;break;case"POKEMON_TYPE_BUG":case 7:m.pokemon_type[i]=7;break;case"POKEMON_TYPE_GHOST":case 8:m.pokemon_type[i]=8;break;case"POKEMON_TYPE_STEEL":case 9:m.pokemon_type[i]=9;break;case"POKEMON_TYPE_FIRE":case 10:m.pokemon_type[i]=10;break;case"POKEMON_TYPE_WATER":case 11:m.pokemon_type[i]=11;break;case"POKEMON_TYPE_GRASS":case 12:m.pokemon_type[i]=12;break;case"POKEMON_TYPE_ELECTRIC":case 13:m.pokemon_type[i]=13;break;case"POKEMON_TYPE_PSYCHIC":case 14:m.pokemon_type[i]=14;break;case"POKEMON_TYPE_ICE":case 15:m.pokemon_type[i]=15;break;case"POKEMON_TYPE_DRAGON":case 16:m.pokemon_type[i]=16;break;case"POKEMON_TYPE_DARK":case 17:m.pokemon_type[i]=17;break;case"POKEMON_TYPE_FAIRY":case 18:m.pokemon_type[i]=18;break}}}return m};WithPokemonType.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.pokemon_type=[]}if(m.pokemon_type&&m.pokemon_type.length){d.pokemon_type=[];for(var j=0;j<m.pokemon_type.length;++j){d.pokemon_type[j]=o.enums===String?$root.POGOProtos.Enums.PokemonType[m.pokemon_type[j]]:m.pokemon_type[j]}}return d};WithPokemonType.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithPokemonType}();return Combat}();Data.DamageProperty=function(){function DamageProperty(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DamageProperty.prototype.super_effective_charge_move=false;DamageProperty.prototype.weather_boosted=false;DamageProperty.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.super_effective_charge_move!=null&&m.hasOwnProperty("super_effective_charge_move"))w.uint32(8).bool(m.super_effective_charge_move);if(m.weather_boosted!=null&&m.hasOwnProperty("weather_boosted"))w.uint32(16).bool(m.weather_boosted);return w};DamageProperty.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.DamageProperty;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.super_effective_charge_move=r.bool();break;case 2:m.weather_boosted=r.bool();break;default:r.skipType(t&7);break}}return m};DamageProperty.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.DamageProperty)return d;var m=new $root.POGOProtos.Data.DamageProperty;if(d.super_effective_charge_move!=null){m.super_effective_charge_move=Boolean(d.super_effective_charge_move)}if(d.weather_boosted!=null){m.weather_boosted=Boolean(d.weather_boosted)}return m};DamageProperty.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.super_effective_charge_move=false;d.weather_boosted=false}if(m.super_effective_charge_move!=null&&m.hasOwnProperty("super_effective_charge_move")){d.super_effective_charge_move=m.super_effective_charge_move}if(m.weather_boosted!=null&&m.hasOwnProperty("weather_boosted")){d.weather_boosted=m.weather_boosted}return d};DamageProperty.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DamageProperty}();Data.Ditto=function(){var Ditto={};Ditto.ChannelAuthEventParams=function(){function ChannelAuthEventParams(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ChannelAuthEventParams.prototype.status=0;ChannelAuthEventParams.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).uint32(m.status);return w};ChannelAuthEventParams.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Ditto.ChannelAuthEventParams;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.uint32();break;default:r.skipType(t&7);break}}return m};ChannelAuthEventParams.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Ditto.ChannelAuthEventParams)return d;var m=new $root.POGOProtos.Data.Ditto.ChannelAuthEventParams;if(d.status!=null){m.status=d.status>>>0}return m};ChannelAuthEventParams.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=m.status}return d};ChannelAuthEventParams.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ChannelAuthEventParams}();Ditto.DownstreamActionEventParams=function(){function DownstreamActionEventParams(p){this.methods=[];this.payloads=[];this.ids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DownstreamActionEventParams.prototype.methods=$util.emptyArray;DownstreamActionEventParams.prototype.payloads=$util.emptyArray;DownstreamActionEventParams.prototype.ids=$util.emptyArray;DownstreamActionEventParams.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.methods!=null&&m.methods.length){w.uint32(10).fork();for(var i=0;i<m.methods.length;++i)w.uint32(m.methods[i]);w.ldelim()}if(m.payloads!=null&&m.payloads.length){for(var i=0;i<m.payloads.length;++i)w.uint32(18).bytes(m.payloads[i])}if(m.ids!=null&&m.ids.length){w.uint32(26).fork();for(var i=0;i<m.ids.length;++i)w.uint64(m.ids[i]);w.ldelim()}return w};DownstreamActionEventParams.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Ditto.DownstreamActionEventParams;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.methods&&m.methods.length))m.methods=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.methods.push(r.uint32())}else m.methods.push(r.uint32());break;case 2:if(!(m.payloads&&m.payloads.length))m.payloads=[];m.payloads.push(r.bytes());break;case 3:if(!(m.ids&&m.ids.length))m.ids=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.ids.push(r.uint64())}else m.ids.push(r.uint64());break;default:r.skipType(t&7);break}}return m};DownstreamActionEventParams.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Ditto.DownstreamActionEventParams)return d;var m=new $root.POGOProtos.Data.Ditto.DownstreamActionEventParams;if(d.methods){if(!Array.isArray(d.methods))throw TypeError(".POGOProtos.Data.Ditto.DownstreamActionEventParams.methods: array expected");m.methods=[];for(var i=0;i<d.methods.length;++i){m.methods[i]=d.methods[i]>>>0}}if(d.payloads){if(!Array.isArray(d.payloads))throw TypeError(".POGOProtos.Data.Ditto.DownstreamActionEventParams.payloads: array expected");m.payloads=[];for(var i=0;i<d.payloads.length;++i){if(typeof d.payloads[i]==="string")$util.base64.decode(d.payloads[i],m.payloads[i]=$util.newBuffer($util.base64.length(d.payloads[i])),0);else if(d.payloads[i].length)m.payloads[i]=d.payloads[i]}}if(d.ids){if(!Array.isArray(d.ids))throw TypeError(".POGOProtos.Data.Ditto.DownstreamActionEventParams.ids: array expected");m.ids=[];for(var i=0;i<d.ids.length;++i){if($util.Long)(m.ids[i]=$util.Long.fromValue(d.ids[i])).unsigned=true;else if(typeof d.ids[i]==="string")m.ids[i]=parseInt(d.ids[i],10);else if(typeof d.ids[i]==="number")m.ids[i]=d.ids[i];else if(typeof d.ids[i]==="object")m.ids[i]=new $util.LongBits(d.ids[i].low>>>0,d.ids[i].high>>>0).toNumber(true)}}return m};DownstreamActionEventParams.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.methods=[];d.payloads=[];d.ids=[]}if(m.methods&&m.methods.length){d.methods=[];for(var j=0;j<m.methods.length;++j){d.methods[j]=m.methods[j]}}if(m.payloads&&m.payloads.length){d.payloads=[];for(var j=0;j<m.payloads.length;++j){d.payloads[j]=o.bytes===String?$util.base64.encode(m.payloads[j],0,m.payloads[j].length):o.bytes===Array?Array.prototype.slice.call(m.payloads[j]):m.payloads[j]}}if(m.ids&&m.ids.length){d.ids=[];for(var j=0;j<m.ids.length;++j){if(typeof m.ids[j]==="number")d.ids[j]=o.longs===String?String(m.ids[j]):m.ids[j];else d.ids[j]=o.longs===String?$util.Long.prototype.toString.call(m.ids[j]):o.longs===Number?new $util.LongBits(m.ids[j].low>>>0,m.ids[j].high>>>0).toNumber(true):m.ids[j]}}return d};DownstreamActionEventParams.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DownstreamActionEventParams}();Ditto.GoogleAuthEventParams=function(){function GoogleAuthEventParams(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GoogleAuthEventParams.prototype.payload="";GoogleAuthEventParams.prototype.account_name="";GoogleAuthEventParams.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.payload!=null&&m.hasOwnProperty("payload"))w.uint32(10).string(m.payload);if(m.account_name!=null&&m.hasOwnProperty("account_name"))w.uint32(18).string(m.account_name);return w};GoogleAuthEventParams.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Ditto.GoogleAuthEventParams;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.payload=r.string();break;case 2:m.account_name=r.string();break;default:r.skipType(t&7);break}}return m};GoogleAuthEventParams.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Ditto.GoogleAuthEventParams)return d;var m=new $root.POGOProtos.Data.Ditto.GoogleAuthEventParams;if(d.payload!=null){m.payload=String(d.payload)}if(d.account_name!=null){m.account_name=String(d.account_name)}return m};GoogleAuthEventParams.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.payload="";d.account_name=""}if(m.payload!=null&&m.hasOwnProperty("payload")){d.payload=m.payload}if(m.account_name!=null&&m.hasOwnProperty("account_name")){d.account_name=m.account_name}return d};GoogleAuthEventParams.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GoogleAuthEventParams}();Ditto.LocationUpdateEventParams=function(){function LocationUpdateEventParams(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LocationUpdateEventParams.prototype.latitude_deg=0;LocationUpdateEventParams.prototype.longitude_deg=0;LocationUpdateEventParams.prototype.altitude_m=0;LocationUpdateEventParams.prototype.accuracy_m=0;LocationUpdateEventParams.prototype.timestamp_s=0;LocationUpdateEventParams.prototype.provider_status=0;LocationUpdateEventParams.prototype.location_type=0;LocationUpdateEventParams.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.latitude_deg!=null&&m.hasOwnProperty("latitude_deg"))w.uint32(9).double(m.latitude_deg);if(m.longitude_deg!=null&&m.hasOwnProperty("longitude_deg"))w.uint32(17).double(m.longitude_deg);if(m.altitude_m!=null&&m.hasOwnProperty("altitude_m"))w.uint32(25).double(m.altitude_m);if(m.accuracy_m!=null&&m.hasOwnProperty("accuracy_m"))w.uint32(33).double(m.accuracy_m);if(m.timestamp_s!=null&&m.hasOwnProperty("timestamp_s"))w.uint32(41).double(m.timestamp_s);if(m.provider_status!=null&&m.hasOwnProperty("provider_status"))w.uint32(48).uint32(m.provider_status);if(m.location_type!=null&&m.hasOwnProperty("location_type"))w.uint32(56).uint32(m.location_type);return w};LocationUpdateEventParams.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Ditto.LocationUpdateEventParams;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.latitude_deg=r.double();break;case 2:m.longitude_deg=r.double();break;case 3:m.altitude_m=r.double();break;case 4:m.accuracy_m=r.double();break;case 5:m.timestamp_s=r.double();break;case 6:m.provider_status=r.uint32();break;case 7:m.location_type=r.uint32();break;default:r.skipType(t&7);break}}return m};LocationUpdateEventParams.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Ditto.LocationUpdateEventParams)return d;var m=new $root.POGOProtos.Data.Ditto.LocationUpdateEventParams;if(d.latitude_deg!=null){m.latitude_deg=Number(d.latitude_deg)}if(d.longitude_deg!=null){m.longitude_deg=Number(d.longitude_deg)}if(d.altitude_m!=null){m.altitude_m=Number(d.altitude_m)}if(d.accuracy_m!=null){m.accuracy_m=Number(d.accuracy_m)}if(d.timestamp_s!=null){m.timestamp_s=Number(d.timestamp_s)}if(d.provider_status!=null){m.provider_status=d.provider_status>>>0}if(d.location_type!=null){m.location_type=d.location_type>>>0}return m};LocationUpdateEventParams.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.latitude_deg=0;d.longitude_deg=0;d.altitude_m=0;d.accuracy_m=0;d.timestamp_s=0;d.provider_status=0;d.location_type=0}if(m.latitude_deg!=null&&m.hasOwnProperty("latitude_deg")){d.latitude_deg=o.json&&!isFinite(m.latitude_deg)?String(m.latitude_deg):m.latitude_deg}if(m.longitude_deg!=null&&m.hasOwnProperty("longitude_deg")){d.longitude_deg=o.json&&!isFinite(m.longitude_deg)?String(m.longitude_deg):m.longitude_deg}if(m.altitude_m!=null&&m.hasOwnProperty("altitude_m")){d.altitude_m=o.json&&!isFinite(m.altitude_m)?String(m.altitude_m):m.altitude_m}if(m.accuracy_m!=null&&m.hasOwnProperty("accuracy_m")){d.accuracy_m=o.json&&!isFinite(m.accuracy_m)?String(m.accuracy_m):m.accuracy_m}if(m.timestamp_s!=null&&m.hasOwnProperty("timestamp_s")){d.timestamp_s=o.json&&!isFinite(m.timestamp_s)?String(m.timestamp_s):m.timestamp_s}if(m.provider_status!=null&&m.hasOwnProperty("provider_status")){d.provider_status=m.provider_status}if(m.location_type!=null&&m.hasOwnProperty("location_type")){d.location_type=m.location_type}return d};LocationUpdateEventParams.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return LocationUpdateEventParams}();Ditto.RpcResponseEventParams=function(){function RpcResponseEventParams(p){this.payloads=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RpcResponseEventParams.prototype.rpc_id=0;RpcResponseEventParams.prototype.status=0;RpcResponseEventParams.prototype.payloads=$util.emptyArray;RpcResponseEventParams.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.rpc_id!=null&&m.hasOwnProperty("rpc_id"))w.uint32(8).uint32(m.rpc_id);if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(16).uint32(m.status);if(m.payloads!=null&&m.payloads.length){for(var i=0;i<m.payloads.length;++i)w.uint32(26).bytes(m.payloads[i])}return w};RpcResponseEventParams.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Ditto.RpcResponseEventParams;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.rpc_id=r.uint32();break;case 2:m.status=r.uint32();break;case 3:if(!(m.payloads&&m.payloads.length))m.payloads=[];m.payloads.push(r.bytes());break;default:r.skipType(t&7);break}}return m};RpcResponseEventParams.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Ditto.RpcResponseEventParams)return d;var m=new $root.POGOProtos.Data.Ditto.RpcResponseEventParams;if(d.rpc_id!=null){m.rpc_id=d.rpc_id>>>0}if(d.status!=null){m.status=d.status>>>0}if(d.payloads){if(!Array.isArray(d.payloads))throw TypeError(".POGOProtos.Data.Ditto.RpcResponseEventParams.payloads: array expected");m.payloads=[];for(var i=0;i<d.payloads.length;++i){if(typeof d.payloads[i]==="string")$util.base64.decode(d.payloads[i],m.payloads[i]=$util.newBuffer($util.base64.length(d.payloads[i])),0);else if(d.payloads[i].length)m.payloads[i]=d.payloads[i]}}return m};RpcResponseEventParams.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.payloads=[]}if(o.defaults){d.rpc_id=0;d.status=0}if(m.rpc_id!=null&&m.hasOwnProperty("rpc_id")){d.rpc_id=m.rpc_id}if(m.status!=null&&m.hasOwnProperty("status")){d.status=m.status}if(m.payloads&&m.payloads.length){d.payloads=[];for(var j=0;j<m.payloads.length;++j){d.payloads[j]=o.bytes===String?$util.base64.encode(m.payloads[j],0,m.payloads[j].length):o.bytes===Array?Array.prototype.slice.call(m.payloads[j]):m.payloads[j]}}return d};RpcResponseEventParams.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RpcResponseEventParams}();Ditto.SyncRequestedEventParams=function(){function SyncRequestedEventParams(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SyncRequestedEventParams.encode=function encode(m,w){if(!w)w=$Writer.create();return w};SyncRequestedEventParams.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Ditto.SyncRequestedEventParams;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};SyncRequestedEventParams.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Ditto.SyncRequestedEventParams)return d;return new $root.POGOProtos.Data.Ditto.SyncRequestedEventParams};SyncRequestedEventParams.toObject=function toObject(){return{}};SyncRequestedEventParams.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SyncRequestedEventParams}();return Ditto}();Data.DownloadUrlEntry=function(){function DownloadUrlEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DownloadUrlEntry.prototype.asset_id="";DownloadUrlEntry.prototype.url="";DownloadUrlEntry.prototype.size=0;DownloadUrlEntry.prototype.checksum=0;DownloadUrlEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.asset_id!=null&&m.hasOwnProperty("asset_id"))w.uint32(10).string(m.asset_id);if(m.url!=null&&m.hasOwnProperty("url"))w.uint32(18).string(m.url);if(m.size!=null&&m.hasOwnProperty("size"))w.uint32(24).int32(m.size);if(m.checksum!=null&&m.hasOwnProperty("checksum"))w.uint32(37).fixed32(m.checksum);return w};DownloadUrlEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.DownloadUrlEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.asset_id=r.string();break;case 2:m.url=r.string();break;case 3:m.size=r.int32();break;case 4:m.checksum=r.fixed32();break;default:r.skipType(t&7);break}}return m};DownloadUrlEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.DownloadUrlEntry)return d;var m=new $root.POGOProtos.Data.DownloadUrlEntry;if(d.asset_id!=null){m.asset_id=String(d.asset_id)}if(d.url!=null){m.url=String(d.url)}if(d.size!=null){m.size=d.size|0}if(d.checksum!=null){m.checksum=d.checksum>>>0}return m};DownloadUrlEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.asset_id="";d.url="";d.size=0;d.checksum=0}if(m.asset_id!=null&&m.hasOwnProperty("asset_id")){d.asset_id=m.asset_id}if(m.url!=null&&m.hasOwnProperty("url")){d.url=m.url}if(m.size!=null&&m.hasOwnProperty("size")){d.size=m.size}if(m.checksum!=null&&m.hasOwnProperty("checksum")){d.checksum=m.checksum}return d};DownloadUrlEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DownloadUrlEntry}();Data.Fitness=function(){var Fitness={};Fitness.FitnessMetrics=function(){function FitnessMetrics(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FitnessMetrics.prototype.distance_walked_meters=0;FitnessMetrics.prototype.step_count=0;FitnessMetrics.prototype.calories_burned_kcals=0;FitnessMetrics.prototype.exercise_duration_mi=$util.Long?$util.Long.fromBits(0,0,false):0;FitnessMetrics.prototype.wheelchair_distance_meters=0;FitnessMetrics.prototype.wheelchair_push_count=0;FitnessMetrics.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.distance_walked_meters!=null&&m.hasOwnProperty("distance_walked_meters"))w.uint32(9).double(m.distance_walked_meters);if(m.step_count!=null&&m.hasOwnProperty("step_count"))w.uint32(16).int32(m.step_count);if(m.calories_burned_kcals!=null&&m.hasOwnProperty("calories_burned_kcals"))w.uint32(25).double(m.calories_burned_kcals);if(m.exercise_duration_mi!=null&&m.hasOwnProperty("exercise_duration_mi"))w.uint32(32).int64(m.exercise_duration_mi);if(m.wheelchair_distance_meters!=null&&m.hasOwnProperty("wheelchair_distance_meters"))w.uint32(41).double(m.wheelchair_distance_meters);if(m.wheelchair_push_count!=null&&m.hasOwnProperty("wheelchair_push_count"))w.uint32(49).double(m.wheelchair_push_count);return w};FitnessMetrics.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Fitness.FitnessMetrics;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.distance_walked_meters=r.double();break;case 2:m.step_count=r.int32();break;case 3:m.calories_burned_kcals=r.double();break;case 4:m.exercise_duration_mi=r.int64();break;case 5:m.wheelchair_distance_meters=r.double();break;case 6:m.wheelchair_push_count=r.double();break;default:r.skipType(t&7);break}}return m};FitnessMetrics.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Fitness.FitnessMetrics)return d;var m=new $root.POGOProtos.Data.Fitness.FitnessMetrics;if(d.distance_walked_meters!=null){m.distance_walked_meters=Number(d.distance_walked_meters)}if(d.step_count!=null){m.step_count=d.step_count|0}if(d.calories_burned_kcals!=null){m.calories_burned_kcals=Number(d.calories_burned_kcals)}if(d.exercise_duration_mi!=null){if($util.Long)(m.exercise_duration_mi=$util.Long.fromValue(d.exercise_duration_mi)).unsigned=false;else if(typeof d.exercise_duration_mi==="string")m.exercise_duration_mi=parseInt(d.exercise_duration_mi,10);else if(typeof d.exercise_duration_mi==="number")m.exercise_duration_mi=d.exercise_duration_mi;else if(typeof d.exercise_duration_mi==="object")m.exercise_duration_mi=new $util.LongBits(d.exercise_duration_mi.low>>>0,d.exercise_duration_mi.high>>>0).toNumber()}if(d.wheelchair_distance_meters!=null){m.wheelchair_distance_meters=Number(d.wheelchair_distance_meters)}if(d.wheelchair_push_count!=null){m.wheelchair_push_count=Number(d.wheelchair_push_count)}return m};FitnessMetrics.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.distance_walked_meters=0;d.step_count=0;d.calories_burned_kcals=0;if($util.Long){var n=new $util.Long(0,0,false);d.exercise_duration_mi=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.exercise_duration_mi=o.longs===String?"0":0;d.wheelchair_distance_meters=0;d.wheelchair_push_count=0}if(m.distance_walked_meters!=null&&m.hasOwnProperty("distance_walked_meters")){d.distance_walked_meters=o.json&&!isFinite(m.distance_walked_meters)?String(m.distance_walked_meters):m.distance_walked_meters}if(m.step_count!=null&&m.hasOwnProperty("step_count")){d.step_count=m.step_count}if(m.calories_burned_kcals!=null&&m.hasOwnProperty("calories_burned_kcals")){d.calories_burned_kcals=o.json&&!isFinite(m.calories_burned_kcals)?String(m.calories_burned_kcals):m.calories_burned_kcals}if(m.exercise_duration_mi!=null&&m.hasOwnProperty("exercise_duration_mi")){if(typeof m.exercise_duration_mi==="number")d.exercise_duration_mi=o.longs===String?String(m.exercise_duration_mi):m.exercise_duration_mi;else d.exercise_duration_mi=o.longs===String?$util.Long.prototype.toString.call(m.exercise_duration_mi):o.longs===Number?new $util.LongBits(m.exercise_duration_mi.low>>>0,m.exercise_duration_mi.high>>>0).toNumber():m.exercise_duration_mi}if(m.wheelchair_distance_meters!=null&&m.hasOwnProperty("wheelchair_distance_meters")){d.wheelchair_distance_meters=o.json&&!isFinite(m.wheelchair_distance_meters)?String(m.wheelchair_distance_meters):m.wheelchair_distance_meters}if(m.wheelchair_push_count!=null&&m.hasOwnProperty("wheelchair_push_count")){d.wheelchair_push_count=o.json&&!isFinite(m.wheelchair_push_count)?String(m.wheelchair_push_count):m.wheelchair_push_count}return d};FitnessMetrics.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FitnessMetrics}();Fitness.FitnessRecord=function(){function FitnessRecord(p){this.raw_samples=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FitnessRecord.prototype.raw_samples=$util.emptyArray;FitnessRecord.prototype.last_aggregation_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;FitnessRecord.prototype.fitness_stats=null;FitnessRecord.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.raw_samples!=null&&m.raw_samples.length){for(var i=0;i<m.raw_samples.length;++i)$root.POGOProtos.Data.Fitness.FitnessSample.encode(m.raw_samples[i],w.uint32(18).fork()).ldelim()}if(m.last_aggregation_timestamp_ms!=null&&m.hasOwnProperty("last_aggregation_timestamp_ms"))w.uint32(24).int64(m.last_aggregation_timestamp_ms);if(m.fitness_stats!=null&&m.hasOwnProperty("fitness_stats"))$root.POGOProtos.Data.Fitness.FitnessStats.encode(m.fitness_stats,w.uint32(34).fork()).ldelim();return w};FitnessRecord.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Fitness.FitnessRecord;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 2:if(!(m.raw_samples&&m.raw_samples.length))m.raw_samples=[];m.raw_samples.push($root.POGOProtos.Data.Fitness.FitnessSample.decode(r,r.uint32()));break;case 3:m.last_aggregation_timestamp_ms=r.int64();break;case 4:m.fitness_stats=$root.POGOProtos.Data.Fitness.FitnessStats.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};FitnessRecord.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Fitness.FitnessRecord)return d;var m=new $root.POGOProtos.Data.Fitness.FitnessRecord;if(d.raw_samples){if(!Array.isArray(d.raw_samples))throw TypeError(".POGOProtos.Data.Fitness.FitnessRecord.raw_samples: array expected");m.raw_samples=[];for(var i=0;i<d.raw_samples.length;++i){if(typeof d.raw_samples[i]!=="object")throw TypeError(".POGOProtos.Data.Fitness.FitnessRecord.raw_samples: object expected");m.raw_samples[i]=$root.POGOProtos.Data.Fitness.FitnessSample.fromObject(d.raw_samples[i])}}if(d.last_aggregation_timestamp_ms!=null){if($util.Long)(m.last_aggregation_timestamp_ms=$util.Long.fromValue(d.last_aggregation_timestamp_ms)).unsigned=false;else if(typeof d.last_aggregation_timestamp_ms==="string")m.last_aggregation_timestamp_ms=parseInt(d.last_aggregation_timestamp_ms,10);else if(typeof d.last_aggregation_timestamp_ms==="number")m.last_aggregation_timestamp_ms=d.last_aggregation_timestamp_ms;else if(typeof d.last_aggregation_timestamp_ms==="object")m.last_aggregation_timestamp_ms=new $util.LongBits(d.last_aggregation_timestamp_ms.low>>>0,d.last_aggregation_timestamp_ms.high>>>0).toNumber()}if(d.fitness_stats!=null){if(typeof d.fitness_stats!=="object")throw TypeError(".POGOProtos.Data.Fitness.FitnessRecord.fitness_stats: object expected");m.fitness_stats=$root.POGOProtos.Data.Fitness.FitnessStats.fromObject(d.fitness_stats)}return m};FitnessRecord.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.raw_samples=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.last_aggregation_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.last_aggregation_timestamp_ms=o.longs===String?"0":0;d.fitness_stats=null}if(m.raw_samples&&m.raw_samples.length){d.raw_samples=[];for(var j=0;j<m.raw_samples.length;++j){d.raw_samples[j]=$root.POGOProtos.Data.Fitness.FitnessSample.toObject(m.raw_samples[j],o)}}if(m.last_aggregation_timestamp_ms!=null&&m.hasOwnProperty("last_aggregation_timestamp_ms")){if(typeof m.last_aggregation_timestamp_ms==="number")d.last_aggregation_timestamp_ms=o.longs===String?String(m.last_aggregation_timestamp_ms):m.last_aggregation_timestamp_ms;else d.last_aggregation_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.last_aggregation_timestamp_ms):o.longs===Number?new $util.LongBits(m.last_aggregation_timestamp_ms.low>>>0,m.last_aggregation_timestamp_ms.high>>>0).toNumber():m.last_aggregation_timestamp_ms}if(m.fitness_stats!=null&&m.hasOwnProperty("fitness_stats")){d.fitness_stats=$root.POGOProtos.Data.Fitness.FitnessStats.toObject(m.fitness_stats,o)}return d};FitnessRecord.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FitnessRecord}();Fitness.FitnessReport=function(){function FitnessReport(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FitnessReport.prototype.day_offset_from_now=0;FitnessReport.prototype.week_offset_from_now=0;FitnessReport.prototype.metrics=null;FitnessReport.prototype.game_data=$util.newBuffer([]);var $oneOfFields;Object.defineProperty(FitnessReport.prototype,"Window",{get:$util.oneOfGetter($oneOfFields=["day_offset_from_now","week_offset_from_now"]),set:$util.oneOfSetter($oneOfFields)});FitnessReport.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.day_offset_from_now!=null&&m.hasOwnProperty("day_offset_from_now"))w.uint32(8).int32(m.day_offset_from_now);if(m.week_offset_from_now!=null&&m.hasOwnProperty("week_offset_from_now"))w.uint32(16).int32(m.week_offset_from_now);if(m.metrics!=null&&m.hasOwnProperty("metrics"))$root.POGOProtos.Data.Fitness.FitnessMetrics.encode(m.metrics,w.uint32(82).fork()).ldelim();if(m.game_data!=null&&m.hasOwnProperty("game_data"))w.uint32(90).bytes(m.game_data);return w};FitnessReport.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Fitness.FitnessReport;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.day_offset_from_now=r.int32();break;case 2:m.week_offset_from_now=r.int32();break;case 10:m.metrics=$root.POGOProtos.Data.Fitness.FitnessMetrics.decode(r,r.uint32());break;case 11:m.game_data=r.bytes();break;default:r.skipType(t&7);break}}return m};FitnessReport.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Fitness.FitnessReport)return d;var m=new $root.POGOProtos.Data.Fitness.FitnessReport;if(d.day_offset_from_now!=null){m.day_offset_from_now=d.day_offset_from_now|0}if(d.week_offset_from_now!=null){m.week_offset_from_now=d.week_offset_from_now|0}if(d.metrics!=null){if(typeof d.metrics!=="object")throw TypeError(".POGOProtos.Data.Fitness.FitnessReport.metrics: object expected");m.metrics=$root.POGOProtos.Data.Fitness.FitnessMetrics.fromObject(d.metrics)}if(d.game_data!=null){if(typeof d.game_data==="string")$util.base64.decode(d.game_data,m.game_data=$util.newBuffer($util.base64.length(d.game_data)),0);else if(d.game_data.length)m.game_data=d.game_data}return m};FitnessReport.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.metrics=null;if(o.bytes===String)d.game_data="";else{d.game_data=[];if(o.bytes!==Array)d.game_data=$util.newBuffer(d.game_data)}}if(m.day_offset_from_now!=null&&m.hasOwnProperty("day_offset_from_now")){d.day_offset_from_now=m.day_offset_from_now;if(o.oneofs)d.Window="day_offset_from_now"}if(m.week_offset_from_now!=null&&m.hasOwnProperty("week_offset_from_now")){d.week_offset_from_now=m.week_offset_from_now;if(o.oneofs)d.Window="week_offset_from_now"}if(m.metrics!=null&&m.hasOwnProperty("metrics")){d.metrics=$root.POGOProtos.Data.Fitness.FitnessMetrics.toObject(m.metrics,o)}if(m.game_data!=null&&m.hasOwnProperty("game_data")){d.game_data=o.bytes===String?$util.base64.encode(m.game_data,0,m.game_data.length):o.bytes===Array?Array.prototype.slice.call(m.game_data):m.game_data}return d};FitnessReport.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FitnessReport}();Fitness.FitnessSample=function(){function FitnessSample(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FitnessSample.prototype.sample_type=0;FitnessSample.prototype.sample_start_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;FitnessSample.prototype.sample_end_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;FitnessSample.prototype.value=0;FitnessSample.prototype.source_type=0;FitnessSample.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.sample_type!=null&&m.hasOwnProperty("sample_type"))w.uint32(8).int32(m.sample_type);if(m.sample_start_timestamp_ms!=null&&m.hasOwnProperty("sample_start_timestamp_ms"))w.uint32(16).int64(m.sample_start_timestamp_ms);if(m.sample_end_timestamp_ms!=null&&m.hasOwnProperty("sample_end_timestamp_ms"))w.uint32(24).int64(m.sample_end_timestamp_ms);if(m.value!=null&&m.hasOwnProperty("value"))w.uint32(33).double(m.value);if(m.source_type!=null&&m.hasOwnProperty("source_type"))w.uint32(40).int32(m.source_type);return w};FitnessSample.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Fitness.FitnessSample;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.sample_type=r.int32();break;case 2:m.sample_start_timestamp_ms=r.int64();break;case 3:m.sample_end_timestamp_ms=r.int64();break;case 4:m.value=r.double();break;case 5:m.source_type=r.int32();break;default:r.skipType(t&7);break}}return m};FitnessSample.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Fitness.FitnessSample)return d;var m=new $root.POGOProtos.Data.Fitness.FitnessSample;switch(d.sample_type){case"SAMPLE_UNSET":case 0:m.sample_type=0;break;case"STEPS":case 1:m.sample_type=1;break;case"WALKING_DISTANCE_METERS":case 2:m.sample_type=2;break;case"WHEELCHAIR_DISTANCE_METERS":case 3:m.sample_type=3;break;case"CALORIES_KCALS":case 4:m.sample_type=4;break;case"WHEELCHAIR_PUSH_COUNT":case 5:m.sample_type=5;break;case"EXERCISE_TIME_MI":case 6:m.sample_type=6;break}if(d.sample_start_timestamp_ms!=null){if($util.Long)(m.sample_start_timestamp_ms=$util.Long.fromValue(d.sample_start_timestamp_ms)).unsigned=false;else if(typeof d.sample_start_timestamp_ms==="string")m.sample_start_timestamp_ms=parseInt(d.sample_start_timestamp_ms,10);else if(typeof d.sample_start_timestamp_ms==="number")m.sample_start_timestamp_ms=d.sample_start_timestamp_ms;else if(typeof d.sample_start_timestamp_ms==="object")m.sample_start_timestamp_ms=new $util.LongBits(d.sample_start_timestamp_ms.low>>>0,d.sample_start_timestamp_ms.high>>>0).toNumber()}if(d.sample_end_timestamp_ms!=null){if($util.Long)(m.sample_end_timestamp_ms=$util.Long.fromValue(d.sample_end_timestamp_ms)).unsigned=false;else if(typeof d.sample_end_timestamp_ms==="string")m.sample_end_timestamp_ms=parseInt(d.sample_end_timestamp_ms,10);else if(typeof d.sample_end_timestamp_ms==="number")m.sample_end_timestamp_ms=d.sample_end_timestamp_ms;else if(typeof d.sample_end_timestamp_ms==="object")m.sample_end_timestamp_ms=new $util.LongBits(d.sample_end_timestamp_ms.low>>>0,d.sample_end_timestamp_ms.high>>>0).toNumber()}if(d.value!=null){m.value=Number(d.value)}switch(d.source_type){case"SOURCE_UNSET":case 0:m.source_type=0;break;case"HEALTHKIT":case 1:m.source_type=1;break;case"GOOGLE_FIT":case 2:m.source_type=2;break}return m};FitnessSample.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.sample_type=o.enums===String?"SAMPLE_UNSET":0;if($util.Long){var n=new $util.Long(0,0,false);d.sample_start_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.sample_start_timestamp_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.sample_end_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.sample_end_timestamp_ms=o.longs===String?"0":0;d.value=0;d.source_type=o.enums===String?"SOURCE_UNSET":0}if(m.sample_type!=null&&m.hasOwnProperty("sample_type")){d.sample_type=o.enums===String?$root.POGOProtos.Data.Fitness.FitnessSample.FitnessSampleType[m.sample_type]:m.sample_type}if(m.sample_start_timestamp_ms!=null&&m.hasOwnProperty("sample_start_timestamp_ms")){if(typeof m.sample_start_timestamp_ms==="number")d.sample_start_timestamp_ms=o.longs===String?String(m.sample_start_timestamp_ms):m.sample_start_timestamp_ms;else d.sample_start_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.sample_start_timestamp_ms):o.longs===Number?new $util.LongBits(m.sample_start_timestamp_ms.low>>>0,m.sample_start_timestamp_ms.high>>>0).toNumber():m.sample_start_timestamp_ms}if(m.sample_end_timestamp_ms!=null&&m.hasOwnProperty("sample_end_timestamp_ms")){if(typeof m.sample_end_timestamp_ms==="number")d.sample_end_timestamp_ms=o.longs===String?String(m.sample_end_timestamp_ms):m.sample_end_timestamp_ms;else d.sample_end_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.sample_end_timestamp_ms):o.longs===Number?new $util.LongBits(m.sample_end_timestamp_ms.low>>>0,m.sample_end_timestamp_ms.high>>>0).toNumber():m.sample_end_timestamp_ms}if(m.value!=null&&m.hasOwnProperty("value")){d.value=o.json&&!isFinite(m.value)?String(m.value):m.value}if(m.source_type!=null&&m.hasOwnProperty("source_type")){d.source_type=o.enums===String?$root.POGOProtos.Data.Fitness.FitnessSample.FitnessSourceType[m.source_type]:m.source_type}return d};FitnessSample.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FitnessSample.FitnessSampleType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="SAMPLE_UNSET"]=0;values[valuesById[1]="STEPS"]=1;values[valuesById[2]="WALKING_DISTANCE_METERS"]=2;values[valuesById[3]="WHEELCHAIR_DISTANCE_METERS"]=3;values[valuesById[4]="CALORIES_KCALS"]=4;values[valuesById[5]="WHEELCHAIR_PUSH_COUNT"]=5;values[valuesById[6]="EXERCISE_TIME_MI"]=6;return values}();FitnessSample.FitnessSourceType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="SOURCE_UNSET"]=0;values[valuesById[1]="HEALTHKIT"]=1;values[valuesById[2]="GOOGLE_FIT"]=2;return values}();return FitnessSample}();Fitness.FitnessStats=function(){function FitnessStats(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FitnessStats.prototype.last_accumulated_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;FitnessStats.prototype.accumulated=null;FitnessStats.prototype.pending=null;FitnessStats.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.last_accumulated_timestamp_ms!=null&&m.hasOwnProperty("last_accumulated_timestamp_ms"))w.uint32(8).int64(m.last_accumulated_timestamp_ms);if(m.accumulated!=null&&m.hasOwnProperty("accumulated"))$root.POGOProtos.Data.Fitness.FitnessMetrics.encode(m.accumulated,w.uint32(18).fork()).ldelim();if(m.pending!=null&&m.hasOwnProperty("pending"))$root.POGOProtos.Data.Fitness.FitnessMetrics.encode(m.pending,w.uint32(26).fork()).ldelim();return w};FitnessStats.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Fitness.FitnessStats;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.last_accumulated_timestamp_ms=r.int64();break;case 2:m.accumulated=$root.POGOProtos.Data.Fitness.FitnessMetrics.decode(r,r.uint32());break;case 3:m.pending=$root.POGOProtos.Data.Fitness.FitnessMetrics.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};FitnessStats.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Fitness.FitnessStats)return d;var m=new $root.POGOProtos.Data.Fitness.FitnessStats;if(d.last_accumulated_timestamp_ms!=null){if($util.Long)(m.last_accumulated_timestamp_ms=$util.Long.fromValue(d.last_accumulated_timestamp_ms)).unsigned=false;else if(typeof d.last_accumulated_timestamp_ms==="string")m.last_accumulated_timestamp_ms=parseInt(d.last_accumulated_timestamp_ms,10);else if(typeof d.last_accumulated_timestamp_ms==="number")m.last_accumulated_timestamp_ms=d.last_accumulated_timestamp_ms;else if(typeof d.last_accumulated_timestamp_ms==="object")m.last_accumulated_timestamp_ms=new $util.LongBits(d.last_accumulated_timestamp_ms.low>>>0,d.last_accumulated_timestamp_ms.high>>>0).toNumber()}if(d.accumulated!=null){if(typeof d.accumulated!=="object")throw TypeError(".POGOProtos.Data.Fitness.FitnessStats.accumulated: object expected");m.accumulated=$root.POGOProtos.Data.Fitness.FitnessMetrics.fromObject(d.accumulated)}if(d.pending!=null){if(typeof d.pending!=="object")throw TypeError(".POGOProtos.Data.Fitness.FitnessStats.pending: object expected");m.pending=$root.POGOProtos.Data.Fitness.FitnessMetrics.fromObject(d.pending)}return m};FitnessStats.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.last_accumulated_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.last_accumulated_timestamp_ms=o.longs===String?"0":0;d.accumulated=null;d.pending=null}if(m.last_accumulated_timestamp_ms!=null&&m.hasOwnProperty("last_accumulated_timestamp_ms")){if(typeof m.last_accumulated_timestamp_ms==="number")d.last_accumulated_timestamp_ms=o.longs===String?String(m.last_accumulated_timestamp_ms):m.last_accumulated_timestamp_ms;else d.last_accumulated_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.last_accumulated_timestamp_ms):o.longs===Number?new $util.LongBits(m.last_accumulated_timestamp_ms.low>>>0,m.last_accumulated_timestamp_ms.high>>>0).toNumber():m.last_accumulated_timestamp_ms}if(m.accumulated!=null&&m.hasOwnProperty("accumulated")){d.accumulated=$root.POGOProtos.Data.Fitness.FitnessMetrics.toObject(m.accumulated,o)}if(m.pending!=null&&m.hasOwnProperty("pending")){d.pending=$root.POGOProtos.Data.Fitness.FitnessMetrics.toObject(m.pending,o)}return d};FitnessStats.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FitnessStats}();Fitness.HoloFitnessReport=function(){function HoloFitnessReport(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}HoloFitnessReport.prototype.num_eggs_hatched=0;HoloFitnessReport.prototype.num_buddy_candy_earned=0;HoloFitnessReport.prototype.distance_walked_km=0;HoloFitnessReport.prototype.week_bucket=$util.Long?$util.Long.fromBits(0,0,false):0;HoloFitnessReport.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.num_eggs_hatched!=null&&m.hasOwnProperty("num_eggs_hatched"))w.uint32(8).int32(m.num_eggs_hatched);if(m.num_buddy_candy_earned!=null&&m.hasOwnProperty("num_buddy_candy_earned"))w.uint32(16).int32(m.num_buddy_candy_earned);if(m.distance_walked_km!=null&&m.hasOwnProperty("distance_walked_km"))w.uint32(25).double(m.distance_walked_km);if(m.week_bucket!=null&&m.hasOwnProperty("week_bucket"))w.uint32(32).int64(m.week_bucket);return w};HoloFitnessReport.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Fitness.HoloFitnessReport;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.num_eggs_hatched=r.int32();break;case 2:m.num_buddy_candy_earned=r.int32();break;case 3:m.distance_walked_km=r.double();break;case 4:m.week_bucket=r.int64();break;default:r.skipType(t&7);break}}return m};HoloFitnessReport.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Fitness.HoloFitnessReport)return d;var m=new $root.POGOProtos.Data.Fitness.HoloFitnessReport;if(d.num_eggs_hatched!=null){m.num_eggs_hatched=d.num_eggs_hatched|0}if(d.num_buddy_candy_earned!=null){m.num_buddy_candy_earned=d.num_buddy_candy_earned|0}if(d.distance_walked_km!=null){m.distance_walked_km=Number(d.distance_walked_km)}if(d.week_bucket!=null){if($util.Long)(m.week_bucket=$util.Long.fromValue(d.week_bucket)).unsigned=false;else if(typeof d.week_bucket==="string")m.week_bucket=parseInt(d.week_bucket,10);else if(typeof d.week_bucket==="number")m.week_bucket=d.week_bucket;else if(typeof d.week_bucket==="object")m.week_bucket=new $util.LongBits(d.week_bucket.low>>>0,d.week_bucket.high>>>0).toNumber()}return m};HoloFitnessReport.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.num_eggs_hatched=0;d.num_buddy_candy_earned=0;d.distance_walked_km=0;if($util.Long){var n=new $util.Long(0,0,false);d.week_bucket=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.week_bucket=o.longs===String?"0":0}if(m.num_eggs_hatched!=null&&m.hasOwnProperty("num_eggs_hatched")){d.num_eggs_hatched=m.num_eggs_hatched}if(m.num_buddy_candy_earned!=null&&m.hasOwnProperty("num_buddy_candy_earned")){d.num_buddy_candy_earned=m.num_buddy_candy_earned}if(m.distance_walked_km!=null&&m.hasOwnProperty("distance_walked_km")){d.distance_walked_km=o.json&&!isFinite(m.distance_walked_km)?String(m.distance_walked_km):m.distance_walked_km}if(m.week_bucket!=null&&m.hasOwnProperty("week_bucket")){if(typeof m.week_bucket==="number")d.week_bucket=o.longs===String?String(m.week_bucket):m.week_bucket;else d.week_bucket=o.longs===String?$util.Long.prototype.toString.call(m.week_bucket):o.longs===Number?new $util.LongBits(m.week_bucket.low>>>0,m.week_bucket.high>>>0).toNumber():m.week_bucket}return d};HoloFitnessReport.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return HoloFitnessReport}();return Fitness}();Data.FoodValue=function(){function FoodValue(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FoodValue.prototype.motivation_increase=0;FoodValue.prototype.cp_increase=0;FoodValue.prototype.food_item=0;FoodValue.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.motivation_increase!=null&&m.hasOwnProperty("motivation_increase"))w.uint32(13).float(m.motivation_increase);if(m.cp_increase!=null&&m.hasOwnProperty("cp_increase"))w.uint32(16).int32(m.cp_increase);if(m.food_item!=null&&m.hasOwnProperty("food_item"))w.uint32(24).int32(m.food_item);return w};FoodValue.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.FoodValue;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.motivation_increase=r.float();break;case 2:m.cp_increase=r.int32();break;case 3:m.food_item=r.int32();break;default:r.skipType(t&7);break}}return m};FoodValue.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.FoodValue)return d;var m=new $root.POGOProtos.Data.FoodValue;if(d.motivation_increase!=null){m.motivation_increase=Number(d.motivation_increase)}if(d.cp_increase!=null){m.cp_increase=d.cp_increase|0}switch(d.food_item){case"ITEM_UNKNOWN":case 0:m.food_item=0;break;case"ITEM_POKE_BALL":case 1:m.food_item=1;break;case"ITEM_GREAT_BALL":case 2:m.food_item=2;break;case"ITEM_ULTRA_BALL":case 3:m.food_item=3;break;case"ITEM_MASTER_BALL":case 4:m.food_item=4;break;case"ITEM_PREMIER_BALL":case 5:m.food_item=5;break;case"ITEM_POTION":case 101:m.food_item=101;break;case"ITEM_SUPER_POTION":case 102:m.food_item=102;break;case"ITEM_HYPER_POTION":case 103:m.food_item=103;break;case"ITEM_MAX_POTION":case 104:m.food_item=104;break;case"ITEM_REVIVE":case 201:m.food_item=201;break;case"ITEM_MAX_REVIVE":case 202:m.food_item=202;break;case"ITEM_LUCKY_EGG":case 301:m.food_item=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.food_item=401;break;case"ITEM_INCENSE_SPICY":case 402:m.food_item=402;break;case"ITEM_INCENSE_COOL":case 403:m.food_item=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.food_item=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.food_item=405;break;case"ITEM_TROY_DISK":case 501:m.food_item=501;break;case"ITEM_X_ATTACK":case 602:m.food_item=602;break;case"ITEM_X_DEFENSE":case 603:m.food_item=603;break;case"ITEM_X_MIRACLE":case 604:m.food_item=604;break;case"ITEM_RAZZ_BERRY":case 701:m.food_item=701;break;case"ITEM_BLUK_BERRY":case 702:m.food_item=702;break;case"ITEM_NANAB_BERRY":case 703:m.food_item=703;break;case"ITEM_WEPAR_BERRY":case 704:m.food_item=704;break;case"ITEM_PINAP_BERRY":case 705:m.food_item=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.food_item=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.food_item=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.food_item=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.food_item=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.food_item=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.food_item=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.food_item=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.food_item=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.food_item=1002;break;case"ITEM_SUN_STONE":case 1101:m.food_item=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.food_item=1102;break;case"ITEM_METAL_COAT":case 1103:m.food_item=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.food_item=1104;break;case"ITEM_UP_GRADE":case 1105:m.food_item=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.food_item=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.food_item=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.food_item=1202;break;case"ITEM_RARE_CANDY":case 1301:m.food_item=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.food_item=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.food_item=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.food_item=1403;break;case"ITEM_STAR_PIECE":case 1404:m.food_item=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.food_item=1405;break}return m};FoodValue.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.motivation_increase=0;d.cp_increase=0;d.food_item=o.enums===String?"ITEM_UNKNOWN":0}if(m.motivation_increase!=null&&m.hasOwnProperty("motivation_increase")){d.motivation_increase=o.json&&!isFinite(m.motivation_increase)?String(m.motivation_increase):m.motivation_increase}if(m.cp_increase!=null&&m.hasOwnProperty("cp_increase")){d.cp_increase=m.cp_increase}if(m.food_item!=null&&m.hasOwnProperty("food_item")){d.food_item=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.food_item]:m.food_item}return d};FoodValue.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FoodValue}();Data.Friends=function(){var Friends={};Friends.Friend=function(){function Friend(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Friend.prototype.player_id="";Friend.prototype.codename="";Friend.prototype.team="";Friend.prototype.score=0;Friend.prototype.data_with_me=$util.newBuffer([]);Friend.prototype.version=$util.Long?$util.Long.fromBits(0,0,false):0;Friend.prototype.created_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Friend.prototype.fb_user_id="";Friend.prototype.is_facebook_friendship=false;Friend.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);if(m.codename!=null&&m.hasOwnProperty("codename"))w.uint32(18).string(m.codename);if(m.team!=null&&m.hasOwnProperty("team"))w.uint32(26).string(m.team);if(m.score!=null&&m.hasOwnProperty("score"))w.uint32(32).int32(m.score);if(m.data_with_me!=null&&m.hasOwnProperty("data_with_me"))w.uint32(42).bytes(m.data_with_me);if(m.version!=null&&m.hasOwnProperty("version"))w.uint32(48).int64(m.version);if(m.created_ms!=null&&m.hasOwnProperty("created_ms"))w.uint32(56).int64(m.created_ms);if(m.fb_user_id!=null&&m.hasOwnProperty("fb_user_id"))w.uint32(66).string(m.fb_user_id);if(m.is_facebook_friendship!=null&&m.hasOwnProperty("is_facebook_friendship"))w.uint32(72).bool(m.is_facebook_friendship);return w};Friend.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Friends.Friend;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;case 2:m.codename=r.string();break;case 3:m.team=r.string();break;case 4:m.score=r.int32();break;case 5:m.data_with_me=r.bytes();break;case 6:m.version=r.int64();break;case 7:m.created_ms=r.int64();break;case 8:m.fb_user_id=r.string();break;case 9:m.is_facebook_friendship=r.bool();break;default:r.skipType(t&7);break}}return m};Friend.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Friends.Friend)return d;var m=new $root.POGOProtos.Data.Friends.Friend;if(d.player_id!=null){m.player_id=String(d.player_id)}if(d.codename!=null){m.codename=String(d.codename)}if(d.team!=null){m.team=String(d.team)}if(d.score!=null){m.score=d.score|0}if(d.data_with_me!=null){if(typeof d.data_with_me==="string")$util.base64.decode(d.data_with_me,m.data_with_me=$util.newBuffer($util.base64.length(d.data_with_me)),0);else if(d.data_with_me.length)m.data_with_me=d.data_with_me}if(d.version!=null){if($util.Long)(m.version=$util.Long.fromValue(d.version)).unsigned=false;else if(typeof d.version==="string")m.version=parseInt(d.version,10);else if(typeof d.version==="number")m.version=d.version;else if(typeof d.version==="object")m.version=new $util.LongBits(d.version.low>>>0,d.version.high>>>0).toNumber()}if(d.created_ms!=null){if($util.Long)(m.created_ms=$util.Long.fromValue(d.created_ms)).unsigned=false;else if(typeof d.created_ms==="string")m.created_ms=parseInt(d.created_ms,10);else if(typeof d.created_ms==="number")m.created_ms=d.created_ms;else if(typeof d.created_ms==="object")m.created_ms=new $util.LongBits(d.created_ms.low>>>0,d.created_ms.high>>>0).toNumber()}if(d.fb_user_id!=null){m.fb_user_id=String(d.fb_user_id)}if(d.is_facebook_friendship!=null){m.is_facebook_friendship=Boolean(d.is_facebook_friendship)}return m};Friend.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id="";d.codename="";d.team="";d.score=0;if(o.bytes===String)d.data_with_me="";else{d.data_with_me=[];if(o.bytes!==Array)d.data_with_me=$util.newBuffer(d.data_with_me)}if($util.Long){var n=new $util.Long(0,0,false);d.version=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.version=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.created_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.created_ms=o.longs===String?"0":0;d.fb_user_id="";d.is_facebook_friendship=false}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}if(m.codename!=null&&m.hasOwnProperty("codename")){d.codename=m.codename}if(m.team!=null&&m.hasOwnProperty("team")){d.team=m.team}if(m.score!=null&&m.hasOwnProperty("score")){d.score=m.score}if(m.data_with_me!=null&&m.hasOwnProperty("data_with_me")){d.data_with_me=o.bytes===String?$util.base64.encode(m.data_with_me,0,m.data_with_me.length):o.bytes===Array?Array.prototype.slice.call(m.data_with_me):m.data_with_me}if(m.version!=null&&m.hasOwnProperty("version")){if(typeof m.version==="number")d.version=o.longs===String?String(m.version):m.version;else d.version=o.longs===String?$util.Long.prototype.toString.call(m.version):o.longs===Number?new $util.LongBits(m.version.low>>>0,m.version.high>>>0).toNumber():m.version}if(m.created_ms!=null&&m.hasOwnProperty("created_ms")){if(typeof m.created_ms==="number")d.created_ms=o.longs===String?String(m.created_ms):m.created_ms;else d.created_ms=o.longs===String?$util.Long.prototype.toString.call(m.created_ms):o.longs===Number?new $util.LongBits(m.created_ms.low>>>0,m.created_ms.high>>>0).toNumber():m.created_ms}if(m.fb_user_id!=null&&m.hasOwnProperty("fb_user_id")){d.fb_user_id=m.fb_user_id}if(m.is_facebook_friendship!=null&&m.hasOwnProperty("is_facebook_friendship")){d.is_facebook_friendship=m.is_facebook_friendship}return d};Friend.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Friend}();Friends.FriendDetails=function(){function FriendDetails(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FriendDetails.prototype.player=null;FriendDetails.prototype.friend_visible_data=$util.newBuffer([]);FriendDetails.prototype.score=0;FriendDetails.prototype.data_with_me=$util.newBuffer([]);FriendDetails.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player!=null&&m.hasOwnProperty("player"))$root.POGOProtos.Data.Player.PlayerSummary.encode(m.player,w.uint32(10).fork()).ldelim();if(m.friend_visible_data!=null&&m.hasOwnProperty("friend_visible_data"))w.uint32(18).bytes(m.friend_visible_data);if(m.score!=null&&m.hasOwnProperty("score"))w.uint32(24).int32(m.score);if(m.data_with_me!=null&&m.hasOwnProperty("data_with_me"))w.uint32(34).bytes(m.data_with_me);return w};FriendDetails.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Friends.FriendDetails;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player=$root.POGOProtos.Data.Player.PlayerSummary.decode(r,r.uint32());break;case 2:m.friend_visible_data=r.bytes();break;case 3:m.score=r.int32();break;case 4:m.data_with_me=r.bytes();break;default:r.skipType(t&7);break}}return m};FriendDetails.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Friends.FriendDetails)return d;var m=new $root.POGOProtos.Data.Friends.FriendDetails;if(d.player!=null){if(typeof d.player!=="object")throw TypeError(".POGOProtos.Data.Friends.FriendDetails.player: object expected");m.player=$root.POGOProtos.Data.Player.PlayerSummary.fromObject(d.player)}if(d.friend_visible_data!=null){if(typeof d.friend_visible_data==="string")$util.base64.decode(d.friend_visible_data,m.friend_visible_data=$util.newBuffer($util.base64.length(d.friend_visible_data)),0);else if(d.friend_visible_data.length)m.friend_visible_data=d.friend_visible_data}if(d.score!=null){m.score=d.score|0}if(d.data_with_me!=null){if(typeof d.data_with_me==="string")$util.base64.decode(d.data_with_me,m.data_with_me=$util.newBuffer($util.base64.length(d.data_with_me)),0);else if(d.data_with_me.length)m.data_with_me=d.data_with_me}return m};FriendDetails.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player=null;if(o.bytes===String)d.friend_visible_data="";else{d.friend_visible_data=[];if(o.bytes!==Array)d.friend_visible_data=$util.newBuffer(d.friend_visible_data)}d.score=0;if(o.bytes===String)d.data_with_me="";else{d.data_with_me=[];if(o.bytes!==Array)d.data_with_me=$util.newBuffer(d.data_with_me)}}if(m.player!=null&&m.hasOwnProperty("player")){d.player=$root.POGOProtos.Data.Player.PlayerSummary.toObject(m.player,o)}if(m.friend_visible_data!=null&&m.hasOwnProperty("friend_visible_data")){d.friend_visible_data=o.bytes===String?$util.base64.encode(m.friend_visible_data,0,m.friend_visible_data.length):o.bytes===Array?Array.prototype.slice.call(m.friend_visible_data):m.friend_visible_data}if(m.score!=null&&m.hasOwnProperty("score")){d.score=m.score}if(m.data_with_me!=null&&m.hasOwnProperty("data_with_me")){d.data_with_me=o.bytes===String?$util.base64.encode(m.data_with_me,0,m.data_with_me.length):o.bytes===Array?Array.prototype.slice.call(m.data_with_me):m.data_with_me}return d};FriendDetails.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FriendDetails}();Friends.FriendshipData=function(){function FriendshipData(p){this.giftbox_details=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FriendshipData.prototype.friendship_level_data=null;FriendshipData.prototype.giftbox_details=$util.emptyArray;FriendshipData.prototype.codename="";FriendshipData.prototype.nickname="";FriendshipData.prototype.open_trade_expire_ms=$util.Long?$util.Long.fromBits(0,0,false):0;FriendshipData.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.friendship_level_data!=null&&m.hasOwnProperty("friendship_level_data"))$root.POGOProtos.Data.Friends.FriendshipLevelData.encode(m.friendship_level_data,w.uint32(10).fork()).ldelim();if(m.giftbox_details!=null&&m.giftbox_details.length){for(var i=0;i<m.giftbox_details.length;++i)$root.POGOProtos.Data.Gift.GiftBoxDetails.encode(m.giftbox_details[i],w.uint32(18).fork()).ldelim()}if(m.codename!=null&&m.hasOwnProperty("codename"))w.uint32(26).string(m.codename);if(m.nickname!=null&&m.hasOwnProperty("nickname"))w.uint32(34).string(m.nickname);if(m.open_trade_expire_ms!=null&&m.hasOwnProperty("open_trade_expire_ms"))w.uint32(40).int64(m.open_trade_expire_ms);return w};FriendshipData.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Friends.FriendshipData;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.friendship_level_data=$root.POGOProtos.Data.Friends.FriendshipLevelData.decode(r,r.uint32());break;case 2:if(!(m.giftbox_details&&m.giftbox_details.length))m.giftbox_details=[];m.giftbox_details.push($root.POGOProtos.Data.Gift.GiftBoxDetails.decode(r,r.uint32()));break;case 3:m.codename=r.string();break;case 4:m.nickname=r.string();break;case 5:m.open_trade_expire_ms=r.int64();break;default:r.skipType(t&7);break}}return m};FriendshipData.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Friends.FriendshipData)return d;var m=new $root.POGOProtos.Data.Friends.FriendshipData;if(d.friendship_level_data!=null){if(typeof d.friendship_level_data!=="object")throw TypeError(".POGOProtos.Data.Friends.FriendshipData.friendship_level_data: object expected");m.friendship_level_data=$root.POGOProtos.Data.Friends.FriendshipLevelData.fromObject(d.friendship_level_data)}if(d.giftbox_details){if(!Array.isArray(d.giftbox_details))throw TypeError(".POGOProtos.Data.Friends.FriendshipData.giftbox_details: array expected");m.giftbox_details=[];for(var i=0;i<d.giftbox_details.length;++i){if(typeof d.giftbox_details[i]!=="object")throw TypeError(".POGOProtos.Data.Friends.FriendshipData.giftbox_details: object expected");m.giftbox_details[i]=$root.POGOProtos.Data.Gift.GiftBoxDetails.fromObject(d.giftbox_details[i])}}if(d.codename!=null){m.codename=String(d.codename)}if(d.nickname!=null){m.nickname=String(d.nickname)}if(d.open_trade_expire_ms!=null){if($util.Long)(m.open_trade_expire_ms=$util.Long.fromValue(d.open_trade_expire_ms)).unsigned=false;else if(typeof d.open_trade_expire_ms==="string")m.open_trade_expire_ms=parseInt(d.open_trade_expire_ms,10);else if(typeof d.open_trade_expire_ms==="number")m.open_trade_expire_ms=d.open_trade_expire_ms;else if(typeof d.open_trade_expire_ms==="object")m.open_trade_expire_ms=new $util.LongBits(d.open_trade_expire_ms.low>>>0,d.open_trade_expire_ms.high>>>0).toNumber()}return m};FriendshipData.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.giftbox_details=[]}if(o.defaults){d.friendship_level_data=null;d.codename="";d.nickname="";if($util.Long){var n=new $util.Long(0,0,false);d.open_trade_expire_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.open_trade_expire_ms=o.longs===String?"0":0}if(m.friendship_level_data!=null&&m.hasOwnProperty("friendship_level_data")){d.friendship_level_data=$root.POGOProtos.Data.Friends.FriendshipLevelData.toObject(m.friendship_level_data,o)}if(m.giftbox_details&&m.giftbox_details.length){d.giftbox_details=[];for(var j=0;j<m.giftbox_details.length;++j){d.giftbox_details[j]=$root.POGOProtos.Data.Gift.GiftBoxDetails.toObject(m.giftbox_details[j],o)}}if(m.codename!=null&&m.hasOwnProperty("codename")){d.codename=m.codename}if(m.nickname!=null&&m.hasOwnProperty("nickname")){d.nickname=m.nickname}if(m.open_trade_expire_ms!=null&&m.hasOwnProperty("open_trade_expire_ms")){if(typeof m.open_trade_expire_ms==="number")d.open_trade_expire_ms=o.longs===String?String(m.open_trade_expire_ms):m.open_trade_expire_ms;else d.open_trade_expire_ms=o.longs===String?$util.Long.prototype.toString.call(m.open_trade_expire_ms):o.longs===Number?new $util.LongBits(m.open_trade_expire_ms.low>>>0,m.open_trade_expire_ms.high>>>0).toNumber():m.open_trade_expire_ms}return d};FriendshipData.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FriendshipData}();Friends.FriendshipLevelData=function(){function FriendshipLevelData(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FriendshipLevelData.prototype.bucket=$util.Long?$util.Long.fromBits(0,0,false):0;FriendshipLevelData.prototype.points_earned_today=0;FriendshipLevelData.prototype.awarded_friendship_milestone=0;FriendshipLevelData.prototype.current_friendship_milestone=0;FriendshipLevelData.prototype.next_friendship_milestone_progress_percentage=0;FriendshipLevelData.prototype.points_toward_next_milestone=0;FriendshipLevelData.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.bucket!=null&&m.hasOwnProperty("bucket"))w.uint32(8).int64(m.bucket);if(m.points_earned_today!=null&&m.hasOwnProperty("points_earned_today"))w.uint32(16).int32(m.points_earned_today);if(m.awarded_friendship_milestone!=null&&m.hasOwnProperty("awarded_friendship_milestone"))w.uint32(24).int32(m.awarded_friendship_milestone);if(m.current_friendship_milestone!=null&&m.hasOwnProperty("current_friendship_milestone"))w.uint32(32).int32(m.current_friendship_milestone);if(m.next_friendship_milestone_progress_percentage!=null&&m.hasOwnProperty("next_friendship_milestone_progress_percentage"))w.uint32(41).double(m.next_friendship_milestone_progress_percentage);if(m.points_toward_next_milestone!=null&&m.hasOwnProperty("points_toward_next_milestone"))w.uint32(48).int32(m.points_toward_next_milestone);return w};FriendshipLevelData.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Friends.FriendshipLevelData;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.bucket=r.int64();break;case 2:m.points_earned_today=r.int32();break;case 3:m.awarded_friendship_milestone=r.int32();break;case 4:m.current_friendship_milestone=r.int32();break;case 5:m.next_friendship_milestone_progress_percentage=r.double();break;case 6:m.points_toward_next_milestone=r.int32();break;default:r.skipType(t&7);break}}return m};FriendshipLevelData.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Friends.FriendshipLevelData)return d;var m=new $root.POGOProtos.Data.Friends.FriendshipLevelData;if(d.bucket!=null){if($util.Long)(m.bucket=$util.Long.fromValue(d.bucket)).unsigned=false;else if(typeof d.bucket==="string")m.bucket=parseInt(d.bucket,10);else if(typeof d.bucket==="number")m.bucket=d.bucket;else if(typeof d.bucket==="object")m.bucket=new $util.LongBits(d.bucket.low>>>0,d.bucket.high>>>0).toNumber()}if(d.points_earned_today!=null){m.points_earned_today=d.points_earned_today|0}switch(d.awarded_friendship_milestone){case"FRIENDSHIP_LEVEL_UNSET":case 0:m.awarded_friendship_milestone=0;break;case"FRIENDSHIP_LEVEL_0":case 1:m.awarded_friendship_milestone=1;break;case"FRIENDSHIP_LEVEL_1":case 2:m.awarded_friendship_milestone=2;break;case"FRIENDSHIP_LEVEL_2":case 3:m.awarded_friendship_milestone=3;break;case"FRIENDSHIP_LEVEL_3":case 4:m.awarded_friendship_milestone=4;break;case"FRIENDSHIP_LEVEL_4":case 5:m.awarded_friendship_milestone=5;break}switch(d.current_friendship_milestone){case"FRIENDSHIP_LEVEL_UNSET":case 0:m.current_friendship_milestone=0;break;case"FRIENDSHIP_LEVEL_0":case 1:m.current_friendship_milestone=1;break;case"FRIENDSHIP_LEVEL_1":case 2:m.current_friendship_milestone=2;break;case"FRIENDSHIP_LEVEL_2":case 3:m.current_friendship_milestone=3;break;case"FRIENDSHIP_LEVEL_3":case 4:m.current_friendship_milestone=4;break;case"FRIENDSHIP_LEVEL_4":case 5:m.current_friendship_milestone=5;break}if(d.next_friendship_milestone_progress_percentage!=null){m.next_friendship_milestone_progress_percentage=Number(d.next_friendship_milestone_progress_percentage)}if(d.points_toward_next_milestone!=null){m.points_toward_next_milestone=d.points_toward_next_milestone|0}return m};FriendshipLevelData.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.bucket=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.bucket=o.longs===String?"0":0;d.points_earned_today=0;d.awarded_friendship_milestone=o.enums===String?"FRIENDSHIP_LEVEL_UNSET":0;d.current_friendship_milestone=o.enums===String?"FRIENDSHIP_LEVEL_UNSET":0;d.next_friendship_milestone_progress_percentage=0;d.points_toward_next_milestone=0}if(m.bucket!=null&&m.hasOwnProperty("bucket")){if(typeof m.bucket==="number")d.bucket=o.longs===String?String(m.bucket):m.bucket;else d.bucket=o.longs===String?$util.Long.prototype.toString.call(m.bucket):o.longs===Number?new $util.LongBits(m.bucket.low>>>0,m.bucket.high>>>0).toNumber():m.bucket}if(m.points_earned_today!=null&&m.hasOwnProperty("points_earned_today")){d.points_earned_today=m.points_earned_today}if(m.awarded_friendship_milestone!=null&&m.hasOwnProperty("awarded_friendship_milestone")){d.awarded_friendship_milestone=o.enums===String?$root.POGOProtos.Enums.FriendshipLevelMilestone[m.awarded_friendship_milestone]:m.awarded_friendship_milestone}if(m.current_friendship_milestone!=null&&m.hasOwnProperty("current_friendship_milestone")){d.current_friendship_milestone=o.enums===String?$root.POGOProtos.Enums.FriendshipLevelMilestone[m.current_friendship_milestone]:m.current_friendship_milestone}if(m.next_friendship_milestone_progress_percentage!=null&&m.hasOwnProperty("next_friendship_milestone_progress_percentage")){d.next_friendship_milestone_progress_percentage=o.json&&!isFinite(m.next_friendship_milestone_progress_percentage)?String(m.next_friendship_milestone_progress_percentage):m.next_friendship_milestone_progress_percentage}if(m.points_toward_next_milestone!=null&&m.hasOwnProperty("points_toward_next_milestone")){d.points_toward_next_milestone=m.points_toward_next_milestone}return d};FriendshipLevelData.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FriendshipLevelData}();Friends.FriendshipMilestoneReward=function(){function FriendshipMilestoneReward(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FriendshipMilestoneReward.prototype.friend_id="";FriendshipMilestoneReward.prototype.friendship_milestone=0;FriendshipMilestoneReward.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.friend_id!=null&&m.hasOwnProperty("friend_id"))w.uint32(10).string(m.friend_id);if(m.friendship_milestone!=null&&m.hasOwnProperty("friendship_milestone"))w.uint32(16).int32(m.friendship_milestone);return w};FriendshipMilestoneReward.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Friends.FriendshipMilestoneReward;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.friend_id=r.string();break;case 2:m.friendship_milestone=r.int32();break;default:r.skipType(t&7);break}}return m};FriendshipMilestoneReward.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Friends.FriendshipMilestoneReward)return d;var m=new $root.POGOProtos.Data.Friends.FriendshipMilestoneReward;if(d.friend_id!=null){m.friend_id=String(d.friend_id)}switch(d.friendship_milestone){case"FRIENDSHIP_LEVEL_UNSET":case 0:m.friendship_milestone=0;break;case"FRIENDSHIP_LEVEL_0":case 1:m.friendship_milestone=1;break;case"FRIENDSHIP_LEVEL_1":case 2:m.friendship_milestone=2;break;case"FRIENDSHIP_LEVEL_2":case 3:m.friendship_milestone=3;break;case"FRIENDSHIP_LEVEL_3":case 4:m.friendship_milestone=4;break;case"FRIENDSHIP_LEVEL_4":case 5:m.friendship_milestone=5;break}return m};FriendshipMilestoneReward.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.friend_id="";d.friendship_milestone=o.enums===String?"FRIENDSHIP_LEVEL_UNSET":0}if(m.friend_id!=null&&m.hasOwnProperty("friend_id")){d.friend_id=m.friend_id}if(m.friendship_milestone!=null&&m.hasOwnProperty("friendship_milestone")){d.friendship_milestone=o.enums===String?$root.POGOProtos.Enums.FriendshipLevelMilestone[m.friendship_milestone]:m.friendship_milestone}return d};FriendshipMilestoneReward.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FriendshipMilestoneReward}();Friends.FriendshipMilestoneRewardNotification=function(){function FriendshipMilestoneRewardNotification(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FriendshipMilestoneRewardNotification.prototype.friend_id="";FriendshipMilestoneRewardNotification.prototype.friend_codename="";FriendshipMilestoneRewardNotification.prototype.friendship_milestone_level=0;FriendshipMilestoneRewardNotification.prototype.xp_reward=$util.Long?$util.Long.fromBits(0,0,false):0;FriendshipMilestoneRewardNotification.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.friend_id!=null&&m.hasOwnProperty("friend_id"))w.uint32(10).string(m.friend_id);if(m.friend_codename!=null&&m.hasOwnProperty("friend_codename"))w.uint32(18).string(m.friend_codename);if(m.friendship_milestone_level!=null&&m.hasOwnProperty("friendship_milestone_level"))w.uint32(24).int32(m.friendship_milestone_level);if(m.xp_reward!=null&&m.hasOwnProperty("xp_reward"))w.uint32(32).int64(m.xp_reward);return w};FriendshipMilestoneRewardNotification.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Friends.FriendshipMilestoneRewardNotification;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.friend_id=r.string();break;case 2:m.friend_codename=r.string();break;case 3:m.friendship_milestone_level=r.int32();break;case 4:m.xp_reward=r.int64();break;default:r.skipType(t&7);break}}return m};FriendshipMilestoneRewardNotification.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Friends.FriendshipMilestoneRewardNotification)return d;var m=new $root.POGOProtos.Data.Friends.FriendshipMilestoneRewardNotification;if(d.friend_id!=null){m.friend_id=String(d.friend_id)}if(d.friend_codename!=null){m.friend_codename=String(d.friend_codename)}if(d.friendship_milestone_level!=null){m.friendship_milestone_level=d.friendship_milestone_level|0}if(d.xp_reward!=null){if($util.Long)(m.xp_reward=$util.Long.fromValue(d.xp_reward)).unsigned=false;else if(typeof d.xp_reward==="string")m.xp_reward=parseInt(d.xp_reward,10);else if(typeof d.xp_reward==="number")m.xp_reward=d.xp_reward;else if(typeof d.xp_reward==="object")m.xp_reward=new $util.LongBits(d.xp_reward.low>>>0,d.xp_reward.high>>>0).toNumber()}return m};FriendshipMilestoneRewardNotification.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.friend_id="";d.friend_codename="";d.friendship_milestone_level=0;if($util.Long){var n=new $util.Long(0,0,false);d.xp_reward=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.xp_reward=o.longs===String?"0":0}if(m.friend_id!=null&&m.hasOwnProperty("friend_id")){d.friend_id=m.friend_id}if(m.friend_codename!=null&&m.hasOwnProperty("friend_codename")){d.friend_codename=m.friend_codename}if(m.friendship_milestone_level!=null&&m.hasOwnProperty("friendship_milestone_level")){d.friendship_milestone_level=m.friendship_milestone_level}if(m.xp_reward!=null&&m.hasOwnProperty("xp_reward")){if(typeof m.xp_reward==="number")d.xp_reward=o.longs===String?String(m.xp_reward):m.xp_reward;else d.xp_reward=o.longs===String?$util.Long.prototype.toString.call(m.xp_reward):o.longs===Number?new $util.LongBits(m.xp_reward.low>>>0,m.xp_reward.high>>>0).toNumber():m.xp_reward}return d};FriendshipMilestoneRewardNotification.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FriendshipMilestoneRewardNotification}();Friends.IncomingFriendInvite=function(){function IncomingFriendInvite(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}IncomingFriendInvite.prototype.status=0;IncomingFriendInvite.prototype.player_id="";IncomingFriendInvite.prototype.created_ms=$util.Long?$util.Long.fromBits(0,0,false):0;IncomingFriendInvite.prototype.invitation_type=0;IncomingFriendInvite.prototype.full_name="";IncomingFriendInvite.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(18).string(m.player_id);if(m.created_ms!=null&&m.hasOwnProperty("created_ms"))w.uint32(24).int64(m.created_ms);if(m.invitation_type!=null&&m.hasOwnProperty("invitation_type"))w.uint32(32).int32(m.invitation_type);if(m.full_name!=null&&m.hasOwnProperty("full_name"))w.uint32(42).string(m.full_name);return w};IncomingFriendInvite.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Friends.IncomingFriendInvite;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.player_id=r.string();break;case 3:m.created_ms=r.int64();break;case 4:m.invitation_type=r.int32();break;case 5:m.full_name=r.string();break;default:r.skipType(t&7);break}}return m};IncomingFriendInvite.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Friends.IncomingFriendInvite)return d;var m=new $root.POGOProtos.Data.Friends.IncomingFriendInvite;switch(d.status){case"UNSET":case 0:m.status=0;break;case"PENDING":case 1:m.status=1;break;case"DECLINED":case 2:m.status=2;break;case"CANCELLED":case 3:m.status=3;break}if(d.player_id!=null){m.player_id=String(d.player_id)}if(d.created_ms!=null){if($util.Long)(m.created_ms=$util.Long.fromValue(d.created_ms)).unsigned=false;else if(typeof d.created_ms==="string")m.created_ms=parseInt(d.created_ms,10);else if(typeof d.created_ms==="number")m.created_ms=d.created_ms;else if(typeof d.created_ms==="object")m.created_ms=new $util.LongBits(d.created_ms.low>>>0,d.created_ms.high>>>0).toNumber()}switch(d.invitation_type){case"INVITATION_TYPE_UNSET":case 0:m.invitation_type=0;break;case"INVITATION_TYPE_CODE":case 1:m.invitation_type=1;break;case"INVITATION_TYPE_FACEBOOK":case 2:m.invitation_type=2;break;case"INVITATION_TYPE_SERVER_REQUEST":case 3:m.invitation_type=3;break}if(d.full_name!=null){m.full_name=String(d.full_name)}return m};IncomingFriendInvite.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0;d.player_id="";if($util.Long){var n=new $util.Long(0,0,false);d.created_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.created_ms=o.longs===String?"0":0;d.invitation_type=o.enums===String?"INVITATION_TYPE_UNSET":0;d.full_name=""}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Data.Friends.IncomingFriendInvite.Status[m.status]:m.status}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}if(m.created_ms!=null&&m.hasOwnProperty("created_ms")){if(typeof m.created_ms==="number")d.created_ms=o.longs===String?String(m.created_ms):m.created_ms;else d.created_ms=o.longs===String?$util.Long.prototype.toString.call(m.created_ms):o.longs===Number?new $util.LongBits(m.created_ms.low>>>0,m.created_ms.high>>>0).toNumber():m.created_ms}if(m.invitation_type!=null&&m.hasOwnProperty("invitation_type")){d.invitation_type=o.enums===String?$root.POGOProtos.Enums.InvitationType[m.invitation_type]:m.invitation_type}if(m.full_name!=null&&m.hasOwnProperty("full_name")){d.full_name=m.full_name}return d};IncomingFriendInvite.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};IncomingFriendInvite.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="PENDING"]=1;values[valuesById[2]="DECLINED"]=2;values[valuesById[3]="CANCELLED"]=3;return values}();return IncomingFriendInvite}();Friends.IncomingFriendInviteDisplay=function(){function IncomingFriendInviteDisplay(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}IncomingFriendInviteDisplay.prototype.invite=null;IncomingFriendInviteDisplay.prototype.player=null;IncomingFriendInviteDisplay.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.invite!=null&&m.hasOwnProperty("invite"))$root.POGOProtos.Data.Friends.IncomingFriendInvite.encode(m.invite,w.uint32(10).fork()).ldelim();if(m.player!=null&&m.hasOwnProperty("player"))$root.POGOProtos.Data.Player.PlayerSummary.encode(m.player,w.uint32(18).fork()).ldelim();return w};IncomingFriendInviteDisplay.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Friends.IncomingFriendInviteDisplay;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.invite=$root.POGOProtos.Data.Friends.IncomingFriendInvite.decode(r,r.uint32());break;case 2:m.player=$root.POGOProtos.Data.Player.PlayerSummary.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};IncomingFriendInviteDisplay.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Friends.IncomingFriendInviteDisplay)return d;var m=new $root.POGOProtos.Data.Friends.IncomingFriendInviteDisplay;if(d.invite!=null){if(typeof d.invite!=="object")throw TypeError(".POGOProtos.Data.Friends.IncomingFriendInviteDisplay.invite: object expected");m.invite=$root.POGOProtos.Data.Friends.IncomingFriendInvite.fromObject(d.invite)}if(d.player!=null){if(typeof d.player!=="object")throw TypeError(".POGOProtos.Data.Friends.IncomingFriendInviteDisplay.player: object expected");m.player=$root.POGOProtos.Data.Player.PlayerSummary.fromObject(d.player)}return m};IncomingFriendInviteDisplay.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.invite=null;d.player=null}if(m.invite!=null&&m.hasOwnProperty("invite")){d.invite=$root.POGOProtos.Data.Friends.IncomingFriendInvite.toObject(m.invite,o)}if(m.player!=null&&m.hasOwnProperty("player")){d.player=$root.POGOProtos.Data.Player.PlayerSummary.toObject(m.player,o)}return d};IncomingFriendInviteDisplay.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return IncomingFriendInviteDisplay}();Friends.LeveledUpFriends=function(){function LeveledUpFriends(p){this.friend_profiles=[];this.friend_milestone_levels=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LeveledUpFriends.prototype.friend_profiles=$util.emptyArray;LeveledUpFriends.prototype.friend_milestone_levels=$util.emptyArray;LeveledUpFriends.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.friend_profiles!=null&&m.friend_profiles.length){for(var i=0;i<m.friend_profiles.length;++i)$root.POGOProtos.Data.Player.PlayerPublicProfile.encode(m.friend_profiles[i],w.uint32(10).fork()).ldelim()}if(m.friend_milestone_levels!=null&&m.friend_milestone_levels.length){for(var i=0;i<m.friend_milestone_levels.length;++i)$root.POGOProtos.Data.Friends.FriendshipLevelData.encode(m.friend_milestone_levels[i],w.uint32(18).fork()).ldelim()}return w};LeveledUpFriends.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Friends.LeveledUpFriends;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.friend_profiles&&m.friend_profiles.length))m.friend_profiles=[];m.friend_profiles.push($root.POGOProtos.Data.Player.PlayerPublicProfile.decode(r,r.uint32()));break;case 2:if(!(m.friend_milestone_levels&&m.friend_milestone_levels.length))m.friend_milestone_levels=[];m.friend_milestone_levels.push($root.POGOProtos.Data.Friends.FriendshipLevelData.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};LeveledUpFriends.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Friends.LeveledUpFriends)return d;var m=new $root.POGOProtos.Data.Friends.LeveledUpFriends;if(d.friend_profiles){if(!Array.isArray(d.friend_profiles))throw TypeError(".POGOProtos.Data.Friends.LeveledUpFriends.friend_profiles: array expected");m.friend_profiles=[];for(var i=0;i<d.friend_profiles.length;++i){if(typeof d.friend_profiles[i]!=="object")throw TypeError(".POGOProtos.Data.Friends.LeveledUpFriends.friend_profiles: object expected");m.friend_profiles[i]=$root.POGOProtos.Data.Player.PlayerPublicProfile.fromObject(d.friend_profiles[i])}}if(d.friend_milestone_levels){if(!Array.isArray(d.friend_milestone_levels))throw TypeError(".POGOProtos.Data.Friends.LeveledUpFriends.friend_milestone_levels: array expected");m.friend_milestone_levels=[];for(var i=0;i<d.friend_milestone_levels.length;++i){if(typeof d.friend_milestone_levels[i]!=="object")throw TypeError(".POGOProtos.Data.Friends.LeveledUpFriends.friend_milestone_levels: object expected");m.friend_milestone_levels[i]=$root.POGOProtos.Data.Friends.FriendshipLevelData.fromObject(d.friend_milestone_levels[i])}}return m};LeveledUpFriends.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.friend_profiles=[];d.friend_milestone_levels=[]}if(m.friend_profiles&&m.friend_profiles.length){d.friend_profiles=[];for(var j=0;j<m.friend_profiles.length;++j){d.friend_profiles[j]=$root.POGOProtos.Data.Player.PlayerPublicProfile.toObject(m.friend_profiles[j],o)}}if(m.friend_milestone_levels&&m.friend_milestone_levels.length){d.friend_milestone_levels=[];for(var j=0;j<m.friend_milestone_levels.length;++j){d.friend_milestone_levels[j]=$root.POGOProtos.Data.Friends.FriendshipLevelData.toObject(m.friend_milestone_levels[j],o)}}return d};LeveledUpFriends.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return LeveledUpFriends}();Friends.OutgoingFriendInvite=function(){function OutgoingFriendInvite(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OutgoingFriendInvite.prototype.status=0;OutgoingFriendInvite.prototype.player_id="";OutgoingFriendInvite.prototype.created_ms=$util.Long?$util.Long.fromBits(0,0,false):0;OutgoingFriendInvite.prototype.invitation_type=0;OutgoingFriendInvite.prototype.full_name="";OutgoingFriendInvite.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(18).string(m.player_id);if(m.created_ms!=null&&m.hasOwnProperty("created_ms"))w.uint32(24).int64(m.created_ms);if(m.invitation_type!=null&&m.hasOwnProperty("invitation_type"))w.uint32(32).int32(m.invitation_type);if(m.full_name!=null&&m.hasOwnProperty("full_name"))w.uint32(42).string(m.full_name);return w};OutgoingFriendInvite.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Friends.OutgoingFriendInvite;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.player_id=r.string();break;case 3:m.created_ms=r.int64();break;case 4:m.invitation_type=r.int32();break;case 5:m.full_name=r.string();break;default:r.skipType(t&7);break}}return m};OutgoingFriendInvite.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Friends.OutgoingFriendInvite)return d;var m=new $root.POGOProtos.Data.Friends.OutgoingFriendInvite;switch(d.status){case"UNSET":case 0:m.status=0;break;case"PENDING":case 1:m.status=1;break;case"CANCELLED":case 2:m.status=2;break;case"DECLINED":case 3:m.status=3;break}if(d.player_id!=null){m.player_id=String(d.player_id)}if(d.created_ms!=null){if($util.Long)(m.created_ms=$util.Long.fromValue(d.created_ms)).unsigned=false;else if(typeof d.created_ms==="string")m.created_ms=parseInt(d.created_ms,10);else if(typeof d.created_ms==="number")m.created_ms=d.created_ms;else if(typeof d.created_ms==="object")m.created_ms=new $util.LongBits(d.created_ms.low>>>0,d.created_ms.high>>>0).toNumber()}switch(d.invitation_type){case"INVITATION_TYPE_UNSET":case 0:m.invitation_type=0;break;case"INVITATION_TYPE_CODE":case 1:m.invitation_type=1;break;case"INVITATION_TYPE_FACEBOOK":case 2:m.invitation_type=2;break;case"INVITATION_TYPE_SERVER_REQUEST":case 3:m.invitation_type=3;break}if(d.full_name!=null){m.full_name=String(d.full_name)}return m};OutgoingFriendInvite.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0;d.player_id="";if($util.Long){var n=new $util.Long(0,0,false);d.created_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.created_ms=o.longs===String?"0":0;d.invitation_type=o.enums===String?"INVITATION_TYPE_UNSET":0;d.full_name=""}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Data.Friends.OutgoingFriendInvite.Status[m.status]:m.status}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}if(m.created_ms!=null&&m.hasOwnProperty("created_ms")){if(typeof m.created_ms==="number")d.created_ms=o.longs===String?String(m.created_ms):m.created_ms;else d.created_ms=o.longs===String?$util.Long.prototype.toString.call(m.created_ms):o.longs===Number?new $util.LongBits(m.created_ms.low>>>0,m.created_ms.high>>>0).toNumber():m.created_ms}if(m.invitation_type!=null&&m.hasOwnProperty("invitation_type")){d.invitation_type=o.enums===String?$root.POGOProtos.Enums.InvitationType[m.invitation_type]:m.invitation_type}if(m.full_name!=null&&m.hasOwnProperty("full_name")){d.full_name=m.full_name}return d};OutgoingFriendInvite.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};OutgoingFriendInvite.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="PENDING"]=1;values[valuesById[2]="CANCELLED"]=2;values[valuesById[3]="DECLINED"]=3;return values}();return OutgoingFriendInvite}();Friends.OutgoingFriendInviteDisplay=function(){function OutgoingFriendInviteDisplay(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OutgoingFriendInviteDisplay.prototype.invite=null;OutgoingFriendInviteDisplay.prototype.player=null;OutgoingFriendInviteDisplay.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.invite!=null&&m.hasOwnProperty("invite"))$root.POGOProtos.Data.Friends.OutgoingFriendInvite.encode(m.invite,w.uint32(10).fork()).ldelim();if(m.player!=null&&m.hasOwnProperty("player"))$root.POGOProtos.Data.Player.PlayerSummary.encode(m.player,w.uint32(18).fork()).ldelim();return w};OutgoingFriendInviteDisplay.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Friends.OutgoingFriendInviteDisplay;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.invite=$root.POGOProtos.Data.Friends.OutgoingFriendInvite.decode(r,r.uint32());break;case 2:m.player=$root.POGOProtos.Data.Player.PlayerSummary.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};OutgoingFriendInviteDisplay.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Friends.OutgoingFriendInviteDisplay)return d;var m=new $root.POGOProtos.Data.Friends.OutgoingFriendInviteDisplay;if(d.invite!=null){if(typeof d.invite!=="object")throw TypeError(".POGOProtos.Data.Friends.OutgoingFriendInviteDisplay.invite: object expected");m.invite=$root.POGOProtos.Data.Friends.OutgoingFriendInvite.fromObject(d.invite)}if(d.player!=null){if(typeof d.player!=="object")throw TypeError(".POGOProtos.Data.Friends.OutgoingFriendInviteDisplay.player: object expected");m.player=$root.POGOProtos.Data.Player.PlayerSummary.fromObject(d.player)}return m};OutgoingFriendInviteDisplay.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.invite=null;d.player=null}if(m.invite!=null&&m.hasOwnProperty("invite")){d.invite=$root.POGOProtos.Data.Friends.OutgoingFriendInvite.toObject(m.invite,o)}if(m.player!=null&&m.hasOwnProperty("player")){d.player=$root.POGOProtos.Data.Player.PlayerSummary.toObject(m.player,o)}return d};OutgoingFriendInviteDisplay.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return OutgoingFriendInviteDisplay}();Friends.PlayerFriendDisplay=function(){function PlayerFriendDisplay(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerFriendDisplay.prototype.buddy=null;PlayerFriendDisplay.prototype.buddy_display_pokemon_id=0;PlayerFriendDisplay.prototype.buddy_pokemon_nickname="";PlayerFriendDisplay.prototype.last_pokemon_caught=null;PlayerFriendDisplay.prototype.last_pokemon_caught_display_id=0;PlayerFriendDisplay.prototype.last_pokemon_caught_timestamp=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerFriendDisplay.prototype.buddy_candy_awarded=0;PlayerFriendDisplay.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.buddy!=null&&m.hasOwnProperty("buddy"))$root.POGOProtos.Data.PokemonDisplay.encode(m.buddy,w.uint32(10).fork()).ldelim();if(m.buddy_display_pokemon_id!=null&&m.hasOwnProperty("buddy_display_pokemon_id"))w.uint32(16).int32(m.buddy_display_pokemon_id);if(m.buddy_pokemon_nickname!=null&&m.hasOwnProperty("buddy_pokemon_nickname"))w.uint32(26).string(m.buddy_pokemon_nickname);if(m.last_pokemon_caught!=null&&m.hasOwnProperty("last_pokemon_caught"))$root.POGOProtos.Data.PokemonDisplay.encode(m.last_pokemon_caught,w.uint32(34).fork()).ldelim();if(m.last_pokemon_caught_display_id!=null&&m.hasOwnProperty("last_pokemon_caught_display_id"))w.uint32(40).int32(m.last_pokemon_caught_display_id);if(m.last_pokemon_caught_timestamp!=null&&m.hasOwnProperty("last_pokemon_caught_timestamp"))w.uint32(48).int64(m.last_pokemon_caught_timestamp);if(m.buddy_candy_awarded!=null&&m.hasOwnProperty("buddy_candy_awarded"))w.uint32(56).int32(m.buddy_candy_awarded);return w};PlayerFriendDisplay.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Friends.PlayerFriendDisplay;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.buddy=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;case 2:m.buddy_display_pokemon_id=r.int32();break;case 3:m.buddy_pokemon_nickname=r.string();break;case 4:m.last_pokemon_caught=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;case 5:m.last_pokemon_caught_display_id=r.int32();break;case 6:m.last_pokemon_caught_timestamp=r.int64();break;case 7:m.buddy_candy_awarded=r.int32();break;default:r.skipType(t&7);break}}return m};PlayerFriendDisplay.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Friends.PlayerFriendDisplay)return d;var m=new $root.POGOProtos.Data.Friends.PlayerFriendDisplay;if(d.buddy!=null){if(typeof d.buddy!=="object")throw TypeError(".POGOProtos.Data.Friends.PlayerFriendDisplay.buddy: object expected");m.buddy=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.buddy)}if(d.buddy_display_pokemon_id!=null){m.buddy_display_pokemon_id=d.buddy_display_pokemon_id|0}if(d.buddy_pokemon_nickname!=null){m.buddy_pokemon_nickname=String(d.buddy_pokemon_nickname)}if(d.last_pokemon_caught!=null){if(typeof d.last_pokemon_caught!=="object")throw TypeError(".POGOProtos.Data.Friends.PlayerFriendDisplay.last_pokemon_caught: object expected");m.last_pokemon_caught=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.last_pokemon_caught)}if(d.last_pokemon_caught_display_id!=null){m.last_pokemon_caught_display_id=d.last_pokemon_caught_display_id|0}if(d.last_pokemon_caught_timestamp!=null){if($util.Long)(m.last_pokemon_caught_timestamp=$util.Long.fromValue(d.last_pokemon_caught_timestamp)).unsigned=false;else if(typeof d.last_pokemon_caught_timestamp==="string")m.last_pokemon_caught_timestamp=parseInt(d.last_pokemon_caught_timestamp,10);else if(typeof d.last_pokemon_caught_timestamp==="number")m.last_pokemon_caught_timestamp=d.last_pokemon_caught_timestamp;else if(typeof d.last_pokemon_caught_timestamp==="object")m.last_pokemon_caught_timestamp=new $util.LongBits(d.last_pokemon_caught_timestamp.low>>>0,d.last_pokemon_caught_timestamp.high>>>0).toNumber()}if(d.buddy_candy_awarded!=null){m.buddy_candy_awarded=d.buddy_candy_awarded|0}return m};PlayerFriendDisplay.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.buddy=null;d.buddy_display_pokemon_id=0;d.buddy_pokemon_nickname="";d.last_pokemon_caught=null;d.last_pokemon_caught_display_id=0;if($util.Long){var n=new $util.Long(0,0,false);d.last_pokemon_caught_timestamp=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.last_pokemon_caught_timestamp=o.longs===String?"0":0;d.buddy_candy_awarded=0}if(m.buddy!=null&&m.hasOwnProperty("buddy")){d.buddy=$root.POGOProtos.Data.PokemonDisplay.toObject(m.buddy,o)}if(m.buddy_display_pokemon_id!=null&&m.hasOwnProperty("buddy_display_pokemon_id")){d.buddy_display_pokemon_id=m.buddy_display_pokemon_id}if(m.buddy_pokemon_nickname!=null&&m.hasOwnProperty("buddy_pokemon_nickname")){d.buddy_pokemon_nickname=m.buddy_pokemon_nickname}if(m.last_pokemon_caught!=null&&m.hasOwnProperty("last_pokemon_caught")){d.last_pokemon_caught=$root.POGOProtos.Data.PokemonDisplay.toObject(m.last_pokemon_caught,o)}if(m.last_pokemon_caught_display_id!=null&&m.hasOwnProperty("last_pokemon_caught_display_id")){d.last_pokemon_caught_display_id=m.last_pokemon_caught_display_id}if(m.last_pokemon_caught_timestamp!=null&&m.hasOwnProperty("last_pokemon_caught_timestamp")){if(typeof m.last_pokemon_caught_timestamp==="number")d.last_pokemon_caught_timestamp=o.longs===String?String(m.last_pokemon_caught_timestamp):m.last_pokemon_caught_timestamp;else d.last_pokemon_caught_timestamp=o.longs===String?$util.Long.prototype.toString.call(m.last_pokemon_caught_timestamp):o.longs===Number?new $util.LongBits(m.last_pokemon_caught_timestamp.low>>>0,m.last_pokemon_caught_timestamp.high>>>0).toNumber():m.last_pokemon_caught_timestamp}if(m.buddy_candy_awarded!=null&&m.hasOwnProperty("buddy_candy_awarded")){d.buddy_candy_awarded=m.buddy_candy_awarded}return d};PlayerFriendDisplay.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlayerFriendDisplay}();return Friends}();Data.Geofence=function(){var Geofence={};Geofence.GeofenceMetadata=function(){function GeofenceMetadata(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GeofenceMetadata.prototype.latitude_deg=0;GeofenceMetadata.prototype.longitude_deg=0;GeofenceMetadata.prototype.radius=0;GeofenceMetadata.prototype.identifier="";GeofenceMetadata.prototype.expiration_ms=$util.Long?$util.Long.fromBits(0,0,false):0;GeofenceMetadata.prototype.dwell_time_ms=$util.Long?$util.Long.fromBits(0,0,false):0;GeofenceMetadata.prototype.fire_on_entrance=false;GeofenceMetadata.prototype.fire_on_exit=false;GeofenceMetadata.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.latitude_deg!=null&&m.hasOwnProperty("latitude_deg"))w.uint32(9).double(m.latitude_deg);if(m.longitude_deg!=null&&m.hasOwnProperty("longitude_deg"))w.uint32(17).double(m.longitude_deg);if(m.radius!=null&&m.hasOwnProperty("radius"))w.uint32(25).double(m.radius);if(m.identifier!=null&&m.hasOwnProperty("identifier"))w.uint32(34).string(m.identifier);if(m.expiration_ms!=null&&m.hasOwnProperty("expiration_ms"))w.uint32(40).int64(m.expiration_ms);if(m.dwell_time_ms!=null&&m.hasOwnProperty("dwell_time_ms"))w.uint32(48).int64(m.dwell_time_ms);if(m.fire_on_entrance!=null&&m.hasOwnProperty("fire_on_entrance"))w.uint32(56).bool(m.fire_on_entrance);if(m.fire_on_exit!=null&&m.hasOwnProperty("fire_on_exit"))w.uint32(64).bool(m.fire_on_exit);return w};GeofenceMetadata.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Geofence.GeofenceMetadata;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.latitude_deg=r.double();break;case 2:m.longitude_deg=r.double();break;case 3:m.radius=r.double();break;case 4:m.identifier=r.string();break;case 5:m.expiration_ms=r.int64();break;case 6:m.dwell_time_ms=r.int64();break;case 7:m.fire_on_entrance=r.bool();break;case 8:m.fire_on_exit=r.bool();break;default:r.skipType(t&7);break}}return m};GeofenceMetadata.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Geofence.GeofenceMetadata)return d;var m=new $root.POGOProtos.Data.Geofence.GeofenceMetadata;if(d.latitude_deg!=null){m.latitude_deg=Number(d.latitude_deg)}if(d.longitude_deg!=null){m.longitude_deg=Number(d.longitude_deg)}if(d.radius!=null){m.radius=Number(d.radius)}if(d.identifier!=null){m.identifier=String(d.identifier)}if(d.expiration_ms!=null){if($util.Long)(m.expiration_ms=$util.Long.fromValue(d.expiration_ms)).unsigned=false;else if(typeof d.expiration_ms==="string")m.expiration_ms=parseInt(d.expiration_ms,10);else if(typeof d.expiration_ms==="number")m.expiration_ms=d.expiration_ms;else if(typeof d.expiration_ms==="object")m.expiration_ms=new $util.LongBits(d.expiration_ms.low>>>0,d.expiration_ms.high>>>0).toNumber()}if(d.dwell_time_ms!=null){if($util.Long)(m.dwell_time_ms=$util.Long.fromValue(d.dwell_time_ms)).unsigned=false;else if(typeof d.dwell_time_ms==="string")m.dwell_time_ms=parseInt(d.dwell_time_ms,10);else if(typeof d.dwell_time_ms==="number")m.dwell_time_ms=d.dwell_time_ms;else if(typeof d.dwell_time_ms==="object")m.dwell_time_ms=new $util.LongBits(d.dwell_time_ms.low>>>0,d.dwell_time_ms.high>>>0).toNumber()}if(d.fire_on_entrance!=null){m.fire_on_entrance=Boolean(d.fire_on_entrance)}if(d.fire_on_exit!=null){m.fire_on_exit=Boolean(d.fire_on_exit)}return m};GeofenceMetadata.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.latitude_deg=0;d.longitude_deg=0;d.radius=0;d.identifier="";if($util.Long){var n=new $util.Long(0,0,false);d.expiration_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.expiration_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.dwell_time_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.dwell_time_ms=o.longs===String?"0":0;d.fire_on_entrance=false;d.fire_on_exit=false}if(m.latitude_deg!=null&&m.hasOwnProperty("latitude_deg")){d.latitude_deg=o.json&&!isFinite(m.latitude_deg)?String(m.latitude_deg):m.latitude_deg}if(m.longitude_deg!=null&&m.hasOwnProperty("longitude_deg")){d.longitude_deg=o.json&&!isFinite(m.longitude_deg)?String(m.longitude_deg):m.longitude_deg}if(m.radius!=null&&m.hasOwnProperty("radius")){d.radius=o.json&&!isFinite(m.radius)?String(m.radius):m.radius}if(m.identifier!=null&&m.hasOwnProperty("identifier")){d.identifier=m.identifier}if(m.expiration_ms!=null&&m.hasOwnProperty("expiration_ms")){if(typeof m.expiration_ms==="number")d.expiration_ms=o.longs===String?String(m.expiration_ms):m.expiration_ms;else d.expiration_ms=o.longs===String?$util.Long.prototype.toString.call(m.expiration_ms):o.longs===Number?new $util.LongBits(m.expiration_ms.low>>>0,m.expiration_ms.high>>>0).toNumber():m.expiration_ms}if(m.dwell_time_ms!=null&&m.hasOwnProperty("dwell_time_ms")){if(typeof m.dwell_time_ms==="number")d.dwell_time_ms=o.longs===String?String(m.dwell_time_ms):m.dwell_time_ms;else d.dwell_time_ms=o.longs===String?$util.Long.prototype.toString.call(m.dwell_time_ms):o.longs===Number?new $util.LongBits(m.dwell_time_ms.low>>>0,m.dwell_time_ms.high>>>0).toNumber():m.dwell_time_ms}if(m.fire_on_entrance!=null&&m.hasOwnProperty("fire_on_entrance")){d.fire_on_entrance=m.fire_on_entrance}if(m.fire_on_exit!=null&&m.hasOwnProperty("fire_on_exit")){d.fire_on_exit=m.fire_on_exit}return d};GeofenceMetadata.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GeofenceMetadata}();return Geofence}();Data.GetActionLogRequest=function(){function GetActionLogRequest(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetActionLogRequest.encode=function encode(m,w){if(!w)w=$Writer.create();return w};GetActionLogRequest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.GetActionLogRequest;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};GetActionLogRequest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.GetActionLogRequest)return d;return new $root.POGOProtos.Data.GetActionLogRequest};GetActionLogRequest.toObject=function toObject(){return{}};GetActionLogRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetActionLogRequest}();Data.Gift=function(){var Gift={};Gift.GiftBox=function(){function GiftBox(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GiftBox.prototype.giftbox_id=$util.Long?$util.Long.fromBits(0,0,true):0;GiftBox.prototype.sender_id="";GiftBox.prototype.receiver_id="";GiftBox.prototype.fort_id="";GiftBox.prototype.fort_lat=0;GiftBox.prototype.fort_lng=0;GiftBox.prototype.creation_timestamp=$util.Long?$util.Long.fromBits(0,0,false):0;GiftBox.prototype.sent_timestamp=$util.Long?$util.Long.fromBits(0,0,false):0;GiftBox.prototype.sent_bucket=$util.Long?$util.Long.fromBits(0,0,false):0;GiftBox.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.giftbox_id!=null&&m.hasOwnProperty("giftbox_id"))w.uint32(8).uint64(m.giftbox_id);if(m.sender_id!=null&&m.hasOwnProperty("sender_id"))w.uint32(18).string(m.sender_id);if(m.receiver_id!=null&&m.hasOwnProperty("receiver_id"))w.uint32(26).string(m.receiver_id);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(34).string(m.fort_id);if(m.fort_lat!=null&&m.hasOwnProperty("fort_lat"))w.uint32(41).double(m.fort_lat);if(m.fort_lng!=null&&m.hasOwnProperty("fort_lng"))w.uint32(49).double(m.fort_lng);if(m.creation_timestamp!=null&&m.hasOwnProperty("creation_timestamp"))w.uint32(56).int64(m.creation_timestamp);if(m.sent_timestamp!=null&&m.hasOwnProperty("sent_timestamp"))w.uint32(64).int64(m.sent_timestamp);if(m.sent_bucket!=null&&m.hasOwnProperty("sent_bucket"))w.uint32(72).int64(m.sent_bucket);return w};GiftBox.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Gift.GiftBox;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.giftbox_id=r.uint64();break;case 2:m.sender_id=r.string();break;case 3:m.receiver_id=r.string();break;case 4:m.fort_id=r.string();break;case 5:m.fort_lat=r.double();break;case 6:m.fort_lng=r.double();break;case 7:m.creation_timestamp=r.int64();break;case 8:m.sent_timestamp=r.int64();break;case 9:m.sent_bucket=r.int64();break;default:r.skipType(t&7);break}}return m};GiftBox.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Gift.GiftBox)return d;var m=new $root.POGOProtos.Data.Gift.GiftBox;if(d.giftbox_id!=null){if($util.Long)(m.giftbox_id=$util.Long.fromValue(d.giftbox_id)).unsigned=true;else if(typeof d.giftbox_id==="string")m.giftbox_id=parseInt(d.giftbox_id,10);else if(typeof d.giftbox_id==="number")m.giftbox_id=d.giftbox_id;else if(typeof d.giftbox_id==="object")m.giftbox_id=new $util.LongBits(d.giftbox_id.low>>>0,d.giftbox_id.high>>>0).toNumber(true)}if(d.sender_id!=null){m.sender_id=String(d.sender_id)}if(d.receiver_id!=null){m.receiver_id=String(d.receiver_id)}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.fort_lat!=null){m.fort_lat=Number(d.fort_lat)}if(d.fort_lng!=null){m.fort_lng=Number(d.fort_lng)}if(d.creation_timestamp!=null){if($util.Long)(m.creation_timestamp=$util.Long.fromValue(d.creation_timestamp)).unsigned=false;else if(typeof d.creation_timestamp==="string")m.creation_timestamp=parseInt(d.creation_timestamp,10);else if(typeof d.creation_timestamp==="number")m.creation_timestamp=d.creation_timestamp;else if(typeof d.creation_timestamp==="object")m.creation_timestamp=new $util.LongBits(d.creation_timestamp.low>>>0,d.creation_timestamp.high>>>0).toNumber()}if(d.sent_timestamp!=null){if($util.Long)(m.sent_timestamp=$util.Long.fromValue(d.sent_timestamp)).unsigned=false;else if(typeof d.sent_timestamp==="string")m.sent_timestamp=parseInt(d.sent_timestamp,10);else if(typeof d.sent_timestamp==="number")m.sent_timestamp=d.sent_timestamp;else if(typeof d.sent_timestamp==="object")m.sent_timestamp=new $util.LongBits(d.sent_timestamp.low>>>0,d.sent_timestamp.high>>>0).toNumber()}if(d.sent_bucket!=null){if($util.Long)(m.sent_bucket=$util.Long.fromValue(d.sent_bucket)).unsigned=false;else if(typeof d.sent_bucket==="string")m.sent_bucket=parseInt(d.sent_bucket,10);else if(typeof d.sent_bucket==="number")m.sent_bucket=d.sent_bucket;else if(typeof d.sent_bucket==="object")m.sent_bucket=new $util.LongBits(d.sent_bucket.low>>>0,d.sent_bucket.high>>>0).toNumber()}return m};GiftBox.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,true);d.giftbox_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.giftbox_id=o.longs===String?"0":0;d.sender_id="";d.receiver_id="";d.fort_id="";d.fort_lat=0;d.fort_lng=0;if($util.Long){var n=new $util.Long(0,0,false);d.creation_timestamp=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.creation_timestamp=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.sent_timestamp=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.sent_timestamp=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.sent_bucket=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.sent_bucket=o.longs===String?"0":0}if(m.giftbox_id!=null&&m.hasOwnProperty("giftbox_id")){if(typeof m.giftbox_id==="number")d.giftbox_id=o.longs===String?String(m.giftbox_id):m.giftbox_id;else d.giftbox_id=o.longs===String?$util.Long.prototype.toString.call(m.giftbox_id):o.longs===Number?new $util.LongBits(m.giftbox_id.low>>>0,m.giftbox_id.high>>>0).toNumber(true):m.giftbox_id}if(m.sender_id!=null&&m.hasOwnProperty("sender_id")){d.sender_id=m.sender_id}if(m.receiver_id!=null&&m.hasOwnProperty("receiver_id")){d.receiver_id=m.receiver_id}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.fort_lat!=null&&m.hasOwnProperty("fort_lat")){d.fort_lat=o.json&&!isFinite(m.fort_lat)?String(m.fort_lat):m.fort_lat}if(m.fort_lng!=null&&m.hasOwnProperty("fort_lng")){d.fort_lng=o.json&&!isFinite(m.fort_lng)?String(m.fort_lng):m.fort_lng}if(m.creation_timestamp!=null&&m.hasOwnProperty("creation_timestamp")){if(typeof m.creation_timestamp==="number")d.creation_timestamp=o.longs===String?String(m.creation_timestamp):m.creation_timestamp;else d.creation_timestamp=o.longs===String?$util.Long.prototype.toString.call(m.creation_timestamp):o.longs===Number?new $util.LongBits(m.creation_timestamp.low>>>0,m.creation_timestamp.high>>>0).toNumber():m.creation_timestamp}if(m.sent_timestamp!=null&&m.hasOwnProperty("sent_timestamp")){if(typeof m.sent_timestamp==="number")d.sent_timestamp=o.longs===String?String(m.sent_timestamp):m.sent_timestamp;else d.sent_timestamp=o.longs===String?$util.Long.prototype.toString.call(m.sent_timestamp):o.longs===Number?new $util.LongBits(m.sent_timestamp.low>>>0,m.sent_timestamp.high>>>0).toNumber():m.sent_timestamp}if(m.sent_bucket!=null&&m.hasOwnProperty("sent_bucket")){if(typeof m.sent_bucket==="number")d.sent_bucket=o.longs===String?String(m.sent_bucket):m.sent_bucket;else d.sent_bucket=o.longs===String?$util.Long.prototype.toString.call(m.sent_bucket):o.longs===Number?new $util.LongBits(m.sent_bucket.low>>>0,m.sent_bucket.high>>>0).toNumber():m.sent_bucket}return d};GiftBox.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GiftBox}();Gift.GiftBoxDetails=function(){function GiftBoxDetails(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GiftBoxDetails.prototype.giftbox_id=$util.Long?$util.Long.fromBits(0,0,false):0;GiftBoxDetails.prototype.sender_id="";GiftBoxDetails.prototype.sender_codename="";GiftBoxDetails.prototype.receiver_id="";GiftBoxDetails.prototype.receiver_codename="";GiftBoxDetails.prototype.fort_id="";GiftBoxDetails.prototype.fort_name="";GiftBoxDetails.prototype.fort_lat=0;GiftBoxDetails.prototype.fort_lng=0;GiftBoxDetails.prototype.fort_image_url="";GiftBoxDetails.prototype.creation_timestamp=$util.Long?$util.Long.fromBits(0,0,false):0;GiftBoxDetails.prototype.sent_timestamp=$util.Long?$util.Long.fromBits(0,0,false):0;GiftBoxDetails.prototype.delivery_pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;GiftBoxDetails.prototype.is_sponsored=false;GiftBoxDetails.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.giftbox_id!=null&&m.hasOwnProperty("giftbox_id"))w.uint32(9).fixed64(m.giftbox_id);if(m.sender_id!=null&&m.hasOwnProperty("sender_id"))w.uint32(18).string(m.sender_id);if(m.sender_codename!=null&&m.hasOwnProperty("sender_codename"))w.uint32(26).string(m.sender_codename);if(m.receiver_id!=null&&m.hasOwnProperty("receiver_id"))w.uint32(34).string(m.receiver_id);if(m.receiver_codename!=null&&m.hasOwnProperty("receiver_codename"))w.uint32(42).string(m.receiver_codename);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(50).string(m.fort_id);if(m.fort_name!=null&&m.hasOwnProperty("fort_name"))w.uint32(58).string(m.fort_name);if(m.fort_lat!=null&&m.hasOwnProperty("fort_lat"))w.uint32(65).double(m.fort_lat);if(m.fort_lng!=null&&m.hasOwnProperty("fort_lng"))w.uint32(73).double(m.fort_lng);if(m.fort_image_url!=null&&m.hasOwnProperty("fort_image_url"))w.uint32(82).string(m.fort_image_url);if(m.creation_timestamp!=null&&m.hasOwnProperty("creation_timestamp"))w.uint32(88).int64(m.creation_timestamp);if(m.sent_timestamp!=null&&m.hasOwnProperty("sent_timestamp"))w.uint32(96).int64(m.sent_timestamp);if(m.delivery_pokemon_id!=null&&m.hasOwnProperty("delivery_pokemon_id"))w.uint32(105).fixed64(m.delivery_pokemon_id);if(m.is_sponsored!=null&&m.hasOwnProperty("is_sponsored"))w.uint32(112).bool(m.is_sponsored);return w};GiftBoxDetails.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Gift.GiftBoxDetails;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.giftbox_id=r.fixed64();break;case 2:m.sender_id=r.string();break;case 3:m.sender_codename=r.string();break;case 4:m.receiver_id=r.string();break;case 5:m.receiver_codename=r.string();break;case 6:m.fort_id=r.string();break;case 7:m.fort_name=r.string();break;case 8:m.fort_lat=r.double();break;case 9:m.fort_lng=r.double();break;case 10:m.fort_image_url=r.string();break;case 11:m.creation_timestamp=r.int64();break;case 12:m.sent_timestamp=r.int64();break;case 13:m.delivery_pokemon_id=r.fixed64();break;case 14:m.is_sponsored=r.bool();break;default:r.skipType(t&7);break}}return m};GiftBoxDetails.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Gift.GiftBoxDetails)return d;var m=new $root.POGOProtos.Data.Gift.GiftBoxDetails;if(d.giftbox_id!=null){if($util.Long)(m.giftbox_id=$util.Long.fromValue(d.giftbox_id)).unsigned=false;else if(typeof d.giftbox_id==="string")m.giftbox_id=parseInt(d.giftbox_id,10);else if(typeof d.giftbox_id==="number")m.giftbox_id=d.giftbox_id;else if(typeof d.giftbox_id==="object")m.giftbox_id=new $util.LongBits(d.giftbox_id.low>>>0,d.giftbox_id.high>>>0).toNumber()}if(d.sender_id!=null){m.sender_id=String(d.sender_id)}if(d.sender_codename!=null){m.sender_codename=String(d.sender_codename)}if(d.receiver_id!=null){m.receiver_id=String(d.receiver_id)}if(d.receiver_codename!=null){m.receiver_codename=String(d.receiver_codename)}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.fort_name!=null){m.fort_name=String(d.fort_name)}if(d.fort_lat!=null){m.fort_lat=Number(d.fort_lat)}if(d.fort_lng!=null){m.fort_lng=Number(d.fort_lng)}if(d.fort_image_url!=null){m.fort_image_url=String(d.fort_image_url)}if(d.creation_timestamp!=null){if($util.Long)(m.creation_timestamp=$util.Long.fromValue(d.creation_timestamp)).unsigned=false;else if(typeof d.creation_timestamp==="string")m.creation_timestamp=parseInt(d.creation_timestamp,10);else if(typeof d.creation_timestamp==="number")m.creation_timestamp=d.creation_timestamp;else if(typeof d.creation_timestamp==="object")m.creation_timestamp=new $util.LongBits(d.creation_timestamp.low>>>0,d.creation_timestamp.high>>>0).toNumber()}if(d.sent_timestamp!=null){if($util.Long)(m.sent_timestamp=$util.Long.fromValue(d.sent_timestamp)).unsigned=false;else if(typeof d.sent_timestamp==="string")m.sent_timestamp=parseInt(d.sent_timestamp,10);else if(typeof d.sent_timestamp==="number")m.sent_timestamp=d.sent_timestamp;else if(typeof d.sent_timestamp==="object")m.sent_timestamp=new $util.LongBits(d.sent_timestamp.low>>>0,d.sent_timestamp.high>>>0).toNumber()}if(d.delivery_pokemon_id!=null){if($util.Long)(m.delivery_pokemon_id=$util.Long.fromValue(d.delivery_pokemon_id)).unsigned=false;else if(typeof d.delivery_pokemon_id==="string")m.delivery_pokemon_id=parseInt(d.delivery_pokemon_id,10);else if(typeof d.delivery_pokemon_id==="number")m.delivery_pokemon_id=d.delivery_pokemon_id;else if(typeof d.delivery_pokemon_id==="object")m.delivery_pokemon_id=new $util.LongBits(d.delivery_pokemon_id.low>>>0,d.delivery_pokemon_id.high>>>0).toNumber()}if(d.is_sponsored!=null){m.is_sponsored=Boolean(d.is_sponsored)}return m};GiftBoxDetails.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.giftbox_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.giftbox_id=o.longs===String?"0":0;d.sender_id="";d.sender_codename="";d.receiver_id="";d.receiver_codename="";d.fort_id="";d.fort_name="";d.fort_lat=0;d.fort_lng=0;d.fort_image_url="";if($util.Long){var n=new $util.Long(0,0,false);d.creation_timestamp=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.creation_timestamp=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.sent_timestamp=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.sent_timestamp=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.delivery_pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.delivery_pokemon_id=o.longs===String?"0":0;d.is_sponsored=false}if(m.giftbox_id!=null&&m.hasOwnProperty("giftbox_id")){if(typeof m.giftbox_id==="number")d.giftbox_id=o.longs===String?String(m.giftbox_id):m.giftbox_id;else d.giftbox_id=o.longs===String?$util.Long.prototype.toString.call(m.giftbox_id):o.longs===Number?new $util.LongBits(m.giftbox_id.low>>>0,m.giftbox_id.high>>>0).toNumber():m.giftbox_id}if(m.sender_id!=null&&m.hasOwnProperty("sender_id")){d.sender_id=m.sender_id}if(m.sender_codename!=null&&m.hasOwnProperty("sender_codename")){d.sender_codename=m.sender_codename}if(m.receiver_id!=null&&m.hasOwnProperty("receiver_id")){d.receiver_id=m.receiver_id}if(m.receiver_codename!=null&&m.hasOwnProperty("receiver_codename")){d.receiver_codename=m.receiver_codename}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.fort_name!=null&&m.hasOwnProperty("fort_name")){d.fort_name=m.fort_name}if(m.fort_lat!=null&&m.hasOwnProperty("fort_lat")){d.fort_lat=o.json&&!isFinite(m.fort_lat)?String(m.fort_lat):m.fort_lat}if(m.fort_lng!=null&&m.hasOwnProperty("fort_lng")){d.fort_lng=o.json&&!isFinite(m.fort_lng)?String(m.fort_lng):m.fort_lng}if(m.fort_image_url!=null&&m.hasOwnProperty("fort_image_url")){d.fort_image_url=m.fort_image_url}if(m.creation_timestamp!=null&&m.hasOwnProperty("creation_timestamp")){if(typeof m.creation_timestamp==="number")d.creation_timestamp=o.longs===String?String(m.creation_timestamp):m.creation_timestamp;else d.creation_timestamp=o.longs===String?$util.Long.prototype.toString.call(m.creation_timestamp):o.longs===Number?new $util.LongBits(m.creation_timestamp.low>>>0,m.creation_timestamp.high>>>0).toNumber():m.creation_timestamp}if(m.sent_timestamp!=null&&m.hasOwnProperty("sent_timestamp")){if(typeof m.sent_timestamp==="number")d.sent_timestamp=o.longs===String?String(m.sent_timestamp):m.sent_timestamp;else d.sent_timestamp=o.longs===String?$util.Long.prototype.toString.call(m.sent_timestamp):o.longs===Number?new $util.LongBits(m.sent_timestamp.low>>>0,m.sent_timestamp.high>>>0).toNumber():m.sent_timestamp}if(m.delivery_pokemon_id!=null&&m.hasOwnProperty("delivery_pokemon_id")){if(typeof m.delivery_pokemon_id==="number")d.delivery_pokemon_id=o.longs===String?String(m.delivery_pokemon_id):m.delivery_pokemon_id;else d.delivery_pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.delivery_pokemon_id):o.longs===Number?new $util.LongBits(m.delivery_pokemon_id.low>>>0,m.delivery_pokemon_id.high>>>0).toNumber():m.delivery_pokemon_id}if(m.is_sponsored!=null&&m.hasOwnProperty("is_sponsored")){d.is_sponsored=m.is_sponsored}return d};GiftBoxDetails.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GiftBoxDetails}();Gift.GiftBoxes=function(){function GiftBoxes(p){this.gifts=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GiftBoxes.prototype.gifts=$util.emptyArray;GiftBoxes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gifts!=null&&m.gifts.length){for(var i=0;i<m.gifts.length;++i)$root.POGOProtos.Data.Gift.GiftBox.encode(m.gifts[i],w.uint32(10).fork()).ldelim()}return w};GiftBoxes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Gift.GiftBoxes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.gifts&&m.gifts.length))m.gifts=[];m.gifts.push($root.POGOProtos.Data.Gift.GiftBox.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};GiftBoxes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Gift.GiftBoxes)return d;var m=new $root.POGOProtos.Data.Gift.GiftBoxes;if(d.gifts){if(!Array.isArray(d.gifts))throw TypeError(".POGOProtos.Data.Gift.GiftBoxes.gifts: array expected");m.gifts=[];for(var i=0;i<d.gifts.length;++i){if(typeof d.gifts[i]!=="object")throw TypeError(".POGOProtos.Data.Gift.GiftBoxes.gifts: object expected");m.gifts[i]=$root.POGOProtos.Data.Gift.GiftBox.fromObject(d.gifts[i])}}return m};GiftBoxes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.gifts=[]}if(m.gifts&&m.gifts.length){d.gifts=[];for(var j=0;j<m.gifts.length;++j){d.gifts[j]=$root.POGOProtos.Data.Gift.GiftBox.toObject(m.gifts[j],o)}}return d};GiftBoxes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GiftBoxes}();return Gift}();Data.Gym=function(){var Gym={};Gym.GymBattle=function(){function GymBattle(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymBattle.prototype.battle_id="";GymBattle.prototype.completed_ms=$util.Long?$util.Long.fromBits(0,0,false):0;GymBattle.prototype.incremented_gym_battle_friends=false;GymBattle.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.battle_id!=null&&m.hasOwnProperty("battle_id"))w.uint32(10).string(m.battle_id);if(m.completed_ms!=null&&m.hasOwnProperty("completed_ms"))w.uint32(16).int64(m.completed_ms);if(m.incremented_gym_battle_friends!=null&&m.hasOwnProperty("incremented_gym_battle_friends"))w.uint32(24).bool(m.incremented_gym_battle_friends);return w};GymBattle.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Gym.GymBattle;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.battle_id=r.string();break;case 2:m.completed_ms=r.int64();break;case 3:m.incremented_gym_battle_friends=r.bool();break;default:r.skipType(t&7);break}}return m};GymBattle.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Gym.GymBattle)return d;var m=new $root.POGOProtos.Data.Gym.GymBattle;if(d.battle_id!=null){m.battle_id=String(d.battle_id)}if(d.completed_ms!=null){if($util.Long)(m.completed_ms=$util.Long.fromValue(d.completed_ms)).unsigned=false;else if(typeof d.completed_ms==="string")m.completed_ms=parseInt(d.completed_ms,10);else if(typeof d.completed_ms==="number")m.completed_ms=d.completed_ms;else if(typeof d.completed_ms==="object")m.completed_ms=new $util.LongBits(d.completed_ms.low>>>0,d.completed_ms.high>>>0).toNumber()}if(d.incremented_gym_battle_friends!=null){m.incremented_gym_battle_friends=Boolean(d.incremented_gym_battle_friends)}return m};GymBattle.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.battle_id="";if($util.Long){var n=new $util.Long(0,0,false);d.completed_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.completed_ms=o.longs===String?"0":0;d.incremented_gym_battle_friends=false}if(m.battle_id!=null&&m.hasOwnProperty("battle_id")){d.battle_id=m.battle_id}if(m.completed_ms!=null&&m.hasOwnProperty("completed_ms")){if(typeof m.completed_ms==="number")d.completed_ms=o.longs===String?String(m.completed_ms):m.completed_ms;else d.completed_ms=o.longs===String?$util.Long.prototype.toString.call(m.completed_ms):o.longs===Number?new $util.LongBits(m.completed_ms.low>>>0,m.completed_ms.high>>>0).toNumber():m.completed_ms}if(m.incremented_gym_battle_friends!=null&&m.hasOwnProperty("incremented_gym_battle_friends")){d.incremented_gym_battle_friends=m.incremented_gym_battle_friends}return d};GymBattle.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GymBattle}();Gym.GymDefender=function(){function GymDefender(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymDefender.prototype.motivated_pokemon=null;GymDefender.prototype.deployment_totals=null;GymDefender.prototype.trainer_public_profile=null;GymDefender.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.motivated_pokemon!=null&&m.hasOwnProperty("motivated_pokemon"))$root.POGOProtos.Map.Pokemon.MotivatedPokemon.encode(m.motivated_pokemon,w.uint32(10).fork()).ldelim();if(m.deployment_totals!=null&&m.hasOwnProperty("deployment_totals"))$root.POGOProtos.Data.Gym.GymDefender.DeploymentTotals.encode(m.deployment_totals,w.uint32(18).fork()).ldelim();if(m.trainer_public_profile!=null&&m.hasOwnProperty("trainer_public_profile"))$root.POGOProtos.Data.Player.PlayerPublicProfile.encode(m.trainer_public_profile,w.uint32(26).fork()).ldelim();return w};GymDefender.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Gym.GymDefender;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.motivated_pokemon=$root.POGOProtos.Map.Pokemon.MotivatedPokemon.decode(r,r.uint32());break;case 2:m.deployment_totals=$root.POGOProtos.Data.Gym.GymDefender.DeploymentTotals.decode(r,r.uint32());break;case 3:m.trainer_public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GymDefender.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Gym.GymDefender)return d;var m=new $root.POGOProtos.Data.Gym.GymDefender;if(d.motivated_pokemon!=null){if(typeof d.motivated_pokemon!=="object")throw TypeError(".POGOProtos.Data.Gym.GymDefender.motivated_pokemon: object expected");m.motivated_pokemon=$root.POGOProtos.Map.Pokemon.MotivatedPokemon.fromObject(d.motivated_pokemon)}if(d.deployment_totals!=null){if(typeof d.deployment_totals!=="object")throw TypeError(".POGOProtos.Data.Gym.GymDefender.deployment_totals: object expected");m.deployment_totals=$root.POGOProtos.Data.Gym.GymDefender.DeploymentTotals.fromObject(d.deployment_totals)}if(d.trainer_public_profile!=null){if(typeof d.trainer_public_profile!=="object")throw TypeError(".POGOProtos.Data.Gym.GymDefender.trainer_public_profile: object expected");m.trainer_public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.fromObject(d.trainer_public_profile)}return m};GymDefender.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.motivated_pokemon=null;d.deployment_totals=null;d.trainer_public_profile=null}if(m.motivated_pokemon!=null&&m.hasOwnProperty("motivated_pokemon")){d.motivated_pokemon=$root.POGOProtos.Map.Pokemon.MotivatedPokemon.toObject(m.motivated_pokemon,o)}if(m.deployment_totals!=null&&m.hasOwnProperty("deployment_totals")){d.deployment_totals=$root.POGOProtos.Data.Gym.GymDefender.DeploymentTotals.toObject(m.deployment_totals,o)}if(m.trainer_public_profile!=null&&m.hasOwnProperty("trainer_public_profile")){d.trainer_public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.toObject(m.trainer_public_profile,o)}return d};GymDefender.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GymDefender.DeploymentTotals=function(){function DeploymentTotals(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DeploymentTotals.prototype.times_fed=0;DeploymentTotals.prototype.battles_won=0;DeploymentTotals.prototype.battles_lost=0;DeploymentTotals.prototype.deployment_duration_ms=$util.Long?$util.Long.fromBits(0,0,false):0;DeploymentTotals.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.times_fed!=null&&m.hasOwnProperty("times_fed"))w.uint32(8).int32(m.times_fed);if(m.battles_won!=null&&m.hasOwnProperty("battles_won"))w.uint32(16).int32(m.battles_won);if(m.battles_lost!=null&&m.hasOwnProperty("battles_lost"))w.uint32(24).int32(m.battles_lost);if(m.deployment_duration_ms!=null&&m.hasOwnProperty("deployment_duration_ms"))w.uint32(32).int64(m.deployment_duration_ms);return w};DeploymentTotals.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Gym.GymDefender.DeploymentTotals;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.times_fed=r.int32();break;case 2:m.battles_won=r.int32();break;case 3:m.battles_lost=r.int32();break;case 4:m.deployment_duration_ms=r.int64();break;default:r.skipType(t&7);break}}return m};DeploymentTotals.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Gym.GymDefender.DeploymentTotals)return d;var m=new $root.POGOProtos.Data.Gym.GymDefender.DeploymentTotals;if(d.times_fed!=null){m.times_fed=d.times_fed|0}if(d.battles_won!=null){m.battles_won=d.battles_won|0}if(d.battles_lost!=null){m.battles_lost=d.battles_lost|0}if(d.deployment_duration_ms!=null){if($util.Long)(m.deployment_duration_ms=$util.Long.fromValue(d.deployment_duration_ms)).unsigned=false;else if(typeof d.deployment_duration_ms==="string")m.deployment_duration_ms=parseInt(d.deployment_duration_ms,10);else if(typeof d.deployment_duration_ms==="number")m.deployment_duration_ms=d.deployment_duration_ms;else if(typeof d.deployment_duration_ms==="object")m.deployment_duration_ms=new $util.LongBits(d.deployment_duration_ms.low>>>0,d.deployment_duration_ms.high>>>0).toNumber()}return m};DeploymentTotals.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.times_fed=0;d.battles_won=0;d.battles_lost=0;if($util.Long){var n=new $util.Long(0,0,false);d.deployment_duration_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.deployment_duration_ms=o.longs===String?"0":0}if(m.times_fed!=null&&m.hasOwnProperty("times_fed")){d.times_fed=m.times_fed}if(m.battles_won!=null&&m.hasOwnProperty("battles_won")){d.battles_won=m.battles_won}if(m.battles_lost!=null&&m.hasOwnProperty("battles_lost")){d.battles_lost=m.battles_lost}if(m.deployment_duration_ms!=null&&m.hasOwnProperty("deployment_duration_ms")){if(typeof m.deployment_duration_ms==="number")d.deployment_duration_ms=o.longs===String?String(m.deployment_duration_ms):m.deployment_duration_ms;else d.deployment_duration_ms=o.longs===String?$util.Long.prototype.toString.call(m.deployment_duration_ms):o.longs===Number?new $util.LongBits(m.deployment_duration_ms.low>>>0,m.deployment_duration_ms.high>>>0).toNumber():m.deployment_duration_ms}return d};DeploymentTotals.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DeploymentTotals}();return GymDefender}();Gym.GymMembership=function(){function GymMembership(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymMembership.prototype.pokemon_data=null;GymMembership.prototype.trainer_public_profile=null;GymMembership.prototype.training_pokemon=null;GymMembership.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data"))$root.POGOProtos.Data.PokemonData.encode(m.pokemon_data,w.uint32(10).fork()).ldelim();if(m.trainer_public_profile!=null&&m.hasOwnProperty("trainer_public_profile"))$root.POGOProtos.Data.Player.PlayerPublicProfile.encode(m.trainer_public_profile,w.uint32(18).fork()).ldelim();if(m.training_pokemon!=null&&m.hasOwnProperty("training_pokemon"))$root.POGOProtos.Data.PokemonData.encode(m.training_pokemon,w.uint32(26).fork()).ldelim();return w};GymMembership.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Gym.GymMembership;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_data=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 2:m.trainer_public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.decode(r,r.uint32());break;case 3:m.training_pokemon=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GymMembership.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Gym.GymMembership)return d;var m=new $root.POGOProtos.Data.Gym.GymMembership;if(d.pokemon_data!=null){if(typeof d.pokemon_data!=="object")throw TypeError(".POGOProtos.Data.Gym.GymMembership.pokemon_data: object expected");m.pokemon_data=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon_data)}if(d.trainer_public_profile!=null){if(typeof d.trainer_public_profile!=="object")throw TypeError(".POGOProtos.Data.Gym.GymMembership.trainer_public_profile: object expected");m.trainer_public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.fromObject(d.trainer_public_profile)}if(d.training_pokemon!=null){if(typeof d.training_pokemon!=="object")throw TypeError(".POGOProtos.Data.Gym.GymMembership.training_pokemon: object expected");m.training_pokemon=$root.POGOProtos.Data.PokemonData.fromObject(d.training_pokemon)}return m};GymMembership.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon_data=null;d.trainer_public_profile=null;d.training_pokemon=null}if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data")){d.pokemon_data=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon_data,o)}if(m.trainer_public_profile!=null&&m.hasOwnProperty("trainer_public_profile")){d.trainer_public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.toObject(m.trainer_public_profile,o)}if(m.training_pokemon!=null&&m.hasOwnProperty("training_pokemon")){d.training_pokemon=$root.POGOProtos.Data.PokemonData.toObject(m.training_pokemon,o)}return d};GymMembership.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GymMembership}();Gym.GymState=function(){function GymState(p){this.memberships=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymState.prototype.fort_data=null;GymState.prototype.memberships=$util.emptyArray;GymState.prototype.deploy_lockout=false;GymState.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fort_data!=null&&m.hasOwnProperty("fort_data"))$root.POGOProtos.Map.Fort.FortData.encode(m.fort_data,w.uint32(10).fork()).ldelim();if(m.memberships!=null&&m.memberships.length){for(var i=0;i<m.memberships.length;++i)$root.POGOProtos.Data.Gym.GymMembership.encode(m.memberships[i],w.uint32(18).fork()).ldelim()}if(m.deploy_lockout!=null&&m.hasOwnProperty("deploy_lockout"))w.uint32(24).bool(m.deploy_lockout);return w};GymState.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Gym.GymState;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fort_data=$root.POGOProtos.Map.Fort.FortData.decode(r,r.uint32());break;case 2:if(!(m.memberships&&m.memberships.length))m.memberships=[];m.memberships.push($root.POGOProtos.Data.Gym.GymMembership.decode(r,r.uint32()));break;case 3:m.deploy_lockout=r.bool();break;default:r.skipType(t&7);break}}return m};GymState.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Gym.GymState)return d;var m=new $root.POGOProtos.Data.Gym.GymState;if(d.fort_data!=null){if(typeof d.fort_data!=="object")throw TypeError(".POGOProtos.Data.Gym.GymState.fort_data: object expected");m.fort_data=$root.POGOProtos.Map.Fort.FortData.fromObject(d.fort_data)}if(d.memberships){if(!Array.isArray(d.memberships))throw TypeError(".POGOProtos.Data.Gym.GymState.memberships: array expected");m.memberships=[];for(var i=0;i<d.memberships.length;++i){if(typeof d.memberships[i]!=="object")throw TypeError(".POGOProtos.Data.Gym.GymState.memberships: object expected");m.memberships[i]=$root.POGOProtos.Data.Gym.GymMembership.fromObject(d.memberships[i])}}if(d.deploy_lockout!=null){m.deploy_lockout=Boolean(d.deploy_lockout)}return m};GymState.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.memberships=[]}if(o.defaults){d.fort_data=null;d.deploy_lockout=false}if(m.fort_data!=null&&m.hasOwnProperty("fort_data")){d.fort_data=$root.POGOProtos.Map.Fort.FortData.toObject(m.fort_data,o)}if(m.memberships&&m.memberships.length){d.memberships=[];for(var j=0;j<m.memberships.length;++j){d.memberships[j]=$root.POGOProtos.Data.Gym.GymMembership.toObject(m.memberships[j],o)}}if(m.deploy_lockout!=null&&m.hasOwnProperty("deploy_lockout")){d.deploy_lockout=m.deploy_lockout}return d};GymState.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GymState}();Gym.GymStatusAndDefenders=function(){function GymStatusAndDefenders(p){this.gym_defender=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymStatusAndDefenders.prototype.pokemon_fort_proto=null;GymStatusAndDefenders.prototype.gym_defender=$util.emptyArray;GymStatusAndDefenders.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_fort_proto!=null&&m.hasOwnProperty("pokemon_fort_proto"))$root.POGOProtos.Map.Fort.FortData.encode(m.pokemon_fort_proto,w.uint32(10).fork()).ldelim();if(m.gym_defender!=null&&m.gym_defender.length){for(var i=0;i<m.gym_defender.length;++i)$root.POGOProtos.Data.Gym.GymDefender.encode(m.gym_defender[i],w.uint32(18).fork()).ldelim()}return w};GymStatusAndDefenders.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Gym.GymStatusAndDefenders;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_fort_proto=$root.POGOProtos.Map.Fort.FortData.decode(r,r.uint32());break;case 2:if(!(m.gym_defender&&m.gym_defender.length))m.gym_defender=[];m.gym_defender.push($root.POGOProtos.Data.Gym.GymDefender.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};GymStatusAndDefenders.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Gym.GymStatusAndDefenders)return d;var m=new $root.POGOProtos.Data.Gym.GymStatusAndDefenders;if(d.pokemon_fort_proto!=null){if(typeof d.pokemon_fort_proto!=="object")throw TypeError(".POGOProtos.Data.Gym.GymStatusAndDefenders.pokemon_fort_proto: object expected");m.pokemon_fort_proto=$root.POGOProtos.Map.Fort.FortData.fromObject(d.pokemon_fort_proto)}if(d.gym_defender){if(!Array.isArray(d.gym_defender))throw TypeError(".POGOProtos.Data.Gym.GymStatusAndDefenders.gym_defender: array expected");m.gym_defender=[];for(var i=0;i<d.gym_defender.length;++i){if(typeof d.gym_defender[i]!=="object")throw TypeError(".POGOProtos.Data.Gym.GymStatusAndDefenders.gym_defender: object expected");m.gym_defender[i]=$root.POGOProtos.Data.Gym.GymDefender.fromObject(d.gym_defender[i])}}return m};GymStatusAndDefenders.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.gym_defender=[]}if(o.defaults){d.pokemon_fort_proto=null}if(m.pokemon_fort_proto!=null&&m.hasOwnProperty("pokemon_fort_proto")){d.pokemon_fort_proto=$root.POGOProtos.Map.Fort.FortData.toObject(m.pokemon_fort_proto,o)}if(m.gym_defender&&m.gym_defender.length){d.gym_defender=[];for(var j=0;j<m.gym_defender.length;++j){d.gym_defender[j]=$root.POGOProtos.Data.Gym.GymDefender.toObject(m.gym_defender[j],o)}}return d};GymStatusAndDefenders.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GymStatusAndDefenders}();return Gym}();Data.Inbox=function(){var Inbox={};Inbox.ClientInbox=function(){function ClientInbox(p){this.notifications=[];this.builtin_variables=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ClientInbox.prototype.notifications=$util.emptyArray;ClientInbox.prototype.builtin_variables=$util.emptyArray;ClientInbox.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.notifications!=null&&m.notifications.length){for(var i=0;i<m.notifications.length;++i)$root.POGOProtos.Data.Inbox.ClientInbox.Notification.encode(m.notifications[i],w.uint32(10).fork()).ldelim()}if(m.builtin_variables!=null&&m.builtin_variables.length){for(var i=0;i<m.builtin_variables.length;++i)$root.POGOProtos.Data.Inbox.ClientInbox.TemplateVariable.encode(m.builtin_variables[i],w.uint32(18).fork()).ldelim()}return w};ClientInbox.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Inbox.ClientInbox;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.notifications&&m.notifications.length))m.notifications=[];m.notifications.push($root.POGOProtos.Data.Inbox.ClientInbox.Notification.decode(r,r.uint32()));break;case 2:if(!(m.builtin_variables&&m.builtin_variables.length))m.builtin_variables=[];m.builtin_variables.push($root.POGOProtos.Data.Inbox.ClientInbox.TemplateVariable.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};ClientInbox.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Inbox.ClientInbox)return d;var m=new $root.POGOProtos.Data.Inbox.ClientInbox;if(d.notifications){if(!Array.isArray(d.notifications))throw TypeError(".POGOProtos.Data.Inbox.ClientInbox.notifications: array expected");m.notifications=[];for(var i=0;i<d.notifications.length;++i){if(typeof d.notifications[i]!=="object")throw TypeError(".POGOProtos.Data.Inbox.ClientInbox.notifications: object expected");m.notifications[i]=$root.POGOProtos.Data.Inbox.ClientInbox.Notification.fromObject(d.notifications[i])}}if(d.builtin_variables){if(!Array.isArray(d.builtin_variables))throw TypeError(".POGOProtos.Data.Inbox.ClientInbox.builtin_variables: array expected");m.builtin_variables=[];for(var i=0;i<d.builtin_variables.length;++i){if(typeof d.builtin_variables[i]!=="object")throw TypeError(".POGOProtos.Data.Inbox.ClientInbox.builtin_variables: object expected");m.builtin_variables[i]=$root.POGOProtos.Data.Inbox.ClientInbox.TemplateVariable.fromObject(d.builtin_variables[i])}}return m};ClientInbox.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.notifications=[];d.builtin_variables=[]}if(m.notifications&&m.notifications.length){d.notifications=[];for(var j=0;j<m.notifications.length;++j){d.notifications[j]=$root.POGOProtos.Data.Inbox.ClientInbox.Notification.toObject(m.notifications[j],o)}}if(m.builtin_variables&&m.builtin_variables.length){d.builtin_variables=[];for(var j=0;j<m.builtin_variables.length;++j){d.builtin_variables[j]=$root.POGOProtos.Data.Inbox.ClientInbox.TemplateVariable.toObject(m.builtin_variables[j],o)}}return d};ClientInbox.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ClientInbox.Notification=function(){function Notification(p){this.variables=[];this.labels=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Notification.prototype.notification_id="";Notification.prototype.title_key="";Notification.prototype.category="";Notification.prototype.create_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Notification.prototype.variables=$util.emptyArray;Notification.prototype.labels=$util.emptyArray;Notification.prototype.expire_time_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Notification.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.notification_id!=null&&m.hasOwnProperty("notification_id"))w.uint32(10).string(m.notification_id);if(m.title_key!=null&&m.hasOwnProperty("title_key"))w.uint32(18).string(m.title_key);if(m.category!=null&&m.hasOwnProperty("category"))w.uint32(26).string(m.category);if(m.create_timestamp_ms!=null&&m.hasOwnProperty("create_timestamp_ms"))w.uint32(32).int64(m.create_timestamp_ms);if(m.variables!=null&&m.variables.length){for(var i=0;i<m.variables.length;++i)$root.POGOProtos.Data.Inbox.ClientInbox.TemplateVariable.encode(m.variables[i],w.uint32(42).fork()).ldelim()}if(m.labels!=null&&m.labels.length){w.uint32(50).fork();for(var i=0;i<m.labels.length;++i)w.int32(m.labels[i]);w.ldelim()}if(m.expire_time_ms!=null&&m.hasOwnProperty("expire_time_ms"))w.uint32(56).int64(m.expire_time_ms);return w};Notification.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Inbox.ClientInbox.Notification;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.notification_id=r.string();break;case 2:m.title_key=r.string();break;case 3:m.category=r.string();break;case 4:m.create_timestamp_ms=r.int64();break;case 5:if(!(m.variables&&m.variables.length))m.variables=[];m.variables.push($root.POGOProtos.Data.Inbox.ClientInbox.TemplateVariable.decode(r,r.uint32()));break;case 6:if(!(m.labels&&m.labels.length))m.labels=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.labels.push(r.int32())}else m.labels.push(r.int32());break;case 7:m.expire_time_ms=r.int64();break;default:r.skipType(t&7);break}}return m};Notification.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Inbox.ClientInbox.Notification)return d;var m=new $root.POGOProtos.Data.Inbox.ClientInbox.Notification;if(d.notification_id!=null){m.notification_id=String(d.notification_id)}if(d.title_key!=null){m.title_key=String(d.title_key)}if(d.category!=null){m.category=String(d.category)}if(d.create_timestamp_ms!=null){if($util.Long)(m.create_timestamp_ms=$util.Long.fromValue(d.create_timestamp_ms)).unsigned=false;else if(typeof d.create_timestamp_ms==="string")m.create_timestamp_ms=parseInt(d.create_timestamp_ms,10);else if(typeof d.create_timestamp_ms==="number")m.create_timestamp_ms=d.create_timestamp_ms;else if(typeof d.create_timestamp_ms==="object")m.create_timestamp_ms=new $util.LongBits(d.create_timestamp_ms.low>>>0,d.create_timestamp_ms.high>>>0).toNumber()}if(d.variables){if(!Array.isArray(d.variables))throw TypeError(".POGOProtos.Data.Inbox.ClientInbox.Notification.variables: array expected");m.variables=[];for(var i=0;i<d.variables.length;++i){if(typeof d.variables[i]!=="object")throw TypeError(".POGOProtos.Data.Inbox.ClientInbox.Notification.variables: object expected");m.variables[i]=$root.POGOProtos.Data.Inbox.ClientInbox.TemplateVariable.fromObject(d.variables[i])}}if(d.labels){if(!Array.isArray(d.labels))throw TypeError(".POGOProtos.Data.Inbox.ClientInbox.Notification.labels: array expected");m.labels=[];for(var i=0;i<d.labels.length;++i){switch(d.labels[i]){default:case"UNSET_LABEL":case 0:m.labels[i]=0;break;case"UNREAD":case 1:m.labels[i]=1;break;case"NEW":case 2:m.labels[i]=2;break;case"IMMEDIATE":case 3:m.labels[i]=3;break}}}if(d.expire_time_ms!=null){if($util.Long)(m.expire_time_ms=$util.Long.fromValue(d.expire_time_ms)).unsigned=false;else if(typeof d.expire_time_ms==="string")m.expire_time_ms=parseInt(d.expire_time_ms,10);else if(typeof d.expire_time_ms==="number")m.expire_time_ms=d.expire_time_ms;else if(typeof d.expire_time_ms==="object")m.expire_time_ms=new $util.LongBits(d.expire_time_ms.low>>>0,d.expire_time_ms.high>>>0).toNumber()}return m};Notification.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.variables=[];d.labels=[]}if(o.defaults){d.notification_id="";d.title_key="";d.category="";if($util.Long){var n=new $util.Long(0,0,false);d.create_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.create_timestamp_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.expire_time_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.expire_time_ms=o.longs===String?"0":0}if(m.notification_id!=null&&m.hasOwnProperty("notification_id")){d.notification_id=m.notification_id}if(m.title_key!=null&&m.hasOwnProperty("title_key")){d.title_key=m.title_key}if(m.category!=null&&m.hasOwnProperty("category")){d.category=m.category}if(m.create_timestamp_ms!=null&&m.hasOwnProperty("create_timestamp_ms")){if(typeof m.create_timestamp_ms==="number")d.create_timestamp_ms=o.longs===String?String(m.create_timestamp_ms):m.create_timestamp_ms;else d.create_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.create_timestamp_ms):o.longs===Number?new $util.LongBits(m.create_timestamp_ms.low>>>0,m.create_timestamp_ms.high>>>0).toNumber():m.create_timestamp_ms}if(m.variables&&m.variables.length){d.variables=[];for(var j=0;j<m.variables.length;++j){d.variables[j]=$root.POGOProtos.Data.Inbox.ClientInbox.TemplateVariable.toObject(m.variables[j],o)}}if(m.labels&&m.labels.length){d.labels=[];for(var j=0;j<m.labels.length;++j){d.labels[j]=o.enums===String?$root.POGOProtos.Data.Inbox.ClientInbox.Notification.Label[m.labels[j]]:m.labels[j]}}if(m.expire_time_ms!=null&&m.hasOwnProperty("expire_time_ms")){if(typeof m.expire_time_ms==="number")d.expire_time_ms=o.longs===String?String(m.expire_time_ms):m.expire_time_ms;else d.expire_time_ms=o.longs===String?$util.Long.prototype.toString.call(m.expire_time_ms):o.longs===Number?new $util.LongBits(m.expire_time_ms.low>>>0,m.expire_time_ms.high>>>0).toNumber():m.expire_time_ms}return d};Notification.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Notification.Label=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_LABEL"]=0;values[valuesById[1]="UNREAD"]=1;values[valuesById[2]="NEW"]=2;values[valuesById[3]="IMMEDIATE"]=3;return values}();return Notification}();ClientInbox.TemplateVariable=function(){function TemplateVariable(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}TemplateVariable.prototype.name="";TemplateVariable.prototype.literal="";TemplateVariable.prototype.key="";TemplateVariable.prototype.lookup_table="";TemplateVariable.prototype.byte_value=$util.newBuffer([]);TemplateVariable.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.name!=null&&m.hasOwnProperty("name"))w.uint32(10).string(m.name);if(m.literal!=null&&m.hasOwnProperty("literal"))w.uint32(18).string(m.literal);if(m.key!=null&&m.hasOwnProperty("key"))w.uint32(26).string(m.key);if(m.lookup_table!=null&&m.hasOwnProperty("lookup_table"))w.uint32(34).string(m.lookup_table);if(m.byte_value!=null&&m.hasOwnProperty("byte_value"))w.uint32(42).bytes(m.byte_value);return w};TemplateVariable.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Inbox.ClientInbox.TemplateVariable;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.name=r.string();break;case 2:m.literal=r.string();break;case 3:m.key=r.string();break;case 4:m.lookup_table=r.string();break;case 5:m.byte_value=r.bytes();break;default:r.skipType(t&7);break}}return m};TemplateVariable.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Inbox.ClientInbox.TemplateVariable)return d;var m=new $root.POGOProtos.Data.Inbox.ClientInbox.TemplateVariable;if(d.name!=null){m.name=String(d.name)}if(d.literal!=null){m.literal=String(d.literal)}if(d.key!=null){m.key=String(d.key)}if(d.lookup_table!=null){m.lookup_table=String(d.lookup_table)}if(d.byte_value!=null){if(typeof d.byte_value==="string")$util.base64.decode(d.byte_value,m.byte_value=$util.newBuffer($util.base64.length(d.byte_value)),0);else if(d.byte_value.length)m.byte_value=d.byte_value}return m};TemplateVariable.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.name="";d.literal="";d.key="";d.lookup_table="";if(o.bytes===String)d.byte_value="";else{d.byte_value=[];if(o.bytes!==Array)d.byte_value=$util.newBuffer(d.byte_value)}}if(m.name!=null&&m.hasOwnProperty("name")){d.name=m.name}if(m.literal!=null&&m.hasOwnProperty("literal")){d.literal=m.literal}if(m.key!=null&&m.hasOwnProperty("key")){d.key=m.key}if(m.lookup_table!=null&&m.hasOwnProperty("lookup_table")){d.lookup_table=m.lookup_table}if(m.byte_value!=null&&m.hasOwnProperty("byte_value")){d.byte_value=o.bytes===String?$util.base64.encode(m.byte_value,0,m.byte_value.length):o.bytes===Array?Array.prototype.slice.call(m.byte_value):m.byte_value}return d};TemplateVariable.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return TemplateVariable}();return ClientInbox}();return Inbox}();Data.Location=function(){function Location(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Location.prototype.lat_degree=0;Location.prototype.lng_degree=0;Location.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.lat_degree!=null&&m.hasOwnProperty("lat_degree"))w.uint32(9).double(m.lat_degree);if(m.lng_degree!=null&&m.hasOwnProperty("lng_degree"))w.uint32(17).double(m.lng_degree);return w};Location.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Location;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.lat_degree=r.double();break;case 2:m.lng_degree=r.double();break;default:r.skipType(t&7);break}}return m};Location.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Location)return d;var m=new $root.POGOProtos.Data.Location;if(d.lat_degree!=null){m.lat_degree=Number(d.lat_degree)}if(d.lng_degree!=null){m.lng_degree=Number(d.lng_degree)}return m};Location.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.lat_degree=0;d.lng_degree=0}if(m.lat_degree!=null&&m.hasOwnProperty("lat_degree")){d.lat_degree=o.json&&!isFinite(m.lat_degree)?String(m.lat_degree):m.lat_degree}if(m.lng_degree!=null&&m.hasOwnProperty("lng_degree")){d.lng_degree=o.json&&!isFinite(m.lng_degree)?String(m.lng_degree):m.lng_degree}return d};Location.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Location}();Data.Login=function(){var Login={};Login.LoginDetail=function(){function LoginDetail(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LoginDetail.prototype.identity_provider=0;LoginDetail.prototype.email="";LoginDetail.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.identity_provider!=null&&m.hasOwnProperty("identity_provider"))w.uint32(8).int32(m.identity_provider);if(m.email!=null&&m.hasOwnProperty("email"))w.uint32(18).string(m.email);return w};LoginDetail.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Login.LoginDetail;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.identity_provider=r.int32();break;case 2:m.email=r.string();break;default:r.skipType(t&7);break}}return m};LoginDetail.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Login.LoginDetail)return d;var m=new $root.POGOProtos.Data.Login.LoginDetail;switch(d.identity_provider){case"UNSET_IDENTITY_PROVIDER":case 0:m.identity_provider=0;break;case"GOOGLE":case 1:m.identity_provider=1;break;case"PTC":case 2:m.identity_provider=2;break;case"FACEBOOK":case 3:m.identity_provider=3;break;case"BACKGROUND":case 4:m.identity_provider=4;break;case"INTERNAL":case 5:m.identity_provider=5;break;case"SFIDA":case 6:m.identity_provider=6;break;case"SUPER_AWESOME":case 7:m.identity_provider=7;break}if(d.email!=null){m.email=String(d.email)}return m};LoginDetail.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.identity_provider=o.enums===String?"UNSET_IDENTITY_PROVIDER":0;d.email=""}if(m.identity_provider!=null&&m.hasOwnProperty("identity_provider")){d.identity_provider=o.enums===String?$root.POGOProtos.Enums.IdentityProvider[m.identity_provider]:m.identity_provider}if(m.email!=null&&m.hasOwnProperty("email")){d.email=m.email}return d};LoginDetail.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return LoginDetail}();return Login}();Data.Logs=function(){var Logs={};Logs.ActionLogEntry=function(){function ActionLogEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ActionLogEntry.prototype.timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;ActionLogEntry.prototype.sfida=false;ActionLogEntry.prototype.catch_pokemon=null;ActionLogEntry.prototype.fort_search=null;ActionLogEntry.prototype.buddy_pokemon=null;ActionLogEntry.prototype.raid_rewards=null;ActionLogEntry.prototype.passcode_rewards=null;ActionLogEntry.prototype.complete_quest=null;ActionLogEntry.prototype.complete_quest_stamp_card=null;ActionLogEntry.prototype.complete_quest_pokemon_encounter=null;ActionLogEntry.prototype.beluga_transfer=null;ActionLogEntry.prototype.open_gift=null;ActionLogEntry.prototype.send_gift=null;ActionLogEntry.prototype.trading=null;ActionLogEntry.prototype.share_ex_raid_pass=null;ActionLogEntry.prototype.decline_ex_raid_pass=null;ActionLogEntry.prototype.fitness_rewards=null;ActionLogEntry.prototype.combat=null;var $oneOfFields;Object.defineProperty(ActionLogEntry.prototype,"Action",{get:$util.oneOfGetter($oneOfFields=["catch_pokemon","fort_search","buddy_pokemon","raid_rewards","passcode_rewards","complete_quest","complete_quest_stamp_card","complete_quest_pokemon_encounter","beluga_transfer","open_gift","send_gift","trading","share_ex_raid_pass","decline_ex_raid_pass","fitness_rewards","combat"]),set:$util.oneOfSetter($oneOfFields)});ActionLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms"))w.uint32(8).int64(m.timestamp_ms);if(m.sfida!=null&&m.hasOwnProperty("sfida"))w.uint32(16).bool(m.sfida);if(m.catch_pokemon!=null&&m.hasOwnProperty("catch_pokemon"))$root.POGOProtos.Data.Logs.CatchPokemonLogEntry.encode(m.catch_pokemon,w.uint32(26).fork()).ldelim();if(m.fort_search!=null&&m.hasOwnProperty("fort_search"))$root.POGOProtos.Data.Logs.FortSearchLogEntry.encode(m.fort_search,w.uint32(34).fork()).ldelim();if(m.buddy_pokemon!=null&&m.hasOwnProperty("buddy_pokemon"))$root.POGOProtos.Data.Logs.BuddyPokemonLogEntry.encode(m.buddy_pokemon,w.uint32(42).fork()).ldelim();if(m.raid_rewards!=null&&m.hasOwnProperty("raid_rewards"))$root.POGOProtos.Data.Logs.RaidRewardsLogEntry.encode(m.raid_rewards,w.uint32(50).fork()).ldelim();if(m.passcode_rewards!=null&&m.hasOwnProperty("passcode_rewards"))$root.POGOProtos.Data.Logs.PasscodeRewardsLogEntry.encode(m.passcode_rewards,w.uint32(58).fork()).ldelim();if(m.complete_quest!=null&&m.hasOwnProperty("complete_quest"))$root.POGOProtos.Data.Logs.CompleteQuestLogEntry.encode(m.complete_quest,w.uint32(66).fork()).ldelim();if(m.complete_quest_stamp_card!=null&&m.hasOwnProperty("complete_quest_stamp_card"))$root.POGOProtos.Data.Logs.CompleteQuestStampCardLogEntry.encode(m.complete_quest_stamp_card,w.uint32(74).fork()).ldelim();if(m.complete_quest_pokemon_encounter!=null&&m.hasOwnProperty("complete_quest_pokemon_encounter"))$root.POGOProtos.Data.Logs.CompleteQuestPokemonEncounterLogEntry.encode(m.complete_quest_pokemon_encounter,w.uint32(82).fork()).ldelim();if(m.beluga_transfer!=null&&m.hasOwnProperty("beluga_transfer"))$root.POGOProtos.Data.Logs.BelugaDailyTransferLogEntry.encode(m.beluga_transfer,w.uint32(90).fork()).ldelim();if(m.open_gift!=null&&m.hasOwnProperty("open_gift"))$root.POGOProtos.Data.Logs.OpenGiftLogEntry.encode(m.open_gift,w.uint32(98).fork()).ldelim();if(m.send_gift!=null&&m.hasOwnProperty("send_gift"))$root.POGOProtos.Data.Logs.SendGiftLogEntry.encode(m.send_gift,w.uint32(106).fork()).ldelim();if(m.trading!=null&&m.hasOwnProperty("trading"))$root.POGOProtos.Data.Logs.TradingLogEntry.encode(m.trading,w.uint32(114).fork()).ldelim();if(m.share_ex_raid_pass!=null&&m.hasOwnProperty("share_ex_raid_pass"))$root.POGOProtos.Data.Logs.ShareExRaidPassLogEntry.encode(m.share_ex_raid_pass,w.uint32(122).fork()).ldelim();if(m.decline_ex_raid_pass!=null&&m.hasOwnProperty("decline_ex_raid_pass"))$root.POGOProtos.Data.Logs.DeclineExRaidPassLogEntry.encode(m.decline_ex_raid_pass,w.uint32(130).fork()).ldelim();if(m.fitness_rewards!=null&&m.hasOwnProperty("fitness_rewards"))$root.POGOProtos.Data.Logs.FitnessRewardsLogEntry.encode(m.fitness_rewards,w.uint32(138).fork()).ldelim();if(m.combat!=null&&m.hasOwnProperty("combat"))$root.POGOProtos.Data.Logs.CombatLogEntry.encode(m.combat,w.uint32(146).fork()).ldelim();return w};ActionLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.ActionLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.timestamp_ms=r.int64();break;case 2:m.sfida=r.bool();break;case 3:m.catch_pokemon=$root.POGOProtos.Data.Logs.CatchPokemonLogEntry.decode(r,r.uint32());break;case 4:m.fort_search=$root.POGOProtos.Data.Logs.FortSearchLogEntry.decode(r,r.uint32());break;case 5:m.buddy_pokemon=$root.POGOProtos.Data.Logs.BuddyPokemonLogEntry.decode(r,r.uint32());break;case 6:m.raid_rewards=$root.POGOProtos.Data.Logs.RaidRewardsLogEntry.decode(r,r.uint32());break;case 7:m.passcode_rewards=$root.POGOProtos.Data.Logs.PasscodeRewardsLogEntry.decode(r,r.uint32());break;case 8:m.complete_quest=$root.POGOProtos.Data.Logs.CompleteQuestLogEntry.decode(r,r.uint32());break;case 9:m.complete_quest_stamp_card=$root.POGOProtos.Data.Logs.CompleteQuestStampCardLogEntry.decode(r,r.uint32());break;case 10:m.complete_quest_pokemon_encounter=$root.POGOProtos.Data.Logs.CompleteQuestPokemonEncounterLogEntry.decode(r,r.uint32());break;case 11:m.beluga_transfer=$root.POGOProtos.Data.Logs.BelugaDailyTransferLogEntry.decode(r,r.uint32());break;case 12:m.open_gift=$root.POGOProtos.Data.Logs.OpenGiftLogEntry.decode(r,r.uint32());break;case 13:m.send_gift=$root.POGOProtos.Data.Logs.SendGiftLogEntry.decode(r,r.uint32());break;case 14:m.trading=$root.POGOProtos.Data.Logs.TradingLogEntry.decode(r,r.uint32());break;case 15:m.share_ex_raid_pass=$root.POGOProtos.Data.Logs.ShareExRaidPassLogEntry.decode(r,r.uint32());break;case 16:m.decline_ex_raid_pass=$root.POGOProtos.Data.Logs.DeclineExRaidPassLogEntry.decode(r,r.uint32());break;case 17:m.fitness_rewards=$root.POGOProtos.Data.Logs.FitnessRewardsLogEntry.decode(r,r.uint32());break;case 18:m.combat=$root.POGOProtos.Data.Logs.CombatLogEntry.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};ActionLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.ActionLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.ActionLogEntry;if(d.timestamp_ms!=null){if($util.Long)(m.timestamp_ms=$util.Long.fromValue(d.timestamp_ms)).unsigned=false;else if(typeof d.timestamp_ms==="string")m.timestamp_ms=parseInt(d.timestamp_ms,10);else if(typeof d.timestamp_ms==="number")m.timestamp_ms=d.timestamp_ms;else if(typeof d.timestamp_ms==="object")m.timestamp_ms=new $util.LongBits(d.timestamp_ms.low>>>0,d.timestamp_ms.high>>>0).toNumber()}if(d.sfida!=null){m.sfida=Boolean(d.sfida)}if(d.catch_pokemon!=null){if(typeof d.catch_pokemon!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.catch_pokemon: object expected");m.catch_pokemon=$root.POGOProtos.Data.Logs.CatchPokemonLogEntry.fromObject(d.catch_pokemon)}if(d.fort_search!=null){if(typeof d.fort_search!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.fort_search: object expected");m.fort_search=$root.POGOProtos.Data.Logs.FortSearchLogEntry.fromObject(d.fort_search)}if(d.buddy_pokemon!=null){if(typeof d.buddy_pokemon!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.buddy_pokemon: object expected");m.buddy_pokemon=$root.POGOProtos.Data.Logs.BuddyPokemonLogEntry.fromObject(d.buddy_pokemon)}if(d.raid_rewards!=null){if(typeof d.raid_rewards!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.raid_rewards: object expected");m.raid_rewards=$root.POGOProtos.Data.Logs.RaidRewardsLogEntry.fromObject(d.raid_rewards)}if(d.passcode_rewards!=null){if(typeof d.passcode_rewards!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.passcode_rewards: object expected");m.passcode_rewards=$root.POGOProtos.Data.Logs.PasscodeRewardsLogEntry.fromObject(d.passcode_rewards)}if(d.complete_quest!=null){if(typeof d.complete_quest!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.complete_quest: object expected");m.complete_quest=$root.POGOProtos.Data.Logs.CompleteQuestLogEntry.fromObject(d.complete_quest)}if(d.complete_quest_stamp_card!=null){if(typeof d.complete_quest_stamp_card!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.complete_quest_stamp_card: object expected");m.complete_quest_stamp_card=$root.POGOProtos.Data.Logs.CompleteQuestStampCardLogEntry.fromObject(d.complete_quest_stamp_card)}if(d.complete_quest_pokemon_encounter!=null){if(typeof d.complete_quest_pokemon_encounter!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.complete_quest_pokemon_encounter: object expected");m.complete_quest_pokemon_encounter=$root.POGOProtos.Data.Logs.CompleteQuestPokemonEncounterLogEntry.fromObject(d.complete_quest_pokemon_encounter)}if(d.beluga_transfer!=null){if(typeof d.beluga_transfer!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.beluga_transfer: object expected");m.beluga_transfer=$root.POGOProtos.Data.Logs.BelugaDailyTransferLogEntry.fromObject(d.beluga_transfer)}if(d.open_gift!=null){if(typeof d.open_gift!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.open_gift: object expected");m.open_gift=$root.POGOProtos.Data.Logs.OpenGiftLogEntry.fromObject(d.open_gift)}if(d.send_gift!=null){if(typeof d.send_gift!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.send_gift: object expected");m.send_gift=$root.POGOProtos.Data.Logs.SendGiftLogEntry.fromObject(d.send_gift)}if(d.trading!=null){if(typeof d.trading!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.trading: object expected");m.trading=$root.POGOProtos.Data.Logs.TradingLogEntry.fromObject(d.trading)}if(d.share_ex_raid_pass!=null){if(typeof d.share_ex_raid_pass!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.share_ex_raid_pass: object expected");m.share_ex_raid_pass=$root.POGOProtos.Data.Logs.ShareExRaidPassLogEntry.fromObject(d.share_ex_raid_pass)}if(d.decline_ex_raid_pass!=null){if(typeof d.decline_ex_raid_pass!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.decline_ex_raid_pass: object expected");m.decline_ex_raid_pass=$root.POGOProtos.Data.Logs.DeclineExRaidPassLogEntry.fromObject(d.decline_ex_raid_pass)}if(d.fitness_rewards!=null){if(typeof d.fitness_rewards!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.fitness_rewards: object expected");m.fitness_rewards=$root.POGOProtos.Data.Logs.FitnessRewardsLogEntry.fromObject(d.fitness_rewards)}if(d.combat!=null){if(typeof d.combat!=="object")throw TypeError(".POGOProtos.Data.Logs.ActionLogEntry.combat: object expected");m.combat=$root.POGOProtos.Data.Logs.CombatLogEntry.fromObject(d.combat)}return m};ActionLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.timestamp_ms=o.longs===String?"0":0;d.sfida=false}if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms")){if(typeof m.timestamp_ms==="number")d.timestamp_ms=o.longs===String?String(m.timestamp_ms):m.timestamp_ms;else d.timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.timestamp_ms):o.longs===Number?new $util.LongBits(m.timestamp_ms.low>>>0,m.timestamp_ms.high>>>0).toNumber():m.timestamp_ms}if(m.sfida!=null&&m.hasOwnProperty("sfida")){d.sfida=m.sfida}if(m.catch_pokemon!=null&&m.hasOwnProperty("catch_pokemon")){d.catch_pokemon=$root.POGOProtos.Data.Logs.CatchPokemonLogEntry.toObject(m.catch_pokemon,o);if(o.oneofs)d.Action="catch_pokemon"}if(m.fort_search!=null&&m.hasOwnProperty("fort_search")){d.fort_search=$root.POGOProtos.Data.Logs.FortSearchLogEntry.toObject(m.fort_search,o);if(o.oneofs)d.Action="fort_search"}if(m.buddy_pokemon!=null&&m.hasOwnProperty("buddy_pokemon")){d.buddy_pokemon=$root.POGOProtos.Data.Logs.BuddyPokemonLogEntry.toObject(m.buddy_pokemon,o);if(o.oneofs)d.Action="buddy_pokemon"}if(m.raid_rewards!=null&&m.hasOwnProperty("raid_rewards")){d.raid_rewards=$root.POGOProtos.Data.Logs.RaidRewardsLogEntry.toObject(m.raid_rewards,o);if(o.oneofs)d.Action="raid_rewards"}if(m.passcode_rewards!=null&&m.hasOwnProperty("passcode_rewards")){d.passcode_rewards=$root.POGOProtos.Data.Logs.PasscodeRewardsLogEntry.toObject(m.passcode_rewards,o);if(o.oneofs)d.Action="passcode_rewards"}if(m.complete_quest!=null&&m.hasOwnProperty("complete_quest")){d.complete_quest=$root.POGOProtos.Data.Logs.CompleteQuestLogEntry.toObject(m.complete_quest,o);if(o.oneofs)d.Action="complete_quest"}if(m.complete_quest_stamp_card!=null&&m.hasOwnProperty("complete_quest_stamp_card")){d.complete_quest_stamp_card=$root.POGOProtos.Data.Logs.CompleteQuestStampCardLogEntry.toObject(m.complete_quest_stamp_card,o);if(o.oneofs)d.Action="complete_quest_stamp_card"}if(m.complete_quest_pokemon_encounter!=null&&m.hasOwnProperty("complete_quest_pokemon_encounter")){d.complete_quest_pokemon_encounter=$root.POGOProtos.Data.Logs.CompleteQuestPokemonEncounterLogEntry.toObject(m.complete_quest_pokemon_encounter,o);if(o.oneofs)d.Action="complete_quest_pokemon_encounter"}if(m.beluga_transfer!=null&&m.hasOwnProperty("beluga_transfer")){d.beluga_transfer=$root.POGOProtos.Data.Logs.BelugaDailyTransferLogEntry.toObject(m.beluga_transfer,o);if(o.oneofs)d.Action="beluga_transfer"}if(m.open_gift!=null&&m.hasOwnProperty("open_gift")){d.open_gift=$root.POGOProtos.Data.Logs.OpenGiftLogEntry.toObject(m.open_gift,o);if(o.oneofs)d.Action="open_gift"}if(m.send_gift!=null&&m.hasOwnProperty("send_gift")){d.send_gift=$root.POGOProtos.Data.Logs.SendGiftLogEntry.toObject(m.send_gift,o);if(o.oneofs)d.Action="send_gift"}if(m.trading!=null&&m.hasOwnProperty("trading")){d.trading=$root.POGOProtos.Data.Logs.TradingLogEntry.toObject(m.trading,o);if(o.oneofs)d.Action="trading"}if(m.share_ex_raid_pass!=null&&m.hasOwnProperty("share_ex_raid_pass")){d.share_ex_raid_pass=$root.POGOProtos.Data.Logs.ShareExRaidPassLogEntry.toObject(m.share_ex_raid_pass,o);if(o.oneofs)d.Action="share_ex_raid_pass"}if(m.decline_ex_raid_pass!=null&&m.hasOwnProperty("decline_ex_raid_pass")){d.decline_ex_raid_pass=$root.POGOProtos.Data.Logs.DeclineExRaidPassLogEntry.toObject(m.decline_ex_raid_pass,o);if(o.oneofs)d.Action="decline_ex_raid_pass"}if(m.fitness_rewards!=null&&m.hasOwnProperty("fitness_rewards")){d.fitness_rewards=$root.POGOProtos.Data.Logs.FitnessRewardsLogEntry.toObject(m.fitness_rewards,o);if(o.oneofs)d.Action="fitness_rewards"}if(m.combat!=null&&m.hasOwnProperty("combat")){d.combat=$root.POGOProtos.Data.Logs.CombatLogEntry.toObject(m.combat,o);if(o.oneofs)d.Action="combat"}return d};ActionLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ActionLogEntry}();Logs.BelugaDailyTransferLogEntry=function(){function BelugaDailyTransferLogEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BelugaDailyTransferLogEntry.prototype.result=0;BelugaDailyTransferLogEntry.prototype.includes_weekly_bonus=false;BelugaDailyTransferLogEntry.prototype.items_awarded=null;BelugaDailyTransferLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.includes_weekly_bonus!=null&&m.hasOwnProperty("includes_weekly_bonus"))w.uint32(16).bool(m.includes_weekly_bonus);if(m.items_awarded!=null&&m.hasOwnProperty("items_awarded"))$root.POGOProtos.Inventory.Loot.encode(m.items_awarded,w.uint32(26).fork()).ldelim();return w};BelugaDailyTransferLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.BelugaDailyTransferLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.includes_weekly_bonus=r.bool();break;case 3:m.items_awarded=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};BelugaDailyTransferLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.BelugaDailyTransferLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.BelugaDailyTransferLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.includes_weekly_bonus!=null){m.includes_weekly_bonus=Boolean(d.includes_weekly_bonus)}if(d.items_awarded!=null){if(typeof d.items_awarded!=="object")throw TypeError(".POGOProtos.Data.Logs.BelugaDailyTransferLogEntry.items_awarded: object expected");m.items_awarded=$root.POGOProtos.Inventory.Loot.fromObject(d.items_awarded)}return m};BelugaDailyTransferLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.includes_weekly_bonus=false;d.items_awarded=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.BelugaDailyTransferLogEntry.Result[m.result]:m.result}if(m.includes_weekly_bonus!=null&&m.hasOwnProperty("includes_weekly_bonus")){d.includes_weekly_bonus=m.includes_weekly_bonus}if(m.items_awarded!=null&&m.hasOwnProperty("items_awarded")){d.items_awarded=$root.POGOProtos.Inventory.Loot.toObject(m.items_awarded,o)}return d};BelugaDailyTransferLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BelugaDailyTransferLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return BelugaDailyTransferLogEntry}();Logs.BuddyPokemonLogEntry=function(){function BuddyPokemonLogEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BuddyPokemonLogEntry.prototype.result=0;BuddyPokemonLogEntry.prototype.pokemon_id=0;BuddyPokemonLogEntry.prototype.amount=0;BuddyPokemonLogEntry.prototype.pokemon_display=null;BuddyPokemonLogEntry.prototype.pokemon=$util.Long?$util.Long.fromBits(0,0,false):0;BuddyPokemonLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(16).int32(m.pokemon_id);if(m.amount!=null&&m.hasOwnProperty("amount"))w.uint32(24).int32(m.amount);if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display"))$root.POGOProtos.Data.PokemonDisplay.encode(m.pokemon_display,w.uint32(34).fork()).ldelim();if(m.pokemon!=null&&m.hasOwnProperty("pokemon"))w.uint32(41).fixed64(m.pokemon);return w};BuddyPokemonLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.BuddyPokemonLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.pokemon_id=r.int32();break;case 3:m.amount=r.int32();break;case 4:m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;case 5:m.pokemon=r.fixed64();break;default:r.skipType(t&7);break}}return m};BuddyPokemonLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.BuddyPokemonLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.BuddyPokemonLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"CANDY_FOUND":case 1:m.result=1;break}switch(d.pokemon_id){case"MISSINGNO":case 0:m.pokemon_id=0;break;case"BULBASAUR":case 1:m.pokemon_id=1;break;case"IVYSAUR":case 2:m.pokemon_id=2;break;case"VENUSAUR":case 3:m.pokemon_id=3;break;case"CHARMANDER":case 4:m.pokemon_id=4;break;case"CHARMELEON":case 5:m.pokemon_id=5;break;case"CHARIZARD":case 6:m.pokemon_id=6;break;case"SQUIRTLE":case 7:m.pokemon_id=7;break;case"WARTORTLE":case 8:m.pokemon_id=8;break;case"BLASTOISE":case 9:m.pokemon_id=9;break;case"CATERPIE":case 10:m.pokemon_id=10;break;case"METAPOD":case 11:m.pokemon_id=11;break;case"BUTTERFREE":case 12:m.pokemon_id=12;break;case"WEEDLE":case 13:m.pokemon_id=13;break;case"KAKUNA":case 14:m.pokemon_id=14;break;case"BEEDRILL":case 15:m.pokemon_id=15;break;case"PIDGEY":case 16:m.pokemon_id=16;break;case"PIDGEOTTO":case 17:m.pokemon_id=17;break;case"PIDGEOT":case 18:m.pokemon_id=18;break;case"RATTATA":case 19:m.pokemon_id=19;break;case"RATICATE":case 20:m.pokemon_id=20;break;case"SPEAROW":case 21:m.pokemon_id=21;break;case"FEAROW":case 22:m.pokemon_id=22;break;case"EKANS":case 23:m.pokemon_id=23;break;case"ARBOK":case 24:m.pokemon_id=24;break;case"PIKACHU":case 25:m.pokemon_id=25;break;case"RAICHU":case 26:m.pokemon_id=26;break;case"SANDSHREW":case 27:m.pokemon_id=27;break;case"SANDSLASH":case 28:m.pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_id=29;break;case"NIDORINA":case 30:m.pokemon_id=30;break;case"NIDOQUEEN":case 31:m.pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.pokemon_id=32;break;case"NIDORINO":case 33:m.pokemon_id=33;break;case"NIDOKING":case 34:m.pokemon_id=34;break;case"CLEFAIRY":case 35:m.pokemon_id=35;break;case"CLEFABLE":case 36:m.pokemon_id=36;break;case"VULPIX":case 37:m.pokemon_id=37;break;case"NINETALES":case 38:m.pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.pokemon_id=40;break;case"ZUBAT":case 41:m.pokemon_id=41;break;case"GOLBAT":case 42:m.pokemon_id=42;break;case"ODDISH":case 43:m.pokemon_id=43;break;case"GLOOM":case 44:m.pokemon_id=44;break;case"VILEPLUME":case 45:m.pokemon_id=45;break;case"PARAS":case 46:m.pokemon_id=46;break;case"PARASECT":case 47:m.pokemon_id=47;break;case"VENONAT":case 48:m.pokemon_id=48;break;case"VENOMOTH":case 49:m.pokemon_id=49;break;case"DIGLETT":case 50:m.pokemon_id=50;break;case"DUGTRIO":case 51:m.pokemon_id=51;break;case"MEOWTH":case 52:m.pokemon_id=52;break;case"PERSIAN":case 53:m.pokemon_id=53;break;case"PSYDUCK":case 54:m.pokemon_id=54;break;case"GOLDUCK":case 55:m.pokemon_id=55;break;case"MANKEY":case 56:m.pokemon_id=56;break;case"PRIMEAPE":case 57:m.pokemon_id=57;break;case"GROWLITHE":case 58:m.pokemon_id=58;break;case"ARCANINE":case 59:m.pokemon_id=59;break;case"POLIWAG":case 60:m.pokemon_id=60;break;case"POLIWHIRL":case 61:m.pokemon_id=61;break;case"POLIWRATH":case 62:m.pokemon_id=62;break;case"ABRA":case 63:m.pokemon_id=63;break;case"KADABRA":case 64:m.pokemon_id=64;break;case"ALAKAZAM":case 65:m.pokemon_id=65;break;case"MACHOP":case 66:m.pokemon_id=66;break;case"MACHOKE":case 67:m.pokemon_id=67;break;case"MACHAMP":case 68:m.pokemon_id=68;break;case"BELLSPROUT":case 69:m.pokemon_id=69;break;case"WEEPINBELL":case 70:m.pokemon_id=70;break;case"VICTREEBEL":case 71:m.pokemon_id=71;break;case"TENTACOOL":case 72:m.pokemon_id=72;break;case"TENTACRUEL":case 73:m.pokemon_id=73;break;case"GEODUDE":case 74:m.pokemon_id=74;break;case"GRAVELER":case 75:m.pokemon_id=75;break;case"GOLEM":case 76:m.pokemon_id=76;break;case"PONYTA":case 77:m.pokemon_id=77;break;case"RAPIDASH":case 78:m.pokemon_id=78;break;case"SLOWPOKE":case 79:m.pokemon_id=79;break;case"SLOWBRO":case 80:m.pokemon_id=80;break;case"MAGNEMITE":case 81:m.pokemon_id=81;break;case"MAGNETON":case 82:m.pokemon_id=82;break;case"FARFETCHD":case 83:m.pokemon_id=83;break;case"DODUO":case 84:m.pokemon_id=84;break;case"DODRIO":case 85:m.pokemon_id=85;break;case"SEEL":case 86:m.pokemon_id=86;break;case"DEWGONG":case 87:m.pokemon_id=87;break;case"GRIMER":case 88:m.pokemon_id=88;break;case"MUK":case 89:m.pokemon_id=89;break;case"SHELLDER":case 90:m.pokemon_id=90;break;case"CLOYSTER":case 91:m.pokemon_id=91;break;case"GASTLY":case 92:m.pokemon_id=92;break;case"HAUNTER":case 93:m.pokemon_id=93;break;case"GENGAR":case 94:m.pokemon_id=94;break;case"ONIX":case 95:m.pokemon_id=95;break;case"DROWZEE":case 96:m.pokemon_id=96;break;case"HYPNO":case 97:m.pokemon_id=97;break;case"KRABBY":case 98:m.pokemon_id=98;break;case"KINGLER":case 99:m.pokemon_id=99;break;case"VOLTORB":case 100:m.pokemon_id=100;break;case"ELECTRODE":case 101:m.pokemon_id=101;break;case"EXEGGCUTE":case 102:m.pokemon_id=102;break;case"EXEGGUTOR":case 103:m.pokemon_id=103;break;case"CUBONE":case 104:m.pokemon_id=104;break;case"MAROWAK":case 105:m.pokemon_id=105;break;case"HITMONLEE":case 106:m.pokemon_id=106;break;case"HITMONCHAN":case 107:m.pokemon_id=107;break;case"LICKITUNG":case 108:m.pokemon_id=108;break;case"KOFFING":case 109:m.pokemon_id=109;break;case"WEEZING":case 110:m.pokemon_id=110;break;case"RHYHORN":case 111:m.pokemon_id=111;break;case"RHYDON":case 112:m.pokemon_id=112;break;case"CHANSEY":case 113:m.pokemon_id=113;break;case"TANGELA":case 114:m.pokemon_id=114;break;case"KANGASKHAN":case 115:m.pokemon_id=115;break;case"HORSEA":case 116:m.pokemon_id=116;break;case"SEADRA":case 117:m.pokemon_id=117;break;case"GOLDEEN":case 118:m.pokemon_id=118;break;case"SEAKING":case 119:m.pokemon_id=119;break;case"STARYU":case 120:m.pokemon_id=120;break;case"STARMIE":case 121:m.pokemon_id=121;break;case"MR_MIME":case 122:m.pokemon_id=122;break;case"SCYTHER":case 123:m.pokemon_id=123;break;case"JYNX":case 124:m.pokemon_id=124;break;case"ELECTABUZZ":case 125:m.pokemon_id=125;break;case"MAGMAR":case 126:m.pokemon_id=126;break;case"PINSIR":case 127:m.pokemon_id=127;break;case"TAUROS":case 128:m.pokemon_id=128;break;case"MAGIKARP":case 129:m.pokemon_id=129;break;case"GYARADOS":case 130:m.pokemon_id=130;break;case"LAPRAS":case 131:m.pokemon_id=131;break;case"DITTO":case 132:m.pokemon_id=132;break;case"EEVEE":case 133:m.pokemon_id=133;break;case"VAPOREON":case 134:m.pokemon_id=134;break;case"JOLTEON":case 135:m.pokemon_id=135;break;case"FLAREON":case 136:m.pokemon_id=136;break;case"PORYGON":case 137:m.pokemon_id=137;break;case"OMANYTE":case 138:m.pokemon_id=138;break;case"OMASTAR":case 139:m.pokemon_id=139;break;case"KABUTO":case 140:m.pokemon_id=140;break;case"KABUTOPS":case 141:m.pokemon_id=141;break;case"AERODACTYL":case 142:m.pokemon_id=142;break;case"SNORLAX":case 143:m.pokemon_id=143;break;case"ARTICUNO":case 144:m.pokemon_id=144;break;case"ZAPDOS":case 145:m.pokemon_id=145;break;case"MOLTRES":case 146:m.pokemon_id=146;break;case"DRATINI":case 147:m.pokemon_id=147;break;case"DRAGONAIR":case 148:m.pokemon_id=148;break;case"DRAGONITE":case 149:m.pokemon_id=149;break;case"MEWTWO":case 150:m.pokemon_id=150;break;case"MEW":case 151:m.pokemon_id=151;break;case"CHIKORITA":case 152:m.pokemon_id=152;break;case"BAYLEEF":case 153:m.pokemon_id=153;break;case"MEGANIUM":case 154:m.pokemon_id=154;break;case"CYNDAQUIL":case 155:m.pokemon_id=155;break;case"QUILAVA":case 156:m.pokemon_id=156;break;case"TYPHLOSION":case 157:m.pokemon_id=157;break;case"TOTODILE":case 158:m.pokemon_id=158;break;case"CROCONAW":case 159:m.pokemon_id=159;break;case"FERALIGATR":case 160:m.pokemon_id=160;break;case"SENTRET":case 161:m.pokemon_id=161;break;case"FURRET":case 162:m.pokemon_id=162;break;case"HOOTHOOT":case 163:m.pokemon_id=163;break;case"NOCTOWL":case 164:m.pokemon_id=164;break;case"LEDYBA":case 165:m.pokemon_id=165;break;case"LEDIAN":case 166:m.pokemon_id=166;break;case"SPINARAK":case 167:m.pokemon_id=167;break;case"ARIADOS":case 168:m.pokemon_id=168;break;case"CROBAT":case 169:m.pokemon_id=169;break;case"CHINCHOU":case 170:m.pokemon_id=170;break;case"LANTURN":case 171:m.pokemon_id=171;break;case"PICHU":case 172:m.pokemon_id=172;break;case"CLEFFA":case 173:m.pokemon_id=173;break;case"IGGLYBUFF":case 174:m.pokemon_id=174;break;case"TOGEPI":case 175:m.pokemon_id=175;break;case"TOGETIC":case 176:m.pokemon_id=176;break;case"NATU":case 177:m.pokemon_id=177;break;case"XATU":case 178:m.pokemon_id=178;break;case"MAREEP":case 179:m.pokemon_id=179;break;case"FLAAFFY":case 180:m.pokemon_id=180;break;case"AMPHAROS":case 181:m.pokemon_id=181;break;case"BELLOSSOM":case 182:m.pokemon_id=182;break;case"MARILL":case 183:m.pokemon_id=183;break;case"AZUMARILL":case 184:m.pokemon_id=184;break;case"SUDOWOODO":case 185:m.pokemon_id=185;break;case"POLITOED":case 186:m.pokemon_id=186;break;case"HOPPIP":case 187:m.pokemon_id=187;break;case"SKIPLOOM":case 188:m.pokemon_id=188;break;case"JUMPLUFF":case 189:m.pokemon_id=189;break;case"AIPOM":case 190:m.pokemon_id=190;break;case"SUNKERN":case 191:m.pokemon_id=191;break;case"SUNFLORA":case 192:m.pokemon_id=192;break;case"YANMA":case 193:m.pokemon_id=193;break;case"WOOPER":case 194:m.pokemon_id=194;break;case"QUAGSIRE":case 195:m.pokemon_id=195;break;case"ESPEON":case 196:m.pokemon_id=196;break;case"UMBREON":case 197:m.pokemon_id=197;break;case"MURKROW":case 198:m.pokemon_id=198;break;case"SLOWKING":case 199:m.pokemon_id=199;break;case"MISDREAVUS":case 200:m.pokemon_id=200;break;case"UNOWN":case 201:m.pokemon_id=201;break;case"WOBBUFFET":case 202:m.pokemon_id=202;break;case"GIRAFARIG":case 203:m.pokemon_id=203;break;case"PINECO":case 204:m.pokemon_id=204;break;case"FORRETRESS":case 205:m.pokemon_id=205;break;case"DUNSPARCE":case 206:m.pokemon_id=206;break;case"GLIGAR":case 207:m.pokemon_id=207;break;case"STEELIX":case 208:m.pokemon_id=208;break;case"SNUBBULL":case 209:m.pokemon_id=209;break;case"GRANBULL":case 210:m.pokemon_id=210;break;case"QWILFISH":case 211:m.pokemon_id=211;break;case"SCIZOR":case 212:m.pokemon_id=212;break;case"SHUCKLE":case 213:m.pokemon_id=213;break;case"HERACROSS":case 214:m.pokemon_id=214;break;case"SNEASEL":case 215:m.pokemon_id=215;break;case"TEDDIURSA":case 216:m.pokemon_id=216;break;case"URSARING":case 217:m.pokemon_id=217;break;case"SLUGMA":case 218:m.pokemon_id=218;break;case"MAGCARGO":case 219:m.pokemon_id=219;break;case"SWINUB":case 220:m.pokemon_id=220;break;case"PILOSWINE":case 221:m.pokemon_id=221;break;case"CORSOLA":case 222:m.pokemon_id=222;break;case"REMORAID":case 223:m.pokemon_id=223;break;case"OCTILLERY":case 224:m.pokemon_id=224;break;case"DELIBIRD":case 225:m.pokemon_id=225;break;case"MANTINE":case 226:m.pokemon_id=226;break;case"SKARMORY":case 227:m.pokemon_id=227;break;case"HOUNDOUR":case 228:m.pokemon_id=228;break;case"HOUNDOOM":case 229:m.pokemon_id=229;break;case"KINGDRA":case 230:m.pokemon_id=230;break;case"PHANPY":case 231:m.pokemon_id=231;break;case"DONPHAN":case 232:m.pokemon_id=232;break;case"PORYGON2":case 233:m.pokemon_id=233;break;case"STANTLER":case 234:m.pokemon_id=234;break;case"SMEARGLE":case 235:m.pokemon_id=235;break;case"TYROGUE":case 236:m.pokemon_id=236;break;case"HITMONTOP":case 237:m.pokemon_id=237;break;case"SMOOCHUM":case 238:m.pokemon_id=238;break;case"ELEKID":case 239:m.pokemon_id=239;break;case"MAGBY":case 240:m.pokemon_id=240;break;case"MILTANK":case 241:m.pokemon_id=241;break;case"BLISSEY":case 242:m.pokemon_id=242;break;case"RAIKOU":case 243:m.pokemon_id=243;break;case"ENTEI":case 244:m.pokemon_id=244;break;case"SUICUNE":case 245:m.pokemon_id=245;break;case"LARVITAR":case 246:m.pokemon_id=246;break;case"PUPITAR":case 247:m.pokemon_id=247;break;case"TYRANITAR":case 248:m.pokemon_id=248;break;case"LUGIA":case 249:m.pokemon_id=249;break;case"HO_OH":case 250:m.pokemon_id=250;break;case"CELEBI":case 251:m.pokemon_id=251;break;case"TREECKO":case 252:m.pokemon_id=252;break;case"GROVYLE":case 253:m.pokemon_id=253;break;case"SCEPTILE":case 254:m.pokemon_id=254;break;case"TORCHIC":case 255:m.pokemon_id=255;break;case"COMBUSKEN":case 256:m.pokemon_id=256;break;case"BLAZIKEN":case 257:m.pokemon_id=257;break;case"MUDKIP":case 258:m.pokemon_id=258;break;case"MARSHTOMP":case 259:m.pokemon_id=259;break;case"SWAMPERT":case 260:m.pokemon_id=260;break;case"POOCHYENA":case 261:m.pokemon_id=261;break;case"MIGHTYENA":case 262:m.pokemon_id=262;break;case"ZIGZAGOON":case 263:m.pokemon_id=263;break;case"LINOONE":case 264:m.pokemon_id=264;break;case"WURMPLE":case 265:m.pokemon_id=265;break;case"SILCOON":case 266:m.pokemon_id=266;break;case"BEAUTIFLY":case 267:m.pokemon_id=267;break;case"CASCOON":case 268:m.pokemon_id=268;break;case"DUSTOX":case 269:m.pokemon_id=269;break;case"LOTAD":case 270:m.pokemon_id=270;break;case"LOMBRE":case 271:m.pokemon_id=271;break;case"LUDICOLO":case 272:m.pokemon_id=272;break;case"SEEDOT":case 273:m.pokemon_id=273;break;case"NUZLEAF":case 274:m.pokemon_id=274;break;case"SHIFTRY":case 275:m.pokemon_id=275;break;case"TAILLOW":case 276:m.pokemon_id=276;break;case"SWELLOW":case 277:m.pokemon_id=277;break;case"WINGULL":case 278:m.pokemon_id=278;break;case"PELIPPER":case 279:m.pokemon_id=279;break;case"RALTS":case 280:m.pokemon_id=280;break;case"KIRLIA":case 281:m.pokemon_id=281;break;case"GARDEVOIR":case 282:m.pokemon_id=282;break;case"SURSKIT":case 283:m.pokemon_id=283;break;case"MASQUERAIN":case 284:m.pokemon_id=284;break;case"SHROOMISH":case 285:m.pokemon_id=285;break;case"BRELOOM":case 286:m.pokemon_id=286;break;case"SLAKOTH":case 287:m.pokemon_id=287;break;case"VIGOROTH":case 288:m.pokemon_id=288;break;case"SLAKING":case 289:m.pokemon_id=289;break;case"NINCADA":case 290:m.pokemon_id=290;break;case"NINJASK":case 291:m.pokemon_id=291;break;case"SHEDINJA":case 292:m.pokemon_id=292;break;case"WHISMUR":case 293:m.pokemon_id=293;break;case"LOUDRED":case 294:m.pokemon_id=294;break;case"EXPLOUD":case 295:m.pokemon_id=295;break;case"MAKUHITA":case 296:m.pokemon_id=296;break;case"HARIYAMA":case 297:m.pokemon_id=297;break;case"AZURILL":case 298:m.pokemon_id=298;break;case"NOSEPASS":case 299:m.pokemon_id=299;break;case"SKITTY":case 300:m.pokemon_id=300;break;case"DELCATTY":case 301:m.pokemon_id=301;break;case"SABLEYE":case 302:m.pokemon_id=302;break;case"MAWILE":case 303:m.pokemon_id=303;break;case"ARON":case 304:m.pokemon_id=304;break;case"LAIRON":case 305:m.pokemon_id=305;break;case"AGGRON":case 306:m.pokemon_id=306;break;case"MEDITITE":case 307:m.pokemon_id=307;break;case"MEDICHAM":case 308:m.pokemon_id=308;break;case"ELECTRIKE":case 309:m.pokemon_id=309;break;case"MANECTRIC":case 310:m.pokemon_id=310;break;case"PLUSLE":case 311:m.pokemon_id=311;break;case"MINUN":case 312:m.pokemon_id=312;break;case"VOLBEAT":case 313:m.pokemon_id=313;break;case"ILLUMISE":case 314:m.pokemon_id=314;break;case"ROSELIA":case 315:m.pokemon_id=315;break;case"GULPIN":case 316:m.pokemon_id=316;break;case"SWALOT":case 317:m.pokemon_id=317;break;case"CARVANHA":case 318:m.pokemon_id=318;break;case"SHARPEDO":case 319:m.pokemon_id=319;break;case"WAILMER":case 320:m.pokemon_id=320;break;case"WAILORD":case 321:m.pokemon_id=321;break;case"NUMEL":case 322:m.pokemon_id=322;break;case"CAMERUPT":case 323:m.pokemon_id=323;break;case"TORKOAL":case 324:m.pokemon_id=324;break;case"SPOINK":case 325:m.pokemon_id=325;break;case"GRUMPIG":case 326:m.pokemon_id=326;break;case"SPINDA":case 327:m.pokemon_id=327;break;case"TRAPINCH":case 328:m.pokemon_id=328;break;case"VIBRAVA":case 329:m.pokemon_id=329;break;case"FLYGON":case 330:m.pokemon_id=330;break;case"CACNEA":case 331:m.pokemon_id=331;break;case"CACTURNE":case 332:m.pokemon_id=332;break;case"SWABLU":case 333:m.pokemon_id=333;break;case"ALTARIA":case 334:m.pokemon_id=334;break;case"ZANGOOSE":case 335:m.pokemon_id=335;break;case"SEVIPER":case 336:m.pokemon_id=336;break;case"LUNATONE":case 337:m.pokemon_id=337;break;case"SOLROCK":case 338:m.pokemon_id=338;break;case"BARBOACH":case 339:m.pokemon_id=339;break;case"WHISCASH":case 340:m.pokemon_id=340;break;case"CORPHISH":case 341:m.pokemon_id=341;break;case"CRAWDAUNT":case 342:m.pokemon_id=342;break;case"BALTOY":case 343:m.pokemon_id=343;break;case"CLAYDOL":case 344:m.pokemon_id=344;break;case"LILEEP":case 345:m.pokemon_id=345;break;case"CRADILY":case 346:m.pokemon_id=346;break;case"ANORITH":case 347:m.pokemon_id=347;break;case"ARMALDO":case 348:m.pokemon_id=348;break;case"FEEBAS":case 349:m.pokemon_id=349;break;case"MILOTIC":case 350:m.pokemon_id=350;break;case"CASTFORM":case 351:m.pokemon_id=351;break;case"KECLEON":case 352:m.pokemon_id=352;break;case"SHUPPET":case 353:m.pokemon_id=353;break;case"BANETTE":case 354:m.pokemon_id=354;break;case"DUSKULL":case 355:m.pokemon_id=355;break;case"DUSCLOPS":case 356:m.pokemon_id=356;break;case"TROPIUS":case 357:m.pokemon_id=357;break;case"CHIMECHO":case 358:m.pokemon_id=358;break;case"ABSOL":case 359:m.pokemon_id=359;break;case"WYNAUT":case 360:m.pokemon_id=360;break;case"SNORUNT":case 361:m.pokemon_id=361;break;case"GLALIE":case 362:m.pokemon_id=362;break;case"SPHEAL":case 363:m.pokemon_id=363;break;case"SEALEO":case 364:m.pokemon_id=364;break;case"WALREIN":case 365:m.pokemon_id=365;break;case"CLAMPERL":case 366:m.pokemon_id=366;break;case"HUNTAIL":case 367:m.pokemon_id=367;break;case"GOREBYSS":case 368:m.pokemon_id=368;break;case"RELICANTH":case 369:m.pokemon_id=369;break;case"LUVDISC":case 370:m.pokemon_id=370;break;case"BAGON":case 371:m.pokemon_id=371;break;case"SHELGON":case 372:m.pokemon_id=372;break;case"SALAMENCE":case 373:m.pokemon_id=373;break;case"BELDUM":case 374:m.pokemon_id=374;break;case"METANG":case 375:m.pokemon_id=375;break;case"METAGROSS":case 376:m.pokemon_id=376;break;case"REGIROCK":case 377:m.pokemon_id=377;break;case"REGICE":case 378:m.pokemon_id=378;break;case"REGISTEEL":case 379:m.pokemon_id=379;break;case"LATIAS":case 380:m.pokemon_id=380;break;case"LATIOS":case 381:m.pokemon_id=381;break;case"KYOGRE":case 382:m.pokemon_id=382;break;case"GROUDON":case 383:m.pokemon_id=383;break;case"RAYQUAZA":case 384:m.pokemon_id=384;break;case"JIRACHI":case 385:m.pokemon_id=385;break;case"DEOXYS":case 386:m.pokemon_id=386;break;case"TURTWIG":case 387:m.pokemon_id=387;break;case"GROTLE":case 388:m.pokemon_id=388;break;case"TORTERRA":case 389:m.pokemon_id=389;break;case"CHIMCHAR":case 390:m.pokemon_id=390;break;case"MONFERNO":case 391:m.pokemon_id=391;break;case"INFERNAPE":case 392:m.pokemon_id=392;break;case"PIPLUP":case 393:m.pokemon_id=393;break;case"PRINPLUP":case 394:m.pokemon_id=394;break;case"EMPOLEON":case 395:m.pokemon_id=395;break;case"STARLY":case 396:m.pokemon_id=396;break;case"STARAVIA":case 397:m.pokemon_id=397;break;case"STARAPTOR":case 398:m.pokemon_id=398;break;case"BIDOOF":case 399:m.pokemon_id=399;break;case"BIBAREL":case 400:m.pokemon_id=400;break;case"KRICKETOT":case 401:m.pokemon_id=401;break;case"KRICKETUNE":case 402:m.pokemon_id=402;break;case"SHINX":case 403:m.pokemon_id=403;break;case"LUXIO":case 404:m.pokemon_id=404;break;case"LUXRAY":case 405:m.pokemon_id=405;break;case"BUDEW":case 406:m.pokemon_id=406;break;case"ROSERADE":case 407:m.pokemon_id=407;break;case"CRANIDOS":case 408:m.pokemon_id=408;break;case"RAMPARDOS":case 409:m.pokemon_id=409;break;case"SHIELDON":case 410:m.pokemon_id=410;break;case"BASTIODON":case 411:m.pokemon_id=411;break;case"BURMY":case 412:m.pokemon_id=412;break;case"WORMADAM":case 413:m.pokemon_id=413;break;case"MOTHIM":case 414:m.pokemon_id=414;break;case"COMBEE":case 415:m.pokemon_id=415;break;case"VESPIQUEN":case 416:m.pokemon_id=416;break;case"PACHIRISU":case 417:m.pokemon_id=417;break;case"BUIZEL":case 418:m.pokemon_id=418;break;case"FLOATZEL":case 419:m.pokemon_id=419;break;case"CHERUBI":case 420:m.pokemon_id=420;break;case"CHERRIM":case 421:m.pokemon_id=421;break;case"SHELLOS":case 422:m.pokemon_id=422;break;case"GASTRODON":case 423:m.pokemon_id=423;break;case"AMBIPOM":case 424:m.pokemon_id=424;break;case"DRIFLOON":case 425:m.pokemon_id=425;break;case"DRIFBLIM":case 426:m.pokemon_id=426;break;case"BUNEARY":case 427:m.pokemon_id=427;break;case"LOPUNNY":case 428:m.pokemon_id=428;break;case"MISMAGIUS":case 429:m.pokemon_id=429;break;case"HONCHKROW":case 430:m.pokemon_id=430;break;case"GLAMEOW":case 431:m.pokemon_id=431;break;case"PURUGLY":case 432:m.pokemon_id=432;break;case"CHINGLING":case 433:m.pokemon_id=433;break;case"STUNKY":case 434:m.pokemon_id=434;break;case"SKUNTANK":case 435:m.pokemon_id=435;break;case"BRONZOR":case 436:m.pokemon_id=436;break;case"BRONZONG":case 437:m.pokemon_id=437;break;case"BONSLY":case 438:m.pokemon_id=438;break;case"MIME_JR":case 439:m.pokemon_id=439;break;case"HAPPINY":case 440:m.pokemon_id=440;break;case"CHATOT":case 441:m.pokemon_id=441;break;case"SPIRITOMB":case 442:m.pokemon_id=442;break;case"GIBLE":case 443:m.pokemon_id=443;break;case"GABITE":case 444:m.pokemon_id=444;break;case"GARCHOMP":case 445:m.pokemon_id=445;break;case"MUNCHLAX":case 446:m.pokemon_id=446;break;case"RIOLU":case 447:m.pokemon_id=447;break;case"LUCARIO":case 448:m.pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.pokemon_id=449;break;case"HIPPOWDON":case 450:m.pokemon_id=450;break;case"SKORUPI":case 451:m.pokemon_id=451;break;case"DRAPION":case 452:m.pokemon_id=452;break;case"CROAGUNK":case 453:m.pokemon_id=453;break;case"TOXICROAK":case 454:m.pokemon_id=454;break;case"CARNIVINE":case 455:m.pokemon_id=455;break;case"FINNEON":case 456:m.pokemon_id=456;break;case"LUMINEON":case 457:m.pokemon_id=457;break;case"MANTYKE":case 458:m.pokemon_id=458;break;case"SNOVER":case 459:m.pokemon_id=459;break;case"ABOMASNOW":case 460:m.pokemon_id=460;break;case"WEAVILE":case 461:m.pokemon_id=461;break;case"MAGNEZONE":case 462:m.pokemon_id=462;break;case"LICKILICKY":case 463:m.pokemon_id=463;break;case"RHYPERIOR":case 464:m.pokemon_id=464;break;case"TANGROWTH":case 465:m.pokemon_id=465;break;case"ELECTIVIRE":case 466:m.pokemon_id=466;break;case"MAGMORTAR":case 467:m.pokemon_id=467;break;case"TOGEKISS":case 468:m.pokemon_id=468;break;case"YANMEGA":case 469:m.pokemon_id=469;break;case"LEAFEON":case 470:m.pokemon_id=470;break;case"GLACEON":case 471:m.pokemon_id=471;break;case"GLISCOR":case 472:m.pokemon_id=472;break;case"MAMOSWINE":case 473:m.pokemon_id=473;break;case"PORYGON_Z":case 474:m.pokemon_id=474;break;case"GALLADE":case 475:m.pokemon_id=475;break;case"PROBOPASS":case 476:m.pokemon_id=476;break;case"DUSKNOIR":case 477:m.pokemon_id=477;break;case"FROSLASS":case 478:m.pokemon_id=478;break;case"ROTOM":case 479:m.pokemon_id=479;break;case"UXIE":case 480:m.pokemon_id=480;break;case"MESPRIT":case 481:m.pokemon_id=481;break;case"AZELF":case 482:m.pokemon_id=482;break;case"DIALGA":case 483:m.pokemon_id=483;break;case"PALKIA":case 484:m.pokemon_id=484;break;case"HEATRAN":case 485:m.pokemon_id=485;break;case"REGIGIGAS":case 486:m.pokemon_id=486;break;case"GIRATINA":case 487:m.pokemon_id=487;break;case"CRESSELIA":case 488:m.pokemon_id=488;break;case"PHIONE":case 489:m.pokemon_id=489;break;case"MANAPHY":case 490:m.pokemon_id=490;break;case"DARKRAI":case 491:m.pokemon_id=491;break;case"SHAYMIN":case 492:m.pokemon_id=492;break;case"ARCEUS":case 493:m.pokemon_id=493;break;case"MELTAN":case 808:m.pokemon_id=808;break;case"MELMETAL":case 809:m.pokemon_id=809;break}if(d.amount!=null){m.amount=d.amount|0}if(d.pokemon_display!=null){if(typeof d.pokemon_display!=="object")throw TypeError(".POGOProtos.Data.Logs.BuddyPokemonLogEntry.pokemon_display: object expected");m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.pokemon_display)}if(d.pokemon!=null){if($util.Long)(m.pokemon=$util.Long.fromValue(d.pokemon)).unsigned=false;else if(typeof d.pokemon==="string")m.pokemon=parseInt(d.pokemon,10);else if(typeof d.pokemon==="number")m.pokemon=d.pokemon;else if(typeof d.pokemon==="object")m.pokemon=new $util.LongBits(d.pokemon.low>>>0,d.pokemon.high>>>0).toNumber()}return m};BuddyPokemonLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.pokemon_id=o.enums===String?"MISSINGNO":0;d.amount=0;d.pokemon_display=null;if($util.Long){var n=new $util.Long(0,0,false);d.pokemon=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon=o.longs===String?"0":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.BuddyPokemonLogEntry.Result[m.result]:m.result}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){d.pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_id]:m.pokemon_id}if(m.amount!=null&&m.hasOwnProperty("amount")){d.amount=m.amount}if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display")){d.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.toObject(m.pokemon_display,o)}if(m.pokemon!=null&&m.hasOwnProperty("pokemon")){if(typeof m.pokemon==="number")d.pokemon=o.longs===String?String(m.pokemon):m.pokemon;else d.pokemon=o.longs===String?$util.Long.prototype.toString.call(m.pokemon):o.longs===Number?new $util.LongBits(m.pokemon.low>>>0,m.pokemon.high>>>0).toNumber():m.pokemon}return d};BuddyPokemonLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BuddyPokemonLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="CANDY_FOUND"]=1;return values}();return BuddyPokemonLogEntry}();Logs.CatchPokemonLogEntry=function(){function CatchPokemonLogEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CatchPokemonLogEntry.prototype.result=0;CatchPokemonLogEntry.prototype.pokemon_id=0;CatchPokemonLogEntry.prototype.combat_points=0;CatchPokemonLogEntry.prototype.pokemon_data_id=$util.Long?$util.Long.fromBits(0,0,false):0;CatchPokemonLogEntry.prototype.pokemon_display=null;CatchPokemonLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(16).int32(m.pokemon_id);if(m.combat_points!=null&&m.hasOwnProperty("combat_points"))w.uint32(24).int32(m.combat_points);if(m.pokemon_data_id!=null&&m.hasOwnProperty("pokemon_data_id"))w.uint32(33).fixed64(m.pokemon_data_id);if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display"))$root.POGOProtos.Data.PokemonDisplay.encode(m.pokemon_display,w.uint32(42).fork()).ldelim();return w};CatchPokemonLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.CatchPokemonLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.pokemon_id=r.int32();break;case 3:m.combat_points=r.int32();break;case 4:m.pokemon_data_id=r.fixed64();break;case 5:m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};CatchPokemonLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.CatchPokemonLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.CatchPokemonLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"POKEMON_CAPTURED":case 1:m.result=1;break;case"POKEMON_FLED":case 2:m.result=2;break;case"POKEMON_HATCHED":case 3:m.result=3;break}switch(d.pokemon_id){case"MISSINGNO":case 0:m.pokemon_id=0;break;case"BULBASAUR":case 1:m.pokemon_id=1;break;case"IVYSAUR":case 2:m.pokemon_id=2;break;case"VENUSAUR":case 3:m.pokemon_id=3;break;case"CHARMANDER":case 4:m.pokemon_id=4;break;case"CHARMELEON":case 5:m.pokemon_id=5;break;case"CHARIZARD":case 6:m.pokemon_id=6;break;case"SQUIRTLE":case 7:m.pokemon_id=7;break;case"WARTORTLE":case 8:m.pokemon_id=8;break;case"BLASTOISE":case 9:m.pokemon_id=9;break;case"CATERPIE":case 10:m.pokemon_id=10;break;case"METAPOD":case 11:m.pokemon_id=11;break;case"BUTTERFREE":case 12:m.pokemon_id=12;break;case"WEEDLE":case 13:m.pokemon_id=13;break;case"KAKUNA":case 14:m.pokemon_id=14;break;case"BEEDRILL":case 15:m.pokemon_id=15;break;case"PIDGEY":case 16:m.pokemon_id=16;break;case"PIDGEOTTO":case 17:m.pokemon_id=17;break;case"PIDGEOT":case 18:m.pokemon_id=18;break;case"RATTATA":case 19:m.pokemon_id=19;break;case"RATICATE":case 20:m.pokemon_id=20;break;case"SPEAROW":case 21:m.pokemon_id=21;break;case"FEAROW":case 22:m.pokemon_id=22;break;case"EKANS":case 23:m.pokemon_id=23;break;case"ARBOK":case 24:m.pokemon_id=24;break;case"PIKACHU":case 25:m.pokemon_id=25;break;case"RAICHU":case 26:m.pokemon_id=26;break;case"SANDSHREW":case 27:m.pokemon_id=27;break;case"SANDSLASH":case 28:m.pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_id=29;break;case"NIDORINA":case 30:m.pokemon_id=30;break;case"NIDOQUEEN":case 31:m.pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.pokemon_id=32;break;case"NIDORINO":case 33:m.pokemon_id=33;break;case"NIDOKING":case 34:m.pokemon_id=34;break;case"CLEFAIRY":case 35:m.pokemon_id=35;break;case"CLEFABLE":case 36:m.pokemon_id=36;break;case"VULPIX":case 37:m.pokemon_id=37;break;case"NINETALES":case 38:m.pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.pokemon_id=40;break;case"ZUBAT":case 41:m.pokemon_id=41;break;case"GOLBAT":case 42:m.pokemon_id=42;break;case"ODDISH":case 43:m.pokemon_id=43;break;case"GLOOM":case 44:m.pokemon_id=44;break;case"VILEPLUME":case 45:m.pokemon_id=45;break;case"PARAS":case 46:m.pokemon_id=46;break;case"PARASECT":case 47:m.pokemon_id=47;break;case"VENONAT":case 48:m.pokemon_id=48;break;case"VENOMOTH":case 49:m.pokemon_id=49;break;case"DIGLETT":case 50:m.pokemon_id=50;break;case"DUGTRIO":case 51:m.pokemon_id=51;break;case"MEOWTH":case 52:m.pokemon_id=52;break;case"PERSIAN":case 53:m.pokemon_id=53;break;case"PSYDUCK":case 54:m.pokemon_id=54;break;case"GOLDUCK":case 55:m.pokemon_id=55;break;case"MANKEY":case 56:m.pokemon_id=56;break;case"PRIMEAPE":case 57:m.pokemon_id=57;break;case"GROWLITHE":case 58:m.pokemon_id=58;break;case"ARCANINE":case 59:m.pokemon_id=59;break;case"POLIWAG":case 60:m.pokemon_id=60;break;case"POLIWHIRL":case 61:m.pokemon_id=61;break;case"POLIWRATH":case 62:m.pokemon_id=62;break;case"ABRA":case 63:m.pokemon_id=63;break;case"KADABRA":case 64:m.pokemon_id=64;break;case"ALAKAZAM":case 65:m.pokemon_id=65;break;case"MACHOP":case 66:m.pokemon_id=66;break;case"MACHOKE":case 67:m.pokemon_id=67;break;case"MACHAMP":case 68:m.pokemon_id=68;break;case"BELLSPROUT":case 69:m.pokemon_id=69;break;case"WEEPINBELL":case 70:m.pokemon_id=70;break;case"VICTREEBEL":case 71:m.pokemon_id=71;break;case"TENTACOOL":case 72:m.pokemon_id=72;break;case"TENTACRUEL":case 73:m.pokemon_id=73;break;case"GEODUDE":case 74:m.pokemon_id=74;break;case"GRAVELER":case 75:m.pokemon_id=75;break;case"GOLEM":case 76:m.pokemon_id=76;break;case"PONYTA":case 77:m.pokemon_id=77;break;case"RAPIDASH":case 78:m.pokemon_id=78;break;case"SLOWPOKE":case 79:m.pokemon_id=79;break;case"SLOWBRO":case 80:m.pokemon_id=80;break;case"MAGNEMITE":case 81:m.pokemon_id=81;break;case"MAGNETON":case 82:m.pokemon_id=82;break;case"FARFETCHD":case 83:m.pokemon_id=83;break;case"DODUO":case 84:m.pokemon_id=84;break;case"DODRIO":case 85:m.pokemon_id=85;break;case"SEEL":case 86:m.pokemon_id=86;break;case"DEWGONG":case 87:m.pokemon_id=87;break;case"GRIMER":case 88:m.pokemon_id=88;break;case"MUK":case 89:m.pokemon_id=89;break;case"SHELLDER":case 90:m.pokemon_id=90;break;case"CLOYSTER":case 91:m.pokemon_id=91;break;case"GASTLY":case 92:m.pokemon_id=92;break;case"HAUNTER":case 93:m.pokemon_id=93;break;case"GENGAR":case 94:m.pokemon_id=94;break;case"ONIX":case 95:m.pokemon_id=95;break;case"DROWZEE":case 96:m.pokemon_id=96;break;case"HYPNO":case 97:m.pokemon_id=97;break;case"KRABBY":case 98:m.pokemon_id=98;break;case"KINGLER":case 99:m.pokemon_id=99;break;case"VOLTORB":case 100:m.pokemon_id=100;break;case"ELECTRODE":case 101:m.pokemon_id=101;break;case"EXEGGCUTE":case 102:m.pokemon_id=102;break;case"EXEGGUTOR":case 103:m.pokemon_id=103;break;case"CUBONE":case 104:m.pokemon_id=104;break;case"MAROWAK":case 105:m.pokemon_id=105;break;case"HITMONLEE":case 106:m.pokemon_id=106;break;case"HITMONCHAN":case 107:m.pokemon_id=107;break;case"LICKITUNG":case 108:m.pokemon_id=108;break;case"KOFFING":case 109:m.pokemon_id=109;break;case"WEEZING":case 110:m.pokemon_id=110;break;case"RHYHORN":case 111:m.pokemon_id=111;break;case"RHYDON":case 112:m.pokemon_id=112;break;case"CHANSEY":case 113:m.pokemon_id=113;break;case"TANGELA":case 114:m.pokemon_id=114;break;case"KANGASKHAN":case 115:m.pokemon_id=115;break;case"HORSEA":case 116:m.pokemon_id=116;break;case"SEADRA":case 117:m.pokemon_id=117;break;case"GOLDEEN":case 118:m.pokemon_id=118;break;case"SEAKING":case 119:m.pokemon_id=119;break;case"STARYU":case 120:m.pokemon_id=120;break;case"STARMIE":case 121:m.pokemon_id=121;break;case"MR_MIME":case 122:m.pokemon_id=122;break;case"SCYTHER":case 123:m.pokemon_id=123;break;case"JYNX":case 124:m.pokemon_id=124;break;case"ELECTABUZZ":case 125:m.pokemon_id=125;break;case"MAGMAR":case 126:m.pokemon_id=126;break;case"PINSIR":case 127:m.pokemon_id=127;break;case"TAUROS":case 128:m.pokemon_id=128;break;case"MAGIKARP":case 129:m.pokemon_id=129;break;case"GYARADOS":case 130:m.pokemon_id=130;break;case"LAPRAS":case 131:m.pokemon_id=131;break;case"DITTO":case 132:m.pokemon_id=132;break;case"EEVEE":case 133:m.pokemon_id=133;break;case"VAPOREON":case 134:m.pokemon_id=134;break;case"JOLTEON":case 135:m.pokemon_id=135;break;case"FLAREON":case 136:m.pokemon_id=136;break;case"PORYGON":case 137:m.pokemon_id=137;break;case"OMANYTE":case 138:m.pokemon_id=138;break;case"OMASTAR":case 139:m.pokemon_id=139;break;case"KABUTO":case 140:m.pokemon_id=140;break;case"KABUTOPS":case 141:m.pokemon_id=141;break;case"AERODACTYL":case 142:m.pokemon_id=142;break;case"SNORLAX":case 143:m.pokemon_id=143;break;case"ARTICUNO":case 144:m.pokemon_id=144;break;case"ZAPDOS":case 145:m.pokemon_id=145;break;case"MOLTRES":case 146:m.pokemon_id=146;break;case"DRATINI":case 147:m.pokemon_id=147;break;case"DRAGONAIR":case 148:m.pokemon_id=148;break;case"DRAGONITE":case 149:m.pokemon_id=149;break;case"MEWTWO":case 150:m.pokemon_id=150;break;case"MEW":case 151:m.pokemon_id=151;break;case"CHIKORITA":case 152:m.pokemon_id=152;break;case"BAYLEEF":case 153:m.pokemon_id=153;break;case"MEGANIUM":case 154:m.pokemon_id=154;break;case"CYNDAQUIL":case 155:m.pokemon_id=155;break;case"QUILAVA":case 156:m.pokemon_id=156;break;case"TYPHLOSION":case 157:m.pokemon_id=157;break;case"TOTODILE":case 158:m.pokemon_id=158;break;case"CROCONAW":case 159:m.pokemon_id=159;break;case"FERALIGATR":case 160:m.pokemon_id=160;break;case"SENTRET":case 161:m.pokemon_id=161;break;case"FURRET":case 162:m.pokemon_id=162;break;case"HOOTHOOT":case 163:m.pokemon_id=163;break;case"NOCTOWL":case 164:m.pokemon_id=164;break;case"LEDYBA":case 165:m.pokemon_id=165;break;case"LEDIAN":case 166:m.pokemon_id=166;break;case"SPINARAK":case 167:m.pokemon_id=167;break;case"ARIADOS":case 168:m.pokemon_id=168;break;case"CROBAT":case 169:m.pokemon_id=169;break;case"CHINCHOU":case 170:m.pokemon_id=170;break;case"LANTURN":case 171:m.pokemon_id=171;break;case"PICHU":case 172:m.pokemon_id=172;break;case"CLEFFA":case 173:m.pokemon_id=173;break;case"IGGLYBUFF":case 174:m.pokemon_id=174;break;case"TOGEPI":case 175:m.pokemon_id=175;break;case"TOGETIC":case 176:m.pokemon_id=176;break;case"NATU":case 177:m.pokemon_id=177;break;case"XATU":case 178:m.pokemon_id=178;break;case"MAREEP":case 179:m.pokemon_id=179;break;case"FLAAFFY":case 180:m.pokemon_id=180;break;case"AMPHAROS":case 181:m.pokemon_id=181;break;case"BELLOSSOM":case 182:m.pokemon_id=182;break;case"MARILL":case 183:m.pokemon_id=183;break;case"AZUMARILL":case 184:m.pokemon_id=184;break;case"SUDOWOODO":case 185:m.pokemon_id=185;break;case"POLITOED":case 186:m.pokemon_id=186;break;case"HOPPIP":case 187:m.pokemon_id=187;break;case"SKIPLOOM":case 188:m.pokemon_id=188;break;case"JUMPLUFF":case 189:m.pokemon_id=189;break;case"AIPOM":case 190:m.pokemon_id=190;break;case"SUNKERN":case 191:m.pokemon_id=191;break;case"SUNFLORA":case 192:m.pokemon_id=192;break;case"YANMA":case 193:m.pokemon_id=193;break;case"WOOPER":case 194:m.pokemon_id=194;break;case"QUAGSIRE":case 195:m.pokemon_id=195;break;case"ESPEON":case 196:m.pokemon_id=196;break;case"UMBREON":case 197:m.pokemon_id=197;break;case"MURKROW":case 198:m.pokemon_id=198;break;case"SLOWKING":case 199:m.pokemon_id=199;break;case"MISDREAVUS":case 200:m.pokemon_id=200;break;case"UNOWN":case 201:m.pokemon_id=201;break;case"WOBBUFFET":case 202:m.pokemon_id=202;break;case"GIRAFARIG":case 203:m.pokemon_id=203;break;case"PINECO":case 204:m.pokemon_id=204;break;case"FORRETRESS":case 205:m.pokemon_id=205;break;case"DUNSPARCE":case 206:m.pokemon_id=206;break;case"GLIGAR":case 207:m.pokemon_id=207;break;case"STEELIX":case 208:m.pokemon_id=208;break;case"SNUBBULL":case 209:m.pokemon_id=209;break;case"GRANBULL":case 210:m.pokemon_id=210;break;case"QWILFISH":case 211:m.pokemon_id=211;break;case"SCIZOR":case 212:m.pokemon_id=212;break;case"SHUCKLE":case 213:m.pokemon_id=213;break;case"HERACROSS":case 214:m.pokemon_id=214;break;case"SNEASEL":case 215:m.pokemon_id=215;break;case"TEDDIURSA":case 216:m.pokemon_id=216;break;case"URSARING":case 217:m.pokemon_id=217;break;case"SLUGMA":case 218:m.pokemon_id=218;break;case"MAGCARGO":case 219:m.pokemon_id=219;break;case"SWINUB":case 220:m.pokemon_id=220;break;case"PILOSWINE":case 221:m.pokemon_id=221;break;case"CORSOLA":case 222:m.pokemon_id=222;break;case"REMORAID":case 223:m.pokemon_id=223;break;case"OCTILLERY":case 224:m.pokemon_id=224;break;case"DELIBIRD":case 225:m.pokemon_id=225;break;case"MANTINE":case 226:m.pokemon_id=226;break;case"SKARMORY":case 227:m.pokemon_id=227;break;case"HOUNDOUR":case 228:m.pokemon_id=228;break;case"HOUNDOOM":case 229:m.pokemon_id=229;break;case"KINGDRA":case 230:m.pokemon_id=230;break;case"PHANPY":case 231:m.pokemon_id=231;break;case"DONPHAN":case 232:m.pokemon_id=232;break;case"PORYGON2":case 233:m.pokemon_id=233;break;case"STANTLER":case 234:m.pokemon_id=234;break;case"SMEARGLE":case 235:m.pokemon_id=235;break;case"TYROGUE":case 236:m.pokemon_id=236;break;case"HITMONTOP":case 237:m.pokemon_id=237;break;case"SMOOCHUM":case 238:m.pokemon_id=238;break;case"ELEKID":case 239:m.pokemon_id=239;break;case"MAGBY":case 240:m.pokemon_id=240;break;case"MILTANK":case 241:m.pokemon_id=241;break;case"BLISSEY":case 242:m.pokemon_id=242;break;case"RAIKOU":case 243:m.pokemon_id=243;break;case"ENTEI":case 244:m.pokemon_id=244;break;case"SUICUNE":case 245:m.pokemon_id=245;break;case"LARVITAR":case 246:m.pokemon_id=246;break;case"PUPITAR":case 247:m.pokemon_id=247;break;case"TYRANITAR":case 248:m.pokemon_id=248;break;case"LUGIA":case 249:m.pokemon_id=249;break;case"HO_OH":case 250:m.pokemon_id=250;break;case"CELEBI":case 251:m.pokemon_id=251;break;case"TREECKO":case 252:m.pokemon_id=252;break;case"GROVYLE":case 253:m.pokemon_id=253;break;case"SCEPTILE":case 254:m.pokemon_id=254;break;case"TORCHIC":case 255:m.pokemon_id=255;break;case"COMBUSKEN":case 256:m.pokemon_id=256;break;case"BLAZIKEN":case 257:m.pokemon_id=257;break;case"MUDKIP":case 258:m.pokemon_id=258;break;case"MARSHTOMP":case 259:m.pokemon_id=259;break;case"SWAMPERT":case 260:m.pokemon_id=260;break;case"POOCHYENA":case 261:m.pokemon_id=261;break;case"MIGHTYENA":case 262:m.pokemon_id=262;break;case"ZIGZAGOON":case 263:m.pokemon_id=263;break;case"LINOONE":case 264:m.pokemon_id=264;break;case"WURMPLE":case 265:m.pokemon_id=265;break;case"SILCOON":case 266:m.pokemon_id=266;break;case"BEAUTIFLY":case 267:m.pokemon_id=267;break;case"CASCOON":case 268:m.pokemon_id=268;break;case"DUSTOX":case 269:m.pokemon_id=269;break;case"LOTAD":case 270:m.pokemon_id=270;break;case"LOMBRE":case 271:m.pokemon_id=271;break;case"LUDICOLO":case 272:m.pokemon_id=272;break;case"SEEDOT":case 273:m.pokemon_id=273;break;case"NUZLEAF":case 274:m.pokemon_id=274;break;case"SHIFTRY":case 275:m.pokemon_id=275;break;case"TAILLOW":case 276:m.pokemon_id=276;break;case"SWELLOW":case 277:m.pokemon_id=277;break;case"WINGULL":case 278:m.pokemon_id=278;break;case"PELIPPER":case 279:m.pokemon_id=279;break;case"RALTS":case 280:m.pokemon_id=280;break;case"KIRLIA":case 281:m.pokemon_id=281;break;case"GARDEVOIR":case 282:m.pokemon_id=282;break;case"SURSKIT":case 283:m.pokemon_id=283;break;case"MASQUERAIN":case 284:m.pokemon_id=284;break;case"SHROOMISH":case 285:m.pokemon_id=285;break;case"BRELOOM":case 286:m.pokemon_id=286;break;case"SLAKOTH":case 287:m.pokemon_id=287;break;case"VIGOROTH":case 288:m.pokemon_id=288;break;case"SLAKING":case 289:m.pokemon_id=289;break;case"NINCADA":case 290:m.pokemon_id=290;break;case"NINJASK":case 291:m.pokemon_id=291;break;case"SHEDINJA":case 292:m.pokemon_id=292;break;case"WHISMUR":case 293:m.pokemon_id=293;break;case"LOUDRED":case 294:m.pokemon_id=294;break;case"EXPLOUD":case 295:m.pokemon_id=295;break;case"MAKUHITA":case 296:m.pokemon_id=296;break;case"HARIYAMA":case 297:m.pokemon_id=297;break;case"AZURILL":case 298:m.pokemon_id=298;break;case"NOSEPASS":case 299:m.pokemon_id=299;break;case"SKITTY":case 300:m.pokemon_id=300;break;case"DELCATTY":case 301:m.pokemon_id=301;break;case"SABLEYE":case 302:m.pokemon_id=302;break;case"MAWILE":case 303:m.pokemon_id=303;break;case"ARON":case 304:m.pokemon_id=304;break;case"LAIRON":case 305:m.pokemon_id=305;break;case"AGGRON":case 306:m.pokemon_id=306;break;case"MEDITITE":case 307:m.pokemon_id=307;break;case"MEDICHAM":case 308:m.pokemon_id=308;break;case"ELECTRIKE":case 309:m.pokemon_id=309;break;case"MANECTRIC":case 310:m.pokemon_id=310;break;case"PLUSLE":case 311:m.pokemon_id=311;break;case"MINUN":case 312:m.pokemon_id=312;break;case"VOLBEAT":case 313:m.pokemon_id=313;break;case"ILLUMISE":case 314:m.pokemon_id=314;break;case"ROSELIA":case 315:m.pokemon_id=315;break;case"GULPIN":case 316:m.pokemon_id=316;break;case"SWALOT":case 317:m.pokemon_id=317;break;case"CARVANHA":case 318:m.pokemon_id=318;break;case"SHARPEDO":case 319:m.pokemon_id=319;break;case"WAILMER":case 320:m.pokemon_id=320;break;case"WAILORD":case 321:m.pokemon_id=321;break;case"NUMEL":case 322:m.pokemon_id=322;break;case"CAMERUPT":case 323:m.pokemon_id=323;break;case"TORKOAL":case 324:m.pokemon_id=324;break;case"SPOINK":case 325:m.pokemon_id=325;break;case"GRUMPIG":case 326:m.pokemon_id=326;break;case"SPINDA":case 327:m.pokemon_id=327;break;case"TRAPINCH":case 328:m.pokemon_id=328;break;case"VIBRAVA":case 329:m.pokemon_id=329;break;case"FLYGON":case 330:m.pokemon_id=330;break;case"CACNEA":case 331:m.pokemon_id=331;break;case"CACTURNE":case 332:m.pokemon_id=332;break;case"SWABLU":case 333:m.pokemon_id=333;break;case"ALTARIA":case 334:m.pokemon_id=334;break;case"ZANGOOSE":case 335:m.pokemon_id=335;break;case"SEVIPER":case 336:m.pokemon_id=336;break;case"LUNATONE":case 337:m.pokemon_id=337;break;case"SOLROCK":case 338:m.pokemon_id=338;break;case"BARBOACH":case 339:m.pokemon_id=339;break;case"WHISCASH":case 340:m.pokemon_id=340;break;case"CORPHISH":case 341:m.pokemon_id=341;break;case"CRAWDAUNT":case 342:m.pokemon_id=342;break;case"BALTOY":case 343:m.pokemon_id=343;break;case"CLAYDOL":case 344:m.pokemon_id=344;break;case"LILEEP":case 345:m.pokemon_id=345;break;case"CRADILY":case 346:m.pokemon_id=346;break;case"ANORITH":case 347:m.pokemon_id=347;break;case"ARMALDO":case 348:m.pokemon_id=348;break;case"FEEBAS":case 349:m.pokemon_id=349;break;case"MILOTIC":case 350:m.pokemon_id=350;break;case"CASTFORM":case 351:m.pokemon_id=351;break;case"KECLEON":case 352:m.pokemon_id=352;break;case"SHUPPET":case 353:m.pokemon_id=353;break;case"BANETTE":case 354:m.pokemon_id=354;break;case"DUSKULL":case 355:m.pokemon_id=355;break;case"DUSCLOPS":case 356:m.pokemon_id=356;break;case"TROPIUS":case 357:m.pokemon_id=357;break;case"CHIMECHO":case 358:m.pokemon_id=358;break;case"ABSOL":case 359:m.pokemon_id=359;break;case"WYNAUT":case 360:m.pokemon_id=360;break;case"SNORUNT":case 361:m.pokemon_id=361;break;case"GLALIE":case 362:m.pokemon_id=362;break;case"SPHEAL":case 363:m.pokemon_id=363;break;case"SEALEO":case 364:m.pokemon_id=364;break;case"WALREIN":case 365:m.pokemon_id=365;break;case"CLAMPERL":case 366:m.pokemon_id=366;break;case"HUNTAIL":case 367:m.pokemon_id=367;break;case"GOREBYSS":case 368:m.pokemon_id=368;break;case"RELICANTH":case 369:m.pokemon_id=369;break;case"LUVDISC":case 370:m.pokemon_id=370;break;case"BAGON":case 371:m.pokemon_id=371;break;case"SHELGON":case 372:m.pokemon_id=372;break;case"SALAMENCE":case 373:m.pokemon_id=373;break;case"BELDUM":case 374:m.pokemon_id=374;break;case"METANG":case 375:m.pokemon_id=375;break;case"METAGROSS":case 376:m.pokemon_id=376;break;case"REGIROCK":case 377:m.pokemon_id=377;break;case"REGICE":case 378:m.pokemon_id=378;break;case"REGISTEEL":case 379:m.pokemon_id=379;break;case"LATIAS":case 380:m.pokemon_id=380;break;case"LATIOS":case 381:m.pokemon_id=381;break;case"KYOGRE":case 382:m.pokemon_id=382;break;case"GROUDON":case 383:m.pokemon_id=383;break;case"RAYQUAZA":case 384:m.pokemon_id=384;break;case"JIRACHI":case 385:m.pokemon_id=385;break;case"DEOXYS":case 386:m.pokemon_id=386;break;case"TURTWIG":case 387:m.pokemon_id=387;break;case"GROTLE":case 388:m.pokemon_id=388;break;case"TORTERRA":case 389:m.pokemon_id=389;break;case"CHIMCHAR":case 390:m.pokemon_id=390;break;case"MONFERNO":case 391:m.pokemon_id=391;break;case"INFERNAPE":case 392:m.pokemon_id=392;break;case"PIPLUP":case 393:m.pokemon_id=393;break;case"PRINPLUP":case 394:m.pokemon_id=394;break;case"EMPOLEON":case 395:m.pokemon_id=395;break;case"STARLY":case 396:m.pokemon_id=396;break;case"STARAVIA":case 397:m.pokemon_id=397;break;case"STARAPTOR":case 398:m.pokemon_id=398;break;case"BIDOOF":case 399:m.pokemon_id=399;break;case"BIBAREL":case 400:m.pokemon_id=400;break;case"KRICKETOT":case 401:m.pokemon_id=401;break;case"KRICKETUNE":case 402:m.pokemon_id=402;break;case"SHINX":case 403:m.pokemon_id=403;break;case"LUXIO":case 404:m.pokemon_id=404;break;case"LUXRAY":case 405:m.pokemon_id=405;break;case"BUDEW":case 406:m.pokemon_id=406;break;case"ROSERADE":case 407:m.pokemon_id=407;break;case"CRANIDOS":case 408:m.pokemon_id=408;break;case"RAMPARDOS":case 409:m.pokemon_id=409;break;case"SHIELDON":case 410:m.pokemon_id=410;break;case"BASTIODON":case 411:m.pokemon_id=411;break;case"BURMY":case 412:m.pokemon_id=412;break;case"WORMADAM":case 413:m.pokemon_id=413;break;case"MOTHIM":case 414:m.pokemon_id=414;break;case"COMBEE":case 415:m.pokemon_id=415;break;case"VESPIQUEN":case 416:m.pokemon_id=416;break;case"PACHIRISU":case 417:m.pokemon_id=417;break;case"BUIZEL":case 418:m.pokemon_id=418;break;case"FLOATZEL":case 419:m.pokemon_id=419;break;case"CHERUBI":case 420:m.pokemon_id=420;break;case"CHERRIM":case 421:m.pokemon_id=421;break;case"SHELLOS":case 422:m.pokemon_id=422;break;case"GASTRODON":case 423:m.pokemon_id=423;break;case"AMBIPOM":case 424:m.pokemon_id=424;break;case"DRIFLOON":case 425:m.pokemon_id=425;break;case"DRIFBLIM":case 426:m.pokemon_id=426;break;case"BUNEARY":case 427:m.pokemon_id=427;break;case"LOPUNNY":case 428:m.pokemon_id=428;break;case"MISMAGIUS":case 429:m.pokemon_id=429;break;case"HONCHKROW":case 430:m.pokemon_id=430;break;case"GLAMEOW":case 431:m.pokemon_id=431;break;case"PURUGLY":case 432:m.pokemon_id=432;break;case"CHINGLING":case 433:m.pokemon_id=433;break;case"STUNKY":case 434:m.pokemon_id=434;break;case"SKUNTANK":case 435:m.pokemon_id=435;break;case"BRONZOR":case 436:m.pokemon_id=436;break;case"BRONZONG":case 437:m.pokemon_id=437;break;case"BONSLY":case 438:m.pokemon_id=438;break;case"MIME_JR":case 439:m.pokemon_id=439;break;case"HAPPINY":case 440:m.pokemon_id=440;break;case"CHATOT":case 441:m.pokemon_id=441;break;case"SPIRITOMB":case 442:m.pokemon_id=442;break;case"GIBLE":case 443:m.pokemon_id=443;break;case"GABITE":case 444:m.pokemon_id=444;break;case"GARCHOMP":case 445:m.pokemon_id=445;break;case"MUNCHLAX":case 446:m.pokemon_id=446;break;case"RIOLU":case 447:m.pokemon_id=447;break;case"LUCARIO":case 448:m.pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.pokemon_id=449;break;case"HIPPOWDON":case 450:m.pokemon_id=450;break;case"SKORUPI":case 451:m.pokemon_id=451;break;case"DRAPION":case 452:m.pokemon_id=452;break;case"CROAGUNK":case 453:m.pokemon_id=453;break;case"TOXICROAK":case 454:m.pokemon_id=454;break;case"CARNIVINE":case 455:m.pokemon_id=455;break;case"FINNEON":case 456:m.pokemon_id=456;break;case"LUMINEON":case 457:m.pokemon_id=457;break;case"MANTYKE":case 458:m.pokemon_id=458;break;case"SNOVER":case 459:m.pokemon_id=459;break;case"ABOMASNOW":case 460:m.pokemon_id=460;break;case"WEAVILE":case 461:m.pokemon_id=461;break;case"MAGNEZONE":case 462:m.pokemon_id=462;break;case"LICKILICKY":case 463:m.pokemon_id=463;break;case"RHYPERIOR":case 464:m.pokemon_id=464;break;case"TANGROWTH":case 465:m.pokemon_id=465;break;case"ELECTIVIRE":case 466:m.pokemon_id=466;break;case"MAGMORTAR":case 467:m.pokemon_id=467;break;case"TOGEKISS":case 468:m.pokemon_id=468;break;case"YANMEGA":case 469:m.pokemon_id=469;break;case"LEAFEON":case 470:m.pokemon_id=470;break;case"GLACEON":case 471:m.pokemon_id=471;break;case"GLISCOR":case 472:m.pokemon_id=472;break;case"MAMOSWINE":case 473:m.pokemon_id=473;break;case"PORYGON_Z":case 474:m.pokemon_id=474;break;case"GALLADE":case 475:m.pokemon_id=475;break;case"PROBOPASS":case 476:m.pokemon_id=476;break;case"DUSKNOIR":case 477:m.pokemon_id=477;break;case"FROSLASS":case 478:m.pokemon_id=478;break;case"ROTOM":case 479:m.pokemon_id=479;break;case"UXIE":case 480:m.pokemon_id=480;break;case"MESPRIT":case 481:m.pokemon_id=481;break;case"AZELF":case 482:m.pokemon_id=482;break;case"DIALGA":case 483:m.pokemon_id=483;break;case"PALKIA":case 484:m.pokemon_id=484;break;case"HEATRAN":case 485:m.pokemon_id=485;break;case"REGIGIGAS":case 486:m.pokemon_id=486;break;case"GIRATINA":case 487:m.pokemon_id=487;break;case"CRESSELIA":case 488:m.pokemon_id=488;break;case"PHIONE":case 489:m.pokemon_id=489;break;case"MANAPHY":case 490:m.pokemon_id=490;break;case"DARKRAI":case 491:m.pokemon_id=491;break;case"SHAYMIN":case 492:m.pokemon_id=492;break;case"ARCEUS":case 493:m.pokemon_id=493;break;case"MELTAN":case 808:m.pokemon_id=808;break;case"MELMETAL":case 809:m.pokemon_id=809;break}if(d.combat_points!=null){m.combat_points=d.combat_points|0}if(d.pokemon_data_id!=null){if($util.Long)(m.pokemon_data_id=$util.Long.fromValue(d.pokemon_data_id)).unsigned=false;else if(typeof d.pokemon_data_id==="string")m.pokemon_data_id=parseInt(d.pokemon_data_id,10);else if(typeof d.pokemon_data_id==="number")m.pokemon_data_id=d.pokemon_data_id;else if(typeof d.pokemon_data_id==="object")m.pokemon_data_id=new $util.LongBits(d.pokemon_data_id.low>>>0,d.pokemon_data_id.high>>>0).toNumber()}if(d.pokemon_display!=null){if(typeof d.pokemon_display!=="object")throw TypeError(".POGOProtos.Data.Logs.CatchPokemonLogEntry.pokemon_display: object expected");m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.pokemon_display)}return m};CatchPokemonLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.pokemon_id=o.enums===String?"MISSINGNO":0;d.combat_points=0;if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_data_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_data_id=o.longs===String?"0":0;d.pokemon_display=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.CatchPokemonLogEntry.Result[m.result]:m.result}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){d.pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_id]:m.pokemon_id}if(m.combat_points!=null&&m.hasOwnProperty("combat_points")){d.combat_points=m.combat_points}if(m.pokemon_data_id!=null&&m.hasOwnProperty("pokemon_data_id")){if(typeof m.pokemon_data_id==="number")d.pokemon_data_id=o.longs===String?String(m.pokemon_data_id):m.pokemon_data_id;else d.pokemon_data_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_data_id):o.longs===Number?new $util.LongBits(m.pokemon_data_id.low>>>0,m.pokemon_data_id.high>>>0).toNumber():m.pokemon_data_id}if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display")){d.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.toObject(m.pokemon_display,o)}return d};CatchPokemonLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CatchPokemonLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="POKEMON_CAPTURED"]=1;values[valuesById[2]="POKEMON_FLED"]=2;values[valuesById[3]="POKEMON_HATCHED"]=3;return values}();return CatchPokemonLogEntry}();Logs.CombatLogEntry=function(){function CombatLogEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatLogEntry.prototype.result=0;CombatLogEntry.prototype.finish_state=0;CombatLogEntry.prototype.rewards=null;CombatLogEntry.prototype.opponent="";CombatLogEntry.prototype.combat_league_template_id="";CombatLogEntry.prototype.npc_template_id="";CombatLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.finish_state!=null&&m.hasOwnProperty("finish_state"))w.uint32(16).int32(m.finish_state);if(m.rewards!=null&&m.hasOwnProperty("rewards"))$root.POGOProtos.Inventory.Loot.encode(m.rewards,w.uint32(26).fork()).ldelim();if(m.opponent!=null&&m.hasOwnProperty("opponent"))w.uint32(34).string(m.opponent);if(m.combat_league_template_id!=null&&m.hasOwnProperty("combat_league_template_id"))w.uint32(42).string(m.combat_league_template_id);if(m.npc_template_id!=null&&m.hasOwnProperty("npc_template_id"))w.uint32(50).string(m.npc_template_id);return w};CombatLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.CombatLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.finish_state=r.int32();break;case 3:m.rewards=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;case 4:m.opponent=r.string();break;case 5:m.combat_league_template_id=r.string();break;case 6:m.npc_template_id=r.string();break;default:r.skipType(t&7);break}}return m};CombatLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.CombatLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.CombatLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}switch(d.finish_state){case"WINNER":case 0:m.finish_state=0;break;case"LOSER":case 1:m.finish_state=1;break;case"DRAW":case 2:m.finish_state=2;break}if(d.rewards!=null){if(typeof d.rewards!=="object")throw TypeError(".POGOProtos.Data.Logs.CombatLogEntry.rewards: object expected");m.rewards=$root.POGOProtos.Inventory.Loot.fromObject(d.rewards)}if(d.opponent!=null){m.opponent=String(d.opponent)}if(d.combat_league_template_id!=null){m.combat_league_template_id=String(d.combat_league_template_id)}if(d.npc_template_id!=null){m.npc_template_id=String(d.npc_template_id)}return m};CombatLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.finish_state=o.enums===String?"WINNER":0;d.rewards=null;d.opponent="";d.combat_league_template_id="";d.npc_template_id=""}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.CombatLogEntry.Result[m.result]:m.result}if(m.finish_state!=null&&m.hasOwnProperty("finish_state")){d.finish_state=o.enums===String?$root.POGOProtos.Enums.CombatPlayerFinishState[m.finish_state]:m.finish_state}if(m.rewards!=null&&m.hasOwnProperty("rewards")){d.rewards=$root.POGOProtos.Inventory.Loot.toObject(m.rewards,o)}if(m.opponent!=null&&m.hasOwnProperty("opponent")){d.opponent=m.opponent}if(m.combat_league_template_id!=null&&m.hasOwnProperty("combat_league_template_id")){d.combat_league_template_id=m.combat_league_template_id}if(m.npc_template_id!=null&&m.hasOwnProperty("npc_template_id")){d.npc_template_id=m.npc_template_id}return d};CombatLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CombatLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return CombatLogEntry}();Logs.CompleteQuestLogEntry=function(){function CompleteQuestLogEntry(p){this.stamp=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CompleteQuestLogEntry.prototype.result=0;CompleteQuestLogEntry.prototype.quest=null;CompleteQuestLogEntry.prototype.stamp=$util.emptyArray;CompleteQuestLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.quest!=null&&m.hasOwnProperty("quest"))$root.POGOProtos.Data.Quests.ClientQuest.encode(m.quest,w.uint32(18).fork()).ldelim();if(m.stamp!=null&&m.stamp.length){for(var i=0;i<m.stamp.length;++i)$root.POGOProtos.Data.Quests.QuestStamp.encode(m.stamp[i],w.uint32(26).fork()).ldelim()}return w};CompleteQuestLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.CompleteQuestLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.quest=$root.POGOProtos.Data.Quests.ClientQuest.decode(r,r.uint32());break;case 3:if(!(m.stamp&&m.stamp.length))m.stamp=[];m.stamp.push($root.POGOProtos.Data.Quests.QuestStamp.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};CompleteQuestLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.CompleteQuestLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.CompleteQuestLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.quest!=null){if(typeof d.quest!=="object")throw TypeError(".POGOProtos.Data.Logs.CompleteQuestLogEntry.quest: object expected");m.quest=$root.POGOProtos.Data.Quests.ClientQuest.fromObject(d.quest)}if(d.stamp){if(!Array.isArray(d.stamp))throw TypeError(".POGOProtos.Data.Logs.CompleteQuestLogEntry.stamp: array expected");m.stamp=[];for(var i=0;i<d.stamp.length;++i){if(typeof d.stamp[i]!=="object")throw TypeError(".POGOProtos.Data.Logs.CompleteQuestLogEntry.stamp: object expected");m.stamp[i]=$root.POGOProtos.Data.Quests.QuestStamp.fromObject(d.stamp[i])}}return m};CompleteQuestLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.stamp=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0;d.quest=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.CompleteQuestLogEntry.Result[m.result]:m.result}if(m.quest!=null&&m.hasOwnProperty("quest")){d.quest=$root.POGOProtos.Data.Quests.ClientQuest.toObject(m.quest,o)}if(m.stamp&&m.stamp.length){d.stamp=[];for(var j=0;j<m.stamp.length;++j){d.stamp[j]=$root.POGOProtos.Data.Quests.QuestStamp.toObject(m.stamp[j],o)}}return d};CompleteQuestLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CompleteQuestLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return CompleteQuestLogEntry}();Logs.CompleteQuestPokemonEncounterLogEntry=function(){function CompleteQuestPokemonEncounterLogEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CompleteQuestPokemonEncounterLogEntry.prototype.result=0;CompleteQuestPokemonEncounterLogEntry.prototype.pokedex_number=0;CompleteQuestPokemonEncounterLogEntry.prototype.combat_points=0;CompleteQuestPokemonEncounterLogEntry.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;CompleteQuestPokemonEncounterLogEntry.prototype.pokemon_display=null;CompleteQuestPokemonEncounterLogEntry.prototype.encounter_type=0;CompleteQuestPokemonEncounterLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.pokedex_number!=null&&m.hasOwnProperty("pokedex_number"))w.uint32(16).int32(m.pokedex_number);if(m.combat_points!=null&&m.hasOwnProperty("combat_points"))w.uint32(24).int32(m.combat_points);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(33).fixed64(m.pokemon_id);if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display"))$root.POGOProtos.Data.PokemonDisplay.encode(m.pokemon_display,w.uint32(42).fork()).ldelim();if(m.encounter_type!=null&&m.hasOwnProperty("encounter_type"))w.uint32(48).int32(m.encounter_type);return w};CompleteQuestPokemonEncounterLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.CompleteQuestPokemonEncounterLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.pokedex_number=r.int32();break;case 3:m.combat_points=r.int32();break;case 4:m.pokemon_id=r.fixed64();break;case 5:m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;case 6:m.encounter_type=r.int32();break;default:r.skipType(t&7);break}}return m};CompleteQuestPokemonEncounterLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.CompleteQuestPokemonEncounterLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.CompleteQuestPokemonEncounterLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"POKEMON_CAPTURED":case 1:m.result=1;break;case"POKEMON_FLED":case 2:m.result=2;break}if(d.pokedex_number!=null){m.pokedex_number=d.pokedex_number|0}if(d.combat_points!=null){m.combat_points=d.combat_points|0}if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}if(d.pokemon_display!=null){if(typeof d.pokemon_display!=="object")throw TypeError(".POGOProtos.Data.Logs.CompleteQuestPokemonEncounterLogEntry.pokemon_display: object expected");m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.pokemon_display)}switch(d.encounter_type){case"SPAWN_POINT":case 0:m.encounter_type=0;break;case"INCENSE":case 1:m.encounter_type=1;break;case"DISK":case 2:m.encounter_type=2;break;case"POST_RAID":case 3:m.encounter_type=3;break;case"STORY_QUEST":case 4:m.encounter_type=4;break;case"QUEST_STAMP_CARD":case 5:m.encounter_type=5;break;case"CHALLENGE_QUEST":case 6:m.encounter_type=6;break}return m};CompleteQuestPokemonEncounterLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.pokedex_number=0;d.combat_points=0;if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0;d.pokemon_display=null;d.encounter_type=o.enums===String?"SPAWN_POINT":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.CompleteQuestPokemonEncounterLogEntry.Result[m.result]:m.result}if(m.pokedex_number!=null&&m.hasOwnProperty("pokedex_number")){d.pokedex_number=m.pokedex_number}if(m.combat_points!=null&&m.hasOwnProperty("combat_points")){d.combat_points=m.combat_points}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display")){d.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.toObject(m.pokemon_display,o)}if(m.encounter_type!=null&&m.hasOwnProperty("encounter_type")){d.encounter_type=o.enums===String?$root.POGOProtos.Enums.EncounterType[m.encounter_type]:m.encounter_type}return d};CompleteQuestPokemonEncounterLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CompleteQuestPokemonEncounterLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="POKEMON_CAPTURED"]=1;values[valuesById[2]="POKEMON_FLED"]=2;return values}();return CompleteQuestPokemonEncounterLogEntry}();Logs.CompleteQuestStampCardLogEntry=function(){function CompleteQuestStampCardLogEntry(p){this.reward=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CompleteQuestStampCardLogEntry.prototype.result=0;CompleteQuestStampCardLogEntry.prototype.reward=$util.emptyArray;CompleteQuestStampCardLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.reward!=null&&m.reward.length){for(var i=0;i<m.reward.length;++i)$root.POGOProtos.Data.Quests.QuestReward.encode(m.reward[i],w.uint32(18).fork()).ldelim()}return w};CompleteQuestStampCardLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.CompleteQuestStampCardLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.reward&&m.reward.length))m.reward=[];m.reward.push($root.POGOProtos.Data.Quests.QuestReward.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};CompleteQuestStampCardLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.CompleteQuestStampCardLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.CompleteQuestStampCardLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.reward){if(!Array.isArray(d.reward))throw TypeError(".POGOProtos.Data.Logs.CompleteQuestStampCardLogEntry.reward: array expected");m.reward=[];for(var i=0;i<d.reward.length;++i){if(typeof d.reward[i]!=="object")throw TypeError(".POGOProtos.Data.Logs.CompleteQuestStampCardLogEntry.reward: object expected");m.reward[i]=$root.POGOProtos.Data.Quests.QuestReward.fromObject(d.reward[i])}}return m};CompleteQuestStampCardLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.reward=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.CompleteQuestStampCardLogEntry.Result[m.result]:m.result}if(m.reward&&m.reward.length){d.reward=[];for(var j=0;j<m.reward.length;++j){d.reward[j]=$root.POGOProtos.Data.Quests.QuestReward.toObject(m.reward[j],o)}}return d};CompleteQuestStampCardLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CompleteQuestStampCardLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return CompleteQuestStampCardLogEntry}();Logs.DeclineExRaidPassLogEntry=function(){function DeclineExRaidPassLogEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DeclineExRaidPassLogEntry.prototype.result=0;DeclineExRaidPassLogEntry.prototype.friend_codename="";DeclineExRaidPassLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.friend_codename!=null&&m.hasOwnProperty("friend_codename"))w.uint32(18).string(m.friend_codename);return w};DeclineExRaidPassLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.DeclineExRaidPassLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.friend_codename=r.string();break;default:r.skipType(t&7);break}}return m};DeclineExRaidPassLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.DeclineExRaidPassLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.DeclineExRaidPassLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.friend_codename!=null){m.friend_codename=String(d.friend_codename)}return m};DeclineExRaidPassLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.friend_codename=""}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.DeclineExRaidPassLogEntry.Result[m.result]:m.result}if(m.friend_codename!=null&&m.hasOwnProperty("friend_codename")){d.friend_codename=m.friend_codename}return d};DeclineExRaidPassLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeclineExRaidPassLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return DeclineExRaidPassLogEntry}();Logs.FitnessRewardsLogEntry=function(){function FitnessRewardsLogEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FitnessRewardsLogEntry.prototype.result=0;FitnessRewardsLogEntry.prototype.rewards=null;FitnessRewardsLogEntry.prototype.distance_walked_km=0;FitnessRewardsLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.rewards!=null&&m.hasOwnProperty("rewards"))$root.POGOProtos.Inventory.Loot.encode(m.rewards,w.uint32(18).fork()).ldelim();if(m.distance_walked_km!=null&&m.hasOwnProperty("distance_walked_km"))w.uint32(25).double(m.distance_walked_km);return w};FitnessRewardsLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.FitnessRewardsLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.rewards=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;case 3:m.distance_walked_km=r.double();break;default:r.skipType(t&7);break}}return m};FitnessRewardsLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.FitnessRewardsLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.FitnessRewardsLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.rewards!=null){if(typeof d.rewards!=="object")throw TypeError(".POGOProtos.Data.Logs.FitnessRewardsLogEntry.rewards: object expected");m.rewards=$root.POGOProtos.Inventory.Loot.fromObject(d.rewards)}if(d.distance_walked_km!=null){m.distance_walked_km=Number(d.distance_walked_km)}return m};FitnessRewardsLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.rewards=null;d.distance_walked_km=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.FitnessRewardsLogEntry.Result[m.result]:m.result}if(m.rewards!=null&&m.hasOwnProperty("rewards")){d.rewards=$root.POGOProtos.Inventory.Loot.toObject(m.rewards,o)}if(m.distance_walked_km!=null&&m.hasOwnProperty("distance_walked_km")){d.distance_walked_km=o.json&&!isFinite(m.distance_walked_km)?String(m.distance_walked_km):m.distance_walked_km}return d};FitnessRewardsLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FitnessRewardsLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return FitnessRewardsLogEntry}();Logs.FortSearchLogEntry=function(){function FortSearchLogEntry(p){this.items=[];this.pokemon_eggs=[];this.awarded_items=[];this.bonus_items=[];this.team_bonus_items=[];this.gift_boxes=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FortSearchLogEntry.prototype.result=0;FortSearchLogEntry.prototype.fort_id="";FortSearchLogEntry.prototype.items=$util.emptyArray;FortSearchLogEntry.prototype.eggs=0;FortSearchLogEntry.prototype.pokemon_eggs=$util.emptyArray;FortSearchLogEntry.prototype.fort_type=0;FortSearchLogEntry.prototype.awarded_items=$util.emptyArray;FortSearchLogEntry.prototype.bonus_items=$util.emptyArray;FortSearchLogEntry.prototype.team_bonus_items=$util.emptyArray;FortSearchLogEntry.prototype.gift_boxes=$util.emptyArray;FortSearchLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(18).string(m.fort_id);if(m.items!=null&&m.items.length){for(var i=0;i<m.items.length;++i)$root.POGOProtos.Inventory.Item.ItemData.encode(m.items[i],w.uint32(26).fork()).ldelim()}if(m.eggs!=null&&m.hasOwnProperty("eggs"))w.uint32(32).int32(m.eggs);if(m.pokemon_eggs!=null&&m.pokemon_eggs.length){for(var i=0;i<m.pokemon_eggs.length;++i)$root.POGOProtos.Data.PokemonData.encode(m.pokemon_eggs[i],w.uint32(42).fork()).ldelim()}if(m.fort_type!=null&&m.hasOwnProperty("fort_type"))w.uint32(48).int32(m.fort_type);if(m.awarded_items!=null&&m.awarded_items.length){for(var i=0;i<m.awarded_items.length;++i)$root.POGOProtos.Inventory.Item.ItemData.encode(m.awarded_items[i],w.uint32(58).fork()).ldelim()}if(m.bonus_items!=null&&m.bonus_items.length){for(var i=0;i<m.bonus_items.length;++i)$root.POGOProtos.Inventory.Item.ItemData.encode(m.bonus_items[i],w.uint32(66).fork()).ldelim()}if(m.team_bonus_items!=null&&m.team_bonus_items.length){for(var i=0;i<m.team_bonus_items.length;++i)$root.POGOProtos.Inventory.Item.ItemData.encode(m.team_bonus_items[i],w.uint32(74).fork()).ldelim()}if(m.gift_boxes!=null&&m.gift_boxes.length){for(var i=0;i<m.gift_boxes.length;++i)$root.POGOProtos.Data.Gift.GiftBox.encode(m.gift_boxes[i],w.uint32(82).fork()).ldelim()}return w};FortSearchLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.FortSearchLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.fort_id=r.string();break;case 3:if(!(m.items&&m.items.length))m.items=[];m.items.push($root.POGOProtos.Inventory.Item.ItemData.decode(r,r.uint32()));break;case 4:m.eggs=r.int32();break;case 5:if(!(m.pokemon_eggs&&m.pokemon_eggs.length))m.pokemon_eggs=[];m.pokemon_eggs.push($root.POGOProtos.Data.PokemonData.decode(r,r.uint32()));break;case 6:m.fort_type=r.int32();break;case 7:if(!(m.awarded_items&&m.awarded_items.length))m.awarded_items=[];m.awarded_items.push($root.POGOProtos.Inventory.Item.ItemData.decode(r,r.uint32()));break;case 8:if(!(m.bonus_items&&m.bonus_items.length))m.bonus_items=[];m.bonus_items.push($root.POGOProtos.Inventory.Item.ItemData.decode(r,r.uint32()));break;case 9:if(!(m.team_bonus_items&&m.team_bonus_items.length))m.team_bonus_items=[];m.team_bonus_items.push($root.POGOProtos.Inventory.Item.ItemData.decode(r,r.uint32()));break;case 10:if(!(m.gift_boxes&&m.gift_boxes.length))m.gift_boxes=[];m.gift_boxes.push($root.POGOProtos.Data.Gift.GiftBox.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};FortSearchLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.FortSearchLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.FortSearchLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.items){if(!Array.isArray(d.items))throw TypeError(".POGOProtos.Data.Logs.FortSearchLogEntry.items: array expected");m.items=[];for(var i=0;i<d.items.length;++i){if(typeof d.items[i]!=="object")throw TypeError(".POGOProtos.Data.Logs.FortSearchLogEntry.items: object expected");m.items[i]=$root.POGOProtos.Inventory.Item.ItemData.fromObject(d.items[i])}}if(d.eggs!=null){m.eggs=d.eggs|0}if(d.pokemon_eggs){if(!Array.isArray(d.pokemon_eggs))throw TypeError(".POGOProtos.Data.Logs.FortSearchLogEntry.pokemon_eggs: array expected");m.pokemon_eggs=[];for(var i=0;i<d.pokemon_eggs.length;++i){if(typeof d.pokemon_eggs[i]!=="object")throw TypeError(".POGOProtos.Data.Logs.FortSearchLogEntry.pokemon_eggs: object expected");m.pokemon_eggs[i]=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon_eggs[i])}}switch(d.fort_type){case"GYM":case 0:m.fort_type=0;break;case"CHECKPOINT":case 1:m.fort_type=1;break}if(d.awarded_items){if(!Array.isArray(d.awarded_items))throw TypeError(".POGOProtos.Data.Logs.FortSearchLogEntry.awarded_items: array expected");m.awarded_items=[];for(var i=0;i<d.awarded_items.length;++i){if(typeof d.awarded_items[i]!=="object")throw TypeError(".POGOProtos.Data.Logs.FortSearchLogEntry.awarded_items: object expected");m.awarded_items[i]=$root.POGOProtos.Inventory.Item.ItemData.fromObject(d.awarded_items[i])}}if(d.bonus_items){if(!Array.isArray(d.bonus_items))throw TypeError(".POGOProtos.Data.Logs.FortSearchLogEntry.bonus_items: array expected");m.bonus_items=[];for(var i=0;i<d.bonus_items.length;++i){if(typeof d.bonus_items[i]!=="object")throw TypeError(".POGOProtos.Data.Logs.FortSearchLogEntry.bonus_items: object expected");m.bonus_items[i]=$root.POGOProtos.Inventory.Item.ItemData.fromObject(d.bonus_items[i])}}if(d.team_bonus_items){if(!Array.isArray(d.team_bonus_items))throw TypeError(".POGOProtos.Data.Logs.FortSearchLogEntry.team_bonus_items: array expected");m.team_bonus_items=[];for(var i=0;i<d.team_bonus_items.length;++i){if(typeof d.team_bonus_items[i]!=="object")throw TypeError(".POGOProtos.Data.Logs.FortSearchLogEntry.team_bonus_items: object expected");m.team_bonus_items[i]=$root.POGOProtos.Inventory.Item.ItemData.fromObject(d.team_bonus_items[i])}}if(d.gift_boxes){if(!Array.isArray(d.gift_boxes))throw TypeError(".POGOProtos.Data.Logs.FortSearchLogEntry.gift_boxes: array expected");m.gift_boxes=[];for(var i=0;i<d.gift_boxes.length;++i){if(typeof d.gift_boxes[i]!=="object")throw TypeError(".POGOProtos.Data.Logs.FortSearchLogEntry.gift_boxes: object expected");m.gift_boxes[i]=$root.POGOProtos.Data.Gift.GiftBox.fromObject(d.gift_boxes[i])}}return m};FortSearchLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.items=[];d.pokemon_eggs=[];d.awarded_items=[];d.bonus_items=[];d.team_bonus_items=[];d.gift_boxes=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0;d.fort_id="";d.eggs=0;d.fort_type=o.enums===String?"GYM":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.FortSearchLogEntry.Result[m.result]:m.result}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.items&&m.items.length){d.items=[];for(var j=0;j<m.items.length;++j){d.items[j]=$root.POGOProtos.Inventory.Item.ItemData.toObject(m.items[j],o)}}if(m.eggs!=null&&m.hasOwnProperty("eggs")){d.eggs=m.eggs}if(m.pokemon_eggs&&m.pokemon_eggs.length){d.pokemon_eggs=[];for(var j=0;j<m.pokemon_eggs.length;++j){d.pokemon_eggs[j]=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon_eggs[j],o)}}if(m.fort_type!=null&&m.hasOwnProperty("fort_type")){d.fort_type=o.enums===String?$root.POGOProtos.Map.Fort.FortType[m.fort_type]:m.fort_type}if(m.awarded_items&&m.awarded_items.length){d.awarded_items=[];for(var j=0;j<m.awarded_items.length;++j){d.awarded_items[j]=$root.POGOProtos.Inventory.Item.ItemData.toObject(m.awarded_items[j],o)}}if(m.bonus_items&&m.bonus_items.length){d.bonus_items=[];for(var j=0;j<m.bonus_items.length;++j){d.bonus_items[j]=$root.POGOProtos.Inventory.Item.ItemData.toObject(m.bonus_items[j],o)}}if(m.team_bonus_items&&m.team_bonus_items.length){d.team_bonus_items=[];for(var j=0;j<m.team_bonus_items.length;++j){d.team_bonus_items[j]=$root.POGOProtos.Inventory.Item.ItemData.toObject(m.team_bonus_items[j],o)}}if(m.gift_boxes&&m.gift_boxes.length){d.gift_boxes=[];for(var j=0;j<m.gift_boxes.length;++j){d.gift_boxes[j]=$root.POGOProtos.Data.Gift.GiftBox.toObject(m.gift_boxes[j],o)}}return d};FortSearchLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FortSearchLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return FortSearchLogEntry}();Logs.OpenGiftLogEntry=function(){function OpenGiftLogEntry(p){this.pokemon_eggs=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OpenGiftLogEntry.prototype.result=0;OpenGiftLogEntry.prototype.friend_codename="";OpenGiftLogEntry.prototype.items=null;OpenGiftLogEntry.prototype.pokemon_eggs=$util.emptyArray;OpenGiftLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.friend_codename!=null&&m.hasOwnProperty("friend_codename"))w.uint32(18).string(m.friend_codename);if(m.items!=null&&m.hasOwnProperty("items"))$root.POGOProtos.Inventory.Loot.encode(m.items,w.uint32(26).fork()).ldelim();if(m.pokemon_eggs!=null&&m.pokemon_eggs.length){for(var i=0;i<m.pokemon_eggs.length;++i)$root.POGOProtos.Data.PokemonData.encode(m.pokemon_eggs[i],w.uint32(34).fork()).ldelim()}return w};OpenGiftLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.OpenGiftLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.friend_codename=r.string();break;case 3:m.items=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;case 4:if(!(m.pokemon_eggs&&m.pokemon_eggs.length))m.pokemon_eggs=[];m.pokemon_eggs.push($root.POGOProtos.Data.PokemonData.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};OpenGiftLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.OpenGiftLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.OpenGiftLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.friend_codename!=null){m.friend_codename=String(d.friend_codename)}if(d.items!=null){if(typeof d.items!=="object")throw TypeError(".POGOProtos.Data.Logs.OpenGiftLogEntry.items: object expected");m.items=$root.POGOProtos.Inventory.Loot.fromObject(d.items)}if(d.pokemon_eggs){if(!Array.isArray(d.pokemon_eggs))throw TypeError(".POGOProtos.Data.Logs.OpenGiftLogEntry.pokemon_eggs: array expected");m.pokemon_eggs=[];for(var i=0;i<d.pokemon_eggs.length;++i){if(typeof d.pokemon_eggs[i]!=="object")throw TypeError(".POGOProtos.Data.Logs.OpenGiftLogEntry.pokemon_eggs: object expected");m.pokemon_eggs[i]=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon_eggs[i])}}return m};OpenGiftLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.pokemon_eggs=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0;d.friend_codename="";d.items=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.OpenGiftLogEntry.Result[m.result]:m.result}if(m.friend_codename!=null&&m.hasOwnProperty("friend_codename")){d.friend_codename=m.friend_codename}if(m.items!=null&&m.hasOwnProperty("items")){d.items=$root.POGOProtos.Inventory.Loot.toObject(m.items,o)}if(m.pokemon_eggs&&m.pokemon_eggs.length){d.pokemon_eggs=[];for(var j=0;j<m.pokemon_eggs.length;++j){d.pokemon_eggs[j]=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon_eggs[j],o)}}return d};OpenGiftLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};OpenGiftLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return OpenGiftLogEntry}();Logs.PasscodeRewardsLogEntry=function(){function PasscodeRewardsLogEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PasscodeRewardsLogEntry.prototype.result=0;PasscodeRewardsLogEntry.prototype.passcode="";PasscodeRewardsLogEntry.prototype.rewards=null;PasscodeRewardsLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.passcode!=null&&m.hasOwnProperty("passcode"))w.uint32(18).string(m.passcode);if(m.rewards!=null&&m.hasOwnProperty("rewards"))$root.POGOProtos.Data.Redeem.RedeemPasscodeReward.encode(m.rewards,w.uint32(26).fork()).ldelim();return w};PasscodeRewardsLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.PasscodeRewardsLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.passcode=r.string();break;case 3:m.rewards=$root.POGOProtos.Data.Redeem.RedeemPasscodeReward.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};PasscodeRewardsLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.PasscodeRewardsLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.PasscodeRewardsLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.passcode!=null){m.passcode=String(d.passcode)}if(d.rewards!=null){if(typeof d.rewards!=="object")throw TypeError(".POGOProtos.Data.Logs.PasscodeRewardsLogEntry.rewards: object expected");m.rewards=$root.POGOProtos.Data.Redeem.RedeemPasscodeReward.fromObject(d.rewards)}return m};PasscodeRewardsLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.passcode="";d.rewards=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.PasscodeRewardsLogEntry.Result[m.result]:m.result}if(m.passcode!=null&&m.hasOwnProperty("passcode")){d.passcode=m.passcode}if(m.rewards!=null&&m.hasOwnProperty("rewards")){d.rewards=$root.POGOProtos.Data.Redeem.RedeemPasscodeReward.toObject(m.rewards,o)}return d};PasscodeRewardsLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PasscodeRewardsLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return PasscodeRewardsLogEntry}();Logs.RaidRewardsLogEntry=function(){function RaidRewardsLogEntry(p){this.items=[];this.default_rewards=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RaidRewardsLogEntry.prototype.result=0;RaidRewardsLogEntry.prototype.is_exclusive=false;RaidRewardsLogEntry.prototype.items=$util.emptyArray;RaidRewardsLogEntry.prototype.default_rewards=$util.emptyArray;RaidRewardsLogEntry.prototype.stardust=0;RaidRewardsLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.is_exclusive!=null&&m.hasOwnProperty("is_exclusive"))w.uint32(16).bool(m.is_exclusive);if(m.items!=null&&m.items.length){for(var i=0;i<m.items.length;++i)$root.POGOProtos.Inventory.Item.ItemData.encode(m.items[i],w.uint32(26).fork()).ldelim()}if(m.default_rewards!=null&&m.default_rewards.length){for(var i=0;i<m.default_rewards.length;++i)$root.POGOProtos.Inventory.Item.ItemData.encode(m.default_rewards[i],w.uint32(34).fork()).ldelim()}if(m.stardust!=null&&m.hasOwnProperty("stardust"))w.uint32(40).int32(m.stardust);return w};RaidRewardsLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.RaidRewardsLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.is_exclusive=r.bool();break;case 3:if(!(m.items&&m.items.length))m.items=[];m.items.push($root.POGOProtos.Inventory.Item.ItemData.decode(r,r.uint32()));break;case 4:if(!(m.default_rewards&&m.default_rewards.length))m.default_rewards=[];m.default_rewards.push($root.POGOProtos.Inventory.Item.ItemData.decode(r,r.uint32()));break;case 5:m.stardust=r.int32();break;default:r.skipType(t&7);break}}return m};RaidRewardsLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.RaidRewardsLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.RaidRewardsLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.is_exclusive!=null){m.is_exclusive=Boolean(d.is_exclusive)}if(d.items){if(!Array.isArray(d.items))throw TypeError(".POGOProtos.Data.Logs.RaidRewardsLogEntry.items: array expected");m.items=[];for(var i=0;i<d.items.length;++i){if(typeof d.items[i]!=="object")throw TypeError(".POGOProtos.Data.Logs.RaidRewardsLogEntry.items: object expected");m.items[i]=$root.POGOProtos.Inventory.Item.ItemData.fromObject(d.items[i])}}if(d.default_rewards){if(!Array.isArray(d.default_rewards))throw TypeError(".POGOProtos.Data.Logs.RaidRewardsLogEntry.default_rewards: array expected");m.default_rewards=[];for(var i=0;i<d.default_rewards.length;++i){if(typeof d.default_rewards[i]!=="object")throw TypeError(".POGOProtos.Data.Logs.RaidRewardsLogEntry.default_rewards: object expected");m.default_rewards[i]=$root.POGOProtos.Inventory.Item.ItemData.fromObject(d.default_rewards[i])}}if(d.stardust!=null){m.stardust=d.stardust|0}return m};RaidRewardsLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.items=[];d.default_rewards=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0;d.is_exclusive=false;d.stardust=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.RaidRewardsLogEntry.Result[m.result]:m.result}if(m.is_exclusive!=null&&m.hasOwnProperty("is_exclusive")){d.is_exclusive=m.is_exclusive}if(m.items&&m.items.length){d.items=[];for(var j=0;j<m.items.length;++j){d.items[j]=$root.POGOProtos.Inventory.Item.ItemData.toObject(m.items[j],o)}}if(m.default_rewards&&m.default_rewards.length){d.default_rewards=[];for(var j=0;j<m.default_rewards.length;++j){d.default_rewards[j]=$root.POGOProtos.Inventory.Item.ItemData.toObject(m.default_rewards[j],o)}}if(m.stardust!=null&&m.hasOwnProperty("stardust")){d.stardust=m.stardust}return d};RaidRewardsLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RaidRewardsLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return RaidRewardsLogEntry}();Logs.SendGiftLogEntry=function(){function SendGiftLogEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SendGiftLogEntry.prototype.result=0;SendGiftLogEntry.prototype.friend_codename="";SendGiftLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.friend_codename!=null&&m.hasOwnProperty("friend_codename"))w.uint32(18).string(m.friend_codename);return w};SendGiftLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.SendGiftLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.friend_codename=r.string();break;default:r.skipType(t&7);break}}return m};SendGiftLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.SendGiftLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.SendGiftLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.friend_codename!=null){m.friend_codename=String(d.friend_codename)}return m};SendGiftLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.friend_codename=""}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.SendGiftLogEntry.Result[m.result]:m.result}if(m.friend_codename!=null&&m.hasOwnProperty("friend_codename")){d.friend_codename=m.friend_codename}return d};SendGiftLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SendGiftLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return SendGiftLogEntry}();Logs.ShareExRaidPassLogEntry=function(){function ShareExRaidPassLogEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ShareExRaidPassLogEntry.prototype.result=0;ShareExRaidPassLogEntry.prototype.friend_codename="";ShareExRaidPassLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.friend_codename!=null&&m.hasOwnProperty("friend_codename"))w.uint32(18).string(m.friend_codename);return w};ShareExRaidPassLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.ShareExRaidPassLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.friend_codename=r.string();break;default:r.skipType(t&7);break}}return m};ShareExRaidPassLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.ShareExRaidPassLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.ShareExRaidPassLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.friend_codename!=null){m.friend_codename=String(d.friend_codename)}return m};ShareExRaidPassLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.friend_codename=""}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.ShareExRaidPassLogEntry.Result[m.result]:m.result}if(m.friend_codename!=null&&m.hasOwnProperty("friend_codename")){d.friend_codename=m.friend_codename}return d};ShareExRaidPassLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ShareExRaidPassLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return ShareExRaidPassLogEntry}();Logs.TradingLogEntry=function(){function TradingLogEntry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}TradingLogEntry.prototype.result=0;TradingLogEntry.prototype.friend_codename="";TradingLogEntry.prototype.trade_out_pokemon=null;TradingLogEntry.prototype.trade_in_pokemon=null;TradingLogEntry.prototype.rewards=null;TradingLogEntry.prototype.price=null;TradingLogEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.friend_codename!=null&&m.hasOwnProperty("friend_codename"))w.uint32(18).string(m.friend_codename);if(m.trade_out_pokemon!=null&&m.hasOwnProperty("trade_out_pokemon"))$root.POGOProtos.Data.PokemonData.encode(m.trade_out_pokemon,w.uint32(26).fork()).ldelim();if(m.trade_in_pokemon!=null&&m.hasOwnProperty("trade_in_pokemon"))$root.POGOProtos.Data.PokemonData.encode(m.trade_in_pokemon,w.uint32(34).fork()).ldelim();if(m.rewards!=null&&m.hasOwnProperty("rewards"))$root.POGOProtos.Inventory.Loot.encode(m.rewards,w.uint32(42).fork()).ldelim();if(m.price!=null&&m.hasOwnProperty("price"))$root.POGOProtos.Inventory.Loot.encode(m.price,w.uint32(50).fork()).ldelim();return w};TradingLogEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Logs.TradingLogEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.friend_codename=r.string();break;case 3:m.trade_out_pokemon=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 4:m.trade_in_pokemon=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 5:m.rewards=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;case 6:m.price=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};TradingLogEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Logs.TradingLogEntry)return d;var m=new $root.POGOProtos.Data.Logs.TradingLogEntry;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.friend_codename!=null){m.friend_codename=String(d.friend_codename)}if(d.trade_out_pokemon!=null){if(typeof d.trade_out_pokemon!=="object")throw TypeError(".POGOProtos.Data.Logs.TradingLogEntry.trade_out_pokemon: object expected");m.trade_out_pokemon=$root.POGOProtos.Data.PokemonData.fromObject(d.trade_out_pokemon)}if(d.trade_in_pokemon!=null){if(typeof d.trade_in_pokemon!=="object")throw TypeError(".POGOProtos.Data.Logs.TradingLogEntry.trade_in_pokemon: object expected");m.trade_in_pokemon=$root.POGOProtos.Data.PokemonData.fromObject(d.trade_in_pokemon)}if(d.rewards!=null){if(typeof d.rewards!=="object")throw TypeError(".POGOProtos.Data.Logs.TradingLogEntry.rewards: object expected");m.rewards=$root.POGOProtos.Inventory.Loot.fromObject(d.rewards)}if(d.price!=null){if(typeof d.price!=="object")throw TypeError(".POGOProtos.Data.Logs.TradingLogEntry.price: object expected");m.price=$root.POGOProtos.Inventory.Loot.fromObject(d.price)}return m};TradingLogEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.friend_codename="";d.trade_out_pokemon=null;d.trade_in_pokemon=null;d.rewards=null;d.price=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Data.Logs.TradingLogEntry.Result[m.result]:m.result}if(m.friend_codename!=null&&m.hasOwnProperty("friend_codename")){d.friend_codename=m.friend_codename}if(m.trade_out_pokemon!=null&&m.hasOwnProperty("trade_out_pokemon")){d.trade_out_pokemon=$root.POGOProtos.Data.PokemonData.toObject(m.trade_out_pokemon,o)}if(m.trade_in_pokemon!=null&&m.hasOwnProperty("trade_in_pokemon")){d.trade_in_pokemon=$root.POGOProtos.Data.PokemonData.toObject(m.trade_in_pokemon,o)}if(m.rewards!=null&&m.hasOwnProperty("rewards")){d.rewards=$root.POGOProtos.Inventory.Loot.toObject(m.rewards,o)}if(m.price!=null&&m.hasOwnProperty("price")){d.price=$root.POGOProtos.Inventory.Loot.toObject(m.price,o)}return d};TradingLogEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};TradingLogEntry.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return TradingLogEntry}();return Logs}();Data.News=function(){var News={};News.CurrentNews=function(){function CurrentNews(p){this.news_articles=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CurrentNews.prototype.news_articles=$util.emptyArray;CurrentNews.prototype.news_strings_url="";CurrentNews.prototype.last_updated_timestamp=$util.Long?$util.Long.fromBits(0,0,false):0;CurrentNews.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.news_articles!=null&&m.news_articles.length){for(var i=0;i<m.news_articles.length;++i)$root.POGOProtos.Data.News.NewsArticle.encode(m.news_articles[i],w.uint32(10).fork()).ldelim()}if(m.news_strings_url!=null&&m.hasOwnProperty("news_strings_url"))w.uint32(18).string(m.news_strings_url);if(m.last_updated_timestamp!=null&&m.hasOwnProperty("last_updated_timestamp"))w.uint32(24).int64(m.last_updated_timestamp);return w};CurrentNews.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.News.CurrentNews;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.news_articles&&m.news_articles.length))m.news_articles=[];m.news_articles.push($root.POGOProtos.Data.News.NewsArticle.decode(r,r.uint32()));break;case 2:m.news_strings_url=r.string();break;case 3:m.last_updated_timestamp=r.int64();break;default:r.skipType(t&7);break}}return m};CurrentNews.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.News.CurrentNews)return d;var m=new $root.POGOProtos.Data.News.CurrentNews;if(d.news_articles){if(!Array.isArray(d.news_articles))throw TypeError(".POGOProtos.Data.News.CurrentNews.news_articles: array expected");m.news_articles=[];for(var i=0;i<d.news_articles.length;++i){if(typeof d.news_articles[i]!=="object")throw TypeError(".POGOProtos.Data.News.CurrentNews.news_articles: object expected");m.news_articles[i]=$root.POGOProtos.Data.News.NewsArticle.fromObject(d.news_articles[i])}}if(d.news_strings_url!=null){m.news_strings_url=String(d.news_strings_url)}if(d.last_updated_timestamp!=null){if($util.Long)(m.last_updated_timestamp=$util.Long.fromValue(d.last_updated_timestamp)).unsigned=false;else if(typeof d.last_updated_timestamp==="string")m.last_updated_timestamp=parseInt(d.last_updated_timestamp,10);else if(typeof d.last_updated_timestamp==="number")m.last_updated_timestamp=d.last_updated_timestamp;else if(typeof d.last_updated_timestamp==="object")m.last_updated_timestamp=new $util.LongBits(d.last_updated_timestamp.low>>>0,d.last_updated_timestamp.high>>>0).toNumber()}return m};CurrentNews.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.news_articles=[]}if(o.defaults){d.news_strings_url="";if($util.Long){var n=new $util.Long(0,0,false);d.last_updated_timestamp=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.last_updated_timestamp=o.longs===String?"0":0}if(m.news_articles&&m.news_articles.length){d.news_articles=[];for(var j=0;j<m.news_articles.length;++j){d.news_articles[j]=$root.POGOProtos.Data.News.NewsArticle.toObject(m.news_articles[j],o)}}if(m.news_strings_url!=null&&m.hasOwnProperty("news_strings_url")){d.news_strings_url=m.news_strings_url}if(m.last_updated_timestamp!=null&&m.hasOwnProperty("last_updated_timestamp")){if(typeof m.last_updated_timestamp==="number")d.last_updated_timestamp=o.longs===String?String(m.last_updated_timestamp):m.last_updated_timestamp;else d.last_updated_timestamp=o.longs===String?$util.Long.prototype.toString.call(m.last_updated_timestamp):o.longs===Number?new $util.LongBits(m.last_updated_timestamp.low>>>0,m.last_updated_timestamp.high>>>0).toNumber():m.last_updated_timestamp}return d};CurrentNews.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CurrentNews}();News.NewsArticle=function(){function NewsArticle(p){this.image_url=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}NewsArticle.prototype.id="";NewsArticle.prototype.image_url=$util.emptyArray;NewsArticle.prototype.header_key="";NewsArticle.prototype.subheader_key="";NewsArticle.prototype.main_text_key="";NewsArticle.prototype.timestamp=$util.Long?$util.Long.fromBits(0,0,false):0;NewsArticle.prototype.template=0;NewsArticle.prototype.enabled=false;NewsArticle.prototype.article_read=false;NewsArticle.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.id!=null&&m.hasOwnProperty("id"))w.uint32(10).string(m.id);if(m.image_url!=null&&m.image_url.length){for(var i=0;i<m.image_url.length;++i)w.uint32(18).string(m.image_url[i])}if(m.header_key!=null&&m.hasOwnProperty("header_key"))w.uint32(26).string(m.header_key);if(m.subheader_key!=null&&m.hasOwnProperty("subheader_key"))w.uint32(34).string(m.subheader_key);if(m.main_text_key!=null&&m.hasOwnProperty("main_text_key"))w.uint32(42).string(m.main_text_key);if(m.timestamp!=null&&m.hasOwnProperty("timestamp"))w.uint32(48).int64(m.timestamp);if(m.template!=null&&m.hasOwnProperty("template"))w.uint32(56).int32(m.template);if(m.enabled!=null&&m.hasOwnProperty("enabled"))w.uint32(64).bool(m.enabled);if(m.article_read!=null&&m.hasOwnProperty("article_read"))w.uint32(72).bool(m.article_read);return w};NewsArticle.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.News.NewsArticle;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.id=r.string();break;case 2:if(!(m.image_url&&m.image_url.length))m.image_url=[];m.image_url.push(r.string());break;case 3:m.header_key=r.string();break;case 4:m.subheader_key=r.string();break;case 5:m.main_text_key=r.string();break;case 6:m.timestamp=r.int64();break;case 7:m.template=r.int32();break;case 8:m.enabled=r.bool();break;case 9:m.article_read=r.bool();break;default:r.skipType(t&7);break}}return m};NewsArticle.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.News.NewsArticle)return d;var m=new $root.POGOProtos.Data.News.NewsArticle;if(d.id!=null){m.id=String(d.id)}if(d.image_url){if(!Array.isArray(d.image_url))throw TypeError(".POGOProtos.Data.News.NewsArticle.image_url: array expected");m.image_url=[];for(var i=0;i<d.image_url.length;++i){m.image_url[i]=String(d.image_url[i])}}if(d.header_key!=null){m.header_key=String(d.header_key)}if(d.subheader_key!=null){m.subheader_key=String(d.subheader_key)}if(d.main_text_key!=null){m.main_text_key=String(d.main_text_key)}if(d.timestamp!=null){if($util.Long)(m.timestamp=$util.Long.fromValue(d.timestamp)).unsigned=false;else if(typeof d.timestamp==="string")m.timestamp=parseInt(d.timestamp,10);else if(typeof d.timestamp==="number")m.timestamp=d.timestamp;else if(typeof d.timestamp==="object")m.timestamp=new $util.LongBits(d.timestamp.low>>>0,d.timestamp.high>>>0).toNumber()}switch(d.template){case"UNSET":case 0:m.template=0;break;case"DEFAULT_TEMPLATE":case 1:m.template=1;break}if(d.enabled!=null){m.enabled=Boolean(d.enabled)}if(d.article_read!=null){m.article_read=Boolean(d.article_read)}return m};NewsArticle.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.image_url=[]}if(o.defaults){d.id="";d.header_key="";d.subheader_key="";d.main_text_key="";if($util.Long){var n=new $util.Long(0,0,false);d.timestamp=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.timestamp=o.longs===String?"0":0;d.template=o.enums===String?"UNSET":0;d.enabled=false;d.article_read=false}if(m.id!=null&&m.hasOwnProperty("id")){d.id=m.id}if(m.image_url&&m.image_url.length){d.image_url=[];for(var j=0;j<m.image_url.length;++j){d.image_url[j]=m.image_url[j]}}if(m.header_key!=null&&m.hasOwnProperty("header_key")){d.header_key=m.header_key}if(m.subheader_key!=null&&m.hasOwnProperty("subheader_key")){d.subheader_key=m.subheader_key}if(m.main_text_key!=null&&m.hasOwnProperty("main_text_key")){d.main_text_key=m.main_text_key}if(m.timestamp!=null&&m.hasOwnProperty("timestamp")){if(typeof m.timestamp==="number")d.timestamp=o.longs===String?String(m.timestamp):m.timestamp;else d.timestamp=o.longs===String?$util.Long.prototype.toString.call(m.timestamp):o.longs===Number?new $util.LongBits(m.timestamp.low>>>0,m.timestamp.high>>>0).toNumber():m.timestamp}if(m.template!=null&&m.hasOwnProperty("template")){d.template=o.enums===String?$root.POGOProtos.Data.News.NewsArticle.NewsTemplate[m.template]:m.template}if(m.enabled!=null&&m.hasOwnProperty("enabled")){d.enabled=m.enabled}if(m.article_read!=null&&m.hasOwnProperty("article_read")){d.article_read=m.article_read}return d};NewsArticle.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};NewsArticle.NewsTemplate=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="DEFAULT_TEMPLATE"]=1;return values}();return NewsArticle}();return News}();Data.NpcPokemon=function(){function NpcPokemon(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}NpcPokemon.prototype.pokemon_type=0;NpcPokemon.prototype.pokemon_display=null;NpcPokemon.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_type!=null&&m.hasOwnProperty("pokemon_type"))w.uint32(8).int32(m.pokemon_type);if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display"))$root.POGOProtos.Data.PokemonDisplay.encode(m.pokemon_display,w.uint32(18).fork()).ldelim();return w};NpcPokemon.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.NpcPokemon;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_type=r.int32();break;case 2:m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};NpcPokemon.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.NpcPokemon)return d;var m=new $root.POGOProtos.Data.NpcPokemon;switch(d.pokemon_type){case"MISSINGNO":case 0:m.pokemon_type=0;break;case"BULBASAUR":case 1:m.pokemon_type=1;break;case"IVYSAUR":case 2:m.pokemon_type=2;break;case"VENUSAUR":case 3:m.pokemon_type=3;break;case"CHARMANDER":case 4:m.pokemon_type=4;break;case"CHARMELEON":case 5:m.pokemon_type=5;break;case"CHARIZARD":case 6:m.pokemon_type=6;break;case"SQUIRTLE":case 7:m.pokemon_type=7;break;case"WARTORTLE":case 8:m.pokemon_type=8;break;case"BLASTOISE":case 9:m.pokemon_type=9;break;case"CATERPIE":case 10:m.pokemon_type=10;break;case"METAPOD":case 11:m.pokemon_type=11;break;case"BUTTERFREE":case 12:m.pokemon_type=12;break;case"WEEDLE":case 13:m.pokemon_type=13;break;case"KAKUNA":case 14:m.pokemon_type=14;break;case"BEEDRILL":case 15:m.pokemon_type=15;break;case"PIDGEY":case 16:m.pokemon_type=16;break;case"PIDGEOTTO":case 17:m.pokemon_type=17;break;case"PIDGEOT":case 18:m.pokemon_type=18;break;case"RATTATA":case 19:m.pokemon_type=19;break;case"RATICATE":case 20:m.pokemon_type=20;break;case"SPEAROW":case 21:m.pokemon_type=21;break;case"FEAROW":case 22:m.pokemon_type=22;break;case"EKANS":case 23:m.pokemon_type=23;break;case"ARBOK":case 24:m.pokemon_type=24;break;case"PIKACHU":case 25:m.pokemon_type=25;break;case"RAICHU":case 26:m.pokemon_type=26;break;case"SANDSHREW":case 27:m.pokemon_type=27;break;case"SANDSLASH":case 28:m.pokemon_type=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_type=29;break;case"NIDORINA":case 30:m.pokemon_type=30;break;case"NIDOQUEEN":case 31:m.pokemon_type=31;break;case"NIDORAN_MALE":case 32:m.pokemon_type=32;break;case"NIDORINO":case 33:m.pokemon_type=33;break;case"NIDOKING":case 34:m.pokemon_type=34;break;case"CLEFAIRY":case 35:m.pokemon_type=35;break;case"CLEFABLE":case 36:m.pokemon_type=36;break;case"VULPIX":case 37:m.pokemon_type=37;break;case"NINETALES":case 38:m.pokemon_type=38;break;case"JIGGLYPUFF":case 39:m.pokemon_type=39;break;case"WIGGLYTUFF":case 40:m.pokemon_type=40;break;case"ZUBAT":case 41:m.pokemon_type=41;break;case"GOLBAT":case 42:m.pokemon_type=42;break;case"ODDISH":case 43:m.pokemon_type=43;break;case"GLOOM":case 44:m.pokemon_type=44;break;case"VILEPLUME":case 45:m.pokemon_type=45;break;case"PARAS":case 46:m.pokemon_type=46;break;case"PARASECT":case 47:m.pokemon_type=47;break;case"VENONAT":case 48:m.pokemon_type=48;break;case"VENOMOTH":case 49:m.pokemon_type=49;break;case"DIGLETT":case 50:m.pokemon_type=50;break;case"DUGTRIO":case 51:m.pokemon_type=51;break;case"MEOWTH":case 52:m.pokemon_type=52;break;case"PERSIAN":case 53:m.pokemon_type=53;break;case"PSYDUCK":case 54:m.pokemon_type=54;break;case"GOLDUCK":case 55:m.pokemon_type=55;break;case"MANKEY":case 56:m.pokemon_type=56;break;case"PRIMEAPE":case 57:m.pokemon_type=57;break;case"GROWLITHE":case 58:m.pokemon_type=58;break;case"ARCANINE":case 59:m.pokemon_type=59;break;case"POLIWAG":case 60:m.pokemon_type=60;break;case"POLIWHIRL":case 61:m.pokemon_type=61;break;case"POLIWRATH":case 62:m.pokemon_type=62;break;case"ABRA":case 63:m.pokemon_type=63;break;case"KADABRA":case 64:m.pokemon_type=64;break;case"ALAKAZAM":case 65:m.pokemon_type=65;break;case"MACHOP":case 66:m.pokemon_type=66;break;case"MACHOKE":case 67:m.pokemon_type=67;break;case"MACHAMP":case 68:m.pokemon_type=68;break;case"BELLSPROUT":case 69:m.pokemon_type=69;break;case"WEEPINBELL":case 70:m.pokemon_type=70;break;case"VICTREEBEL":case 71:m.pokemon_type=71;break;case"TENTACOOL":case 72:m.pokemon_type=72;break;case"TENTACRUEL":case 73:m.pokemon_type=73;break;case"GEODUDE":case 74:m.pokemon_type=74;break;case"GRAVELER":case 75:m.pokemon_type=75;break;case"GOLEM":case 76:m.pokemon_type=76;break;case"PONYTA":case 77:m.pokemon_type=77;break;case"RAPIDASH":case 78:m.pokemon_type=78;break;case"SLOWPOKE":case 79:m.pokemon_type=79;break;case"SLOWBRO":case 80:m.pokemon_type=80;break;case"MAGNEMITE":case 81:m.pokemon_type=81;break;case"MAGNETON":case 82:m.pokemon_type=82;break;case"FARFETCHD":case 83:m.pokemon_type=83;break;case"DODUO":case 84:m.pokemon_type=84;break;case"DODRIO":case 85:m.pokemon_type=85;break;case"SEEL":case 86:m.pokemon_type=86;break;case"DEWGONG":case 87:m.pokemon_type=87;break;case"GRIMER":case 88:m.pokemon_type=88;break;case"MUK":case 89:m.pokemon_type=89;break;case"SHELLDER":case 90:m.pokemon_type=90;break;case"CLOYSTER":case 91:m.pokemon_type=91;break;case"GASTLY":case 92:m.pokemon_type=92;break;case"HAUNTER":case 93:m.pokemon_type=93;break;case"GENGAR":case 94:m.pokemon_type=94;break;case"ONIX":case 95:m.pokemon_type=95;break;case"DROWZEE":case 96:m.pokemon_type=96;break;case"HYPNO":case 97:m.pokemon_type=97;break;case"KRABBY":case 98:m.pokemon_type=98;break;case"KINGLER":case 99:m.pokemon_type=99;break;case"VOLTORB":case 100:m.pokemon_type=100;break;case"ELECTRODE":case 101:m.pokemon_type=101;break;case"EXEGGCUTE":case 102:m.pokemon_type=102;break;case"EXEGGUTOR":case 103:m.pokemon_type=103;break;case"CUBONE":case 104:m.pokemon_type=104;break;case"MAROWAK":case 105:m.pokemon_type=105;break;case"HITMONLEE":case 106:m.pokemon_type=106;break;case"HITMONCHAN":case 107:m.pokemon_type=107;break;case"LICKITUNG":case 108:m.pokemon_type=108;break;case"KOFFING":case 109:m.pokemon_type=109;break;case"WEEZING":case 110:m.pokemon_type=110;break;case"RHYHORN":case 111:m.pokemon_type=111;break;case"RHYDON":case 112:m.pokemon_type=112;break;case"CHANSEY":case 113:m.pokemon_type=113;break;case"TANGELA":case 114:m.pokemon_type=114;break;case"KANGASKHAN":case 115:m.pokemon_type=115;break;case"HORSEA":case 116:m.pokemon_type=116;break;case"SEADRA":case 117:m.pokemon_type=117;break;case"GOLDEEN":case 118:m.pokemon_type=118;break;case"SEAKING":case 119:m.pokemon_type=119;break;case"STARYU":case 120:m.pokemon_type=120;break;case"STARMIE":case 121:m.pokemon_type=121;break;case"MR_MIME":case 122:m.pokemon_type=122;break;case"SCYTHER":case 123:m.pokemon_type=123;break;case"JYNX":case 124:m.pokemon_type=124;break;case"ELECTABUZZ":case 125:m.pokemon_type=125;break;case"MAGMAR":case 126:m.pokemon_type=126;break;case"PINSIR":case 127:m.pokemon_type=127;break;case"TAUROS":case 128:m.pokemon_type=128;break;case"MAGIKARP":case 129:m.pokemon_type=129;break;case"GYARADOS":case 130:m.pokemon_type=130;break;case"LAPRAS":case 131:m.pokemon_type=131;break;case"DITTO":case 132:m.pokemon_type=132;break;case"EEVEE":case 133:m.pokemon_type=133;break;case"VAPOREON":case 134:m.pokemon_type=134;break;case"JOLTEON":case 135:m.pokemon_type=135;break;case"FLAREON":case 136:m.pokemon_type=136;break;case"PORYGON":case 137:m.pokemon_type=137;break;case"OMANYTE":case 138:m.pokemon_type=138;break;case"OMASTAR":case 139:m.pokemon_type=139;break;case"KABUTO":case 140:m.pokemon_type=140;break;case"KABUTOPS":case 141:m.pokemon_type=141;break;case"AERODACTYL":case 142:m.pokemon_type=142;break;case"SNORLAX":case 143:m.pokemon_type=143;break;case"ARTICUNO":case 144:m.pokemon_type=144;break;case"ZAPDOS":case 145:m.pokemon_type=145;break;case"MOLTRES":case 146:m.pokemon_type=146;break;case"DRATINI":case 147:m.pokemon_type=147;break;case"DRAGONAIR":case 148:m.pokemon_type=148;break;case"DRAGONITE":case 149:m.pokemon_type=149;break;case"MEWTWO":case 150:m.pokemon_type=150;break;case"MEW":case 151:m.pokemon_type=151;break;case"CHIKORITA":case 152:m.pokemon_type=152;break;case"BAYLEEF":case 153:m.pokemon_type=153;break;case"MEGANIUM":case 154:m.pokemon_type=154;break;case"CYNDAQUIL":case 155:m.pokemon_type=155;break;case"QUILAVA":case 156:m.pokemon_type=156;break;case"TYPHLOSION":case 157:m.pokemon_type=157;break;case"TOTODILE":case 158:m.pokemon_type=158;break;case"CROCONAW":case 159:m.pokemon_type=159;break;case"FERALIGATR":case 160:m.pokemon_type=160;break;case"SENTRET":case 161:m.pokemon_type=161;break;case"FURRET":case 162:m.pokemon_type=162;break;case"HOOTHOOT":case 163:m.pokemon_type=163;break;case"NOCTOWL":case 164:m.pokemon_type=164;break;case"LEDYBA":case 165:m.pokemon_type=165;break;case"LEDIAN":case 166:m.pokemon_type=166;break;case"SPINARAK":case 167:m.pokemon_type=167;break;case"ARIADOS":case 168:m.pokemon_type=168;break;case"CROBAT":case 169:m.pokemon_type=169;break;case"CHINCHOU":case 170:m.pokemon_type=170;break;case"LANTURN":case 171:m.pokemon_type=171;break;case"PICHU":case 172:m.pokemon_type=172;break;case"CLEFFA":case 173:m.pokemon_type=173;break;case"IGGLYBUFF":case 174:m.pokemon_type=174;break;case"TOGEPI":case 175:m.pokemon_type=175;break;case"TOGETIC":case 176:m.pokemon_type=176;break;case"NATU":case 177:m.pokemon_type=177;break;case"XATU":case 178:m.pokemon_type=178;break;case"MAREEP":case 179:m.pokemon_type=179;break;case"FLAAFFY":case 180:m.pokemon_type=180;break;case"AMPHAROS":case 181:m.pokemon_type=181;break;case"BELLOSSOM":case 182:m.pokemon_type=182;break;case"MARILL":case 183:m.pokemon_type=183;break;case"AZUMARILL":case 184:m.pokemon_type=184;break;case"SUDOWOODO":case 185:m.pokemon_type=185;break;case"POLITOED":case 186:m.pokemon_type=186;break;case"HOPPIP":case 187:m.pokemon_type=187;break;case"SKIPLOOM":case 188:m.pokemon_type=188;break;case"JUMPLUFF":case 189:m.pokemon_type=189;break;case"AIPOM":case 190:m.pokemon_type=190;break;case"SUNKERN":case 191:m.pokemon_type=191;break;case"SUNFLORA":case 192:m.pokemon_type=192;break;case"YANMA":case 193:m.pokemon_type=193;break;case"WOOPER":case 194:m.pokemon_type=194;break;case"QUAGSIRE":case 195:m.pokemon_type=195;break;case"ESPEON":case 196:m.pokemon_type=196;break;case"UMBREON":case 197:m.pokemon_type=197;break;case"MURKROW":case 198:m.pokemon_type=198;break;case"SLOWKING":case 199:m.pokemon_type=199;break;case"MISDREAVUS":case 200:m.pokemon_type=200;break;case"UNOWN":case 201:m.pokemon_type=201;break;case"WOBBUFFET":case 202:m.pokemon_type=202;break;case"GIRAFARIG":case 203:m.pokemon_type=203;break;case"PINECO":case 204:m.pokemon_type=204;break;case"FORRETRESS":case 205:m.pokemon_type=205;break;case"DUNSPARCE":case 206:m.pokemon_type=206;break;case"GLIGAR":case 207:m.pokemon_type=207;break;case"STEELIX":case 208:m.pokemon_type=208;break;case"SNUBBULL":case 209:m.pokemon_type=209;break;case"GRANBULL":case 210:m.pokemon_type=210;break;case"QWILFISH":case 211:m.pokemon_type=211;break;case"SCIZOR":case 212:m.pokemon_type=212;break;case"SHUCKLE":case 213:m.pokemon_type=213;break;case"HERACROSS":case 214:m.pokemon_type=214;break;case"SNEASEL":case 215:m.pokemon_type=215;break;case"TEDDIURSA":case 216:m.pokemon_type=216;break;case"URSARING":case 217:m.pokemon_type=217;break;case"SLUGMA":case 218:m.pokemon_type=218;break;case"MAGCARGO":case 219:m.pokemon_type=219;break;case"SWINUB":case 220:m.pokemon_type=220;break;case"PILOSWINE":case 221:m.pokemon_type=221;break;case"CORSOLA":case 222:m.pokemon_type=222;break;case"REMORAID":case 223:m.pokemon_type=223;break;case"OCTILLERY":case 224:m.pokemon_type=224;break;case"DELIBIRD":case 225:m.pokemon_type=225;break;case"MANTINE":case 226:m.pokemon_type=226;break;case"SKARMORY":case 227:m.pokemon_type=227;break;case"HOUNDOUR":case 228:m.pokemon_type=228;break;case"HOUNDOOM":case 229:m.pokemon_type=229;break;case"KINGDRA":case 230:m.pokemon_type=230;break;case"PHANPY":case 231:m.pokemon_type=231;break;case"DONPHAN":case 232:m.pokemon_type=232;break;case"PORYGON2":case 233:m.pokemon_type=233;break;case"STANTLER":case 234:m.pokemon_type=234;break;case"SMEARGLE":case 235:m.pokemon_type=235;break;case"TYROGUE":case 236:m.pokemon_type=236;break;case"HITMONTOP":case 237:m.pokemon_type=237;break;case"SMOOCHUM":case 238:m.pokemon_type=238;break;case"ELEKID":case 239:m.pokemon_type=239;break;case"MAGBY":case 240:m.pokemon_type=240;break;case"MILTANK":case 241:m.pokemon_type=241;break;case"BLISSEY":case 242:m.pokemon_type=242;break;case"RAIKOU":case 243:m.pokemon_type=243;break;case"ENTEI":case 244:m.pokemon_type=244;break;case"SUICUNE":case 245:m.pokemon_type=245;break;case"LARVITAR":case 246:m.pokemon_type=246;break;case"PUPITAR":case 247:m.pokemon_type=247;break;case"TYRANITAR":case 248:m.pokemon_type=248;break;case"LUGIA":case 249:m.pokemon_type=249;break;case"HO_OH":case 250:m.pokemon_type=250;break;case"CELEBI":case 251:m.pokemon_type=251;break;case"TREECKO":case 252:m.pokemon_type=252;break;case"GROVYLE":case 253:m.pokemon_type=253;break;case"SCEPTILE":case 254:m.pokemon_type=254;break;case"TORCHIC":case 255:m.pokemon_type=255;break;case"COMBUSKEN":case 256:m.pokemon_type=256;break;case"BLAZIKEN":case 257:m.pokemon_type=257;break;case"MUDKIP":case 258:m.pokemon_type=258;break;case"MARSHTOMP":case 259:m.pokemon_type=259;break;case"SWAMPERT":case 260:m.pokemon_type=260;break;case"POOCHYENA":case 261:m.pokemon_type=261;break;case"MIGHTYENA":case 262:m.pokemon_type=262;break;case"ZIGZAGOON":case 263:m.pokemon_type=263;break;case"LINOONE":case 264:m.pokemon_type=264;break;case"WURMPLE":case 265:m.pokemon_type=265;break;case"SILCOON":case 266:m.pokemon_type=266;break;case"BEAUTIFLY":case 267:m.pokemon_type=267;break;case"CASCOON":case 268:m.pokemon_type=268;break;case"DUSTOX":case 269:m.pokemon_type=269;break;case"LOTAD":case 270:m.pokemon_type=270;break;case"LOMBRE":case 271:m.pokemon_type=271;break;case"LUDICOLO":case 272:m.pokemon_type=272;break;case"SEEDOT":case 273:m.pokemon_type=273;break;case"NUZLEAF":case 274:m.pokemon_type=274;break;case"SHIFTRY":case 275:m.pokemon_type=275;break;case"TAILLOW":case 276:m.pokemon_type=276;break;case"SWELLOW":case 277:m.pokemon_type=277;break;case"WINGULL":case 278:m.pokemon_type=278;break;case"PELIPPER":case 279:m.pokemon_type=279;break;case"RALTS":case 280:m.pokemon_type=280;break;case"KIRLIA":case 281:m.pokemon_type=281;break;case"GARDEVOIR":case 282:m.pokemon_type=282;break;case"SURSKIT":case 283:m.pokemon_type=283;break;case"MASQUERAIN":case 284:m.pokemon_type=284;break;case"SHROOMISH":case 285:m.pokemon_type=285;break;case"BRELOOM":case 286:m.pokemon_type=286;break;case"SLAKOTH":case 287:m.pokemon_type=287;break;case"VIGOROTH":case 288:m.pokemon_type=288;break;case"SLAKING":case 289:m.pokemon_type=289;break;case"NINCADA":case 290:m.pokemon_type=290;break;case"NINJASK":case 291:m.pokemon_type=291;break;case"SHEDINJA":case 292:m.pokemon_type=292;break;case"WHISMUR":case 293:m.pokemon_type=293;break;case"LOUDRED":case 294:m.pokemon_type=294;break;case"EXPLOUD":case 295:m.pokemon_type=295;break;case"MAKUHITA":case 296:m.pokemon_type=296;break;case"HARIYAMA":case 297:m.pokemon_type=297;break;case"AZURILL":case 298:m.pokemon_type=298;break;case"NOSEPASS":case 299:m.pokemon_type=299;break;case"SKITTY":case 300:m.pokemon_type=300;break;case"DELCATTY":case 301:m.pokemon_type=301;break;case"SABLEYE":case 302:m.pokemon_type=302;break;case"MAWILE":case 303:m.pokemon_type=303;break;case"ARON":case 304:m.pokemon_type=304;break;case"LAIRON":case 305:m.pokemon_type=305;break;case"AGGRON":case 306:m.pokemon_type=306;break;case"MEDITITE":case 307:m.pokemon_type=307;break;case"MEDICHAM":case 308:m.pokemon_type=308;break;case"ELECTRIKE":case 309:m.pokemon_type=309;break;case"MANECTRIC":case 310:m.pokemon_type=310;break;case"PLUSLE":case 311:m.pokemon_type=311;break;case"MINUN":case 312:m.pokemon_type=312;break;case"VOLBEAT":case 313:m.pokemon_type=313;break;case"ILLUMISE":case 314:m.pokemon_type=314;break;case"ROSELIA":case 315:m.pokemon_type=315;break;case"GULPIN":case 316:m.pokemon_type=316;break;case"SWALOT":case 317:m.pokemon_type=317;break;case"CARVANHA":case 318:m.pokemon_type=318;break;case"SHARPEDO":case 319:m.pokemon_type=319;break;case"WAILMER":case 320:m.pokemon_type=320;break;case"WAILORD":case 321:m.pokemon_type=321;break;case"NUMEL":case 322:m.pokemon_type=322;break;case"CAMERUPT":case 323:m.pokemon_type=323;break;case"TORKOAL":case 324:m.pokemon_type=324;break;case"SPOINK":case 325:m.pokemon_type=325;break;case"GRUMPIG":case 326:m.pokemon_type=326;break;case"SPINDA":case 327:m.pokemon_type=327;break;case"TRAPINCH":case 328:m.pokemon_type=328;break;case"VIBRAVA":case 329:m.pokemon_type=329;break;case"FLYGON":case 330:m.pokemon_type=330;break;case"CACNEA":case 331:m.pokemon_type=331;break;case"CACTURNE":case 332:m.pokemon_type=332;break;case"SWABLU":case 333:m.pokemon_type=333;break;case"ALTARIA":case 334:m.pokemon_type=334;break;case"ZANGOOSE":case 335:m.pokemon_type=335;break;case"SEVIPER":case 336:m.pokemon_type=336;break;case"LUNATONE":case 337:m.pokemon_type=337;break;case"SOLROCK":case 338:m.pokemon_type=338;break;case"BARBOACH":case 339:m.pokemon_type=339;break;case"WHISCASH":case 340:m.pokemon_type=340;break;case"CORPHISH":case 341:m.pokemon_type=341;break;case"CRAWDAUNT":case 342:m.pokemon_type=342;break;case"BALTOY":case 343:m.pokemon_type=343;break;case"CLAYDOL":case 344:m.pokemon_type=344;break;case"LILEEP":case 345:m.pokemon_type=345;break;case"CRADILY":case 346:m.pokemon_type=346;break;case"ANORITH":case 347:m.pokemon_type=347;break;case"ARMALDO":case 348:m.pokemon_type=348;break;case"FEEBAS":case 349:m.pokemon_type=349;break;case"MILOTIC":case 350:m.pokemon_type=350;break;case"CASTFORM":case 351:m.pokemon_type=351;break;case"KECLEON":case 352:m.pokemon_type=352;break;case"SHUPPET":case 353:m.pokemon_type=353;break;case"BANETTE":case 354:m.pokemon_type=354;break;case"DUSKULL":case 355:m.pokemon_type=355;break;case"DUSCLOPS":case 356:m.pokemon_type=356;break;case"TROPIUS":case 357:m.pokemon_type=357;break;case"CHIMECHO":case 358:m.pokemon_type=358;break;case"ABSOL":case 359:m.pokemon_type=359;break;case"WYNAUT":case 360:m.pokemon_type=360;break;case"SNORUNT":case 361:m.pokemon_type=361;break;case"GLALIE":case 362:m.pokemon_type=362;break;case"SPHEAL":case 363:m.pokemon_type=363;break;case"SEALEO":case 364:m.pokemon_type=364;break;case"WALREIN":case 365:m.pokemon_type=365;break;case"CLAMPERL":case 366:m.pokemon_type=366;break;case"HUNTAIL":case 367:m.pokemon_type=367;break;case"GOREBYSS":case 368:m.pokemon_type=368;break;case"RELICANTH":case 369:m.pokemon_type=369;break;case"LUVDISC":case 370:m.pokemon_type=370;break;case"BAGON":case 371:m.pokemon_type=371;break;case"SHELGON":case 372:m.pokemon_type=372;break;case"SALAMENCE":case 373:m.pokemon_type=373;break;case"BELDUM":case 374:m.pokemon_type=374;break;case"METANG":case 375:m.pokemon_type=375;break;case"METAGROSS":case 376:m.pokemon_type=376;break;case"REGIROCK":case 377:m.pokemon_type=377;break;case"REGICE":case 378:m.pokemon_type=378;break;case"REGISTEEL":case 379:m.pokemon_type=379;break;case"LATIAS":case 380:m.pokemon_type=380;break;case"LATIOS":case 381:m.pokemon_type=381;break;case"KYOGRE":case 382:m.pokemon_type=382;break;case"GROUDON":case 383:m.pokemon_type=383;break;case"RAYQUAZA":case 384:m.pokemon_type=384;break;case"JIRACHI":case 385:m.pokemon_type=385;break;case"DEOXYS":case 386:m.pokemon_type=386;break;case"TURTWIG":case 387:m.pokemon_type=387;break;case"GROTLE":case 388:m.pokemon_type=388;break;case"TORTERRA":case 389:m.pokemon_type=389;break;case"CHIMCHAR":case 390:m.pokemon_type=390;break;case"MONFERNO":case 391:m.pokemon_type=391;break;case"INFERNAPE":case 392:m.pokemon_type=392;break;case"PIPLUP":case 393:m.pokemon_type=393;break;case"PRINPLUP":case 394:m.pokemon_type=394;break;case"EMPOLEON":case 395:m.pokemon_type=395;break;case"STARLY":case 396:m.pokemon_type=396;break;case"STARAVIA":case 397:m.pokemon_type=397;break;case"STARAPTOR":case 398:m.pokemon_type=398;break;case"BIDOOF":case 399:m.pokemon_type=399;break;case"BIBAREL":case 400:m.pokemon_type=400;break;case"KRICKETOT":case 401:m.pokemon_type=401;break;case"KRICKETUNE":case 402:m.pokemon_type=402;break;case"SHINX":case 403:m.pokemon_type=403;break;case"LUXIO":case 404:m.pokemon_type=404;break;case"LUXRAY":case 405:m.pokemon_type=405;break;case"BUDEW":case 406:m.pokemon_type=406;break;case"ROSERADE":case 407:m.pokemon_type=407;break;case"CRANIDOS":case 408:m.pokemon_type=408;break;case"RAMPARDOS":case 409:m.pokemon_type=409;break;case"SHIELDON":case 410:m.pokemon_type=410;break;case"BASTIODON":case 411:m.pokemon_type=411;break;case"BURMY":case 412:m.pokemon_type=412;break;case"WORMADAM":case 413:m.pokemon_type=413;break;case"MOTHIM":case 414:m.pokemon_type=414;break;case"COMBEE":case 415:m.pokemon_type=415;break;case"VESPIQUEN":case 416:m.pokemon_type=416;break;case"PACHIRISU":case 417:m.pokemon_type=417;break;case"BUIZEL":case 418:m.pokemon_type=418;break;case"FLOATZEL":case 419:m.pokemon_type=419;break;case"CHERUBI":case 420:m.pokemon_type=420;break;case"CHERRIM":case 421:m.pokemon_type=421;break;case"SHELLOS":case 422:m.pokemon_type=422;break;case"GASTRODON":case 423:m.pokemon_type=423;break;case"AMBIPOM":case 424:m.pokemon_type=424;break;case"DRIFLOON":case 425:m.pokemon_type=425;break;case"DRIFBLIM":case 426:m.pokemon_type=426;break;case"BUNEARY":case 427:m.pokemon_type=427;break;case"LOPUNNY":case 428:m.pokemon_type=428;break;case"MISMAGIUS":case 429:m.pokemon_type=429;break;case"HONCHKROW":case 430:m.pokemon_type=430;break;case"GLAMEOW":case 431:m.pokemon_type=431;break;case"PURUGLY":case 432:m.pokemon_type=432;break;case"CHINGLING":case 433:m.pokemon_type=433;break;case"STUNKY":case 434:m.pokemon_type=434;break;case"SKUNTANK":case 435:m.pokemon_type=435;break;case"BRONZOR":case 436:m.pokemon_type=436;break;case"BRONZONG":case 437:m.pokemon_type=437;break;case"BONSLY":case 438:m.pokemon_type=438;break;case"MIME_JR":case 439:m.pokemon_type=439;break;case"HAPPINY":case 440:m.pokemon_type=440;break;case"CHATOT":case 441:m.pokemon_type=441;break;case"SPIRITOMB":case 442:m.pokemon_type=442;break;case"GIBLE":case 443:m.pokemon_type=443;break;case"GABITE":case 444:m.pokemon_type=444;break;case"GARCHOMP":case 445:m.pokemon_type=445;break;case"MUNCHLAX":case 446:m.pokemon_type=446;break;case"RIOLU":case 447:m.pokemon_type=447;break;case"LUCARIO":case 448:m.pokemon_type=448;break;case"HIPPOPOTAS":case 449:m.pokemon_type=449;break;case"HIPPOWDON":case 450:m.pokemon_type=450;break;case"SKORUPI":case 451:m.pokemon_type=451;break;case"DRAPION":case 452:m.pokemon_type=452;break;case"CROAGUNK":case 453:m.pokemon_type=453;break;case"TOXICROAK":case 454:m.pokemon_type=454;break;case"CARNIVINE":case 455:m.pokemon_type=455;break;case"FINNEON":case 456:m.pokemon_type=456;break;case"LUMINEON":case 457:m.pokemon_type=457;break;case"MANTYKE":case 458:m.pokemon_type=458;break;case"SNOVER":case 459:m.pokemon_type=459;break;case"ABOMASNOW":case 460:m.pokemon_type=460;break;case"WEAVILE":case 461:m.pokemon_type=461;break;case"MAGNEZONE":case 462:m.pokemon_type=462;break;case"LICKILICKY":case 463:m.pokemon_type=463;break;case"RHYPERIOR":case 464:m.pokemon_type=464;break;case"TANGROWTH":case 465:m.pokemon_type=465;break;case"ELECTIVIRE":case 466:m.pokemon_type=466;break;case"MAGMORTAR":case 467:m.pokemon_type=467;break;case"TOGEKISS":case 468:m.pokemon_type=468;break;case"YANMEGA":case 469:m.pokemon_type=469;break;case"LEAFEON":case 470:m.pokemon_type=470;break;case"GLACEON":case 471:m.pokemon_type=471;break;case"GLISCOR":case 472:m.pokemon_type=472;break;case"MAMOSWINE":case 473:m.pokemon_type=473;break;case"PORYGON_Z":case 474:m.pokemon_type=474;break;case"GALLADE":case 475:m.pokemon_type=475;break;case"PROBOPASS":case 476:m.pokemon_type=476;break;case"DUSKNOIR":case 477:m.pokemon_type=477;break;case"FROSLASS":case 478:m.pokemon_type=478;break;case"ROTOM":case 479:m.pokemon_type=479;break;case"UXIE":case 480:m.pokemon_type=480;break;case"MESPRIT":case 481:m.pokemon_type=481;break;case"AZELF":case 482:m.pokemon_type=482;break;case"DIALGA":case 483:m.pokemon_type=483;break;case"PALKIA":case 484:m.pokemon_type=484;break;case"HEATRAN":case 485:m.pokemon_type=485;break;case"REGIGIGAS":case 486:m.pokemon_type=486;break;case"GIRATINA":case 487:m.pokemon_type=487;break;case"CRESSELIA":case 488:m.pokemon_type=488;break;case"PHIONE":case 489:m.pokemon_type=489;break;case"MANAPHY":case 490:m.pokemon_type=490;break;case"DARKRAI":case 491:m.pokemon_type=491;break;case"SHAYMIN":case 492:m.pokemon_type=492;break;case"ARCEUS":case 493:m.pokemon_type=493;break;case"MELTAN":case 808:m.pokemon_type=808;break;case"MELMETAL":case 809:m.pokemon_type=809;break}if(d.pokemon_display!=null){if(typeof d.pokemon_display!=="object")throw TypeError(".POGOProtos.Data.NpcPokemon.pokemon_display: object expected");m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.pokemon_display)}return m};NpcPokemon.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon_type=o.enums===String?"MISSINGNO":0;d.pokemon_display=null}if(m.pokemon_type!=null&&m.hasOwnProperty("pokemon_type")){d.pokemon_type=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_type]:m.pokemon_type}if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display")){d.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.toObject(m.pokemon_display,o)}return d};NpcPokemon.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return NpcPokemon}();Data.Player=function(){var Player={};Player.ContactSettings=function(){function ContactSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ContactSettings.prototype.send_marketing_emails=false;ContactSettings.prototype.send_push_notifications=false;ContactSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.send_marketing_emails!=null&&m.hasOwnProperty("send_marketing_emails"))w.uint32(8).bool(m.send_marketing_emails);if(m.send_push_notifications!=null&&m.hasOwnProperty("send_push_notifications"))w.uint32(16).bool(m.send_push_notifications);return w};ContactSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.ContactSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.send_marketing_emails=r.bool();break;case 2:m.send_push_notifications=r.bool();break;default:r.skipType(t&7);break}}return m};ContactSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.ContactSettings)return d;var m=new $root.POGOProtos.Data.Player.ContactSettings;if(d.send_marketing_emails!=null){m.send_marketing_emails=Boolean(d.send_marketing_emails)}if(d.send_push_notifications!=null){m.send_push_notifications=Boolean(d.send_push_notifications)}return m};ContactSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.send_marketing_emails=false;d.send_push_notifications=false}if(m.send_marketing_emails!=null&&m.hasOwnProperty("send_marketing_emails")){d.send_marketing_emails=m.send_marketing_emails}if(m.send_push_notifications!=null&&m.hasOwnProperty("send_push_notifications")){d.send_push_notifications=m.send_push_notifications}return d};ContactSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ContactSettings}();Player.Currency=function(){function Currency(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Currency.prototype.currency_type="";Currency.prototype.quantity=0;Currency.prototype.fiat_purchased_quantity=0;Currency.prototype.fiat_currency_type="";Currency.prototype.fiat_currency_cost_e6=$util.Long?$util.Long.fromBits(0,0,false):0;Currency.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.currency_type!=null&&m.hasOwnProperty("currency_type"))w.uint32(10).string(m.currency_type);if(m.quantity!=null&&m.hasOwnProperty("quantity"))w.uint32(16).int32(m.quantity);if(m.fiat_purchased_quantity!=null&&m.hasOwnProperty("fiat_purchased_quantity"))w.uint32(24).int32(m.fiat_purchased_quantity);if(m.fiat_currency_type!=null&&m.hasOwnProperty("fiat_currency_type"))w.uint32(34).string(m.fiat_currency_type);if(m.fiat_currency_cost_e6!=null&&m.hasOwnProperty("fiat_currency_cost_e6"))w.uint32(40).int64(m.fiat_currency_cost_e6);return w};Currency.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.Currency;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.currency_type=r.string();break;case 2:m.quantity=r.int32();break;case 3:m.fiat_purchased_quantity=r.int32();break;case 4:m.fiat_currency_type=r.string();break;case 5:m.fiat_currency_cost_e6=r.int64();break;default:r.skipType(t&7);break}}return m};Currency.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.Currency)return d;var m=new $root.POGOProtos.Data.Player.Currency;if(d.currency_type!=null){m.currency_type=String(d.currency_type)}if(d.quantity!=null){m.quantity=d.quantity|0}if(d.fiat_purchased_quantity!=null){m.fiat_purchased_quantity=d.fiat_purchased_quantity|0}if(d.fiat_currency_type!=null){m.fiat_currency_type=String(d.fiat_currency_type)}if(d.fiat_currency_cost_e6!=null){if($util.Long)(m.fiat_currency_cost_e6=$util.Long.fromValue(d.fiat_currency_cost_e6)).unsigned=false;else if(typeof d.fiat_currency_cost_e6==="string")m.fiat_currency_cost_e6=parseInt(d.fiat_currency_cost_e6,10);else if(typeof d.fiat_currency_cost_e6==="number")m.fiat_currency_cost_e6=d.fiat_currency_cost_e6;else if(typeof d.fiat_currency_cost_e6==="object")m.fiat_currency_cost_e6=new $util.LongBits(d.fiat_currency_cost_e6.low>>>0,d.fiat_currency_cost_e6.high>>>0).toNumber()}return m};Currency.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.currency_type="";d.quantity=0;d.fiat_purchased_quantity=0;d.fiat_currency_type="";if($util.Long){var n=new $util.Long(0,0,false);d.fiat_currency_cost_e6=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.fiat_currency_cost_e6=o.longs===String?"0":0}if(m.currency_type!=null&&m.hasOwnProperty("currency_type")){d.currency_type=m.currency_type}if(m.quantity!=null&&m.hasOwnProperty("quantity")){d.quantity=m.quantity}if(m.fiat_purchased_quantity!=null&&m.hasOwnProperty("fiat_purchased_quantity")){d.fiat_purchased_quantity=m.fiat_purchased_quantity}if(m.fiat_currency_type!=null&&m.hasOwnProperty("fiat_currency_type")){d.fiat_currency_type=m.fiat_currency_type}if(m.fiat_currency_cost_e6!=null&&m.hasOwnProperty("fiat_currency_cost_e6")){if(typeof m.fiat_currency_cost_e6==="number")d.fiat_currency_cost_e6=o.longs===String?String(m.fiat_currency_cost_e6):m.fiat_currency_cost_e6;else d.fiat_currency_cost_e6=o.longs===String?$util.Long.prototype.toString.call(m.fiat_currency_cost_e6):o.longs===Number?new $util.LongBits(m.fiat_currency_cost_e6.low>>>0,m.fiat_currency_cost_e6.high>>>0).toNumber():m.fiat_currency_cost_e6}return d};Currency.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Currency}();Player.DailyBonus=function(){function DailyBonus(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DailyBonus.prototype.next_collected_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;DailyBonus.prototype.next_defender_bonus_collect_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;DailyBonus.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.next_collected_timestamp_ms!=null&&m.hasOwnProperty("next_collected_timestamp_ms"))w.uint32(8).int64(m.next_collected_timestamp_ms);if(m.next_defender_bonus_collect_timestamp_ms!=null&&m.hasOwnProperty("next_defender_bonus_collect_timestamp_ms"))w.uint32(16).int64(m.next_defender_bonus_collect_timestamp_ms);return w};DailyBonus.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.DailyBonus;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.next_collected_timestamp_ms=r.int64();break;case 2:m.next_defender_bonus_collect_timestamp_ms=r.int64();break;default:r.skipType(t&7);break}}return m};DailyBonus.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.DailyBonus)return d;var m=new $root.POGOProtos.Data.Player.DailyBonus;if(d.next_collected_timestamp_ms!=null){if($util.Long)(m.next_collected_timestamp_ms=$util.Long.fromValue(d.next_collected_timestamp_ms)).unsigned=false;else if(typeof d.next_collected_timestamp_ms==="string")m.next_collected_timestamp_ms=parseInt(d.next_collected_timestamp_ms,10);else if(typeof d.next_collected_timestamp_ms==="number")m.next_collected_timestamp_ms=d.next_collected_timestamp_ms;else if(typeof d.next_collected_timestamp_ms==="object")m.next_collected_timestamp_ms=new $util.LongBits(d.next_collected_timestamp_ms.low>>>0,d.next_collected_timestamp_ms.high>>>0).toNumber()}if(d.next_defender_bonus_collect_timestamp_ms!=null){if($util.Long)(m.next_defender_bonus_collect_timestamp_ms=$util.Long.fromValue(d.next_defender_bonus_collect_timestamp_ms)).unsigned=false;else if(typeof d.next_defender_bonus_collect_timestamp_ms==="string")m.next_defender_bonus_collect_timestamp_ms=parseInt(d.next_defender_bonus_collect_timestamp_ms,10);else if(typeof d.next_defender_bonus_collect_timestamp_ms==="number")m.next_defender_bonus_collect_timestamp_ms=d.next_defender_bonus_collect_timestamp_ms;else if(typeof d.next_defender_bonus_collect_timestamp_ms==="object")m.next_defender_bonus_collect_timestamp_ms=new $util.LongBits(d.next_defender_bonus_collect_timestamp_ms.low>>>0,d.next_defender_bonus_collect_timestamp_ms.high>>>0).toNumber()}return m};DailyBonus.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.next_collected_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.next_collected_timestamp_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.next_defender_bonus_collect_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.next_defender_bonus_collect_timestamp_ms=o.longs===String?"0":0}if(m.next_collected_timestamp_ms!=null&&m.hasOwnProperty("next_collected_timestamp_ms")){if(typeof m.next_collected_timestamp_ms==="number")d.next_collected_timestamp_ms=o.longs===String?String(m.next_collected_timestamp_ms):m.next_collected_timestamp_ms;else d.next_collected_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.next_collected_timestamp_ms):o.longs===Number?new $util.LongBits(m.next_collected_timestamp_ms.low>>>0,m.next_collected_timestamp_ms.high>>>0).toNumber():m.next_collected_timestamp_ms}if(m.next_defender_bonus_collect_timestamp_ms!=null&&m.hasOwnProperty("next_defender_bonus_collect_timestamp_ms")){if(typeof m.next_defender_bonus_collect_timestamp_ms==="number")d.next_defender_bonus_collect_timestamp_ms=o.longs===String?String(m.next_defender_bonus_collect_timestamp_ms):m.next_defender_bonus_collect_timestamp_ms;else d.next_defender_bonus_collect_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.next_defender_bonus_collect_timestamp_ms):o.longs===Number?new $util.LongBits(m.next_defender_bonus_collect_timestamp_ms.low>>>0,m.next_defender_bonus_collect_timestamp_ms.high>>>0).toNumber():m.next_defender_bonus_collect_timestamp_ms}return d};DailyBonus.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DailyBonus}();Player.EquippedBadge=function(){function EquippedBadge(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EquippedBadge.prototype.badge_type=0;EquippedBadge.prototype.level=0;EquippedBadge.prototype.next_equip_change_allowed_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;EquippedBadge.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.badge_type!=null&&m.hasOwnProperty("badge_type"))w.uint32(8).int32(m.badge_type);if(m.level!=null&&m.hasOwnProperty("level"))w.uint32(16).int32(m.level);if(m.next_equip_change_allowed_timestamp_ms!=null&&m.hasOwnProperty("next_equip_change_allowed_timestamp_ms"))w.uint32(24).int64(m.next_equip_change_allowed_timestamp_ms);return w};EquippedBadge.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.EquippedBadge;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.badge_type=r.int32();break;case 2:m.level=r.int32();break;case 3:m.next_equip_change_allowed_timestamp_ms=r.int64();break;default:r.skipType(t&7);break}}return m};EquippedBadge.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.EquippedBadge)return d;var m=new $root.POGOProtos.Data.Player.EquippedBadge;switch(d.badge_type){case"BADGE_UNSET":case 0:m.badge_type=0;break;case"BADGE_TRAVEL_KM":case 1:m.badge_type=1;break;case"BADGE_POKEDEX_ENTRIES":case 2:m.badge_type=2;break;case"BADGE_CAPTURE_TOTAL":case 3:m.badge_type=3;break;case"BADGE_DEFEATED_FORT":case 4:m.badge_type=4;break;case"BADGE_EVOLVED_TOTAL":case 5:m.badge_type=5;break;case"BADGE_HATCHED_TOTAL":case 6:m.badge_type=6;break;case"BADGE_ENCOUNTERED_TOTAL":case 7:m.badge_type=7;break;case"BADGE_POKESTOPS_VISITED":case 8:m.badge_type=8;break;case"BADGE_UNIQUE_POKESTOPS":case 9:m.badge_type=9;break;case"BADGE_POKEBALL_THROWN":case 10:m.badge_type=10;break;case"BADGE_BIG_MAGIKARP":case 11:m.badge_type=11;break;case"BADGE_DEPLOYED_TOTAL":case 12:m.badge_type=12;break;case"BADGE_BATTLE_ATTACK_WON":case 13:m.badge_type=13;break;case"BADGE_BATTLE_TRAINING_WON":case 14:m.badge_type=14;break;case"BADGE_BATTLE_DEFEND_WON":case 15:m.badge_type=15;break;case"BADGE_PRESTIGE_RAISED":case 16:m.badge_type=16;break;case"BADGE_PRESTIGE_DROPPED":case 17:m.badge_type=17;break;case"BADGE_TYPE_NORMAL":case 18:m.badge_type=18;break;case"BADGE_TYPE_FIGHTING":case 19:m.badge_type=19;break;case"BADGE_TYPE_FLYING":case 20:m.badge_type=20;break;case"BADGE_TYPE_POISON":case 21:m.badge_type=21;break;case"BADGE_TYPE_GROUND":case 22:m.badge_type=22;break;case"BADGE_TYPE_ROCK":case 23:m.badge_type=23;break;case"BADGE_TYPE_BUG":case 24:m.badge_type=24;break;case"BADGE_TYPE_GHOST":case 25:m.badge_type=25;break;case"BADGE_TYPE_STEEL":case 26:m.badge_type=26;break;case"BADGE_TYPE_FIRE":case 27:m.badge_type=27;break;case"BADGE_TYPE_WATER":case 28:m.badge_type=28;break;case"BADGE_TYPE_GRASS":case 29:m.badge_type=29;break;case"BADGE_TYPE_ELECTRIC":case 30:m.badge_type=30;break;case"BADGE_TYPE_PSYCHIC":case 31:m.badge_type=31;break;case"BADGE_TYPE_ICE":case 32:m.badge_type=32;break;case"BADGE_TYPE_DRAGON":case 33:m.badge_type=33;break;case"BADGE_TYPE_DARK":case 34:m.badge_type=34;break;case"BADGE_TYPE_FAIRY":case 35:m.badge_type=35;break;case"BADGE_SMALL_RATTATA":case 36:m.badge_type=36;break;case"BADGE_PIKACHU":case 37:m.badge_type=37;break;case"BADGE_UNOWN":case 38:m.badge_type=38;break;case"BADGE_POKEDEX_ENTRIES_GEN2":case 39:m.badge_type=39;break;case"BADGE_RAID_BATTLE_WON":case 40:m.badge_type=40;break;case"BADGE_LEGENDARY_BATTLE_WON":case 41:m.badge_type=41;break;case"BADGE_BERRIES_FED":case 42:m.badge_type=42;break;case"BADGE_HOURS_DEFENDED":case 43:m.badge_type=43;break;case"BADGE_PLACE_HOLDER":case 44:m.badge_type=44;break;case"BADGE_POKEDEX_ENTRIES_GEN3":case 45:m.badge_type=45;break;case"BADGE_CHALLENGE_QUESTS":case 46:m.badge_type=46;break;case"BADGE_MEW_ENCOUNTER":case 47:m.badge_type=47;break;case"BADGE_MAX_LEVEL_FRIENDS":case 48:m.badge_type=48;break;case"BADGE_TRADING":case 49:m.badge_type=49;break;case"BADGE_TRADING_DISTANCE":case 50:m.badge_type=50;break;case"BADGE_POKEDEX_ENTRIES_GEN4":case 51:m.badge_type=51;break;case"BADGE_GREAT_LEAGUE":case 52:m.badge_type=52;break;case"BADGE_ULTRA_LEAGUE":case 53:m.badge_type=53;break;case"BADGE_MASTER_LEAGUE":case 54:m.badge_type=54;break;case"BADGE_EVENT_MIN":case 2e3:m.badge_type=2e3;break;case"BADGE_CHICAGO_FEST_JULY_2017":case 2001:m.badge_type=2001;break;case"BADGE_PIKACHU_OUTBREAK_YOKOHAMA_2017":case 2002:m.badge_type=2002;break;case"BADGE_SAFARI_ZONE_EUROPE_2017":case 2003:m.badge_type=2003;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_07":case 2004:m.badge_type=2004;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_14":case 2005:m.badge_type=2005;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_NORTH":case 2006:m.badge_type=2006;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_SOUTH":case 2007:m.badge_type=2007;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_NORTH":case 2008:m.badge_type=2008;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_SOUTH":case 2009:m.badge_type=2009;break;case"BADGE_APAC_PARTNER_JULY_2018_0":case 2010:m.badge_type=2010;break;case"BADGE_APAC_PARTNER_JULY_2018_1":case 2011:m.badge_type=2011;break;case"BADGE_APAC_PARTNER_JULY_2018_2":case 2012:m.badge_type=2012;break;case"BADGE_APAC_PARTNER_JULY_2018_3":case 2013:m.badge_type=2013;break;case"BADGE_APAC_PARTNER_JULY_2018_4":case 2014:m.badge_type=2014;break;case"BADGE_APAC_PARTNER_JULY_2018_5":case 2015:m.badge_type=2015;break;case"BADGE_APAC_PARTNER_JULY_2018_6":case 2016:m.badge_type=2016;break;case"BADGE_APAC_PARTNER_JULY_2018_7":case 2017:m.badge_type=2017;break;case"BADGE_APAC_PARTNER_JULY_2018_8":case 2018:m.badge_type=2018;break;case"BADGE_APAC_PARTNER_JULY_2018_9":case 2019:m.badge_type=2019;break;case"BADGE_YOKOSUKA_29_AUG_2018_MIKASA":case 2020:m.badge_type=2020;break;case"BADGE_YOKOSUKA_29_AUG_2018_VERNY":case 2021:m.badge_type=2021;break;case"BADGE_YOKOSUKA_29_AUG_2018_KURIHAMA":case 2022:m.badge_type=2022;break;case"BADGE_YOKOSUKA_30_AUG_2018_MIKASA":case 2023:m.badge_type=2023;break;case"BADGE_YOKOSUKA_30_AUG_2018_VERNY":case 2024:m.badge_type=2024;break;case"BADGE_YOKOSUKA_30_AUG_2018_KURIHAMA":case 2025:m.badge_type=2025;break;case"BADGE_YOKOSUKA_31_AUG_2018_MIKASA":case 2026:m.badge_type=2026;break;case"BADGE_YOKOSUKA_31_AUG_2018_VERNY":case 2027:m.badge_type=2027;break;case"BADGE_YOKOSUKA_31_AUG_2018_KURIHAMA":case 2028:m.badge_type=2028;break;case"BADGE_YOKOSUKA_1_SEP_2018_MIKASA":case 2029:m.badge_type=2029;break;case"BADGE_YOKOSUKA_1_SEP_2018_VERNY":case 2030:m.badge_type=2030;break;case"BADGE_YOKOSUKA_1_SEP_2018_KURIHAMA":case 2031:m.badge_type=2031;break;case"BADGE_YOKOSUKA_2_SEP_2018_MIKASA":case 2032:m.badge_type=2032;break;case"BADGE_YOKOSUKA_2_SEP_2018_VERNY":case 2033:m.badge_type=2033;break;case"BADGE_YOKOSUKA_2_SEP_2018_KURIHAMA":case 2034:m.badge_type=2034;break;case"BADGE_TOP_BANANA_1":case 2035:m.badge_type=2035;break;case"BADGE_TOP_BANANA_2":case 2036:m.badge_type=2036;break;case"BADGE_TOP_BANANA_3":case 2037:m.badge_type=2037;break}if(d.level!=null){m.level=d.level|0}if(d.next_equip_change_allowed_timestamp_ms!=null){if($util.Long)(m.next_equip_change_allowed_timestamp_ms=$util.Long.fromValue(d.next_equip_change_allowed_timestamp_ms)).unsigned=false;else if(typeof d.next_equip_change_allowed_timestamp_ms==="string")m.next_equip_change_allowed_timestamp_ms=parseInt(d.next_equip_change_allowed_timestamp_ms,10);else if(typeof d.next_equip_change_allowed_timestamp_ms==="number")m.next_equip_change_allowed_timestamp_ms=d.next_equip_change_allowed_timestamp_ms;else if(typeof d.next_equip_change_allowed_timestamp_ms==="object")m.next_equip_change_allowed_timestamp_ms=new $util.LongBits(d.next_equip_change_allowed_timestamp_ms.low>>>0,d.next_equip_change_allowed_timestamp_ms.high>>>0).toNumber()}return m};EquippedBadge.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.badge_type=o.enums===String?"BADGE_UNSET":0;d.level=0;if($util.Long){var n=new $util.Long(0,0,false);d.next_equip_change_allowed_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.next_equip_change_allowed_timestamp_ms=o.longs===String?"0":0}if(m.badge_type!=null&&m.hasOwnProperty("badge_type")){d.badge_type=o.enums===String?$root.POGOProtos.Enums.BadgeType[m.badge_type]:m.badge_type}if(m.level!=null&&m.hasOwnProperty("level")){d.level=m.level}if(m.next_equip_change_allowed_timestamp_ms!=null&&m.hasOwnProperty("next_equip_change_allowed_timestamp_ms")){if(typeof m.next_equip_change_allowed_timestamp_ms==="number")d.next_equip_change_allowed_timestamp_ms=o.longs===String?String(m.next_equip_change_allowed_timestamp_ms):m.next_equip_change_allowed_timestamp_ms;else d.next_equip_change_allowed_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.next_equip_change_allowed_timestamp_ms):o.longs===Number?new $util.LongBits(m.next_equip_change_allowed_timestamp_ms.low>>>0,m.next_equip_change_allowed_timestamp_ms.high>>>0).toNumber():m.next_equip_change_allowed_timestamp_ms}return d};EquippedBadge.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EquippedBadge}();Player.PlayerAvatar=function(){function PlayerAvatar(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerAvatar.prototype.skin=0;PlayerAvatar.prototype.hair=0;PlayerAvatar.prototype.shirt=0;PlayerAvatar.prototype.pants=0;PlayerAvatar.prototype.hat=0;PlayerAvatar.prototype.shoes=0;PlayerAvatar.prototype.avatar=0;PlayerAvatar.prototype.eyes=0;PlayerAvatar.prototype.backpack=0;PlayerAvatar.prototype.avatar_hair="";PlayerAvatar.prototype.avatar_shirt="";PlayerAvatar.prototype.avatar_pants="";PlayerAvatar.prototype.avatar_hat="";PlayerAvatar.prototype.avatar_shoes="";PlayerAvatar.prototype.avatar_eyes="";PlayerAvatar.prototype.avatar_backpack="";PlayerAvatar.prototype.avatar_gloves="";PlayerAvatar.prototype.avatar_socks="";PlayerAvatar.prototype.avatar_belt="";PlayerAvatar.prototype.avatar_glasses="";PlayerAvatar.prototype.avatar_necklace="";PlayerAvatar.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.skin!=null&&m.hasOwnProperty("skin"))w.uint32(16).int32(m.skin);if(m.hair!=null&&m.hasOwnProperty("hair"))w.uint32(24).int32(m.hair);if(m.shirt!=null&&m.hasOwnProperty("shirt"))w.uint32(32).int32(m.shirt);if(m.pants!=null&&m.hasOwnProperty("pants"))w.uint32(40).int32(m.pants);if(m.hat!=null&&m.hasOwnProperty("hat"))w.uint32(48).int32(m.hat);if(m.shoes!=null&&m.hasOwnProperty("shoes"))w.uint32(56).int32(m.shoes);if(m.avatar!=null&&m.hasOwnProperty("avatar"))w.uint32(64).int32(m.avatar);if(m.eyes!=null&&m.hasOwnProperty("eyes"))w.uint32(72).int32(m.eyes);if(m.backpack!=null&&m.hasOwnProperty("backpack"))w.uint32(80).int32(m.backpack);if(m.avatar_hair!=null&&m.hasOwnProperty("avatar_hair"))w.uint32(90).string(m.avatar_hair);if(m.avatar_shirt!=null&&m.hasOwnProperty("avatar_shirt"))w.uint32(98).string(m.avatar_shirt);if(m.avatar_pants!=null&&m.hasOwnProperty("avatar_pants"))w.uint32(106).string(m.avatar_pants);if(m.avatar_hat!=null&&m.hasOwnProperty("avatar_hat"))w.uint32(114).string(m.avatar_hat);if(m.avatar_shoes!=null&&m.hasOwnProperty("avatar_shoes"))w.uint32(122).string(m.avatar_shoes);if(m.avatar_eyes!=null&&m.hasOwnProperty("avatar_eyes"))w.uint32(130).string(m.avatar_eyes);if(m.avatar_backpack!=null&&m.hasOwnProperty("avatar_backpack"))w.uint32(138).string(m.avatar_backpack);if(m.avatar_gloves!=null&&m.hasOwnProperty("avatar_gloves"))w.uint32(146).string(m.avatar_gloves);if(m.avatar_socks!=null&&m.hasOwnProperty("avatar_socks"))w.uint32(154).string(m.avatar_socks);if(m.avatar_belt!=null&&m.hasOwnProperty("avatar_belt"))w.uint32(162).string(m.avatar_belt);if(m.avatar_glasses!=null&&m.hasOwnProperty("avatar_glasses"))w.uint32(170).string(m.avatar_glasses);if(m.avatar_necklace!=null&&m.hasOwnProperty("avatar_necklace"))w.uint32(178).string(m.avatar_necklace);return w};PlayerAvatar.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.PlayerAvatar;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 2:m.skin=r.int32();break;case 3:m.hair=r.int32();break;case 4:m.shirt=r.int32();break;case 5:m.pants=r.int32();break;case 6:m.hat=r.int32();break;case 7:m.shoes=r.int32();break;case 8:m.avatar=r.int32();break;case 9:m.eyes=r.int32();break;case 10:m.backpack=r.int32();break;case 11:m.avatar_hair=r.string();break;case 12:m.avatar_shirt=r.string();break;case 13:m.avatar_pants=r.string();break;case 14:m.avatar_hat=r.string();break;case 15:m.avatar_shoes=r.string();break;case 16:m.avatar_eyes=r.string();break;case 17:m.avatar_backpack=r.string();break;case 18:m.avatar_gloves=r.string();break;case 19:m.avatar_socks=r.string();break;case 20:m.avatar_belt=r.string();break;case 21:m.avatar_glasses=r.string();break;case 22:m.avatar_necklace=r.string();break;default:r.skipType(t&7);break}}return m};PlayerAvatar.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.PlayerAvatar)return d;var m=new $root.POGOProtos.Data.Player.PlayerAvatar;if(d.skin!=null){m.skin=d.skin|0}if(d.hair!=null){m.hair=d.hair|0}if(d.shirt!=null){m.shirt=d.shirt|0}if(d.pants!=null){m.pants=d.pants|0}if(d.hat!=null){m.hat=d.hat|0}if(d.shoes!=null){m.shoes=d.shoes|0}if(d.avatar!=null){m.avatar=d.avatar|0}if(d.eyes!=null){m.eyes=d.eyes|0}if(d.backpack!=null){m.backpack=d.backpack|0}if(d.avatar_hair!=null){m.avatar_hair=String(d.avatar_hair)}if(d.avatar_shirt!=null){m.avatar_shirt=String(d.avatar_shirt)}if(d.avatar_pants!=null){m.avatar_pants=String(d.avatar_pants)}if(d.avatar_hat!=null){m.avatar_hat=String(d.avatar_hat)}if(d.avatar_shoes!=null){m.avatar_shoes=String(d.avatar_shoes)}if(d.avatar_eyes!=null){m.avatar_eyes=String(d.avatar_eyes)}if(d.avatar_backpack!=null){m.avatar_backpack=String(d.avatar_backpack)}if(d.avatar_gloves!=null){m.avatar_gloves=String(d.avatar_gloves)}if(d.avatar_socks!=null){m.avatar_socks=String(d.avatar_socks)}if(d.avatar_belt!=null){m.avatar_belt=String(d.avatar_belt)}if(d.avatar_glasses!=null){m.avatar_glasses=String(d.avatar_glasses)}if(d.avatar_necklace!=null){m.avatar_necklace=String(d.avatar_necklace)}return m};PlayerAvatar.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.skin=0;d.hair=0;d.shirt=0;d.pants=0;d.hat=0;d.shoes=0;d.avatar=0;d.eyes=0;d.backpack=0;d.avatar_hair="";d.avatar_shirt="";d.avatar_pants="";d.avatar_hat="";d.avatar_shoes="";d.avatar_eyes="";d.avatar_backpack="";d.avatar_gloves="";d.avatar_socks="";d.avatar_belt="";d.avatar_glasses="";d.avatar_necklace=""}if(m.skin!=null&&m.hasOwnProperty("skin")){d.skin=m.skin}if(m.hair!=null&&m.hasOwnProperty("hair")){d.hair=m.hair}if(m.shirt!=null&&m.hasOwnProperty("shirt")){d.shirt=m.shirt}if(m.pants!=null&&m.hasOwnProperty("pants")){d.pants=m.pants}if(m.hat!=null&&m.hasOwnProperty("hat")){d.hat=m.hat}if(m.shoes!=null&&m.hasOwnProperty("shoes")){d.shoes=m.shoes}if(m.avatar!=null&&m.hasOwnProperty("avatar")){d.avatar=m.avatar}if(m.eyes!=null&&m.hasOwnProperty("eyes")){d.eyes=m.eyes}if(m.backpack!=null&&m.hasOwnProperty("backpack")){d.backpack=m.backpack}if(m.avatar_hair!=null&&m.hasOwnProperty("avatar_hair")){d.avatar_hair=m.avatar_hair}if(m.avatar_shirt!=null&&m.hasOwnProperty("avatar_shirt")){d.avatar_shirt=m.avatar_shirt}if(m.avatar_pants!=null&&m.hasOwnProperty("avatar_pants")){d.avatar_pants=m.avatar_pants}if(m.avatar_hat!=null&&m.hasOwnProperty("avatar_hat")){d.avatar_hat=m.avatar_hat}if(m.avatar_shoes!=null&&m.hasOwnProperty("avatar_shoes")){d.avatar_shoes=m.avatar_shoes}if(m.avatar_eyes!=null&&m.hasOwnProperty("avatar_eyes")){d.avatar_eyes=m.avatar_eyes}if(m.avatar_backpack!=null&&m.hasOwnProperty("avatar_backpack")){d.avatar_backpack=m.avatar_backpack}if(m.avatar_gloves!=null&&m.hasOwnProperty("avatar_gloves")){d.avatar_gloves=m.avatar_gloves}if(m.avatar_socks!=null&&m.hasOwnProperty("avatar_socks")){d.avatar_socks=m.avatar_socks}if(m.avatar_belt!=null&&m.hasOwnProperty("avatar_belt")){d.avatar_belt=m.avatar_belt}if(m.avatar_glasses!=null&&m.hasOwnProperty("avatar_glasses")){d.avatar_glasses=m.avatar_glasses}if(m.avatar_necklace!=null&&m.hasOwnProperty("avatar_necklace")){d.avatar_necklace=m.avatar_necklace}return d};PlayerAvatar.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlayerAvatar}();Player.PlayerAvatarType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="PLAYER_AVATAR_MALE"]=0;values[valuesById[1]="PLAYER_AVATAR_FEMALE"]=1;return values}();Player.PlayerBadge=function(){function PlayerBadge(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerBadge.prototype.badge_type=0;PlayerBadge.prototype.rank=0;PlayerBadge.prototype.start_value=0;PlayerBadge.prototype.end_value=0;PlayerBadge.prototype.current_value=0;PlayerBadge.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.badge_type!=null&&m.hasOwnProperty("badge_type"))w.uint32(8).int32(m.badge_type);if(m.rank!=null&&m.hasOwnProperty("rank"))w.uint32(16).int32(m.rank);if(m.start_value!=null&&m.hasOwnProperty("start_value"))w.uint32(24).int32(m.start_value);if(m.end_value!=null&&m.hasOwnProperty("end_value"))w.uint32(32).int32(m.end_value);if(m.current_value!=null&&m.hasOwnProperty("current_value"))w.uint32(41).double(m.current_value);return w};PlayerBadge.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.PlayerBadge;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.badge_type=r.int32();break;case 2:m.rank=r.int32();break;case 3:m.start_value=r.int32();break;case 4:m.end_value=r.int32();break;case 5:m.current_value=r.double();break;default:r.skipType(t&7);break}}return m};PlayerBadge.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.PlayerBadge)return d;var m=new $root.POGOProtos.Data.Player.PlayerBadge;switch(d.badge_type){case"BADGE_UNSET":case 0:m.badge_type=0;break;case"BADGE_TRAVEL_KM":case 1:m.badge_type=1;break;case"BADGE_POKEDEX_ENTRIES":case 2:m.badge_type=2;break;case"BADGE_CAPTURE_TOTAL":case 3:m.badge_type=3;break;case"BADGE_DEFEATED_FORT":case 4:m.badge_type=4;break;case"BADGE_EVOLVED_TOTAL":case 5:m.badge_type=5;break;case"BADGE_HATCHED_TOTAL":case 6:m.badge_type=6;break;case"BADGE_ENCOUNTERED_TOTAL":case 7:m.badge_type=7;break;case"BADGE_POKESTOPS_VISITED":case 8:m.badge_type=8;break;case"BADGE_UNIQUE_POKESTOPS":case 9:m.badge_type=9;break;case"BADGE_POKEBALL_THROWN":case 10:m.badge_type=10;break;case"BADGE_BIG_MAGIKARP":case 11:m.badge_type=11;break;case"BADGE_DEPLOYED_TOTAL":case 12:m.badge_type=12;break;case"BADGE_BATTLE_ATTACK_WON":case 13:m.badge_type=13;break;case"BADGE_BATTLE_TRAINING_WON":case 14:m.badge_type=14;break;case"BADGE_BATTLE_DEFEND_WON":case 15:m.badge_type=15;break;case"BADGE_PRESTIGE_RAISED":case 16:m.badge_type=16;break;case"BADGE_PRESTIGE_DROPPED":case 17:m.badge_type=17;break;case"BADGE_TYPE_NORMAL":case 18:m.badge_type=18;break;case"BADGE_TYPE_FIGHTING":case 19:m.badge_type=19;break;case"BADGE_TYPE_FLYING":case 20:m.badge_type=20;break;case"BADGE_TYPE_POISON":case 21:m.badge_type=21;break;case"BADGE_TYPE_GROUND":case 22:m.badge_type=22;break;case"BADGE_TYPE_ROCK":case 23:m.badge_type=23;break;case"BADGE_TYPE_BUG":case 24:m.badge_type=24;break;case"BADGE_TYPE_GHOST":case 25:m.badge_type=25;break;case"BADGE_TYPE_STEEL":case 26:m.badge_type=26;break;case"BADGE_TYPE_FIRE":case 27:m.badge_type=27;break;case"BADGE_TYPE_WATER":case 28:m.badge_type=28;break;case"BADGE_TYPE_GRASS":case 29:m.badge_type=29;break;case"BADGE_TYPE_ELECTRIC":case 30:m.badge_type=30;break;case"BADGE_TYPE_PSYCHIC":case 31:m.badge_type=31;break;case"BADGE_TYPE_ICE":case 32:m.badge_type=32;break;case"BADGE_TYPE_DRAGON":case 33:m.badge_type=33;break;case"BADGE_TYPE_DARK":case 34:m.badge_type=34;break;case"BADGE_TYPE_FAIRY":case 35:m.badge_type=35;break;case"BADGE_SMALL_RATTATA":case 36:m.badge_type=36;break;case"BADGE_PIKACHU":case 37:m.badge_type=37;break;case"BADGE_UNOWN":case 38:m.badge_type=38;break;case"BADGE_POKEDEX_ENTRIES_GEN2":case 39:m.badge_type=39;break;case"BADGE_RAID_BATTLE_WON":case 40:m.badge_type=40;break;case"BADGE_LEGENDARY_BATTLE_WON":case 41:m.badge_type=41;break;case"BADGE_BERRIES_FED":case 42:m.badge_type=42;break;case"BADGE_HOURS_DEFENDED":case 43:m.badge_type=43;break;case"BADGE_PLACE_HOLDER":case 44:m.badge_type=44;break;case"BADGE_POKEDEX_ENTRIES_GEN3":case 45:m.badge_type=45;break;case"BADGE_CHALLENGE_QUESTS":case 46:m.badge_type=46;break;case"BADGE_MEW_ENCOUNTER":case 47:m.badge_type=47;break;case"BADGE_MAX_LEVEL_FRIENDS":case 48:m.badge_type=48;break;case"BADGE_TRADING":case 49:m.badge_type=49;break;case"BADGE_TRADING_DISTANCE":case 50:m.badge_type=50;break;case"BADGE_POKEDEX_ENTRIES_GEN4":case 51:m.badge_type=51;break;case"BADGE_GREAT_LEAGUE":case 52:m.badge_type=52;break;case"BADGE_ULTRA_LEAGUE":case 53:m.badge_type=53;break;case"BADGE_MASTER_LEAGUE":case 54:m.badge_type=54;break;case"BADGE_EVENT_MIN":case 2e3:m.badge_type=2e3;break;case"BADGE_CHICAGO_FEST_JULY_2017":case 2001:m.badge_type=2001;break;case"BADGE_PIKACHU_OUTBREAK_YOKOHAMA_2017":case 2002:m.badge_type=2002;break;case"BADGE_SAFARI_ZONE_EUROPE_2017":case 2003:m.badge_type=2003;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_07":case 2004:m.badge_type=2004;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_14":case 2005:m.badge_type=2005;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_NORTH":case 2006:m.badge_type=2006;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_SOUTH":case 2007:m.badge_type=2007;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_NORTH":case 2008:m.badge_type=2008;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_SOUTH":case 2009:m.badge_type=2009;break;case"BADGE_APAC_PARTNER_JULY_2018_0":case 2010:m.badge_type=2010;break;case"BADGE_APAC_PARTNER_JULY_2018_1":case 2011:m.badge_type=2011;break;case"BADGE_APAC_PARTNER_JULY_2018_2":case 2012:m.badge_type=2012;break;case"BADGE_APAC_PARTNER_JULY_2018_3":case 2013:m.badge_type=2013;break;case"BADGE_APAC_PARTNER_JULY_2018_4":case 2014:m.badge_type=2014;break;case"BADGE_APAC_PARTNER_JULY_2018_5":case 2015:m.badge_type=2015;break;case"BADGE_APAC_PARTNER_JULY_2018_6":case 2016:m.badge_type=2016;break;case"BADGE_APAC_PARTNER_JULY_2018_7":case 2017:m.badge_type=2017;break;case"BADGE_APAC_PARTNER_JULY_2018_8":case 2018:m.badge_type=2018;break;case"BADGE_APAC_PARTNER_JULY_2018_9":case 2019:m.badge_type=2019;break;case"BADGE_YOKOSUKA_29_AUG_2018_MIKASA":case 2020:m.badge_type=2020;break;case"BADGE_YOKOSUKA_29_AUG_2018_VERNY":case 2021:m.badge_type=2021;break;case"BADGE_YOKOSUKA_29_AUG_2018_KURIHAMA":case 2022:m.badge_type=2022;break;case"BADGE_YOKOSUKA_30_AUG_2018_MIKASA":case 2023:m.badge_type=2023;break;case"BADGE_YOKOSUKA_30_AUG_2018_VERNY":case 2024:m.badge_type=2024;break;case"BADGE_YOKOSUKA_30_AUG_2018_KURIHAMA":case 2025:m.badge_type=2025;break;case"BADGE_YOKOSUKA_31_AUG_2018_MIKASA":case 2026:m.badge_type=2026;break;case"BADGE_YOKOSUKA_31_AUG_2018_VERNY":case 2027:m.badge_type=2027;break;case"BADGE_YOKOSUKA_31_AUG_2018_KURIHAMA":case 2028:m.badge_type=2028;break;case"BADGE_YOKOSUKA_1_SEP_2018_MIKASA":case 2029:m.badge_type=2029;break;case"BADGE_YOKOSUKA_1_SEP_2018_VERNY":case 2030:m.badge_type=2030;break;case"BADGE_YOKOSUKA_1_SEP_2018_KURIHAMA":case 2031:m.badge_type=2031;break;case"BADGE_YOKOSUKA_2_SEP_2018_MIKASA":case 2032:m.badge_type=2032;break;case"BADGE_YOKOSUKA_2_SEP_2018_VERNY":case 2033:m.badge_type=2033;break;case"BADGE_YOKOSUKA_2_SEP_2018_KURIHAMA":case 2034:m.badge_type=2034;break;case"BADGE_TOP_BANANA_1":case 2035:m.badge_type=2035;break;case"BADGE_TOP_BANANA_2":case 2036:m.badge_type=2036;break;case"BADGE_TOP_BANANA_3":case 2037:m.badge_type=2037;break}if(d.rank!=null){m.rank=d.rank|0}if(d.start_value!=null){m.start_value=d.start_value|0}if(d.end_value!=null){m.end_value=d.end_value|0}if(d.current_value!=null){m.current_value=Number(d.current_value)}return m};PlayerBadge.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.badge_type=o.enums===String?"BADGE_UNSET":0;d.rank=0;d.start_value=0;d.end_value=0;d.current_value=0}if(m.badge_type!=null&&m.hasOwnProperty("badge_type")){d.badge_type=o.enums===String?$root.POGOProtos.Enums.BadgeType[m.badge_type]:m.badge_type}if(m.rank!=null&&m.hasOwnProperty("rank")){d.rank=m.rank}if(m.start_value!=null&&m.hasOwnProperty("start_value")){d.start_value=m.start_value}if(m.end_value!=null&&m.hasOwnProperty("end_value")){d.end_value=m.end_value}if(m.current_value!=null&&m.hasOwnProperty("current_value")){d.current_value=o.json&&!isFinite(m.current_value)?String(m.current_value):m.current_value}return d};PlayerBadge.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlayerBadge}();Player.PlayerCamera=function(){function PlayerCamera(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerCamera.prototype.is_default_camera=false;PlayerCamera.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.is_default_camera!=null&&m.hasOwnProperty("is_default_camera"))w.uint32(8).bool(m.is_default_camera);return w};PlayerCamera.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.PlayerCamera;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.is_default_camera=r.bool();break;default:r.skipType(t&7);break}}return m};PlayerCamera.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.PlayerCamera)return d;var m=new $root.POGOProtos.Data.Player.PlayerCamera;if(d.is_default_camera!=null){m.is_default_camera=Boolean(d.is_default_camera)}return m};PlayerCamera.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.is_default_camera=false}if(m.is_default_camera!=null&&m.hasOwnProperty("is_default_camera")){d.is_default_camera=m.is_default_camera}return d};PlayerCamera.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlayerCamera}();Player.PlayerChurnParameters=function(){function PlayerChurnParameters(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerChurnParameters.prototype.account_id="";PlayerChurnParameters.prototype.code_name="";PlayerChurnParameters.prototype.team="";PlayerChurnParameters.prototype.country="";PlayerChurnParameters.prototype.level=0;PlayerChurnParameters.prototype.total_pokemon_caught=0;PlayerChurnParameters.prototype.gifts_opened_daily=0;PlayerChurnParameters.prototype.total_big_karps=0;PlayerChurnParameters.prototype.stardust_balance=0;PlayerChurnParameters.prototype.total_raids=0;PlayerChurnParameters.prototype.total_pokemon_evolved=0;PlayerChurnParameters.prototype.total_legendary_raids=0;PlayerChurnParameters.prototype.total_eggs_hatched=0;PlayerChurnParameters.prototype.total_battle_attack_won=0;PlayerChurnParameters.prototype.total_battle_defended_won=0;PlayerChurnParameters.prototype.total_quests_completed=0;PlayerChurnParameters.prototype.poke_coin_balance=0;PlayerChurnParameters.prototype.pokemon_caught_active_day=0;PlayerChurnParameters.prototype.total_km_walked=0;PlayerChurnParameters.prototype.num_pokedex_entries=0;PlayerChurnParameters.prototype.km_walked_past_active_day=0;PlayerChurnParameters.prototype.days_since_last_logon=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerChurnParameters.prototype.days_since_creation=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerChurnParameters.prototype.days_since_last_pokemon_caught=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerChurnParameters.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.account_id!=null&&m.hasOwnProperty("account_id"))w.uint32(10).string(m.account_id);if(m.code_name!=null&&m.hasOwnProperty("code_name"))w.uint32(18).string(m.code_name);if(m.team!=null&&m.hasOwnProperty("team"))w.uint32(26).string(m.team);if(m.country!=null&&m.hasOwnProperty("country"))w.uint32(34).string(m.country);if(m.level!=null&&m.hasOwnProperty("level"))w.uint32(40).int32(m.level);if(m.total_pokemon_caught!=null&&m.hasOwnProperty("total_pokemon_caught"))w.uint32(48).int32(m.total_pokemon_caught);if(m.gifts_opened_daily!=null&&m.hasOwnProperty("gifts_opened_daily"))w.uint32(56).int32(m.gifts_opened_daily);if(m.total_big_karps!=null&&m.hasOwnProperty("total_big_karps"))w.uint32(64).int32(m.total_big_karps);if(m.stardust_balance!=null&&m.hasOwnProperty("stardust_balance"))w.uint32(72).int32(m.stardust_balance);if(m.total_raids!=null&&m.hasOwnProperty("total_raids"))w.uint32(80).int32(m.total_raids);if(m.total_pokemon_evolved!=null&&m.hasOwnProperty("total_pokemon_evolved"))w.uint32(88).int32(m.total_pokemon_evolved);if(m.total_legendary_raids!=null&&m.hasOwnProperty("total_legendary_raids"))w.uint32(96).int32(m.total_legendary_raids);if(m.total_eggs_hatched!=null&&m.hasOwnProperty("total_eggs_hatched"))w.uint32(104).int32(m.total_eggs_hatched);if(m.total_battle_attack_won!=null&&m.hasOwnProperty("total_battle_attack_won"))w.uint32(112).int32(m.total_battle_attack_won);if(m.total_battle_defended_won!=null&&m.hasOwnProperty("total_battle_defended_won"))w.uint32(120).int32(m.total_battle_defended_won);if(m.total_quests_completed!=null&&m.hasOwnProperty("total_quests_completed"))w.uint32(128).int32(m.total_quests_completed);if(m.poke_coin_balance!=null&&m.hasOwnProperty("poke_coin_balance"))w.uint32(136).int32(m.poke_coin_balance);if(m.pokemon_caught_active_day!=null&&m.hasOwnProperty("pokemon_caught_active_day"))w.uint32(144).int32(m.pokemon_caught_active_day);if(m.total_km_walked!=null&&m.hasOwnProperty("total_km_walked"))w.uint32(157).float(m.total_km_walked);if(m.num_pokedex_entries!=null&&m.hasOwnProperty("num_pokedex_entries"))w.uint32(165).float(m.num_pokedex_entries);if(m.km_walked_past_active_day!=null&&m.hasOwnProperty("km_walked_past_active_day"))w.uint32(173).float(m.km_walked_past_active_day);if(m.days_since_last_logon!=null&&m.hasOwnProperty("days_since_last_logon"))w.uint32(176).int64(m.days_since_last_logon);if(m.days_since_creation!=null&&m.hasOwnProperty("days_since_creation"))w.uint32(184).int64(m.days_since_creation);if(m.days_since_last_pokemon_caught!=null&&m.hasOwnProperty("days_since_last_pokemon_caught"))w.uint32(192).int64(m.days_since_last_pokemon_caught);return w};PlayerChurnParameters.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.PlayerChurnParameters;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.account_id=r.string();break;case 2:m.code_name=r.string();break;case 3:m.team=r.string();break;case 4:m.country=r.string();break;case 5:m.level=r.int32();break;case 6:m.total_pokemon_caught=r.int32();break;case 7:m.gifts_opened_daily=r.int32();break;case 8:m.total_big_karps=r.int32();break;case 9:m.stardust_balance=r.int32();break;case 10:m.total_raids=r.int32();break;case 11:m.total_pokemon_evolved=r.int32();break;case 12:m.total_legendary_raids=r.int32();break;case 13:m.total_eggs_hatched=r.int32();break;case 14:m.total_battle_attack_won=r.int32();break;case 15:m.total_battle_defended_won=r.int32();break;case 16:m.total_quests_completed=r.int32();break;case 17:m.poke_coin_balance=r.int32();break;case 18:m.pokemon_caught_active_day=r.int32();break;case 19:m.total_km_walked=r.float();break;case 20:m.num_pokedex_entries=r.float();break;case 21:m.km_walked_past_active_day=r.float();break;case 22:m.days_since_last_logon=r.int64();break;case 23:m.days_since_creation=r.int64();break;case 24:m.days_since_last_pokemon_caught=r.int64();break;default:r.skipType(t&7);break}}return m};PlayerChurnParameters.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.PlayerChurnParameters)return d;var m=new $root.POGOProtos.Data.Player.PlayerChurnParameters;if(d.account_id!=null){m.account_id=String(d.account_id)}if(d.code_name!=null){m.code_name=String(d.code_name)}if(d.team!=null){m.team=String(d.team)}if(d.country!=null){m.country=String(d.country)}if(d.level!=null){m.level=d.level|0}if(d.total_pokemon_caught!=null){m.total_pokemon_caught=d.total_pokemon_caught|0}if(d.gifts_opened_daily!=null){m.gifts_opened_daily=d.gifts_opened_daily|0}if(d.total_big_karps!=null){m.total_big_karps=d.total_big_karps|0}if(d.stardust_balance!=null){m.stardust_balance=d.stardust_balance|0}if(d.total_raids!=null){m.total_raids=d.total_raids|0}if(d.total_pokemon_evolved!=null){m.total_pokemon_evolved=d.total_pokemon_evolved|0}if(d.total_legendary_raids!=null){m.total_legendary_raids=d.total_legendary_raids|0}if(d.total_eggs_hatched!=null){m.total_eggs_hatched=d.total_eggs_hatched|0}if(d.total_battle_attack_won!=null){m.total_battle_attack_won=d.total_battle_attack_won|0}if(d.total_battle_defended_won!=null){m.total_battle_defended_won=d.total_battle_defended_won|0}if(d.total_quests_completed!=null){m.total_quests_completed=d.total_quests_completed|0}if(d.poke_coin_balance!=null){m.poke_coin_balance=d.poke_coin_balance|0}if(d.pokemon_caught_active_day!=null){m.pokemon_caught_active_day=d.pokemon_caught_active_day|0}if(d.total_km_walked!=null){m.total_km_walked=Number(d.total_km_walked)}if(d.num_pokedex_entries!=null){m.num_pokedex_entries=Number(d.num_pokedex_entries)}if(d.km_walked_past_active_day!=null){m.km_walked_past_active_day=Number(d.km_walked_past_active_day)}if(d.days_since_last_logon!=null){if($util.Long)(m.days_since_last_logon=$util.Long.fromValue(d.days_since_last_logon)).unsigned=false;else if(typeof d.days_since_last_logon==="string")m.days_since_last_logon=parseInt(d.days_since_last_logon,10);else if(typeof d.days_since_last_logon==="number")m.days_since_last_logon=d.days_since_last_logon;else if(typeof d.days_since_last_logon==="object")m.days_since_last_logon=new $util.LongBits(d.days_since_last_logon.low>>>0,d.days_since_last_logon.high>>>0).toNumber()}if(d.days_since_creation!=null){if($util.Long)(m.days_since_creation=$util.Long.fromValue(d.days_since_creation)).unsigned=false;else if(typeof d.days_since_creation==="string")m.days_since_creation=parseInt(d.days_since_creation,10);else if(typeof d.days_since_creation==="number")m.days_since_creation=d.days_since_creation;else if(typeof d.days_since_creation==="object")m.days_since_creation=new $util.LongBits(d.days_since_creation.low>>>0,d.days_since_creation.high>>>0).toNumber()}if(d.days_since_last_pokemon_caught!=null){if($util.Long)(m.days_since_last_pokemon_caught=$util.Long.fromValue(d.days_since_last_pokemon_caught)).unsigned=false;else if(typeof d.days_since_last_pokemon_caught==="string")m.days_since_last_pokemon_caught=parseInt(d.days_since_last_pokemon_caught,10);else if(typeof d.days_since_last_pokemon_caught==="number")m.days_since_last_pokemon_caught=d.days_since_last_pokemon_caught;else if(typeof d.days_since_last_pokemon_caught==="object")m.days_since_last_pokemon_caught=new $util.LongBits(d.days_since_last_pokemon_caught.low>>>0,d.days_since_last_pokemon_caught.high>>>0).toNumber()}return m};PlayerChurnParameters.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.account_id="";d.code_name="";d.team="";d.country="";d.level=0;d.total_pokemon_caught=0;d.gifts_opened_daily=0;d.total_big_karps=0;d.stardust_balance=0;d.total_raids=0;d.total_pokemon_evolved=0;d.total_legendary_raids=0;d.total_eggs_hatched=0;d.total_battle_attack_won=0;d.total_battle_defended_won=0;d.total_quests_completed=0;d.poke_coin_balance=0;d.pokemon_caught_active_day=0;d.total_km_walked=0;d.num_pokedex_entries=0;d.km_walked_past_active_day=0;if($util.Long){var n=new $util.Long(0,0,false);d.days_since_last_logon=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.days_since_last_logon=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.days_since_creation=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.days_since_creation=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.days_since_last_pokemon_caught=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.days_since_last_pokemon_caught=o.longs===String?"0":0}if(m.account_id!=null&&m.hasOwnProperty("account_id")){d.account_id=m.account_id}if(m.code_name!=null&&m.hasOwnProperty("code_name")){d.code_name=m.code_name}if(m.team!=null&&m.hasOwnProperty("team")){d.team=m.team}if(m.country!=null&&m.hasOwnProperty("country")){d.country=m.country}if(m.level!=null&&m.hasOwnProperty("level")){d.level=m.level}if(m.total_pokemon_caught!=null&&m.hasOwnProperty("total_pokemon_caught")){d.total_pokemon_caught=m.total_pokemon_caught}if(m.gifts_opened_daily!=null&&m.hasOwnProperty("gifts_opened_daily")){d.gifts_opened_daily=m.gifts_opened_daily}if(m.total_big_karps!=null&&m.hasOwnProperty("total_big_karps")){d.total_big_karps=m.total_big_karps}if(m.stardust_balance!=null&&m.hasOwnProperty("stardust_balance")){d.stardust_balance=m.stardust_balance}if(m.total_raids!=null&&m.hasOwnProperty("total_raids")){d.total_raids=m.total_raids}if(m.total_pokemon_evolved!=null&&m.hasOwnProperty("total_pokemon_evolved")){d.total_pokemon_evolved=m.total_pokemon_evolved}if(m.total_legendary_raids!=null&&m.hasOwnProperty("total_legendary_raids")){d.total_legendary_raids=m.total_legendary_raids}if(m.total_eggs_hatched!=null&&m.hasOwnProperty("total_eggs_hatched")){d.total_eggs_hatched=m.total_eggs_hatched}if(m.total_battle_attack_won!=null&&m.hasOwnProperty("total_battle_attack_won")){d.total_battle_attack_won=m.total_battle_attack_won}if(m.total_battle_defended_won!=null&&m.hasOwnProperty("total_battle_defended_won")){d.total_battle_defended_won=m.total_battle_defended_won}if(m.total_quests_completed!=null&&m.hasOwnProperty("total_quests_completed")){d.total_quests_completed=m.total_quests_completed}if(m.poke_coin_balance!=null&&m.hasOwnProperty("poke_coin_balance")){d.poke_coin_balance=m.poke_coin_balance}if(m.pokemon_caught_active_day!=null&&m.hasOwnProperty("pokemon_caught_active_day")){d.pokemon_caught_active_day=m.pokemon_caught_active_day}if(m.total_km_walked!=null&&m.hasOwnProperty("total_km_walked")){d.total_km_walked=o.json&&!isFinite(m.total_km_walked)?String(m.total_km_walked):m.total_km_walked}if(m.num_pokedex_entries!=null&&m.hasOwnProperty("num_pokedex_entries")){d.num_pokedex_entries=o.json&&!isFinite(m.num_pokedex_entries)?String(m.num_pokedex_entries):m.num_pokedex_entries}if(m.km_walked_past_active_day!=null&&m.hasOwnProperty("km_walked_past_active_day")){d.km_walked_past_active_day=o.json&&!isFinite(m.km_walked_past_active_day)?String(m.km_walked_past_active_day):m.km_walked_past_active_day}if(m.days_since_last_logon!=null&&m.hasOwnProperty("days_since_last_logon")){if(typeof m.days_since_last_logon==="number")d.days_since_last_logon=o.longs===String?String(m.days_since_last_logon):m.days_since_last_logon;else d.days_since_last_logon=o.longs===String?$util.Long.prototype.toString.call(m.days_since_last_logon):o.longs===Number?new $util.LongBits(m.days_since_last_logon.low>>>0,m.days_since_last_logon.high>>>0).toNumber():m.days_since_last_logon}if(m.days_since_creation!=null&&m.hasOwnProperty("days_since_creation")){if(typeof m.days_since_creation==="number")d.days_since_creation=o.longs===String?String(m.days_since_creation):m.days_since_creation;else d.days_since_creation=o.longs===String?$util.Long.prototype.toString.call(m.days_since_creation):o.longs===Number?new $util.LongBits(m.days_since_creation.low>>>0,m.days_since_creation.high>>>0).toNumber():m.days_since_creation}if(m.days_since_last_pokemon_caught!=null&&m.hasOwnProperty("days_since_last_pokemon_caught")){if(typeof m.days_since_last_pokemon_caught==="number")d.days_since_last_pokemon_caught=o.longs===String?String(m.days_since_last_pokemon_caught):m.days_since_last_pokemon_caught;else d.days_since_last_pokemon_caught=o.longs===String?$util.Long.prototype.toString.call(m.days_since_last_pokemon_caught):o.longs===Number?new $util.LongBits(m.days_since_last_pokemon_caught.low>>>0,m.days_since_last_pokemon_caught.high>>>0).toNumber():m.days_since_last_pokemon_caught}return d};PlayerChurnParameters.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlayerChurnParameters}();Player.PlayerCurrency=function(){function PlayerCurrency(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerCurrency.prototype.gems=0;PlayerCurrency.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gems!=null&&m.hasOwnProperty("gems"))w.uint32(8).int32(m.gems);return w};PlayerCurrency.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.PlayerCurrency;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gems=r.int32();break;default:r.skipType(t&7);break}}return m};PlayerCurrency.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.PlayerCurrency)return d;var m=new $root.POGOProtos.Data.Player.PlayerCurrency;if(d.gems!=null){m.gems=d.gems|0}return m};PlayerCurrency.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.gems=0}if(m.gems!=null&&m.hasOwnProperty("gems")){d.gems=m.gems}return d};PlayerCurrency.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlayerCurrency}();Player.PlayerPublicProfile=function(){function PlayerPublicProfile(p){this.badges=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerPublicProfile.prototype.name="";PlayerPublicProfile.prototype.level=0;PlayerPublicProfile.prototype.avatar=null;PlayerPublicProfile.prototype.team_color=0;PlayerPublicProfile.prototype.battles_won=0;PlayerPublicProfile.prototype.km_walked=0;PlayerPublicProfile.prototype.caught_pokemon=0;PlayerPublicProfile.prototype.gym_badge_type=0;PlayerPublicProfile.prototype.badges=$util.emptyArray;PlayerPublicProfile.prototype.experience=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerPublicProfile.prototype.has_shared_ex_pass=false;PlayerPublicProfile.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.name!=null&&m.hasOwnProperty("name"))w.uint32(10).string(m.name);if(m.level!=null&&m.hasOwnProperty("level"))w.uint32(16).int32(m.level);if(m.avatar!=null&&m.hasOwnProperty("avatar"))$root.POGOProtos.Data.Player.PlayerAvatar.encode(m.avatar,w.uint32(26).fork()).ldelim();if(m.team_color!=null&&m.hasOwnProperty("team_color"))w.uint32(32).int32(m.team_color);if(m.battles_won!=null&&m.hasOwnProperty("battles_won"))w.uint32(40).int32(m.battles_won);if(m.km_walked!=null&&m.hasOwnProperty("km_walked"))w.uint32(53).float(m.km_walked);if(m.caught_pokemon!=null&&m.hasOwnProperty("caught_pokemon"))w.uint32(56).int32(m.caught_pokemon);if(m.gym_badge_type!=null&&m.hasOwnProperty("gym_badge_type"))w.uint32(64).int32(m.gym_badge_type);if(m.badges!=null&&m.badges.length){for(var i=0;i<m.badges.length;++i)$root.POGOProtos.Data.Player.PlayerBadge.encode(m.badges[i],w.uint32(74).fork()).ldelim()}if(m.experience!=null&&m.hasOwnProperty("experience"))w.uint32(80).int64(m.experience);if(m.has_shared_ex_pass!=null&&m.hasOwnProperty("has_shared_ex_pass"))w.uint32(88).bool(m.has_shared_ex_pass);return w};PlayerPublicProfile.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.PlayerPublicProfile;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.name=r.string();break;case 2:m.level=r.int32();break;case 3:m.avatar=$root.POGOProtos.Data.Player.PlayerAvatar.decode(r,r.uint32());break;case 4:m.team_color=r.int32();break;case 5:m.battles_won=r.int32();break;case 6:m.km_walked=r.float();break;case 7:m.caught_pokemon=r.int32();break;case 8:m.gym_badge_type=r.int32();break;case 9:if(!(m.badges&&m.badges.length))m.badges=[];m.badges.push($root.POGOProtos.Data.Player.PlayerBadge.decode(r,r.uint32()));break;case 10:m.experience=r.int64();break;case 11:m.has_shared_ex_pass=r.bool();break;default:r.skipType(t&7);break}}return m};PlayerPublicProfile.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.PlayerPublicProfile)return d;var m=new $root.POGOProtos.Data.Player.PlayerPublicProfile;if(d.name!=null){m.name=String(d.name)}if(d.level!=null){m.level=d.level|0}if(d.avatar!=null){if(typeof d.avatar!=="object")throw TypeError(".POGOProtos.Data.Player.PlayerPublicProfile.avatar: object expected");m.avatar=$root.POGOProtos.Data.Player.PlayerAvatar.fromObject(d.avatar)}switch(d.team_color){case"NEUTRAL":case 0:m.team_color=0;break;case"BLUE":case 1:m.team_color=1;break;case"RED":case 2:m.team_color=2;break;case"YELLOW":case 3:m.team_color=3;break}if(d.battles_won!=null){m.battles_won=d.battles_won|0}if(d.km_walked!=null){m.km_walked=Number(d.km_walked)}if(d.caught_pokemon!=null){m.caught_pokemon=d.caught_pokemon|0}switch(d.gym_badge_type){case"GYM_BADGE_UNSET":case 0:m.gym_badge_type=0;break;case"GYM_BADGE_VANILLA":case 1:m.gym_badge_type=1;break;case"GYM_BADGE_BRONZE":case 2:m.gym_badge_type=2;break;case"GYM_BADGE_SILVER":case 3:m.gym_badge_type=3;break;case"GYM_BADGE_GOLD":case 4:m.gym_badge_type=4;break}if(d.badges){if(!Array.isArray(d.badges))throw TypeError(".POGOProtos.Data.Player.PlayerPublicProfile.badges: array expected");m.badges=[];for(var i=0;i<d.badges.length;++i){if(typeof d.badges[i]!=="object")throw TypeError(".POGOProtos.Data.Player.PlayerPublicProfile.badges: object expected");m.badges[i]=$root.POGOProtos.Data.Player.PlayerBadge.fromObject(d.badges[i])}}if(d.experience!=null){if($util.Long)(m.experience=$util.Long.fromValue(d.experience)).unsigned=false;else if(typeof d.experience==="string")m.experience=parseInt(d.experience,10);else if(typeof d.experience==="number")m.experience=d.experience;else if(typeof d.experience==="object")m.experience=new $util.LongBits(d.experience.low>>>0,d.experience.high>>>0).toNumber()}if(d.has_shared_ex_pass!=null){m.has_shared_ex_pass=Boolean(d.has_shared_ex_pass)}return m};PlayerPublicProfile.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.badges=[]}if(o.defaults){d.name="";d.level=0;d.avatar=null;d.team_color=o.enums===String?"NEUTRAL":0;d.battles_won=0;d.km_walked=0;d.caught_pokemon=0;d.gym_badge_type=o.enums===String?"GYM_BADGE_UNSET":0;if($util.Long){var n=new $util.Long(0,0,false);d.experience=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.experience=o.longs===String?"0":0;d.has_shared_ex_pass=false}if(m.name!=null&&m.hasOwnProperty("name")){d.name=m.name}if(m.level!=null&&m.hasOwnProperty("level")){d.level=m.level}if(m.avatar!=null&&m.hasOwnProperty("avatar")){d.avatar=$root.POGOProtos.Data.Player.PlayerAvatar.toObject(m.avatar,o)}if(m.team_color!=null&&m.hasOwnProperty("team_color")){d.team_color=o.enums===String?$root.POGOProtos.Enums.TeamColor[m.team_color]:m.team_color}if(m.battles_won!=null&&m.hasOwnProperty("battles_won")){d.battles_won=m.battles_won}if(m.km_walked!=null&&m.hasOwnProperty("km_walked")){d.km_walked=o.json&&!isFinite(m.km_walked)?String(m.km_walked):m.km_walked}if(m.caught_pokemon!=null&&m.hasOwnProperty("caught_pokemon")){d.caught_pokemon=m.caught_pokemon}if(m.gym_badge_type!=null&&m.hasOwnProperty("gym_badge_type")){d.gym_badge_type=o.enums===String?$root.POGOProtos.Enums.GymBadgeType[m.gym_badge_type]:m.gym_badge_type}if(m.badges&&m.badges.length){d.badges=[];for(var j=0;j<m.badges.length;++j){d.badges[j]=$root.POGOProtos.Data.Player.PlayerBadge.toObject(m.badges[j],o)}}if(m.experience!=null&&m.hasOwnProperty("experience")){if(typeof m.experience==="number")d.experience=o.longs===String?String(m.experience):m.experience;else d.experience=o.longs===String?$util.Long.prototype.toString.call(m.experience):o.longs===Number?new $util.LongBits(m.experience.low>>>0,m.experience.high>>>0).toNumber():m.experience}if(m.has_shared_ex_pass!=null&&m.hasOwnProperty("has_shared_ex_pass")){d.has_shared_ex_pass=m.has_shared_ex_pass}return d};PlayerPublicProfile.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlayerPublicProfile}();Player.PlayerReputation=function(){function PlayerReputation(p){this.cheat_reputation=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerReputation.prototype.account_age_ms=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerReputation.prototype.player_level=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerReputation.prototype.cheat_reputation=$util.emptyArray;PlayerReputation.prototype.is_minor=false;PlayerReputation.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.account_age_ms!=null&&m.hasOwnProperty("account_age_ms"))w.uint32(8).int64(m.account_age_ms);if(m.player_level!=null&&m.hasOwnProperty("player_level"))w.uint32(16).int64(m.player_level);if(m.cheat_reputation!=null&&m.cheat_reputation.length){w.uint32(26).fork();for(var i=0;i<m.cheat_reputation.length;++i)w.int32(m.cheat_reputation[i]);w.ldelim()}if(m.is_minor!=null&&m.hasOwnProperty("is_minor"))w.uint32(32).bool(m.is_minor);return w};PlayerReputation.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.PlayerReputation;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.account_age_ms=r.int64();break;case 2:m.player_level=r.int64();break;case 3:if(!(m.cheat_reputation&&m.cheat_reputation.length))m.cheat_reputation=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.cheat_reputation.push(r.int32())}else m.cheat_reputation.push(r.int32());break;case 4:m.is_minor=r.bool();break;default:r.skipType(t&7);break}}return m};PlayerReputation.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.PlayerReputation)return d;var m=new $root.POGOProtos.Data.Player.PlayerReputation;if(d.account_age_ms!=null){if($util.Long)(m.account_age_ms=$util.Long.fromValue(d.account_age_ms)).unsigned=false;else if(typeof d.account_age_ms==="string")m.account_age_ms=parseInt(d.account_age_ms,10);else if(typeof d.account_age_ms==="number")m.account_age_ms=d.account_age_ms;else if(typeof d.account_age_ms==="object")m.account_age_ms=new $util.LongBits(d.account_age_ms.low>>>0,d.account_age_ms.high>>>0).toNumber()}if(d.player_level!=null){if($util.Long)(m.player_level=$util.Long.fromValue(d.player_level)).unsigned=false;else if(typeof d.player_level==="string")m.player_level=parseInt(d.player_level,10);else if(typeof d.player_level==="number")m.player_level=d.player_level;else if(typeof d.player_level==="object")m.player_level=new $util.LongBits(d.player_level.low>>>0,d.player_level.high>>>0).toNumber()}if(d.cheat_reputation){if(!Array.isArray(d.cheat_reputation))throw TypeError(".POGOProtos.Data.Player.PlayerReputation.cheat_reputation: array expected");m.cheat_reputation=[];for(var i=0;i<d.cheat_reputation.length;++i){switch(d.cheat_reputation[i]){default:case"UNSET":case 0:m.cheat_reputation[i]=0;break;case"BOT":case 1:m.cheat_reputation[i]=1;break;case"SPOOFER":case 2:m.cheat_reputation[i]=2;break}}}if(d.is_minor!=null){m.is_minor=Boolean(d.is_minor)}return m};PlayerReputation.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.cheat_reputation=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.account_age_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.account_age_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.player_level=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.player_level=o.longs===String?"0":0;d.is_minor=false}if(m.account_age_ms!=null&&m.hasOwnProperty("account_age_ms")){if(typeof m.account_age_ms==="number")d.account_age_ms=o.longs===String?String(m.account_age_ms):m.account_age_ms;else d.account_age_ms=o.longs===String?$util.Long.prototype.toString.call(m.account_age_ms):o.longs===Number?new $util.LongBits(m.account_age_ms.low>>>0,m.account_age_ms.high>>>0).toNumber():m.account_age_ms}if(m.player_level!=null&&m.hasOwnProperty("player_level")){if(typeof m.player_level==="number")d.player_level=o.longs===String?String(m.player_level):m.player_level;else d.player_level=o.longs===String?$util.Long.prototype.toString.call(m.player_level):o.longs===Number?new $util.LongBits(m.player_level.low>>>0,m.player_level.high>>>0).toNumber():m.player_level}if(m.cheat_reputation&&m.cheat_reputation.length){d.cheat_reputation=[];for(var j=0;j<m.cheat_reputation.length;++j){d.cheat_reputation[j]=o.enums===String?$root.POGOProtos.Data.Player.PlayerReputation.CheatReputation[m.cheat_reputation[j]]:m.cheat_reputation[j]}}if(m.is_minor!=null&&m.hasOwnProperty("is_minor")){d.is_minor=m.is_minor}return d};PlayerReputation.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PlayerReputation.CheatReputation=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="BOT"]=1;values[valuesById[2]="SPOOFER"]=2;return values}();return PlayerReputation}();Player.PlayerStats=function(){function PlayerStats(p){this.pokemon_caught_by_type=[];this.event_badges=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerStats.prototype.level=0;PlayerStats.prototype.experience=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerStats.prototype.prev_level_xp=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerStats.prototype.next_level_xp=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerStats.prototype.km_walked=0;PlayerStats.prototype.pokemons_encountered=0;PlayerStats.prototype.unique_pokedex_entries=0;PlayerStats.prototype.pokemons_captured=0;PlayerStats.prototype.evolutions=0;PlayerStats.prototype.poke_stop_visits=0;PlayerStats.prototype.pokeballs_thrown=0;PlayerStats.prototype.eggs_hatched=0;PlayerStats.prototype.big_magikarp_caught=0;PlayerStats.prototype.battle_attack_won=0;PlayerStats.prototype.battle_attack_total=0;PlayerStats.prototype.battle_defended_won=0;PlayerStats.prototype.battle_training_won=0;PlayerStats.prototype.battle_training_total=0;PlayerStats.prototype.prestige_raised_total=0;PlayerStats.prototype.prestige_dropped_total=0;PlayerStats.prototype.pokemon_deployed=0;PlayerStats.prototype.pokemon_caught_by_type=$util.emptyArray;PlayerStats.prototype.small_rattata_caught=0;PlayerStats.prototype.used_km_pool=0;PlayerStats.prototype.last_km_refill_ms=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerStats.prototype.num_raid_battle_won=0;PlayerStats.prototype.num_raid_battle_total=0;PlayerStats.prototype.num_legendary_battle_won=0;PlayerStats.prototype.num_legendary_battle_total=0;PlayerStats.prototype.num_berries_fed=0;PlayerStats.prototype.total_defended_ms=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerStats.prototype.event_badges=$util.emptyArray;PlayerStats.prototype.km_walked_past_active_day=0;PlayerStats.prototype.num_challenge_quests_completed=0;PlayerStats.prototype.num_trades=0;PlayerStats.prototype.num_max_level_friends=0;PlayerStats.prototype.trade_accumulated_distance_km=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerStats.prototype.fitness_report_last_check_bucket=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerStats.prototype.combat_stats=null;PlayerStats.prototype.num_npc_combats_won=0;PlayerStats.prototype.num_npc_combats_total=0;PlayerStats.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.level!=null&&m.hasOwnProperty("level"))w.uint32(8).int32(m.level);if(m.experience!=null&&m.hasOwnProperty("experience"))w.uint32(16).int64(m.experience);if(m.prev_level_xp!=null&&m.hasOwnProperty("prev_level_xp"))w.uint32(24).int64(m.prev_level_xp);if(m.next_level_xp!=null&&m.hasOwnProperty("next_level_xp"))w.uint32(32).int64(m.next_level_xp);if(m.km_walked!=null&&m.hasOwnProperty("km_walked"))w.uint32(45).float(m.km_walked);if(m.pokemons_encountered!=null&&m.hasOwnProperty("pokemons_encountered"))w.uint32(48).int32(m.pokemons_encountered);if(m.unique_pokedex_entries!=null&&m.hasOwnProperty("unique_pokedex_entries"))w.uint32(56).int32(m.unique_pokedex_entries);if(m.pokemons_captured!=null&&m.hasOwnProperty("pokemons_captured"))w.uint32(64).int32(m.pokemons_captured);if(m.evolutions!=null&&m.hasOwnProperty("evolutions"))w.uint32(72).int32(m.evolutions);if(m.poke_stop_visits!=null&&m.hasOwnProperty("poke_stop_visits"))w.uint32(80).int32(m.poke_stop_visits);if(m.pokeballs_thrown!=null&&m.hasOwnProperty("pokeballs_thrown"))w.uint32(88).int32(m.pokeballs_thrown);if(m.eggs_hatched!=null&&m.hasOwnProperty("eggs_hatched"))w.uint32(96).int32(m.eggs_hatched);if(m.big_magikarp_caught!=null&&m.hasOwnProperty("big_magikarp_caught"))w.uint32(104).int32(m.big_magikarp_caught);if(m.battle_attack_won!=null&&m.hasOwnProperty("battle_attack_won"))w.uint32(112).int32(m.battle_attack_won);if(m.battle_attack_total!=null&&m.hasOwnProperty("battle_attack_total"))w.uint32(120).int32(m.battle_attack_total);if(m.battle_defended_won!=null&&m.hasOwnProperty("battle_defended_won"))w.uint32(128).int32(m.battle_defended_won);if(m.battle_training_won!=null&&m.hasOwnProperty("battle_training_won"))w.uint32(136).int32(m.battle_training_won);if(m.battle_training_total!=null&&m.hasOwnProperty("battle_training_total"))w.uint32(144).int32(m.battle_training_total);if(m.prestige_raised_total!=null&&m.hasOwnProperty("prestige_raised_total"))w.uint32(152).int32(m.prestige_raised_total);if(m.prestige_dropped_total!=null&&m.hasOwnProperty("prestige_dropped_total"))w.uint32(160).int32(m.prestige_dropped_total);if(m.pokemon_deployed!=null&&m.hasOwnProperty("pokemon_deployed"))w.uint32(168).int32(m.pokemon_deployed);if(m.pokemon_caught_by_type!=null&&m.pokemon_caught_by_type.length){w.uint32(178).fork();for(var i=0;i<m.pokemon_caught_by_type.length;++i)w.int32(m.pokemon_caught_by_type[i]);w.ldelim()}if(m.small_rattata_caught!=null&&m.hasOwnProperty("small_rattata_caught"))w.uint32(184).int32(m.small_rattata_caught);if(m.used_km_pool!=null&&m.hasOwnProperty("used_km_pool"))w.uint32(193).double(m.used_km_pool);if(m.last_km_refill_ms!=null&&m.hasOwnProperty("last_km_refill_ms"))w.uint32(200).int64(m.last_km_refill_ms);if(m.num_raid_battle_won!=null&&m.hasOwnProperty("num_raid_battle_won"))w.uint32(208).int32(m.num_raid_battle_won);if(m.num_raid_battle_total!=null&&m.hasOwnProperty("num_raid_battle_total"))w.uint32(216).int32(m.num_raid_battle_total);if(m.num_legendary_battle_won!=null&&m.hasOwnProperty("num_legendary_battle_won"))w.uint32(224).int32(m.num_legendary_battle_won);if(m.num_legendary_battle_total!=null&&m.hasOwnProperty("num_legendary_battle_total"))w.uint32(232).int32(m.num_legendary_battle_total);if(m.num_berries_fed!=null&&m.hasOwnProperty("num_berries_fed"))w.uint32(240).int32(m.num_berries_fed);if(m.total_defended_ms!=null&&m.hasOwnProperty("total_defended_ms"))w.uint32(248).int64(m.total_defended_ms);if(m.event_badges!=null&&m.event_badges.length){w.uint32(258).fork();for(var i=0;i<m.event_badges.length;++i)w.int32(m.event_badges[i]);w.ldelim()}if(m.km_walked_past_active_day!=null&&m.hasOwnProperty("km_walked_past_active_day"))w.uint32(269).float(m.km_walked_past_active_day);if(m.num_challenge_quests_completed!=null&&m.hasOwnProperty("num_challenge_quests_completed"))w.uint32(272).int32(m.num_challenge_quests_completed);if(m.num_trades!=null&&m.hasOwnProperty("num_trades"))w.uint32(280).int32(m.num_trades);if(m.num_max_level_friends!=null&&m.hasOwnProperty("num_max_level_friends"))w.uint32(288).int32(m.num_max_level_friends);if(m.trade_accumulated_distance_km!=null&&m.hasOwnProperty("trade_accumulated_distance_km"))w.uint32(296).int64(m.trade_accumulated_distance_km);if(m.fitness_report_last_check_bucket!=null&&m.hasOwnProperty("fitness_report_last_check_bucket"))w.uint32(304).int64(m.fitness_report_last_check_bucket);if(m.combat_stats!=null&&m.hasOwnProperty("combat_stats"))$root.POGOProtos.Data.Combat.PlayerCombatStats.encode(m.combat_stats,w.uint32(314).fork()).ldelim();if(m.num_npc_combats_won!=null&&m.hasOwnProperty("num_npc_combats_won"))w.uint32(320).int32(m.num_npc_combats_won);if(m.num_npc_combats_total!=null&&m.hasOwnProperty("num_npc_combats_total"))w.uint32(328).int32(m.num_npc_combats_total);return w};PlayerStats.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.PlayerStats;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.level=r.int32();break;case 2:m.experience=r.int64();break;case 3:m.prev_level_xp=r.int64();break;case 4:m.next_level_xp=r.int64();break;case 5:m.km_walked=r.float();break;case 6:m.pokemons_encountered=r.int32();break;case 7:m.unique_pokedex_entries=r.int32();break;case 8:m.pokemons_captured=r.int32();break;case 9:m.evolutions=r.int32();break;case 10:m.poke_stop_visits=r.int32();break;case 11:m.pokeballs_thrown=r.int32();break;case 12:m.eggs_hatched=r.int32();break;case 13:m.big_magikarp_caught=r.int32();break;case 14:m.battle_attack_won=r.int32();break;case 15:m.battle_attack_total=r.int32();break;case 16:m.battle_defended_won=r.int32();break;case 17:m.battle_training_won=r.int32();break;case 18:m.battle_training_total=r.int32();break;case 19:m.prestige_raised_total=r.int32();break;case 20:m.prestige_dropped_total=r.int32();break;case 21:m.pokemon_deployed=r.int32();break;case 22:if(!(m.pokemon_caught_by_type&&m.pokemon_caught_by_type.length))m.pokemon_caught_by_type=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.pokemon_caught_by_type.push(r.int32())}else m.pokemon_caught_by_type.push(r.int32());break;case 23:m.small_rattata_caught=r.int32();break;case 24:m.used_km_pool=r.double();break;case 25:m.last_km_refill_ms=r.int64();break;case 26:m.num_raid_battle_won=r.int32();break;case 27:m.num_raid_battle_total=r.int32();break;case 28:m.num_legendary_battle_won=r.int32();break;case 29:m.num_legendary_battle_total=r.int32();break;case 30:m.num_berries_fed=r.int32();break;case 31:m.total_defended_ms=r.int64();break;case 32:if(!(m.event_badges&&m.event_badges.length))m.event_badges=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.event_badges.push(r.int32())}else m.event_badges.push(r.int32());break;case 33:m.km_walked_past_active_day=r.float();break;case 34:m.num_challenge_quests_completed=r.int32();break;case 35:m.num_trades=r.int32();break;case 36:m.num_max_level_friends=r.int32();break;case 37:m.trade_accumulated_distance_km=r.int64();break;case 38:m.fitness_report_last_check_bucket=r.int64();break;case 39:m.combat_stats=$root.POGOProtos.Data.Combat.PlayerCombatStats.decode(r,r.uint32());break;case 40:m.num_npc_combats_won=r.int32();break;case 41:m.num_npc_combats_total=r.int32();break;default:r.skipType(t&7);break}}return m};PlayerStats.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.PlayerStats)return d;var m=new $root.POGOProtos.Data.Player.PlayerStats;if(d.level!=null){m.level=d.level|0}if(d.experience!=null){if($util.Long)(m.experience=$util.Long.fromValue(d.experience)).unsigned=false;else if(typeof d.experience==="string")m.experience=parseInt(d.experience,10);else if(typeof d.experience==="number")m.experience=d.experience;else if(typeof d.experience==="object")m.experience=new $util.LongBits(d.experience.low>>>0,d.experience.high>>>0).toNumber()}if(d.prev_level_xp!=null){if($util.Long)(m.prev_level_xp=$util.Long.fromValue(d.prev_level_xp)).unsigned=false;else if(typeof d.prev_level_xp==="string")m.prev_level_xp=parseInt(d.prev_level_xp,10);else if(typeof d.prev_level_xp==="number")m.prev_level_xp=d.prev_level_xp;else if(typeof d.prev_level_xp==="object")m.prev_level_xp=new $util.LongBits(d.prev_level_xp.low>>>0,d.prev_level_xp.high>>>0).toNumber()}if(d.next_level_xp!=null){if($util.Long)(m.next_level_xp=$util.Long.fromValue(d.next_level_xp)).unsigned=false;else if(typeof d.next_level_xp==="string")m.next_level_xp=parseInt(d.next_level_xp,10);else if(typeof d.next_level_xp==="number")m.next_level_xp=d.next_level_xp;else if(typeof d.next_level_xp==="object")m.next_level_xp=new $util.LongBits(d.next_level_xp.low>>>0,d.next_level_xp.high>>>0).toNumber()}if(d.km_walked!=null){m.km_walked=Number(d.km_walked)}if(d.pokemons_encountered!=null){m.pokemons_encountered=d.pokemons_encountered|0}if(d.unique_pokedex_entries!=null){m.unique_pokedex_entries=d.unique_pokedex_entries|0}if(d.pokemons_captured!=null){m.pokemons_captured=d.pokemons_captured|0}if(d.evolutions!=null){m.evolutions=d.evolutions|0}if(d.poke_stop_visits!=null){m.poke_stop_visits=d.poke_stop_visits|0}if(d.pokeballs_thrown!=null){m.pokeballs_thrown=d.pokeballs_thrown|0}if(d.eggs_hatched!=null){m.eggs_hatched=d.eggs_hatched|0}if(d.big_magikarp_caught!=null){m.big_magikarp_caught=d.big_magikarp_caught|0}if(d.battle_attack_won!=null){m.battle_attack_won=d.battle_attack_won|0}if(d.battle_attack_total!=null){m.battle_attack_total=d.battle_attack_total|0}if(d.battle_defended_won!=null){m.battle_defended_won=d.battle_defended_won|0}if(d.battle_training_won!=null){m.battle_training_won=d.battle_training_won|0}if(d.battle_training_total!=null){m.battle_training_total=d.battle_training_total|0}if(d.prestige_raised_total!=null){m.prestige_raised_total=d.prestige_raised_total|0}if(d.prestige_dropped_total!=null){m.prestige_dropped_total=d.prestige_dropped_total|0}if(d.pokemon_deployed!=null){m.pokemon_deployed=d.pokemon_deployed|0}if(d.pokemon_caught_by_type){if(!Array.isArray(d.pokemon_caught_by_type))throw TypeError(".POGOProtos.Data.Player.PlayerStats.pokemon_caught_by_type: array expected");m.pokemon_caught_by_type=[];for(var i=0;i<d.pokemon_caught_by_type.length;++i){m.pokemon_caught_by_type[i]=d.pokemon_caught_by_type[i]|0}}if(d.small_rattata_caught!=null){m.small_rattata_caught=d.small_rattata_caught|0}if(d.used_km_pool!=null){m.used_km_pool=Number(d.used_km_pool)}if(d.last_km_refill_ms!=null){if($util.Long)(m.last_km_refill_ms=$util.Long.fromValue(d.last_km_refill_ms)).unsigned=false;else if(typeof d.last_km_refill_ms==="string")m.last_km_refill_ms=parseInt(d.last_km_refill_ms,10);else if(typeof d.last_km_refill_ms==="number")m.last_km_refill_ms=d.last_km_refill_ms;else if(typeof d.last_km_refill_ms==="object")m.last_km_refill_ms=new $util.LongBits(d.last_km_refill_ms.low>>>0,d.last_km_refill_ms.high>>>0).toNumber()}if(d.num_raid_battle_won!=null){m.num_raid_battle_won=d.num_raid_battle_won|0}if(d.num_raid_battle_total!=null){m.num_raid_battle_total=d.num_raid_battle_total|0}if(d.num_legendary_battle_won!=null){m.num_legendary_battle_won=d.num_legendary_battle_won|0}if(d.num_legendary_battle_total!=null){m.num_legendary_battle_total=d.num_legendary_battle_total|0}if(d.num_berries_fed!=null){m.num_berries_fed=d.num_berries_fed|0}if(d.total_defended_ms!=null){if($util.Long)(m.total_defended_ms=$util.Long.fromValue(d.total_defended_ms)).unsigned=false;else if(typeof d.total_defended_ms==="string")m.total_defended_ms=parseInt(d.total_defended_ms,10);else if(typeof d.total_defended_ms==="number")m.total_defended_ms=d.total_defended_ms;else if(typeof d.total_defended_ms==="object")m.total_defended_ms=new $util.LongBits(d.total_defended_ms.low>>>0,d.total_defended_ms.high>>>0).toNumber()}if(d.event_badges){if(!Array.isArray(d.event_badges))throw TypeError(".POGOProtos.Data.Player.PlayerStats.event_badges: array expected");m.event_badges=[];for(var i=0;i<d.event_badges.length;++i){switch(d.event_badges[i]){default:case"GYM_BADGE_UNSET":case 0:m.event_badges[i]=0;break;case"GYM_BADGE_VANILLA":case 1:m.event_badges[i]=1;break;case"GYM_BADGE_BRONZE":case 2:m.event_badges[i]=2;break;case"GYM_BADGE_SILVER":case 3:m.event_badges[i]=3;break;case"GYM_BADGE_GOLD":case 4:m.event_badges[i]=4;break}}}if(d.km_walked_past_active_day!=null){m.km_walked_past_active_day=Number(d.km_walked_past_active_day)}if(d.num_challenge_quests_completed!=null){m.num_challenge_quests_completed=d.num_challenge_quests_completed|0}if(d.num_trades!=null){m.num_trades=d.num_trades|0}if(d.num_max_level_friends!=null){m.num_max_level_friends=d.num_max_level_friends|0}if(d.trade_accumulated_distance_km!=null){if($util.Long)(m.trade_accumulated_distance_km=$util.Long.fromValue(d.trade_accumulated_distance_km)).unsigned=false;else if(typeof d.trade_accumulated_distance_km==="string")m.trade_accumulated_distance_km=parseInt(d.trade_accumulated_distance_km,10);else if(typeof d.trade_accumulated_distance_km==="number")m.trade_accumulated_distance_km=d.trade_accumulated_distance_km;else if(typeof d.trade_accumulated_distance_km==="object")m.trade_accumulated_distance_km=new $util.LongBits(d.trade_accumulated_distance_km.low>>>0,d.trade_accumulated_distance_km.high>>>0).toNumber()}if(d.fitness_report_last_check_bucket!=null){if($util.Long)(m.fitness_report_last_check_bucket=$util.Long.fromValue(d.fitness_report_last_check_bucket)).unsigned=false;else if(typeof d.fitness_report_last_check_bucket==="string")m.fitness_report_last_check_bucket=parseInt(d.fitness_report_last_check_bucket,10);else if(typeof d.fitness_report_last_check_bucket==="number")m.fitness_report_last_check_bucket=d.fitness_report_last_check_bucket;else if(typeof d.fitness_report_last_check_bucket==="object")m.fitness_report_last_check_bucket=new $util.LongBits(d.fitness_report_last_check_bucket.low>>>0,d.fitness_report_last_check_bucket.high>>>0).toNumber()}if(d.combat_stats!=null){if(typeof d.combat_stats!=="object")throw TypeError(".POGOProtos.Data.Player.PlayerStats.combat_stats: object expected");m.combat_stats=$root.POGOProtos.Data.Combat.PlayerCombatStats.fromObject(d.combat_stats)}if(d.num_npc_combats_won!=null){m.num_npc_combats_won=d.num_npc_combats_won|0}if(d.num_npc_combats_total!=null){m.num_npc_combats_total=d.num_npc_combats_total|0}return m};PlayerStats.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.pokemon_caught_by_type=[];d.event_badges=[]}if(o.defaults){d.level=0;if($util.Long){var n=new $util.Long(0,0,false);d.experience=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.experience=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.prev_level_xp=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.prev_level_xp=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.next_level_xp=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.next_level_xp=o.longs===String?"0":0;d.km_walked=0;d.pokemons_encountered=0;d.unique_pokedex_entries=0;d.pokemons_captured=0;d.evolutions=0;d.poke_stop_visits=0;d.pokeballs_thrown=0;d.eggs_hatched=0;d.big_magikarp_caught=0;d.battle_attack_won=0;d.battle_attack_total=0;d.battle_defended_won=0;d.battle_training_won=0;d.battle_training_total=0;d.prestige_raised_total=0;d.prestige_dropped_total=0;d.pokemon_deployed=0;d.small_rattata_caught=0;d.used_km_pool=0;if($util.Long){var n=new $util.Long(0,0,false);d.last_km_refill_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.last_km_refill_ms=o.longs===String?"0":0;d.num_raid_battle_won=0;d.num_raid_battle_total=0;d.num_legendary_battle_won=0;d.num_legendary_battle_total=0;d.num_berries_fed=0;if($util.Long){var n=new $util.Long(0,0,false);d.total_defended_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.total_defended_ms=o.longs===String?"0":0;d.km_walked_past_active_day=0;d.num_challenge_quests_completed=0;d.num_trades=0;d.num_max_level_friends=0;if($util.Long){var n=new $util.Long(0,0,false);d.trade_accumulated_distance_km=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.trade_accumulated_distance_km=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.fitness_report_last_check_bucket=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.fitness_report_last_check_bucket=o.longs===String?"0":0;d.combat_stats=null;d.num_npc_combats_won=0;d.num_npc_combats_total=0}if(m.level!=null&&m.hasOwnProperty("level")){d.level=m.level}if(m.experience!=null&&m.hasOwnProperty("experience")){if(typeof m.experience==="number")d.experience=o.longs===String?String(m.experience):m.experience;else d.experience=o.longs===String?$util.Long.prototype.toString.call(m.experience):o.longs===Number?new $util.LongBits(m.experience.low>>>0,m.experience.high>>>0).toNumber():m.experience}if(m.prev_level_xp!=null&&m.hasOwnProperty("prev_level_xp")){if(typeof m.prev_level_xp==="number")d.prev_level_xp=o.longs===String?String(m.prev_level_xp):m.prev_level_xp;else d.prev_level_xp=o.longs===String?$util.Long.prototype.toString.call(m.prev_level_xp):o.longs===Number?new $util.LongBits(m.prev_level_xp.low>>>0,m.prev_level_xp.high>>>0).toNumber():m.prev_level_xp}if(m.next_level_xp!=null&&m.hasOwnProperty("next_level_xp")){if(typeof m.next_level_xp==="number")d.next_level_xp=o.longs===String?String(m.next_level_xp):m.next_level_xp;else d.next_level_xp=o.longs===String?$util.Long.prototype.toString.call(m.next_level_xp):o.longs===Number?new $util.LongBits(m.next_level_xp.low>>>0,m.next_level_xp.high>>>0).toNumber():m.next_level_xp}if(m.km_walked!=null&&m.hasOwnProperty("km_walked")){d.km_walked=o.json&&!isFinite(m.km_walked)?String(m.km_walked):m.km_walked}if(m.pokemons_encountered!=null&&m.hasOwnProperty("pokemons_encountered")){d.pokemons_encountered=m.pokemons_encountered}if(m.unique_pokedex_entries!=null&&m.hasOwnProperty("unique_pokedex_entries")){d.unique_pokedex_entries=m.unique_pokedex_entries}if(m.pokemons_captured!=null&&m.hasOwnProperty("pokemons_captured")){d.pokemons_captured=m.pokemons_captured}if(m.evolutions!=null&&m.hasOwnProperty("evolutions")){d.evolutions=m.evolutions}if(m.poke_stop_visits!=null&&m.hasOwnProperty("poke_stop_visits")){d.poke_stop_visits=m.poke_stop_visits}if(m.pokeballs_thrown!=null&&m.hasOwnProperty("pokeballs_thrown")){d.pokeballs_thrown=m.pokeballs_thrown}if(m.eggs_hatched!=null&&m.hasOwnProperty("eggs_hatched")){d.eggs_hatched=m.eggs_hatched}if(m.big_magikarp_caught!=null&&m.hasOwnProperty("big_magikarp_caught")){d.big_magikarp_caught=m.big_magikarp_caught}if(m.battle_attack_won!=null&&m.hasOwnProperty("battle_attack_won")){d.battle_attack_won=m.battle_attack_won}if(m.battle_attack_total!=null&&m.hasOwnProperty("battle_attack_total")){d.battle_attack_total=m.battle_attack_total}if(m.battle_defended_won!=null&&m.hasOwnProperty("battle_defended_won")){d.battle_defended_won=m.battle_defended_won}if(m.battle_training_won!=null&&m.hasOwnProperty("battle_training_won")){d.battle_training_won=m.battle_training_won}if(m.battle_training_total!=null&&m.hasOwnProperty("battle_training_total")){d.battle_training_total=m.battle_training_total}if(m.prestige_raised_total!=null&&m.hasOwnProperty("prestige_raised_total")){d.prestige_raised_total=m.prestige_raised_total}if(m.prestige_dropped_total!=null&&m.hasOwnProperty("prestige_dropped_total")){d.prestige_dropped_total=m.prestige_dropped_total}if(m.pokemon_deployed!=null&&m.hasOwnProperty("pokemon_deployed")){d.pokemon_deployed=m.pokemon_deployed}if(m.pokemon_caught_by_type&&m.pokemon_caught_by_type.length){d.pokemon_caught_by_type=[];for(var j=0;j<m.pokemon_caught_by_type.length;++j){d.pokemon_caught_by_type[j]=m.pokemon_caught_by_type[j]}}if(m.small_rattata_caught!=null&&m.hasOwnProperty("small_rattata_caught")){d.small_rattata_caught=m.small_rattata_caught}if(m.used_km_pool!=null&&m.hasOwnProperty("used_km_pool")){d.used_km_pool=o.json&&!isFinite(m.used_km_pool)?String(m.used_km_pool):m.used_km_pool}if(m.last_km_refill_ms!=null&&m.hasOwnProperty("last_km_refill_ms")){if(typeof m.last_km_refill_ms==="number")d.last_km_refill_ms=o.longs===String?String(m.last_km_refill_ms):m.last_km_refill_ms;else d.last_km_refill_ms=o.longs===String?$util.Long.prototype.toString.call(m.last_km_refill_ms):o.longs===Number?new $util.LongBits(m.last_km_refill_ms.low>>>0,m.last_km_refill_ms.high>>>0).toNumber():m.last_km_refill_ms}if(m.num_raid_battle_won!=null&&m.hasOwnProperty("num_raid_battle_won")){d.num_raid_battle_won=m.num_raid_battle_won}if(m.num_raid_battle_total!=null&&m.hasOwnProperty("num_raid_battle_total")){d.num_raid_battle_total=m.num_raid_battle_total}if(m.num_legendary_battle_won!=null&&m.hasOwnProperty("num_legendary_battle_won")){d.num_legendary_battle_won=m.num_legendary_battle_won}if(m.num_legendary_battle_total!=null&&m.hasOwnProperty("num_legendary_battle_total")){d.num_legendary_battle_total=m.num_legendary_battle_total}if(m.num_berries_fed!=null&&m.hasOwnProperty("num_berries_fed")){d.num_berries_fed=m.num_berries_fed}if(m.total_defended_ms!=null&&m.hasOwnProperty("total_defended_ms")){if(typeof m.total_defended_ms==="number")d.total_defended_ms=o.longs===String?String(m.total_defended_ms):m.total_defended_ms;else d.total_defended_ms=o.longs===String?$util.Long.prototype.toString.call(m.total_defended_ms):o.longs===Number?new $util.LongBits(m.total_defended_ms.low>>>0,m.total_defended_ms.high>>>0).toNumber():m.total_defended_ms}if(m.event_badges&&m.event_badges.length){d.event_badges=[];for(var j=0;j<m.event_badges.length;++j){d.event_badges[j]=o.enums===String?$root.POGOProtos.Enums.GymBadgeType[m.event_badges[j]]:m.event_badges[j]}}if(m.km_walked_past_active_day!=null&&m.hasOwnProperty("km_walked_past_active_day")){d.km_walked_past_active_day=o.json&&!isFinite(m.km_walked_past_active_day)?String(m.km_walked_past_active_day):m.km_walked_past_active_day}if(m.num_challenge_quests_completed!=null&&m.hasOwnProperty("num_challenge_quests_completed")){d.num_challenge_quests_completed=m.num_challenge_quests_completed}if(m.num_trades!=null&&m.hasOwnProperty("num_trades")){d.num_trades=m.num_trades}if(m.num_max_level_friends!=null&&m.hasOwnProperty("num_max_level_friends")){d.num_max_level_friends=m.num_max_level_friends}if(m.trade_accumulated_distance_km!=null&&m.hasOwnProperty("trade_accumulated_distance_km")){if(typeof m.trade_accumulated_distance_km==="number")d.trade_accumulated_distance_km=o.longs===String?String(m.trade_accumulated_distance_km):m.trade_accumulated_distance_km;else d.trade_accumulated_distance_km=o.longs===String?$util.Long.prototype.toString.call(m.trade_accumulated_distance_km):o.longs===Number?new $util.LongBits(m.trade_accumulated_distance_km.low>>>0,m.trade_accumulated_distance_km.high>>>0).toNumber():m.trade_accumulated_distance_km}if(m.fitness_report_last_check_bucket!=null&&m.hasOwnProperty("fitness_report_last_check_bucket")){if(typeof m.fitness_report_last_check_bucket==="number")d.fitness_report_last_check_bucket=o.longs===String?String(m.fitness_report_last_check_bucket):m.fitness_report_last_check_bucket;else d.fitness_report_last_check_bucket=o.longs===String?$util.Long.prototype.toString.call(m.fitness_report_last_check_bucket):o.longs===Number?new $util.LongBits(m.fitness_report_last_check_bucket.low>>>0,m.fitness_report_last_check_bucket.high>>>0).toNumber():m.fitness_report_last_check_bucket}if(m.combat_stats!=null&&m.hasOwnProperty("combat_stats")){d.combat_stats=$root.POGOProtos.Data.Combat.PlayerCombatStats.toObject(m.combat_stats,o)}if(m.num_npc_combats_won!=null&&m.hasOwnProperty("num_npc_combats_won")){d.num_npc_combats_won=m.num_npc_combats_won}if(m.num_npc_combats_total!=null&&m.hasOwnProperty("num_npc_combats_total")){d.num_npc_combats_total=m.num_npc_combats_total}return d};PlayerStats.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlayerStats}();Player.PlayerSummary=function(){function PlayerSummary(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerSummary.prototype.player_id="";PlayerSummary.prototype.codename="";PlayerSummary.prototype.public_data=$util.newBuffer([]);PlayerSummary.prototype.team="";PlayerSummary.prototype.fb_user_id="";PlayerSummary.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);if(m.codename!=null&&m.hasOwnProperty("codename"))w.uint32(18).string(m.codename);if(m.public_data!=null&&m.hasOwnProperty("public_data"))w.uint32(26).bytes(m.public_data);if(m.team!=null&&m.hasOwnProperty("team"))w.uint32(34).string(m.team);if(m.fb_user_id!=null&&m.hasOwnProperty("fb_user_id"))w.uint32(42).string(m.fb_user_id);return w};PlayerSummary.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.PlayerSummary;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;case 2:m.codename=r.string();break;case 3:m.public_data=r.bytes();break;case 4:m.team=r.string();break;case 5:m.fb_user_id=r.string();break;default:r.skipType(t&7);break}}return m};PlayerSummary.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.PlayerSummary)return d;var m=new $root.POGOProtos.Data.Player.PlayerSummary;if(d.player_id!=null){m.player_id=String(d.player_id)}if(d.codename!=null){m.codename=String(d.codename)}if(d.public_data!=null){if(typeof d.public_data==="string")$util.base64.decode(d.public_data,m.public_data=$util.newBuffer($util.base64.length(d.public_data)),0);else if(d.public_data.length)m.public_data=d.public_data}if(d.team!=null){m.team=String(d.team)}if(d.fb_user_id!=null){m.fb_user_id=String(d.fb_user_id)}return m};PlayerSummary.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id="";d.codename="";if(o.bytes===String)d.public_data="";else{d.public_data=[];if(o.bytes!==Array)d.public_data=$util.newBuffer(d.public_data)}d.team="";d.fb_user_id=""}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}if(m.codename!=null&&m.hasOwnProperty("codename")){d.codename=m.codename}if(m.public_data!=null&&m.hasOwnProperty("public_data")){d.public_data=o.bytes===String?$util.base64.encode(m.public_data,0,m.public_data.length):o.bytes===Array?Array.prototype.slice.call(m.public_data):m.public_data}if(m.team!=null&&m.hasOwnProperty("team")){d.team=m.team}if(m.fb_user_id!=null&&m.hasOwnProperty("fb_user_id")){d.fb_user_id=m.fb_user_id}return d};PlayerSummary.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlayerSummary}();Player.SocialPlayerSettings=function(){function SocialPlayerSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SocialPlayerSettings.prototype.disable_last_pokemon_caught=false;SocialPlayerSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.disable_last_pokemon_caught!=null&&m.hasOwnProperty("disable_last_pokemon_caught"))w.uint32(8).bool(m.disable_last_pokemon_caught);return w};SocialPlayerSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.SocialPlayerSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.disable_last_pokemon_caught=r.bool();break;default:r.skipType(t&7);break}}return m};SocialPlayerSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.SocialPlayerSettings)return d;var m=new $root.POGOProtos.Data.Player.SocialPlayerSettings;if(d.disable_last_pokemon_caught!=null){m.disable_last_pokemon_caught=Boolean(d.disable_last_pokemon_caught)}return m};SocialPlayerSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.disable_last_pokemon_caught=false}if(m.disable_last_pokemon_caught!=null&&m.hasOwnProperty("disable_last_pokemon_caught")){d.disable_last_pokemon_caught=m.disable_last_pokemon_caught}return d};SocialPlayerSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SocialPlayerSettings}();Player.UserAttributes=function(){function UserAttributes(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UserAttributes.prototype.level=0;UserAttributes.prototype.xp_percentage=$util.Long?$util.Long.fromBits(0,0,false):0;UserAttributes.prototype.pokecoin_count=$util.Long?$util.Long.fromBits(0,0,false):0;UserAttributes.prototype.team=0;UserAttributes.prototype.catch_streak=0;UserAttributes.prototype.spin_streak=0;UserAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.level!=null&&m.hasOwnProperty("level"))w.uint32(8).int32(m.level);if(m.xp_percentage!=null&&m.hasOwnProperty("xp_percentage"))w.uint32(16).int64(m.xp_percentage);if(m.pokecoin_count!=null&&m.hasOwnProperty("pokecoin_count"))w.uint32(24).int64(m.pokecoin_count);if(m.team!=null&&m.hasOwnProperty("team"))w.uint32(32).int32(m.team);if(m.catch_streak!=null&&m.hasOwnProperty("catch_streak"))w.uint32(40).int32(m.catch_streak);if(m.spin_streak!=null&&m.hasOwnProperty("spin_streak"))w.uint32(48).int32(m.spin_streak);return w};UserAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.UserAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.level=r.int32();break;case 2:m.xp_percentage=r.int64();break;case 3:m.pokecoin_count=r.int64();break;case 4:m.team=r.int32();break;case 5:m.catch_streak=r.int32();break;case 6:m.spin_streak=r.int32();break;default:r.skipType(t&7);break}}return m};UserAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.UserAttributes)return d;var m=new $root.POGOProtos.Data.Player.UserAttributes;if(d.level!=null){m.level=d.level|0}if(d.xp_percentage!=null){if($util.Long)(m.xp_percentage=$util.Long.fromValue(d.xp_percentage)).unsigned=false;else if(typeof d.xp_percentage==="string")m.xp_percentage=parseInt(d.xp_percentage,10);else if(typeof d.xp_percentage==="number")m.xp_percentage=d.xp_percentage;else if(typeof d.xp_percentage==="object")m.xp_percentage=new $util.LongBits(d.xp_percentage.low>>>0,d.xp_percentage.high>>>0).toNumber()}if(d.pokecoin_count!=null){if($util.Long)(m.pokecoin_count=$util.Long.fromValue(d.pokecoin_count)).unsigned=false;else if(typeof d.pokecoin_count==="string")m.pokecoin_count=parseInt(d.pokecoin_count,10);else if(typeof d.pokecoin_count==="number")m.pokecoin_count=d.pokecoin_count;else if(typeof d.pokecoin_count==="object")m.pokecoin_count=new $util.LongBits(d.pokecoin_count.low>>>0,d.pokecoin_count.high>>>0).toNumber()}if(d.team!=null){m.team=d.team|0}if(d.catch_streak!=null){m.catch_streak=d.catch_streak|0}if(d.spin_streak!=null){m.spin_streak=d.spin_streak|0}return m};UserAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.level=0;if($util.Long){var n=new $util.Long(0,0,false);d.xp_percentage=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.xp_percentage=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.pokecoin_count=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokecoin_count=o.longs===String?"0":0;d.team=0;d.catch_streak=0;d.spin_streak=0}if(m.level!=null&&m.hasOwnProperty("level")){d.level=m.level}if(m.xp_percentage!=null&&m.hasOwnProperty("xp_percentage")){if(typeof m.xp_percentage==="number")d.xp_percentage=o.longs===String?String(m.xp_percentage):m.xp_percentage;else d.xp_percentage=o.longs===String?$util.Long.prototype.toString.call(m.xp_percentage):o.longs===Number?new $util.LongBits(m.xp_percentage.low>>>0,m.xp_percentage.high>>>0).toNumber():m.xp_percentage}if(m.pokecoin_count!=null&&m.hasOwnProperty("pokecoin_count")){if(typeof m.pokecoin_count==="number")d.pokecoin_count=o.longs===String?String(m.pokecoin_count):m.pokecoin_count;else d.pokecoin_count=o.longs===String?$util.Long.prototype.toString.call(m.pokecoin_count):o.longs===Number?new $util.LongBits(m.pokecoin_count.low>>>0,m.pokecoin_count.high>>>0).toNumber():m.pokecoin_count}if(m.team!=null&&m.hasOwnProperty("team")){d.team=m.team}if(m.catch_streak!=null&&m.hasOwnProperty("catch_streak")){d.catch_streak=m.catch_streak}if(m.spin_streak!=null&&m.hasOwnProperty("spin_streak")){d.spin_streak=m.spin_streak}return d};UserAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UserAttributes}();Player.UserIssueWeatherReport=function(){function UserIssueWeatherReport(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UserIssueWeatherReport.prototype.gameplayer_weather="";UserIssueWeatherReport.prototype.alert_active=false;UserIssueWeatherReport.prototype.severity=0;UserIssueWeatherReport.prototype.user_report=0;UserIssueWeatherReport.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gameplayer_weather!=null&&m.hasOwnProperty("gameplayer_weather"))w.uint32(10).string(m.gameplayer_weather);if(m.alert_active!=null&&m.hasOwnProperty("alert_active"))w.uint32(16).bool(m.alert_active);if(m.severity!=null&&m.hasOwnProperty("severity"))w.uint32(24).int32(m.severity);if(m.user_report!=null&&m.hasOwnProperty("user_report"))w.uint32(32).int32(m.user_report);return w};UserIssueWeatherReport.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Player.UserIssueWeatherReport;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gameplayer_weather=r.string();break;case 2:m.alert_active=r.bool();break;case 3:m.severity=r.int32();break;case 4:m.user_report=r.int32();break;default:r.skipType(t&7);break}}return m};UserIssueWeatherReport.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Player.UserIssueWeatherReport)return d;var m=new $root.POGOProtos.Data.Player.UserIssueWeatherReport;if(d.gameplayer_weather!=null){m.gameplayer_weather=String(d.gameplayer_weather)}if(d.alert_active!=null){m.alert_active=Boolean(d.alert_active)}if(d.severity!=null){m.severity=d.severity|0}if(d.user_report!=null){m.user_report=d.user_report|0}return m};UserIssueWeatherReport.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.gameplayer_weather="";d.alert_active=false;d.severity=0;d.user_report=0}if(m.gameplayer_weather!=null&&m.hasOwnProperty("gameplayer_weather")){d.gameplayer_weather=m.gameplayer_weather}if(m.alert_active!=null&&m.hasOwnProperty("alert_active")){d.alert_active=m.alert_active}if(m.severity!=null&&m.hasOwnProperty("severity")){d.severity=m.severity}if(m.user_report!=null&&m.hasOwnProperty("user_report")){d.user_report=m.user_report}return d};UserIssueWeatherReport.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UserIssueWeatherReport}();return Player}();Data.PlayerBadge=function(){function PlayerBadge(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerBadge.prototype.badge_type=0;PlayerBadge.prototype.rank=0;PlayerBadge.prototype.start_value=0;PlayerBadge.prototype.end_value=0;PlayerBadge.prototype.current_value=0;PlayerBadge.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.badge_type!=null&&m.hasOwnProperty("badge_type"))w.uint32(8).int32(m.badge_type);if(m.rank!=null&&m.hasOwnProperty("rank"))w.uint32(16).int32(m.rank);if(m.start_value!=null&&m.hasOwnProperty("start_value"))w.uint32(24).int32(m.start_value);if(m.end_value!=null&&m.hasOwnProperty("end_value"))w.uint32(32).int32(m.end_value);if(m.current_value!=null&&m.hasOwnProperty("current_value"))w.uint32(41).double(m.current_value);return w};PlayerBadge.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.PlayerBadge;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.badge_type=r.int32();break;case 2:m.rank=r.int32();break;case 3:m.start_value=r.int32();break;case 4:m.end_value=r.int32();break;case 5:m.current_value=r.double();break;default:r.skipType(t&7);break}}return m};PlayerBadge.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.PlayerBadge)return d;var m=new $root.POGOProtos.Data.PlayerBadge;switch(d.badge_type){case"BADGE_UNSET":case 0:m.badge_type=0;break;case"BADGE_TRAVEL_KM":case 1:m.badge_type=1;break;case"BADGE_POKEDEX_ENTRIES":case 2:m.badge_type=2;break;case"BADGE_CAPTURE_TOTAL":case 3:m.badge_type=3;break;case"BADGE_DEFEATED_FORT":case 4:m.badge_type=4;break;case"BADGE_EVOLVED_TOTAL":case 5:m.badge_type=5;break;case"BADGE_HATCHED_TOTAL":case 6:m.badge_type=6;break;case"BADGE_ENCOUNTERED_TOTAL":case 7:m.badge_type=7;break;case"BADGE_POKESTOPS_VISITED":case 8:m.badge_type=8;break;case"BADGE_UNIQUE_POKESTOPS":case 9:m.badge_type=9;break;case"BADGE_POKEBALL_THROWN":case 10:m.badge_type=10;break;case"BADGE_BIG_MAGIKARP":case 11:m.badge_type=11;break;case"BADGE_DEPLOYED_TOTAL":case 12:m.badge_type=12;break;case"BADGE_BATTLE_ATTACK_WON":case 13:m.badge_type=13;break;case"BADGE_BATTLE_TRAINING_WON":case 14:m.badge_type=14;break;case"BADGE_BATTLE_DEFEND_WON":case 15:m.badge_type=15;break;case"BADGE_PRESTIGE_RAISED":case 16:m.badge_type=16;break;case"BADGE_PRESTIGE_DROPPED":case 17:m.badge_type=17;break;case"BADGE_TYPE_NORMAL":case 18:m.badge_type=18;break;case"BADGE_TYPE_FIGHTING":case 19:m.badge_type=19;break;case"BADGE_TYPE_FLYING":case 20:m.badge_type=20;break;case"BADGE_TYPE_POISON":case 21:m.badge_type=21;break;case"BADGE_TYPE_GROUND":case 22:m.badge_type=22;break;case"BADGE_TYPE_ROCK":case 23:m.badge_type=23;break;case"BADGE_TYPE_BUG":case 24:m.badge_type=24;break;case"BADGE_TYPE_GHOST":case 25:m.badge_type=25;break;case"BADGE_TYPE_STEEL":case 26:m.badge_type=26;break;case"BADGE_TYPE_FIRE":case 27:m.badge_type=27;break;case"BADGE_TYPE_WATER":case 28:m.badge_type=28;break;case"BADGE_TYPE_GRASS":case 29:m.badge_type=29;break;case"BADGE_TYPE_ELECTRIC":case 30:m.badge_type=30;break;case"BADGE_TYPE_PSYCHIC":case 31:m.badge_type=31;break;case"BADGE_TYPE_ICE":case 32:m.badge_type=32;break;case"BADGE_TYPE_DRAGON":case 33:m.badge_type=33;break;case"BADGE_TYPE_DARK":case 34:m.badge_type=34;break;case"BADGE_TYPE_FAIRY":case 35:m.badge_type=35;break;case"BADGE_SMALL_RATTATA":case 36:m.badge_type=36;break;case"BADGE_PIKACHU":case 37:m.badge_type=37;break;case"BADGE_UNOWN":case 38:m.badge_type=38;break;case"BADGE_POKEDEX_ENTRIES_GEN2":case 39:m.badge_type=39;break;case"BADGE_RAID_BATTLE_WON":case 40:m.badge_type=40;break;case"BADGE_LEGENDARY_BATTLE_WON":case 41:m.badge_type=41;break;case"BADGE_BERRIES_FED":case 42:m.badge_type=42;break;case"BADGE_HOURS_DEFENDED":case 43:m.badge_type=43;break;case"BADGE_PLACE_HOLDER":case 44:m.badge_type=44;break;case"BADGE_POKEDEX_ENTRIES_GEN3":case 45:m.badge_type=45;break;case"BADGE_CHALLENGE_QUESTS":case 46:m.badge_type=46;break;case"BADGE_MEW_ENCOUNTER":case 47:m.badge_type=47;break;case"BADGE_MAX_LEVEL_FRIENDS":case 48:m.badge_type=48;break;case"BADGE_TRADING":case 49:m.badge_type=49;break;case"BADGE_TRADING_DISTANCE":case 50:m.badge_type=50;break;case"BADGE_POKEDEX_ENTRIES_GEN4":case 51:m.badge_type=51;break;case"BADGE_GREAT_LEAGUE":case 52:m.badge_type=52;break;case"BADGE_ULTRA_LEAGUE":case 53:m.badge_type=53;break;case"BADGE_MASTER_LEAGUE":case 54:m.badge_type=54;break;case"BADGE_EVENT_MIN":case 2e3:m.badge_type=2e3;break;case"BADGE_CHICAGO_FEST_JULY_2017":case 2001:m.badge_type=2001;break;case"BADGE_PIKACHU_OUTBREAK_YOKOHAMA_2017":case 2002:m.badge_type=2002;break;case"BADGE_SAFARI_ZONE_EUROPE_2017":case 2003:m.badge_type=2003;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_07":case 2004:m.badge_type=2004;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_14":case 2005:m.badge_type=2005;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_NORTH":case 2006:m.badge_type=2006;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_SOUTH":case 2007:m.badge_type=2007;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_NORTH":case 2008:m.badge_type=2008;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_SOUTH":case 2009:m.badge_type=2009;break;case"BADGE_APAC_PARTNER_JULY_2018_0":case 2010:m.badge_type=2010;break;case"BADGE_APAC_PARTNER_JULY_2018_1":case 2011:m.badge_type=2011;break;case"BADGE_APAC_PARTNER_JULY_2018_2":case 2012:m.badge_type=2012;break;case"BADGE_APAC_PARTNER_JULY_2018_3":case 2013:m.badge_type=2013;break;case"BADGE_APAC_PARTNER_JULY_2018_4":case 2014:m.badge_type=2014;break;case"BADGE_APAC_PARTNER_JULY_2018_5":case 2015:m.badge_type=2015;break;case"BADGE_APAC_PARTNER_JULY_2018_6":case 2016:m.badge_type=2016;break;case"BADGE_APAC_PARTNER_JULY_2018_7":case 2017:m.badge_type=2017;break;case"BADGE_APAC_PARTNER_JULY_2018_8":case 2018:m.badge_type=2018;break;case"BADGE_APAC_PARTNER_JULY_2018_9":case 2019:m.badge_type=2019;break;case"BADGE_YOKOSUKA_29_AUG_2018_MIKASA":case 2020:m.badge_type=2020;break;case"BADGE_YOKOSUKA_29_AUG_2018_VERNY":case 2021:m.badge_type=2021;break;case"BADGE_YOKOSUKA_29_AUG_2018_KURIHAMA":case 2022:m.badge_type=2022;break;case"BADGE_YOKOSUKA_30_AUG_2018_MIKASA":case 2023:m.badge_type=2023;break;case"BADGE_YOKOSUKA_30_AUG_2018_VERNY":case 2024:m.badge_type=2024;break;case"BADGE_YOKOSUKA_30_AUG_2018_KURIHAMA":case 2025:m.badge_type=2025;break;case"BADGE_YOKOSUKA_31_AUG_2018_MIKASA":case 2026:m.badge_type=2026;break;case"BADGE_YOKOSUKA_31_AUG_2018_VERNY":case 2027:m.badge_type=2027;break;case"BADGE_YOKOSUKA_31_AUG_2018_KURIHAMA":case 2028:m.badge_type=2028;break;case"BADGE_YOKOSUKA_1_SEP_2018_MIKASA":case 2029:m.badge_type=2029;break;case"BADGE_YOKOSUKA_1_SEP_2018_VERNY":case 2030:m.badge_type=2030;break;case"BADGE_YOKOSUKA_1_SEP_2018_KURIHAMA":case 2031:m.badge_type=2031;break;case"BADGE_YOKOSUKA_2_SEP_2018_MIKASA":case 2032:m.badge_type=2032;break;case"BADGE_YOKOSUKA_2_SEP_2018_VERNY":case 2033:m.badge_type=2033;break;case"BADGE_YOKOSUKA_2_SEP_2018_KURIHAMA":case 2034:m.badge_type=2034;break;case"BADGE_TOP_BANANA_1":case 2035:m.badge_type=2035;break;case"BADGE_TOP_BANANA_2":case 2036:m.badge_type=2036;break;case"BADGE_TOP_BANANA_3":case 2037:m.badge_type=2037;break}if(d.rank!=null){m.rank=d.rank|0}if(d.start_value!=null){m.start_value=d.start_value|0}if(d.end_value!=null){m.end_value=d.end_value|0}if(d.current_value!=null){m.current_value=Number(d.current_value)}return m};PlayerBadge.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.badge_type=o.enums===String?"BADGE_UNSET":0;d.rank=0;d.start_value=0;d.end_value=0;d.current_value=0}if(m.badge_type!=null&&m.hasOwnProperty("badge_type")){d.badge_type=o.enums===String?$root.POGOProtos.Enums.BadgeType[m.badge_type]:m.badge_type}if(m.rank!=null&&m.hasOwnProperty("rank")){d.rank=m.rank}if(m.start_value!=null&&m.hasOwnProperty("start_value")){d.start_value=m.start_value}if(m.end_value!=null&&m.hasOwnProperty("end_value")){d.end_value=m.end_value}if(m.current_value!=null&&m.hasOwnProperty("current_value")){d.current_value=o.json&&!isFinite(m.current_value)?String(m.current_value):m.current_value}return d};PlayerBadge.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlayerBadge}();Data.PlayerData=function(){function PlayerData(p){this.tutorial_state=[];this.currency_balance=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerData.prototype.creation_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerData.prototype.username="";PlayerData.prototype.team=0;PlayerData.prototype.tutorial_state=$util.emptyArray;PlayerData.prototype.avatar=null;PlayerData.prototype.max_pokemon_storage=0;PlayerData.prototype.max_item_storage=0;PlayerData.prototype.daily_bonus=null;PlayerData.prototype.equipped_badge=null;PlayerData.prototype.contact_settings=null;PlayerData.prototype.currency_balance=$util.emptyArray;PlayerData.prototype.remaining_codename_claims=0;PlayerData.prototype.buddy_pokemon=null;PlayerData.prototype.battle_lockout_end_ms=$util.Long?$util.Long.fromBits(0,0,false):0;PlayerData.prototype.secondary_player_avatar=null;PlayerData.prototype.name_is_blacklisted=false;PlayerData.prototype.social_player_settings=null;PlayerData.prototype.combat_player_preferences=null;PlayerData.prototype.player_support_id="";PlayerData.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.creation_timestamp_ms!=null&&m.hasOwnProperty("creation_timestamp_ms"))w.uint32(8).int64(m.creation_timestamp_ms);if(m.username!=null&&m.hasOwnProperty("username"))w.uint32(18).string(m.username);if(m.team!=null&&m.hasOwnProperty("team"))w.uint32(40).int32(m.team);if(m.tutorial_state!=null&&m.tutorial_state.length){w.uint32(58).fork();for(var i=0;i<m.tutorial_state.length;++i)w.int32(m.tutorial_state[i]);w.ldelim()}if(m.avatar!=null&&m.hasOwnProperty("avatar"))$root.POGOProtos.Data.Player.PlayerAvatar.encode(m.avatar,w.uint32(66).fork()).ldelim();if(m.max_pokemon_storage!=null&&m.hasOwnProperty("max_pokemon_storage"))w.uint32(72).int32(m.max_pokemon_storage);if(m.max_item_storage!=null&&m.hasOwnProperty("max_item_storage"))w.uint32(80).int32(m.max_item_storage);if(m.daily_bonus!=null&&m.hasOwnProperty("daily_bonus"))$root.POGOProtos.Data.Player.DailyBonus.encode(m.daily_bonus,w.uint32(90).fork()).ldelim();if(m.equipped_badge!=null&&m.hasOwnProperty("equipped_badge"))$root.POGOProtos.Data.Player.EquippedBadge.encode(m.equipped_badge,w.uint32(98).fork()).ldelim();if(m.contact_settings!=null&&m.hasOwnProperty("contact_settings"))$root.POGOProtos.Data.Player.ContactSettings.encode(m.contact_settings,w.uint32(106).fork()).ldelim();if(m.currency_balance!=null&&m.currency_balance.length){for(var i=0;i<m.currency_balance.length;++i)$root.POGOProtos.Data.Store.CurrencyQuantity.encode(m.currency_balance[i],w.uint32(114).fork()).ldelim()}if(m.remaining_codename_claims!=null&&m.hasOwnProperty("remaining_codename_claims"))w.uint32(120).int32(m.remaining_codename_claims);if(m.buddy_pokemon!=null&&m.hasOwnProperty("buddy_pokemon"))$root.POGOProtos.Data.BuddyPokemon.encode(m.buddy_pokemon,w.uint32(130).fork()).ldelim();if(m.battle_lockout_end_ms!=null&&m.hasOwnProperty("battle_lockout_end_ms"))w.uint32(136).int64(m.battle_lockout_end_ms);if(m.secondary_player_avatar!=null&&m.hasOwnProperty("secondary_player_avatar"))$root.POGOProtos.Data.Player.PlayerAvatar.encode(m.secondary_player_avatar,w.uint32(146).fork()).ldelim();if(m.name_is_blacklisted!=null&&m.hasOwnProperty("name_is_blacklisted"))w.uint32(152).bool(m.name_is_blacklisted);if(m.social_player_settings!=null&&m.hasOwnProperty("social_player_settings"))$root.POGOProtos.Data.Player.SocialPlayerSettings.encode(m.social_player_settings,w.uint32(162).fork()).ldelim();if(m.combat_player_preferences!=null&&m.hasOwnProperty("combat_player_preferences"))$root.POGOProtos.Data.Combat.CombatPlayerPreferences.encode(m.combat_player_preferences,w.uint32(170).fork()).ldelim();if(m.player_support_id!=null&&m.hasOwnProperty("player_support_id"))w.uint32(178).string(m.player_support_id);return w};PlayerData.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.PlayerData;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.creation_timestamp_ms=r.int64();break;case 2:m.username=r.string();break;case 5:m.team=r.int32();break;case 7:if(!(m.tutorial_state&&m.tutorial_state.length))m.tutorial_state=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.tutorial_state.push(r.int32())}else m.tutorial_state.push(r.int32());break;case 8:m.avatar=$root.POGOProtos.Data.Player.PlayerAvatar.decode(r,r.uint32());break;case 9:m.max_pokemon_storage=r.int32();break;case 10:m.max_item_storage=r.int32();break;case 11:m.daily_bonus=$root.POGOProtos.Data.Player.DailyBonus.decode(r,r.uint32());break;case 12:m.equipped_badge=$root.POGOProtos.Data.Player.EquippedBadge.decode(r,r.uint32());break;case 13:m.contact_settings=$root.POGOProtos.Data.Player.ContactSettings.decode(r,r.uint32());break;case 14:if(!(m.currency_balance&&m.currency_balance.length))m.currency_balance=[];m.currency_balance.push($root.POGOProtos.Data.Store.CurrencyQuantity.decode(r,r.uint32()));break;case 15:m.remaining_codename_claims=r.int32();break;case 16:m.buddy_pokemon=$root.POGOProtos.Data.BuddyPokemon.decode(r,r.uint32());break;case 17:m.battle_lockout_end_ms=r.int64();break;case 18:m.secondary_player_avatar=$root.POGOProtos.Data.Player.PlayerAvatar.decode(r,r.uint32());break;case 19:m.name_is_blacklisted=r.bool();break;case 20:m.social_player_settings=$root.POGOProtos.Data.Player.SocialPlayerSettings.decode(r,r.uint32());break;case 21:m.combat_player_preferences=$root.POGOProtos.Data.Combat.CombatPlayerPreferences.decode(r,r.uint32());break;case 22:m.player_support_id=r.string();break;default:r.skipType(t&7);break}}return m};PlayerData.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.PlayerData)return d;var m=new $root.POGOProtos.Data.PlayerData;if(d.creation_timestamp_ms!=null){if($util.Long)(m.creation_timestamp_ms=$util.Long.fromValue(d.creation_timestamp_ms)).unsigned=false;else if(typeof d.creation_timestamp_ms==="string")m.creation_timestamp_ms=parseInt(d.creation_timestamp_ms,10);else if(typeof d.creation_timestamp_ms==="number")m.creation_timestamp_ms=d.creation_timestamp_ms;else if(typeof d.creation_timestamp_ms==="object")m.creation_timestamp_ms=new $util.LongBits(d.creation_timestamp_ms.low>>>0,d.creation_timestamp_ms.high>>>0).toNumber()}if(d.username!=null){m.username=String(d.username)}switch(d.team){case"NEUTRAL":case 0:m.team=0;break;case"BLUE":case 1:m.team=1;break;case"RED":case 2:m.team=2;break;case"YELLOW":case 3:m.team=3;break}if(d.tutorial_state){if(!Array.isArray(d.tutorial_state))throw TypeError(".POGOProtos.Data.PlayerData.tutorial_state: array expected");m.tutorial_state=[];for(var i=0;i<d.tutorial_state.length;++i){switch(d.tutorial_state[i]){default:case"LEGAL_SCREEN":case 0:m.tutorial_state[i]=0;break;case"AVATAR_SELECTION":case 1:m.tutorial_state[i]=1;break;case"ACCOUNT_CREATION":case 2:m.tutorial_state[i]=2;break;case"POKEMON_CAPTURE":case 3:m.tutorial_state[i]=3;break;case"NAME_SELECTION":case 4:m.tutorial_state[i]=4;break;case"POKEMON_BERRY":case 5:m.tutorial_state[i]=5;break;case"USE_ITEM_TUTORIAL_STATE":case 6:m.tutorial_state[i]=6;break;case"FIRST_TIME_EXPERIENCE_COMPLETE":case 7:m.tutorial_state[i]=7;break;case"POKESTOP_TUTORIAL":case 8:m.tutorial_state[i]=8;break;case"GYM_TUTORIAL":case 9:m.tutorial_state[i]=9;break;case"CHALLENGE_QUEST_TUTORIAL":case 10:m.tutorial_state[i]=10;break;case"PRIVACY_POLICY_CONFIRMATION":case 11:m.tutorial_state[i]=11;break;case"TRADING_TUTORIAL":case 12:m.tutorial_state[i]=12;break;case"POI_SUBMISSION_TUTORIAL":case 13:m.tutorial_state[i]=13;break;case"V1_START_TUTORIAL":case 14:m.tutorial_state[i]=14;break;case"V2_START_TUTORIAL":case 15:m.tutorial_state[i]=15;break;case"V2_CUSTOMIZED_AVATAR":case 16:m.tutorial_state[i]=16;break;case"V2_CAUGHT_FIRST_WILD":case 17:m.tutorial_state[i]=17;break;case"V2_FINISHED_TUTORIAL_CATCHES":case 18:m.tutorial_state[i]=18;break;case"V2_NAME_SELECTION":case 19:m.tutorial_state[i]=19;break;case"V2_EGG_GIVEN":case 20:m.tutorial_state[i]=20;break;case"V2_START_EGG_TUTORIAL":case 21:m.tutorial_state[i]=21;break;case"V2_COMPLETED_EGG_TUTORIAL":case 22:m.tutorial_state[i]=22;break}}}if(d.avatar!=null){if(typeof d.avatar!=="object")throw TypeError(".POGOProtos.Data.PlayerData.avatar: object expected");m.avatar=$root.POGOProtos.Data.Player.PlayerAvatar.fromObject(d.avatar)}if(d.max_pokemon_storage!=null){m.max_pokemon_storage=d.max_pokemon_storage|0}if(d.max_item_storage!=null){m.max_item_storage=d.max_item_storage|0}if(d.daily_bonus!=null){if(typeof d.daily_bonus!=="object")throw TypeError(".POGOProtos.Data.PlayerData.daily_bonus: object expected");m.daily_bonus=$root.POGOProtos.Data.Player.DailyBonus.fromObject(d.daily_bonus)}if(d.equipped_badge!=null){if(typeof d.equipped_badge!=="object")throw TypeError(".POGOProtos.Data.PlayerData.equipped_badge: object expected");m.equipped_badge=$root.POGOProtos.Data.Player.EquippedBadge.fromObject(d.equipped_badge)}if(d.contact_settings!=null){if(typeof d.contact_settings!=="object")throw TypeError(".POGOProtos.Data.PlayerData.contact_settings: object expected");m.contact_settings=$root.POGOProtos.Data.Player.ContactSettings.fromObject(d.contact_settings)}if(d.currency_balance){if(!Array.isArray(d.currency_balance))throw TypeError(".POGOProtos.Data.PlayerData.currency_balance: array expected");m.currency_balance=[];for(var i=0;i<d.currency_balance.length;++i){if(typeof d.currency_balance[i]!=="object")throw TypeError(".POGOProtos.Data.PlayerData.currency_balance: object expected");m.currency_balance[i]=$root.POGOProtos.Data.Store.CurrencyQuantity.fromObject(d.currency_balance[i])}}if(d.remaining_codename_claims!=null){m.remaining_codename_claims=d.remaining_codename_claims|0}if(d.buddy_pokemon!=null){if(typeof d.buddy_pokemon!=="object")throw TypeError(".POGOProtos.Data.PlayerData.buddy_pokemon: object expected");m.buddy_pokemon=$root.POGOProtos.Data.BuddyPokemon.fromObject(d.buddy_pokemon)}if(d.battle_lockout_end_ms!=null){if($util.Long)(m.battle_lockout_end_ms=$util.Long.fromValue(d.battle_lockout_end_ms)).unsigned=false;else if(typeof d.battle_lockout_end_ms==="string")m.battle_lockout_end_ms=parseInt(d.battle_lockout_end_ms,10);else if(typeof d.battle_lockout_end_ms==="number")m.battle_lockout_end_ms=d.battle_lockout_end_ms;else if(typeof d.battle_lockout_end_ms==="object")m.battle_lockout_end_ms=new $util.LongBits(d.battle_lockout_end_ms.low>>>0,d.battle_lockout_end_ms.high>>>0).toNumber()}if(d.secondary_player_avatar!=null){if(typeof d.secondary_player_avatar!=="object")throw TypeError(".POGOProtos.Data.PlayerData.secondary_player_avatar: object expected");m.secondary_player_avatar=$root.POGOProtos.Data.Player.PlayerAvatar.fromObject(d.secondary_player_avatar)}if(d.name_is_blacklisted!=null){m.name_is_blacklisted=Boolean(d.name_is_blacklisted)}if(d.social_player_settings!=null){if(typeof d.social_player_settings!=="object")throw TypeError(".POGOProtos.Data.PlayerData.social_player_settings: object expected");m.social_player_settings=$root.POGOProtos.Data.Player.SocialPlayerSettings.fromObject(d.social_player_settings)}if(d.combat_player_preferences!=null){if(typeof d.combat_player_preferences!=="object")throw TypeError(".POGOProtos.Data.PlayerData.combat_player_preferences: object expected");m.combat_player_preferences=$root.POGOProtos.Data.Combat.CombatPlayerPreferences.fromObject(d.combat_player_preferences)}if(d.player_support_id!=null){m.player_support_id=String(d.player_support_id)}return m};PlayerData.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.tutorial_state=[];d.currency_balance=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.creation_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.creation_timestamp_ms=o.longs===String?"0":0;d.username="";d.team=o.enums===String?"NEUTRAL":0;d.avatar=null;d.max_pokemon_storage=0;d.max_item_storage=0;d.daily_bonus=null;d.equipped_badge=null;d.contact_settings=null;d.remaining_codename_claims=0;d.buddy_pokemon=null;if($util.Long){var n=new $util.Long(0,0,false);d.battle_lockout_end_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.battle_lockout_end_ms=o.longs===String?"0":0;d.secondary_player_avatar=null;d.name_is_blacklisted=false;d.social_player_settings=null;d.combat_player_preferences=null;d.player_support_id=""}if(m.creation_timestamp_ms!=null&&m.hasOwnProperty("creation_timestamp_ms")){if(typeof m.creation_timestamp_ms==="number")d.creation_timestamp_ms=o.longs===String?String(m.creation_timestamp_ms):m.creation_timestamp_ms;else d.creation_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.creation_timestamp_ms):o.longs===Number?new $util.LongBits(m.creation_timestamp_ms.low>>>0,m.creation_timestamp_ms.high>>>0).toNumber():m.creation_timestamp_ms}if(m.username!=null&&m.hasOwnProperty("username")){d.username=m.username}if(m.team!=null&&m.hasOwnProperty("team")){d.team=o.enums===String?$root.POGOProtos.Enums.TeamColor[m.team]:m.team}if(m.tutorial_state&&m.tutorial_state.length){d.tutorial_state=[];for(var j=0;j<m.tutorial_state.length;++j){d.tutorial_state[j]=o.enums===String?$root.POGOProtos.Enums.TutorialState[m.tutorial_state[j]]:m.tutorial_state[j]}}if(m.avatar!=null&&m.hasOwnProperty("avatar")){d.avatar=$root.POGOProtos.Data.Player.PlayerAvatar.toObject(m.avatar,o)}if(m.max_pokemon_storage!=null&&m.hasOwnProperty("max_pokemon_storage")){d.max_pokemon_storage=m.max_pokemon_storage}if(m.max_item_storage!=null&&m.hasOwnProperty("max_item_storage")){d.max_item_storage=m.max_item_storage}if(m.daily_bonus!=null&&m.hasOwnProperty("daily_bonus")){d.daily_bonus=$root.POGOProtos.Data.Player.DailyBonus.toObject(m.daily_bonus,o)}if(m.equipped_badge!=null&&m.hasOwnProperty("equipped_badge")){d.equipped_badge=$root.POGOProtos.Data.Player.EquippedBadge.toObject(m.equipped_badge,o)}if(m.contact_settings!=null&&m.hasOwnProperty("contact_settings")){d.contact_settings=$root.POGOProtos.Data.Player.ContactSettings.toObject(m.contact_settings,o)}if(m.currency_balance&&m.currency_balance.length){d.currency_balance=[];for(var j=0;j<m.currency_balance.length;++j){d.currency_balance[j]=$root.POGOProtos.Data.Store.CurrencyQuantity.toObject(m.currency_balance[j],o)}}if(m.remaining_codename_claims!=null&&m.hasOwnProperty("remaining_codename_claims")){d.remaining_codename_claims=m.remaining_codename_claims}if(m.buddy_pokemon!=null&&m.hasOwnProperty("buddy_pokemon")){d.buddy_pokemon=$root.POGOProtos.Data.BuddyPokemon.toObject(m.buddy_pokemon,o)}if(m.battle_lockout_end_ms!=null&&m.hasOwnProperty("battle_lockout_end_ms")){if(typeof m.battle_lockout_end_ms==="number")d.battle_lockout_end_ms=o.longs===String?String(m.battle_lockout_end_ms):m.battle_lockout_end_ms;else d.battle_lockout_end_ms=o.longs===String?$util.Long.prototype.toString.call(m.battle_lockout_end_ms):o.longs===Number?new $util.LongBits(m.battle_lockout_end_ms.low>>>0,m.battle_lockout_end_ms.high>>>0).toNumber():m.battle_lockout_end_ms}if(m.secondary_player_avatar!=null&&m.hasOwnProperty("secondary_player_avatar")){d.secondary_player_avatar=$root.POGOProtos.Data.Player.PlayerAvatar.toObject(m.secondary_player_avatar,o)}if(m.name_is_blacklisted!=null&&m.hasOwnProperty("name_is_blacklisted")){d.name_is_blacklisted=m.name_is_blacklisted}if(m.social_player_settings!=null&&m.hasOwnProperty("social_player_settings")){d.social_player_settings=$root.POGOProtos.Data.Player.SocialPlayerSettings.toObject(m.social_player_settings,o)}if(m.combat_player_preferences!=null&&m.hasOwnProperty("combat_player_preferences")){d.combat_player_preferences=$root.POGOProtos.Data.Combat.CombatPlayerPreferences.toObject(m.combat_player_preferences,o)}if(m.player_support_id!=null&&m.hasOwnProperty("player_support_id")){d.player_support_id=m.player_support_id}return d};PlayerData.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlayerData}();Data.PokedexEntry=function(){function PokedexEntry(p){this.captured_costumes=[];this.captured_forms=[];this.captured_genders=[];this.encountered_costumes=[];this.encountered_forms=[];this.encountered_genders=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokedexEntry.prototype.pokemon_id=0;PokedexEntry.prototype.times_encountered=0;PokedexEntry.prototype.times_captured=0;PokedexEntry.prototype.evolution_stone_pieces=0;PokedexEntry.prototype.evolution_stones=0;PokedexEntry.prototype.captured_costumes=$util.emptyArray;PokedexEntry.prototype.captured_forms=$util.emptyArray;PokedexEntry.prototype.captured_genders=$util.emptyArray;PokedexEntry.prototype.captured_shiny=false;PokedexEntry.prototype.encountered_costumes=$util.emptyArray;PokedexEntry.prototype.encountered_forms=$util.emptyArray;PokedexEntry.prototype.encountered_genders=$util.emptyArray;PokedexEntry.prototype.encountered_shiny=false;PokedexEntry.prototype.times_lucky_received=0;PokedexEntry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(8).int32(m.pokemon_id);if(m.times_encountered!=null&&m.hasOwnProperty("times_encountered"))w.uint32(16).int32(m.times_encountered);if(m.times_captured!=null&&m.hasOwnProperty("times_captured"))w.uint32(24).int32(m.times_captured);if(m.evolution_stone_pieces!=null&&m.hasOwnProperty("evolution_stone_pieces"))w.uint32(32).int32(m.evolution_stone_pieces);if(m.evolution_stones!=null&&m.hasOwnProperty("evolution_stones"))w.uint32(40).int32(m.evolution_stones);if(m.captured_costumes!=null&&m.captured_costumes.length){w.uint32(50).fork();for(var i=0;i<m.captured_costumes.length;++i)w.int32(m.captured_costumes[i]);w.ldelim()}if(m.captured_forms!=null&&m.captured_forms.length){w.uint32(58).fork();for(var i=0;i<m.captured_forms.length;++i)w.int32(m.captured_forms[i]);w.ldelim()}if(m.captured_genders!=null&&m.captured_genders.length){w.uint32(66).fork();for(var i=0;i<m.captured_genders.length;++i)w.int32(m.captured_genders[i]);w.ldelim()}if(m.captured_shiny!=null&&m.hasOwnProperty("captured_shiny"))w.uint32(72).bool(m.captured_shiny);if(m.encountered_costumes!=null&&m.encountered_costumes.length){w.uint32(82).fork();for(var i=0;i<m.encountered_costumes.length;++i)w.int32(m.encountered_costumes[i]);w.ldelim()}if(m.encountered_forms!=null&&m.encountered_forms.length){w.uint32(90).fork();for(var i=0;i<m.encountered_forms.length;++i)w.int32(m.encountered_forms[i]);w.ldelim()}if(m.encountered_genders!=null&&m.encountered_genders.length){w.uint32(98).fork();for(var i=0;i<m.encountered_genders.length;++i)w.int32(m.encountered_genders[i]);w.ldelim()}if(m.encountered_shiny!=null&&m.hasOwnProperty("encountered_shiny"))w.uint32(104).bool(m.encountered_shiny);if(m.times_lucky_received!=null&&m.hasOwnProperty("times_lucky_received"))w.uint32(112).int32(m.times_lucky_received);return w};PokedexEntry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.PokedexEntry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.int32();break;case 2:m.times_encountered=r.int32();break;case 3:m.times_captured=r.int32();break;case 4:m.evolution_stone_pieces=r.int32();break;case 5:m.evolution_stones=r.int32();break;case 6:if(!(m.captured_costumes&&m.captured_costumes.length))m.captured_costumes=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.captured_costumes.push(r.int32())}else m.captured_costumes.push(r.int32());break;case 7:if(!(m.captured_forms&&m.captured_forms.length))m.captured_forms=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.captured_forms.push(r.int32())}else m.captured_forms.push(r.int32());break;case 8:if(!(m.captured_genders&&m.captured_genders.length))m.captured_genders=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.captured_genders.push(r.int32())}else m.captured_genders.push(r.int32());break;case 9:m.captured_shiny=r.bool();break;case 10:if(!(m.encountered_costumes&&m.encountered_costumes.length))m.encountered_costumes=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.encountered_costumes.push(r.int32())}else m.encountered_costumes.push(r.int32());break;case 11:if(!(m.encountered_forms&&m.encountered_forms.length))m.encountered_forms=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.encountered_forms.push(r.int32())}else m.encountered_forms.push(r.int32());break;case 12:if(!(m.encountered_genders&&m.encountered_genders.length))m.encountered_genders=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.encountered_genders.push(r.int32())}else m.encountered_genders.push(r.int32());break;case 13:m.encountered_shiny=r.bool();break;case 14:m.times_lucky_received=r.int32();break;default:r.skipType(t&7);break}}return m};PokedexEntry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.PokedexEntry)return d;var m=new $root.POGOProtos.Data.PokedexEntry;switch(d.pokemon_id){case"MISSINGNO":case 0:m.pokemon_id=0;break;case"BULBASAUR":case 1:m.pokemon_id=1;break;case"IVYSAUR":case 2:m.pokemon_id=2;break;case"VENUSAUR":case 3:m.pokemon_id=3;break;case"CHARMANDER":case 4:m.pokemon_id=4;break;case"CHARMELEON":case 5:m.pokemon_id=5;break;case"CHARIZARD":case 6:m.pokemon_id=6;break;case"SQUIRTLE":case 7:m.pokemon_id=7;break;case"WARTORTLE":case 8:m.pokemon_id=8;break;case"BLASTOISE":case 9:m.pokemon_id=9;break;case"CATERPIE":case 10:m.pokemon_id=10;break;case"METAPOD":case 11:m.pokemon_id=11;break;case"BUTTERFREE":case 12:m.pokemon_id=12;break;case"WEEDLE":case 13:m.pokemon_id=13;break;case"KAKUNA":case 14:m.pokemon_id=14;break;case"BEEDRILL":case 15:m.pokemon_id=15;break;case"PIDGEY":case 16:m.pokemon_id=16;break;case"PIDGEOTTO":case 17:m.pokemon_id=17;break;case"PIDGEOT":case 18:m.pokemon_id=18;break;case"RATTATA":case 19:m.pokemon_id=19;break;case"RATICATE":case 20:m.pokemon_id=20;break;case"SPEAROW":case 21:m.pokemon_id=21;break;case"FEAROW":case 22:m.pokemon_id=22;break;case"EKANS":case 23:m.pokemon_id=23;break;case"ARBOK":case 24:m.pokemon_id=24;break;case"PIKACHU":case 25:m.pokemon_id=25;break;case"RAICHU":case 26:m.pokemon_id=26;break;case"SANDSHREW":case 27:m.pokemon_id=27;break;case"SANDSLASH":case 28:m.pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_id=29;break;case"NIDORINA":case 30:m.pokemon_id=30;break;case"NIDOQUEEN":case 31:m.pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.pokemon_id=32;break;case"NIDORINO":case 33:m.pokemon_id=33;break;case"NIDOKING":case 34:m.pokemon_id=34;break;case"CLEFAIRY":case 35:m.pokemon_id=35;break;case"CLEFABLE":case 36:m.pokemon_id=36;break;case"VULPIX":case 37:m.pokemon_id=37;break;case"NINETALES":case 38:m.pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.pokemon_id=40;break;case"ZUBAT":case 41:m.pokemon_id=41;break;case"GOLBAT":case 42:m.pokemon_id=42;break;case"ODDISH":case 43:m.pokemon_id=43;break;case"GLOOM":case 44:m.pokemon_id=44;break;case"VILEPLUME":case 45:m.pokemon_id=45;break;case"PARAS":case 46:m.pokemon_id=46;break;case"PARASECT":case 47:m.pokemon_id=47;break;case"VENONAT":case 48:m.pokemon_id=48;break;case"VENOMOTH":case 49:m.pokemon_id=49;break;case"DIGLETT":case 50:m.pokemon_id=50;break;case"DUGTRIO":case 51:m.pokemon_id=51;break;case"MEOWTH":case 52:m.pokemon_id=52;break;case"PERSIAN":case 53:m.pokemon_id=53;break;case"PSYDUCK":case 54:m.pokemon_id=54;break;case"GOLDUCK":case 55:m.pokemon_id=55;break;case"MANKEY":case 56:m.pokemon_id=56;break;case"PRIMEAPE":case 57:m.pokemon_id=57;break;case"GROWLITHE":case 58:m.pokemon_id=58;break;case"ARCANINE":case 59:m.pokemon_id=59;break;case"POLIWAG":case 60:m.pokemon_id=60;break;case"POLIWHIRL":case 61:m.pokemon_id=61;break;case"POLIWRATH":case 62:m.pokemon_id=62;break;case"ABRA":case 63:m.pokemon_id=63;break;case"KADABRA":case 64:m.pokemon_id=64;break;case"ALAKAZAM":case 65:m.pokemon_id=65;break;case"MACHOP":case 66:m.pokemon_id=66;break;case"MACHOKE":case 67:m.pokemon_id=67;break;case"MACHAMP":case 68:m.pokemon_id=68;break;case"BELLSPROUT":case 69:m.pokemon_id=69;break;case"WEEPINBELL":case 70:m.pokemon_id=70;break;case"VICTREEBEL":case 71:m.pokemon_id=71;break;case"TENTACOOL":case 72:m.pokemon_id=72;break;case"TENTACRUEL":case 73:m.pokemon_id=73;break;case"GEODUDE":case 74:m.pokemon_id=74;break;case"GRAVELER":case 75:m.pokemon_id=75;break;case"GOLEM":case 76:m.pokemon_id=76;break;case"PONYTA":case 77:m.pokemon_id=77;break;case"RAPIDASH":case 78:m.pokemon_id=78;break;case"SLOWPOKE":case 79:m.pokemon_id=79;break;case"SLOWBRO":case 80:m.pokemon_id=80;break;case"MAGNEMITE":case 81:m.pokemon_id=81;break;case"MAGNETON":case 82:m.pokemon_id=82;break;case"FARFETCHD":case 83:m.pokemon_id=83;break;case"DODUO":case 84:m.pokemon_id=84;break;case"DODRIO":case 85:m.pokemon_id=85;break;case"SEEL":case 86:m.pokemon_id=86;break;case"DEWGONG":case 87:m.pokemon_id=87;break;case"GRIMER":case 88:m.pokemon_id=88;break;case"MUK":case 89:m.pokemon_id=89;break;case"SHELLDER":case 90:m.pokemon_id=90;break;case"CLOYSTER":case 91:m.pokemon_id=91;break;case"GASTLY":case 92:m.pokemon_id=92;break;case"HAUNTER":case 93:m.pokemon_id=93;break;case"GENGAR":case 94:m.pokemon_id=94;break;case"ONIX":case 95:m.pokemon_id=95;break;case"DROWZEE":case 96:m.pokemon_id=96;break;case"HYPNO":case 97:m.pokemon_id=97;break;case"KRABBY":case 98:m.pokemon_id=98;break;case"KINGLER":case 99:m.pokemon_id=99;break;case"VOLTORB":case 100:m.pokemon_id=100;break;case"ELECTRODE":case 101:m.pokemon_id=101;break;case"EXEGGCUTE":case 102:m.pokemon_id=102;break;case"EXEGGUTOR":case 103:m.pokemon_id=103;break;case"CUBONE":case 104:m.pokemon_id=104;break;case"MAROWAK":case 105:m.pokemon_id=105;break;case"HITMONLEE":case 106:m.pokemon_id=106;break;case"HITMONCHAN":case 107:m.pokemon_id=107;break;case"LICKITUNG":case 108:m.pokemon_id=108;break;case"KOFFING":case 109:m.pokemon_id=109;break;case"WEEZING":case 110:m.pokemon_id=110;break;case"RHYHORN":case 111:m.pokemon_id=111;break;case"RHYDON":case 112:m.pokemon_id=112;break;case"CHANSEY":case 113:m.pokemon_id=113;break;case"TANGELA":case 114:m.pokemon_id=114;break;case"KANGASKHAN":case 115:m.pokemon_id=115;break;case"HORSEA":case 116:m.pokemon_id=116;break;case"SEADRA":case 117:m.pokemon_id=117;break;case"GOLDEEN":case 118:m.pokemon_id=118;break;case"SEAKING":case 119:m.pokemon_id=119;break;case"STARYU":case 120:m.pokemon_id=120;break;case"STARMIE":case 121:m.pokemon_id=121;break;case"MR_MIME":case 122:m.pokemon_id=122;break;case"SCYTHER":case 123:m.pokemon_id=123;break;case"JYNX":case 124:m.pokemon_id=124;break;case"ELECTABUZZ":case 125:m.pokemon_id=125;break;case"MAGMAR":case 126:m.pokemon_id=126;break;case"PINSIR":case 127:m.pokemon_id=127;break;case"TAUROS":case 128:m.pokemon_id=128;break;case"MAGIKARP":case 129:m.pokemon_id=129;break;case"GYARADOS":case 130:m.pokemon_id=130;break;case"LAPRAS":case 131:m.pokemon_id=131;break;case"DITTO":case 132:m.pokemon_id=132;break;case"EEVEE":case 133:m.pokemon_id=133;break;case"VAPOREON":case 134:m.pokemon_id=134;break;case"JOLTEON":case 135:m.pokemon_id=135;break;case"FLAREON":case 136:m.pokemon_id=136;break;case"PORYGON":case 137:m.pokemon_id=137;break;case"OMANYTE":case 138:m.pokemon_id=138;break;case"OMASTAR":case 139:m.pokemon_id=139;break;case"KABUTO":case 140:m.pokemon_id=140;break;case"KABUTOPS":case 141:m.pokemon_id=141;break;case"AERODACTYL":case 142:m.pokemon_id=142;break;case"SNORLAX":case 143:m.pokemon_id=143;break;case"ARTICUNO":case 144:m.pokemon_id=144;break;case"ZAPDOS":case 145:m.pokemon_id=145;break;case"MOLTRES":case 146:m.pokemon_id=146;break;case"DRATINI":case 147:m.pokemon_id=147;break;case"DRAGONAIR":case 148:m.pokemon_id=148;break;case"DRAGONITE":case 149:m.pokemon_id=149;break;case"MEWTWO":case 150:m.pokemon_id=150;break;case"MEW":case 151:m.pokemon_id=151;break;case"CHIKORITA":case 152:m.pokemon_id=152;break;case"BAYLEEF":case 153:m.pokemon_id=153;break;case"MEGANIUM":case 154:m.pokemon_id=154;break;case"CYNDAQUIL":case 155:m.pokemon_id=155;break;case"QUILAVA":case 156:m.pokemon_id=156;break;case"TYPHLOSION":case 157:m.pokemon_id=157;break;case"TOTODILE":case 158:m.pokemon_id=158;break;case"CROCONAW":case 159:m.pokemon_id=159;break;case"FERALIGATR":case 160:m.pokemon_id=160;break;case"SENTRET":case 161:m.pokemon_id=161;break;case"FURRET":case 162:m.pokemon_id=162;break;case"HOOTHOOT":case 163:m.pokemon_id=163;break;case"NOCTOWL":case 164:m.pokemon_id=164;break;case"LEDYBA":case 165:m.pokemon_id=165;break;case"LEDIAN":case 166:m.pokemon_id=166;break;case"SPINARAK":case 167:m.pokemon_id=167;break;case"ARIADOS":case 168:m.pokemon_id=168;break;case"CROBAT":case 169:m.pokemon_id=169;break;case"CHINCHOU":case 170:m.pokemon_id=170;break;case"LANTURN":case 171:m.pokemon_id=171;break;case"PICHU":case 172:m.pokemon_id=172;break;case"CLEFFA":case 173:m.pokemon_id=173;break;case"IGGLYBUFF":case 174:m.pokemon_id=174;break;case"TOGEPI":case 175:m.pokemon_id=175;break;case"TOGETIC":case 176:m.pokemon_id=176;break;case"NATU":case 177:m.pokemon_id=177;break;case"XATU":case 178:m.pokemon_id=178;break;case"MAREEP":case 179:m.pokemon_id=179;break;case"FLAAFFY":case 180:m.pokemon_id=180;break;case"AMPHAROS":case 181:m.pokemon_id=181;break;case"BELLOSSOM":case 182:m.pokemon_id=182;break;case"MARILL":case 183:m.pokemon_id=183;break;case"AZUMARILL":case 184:m.pokemon_id=184;break;case"SUDOWOODO":case 185:m.pokemon_id=185;break;case"POLITOED":case 186:m.pokemon_id=186;break;case"HOPPIP":case 187:m.pokemon_id=187;break;case"SKIPLOOM":case 188:m.pokemon_id=188;break;case"JUMPLUFF":case 189:m.pokemon_id=189;break;case"AIPOM":case 190:m.pokemon_id=190;break;case"SUNKERN":case 191:m.pokemon_id=191;break;case"SUNFLORA":case 192:m.pokemon_id=192;break;case"YANMA":case 193:m.pokemon_id=193;break;case"WOOPER":case 194:m.pokemon_id=194;break;case"QUAGSIRE":case 195:m.pokemon_id=195;break;case"ESPEON":case 196:m.pokemon_id=196;break;case"UMBREON":case 197:m.pokemon_id=197;break;case"MURKROW":case 198:m.pokemon_id=198;break;case"SLOWKING":case 199:m.pokemon_id=199;break;case"MISDREAVUS":case 200:m.pokemon_id=200;break;case"UNOWN":case 201:m.pokemon_id=201;break;case"WOBBUFFET":case 202:m.pokemon_id=202;break;case"GIRAFARIG":case 203:m.pokemon_id=203;break;case"PINECO":case 204:m.pokemon_id=204;break;case"FORRETRESS":case 205:m.pokemon_id=205;break;case"DUNSPARCE":case 206:m.pokemon_id=206;break;case"GLIGAR":case 207:m.pokemon_id=207;break;case"STEELIX":case 208:m.pokemon_id=208;break;case"SNUBBULL":case 209:m.pokemon_id=209;break;case"GRANBULL":case 210:m.pokemon_id=210;break;case"QWILFISH":case 211:m.pokemon_id=211;break;case"SCIZOR":case 212:m.pokemon_id=212;break;case"SHUCKLE":case 213:m.pokemon_id=213;break;case"HERACROSS":case 214:m.pokemon_id=214;break;case"SNEASEL":case 215:m.pokemon_id=215;break;case"TEDDIURSA":case 216:m.pokemon_id=216;break;case"URSARING":case 217:m.pokemon_id=217;break;case"SLUGMA":case 218:m.pokemon_id=218;break;case"MAGCARGO":case 219:m.pokemon_id=219;break;case"SWINUB":case 220:m.pokemon_id=220;break;case"PILOSWINE":case 221:m.pokemon_id=221;break;case"CORSOLA":case 222:m.pokemon_id=222;break;case"REMORAID":case 223:m.pokemon_id=223;break;case"OCTILLERY":case 224:m.pokemon_id=224;break;case"DELIBIRD":case 225:m.pokemon_id=225;break;case"MANTINE":case 226:m.pokemon_id=226;break;case"SKARMORY":case 227:m.pokemon_id=227;break;case"HOUNDOUR":case 228:m.pokemon_id=228;break;case"HOUNDOOM":case 229:m.pokemon_id=229;break;case"KINGDRA":case 230:m.pokemon_id=230;break;case"PHANPY":case 231:m.pokemon_id=231;break;case"DONPHAN":case 232:m.pokemon_id=232;break;case"PORYGON2":case 233:m.pokemon_id=233;break;case"STANTLER":case 234:m.pokemon_id=234;break;case"SMEARGLE":case 235:m.pokemon_id=235;break;case"TYROGUE":case 236:m.pokemon_id=236;break;case"HITMONTOP":case 237:m.pokemon_id=237;break;case"SMOOCHUM":case 238:m.pokemon_id=238;break;case"ELEKID":case 239:m.pokemon_id=239;break;case"MAGBY":case 240:m.pokemon_id=240;break;case"MILTANK":case 241:m.pokemon_id=241;break;case"BLISSEY":case 242:m.pokemon_id=242;break;case"RAIKOU":case 243:m.pokemon_id=243;break;case"ENTEI":case 244:m.pokemon_id=244;break;case"SUICUNE":case 245:m.pokemon_id=245;break;case"LARVITAR":case 246:m.pokemon_id=246;break;case"PUPITAR":case 247:m.pokemon_id=247;break;case"TYRANITAR":case 248:m.pokemon_id=248;break;case"LUGIA":case 249:m.pokemon_id=249;break;case"HO_OH":case 250:m.pokemon_id=250;break;case"CELEBI":case 251:m.pokemon_id=251;break;case"TREECKO":case 252:m.pokemon_id=252;break;case"GROVYLE":case 253:m.pokemon_id=253;break;case"SCEPTILE":case 254:m.pokemon_id=254;break;case"TORCHIC":case 255:m.pokemon_id=255;break;case"COMBUSKEN":case 256:m.pokemon_id=256;break;case"BLAZIKEN":case 257:m.pokemon_id=257;break;case"MUDKIP":case 258:m.pokemon_id=258;break;case"MARSHTOMP":case 259:m.pokemon_id=259;break;case"SWAMPERT":case 260:m.pokemon_id=260;break;case"POOCHYENA":case 261:m.pokemon_id=261;break;case"MIGHTYENA":case 262:m.pokemon_id=262;break;case"ZIGZAGOON":case 263:m.pokemon_id=263;break;case"LINOONE":case 264:m.pokemon_id=264;break;case"WURMPLE":case 265:m.pokemon_id=265;break;case"SILCOON":case 266:m.pokemon_id=266;break;case"BEAUTIFLY":case 267:m.pokemon_id=267;break;case"CASCOON":case 268:m.pokemon_id=268;break;case"DUSTOX":case 269:m.pokemon_id=269;break;case"LOTAD":case 270:m.pokemon_id=270;break;case"LOMBRE":case 271:m.pokemon_id=271;break;case"LUDICOLO":case 272:m.pokemon_id=272;break;case"SEEDOT":case 273:m.pokemon_id=273;break;case"NUZLEAF":case 274:m.pokemon_id=274;break;case"SHIFTRY":case 275:m.pokemon_id=275;break;case"TAILLOW":case 276:m.pokemon_id=276;break;case"SWELLOW":case 277:m.pokemon_id=277;break;case"WINGULL":case 278:m.pokemon_id=278;break;case"PELIPPER":case 279:m.pokemon_id=279;break;case"RALTS":case 280:m.pokemon_id=280;break;case"KIRLIA":case 281:m.pokemon_id=281;break;case"GARDEVOIR":case 282:m.pokemon_id=282;break;case"SURSKIT":case 283:m.pokemon_id=283;break;case"MASQUERAIN":case 284:m.pokemon_id=284;break;case"SHROOMISH":case 285:m.pokemon_id=285;break;case"BRELOOM":case 286:m.pokemon_id=286;break;case"SLAKOTH":case 287:m.pokemon_id=287;break;case"VIGOROTH":case 288:m.pokemon_id=288;break;case"SLAKING":case 289:m.pokemon_id=289;break;case"NINCADA":case 290:m.pokemon_id=290;break;case"NINJASK":case 291:m.pokemon_id=291;break;case"SHEDINJA":case 292:m.pokemon_id=292;break;case"WHISMUR":case 293:m.pokemon_id=293;break;case"LOUDRED":case 294:m.pokemon_id=294;break;case"EXPLOUD":case 295:m.pokemon_id=295;break;case"MAKUHITA":case 296:m.pokemon_id=296;break;case"HARIYAMA":case 297:m.pokemon_id=297;break;case"AZURILL":case 298:m.pokemon_id=298;break;case"NOSEPASS":case 299:m.pokemon_id=299;break;case"SKITTY":case 300:m.pokemon_id=300;break;case"DELCATTY":case 301:m.pokemon_id=301;break;case"SABLEYE":case 302:m.pokemon_id=302;break;case"MAWILE":case 303:m.pokemon_id=303;break;case"ARON":case 304:m.pokemon_id=304;break;case"LAIRON":case 305:m.pokemon_id=305;break;case"AGGRON":case 306:m.pokemon_id=306;break;case"MEDITITE":case 307:m.pokemon_id=307;break;case"MEDICHAM":case 308:m.pokemon_id=308;break;case"ELECTRIKE":case 309:m.pokemon_id=309;break;case"MANECTRIC":case 310:m.pokemon_id=310;break;case"PLUSLE":case 311:m.pokemon_id=311;break;case"MINUN":case 312:m.pokemon_id=312;break;case"VOLBEAT":case 313:m.pokemon_id=313;break;case"ILLUMISE":case 314:m.pokemon_id=314;break;case"ROSELIA":case 315:m.pokemon_id=315;break;case"GULPIN":case 316:m.pokemon_id=316;break;case"SWALOT":case 317:m.pokemon_id=317;break;case"CARVANHA":case 318:m.pokemon_id=318;break;case"SHARPEDO":case 319:m.pokemon_id=319;break;case"WAILMER":case 320:m.pokemon_id=320;break;case"WAILORD":case 321:m.pokemon_id=321;break;case"NUMEL":case 322:m.pokemon_id=322;break;case"CAMERUPT":case 323:m.pokemon_id=323;break;case"TORKOAL":case 324:m.pokemon_id=324;break;case"SPOINK":case 325:m.pokemon_id=325;break;case"GRUMPIG":case 326:m.pokemon_id=326;break;case"SPINDA":case 327:m.pokemon_id=327;break;case"TRAPINCH":case 328:m.pokemon_id=328;break;case"VIBRAVA":case 329:m.pokemon_id=329;break;case"FLYGON":case 330:m.pokemon_id=330;break;case"CACNEA":case 331:m.pokemon_id=331;break;case"CACTURNE":case 332:m.pokemon_id=332;break;case"SWABLU":case 333:m.pokemon_id=333;break;case"ALTARIA":case 334:m.pokemon_id=334;break;case"ZANGOOSE":case 335:m.pokemon_id=335;break;case"SEVIPER":case 336:m.pokemon_id=336;break;case"LUNATONE":case 337:m.pokemon_id=337;break;case"SOLROCK":case 338:m.pokemon_id=338;break;case"BARBOACH":case 339:m.pokemon_id=339;break;case"WHISCASH":case 340:m.pokemon_id=340;break;case"CORPHISH":case 341:m.pokemon_id=341;break;case"CRAWDAUNT":case 342:m.pokemon_id=342;break;case"BALTOY":case 343:m.pokemon_id=343;break;case"CLAYDOL":case 344:m.pokemon_id=344;break;case"LILEEP":case 345:m.pokemon_id=345;break;case"CRADILY":case 346:m.pokemon_id=346;break;case"ANORITH":case 347:m.pokemon_id=347;break;case"ARMALDO":case 348:m.pokemon_id=348;break;case"FEEBAS":case 349:m.pokemon_id=349;break;case"MILOTIC":case 350:m.pokemon_id=350;break;case"CASTFORM":case 351:m.pokemon_id=351;break;case"KECLEON":case 352:m.pokemon_id=352;break;case"SHUPPET":case 353:m.pokemon_id=353;break;case"BANETTE":case 354:m.pokemon_id=354;break;case"DUSKULL":case 355:m.pokemon_id=355;break;case"DUSCLOPS":case 356:m.pokemon_id=356;break;case"TROPIUS":case 357:m.pokemon_id=357;break;case"CHIMECHO":case 358:m.pokemon_id=358;break;case"ABSOL":case 359:m.pokemon_id=359;break;case"WYNAUT":case 360:m.pokemon_id=360;break;case"SNORUNT":case 361:m.pokemon_id=361;break;case"GLALIE":case 362:m.pokemon_id=362;break;case"SPHEAL":case 363:m.pokemon_id=363;break;case"SEALEO":case 364:m.pokemon_id=364;break;case"WALREIN":case 365:m.pokemon_id=365;break;case"CLAMPERL":case 366:m.pokemon_id=366;break;case"HUNTAIL":case 367:m.pokemon_id=367;break;case"GOREBYSS":case 368:m.pokemon_id=368;break;case"RELICANTH":case 369:m.pokemon_id=369;break;case"LUVDISC":case 370:m.pokemon_id=370;break;case"BAGON":case 371:m.pokemon_id=371;break;case"SHELGON":case 372:m.pokemon_id=372;break;case"SALAMENCE":case 373:m.pokemon_id=373;break;case"BELDUM":case 374:m.pokemon_id=374;break;case"METANG":case 375:m.pokemon_id=375;break;case"METAGROSS":case 376:m.pokemon_id=376;break;case"REGIROCK":case 377:m.pokemon_id=377;break;case"REGICE":case 378:m.pokemon_id=378;break;case"REGISTEEL":case 379:m.pokemon_id=379;break;case"LATIAS":case 380:m.pokemon_id=380;break;case"LATIOS":case 381:m.pokemon_id=381;break;case"KYOGRE":case 382:m.pokemon_id=382;break;case"GROUDON":case 383:m.pokemon_id=383;break;case"RAYQUAZA":case 384:m.pokemon_id=384;break;case"JIRACHI":case 385:m.pokemon_id=385;break;case"DEOXYS":case 386:m.pokemon_id=386;break;case"TURTWIG":case 387:m.pokemon_id=387;break;case"GROTLE":case 388:m.pokemon_id=388;break;case"TORTERRA":case 389:m.pokemon_id=389;break;case"CHIMCHAR":case 390:m.pokemon_id=390;break;case"MONFERNO":case 391:m.pokemon_id=391;break;case"INFERNAPE":case 392:m.pokemon_id=392;break;case"PIPLUP":case 393:m.pokemon_id=393;break;case"PRINPLUP":case 394:m.pokemon_id=394;break;case"EMPOLEON":case 395:m.pokemon_id=395;break;case"STARLY":case 396:m.pokemon_id=396;break;case"STARAVIA":case 397:m.pokemon_id=397;break;case"STARAPTOR":case 398:m.pokemon_id=398;break;case"BIDOOF":case 399:m.pokemon_id=399;break;case"BIBAREL":case 400:m.pokemon_id=400;break;case"KRICKETOT":case 401:m.pokemon_id=401;break;case"KRICKETUNE":case 402:m.pokemon_id=402;break;case"SHINX":case 403:m.pokemon_id=403;break;case"LUXIO":case 404:m.pokemon_id=404;break;case"LUXRAY":case 405:m.pokemon_id=405;break;case"BUDEW":case 406:m.pokemon_id=406;break;case"ROSERADE":case 407:m.pokemon_id=407;break;case"CRANIDOS":case 408:m.pokemon_id=408;break;case"RAMPARDOS":case 409:m.pokemon_id=409;break;case"SHIELDON":case 410:m.pokemon_id=410;break;case"BASTIODON":case 411:m.pokemon_id=411;break;case"BURMY":case 412:m.pokemon_id=412;break;case"WORMADAM":case 413:m.pokemon_id=413;break;case"MOTHIM":case 414:m.pokemon_id=414;break;case"COMBEE":case 415:m.pokemon_id=415;break;case"VESPIQUEN":case 416:m.pokemon_id=416;break;case"PACHIRISU":case 417:m.pokemon_id=417;break;case"BUIZEL":case 418:m.pokemon_id=418;break;case"FLOATZEL":case 419:m.pokemon_id=419;break;case"CHERUBI":case 420:m.pokemon_id=420;break;case"CHERRIM":case 421:m.pokemon_id=421;break;case"SHELLOS":case 422:m.pokemon_id=422;break;case"GASTRODON":case 423:m.pokemon_id=423;break;case"AMBIPOM":case 424:m.pokemon_id=424;break;case"DRIFLOON":case 425:m.pokemon_id=425;break;case"DRIFBLIM":case 426:m.pokemon_id=426;break;case"BUNEARY":case 427:m.pokemon_id=427;break;case"LOPUNNY":case 428:m.pokemon_id=428;break;case"MISMAGIUS":case 429:m.pokemon_id=429;break;case"HONCHKROW":case 430:m.pokemon_id=430;break;case"GLAMEOW":case 431:m.pokemon_id=431;break;case"PURUGLY":case 432:m.pokemon_id=432;break;case"CHINGLING":case 433:m.pokemon_id=433;break;case"STUNKY":case 434:m.pokemon_id=434;break;case"SKUNTANK":case 435:m.pokemon_id=435;break;case"BRONZOR":case 436:m.pokemon_id=436;break;case"BRONZONG":case 437:m.pokemon_id=437;break;case"BONSLY":case 438:m.pokemon_id=438;break;case"MIME_JR":case 439:m.pokemon_id=439;break;case"HAPPINY":case 440:m.pokemon_id=440;break;case"CHATOT":case 441:m.pokemon_id=441;break;case"SPIRITOMB":case 442:m.pokemon_id=442;break;case"GIBLE":case 443:m.pokemon_id=443;break;case"GABITE":case 444:m.pokemon_id=444;break;case"GARCHOMP":case 445:m.pokemon_id=445;break;case"MUNCHLAX":case 446:m.pokemon_id=446;break;case"RIOLU":case 447:m.pokemon_id=447;break;case"LUCARIO":case 448:m.pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.pokemon_id=449;break;case"HIPPOWDON":case 450:m.pokemon_id=450;break;case"SKORUPI":case 451:m.pokemon_id=451;break;case"DRAPION":case 452:m.pokemon_id=452;break;case"CROAGUNK":case 453:m.pokemon_id=453;break;case"TOXICROAK":case 454:m.pokemon_id=454;break;case"CARNIVINE":case 455:m.pokemon_id=455;break;case"FINNEON":case 456:m.pokemon_id=456;break;case"LUMINEON":case 457:m.pokemon_id=457;break;case"MANTYKE":case 458:m.pokemon_id=458;break;case"SNOVER":case 459:m.pokemon_id=459;break;case"ABOMASNOW":case 460:m.pokemon_id=460;break;case"WEAVILE":case 461:m.pokemon_id=461;break;case"MAGNEZONE":case 462:m.pokemon_id=462;break;case"LICKILICKY":case 463:m.pokemon_id=463;break;case"RHYPERIOR":case 464:m.pokemon_id=464;break;case"TANGROWTH":case 465:m.pokemon_id=465;break;case"ELECTIVIRE":case 466:m.pokemon_id=466;break;case"MAGMORTAR":case 467:m.pokemon_id=467;break;case"TOGEKISS":case 468:m.pokemon_id=468;break;case"YANMEGA":case 469:m.pokemon_id=469;break;case"LEAFEON":case 470:m.pokemon_id=470;break;case"GLACEON":case 471:m.pokemon_id=471;break;case"GLISCOR":case 472:m.pokemon_id=472;break;case"MAMOSWINE":case 473:m.pokemon_id=473;break;case"PORYGON_Z":case 474:m.pokemon_id=474;break;case"GALLADE":case 475:m.pokemon_id=475;break;case"PROBOPASS":case 476:m.pokemon_id=476;break;case"DUSKNOIR":case 477:m.pokemon_id=477;break;case"FROSLASS":case 478:m.pokemon_id=478;break;case"ROTOM":case 479:m.pokemon_id=479;break;case"UXIE":case 480:m.pokemon_id=480;break;case"MESPRIT":case 481:m.pokemon_id=481;break;case"AZELF":case 482:m.pokemon_id=482;break;case"DIALGA":case 483:m.pokemon_id=483;break;case"PALKIA":case 484:m.pokemon_id=484;break;case"HEATRAN":case 485:m.pokemon_id=485;break;case"REGIGIGAS":case 486:m.pokemon_id=486;break;case"GIRATINA":case 487:m.pokemon_id=487;break;case"CRESSELIA":case 488:m.pokemon_id=488;break;case"PHIONE":case 489:m.pokemon_id=489;break;case"MANAPHY":case 490:m.pokemon_id=490;break;case"DARKRAI":case 491:m.pokemon_id=491;break;case"SHAYMIN":case 492:m.pokemon_id=492;break;case"ARCEUS":case 493:m.pokemon_id=493;break;case"MELTAN":case 808:m.pokemon_id=808;break;case"MELMETAL":case 809:m.pokemon_id=809;break}if(d.times_encountered!=null){m.times_encountered=d.times_encountered|0}if(d.times_captured!=null){m.times_captured=d.times_captured|0}if(d.evolution_stone_pieces!=null){m.evolution_stone_pieces=d.evolution_stone_pieces|0}if(d.evolution_stones!=null){m.evolution_stones=d.evolution_stones|0}if(d.captured_costumes){if(!Array.isArray(d.captured_costumes))throw TypeError(".POGOProtos.Data.PokedexEntry.captured_costumes: array expected");m.captured_costumes=[];for(var i=0;i<d.captured_costumes.length;++i){switch(d.captured_costumes[i]){default:case"COSTUME_UNSET":case 0:m.captured_costumes[i]=0;break;case"HOLIDAY_2016":case 1:m.captured_costumes[i]=1;break;case"ANNIVERSARY":case 2:m.captured_costumes[i]=2;break;case"ONE_YEAR_ANNIVERSARY":case 3:m.captured_costumes[i]=3;break;case"HALLOWEEN_2017":case 4:m.captured_costumes[i]=4;break;case"SUMMER_2018":case 5:m.captured_costumes[i]=5;break;case"FALL_2018":case 6:m.captured_costumes[i]=6;break;case"NOVEMBER_2018":case 7:m.captured_costumes[i]=7;break;case"WINTER_2018":case 8:m.captured_costumes[i]=8;break}}}if(d.captured_forms){if(!Array.isArray(d.captured_forms))throw TypeError(".POGOProtos.Data.PokedexEntry.captured_forms: array expected");m.captured_forms=[];for(var i=0;i<d.captured_forms.length;++i){switch(d.captured_forms[i]){default:case"FORM_UNSET":case 0:m.captured_forms[i]=0;break;case"UNOWN_A":case 1:m.captured_forms[i]=1;break;case"UNOWN_B":case 2:m.captured_forms[i]=2;break;case"UNOWN_C":case 3:m.captured_forms[i]=3;break;case"UNOWN_D":case 4:m.captured_forms[i]=4;break;case"UNOWN_E":case 5:m.captured_forms[i]=5;break;case"UNOWN_F":case 6:m.captured_forms[i]=6;break;case"UNOWN_G":case 7:m.captured_forms[i]=7;break;case"UNOWN_H":case 8:m.captured_forms[i]=8;break;case"UNOWN_I":case 9:m.captured_forms[i]=9;break;case"UNOWN_J":case 10:m.captured_forms[i]=10;break;case"UNOWN_K":case 11:m.captured_forms[i]=11;break;case"UNOWN_L":case 12:m.captured_forms[i]=12;break;case"UNOWN_M":case 13:m.captured_forms[i]=13;break;case"UNOWN_N":case 14:m.captured_forms[i]=14;break;case"UNOWN_O":case 15:m.captured_forms[i]=15;break;case"UNOWN_P":case 16:m.captured_forms[i]=16;break;case"UNOWN_Q":case 17:m.captured_forms[i]=17;break;case"UNOWN_R":case 18:m.captured_forms[i]=18;break;case"UNOWN_S":case 19:m.captured_forms[i]=19;break;case"UNOWN_T":case 20:m.captured_forms[i]=20;break;case"UNOWN_U":case 21:m.captured_forms[i]=21;break;case"UNOWN_V":case 22:m.captured_forms[i]=22;break;case"UNOWN_W":case 23:m.captured_forms[i]=23;break;case"UNOWN_X":case 24:m.captured_forms[i]=24;break;case"UNOWN_Y":case 25:m.captured_forms[i]=25;break;case"UNOWN_Z":case 26:m.captured_forms[i]=26;break;case"UNOWN_EXCLAMATION_POINT":case 27:m.captured_forms[i]=27;break;case"UNOWN_QUESTION_MARK":case 28:m.captured_forms[i]=28;break;case"CASTFORM_NORMAL":case 29:m.captured_forms[i]=29;break;case"CASTFORM_SUNNY":case 30:m.captured_forms[i]=30;break;case"CASTFORM_RAINY":case 31:m.captured_forms[i]=31;break;case"CASTFORM_SNOWY":case 32:m.captured_forms[i]=32;break;case"DEOXYS_NORMAL":case 33:m.captured_forms[i]=33;break;case"DEOXYS_ATTACK":case 34:m.captured_forms[i]=34;break;case"DEOXYS_DEFENSE":case 35:m.captured_forms[i]=35;break;case"DEOXYS_SPEED":case 36:m.captured_forms[i]=36;break;case"SPINDA_00":case 37:m.captured_forms[i]=37;break;case"SPINDA_01":case 38:m.captured_forms[i]=38;break;case"SPINDA_02":case 39:m.captured_forms[i]=39;break;case"SPINDA_03":case 40:m.captured_forms[i]=40;break;case"SPINDA_04":case 41:m.captured_forms[i]=41;break;case"SPINDA_05":case 42:m.captured_forms[i]=42;break;case"SPINDA_06":case 43:m.captured_forms[i]=43;break;case"SPINDA_07":case 44:m.captured_forms[i]=44;break;case"RATTATA_NORMAL":case 45:m.captured_forms[i]=45;break;case"RATTATA_ALOLA":case 46:m.captured_forms[i]=46;break;case"RATICATE_NORMAL":case 47:m.captured_forms[i]=47;break;case"RATICATE_ALOLA":case 48:m.captured_forms[i]=48;break;case"RAICHU_NORMAL":case 49:m.captured_forms[i]=49;break;case"RAICHU_ALOLA":case 50:m.captured_forms[i]=50;break;case"SANDSHREW_NORMAL":case 51:m.captured_forms[i]=51;break;case"SANDSHREW_ALOLA":case 52:m.captured_forms[i]=52;break;case"SANDSLASH_NORMAL":case 53:m.captured_forms[i]=53;break;case"SANDSLASH_ALOLA":case 54:m.captured_forms[i]=54;break;case"VULPIX_NORMAL":case 55:m.captured_forms[i]=55;break;case"VULPIX_ALOLA":case 56:m.captured_forms[i]=56;break;case"NINETALES_NORMAL":case 57:m.captured_forms[i]=57;break;case"NINETALES_ALOLA":case 58:m.captured_forms[i]=58;break;case"DIGLETT_NORMAL":case 59:m.captured_forms[i]=59;break;case"DIGLETT_ALOLA":case 60:m.captured_forms[i]=60;break;case"DUGTRIO_NORMAL":case 61:m.captured_forms[i]=61;break;case"DUGTRIO_ALOLA":case 62:m.captured_forms[i]=62;break;case"MEOWTH_NORMAL":case 63:m.captured_forms[i]=63;break;case"MEOWTH_ALOLA":case 64:m.captured_forms[i]=64;break;case"PERSIAN_NORMAL":case 65:m.captured_forms[i]=65;break;case"PERSIAN_ALOLA":case 66:m.captured_forms[i]=66;break;case"GEODUDE_NORMAL":case 67:m.captured_forms[i]=67;break;case"GEODUDE_ALOLA":case 68:m.captured_forms[i]=68;break;case"GRAVELER_NORMAL":case 69:m.captured_forms[i]=69;break;case"GRAVELER_ALOLA":case 70:m.captured_forms[i]=70;break;case"GOLEM_NORMAL":case 71:m.captured_forms[i]=71;break;case"GOLEM_ALOLA":case 72:m.captured_forms[i]=72;break;case"GRIMER_NORMAL":case 73:m.captured_forms[i]=73;break;case"GRIMER_ALOLA":case 74:m.captured_forms[i]=74;break;case"MUK_NORMAL":case 75:m.captured_forms[i]=75;break;case"MUK_ALOLA":case 76:m.captured_forms[i]=76;break;case"EXEGGUTOR_NORMAL":case 77:m.captured_forms[i]=77;break;case"EXEGGUTOR_ALOLA":case 78:m.captured_forms[i]=78;break;case"MAROWAK_NORMAL":case 79:m.captured_forms[i]=79;break;case"MAROWAK_ALOLA":case 80:m.captured_forms[i]=80;break;case"ROTOM_NORMAL":case 81:m.captured_forms[i]=81;break;case"ROTOM_FROST":case 82:m.captured_forms[i]=82;break;case"ROTOM_FAN":case 83:m.captured_forms[i]=83;break;case"ROTOM_MOW":case 84:m.captured_forms[i]=84;break;case"ROTOM_WASH":case 85:m.captured_forms[i]=85;break;case"ROTOM_HEAT":case 86:m.captured_forms[i]=86;break;case"WORMADAM_PLANT":case 87:m.captured_forms[i]=87;break;case"WORMADAM_SANDY":case 88:m.captured_forms[i]=88;break;case"WORMADAM_TRASH":case 89:m.captured_forms[i]=89;break;case"GIRATINA_ALTERED":case 90:m.captured_forms[i]=90;break;case"GIRATINA_ORIGIN":case 91:m.captured_forms[i]=91;break;case"SHAYMIN_SKY":case 92:m.captured_forms[i]=92;break;case"SHAYMIN_LAND":case 93:m.captured_forms[i]=93;break;case"CHERRIM_OVERCAST":case 94:m.captured_forms[i]=94;break;case"CHERRIM_SUNNY":case 95:m.captured_forms[i]=95;break;case"SHELLOS_WEST_SEA":case 96:m.captured_forms[i]=96;break;case"SHELLOS_EAST_SEA":case 97:m.captured_forms[i]=97;break;case"GASTRODON_WEST_SEA":case 98:m.captured_forms[i]=98;break;case"GASTRODON_EAST_SEA":case 99:m.captured_forms[i]=99;break;case"ARCEUS_NORMAL":case 100:m.captured_forms[i]=100;break;case"ARCEUS_FIGHTING":case 101:m.captured_forms[i]=101;break;case"ARCEUS_FLYING":case 102:m.captured_forms[i]=102;break;case"ARCEUS_POISON":case 103:m.captured_forms[i]=103;break;case"ARCEUS_GROUND":case 104:m.captured_forms[i]=104;break;case"ARCEUS_ROCK":case 105:m.captured_forms[i]=105;break;case"ARCEUS_BUG":case 106:m.captured_forms[i]=106;break;case"ARCEUS_GHOST":case 107:m.captured_forms[i]=107;break;case"ARCEUS_STEEL":case 108:m.captured_forms[i]=108;break;case"ARCEUS_FIRE":case 109:m.captured_forms[i]=109;break;case"ARCEUS_WATER":case 110:m.captured_forms[i]=110;break;case"ARCEUS_GRASS":case 111:m.captured_forms[i]=111;break;case"ARCEUS_ELECTRIC":case 112:m.captured_forms[i]=112;break;case"ARCEUS_PSYCHIC":case 113:m.captured_forms[i]=113;break;case"ARCEUS_ICE":case 114:m.captured_forms[i]=114;break;case"ARCEUS_DRAGON":case 115:m.captured_forms[i]=115;break;case"ARCEUS_DARK":case 116:m.captured_forms[i]=116;break;case"ARCEUS_FAIRY":case 117:m.captured_forms[i]=117;break;case"BURMY_PLANT":case 118:m.captured_forms[i]=118;break;case"BURMY_SANDY":case 119:m.captured_forms[i]=119;break;case"BURMY_TRASH":case 120:m.captured_forms[i]=120;break}}}if(d.captured_genders){if(!Array.isArray(d.captured_genders))throw TypeError(".POGOProtos.Data.PokedexEntry.captured_genders: array expected");m.captured_genders=[];for(var i=0;i<d.captured_genders.length;++i){switch(d.captured_genders[i]){default:case"GENDER_UNSET":case 0:m.captured_genders[i]=0;break;case"MALE":case 1:m.captured_genders[i]=1;break;case"FEMALE":case 2:m.captured_genders[i]=2;break;case"GENDERLESS":case 3:m.captured_genders[i]=3;break}}}if(d.captured_shiny!=null){m.captured_shiny=Boolean(d.captured_shiny)}if(d.encountered_costumes){if(!Array.isArray(d.encountered_costumes))throw TypeError(".POGOProtos.Data.PokedexEntry.encountered_costumes: array expected");m.encountered_costumes=[];for(var i=0;i<d.encountered_costumes.length;++i){switch(d.encountered_costumes[i]){default:case"COSTUME_UNSET":case 0:m.encountered_costumes[i]=0;break;case"HOLIDAY_2016":case 1:m.encountered_costumes[i]=1;break;case"ANNIVERSARY":case 2:m.encountered_costumes[i]=2;break;case"ONE_YEAR_ANNIVERSARY":case 3:m.encountered_costumes[i]=3;break;case"HALLOWEEN_2017":case 4:m.encountered_costumes[i]=4;break;case"SUMMER_2018":case 5:m.encountered_costumes[i]=5;break;case"FALL_2018":case 6:m.encountered_costumes[i]=6;break;case"NOVEMBER_2018":case 7:m.encountered_costumes[i]=7;break;case"WINTER_2018":case 8:m.encountered_costumes[i]=8;break}}}if(d.encountered_forms){if(!Array.isArray(d.encountered_forms))throw TypeError(".POGOProtos.Data.PokedexEntry.encountered_forms: array expected");m.encountered_forms=[];for(var i=0;i<d.encountered_forms.length;++i){switch(d.encountered_forms[i]){default:case"FORM_UNSET":case 0:m.encountered_forms[i]=0;break;case"UNOWN_A":case 1:m.encountered_forms[i]=1;break;case"UNOWN_B":case 2:m.encountered_forms[i]=2;break;case"UNOWN_C":case 3:m.encountered_forms[i]=3;break;case"UNOWN_D":case 4:m.encountered_forms[i]=4;break;case"UNOWN_E":case 5:m.encountered_forms[i]=5;break;case"UNOWN_F":case 6:m.encountered_forms[i]=6;break;case"UNOWN_G":case 7:m.encountered_forms[i]=7;break;case"UNOWN_H":case 8:m.encountered_forms[i]=8;break;case"UNOWN_I":case 9:m.encountered_forms[i]=9;break;case"UNOWN_J":case 10:m.encountered_forms[i]=10;break;case"UNOWN_K":case 11:m.encountered_forms[i]=11;break;case"UNOWN_L":case 12:m.encountered_forms[i]=12;break;case"UNOWN_M":case 13:m.encountered_forms[i]=13;break;case"UNOWN_N":case 14:m.encountered_forms[i]=14;break;case"UNOWN_O":case 15:m.encountered_forms[i]=15;break;case"UNOWN_P":case 16:m.encountered_forms[i]=16;break;case"UNOWN_Q":case 17:m.encountered_forms[i]=17;break;case"UNOWN_R":case 18:m.encountered_forms[i]=18;break;case"UNOWN_S":case 19:m.encountered_forms[i]=19;break;case"UNOWN_T":case 20:m.encountered_forms[i]=20;break;case"UNOWN_U":case 21:m.encountered_forms[i]=21;break;case"UNOWN_V":case 22:m.encountered_forms[i]=22;break;case"UNOWN_W":case 23:m.encountered_forms[i]=23;break;case"UNOWN_X":case 24:m.encountered_forms[i]=24;break;case"UNOWN_Y":case 25:m.encountered_forms[i]=25;break;case"UNOWN_Z":case 26:m.encountered_forms[i]=26;break;case"UNOWN_EXCLAMATION_POINT":case 27:m.encountered_forms[i]=27;break;case"UNOWN_QUESTION_MARK":case 28:m.encountered_forms[i]=28;break;case"CASTFORM_NORMAL":case 29:m.encountered_forms[i]=29;break;case"CASTFORM_SUNNY":case 30:m.encountered_forms[i]=30;break;case"CASTFORM_RAINY":case 31:m.encountered_forms[i]=31;break;case"CASTFORM_SNOWY":case 32:m.encountered_forms[i]=32;break;case"DEOXYS_NORMAL":case 33:m.encountered_forms[i]=33;break;case"DEOXYS_ATTACK":case 34:m.encountered_forms[i]=34;break;case"DEOXYS_DEFENSE":case 35:m.encountered_forms[i]=35;break;case"DEOXYS_SPEED":case 36:m.encountered_forms[i]=36;break;case"SPINDA_00":case 37:m.encountered_forms[i]=37;break;case"SPINDA_01":case 38:m.encountered_forms[i]=38;break;case"SPINDA_02":case 39:m.encountered_forms[i]=39;break;case"SPINDA_03":case 40:m.encountered_forms[i]=40;break;case"SPINDA_04":case 41:m.encountered_forms[i]=41;break;case"SPINDA_05":case 42:m.encountered_forms[i]=42;break;case"SPINDA_06":case 43:m.encountered_forms[i]=43;break;case"SPINDA_07":case 44:m.encountered_forms[i]=44;break;case"RATTATA_NORMAL":case 45:m.encountered_forms[i]=45;break;case"RATTATA_ALOLA":case 46:m.encountered_forms[i]=46;break;case"RATICATE_NORMAL":case 47:m.encountered_forms[i]=47;break;case"RATICATE_ALOLA":case 48:m.encountered_forms[i]=48;break;case"RAICHU_NORMAL":case 49:m.encountered_forms[i]=49;break;case"RAICHU_ALOLA":case 50:m.encountered_forms[i]=50;break;case"SANDSHREW_NORMAL":case 51:m.encountered_forms[i]=51;break;case"SANDSHREW_ALOLA":case 52:m.encountered_forms[i]=52;break;case"SANDSLASH_NORMAL":case 53:m.encountered_forms[i]=53;break;case"SANDSLASH_ALOLA":case 54:m.encountered_forms[i]=54;break;case"VULPIX_NORMAL":case 55:m.encountered_forms[i]=55;break;case"VULPIX_ALOLA":case 56:m.encountered_forms[i]=56;break;case"NINETALES_NORMAL":case 57:m.encountered_forms[i]=57;break;case"NINETALES_ALOLA":case 58:m.encountered_forms[i]=58;break;case"DIGLETT_NORMAL":case 59:m.encountered_forms[i]=59;break;case"DIGLETT_ALOLA":case 60:m.encountered_forms[i]=60;break;case"DUGTRIO_NORMAL":case 61:m.encountered_forms[i]=61;break;case"DUGTRIO_ALOLA":case 62:m.encountered_forms[i]=62;break;case"MEOWTH_NORMAL":case 63:m.encountered_forms[i]=63;break;case"MEOWTH_ALOLA":case 64:m.encountered_forms[i]=64;break;case"PERSIAN_NORMAL":case 65:m.encountered_forms[i]=65;break;case"PERSIAN_ALOLA":case 66:m.encountered_forms[i]=66;break;case"GEODUDE_NORMAL":case 67:m.encountered_forms[i]=67;break;case"GEODUDE_ALOLA":case 68:m.encountered_forms[i]=68;break;case"GRAVELER_NORMAL":case 69:m.encountered_forms[i]=69;break;case"GRAVELER_ALOLA":case 70:m.encountered_forms[i]=70;break;case"GOLEM_NORMAL":case 71:m.encountered_forms[i]=71;break;case"GOLEM_ALOLA":case 72:m.encountered_forms[i]=72;break;case"GRIMER_NORMAL":case 73:m.encountered_forms[i]=73;break;case"GRIMER_ALOLA":case 74:m.encountered_forms[i]=74;break;case"MUK_NORMAL":case 75:m.encountered_forms[i]=75;break;case"MUK_ALOLA":case 76:m.encountered_forms[i]=76;break;case"EXEGGUTOR_NORMAL":case 77:m.encountered_forms[i]=77;break;case"EXEGGUTOR_ALOLA":case 78:m.encountered_forms[i]=78;break;case"MAROWAK_NORMAL":case 79:m.encountered_forms[i]=79;break;case"MAROWAK_ALOLA":case 80:m.encountered_forms[i]=80;break;case"ROTOM_NORMAL":case 81:m.encountered_forms[i]=81;break;case"ROTOM_FROST":case 82:m.encountered_forms[i]=82;break;case"ROTOM_FAN":case 83:m.encountered_forms[i]=83;break;case"ROTOM_MOW":case 84:m.encountered_forms[i]=84;break;case"ROTOM_WASH":case 85:m.encountered_forms[i]=85;break;case"ROTOM_HEAT":case 86:m.encountered_forms[i]=86;break;case"WORMADAM_PLANT":case 87:m.encountered_forms[i]=87;break;case"WORMADAM_SANDY":case 88:m.encountered_forms[i]=88;break;case"WORMADAM_TRASH":case 89:m.encountered_forms[i]=89;break;case"GIRATINA_ALTERED":case 90:m.encountered_forms[i]=90;break;case"GIRATINA_ORIGIN":case 91:m.encountered_forms[i]=91;break;case"SHAYMIN_SKY":case 92:m.encountered_forms[i]=92;break;case"SHAYMIN_LAND":case 93:m.encountered_forms[i]=93;break;case"CHERRIM_OVERCAST":case 94:m.encountered_forms[i]=94;break;case"CHERRIM_SUNNY":case 95:m.encountered_forms[i]=95;break;case"SHELLOS_WEST_SEA":case 96:m.encountered_forms[i]=96;break;case"SHELLOS_EAST_SEA":case 97:m.encountered_forms[i]=97;break;case"GASTRODON_WEST_SEA":case 98:m.encountered_forms[i]=98;break;case"GASTRODON_EAST_SEA":case 99:m.encountered_forms[i]=99;break;case"ARCEUS_NORMAL":case 100:m.encountered_forms[i]=100;break;case"ARCEUS_FIGHTING":case 101:m.encountered_forms[i]=101;break;case"ARCEUS_FLYING":case 102:m.encountered_forms[i]=102;break;case"ARCEUS_POISON":case 103:m.encountered_forms[i]=103;break;case"ARCEUS_GROUND":case 104:m.encountered_forms[i]=104;break;case"ARCEUS_ROCK":case 105:m.encountered_forms[i]=105;break;case"ARCEUS_BUG":case 106:m.encountered_forms[i]=106;break;case"ARCEUS_GHOST":case 107:m.encountered_forms[i]=107;break;case"ARCEUS_STEEL":case 108:m.encountered_forms[i]=108;break;case"ARCEUS_FIRE":case 109:m.encountered_forms[i]=109;break;case"ARCEUS_WATER":case 110:m.encountered_forms[i]=110;break;case"ARCEUS_GRASS":case 111:m.encountered_forms[i]=111;break;case"ARCEUS_ELECTRIC":case 112:m.encountered_forms[i]=112;break;case"ARCEUS_PSYCHIC":case 113:m.encountered_forms[i]=113;break;case"ARCEUS_ICE":case 114:m.encountered_forms[i]=114;break;case"ARCEUS_DRAGON":case 115:m.encountered_forms[i]=115;break;case"ARCEUS_DARK":case 116:m.encountered_forms[i]=116;break;case"ARCEUS_FAIRY":case 117:m.encountered_forms[i]=117;break;case"BURMY_PLANT":case 118:m.encountered_forms[i]=118;break;case"BURMY_SANDY":case 119:m.encountered_forms[i]=119;break;case"BURMY_TRASH":case 120:m.encountered_forms[i]=120;break}}}if(d.encountered_genders){if(!Array.isArray(d.encountered_genders))throw TypeError(".POGOProtos.Data.PokedexEntry.encountered_genders: array expected");m.encountered_genders=[];for(var i=0;i<d.encountered_genders.length;++i){switch(d.encountered_genders[i]){default:case"GENDER_UNSET":case 0:m.encountered_genders[i]=0;break;case"MALE":case 1:m.encountered_genders[i]=1;break;case"FEMALE":case 2:m.encountered_genders[i]=2;break;case"GENDERLESS":case 3:m.encountered_genders[i]=3;break}}}if(d.encountered_shiny!=null){m.encountered_shiny=Boolean(d.encountered_shiny)}if(d.times_lucky_received!=null){m.times_lucky_received=d.times_lucky_received|0}return m};PokedexEntry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.captured_costumes=[];d.captured_forms=[];d.captured_genders=[];d.encountered_costumes=[];d.encountered_forms=[];d.encountered_genders=[]}if(o.defaults){d.pokemon_id=o.enums===String?"MISSINGNO":0;d.times_encountered=0;d.times_captured=0;d.evolution_stone_pieces=0;d.evolution_stones=0;d.captured_shiny=false;d.encountered_shiny=false;d.times_lucky_received=0}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){d.pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_id]:m.pokemon_id}if(m.times_encountered!=null&&m.hasOwnProperty("times_encountered")){d.times_encountered=m.times_encountered}if(m.times_captured!=null&&m.hasOwnProperty("times_captured")){d.times_captured=m.times_captured}if(m.evolution_stone_pieces!=null&&m.hasOwnProperty("evolution_stone_pieces")){d.evolution_stone_pieces=m.evolution_stone_pieces}if(m.evolution_stones!=null&&m.hasOwnProperty("evolution_stones")){d.evolution_stones=m.evolution_stones}if(m.captured_costumes&&m.captured_costumes.length){d.captured_costumes=[];for(var j=0;j<m.captured_costumes.length;++j){d.captured_costumes[j]=o.enums===String?$root.POGOProtos.Enums.Costume[m.captured_costumes[j]]:m.captured_costumes[j]}}if(m.captured_forms&&m.captured_forms.length){d.captured_forms=[];for(var j=0;j<m.captured_forms.length;++j){d.captured_forms[j]=o.enums===String?$root.POGOProtos.Enums.Form[m.captured_forms[j]]:m.captured_forms[j]}}if(m.captured_genders&&m.captured_genders.length){d.captured_genders=[];for(var j=0;j<m.captured_genders.length;++j){d.captured_genders[j]=o.enums===String?$root.POGOProtos.Enums.Gender[m.captured_genders[j]]:m.captured_genders[j]}}if(m.captured_shiny!=null&&m.hasOwnProperty("captured_shiny")){d.captured_shiny=m.captured_shiny}if(m.encountered_costumes&&m.encountered_costumes.length){d.encountered_costumes=[];for(var j=0;j<m.encountered_costumes.length;++j){d.encountered_costumes[j]=o.enums===String?$root.POGOProtos.Enums.Costume[m.encountered_costumes[j]]:m.encountered_costumes[j]}}if(m.encountered_forms&&m.encountered_forms.length){d.encountered_forms=[];for(var j=0;j<m.encountered_forms.length;++j){d.encountered_forms[j]=o.enums===String?$root.POGOProtos.Enums.Form[m.encountered_forms[j]]:m.encountered_forms[j]}}if(m.encountered_genders&&m.encountered_genders.length){d.encountered_genders=[];for(var j=0;j<m.encountered_genders.length;++j){d.encountered_genders[j]=o.enums===String?$root.POGOProtos.Enums.Gender[m.encountered_genders[j]]:m.encountered_genders[j]}}if(m.encountered_shiny!=null&&m.hasOwnProperty("encountered_shiny")){d.encountered_shiny=m.encountered_shiny}if(m.times_lucky_received!=null&&m.hasOwnProperty("times_lucky_received")){d.times_lucky_received=m.times_lucky_received}return d};PokedexEntry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokedexEntry}();Data.PokemonData=function(){function PokemonData(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokemonData.prototype.id=$util.Long?$util.Long.fromBits(0,0,false):0;PokemonData.prototype.pokemon_id=0;PokemonData.prototype.cp=0;PokemonData.prototype.stamina=0;PokemonData.prototype.stamina_max=0;PokemonData.prototype.move_1=0;PokemonData.prototype.move_2=0;PokemonData.prototype.deployed_fort_id="";PokemonData.prototype.owner_name="";PokemonData.prototype.is_egg=false;PokemonData.prototype.egg_km_walked_target=0;PokemonData.prototype.egg_km_walked_start=0;PokemonData.prototype.origin=0;PokemonData.prototype.height_m=0;PokemonData.prototype.weight_kg=0;PokemonData.prototype.individual_attack=0;PokemonData.prototype.individual_defense=0;PokemonData.prototype.individual_stamina=0;PokemonData.prototype.cp_multiplier=0;PokemonData.prototype.pokeball=0;PokemonData.prototype.captured_cell_id=$util.Long?$util.Long.fromBits(0,0,true):0;PokemonData.prototype.battles_attacked=0;PokemonData.prototype.battles_defended=0;PokemonData.prototype.egg_incubator_id="";PokemonData.prototype.creation_time_ms=$util.Long?$util.Long.fromBits(0,0,true):0;PokemonData.prototype.num_upgrades=0;PokemonData.prototype.additional_cp_multiplier=0;PokemonData.prototype.favorite=0;PokemonData.prototype.nickname="";PokemonData.prototype.from_fort=0;PokemonData.prototype.buddy_candy_awarded=0;PokemonData.prototype.buddy_total_km_walked=0;PokemonData.prototype.display_pokemon_id=0;PokemonData.prototype.display_cp=0;PokemonData.prototype.pokemon_display=null;PokemonData.prototype.is_bad=false;PokemonData.prototype.hatched_from_egg=false;PokemonData.prototype.coins_returned=0;PokemonData.prototype.deployed_duration_ms=$util.Long?$util.Long.fromBits(0,0,false):0;PokemonData.prototype.deployed_returned_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;PokemonData.prototype.cp_multiplier_before_trading=0;PokemonData.prototype.trading_original_owner_hash=0;PokemonData.prototype.original_owner_nickname="";PokemonData.prototype.traded_time_ms=$util.Long?$util.Long.fromBits(0,0,false):0;PokemonData.prototype.is_lucky=false;PokemonData.prototype.move_3=0;PokemonData.prototype.pvp_combat_stats=null;PokemonData.prototype.npc_combat_stats=null;PokemonData.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.id!=null&&m.hasOwnProperty("id"))w.uint32(9).fixed64(m.id);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(16).int32(m.pokemon_id);if(m.cp!=null&&m.hasOwnProperty("cp"))w.uint32(24).int32(m.cp);if(m.stamina!=null&&m.hasOwnProperty("stamina"))w.uint32(32).int32(m.stamina);if(m.stamina_max!=null&&m.hasOwnProperty("stamina_max"))w.uint32(40).int32(m.stamina_max);if(m.move_1!=null&&m.hasOwnProperty("move_1"))w.uint32(48).int32(m.move_1);if(m.move_2!=null&&m.hasOwnProperty("move_2"))w.uint32(56).int32(m.move_2);if(m.deployed_fort_id!=null&&m.hasOwnProperty("deployed_fort_id"))w.uint32(66).string(m.deployed_fort_id);if(m.owner_name!=null&&m.hasOwnProperty("owner_name"))w.uint32(74).string(m.owner_name);if(m.is_egg!=null&&m.hasOwnProperty("is_egg"))w.uint32(80).bool(m.is_egg);if(m.egg_km_walked_target!=null&&m.hasOwnProperty("egg_km_walked_target"))w.uint32(89).double(m.egg_km_walked_target);if(m.egg_km_walked_start!=null&&m.hasOwnProperty("egg_km_walked_start"))w.uint32(97).double(m.egg_km_walked_start);if(m.origin!=null&&m.hasOwnProperty("origin"))w.uint32(112).int32(m.origin);if(m.height_m!=null&&m.hasOwnProperty("height_m"))w.uint32(125).float(m.height_m);if(m.weight_kg!=null&&m.hasOwnProperty("weight_kg"))w.uint32(133).float(m.weight_kg);if(m.individual_attack!=null&&m.hasOwnProperty("individual_attack"))w.uint32(136).int32(m.individual_attack);if(m.individual_defense!=null&&m.hasOwnProperty("individual_defense"))w.uint32(144).int32(m.individual_defense);if(m.individual_stamina!=null&&m.hasOwnProperty("individual_stamina"))w.uint32(152).int32(m.individual_stamina);if(m.cp_multiplier!=null&&m.hasOwnProperty("cp_multiplier"))w.uint32(165).float(m.cp_multiplier);if(m.pokeball!=null&&m.hasOwnProperty("pokeball"))w.uint32(168).int32(m.pokeball);if(m.captured_cell_id!=null&&m.hasOwnProperty("captured_cell_id"))w.uint32(176).uint64(m.captured_cell_id);if(m.battles_attacked!=null&&m.hasOwnProperty("battles_attacked"))w.uint32(184).int32(m.battles_attacked);if(m.battles_defended!=null&&m.hasOwnProperty("battles_defended"))w.uint32(192).int32(m.battles_defended);if(m.egg_incubator_id!=null&&m.hasOwnProperty("egg_incubator_id"))w.uint32(202).string(m.egg_incubator_id);if(m.creation_time_ms!=null&&m.hasOwnProperty("creation_time_ms"))w.uint32(208).uint64(m.creation_time_ms);if(m.num_upgrades!=null&&m.hasOwnProperty("num_upgrades"))w.uint32(216).int32(m.num_upgrades);if(m.additional_cp_multiplier!=null&&m.hasOwnProperty("additional_cp_multiplier"))w.uint32(229).float(m.additional_cp_multiplier);if(m.favorite!=null&&m.hasOwnProperty("favorite"))w.uint32(232).int32(m.favorite);if(m.nickname!=null&&m.hasOwnProperty("nickname"))w.uint32(242).string(m.nickname);if(m.from_fort!=null&&m.hasOwnProperty("from_fort"))w.uint32(248).int32(m.from_fort);if(m.buddy_candy_awarded!=null&&m.hasOwnProperty("buddy_candy_awarded"))w.uint32(256).int32(m.buddy_candy_awarded);if(m.buddy_total_km_walked!=null&&m.hasOwnProperty("buddy_total_km_walked"))w.uint32(269).float(m.buddy_total_km_walked);if(m.display_pokemon_id!=null&&m.hasOwnProperty("display_pokemon_id"))w.uint32(272).int32(m.display_pokemon_id);if(m.display_cp!=null&&m.hasOwnProperty("display_cp"))w.uint32(280).int32(m.display_cp);if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display"))$root.POGOProtos.Data.PokemonDisplay.encode(m.pokemon_display,w.uint32(290).fork()).ldelim();if(m.is_bad!=null&&m.hasOwnProperty("is_bad"))w.uint32(296).bool(m.is_bad);if(m.hatched_from_egg!=null&&m.hasOwnProperty("hatched_from_egg"))w.uint32(304).bool(m.hatched_from_egg);if(m.coins_returned!=null&&m.hasOwnProperty("coins_returned"))w.uint32(312).int32(m.coins_returned);if(m.deployed_duration_ms!=null&&m.hasOwnProperty("deployed_duration_ms"))w.uint32(320).int64(m.deployed_duration_ms);if(m.deployed_returned_timestamp_ms!=null&&m.hasOwnProperty("deployed_returned_timestamp_ms"))w.uint32(328).int64(m.deployed_returned_timestamp_ms);if(m.cp_multiplier_before_trading!=null&&m.hasOwnProperty("cp_multiplier_before_trading"))w.uint32(341).float(m.cp_multiplier_before_trading);if(m.trading_original_owner_hash!=null&&m.hasOwnProperty("trading_original_owner_hash"))w.uint32(344).int32(m.trading_original_owner_hash);if(m.original_owner_nickname!=null&&m.hasOwnProperty("original_owner_nickname"))w.uint32(354).string(m.original_owner_nickname);if(m.traded_time_ms!=null&&m.hasOwnProperty("traded_time_ms"))w.uint32(360).int64(m.traded_time_ms);if(m.is_lucky!=null&&m.hasOwnProperty("is_lucky"))w.uint32(368).bool(m.is_lucky);if(m.move_3!=null&&m.hasOwnProperty("move_3"))w.uint32(376).int32(m.move_3);if(m.pvp_combat_stats!=null&&m.hasOwnProperty("pvp_combat_stats"))$root.POGOProtos.Data.Combat.PokemonCombatStats.encode(m.pvp_combat_stats,w.uint32(386).fork()).ldelim();if(m.npc_combat_stats!=null&&m.hasOwnProperty("npc_combat_stats"))$root.POGOProtos.Data.Combat.PokemonCombatStats.encode(m.npc_combat_stats,w.uint32(394).fork()).ldelim();return w};PokemonData.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.PokemonData;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.id=r.fixed64();break;case 2:m.pokemon_id=r.int32();break;case 3:m.cp=r.int32();break;case 4:m.stamina=r.int32();break;case 5:m.stamina_max=r.int32();break;case 6:m.move_1=r.int32();break;case 7:m.move_2=r.int32();break;case 8:m.deployed_fort_id=r.string();break;case 9:m.owner_name=r.string();break;case 10:m.is_egg=r.bool();break;case 11:m.egg_km_walked_target=r.double();break;case 12:m.egg_km_walked_start=r.double();break;case 14:m.origin=r.int32();break;case 15:m.height_m=r.float();break;case 16:m.weight_kg=r.float();break;case 17:m.individual_attack=r.int32();break;case 18:m.individual_defense=r.int32();break;case 19:m.individual_stamina=r.int32();break;case 20:m.cp_multiplier=r.float();break;case 21:m.pokeball=r.int32();break;case 22:m.captured_cell_id=r.uint64();break;case 23:m.battles_attacked=r.int32();break;case 24:m.battles_defended=r.int32();break;case 25:m.egg_incubator_id=r.string();break;case 26:m.creation_time_ms=r.uint64();break;case 27:m.num_upgrades=r.int32();break;case 28:m.additional_cp_multiplier=r.float();break;case 29:m.favorite=r.int32();break;case 30:m.nickname=r.string();break;case 31:m.from_fort=r.int32();break;case 32:m.buddy_candy_awarded=r.int32();break;case 33:m.buddy_total_km_walked=r.float();break;case 34:m.display_pokemon_id=r.int32();break;case 35:m.display_cp=r.int32();break;case 36:m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;case 37:m.is_bad=r.bool();break;case 38:m.hatched_from_egg=r.bool();break;case 39:m.coins_returned=r.int32();break;case 40:m.deployed_duration_ms=r.int64();break;case 41:m.deployed_returned_timestamp_ms=r.int64();break;case 42:m.cp_multiplier_before_trading=r.float();break;case 43:m.trading_original_owner_hash=r.int32();break;case 44:m.original_owner_nickname=r.string();break;case 45:m.traded_time_ms=r.int64();break;case 46:m.is_lucky=r.bool();break;case 47:m.move_3=r.int32();break;case 48:m.pvp_combat_stats=$root.POGOProtos.Data.Combat.PokemonCombatStats.decode(r,r.uint32());break;case 49:m.npc_combat_stats=$root.POGOProtos.Data.Combat.PokemonCombatStats.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};PokemonData.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.PokemonData)return d;var m=new $root.POGOProtos.Data.PokemonData;if(d.id!=null){if($util.Long)(m.id=$util.Long.fromValue(d.id)).unsigned=false;else if(typeof d.id==="string")m.id=parseInt(d.id,10);else if(typeof d.id==="number")m.id=d.id;else if(typeof d.id==="object")m.id=new $util.LongBits(d.id.low>>>0,d.id.high>>>0).toNumber()}switch(d.pokemon_id){case"MISSINGNO":case 0:m.pokemon_id=0;break;case"BULBASAUR":case 1:m.pokemon_id=1;break;case"IVYSAUR":case 2:m.pokemon_id=2;break;case"VENUSAUR":case 3:m.pokemon_id=3;break;case"CHARMANDER":case 4:m.pokemon_id=4;break;case"CHARMELEON":case 5:m.pokemon_id=5;break;case"CHARIZARD":case 6:m.pokemon_id=6;break;case"SQUIRTLE":case 7:m.pokemon_id=7;break;case"WARTORTLE":case 8:m.pokemon_id=8;break;case"BLASTOISE":case 9:m.pokemon_id=9;break;case"CATERPIE":case 10:m.pokemon_id=10;break;case"METAPOD":case 11:m.pokemon_id=11;break;case"BUTTERFREE":case 12:m.pokemon_id=12;break;case"WEEDLE":case 13:m.pokemon_id=13;break;case"KAKUNA":case 14:m.pokemon_id=14;break;case"BEEDRILL":case 15:m.pokemon_id=15;break;case"PIDGEY":case 16:m.pokemon_id=16;break;case"PIDGEOTTO":case 17:m.pokemon_id=17;break;case"PIDGEOT":case 18:m.pokemon_id=18;break;case"RATTATA":case 19:m.pokemon_id=19;break;case"RATICATE":case 20:m.pokemon_id=20;break;case"SPEAROW":case 21:m.pokemon_id=21;break;case"FEAROW":case 22:m.pokemon_id=22;break;case"EKANS":case 23:m.pokemon_id=23;break;case"ARBOK":case 24:m.pokemon_id=24;break;case"PIKACHU":case 25:m.pokemon_id=25;break;case"RAICHU":case 26:m.pokemon_id=26;break;case"SANDSHREW":case 27:m.pokemon_id=27;break;case"SANDSLASH":case 28:m.pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_id=29;break;case"NIDORINA":case 30:m.pokemon_id=30;break;case"NIDOQUEEN":case 31:m.pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.pokemon_id=32;break;case"NIDORINO":case 33:m.pokemon_id=33;break;case"NIDOKING":case 34:m.pokemon_id=34;break;case"CLEFAIRY":case 35:m.pokemon_id=35;break;case"CLEFABLE":case 36:m.pokemon_id=36;break;case"VULPIX":case 37:m.pokemon_id=37;break;case"NINETALES":case 38:m.pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.pokemon_id=40;break;case"ZUBAT":case 41:m.pokemon_id=41;break;case"GOLBAT":case 42:m.pokemon_id=42;break;case"ODDISH":case 43:m.pokemon_id=43;break;case"GLOOM":case 44:m.pokemon_id=44;break;case"VILEPLUME":case 45:m.pokemon_id=45;break;case"PARAS":case 46:m.pokemon_id=46;break;case"PARASECT":case 47:m.pokemon_id=47;break;case"VENONAT":case 48:m.pokemon_id=48;break;case"VENOMOTH":case 49:m.pokemon_id=49;break;case"DIGLETT":case 50:m.pokemon_id=50;break;case"DUGTRIO":case 51:m.pokemon_id=51;break;case"MEOWTH":case 52:m.pokemon_id=52;break;case"PERSIAN":case 53:m.pokemon_id=53;break;case"PSYDUCK":case 54:m.pokemon_id=54;break;case"GOLDUCK":case 55:m.pokemon_id=55;break;case"MANKEY":case 56:m.pokemon_id=56;break;case"PRIMEAPE":case 57:m.pokemon_id=57;break;case"GROWLITHE":case 58:m.pokemon_id=58;break;case"ARCANINE":case 59:m.pokemon_id=59;break;case"POLIWAG":case 60:m.pokemon_id=60;break;case"POLIWHIRL":case 61:m.pokemon_id=61;break;case"POLIWRATH":case 62:m.pokemon_id=62;break;case"ABRA":case 63:m.pokemon_id=63;break;case"KADABRA":case 64:m.pokemon_id=64;break;case"ALAKAZAM":case 65:m.pokemon_id=65;break;case"MACHOP":case 66:m.pokemon_id=66;break;case"MACHOKE":case 67:m.pokemon_id=67;break;case"MACHAMP":case 68:m.pokemon_id=68;break;case"BELLSPROUT":case 69:m.pokemon_id=69;break;case"WEEPINBELL":case 70:m.pokemon_id=70;break;case"VICTREEBEL":case 71:m.pokemon_id=71;break;case"TENTACOOL":case 72:m.pokemon_id=72;break;case"TENTACRUEL":case 73:m.pokemon_id=73;break;case"GEODUDE":case 74:m.pokemon_id=74;break;case"GRAVELER":case 75:m.pokemon_id=75;break;case"GOLEM":case 76:m.pokemon_id=76;break;case"PONYTA":case 77:m.pokemon_id=77;break;case"RAPIDASH":case 78:m.pokemon_id=78;break;case"SLOWPOKE":case 79:m.pokemon_id=79;break;case"SLOWBRO":case 80:m.pokemon_id=80;break;case"MAGNEMITE":case 81:m.pokemon_id=81;break;case"MAGNETON":case 82:m.pokemon_id=82;break;case"FARFETCHD":case 83:m.pokemon_id=83;break;case"DODUO":case 84:m.pokemon_id=84;break;case"DODRIO":case 85:m.pokemon_id=85;break;case"SEEL":case 86:m.pokemon_id=86;break;case"DEWGONG":case 87:m.pokemon_id=87;break;case"GRIMER":case 88:m.pokemon_id=88;break;case"MUK":case 89:m.pokemon_id=89;break;case"SHELLDER":case 90:m.pokemon_id=90;break;case"CLOYSTER":case 91:m.pokemon_id=91;break;case"GASTLY":case 92:m.pokemon_id=92;break;case"HAUNTER":case 93:m.pokemon_id=93;break;case"GENGAR":case 94:m.pokemon_id=94;break;case"ONIX":case 95:m.pokemon_id=95;break;case"DROWZEE":case 96:m.pokemon_id=96;break;case"HYPNO":case 97:m.pokemon_id=97;break;case"KRABBY":case 98:m.pokemon_id=98;break;case"KINGLER":case 99:m.pokemon_id=99;break;case"VOLTORB":case 100:m.pokemon_id=100;break;case"ELECTRODE":case 101:m.pokemon_id=101;break;case"EXEGGCUTE":case 102:m.pokemon_id=102;break;case"EXEGGUTOR":case 103:m.pokemon_id=103;break;case"CUBONE":case 104:m.pokemon_id=104;break;case"MAROWAK":case 105:m.pokemon_id=105;break;case"HITMONLEE":case 106:m.pokemon_id=106;break;case"HITMONCHAN":case 107:m.pokemon_id=107;break;case"LICKITUNG":case 108:m.pokemon_id=108;break;case"KOFFING":case 109:m.pokemon_id=109;break;case"WEEZING":case 110:m.pokemon_id=110;break;case"RHYHORN":case 111:m.pokemon_id=111;break;case"RHYDON":case 112:m.pokemon_id=112;break;case"CHANSEY":case 113:m.pokemon_id=113;break;case"TANGELA":case 114:m.pokemon_id=114;break;case"KANGASKHAN":case 115:m.pokemon_id=115;break;case"HORSEA":case 116:m.pokemon_id=116;break;case"SEADRA":case 117:m.pokemon_id=117;break;case"GOLDEEN":case 118:m.pokemon_id=118;break;case"SEAKING":case 119:m.pokemon_id=119;break;case"STARYU":case 120:m.pokemon_id=120;break;case"STARMIE":case 121:m.pokemon_id=121;break;case"MR_MIME":case 122:m.pokemon_id=122;break;case"SCYTHER":case 123:m.pokemon_id=123;break;case"JYNX":case 124:m.pokemon_id=124;break;case"ELECTABUZZ":case 125:m.pokemon_id=125;break;case"MAGMAR":case 126:m.pokemon_id=126;break;case"PINSIR":case 127:m.pokemon_id=127;break;case"TAUROS":case 128:m.pokemon_id=128;break;case"MAGIKARP":case 129:m.pokemon_id=129;break;case"GYARADOS":case 130:m.pokemon_id=130;break;case"LAPRAS":case 131:m.pokemon_id=131;break;case"DITTO":case 132:m.pokemon_id=132;break;case"EEVEE":case 133:m.pokemon_id=133;break;case"VAPOREON":case 134:m.pokemon_id=134;break;case"JOLTEON":case 135:m.pokemon_id=135;break;case"FLAREON":case 136:m.pokemon_id=136;break;case"PORYGON":case 137:m.pokemon_id=137;break;case"OMANYTE":case 138:m.pokemon_id=138;break;case"OMASTAR":case 139:m.pokemon_id=139;break;case"KABUTO":case 140:m.pokemon_id=140;break;case"KABUTOPS":case 141:m.pokemon_id=141;break;case"AERODACTYL":case 142:m.pokemon_id=142;break;case"SNORLAX":case 143:m.pokemon_id=143;break;case"ARTICUNO":case 144:m.pokemon_id=144;break;case"ZAPDOS":case 145:m.pokemon_id=145;break;case"MOLTRES":case 146:m.pokemon_id=146;break;case"DRATINI":case 147:m.pokemon_id=147;break;case"DRAGONAIR":case 148:m.pokemon_id=148;break;case"DRAGONITE":case 149:m.pokemon_id=149;break;case"MEWTWO":case 150:m.pokemon_id=150;break;case"MEW":case 151:m.pokemon_id=151;break;case"CHIKORITA":case 152:m.pokemon_id=152;break;case"BAYLEEF":case 153:m.pokemon_id=153;break;case"MEGANIUM":case 154:m.pokemon_id=154;break;case"CYNDAQUIL":case 155:m.pokemon_id=155;break;case"QUILAVA":case 156:m.pokemon_id=156;break;case"TYPHLOSION":case 157:m.pokemon_id=157;break;case"TOTODILE":case 158:m.pokemon_id=158;break;case"CROCONAW":case 159:m.pokemon_id=159;break;case"FERALIGATR":case 160:m.pokemon_id=160;break;case"SENTRET":case 161:m.pokemon_id=161;break;case"FURRET":case 162:m.pokemon_id=162;break;case"HOOTHOOT":case 163:m.pokemon_id=163;break;case"NOCTOWL":case 164:m.pokemon_id=164;break;case"LEDYBA":case 165:m.pokemon_id=165;break;case"LEDIAN":case 166:m.pokemon_id=166;break;case"SPINARAK":case 167:m.pokemon_id=167;break;case"ARIADOS":case 168:m.pokemon_id=168;break;case"CROBAT":case 169:m.pokemon_id=169;break;case"CHINCHOU":case 170:m.pokemon_id=170;break;case"LANTURN":case 171:m.pokemon_id=171;break;case"PICHU":case 172:m.pokemon_id=172;break;case"CLEFFA":case 173:m.pokemon_id=173;break;case"IGGLYBUFF":case 174:m.pokemon_id=174;break;case"TOGEPI":case 175:m.pokemon_id=175;break;case"TOGETIC":case 176:m.pokemon_id=176;break;case"NATU":case 177:m.pokemon_id=177;break;case"XATU":case 178:m.pokemon_id=178;break;case"MAREEP":case 179:m.pokemon_id=179;break;case"FLAAFFY":case 180:m.pokemon_id=180;break;case"AMPHAROS":case 181:m.pokemon_id=181;break;case"BELLOSSOM":case 182:m.pokemon_id=182;break;case"MARILL":case 183:m.pokemon_id=183;break;case"AZUMARILL":case 184:m.pokemon_id=184;break;case"SUDOWOODO":case 185:m.pokemon_id=185;break;case"POLITOED":case 186:m.pokemon_id=186;break;case"HOPPIP":case 187:m.pokemon_id=187;break;case"SKIPLOOM":case 188:m.pokemon_id=188;break;case"JUMPLUFF":case 189:m.pokemon_id=189;break;case"AIPOM":case 190:m.pokemon_id=190;break;case"SUNKERN":case 191:m.pokemon_id=191;break;case"SUNFLORA":case 192:m.pokemon_id=192;break;case"YANMA":case 193:m.pokemon_id=193;break;case"WOOPER":case 194:m.pokemon_id=194;break;case"QUAGSIRE":case 195:m.pokemon_id=195;break;case"ESPEON":case 196:m.pokemon_id=196;break;case"UMBREON":case 197:m.pokemon_id=197;break;case"MURKROW":case 198:m.pokemon_id=198;break;case"SLOWKING":case 199:m.pokemon_id=199;break;case"MISDREAVUS":case 200:m.pokemon_id=200;break;case"UNOWN":case 201:m.pokemon_id=201;break;case"WOBBUFFET":case 202:m.pokemon_id=202;break;case"GIRAFARIG":case 203:m.pokemon_id=203;break;case"PINECO":case 204:m.pokemon_id=204;break;case"FORRETRESS":case 205:m.pokemon_id=205;break;case"DUNSPARCE":case 206:m.pokemon_id=206;break;case"GLIGAR":case 207:m.pokemon_id=207;break;case"STEELIX":case 208:m.pokemon_id=208;break;case"SNUBBULL":case 209:m.pokemon_id=209;break;case"GRANBULL":case 210:m.pokemon_id=210;break;case"QWILFISH":case 211:m.pokemon_id=211;break;case"SCIZOR":case 212:m.pokemon_id=212;break;case"SHUCKLE":case 213:m.pokemon_id=213;break;case"HERACROSS":case 214:m.pokemon_id=214;break;case"SNEASEL":case 215:m.pokemon_id=215;break;case"TEDDIURSA":case 216:m.pokemon_id=216;break;case"URSARING":case 217:m.pokemon_id=217;break;case"SLUGMA":case 218:m.pokemon_id=218;break;case"MAGCARGO":case 219:m.pokemon_id=219;break;case"SWINUB":case 220:m.pokemon_id=220;break;case"PILOSWINE":case 221:m.pokemon_id=221;break;case"CORSOLA":case 222:m.pokemon_id=222;break;case"REMORAID":case 223:m.pokemon_id=223;break;case"OCTILLERY":case 224:m.pokemon_id=224;break;case"DELIBIRD":case 225:m.pokemon_id=225;break;case"MANTINE":case 226:m.pokemon_id=226;break;case"SKARMORY":case 227:m.pokemon_id=227;break;case"HOUNDOUR":case 228:m.pokemon_id=228;break;case"HOUNDOOM":case 229:m.pokemon_id=229;break;case"KINGDRA":case 230:m.pokemon_id=230;break;case"PHANPY":case 231:m.pokemon_id=231;break;case"DONPHAN":case 232:m.pokemon_id=232;break;case"PORYGON2":case 233:m.pokemon_id=233;break;case"STANTLER":case 234:m.pokemon_id=234;break;case"SMEARGLE":case 235:m.pokemon_id=235;break;case"TYROGUE":case 236:m.pokemon_id=236;break;case"HITMONTOP":case 237:m.pokemon_id=237;break;case"SMOOCHUM":case 238:m.pokemon_id=238;break;case"ELEKID":case 239:m.pokemon_id=239;break;case"MAGBY":case 240:m.pokemon_id=240;break;case"MILTANK":case 241:m.pokemon_id=241;break;case"BLISSEY":case 242:m.pokemon_id=242;break;case"RAIKOU":case 243:m.pokemon_id=243;break;case"ENTEI":case 244:m.pokemon_id=244;break;case"SUICUNE":case 245:m.pokemon_id=245;break;case"LARVITAR":case 246:m.pokemon_id=246;break;case"PUPITAR":case 247:m.pokemon_id=247;break;case"TYRANITAR":case 248:m.pokemon_id=248;break;case"LUGIA":case 249:m.pokemon_id=249;break;case"HO_OH":case 250:m.pokemon_id=250;break;case"CELEBI":case 251:m.pokemon_id=251;break;case"TREECKO":case 252:m.pokemon_id=252;break;case"GROVYLE":case 253:m.pokemon_id=253;break;case"SCEPTILE":case 254:m.pokemon_id=254;break;case"TORCHIC":case 255:m.pokemon_id=255;break;case"COMBUSKEN":case 256:m.pokemon_id=256;break;case"BLAZIKEN":case 257:m.pokemon_id=257;break;case"MUDKIP":case 258:m.pokemon_id=258;break;case"MARSHTOMP":case 259:m.pokemon_id=259;break;case"SWAMPERT":case 260:m.pokemon_id=260;break;case"POOCHYENA":case 261:m.pokemon_id=261;break;case"MIGHTYENA":case 262:m.pokemon_id=262;break;case"ZIGZAGOON":case 263:m.pokemon_id=263;break;case"LINOONE":case 264:m.pokemon_id=264;break;case"WURMPLE":case 265:m.pokemon_id=265;break;case"SILCOON":case 266:m.pokemon_id=266;break;case"BEAUTIFLY":case 267:m.pokemon_id=267;break;case"CASCOON":case 268:m.pokemon_id=268;break;case"DUSTOX":case 269:m.pokemon_id=269;break;case"LOTAD":case 270:m.pokemon_id=270;break;case"LOMBRE":case 271:m.pokemon_id=271;break;case"LUDICOLO":case 272:m.pokemon_id=272;break;case"SEEDOT":case 273:m.pokemon_id=273;break;case"NUZLEAF":case 274:m.pokemon_id=274;break;case"SHIFTRY":case 275:m.pokemon_id=275;break;case"TAILLOW":case 276:m.pokemon_id=276;break;case"SWELLOW":case 277:m.pokemon_id=277;break;case"WINGULL":case 278:m.pokemon_id=278;break;case"PELIPPER":case 279:m.pokemon_id=279;break;case"RALTS":case 280:m.pokemon_id=280;break;case"KIRLIA":case 281:m.pokemon_id=281;break;case"GARDEVOIR":case 282:m.pokemon_id=282;break;case"SURSKIT":case 283:m.pokemon_id=283;break;case"MASQUERAIN":case 284:m.pokemon_id=284;break;case"SHROOMISH":case 285:m.pokemon_id=285;break;case"BRELOOM":case 286:m.pokemon_id=286;break;case"SLAKOTH":case 287:m.pokemon_id=287;break;case"VIGOROTH":case 288:m.pokemon_id=288;break;case"SLAKING":case 289:m.pokemon_id=289;break;case"NINCADA":case 290:m.pokemon_id=290;break;case"NINJASK":case 291:m.pokemon_id=291;break;case"SHEDINJA":case 292:m.pokemon_id=292;break;case"WHISMUR":case 293:m.pokemon_id=293;break;case"LOUDRED":case 294:m.pokemon_id=294;break;case"EXPLOUD":case 295:m.pokemon_id=295;break;case"MAKUHITA":case 296:m.pokemon_id=296;break;case"HARIYAMA":case 297:m.pokemon_id=297;break;case"AZURILL":case 298:m.pokemon_id=298;break;case"NOSEPASS":case 299:m.pokemon_id=299;break;case"SKITTY":case 300:m.pokemon_id=300;break;case"DELCATTY":case 301:m.pokemon_id=301;break;case"SABLEYE":case 302:m.pokemon_id=302;break;case"MAWILE":case 303:m.pokemon_id=303;break;case"ARON":case 304:m.pokemon_id=304;break;case"LAIRON":case 305:m.pokemon_id=305;break;case"AGGRON":case 306:m.pokemon_id=306;break;case"MEDITITE":case 307:m.pokemon_id=307;break;case"MEDICHAM":case 308:m.pokemon_id=308;break;case"ELECTRIKE":case 309:m.pokemon_id=309;break;case"MANECTRIC":case 310:m.pokemon_id=310;break;case"PLUSLE":case 311:m.pokemon_id=311;break;case"MINUN":case 312:m.pokemon_id=312;break;case"VOLBEAT":case 313:m.pokemon_id=313;break;case"ILLUMISE":case 314:m.pokemon_id=314;break;case"ROSELIA":case 315:m.pokemon_id=315;break;case"GULPIN":case 316:m.pokemon_id=316;break;case"SWALOT":case 317:m.pokemon_id=317;break;case"CARVANHA":case 318:m.pokemon_id=318;break;case"SHARPEDO":case 319:m.pokemon_id=319;break;case"WAILMER":case 320:m.pokemon_id=320;break;case"WAILORD":case 321:m.pokemon_id=321;break;case"NUMEL":case 322:m.pokemon_id=322;break;case"CAMERUPT":case 323:m.pokemon_id=323;break;case"TORKOAL":case 324:m.pokemon_id=324;break;case"SPOINK":case 325:m.pokemon_id=325;break;case"GRUMPIG":case 326:m.pokemon_id=326;break;case"SPINDA":case 327:m.pokemon_id=327;break;case"TRAPINCH":case 328:m.pokemon_id=328;break;case"VIBRAVA":case 329:m.pokemon_id=329;break;case"FLYGON":case 330:m.pokemon_id=330;break;case"CACNEA":case 331:m.pokemon_id=331;break;case"CACTURNE":case 332:m.pokemon_id=332;break;case"SWABLU":case 333:m.pokemon_id=333;break;case"ALTARIA":case 334:m.pokemon_id=334;break;case"ZANGOOSE":case 335:m.pokemon_id=335;break;case"SEVIPER":case 336:m.pokemon_id=336;break;case"LUNATONE":case 337:m.pokemon_id=337;break;case"SOLROCK":case 338:m.pokemon_id=338;break;case"BARBOACH":case 339:m.pokemon_id=339;break;case"WHISCASH":case 340:m.pokemon_id=340;break;case"CORPHISH":case 341:m.pokemon_id=341;break;case"CRAWDAUNT":case 342:m.pokemon_id=342;break;case"BALTOY":case 343:m.pokemon_id=343;break;case"CLAYDOL":case 344:m.pokemon_id=344;break;case"LILEEP":case 345:m.pokemon_id=345;break;case"CRADILY":case 346:m.pokemon_id=346;break;case"ANORITH":case 347:m.pokemon_id=347;break;case"ARMALDO":case 348:m.pokemon_id=348;break;case"FEEBAS":case 349:m.pokemon_id=349;break;case"MILOTIC":case 350:m.pokemon_id=350;break;case"CASTFORM":case 351:m.pokemon_id=351;break;case"KECLEON":case 352:m.pokemon_id=352;break;case"SHUPPET":case 353:m.pokemon_id=353;break;case"BANETTE":case 354:m.pokemon_id=354;break;case"DUSKULL":case 355:m.pokemon_id=355;break;case"DUSCLOPS":case 356:m.pokemon_id=356;break;case"TROPIUS":case 357:m.pokemon_id=357;break;case"CHIMECHO":case 358:m.pokemon_id=358;break;case"ABSOL":case 359:m.pokemon_id=359;break;case"WYNAUT":case 360:m.pokemon_id=360;break;case"SNORUNT":case 361:m.pokemon_id=361;break;case"GLALIE":case 362:m.pokemon_id=362;break;case"SPHEAL":case 363:m.pokemon_id=363;break;case"SEALEO":case 364:m.pokemon_id=364;break;case"WALREIN":case 365:m.pokemon_id=365;break;case"CLAMPERL":case 366:m.pokemon_id=366;break;case"HUNTAIL":case 367:m.pokemon_id=367;break;case"GOREBYSS":case 368:m.pokemon_id=368;break;case"RELICANTH":case 369:m.pokemon_id=369;break;case"LUVDISC":case 370:m.pokemon_id=370;break;case"BAGON":case 371:m.pokemon_id=371;break;case"SHELGON":case 372:m.pokemon_id=372;break;case"SALAMENCE":case 373:m.pokemon_id=373;break;case"BELDUM":case 374:m.pokemon_id=374;break;case"METANG":case 375:m.pokemon_id=375;break;case"METAGROSS":case 376:m.pokemon_id=376;break;case"REGIROCK":case 377:m.pokemon_id=377;break;case"REGICE":case 378:m.pokemon_id=378;break;case"REGISTEEL":case 379:m.pokemon_id=379;break;case"LATIAS":case 380:m.pokemon_id=380;break;case"LATIOS":case 381:m.pokemon_id=381;break;case"KYOGRE":case 382:m.pokemon_id=382;break;case"GROUDON":case 383:m.pokemon_id=383;break;case"RAYQUAZA":case 384:m.pokemon_id=384;break;case"JIRACHI":case 385:m.pokemon_id=385;break;case"DEOXYS":case 386:m.pokemon_id=386;break;case"TURTWIG":case 387:m.pokemon_id=387;break;case"GROTLE":case 388:m.pokemon_id=388;break;case"TORTERRA":case 389:m.pokemon_id=389;break;case"CHIMCHAR":case 390:m.pokemon_id=390;break;case"MONFERNO":case 391:m.pokemon_id=391;break;case"INFERNAPE":case 392:m.pokemon_id=392;break;case"PIPLUP":case 393:m.pokemon_id=393;break;case"PRINPLUP":case 394:m.pokemon_id=394;break;case"EMPOLEON":case 395:m.pokemon_id=395;break;case"STARLY":case 396:m.pokemon_id=396;break;case"STARAVIA":case 397:m.pokemon_id=397;break;case"STARAPTOR":case 398:m.pokemon_id=398;break;case"BIDOOF":case 399:m.pokemon_id=399;break;case"BIBAREL":case 400:m.pokemon_id=400;break;case"KRICKETOT":case 401:m.pokemon_id=401;break;case"KRICKETUNE":case 402:m.pokemon_id=402;break;case"SHINX":case 403:m.pokemon_id=403;break;case"LUXIO":case 404:m.pokemon_id=404;break;case"LUXRAY":case 405:m.pokemon_id=405;break;case"BUDEW":case 406:m.pokemon_id=406;break;case"ROSERADE":case 407:m.pokemon_id=407;break;case"CRANIDOS":case 408:m.pokemon_id=408;break;case"RAMPARDOS":case 409:m.pokemon_id=409;break;case"SHIELDON":case 410:m.pokemon_id=410;break;case"BASTIODON":case 411:m.pokemon_id=411;break;case"BURMY":case 412:m.pokemon_id=412;break;case"WORMADAM":case 413:m.pokemon_id=413;break;case"MOTHIM":case 414:m.pokemon_id=414;break;case"COMBEE":case 415:m.pokemon_id=415;break;case"VESPIQUEN":case 416:m.pokemon_id=416;break;case"PACHIRISU":case 417:m.pokemon_id=417;break;case"BUIZEL":case 418:m.pokemon_id=418;break;case"FLOATZEL":case 419:m.pokemon_id=419;break;case"CHERUBI":case 420:m.pokemon_id=420;break;case"CHERRIM":case 421:m.pokemon_id=421;break;case"SHELLOS":case 422:m.pokemon_id=422;break;case"GASTRODON":case 423:m.pokemon_id=423;break;case"AMBIPOM":case 424:m.pokemon_id=424;break;case"DRIFLOON":case 425:m.pokemon_id=425;break;case"DRIFBLIM":case 426:m.pokemon_id=426;break;case"BUNEARY":case 427:m.pokemon_id=427;break;case"LOPUNNY":case 428:m.pokemon_id=428;break;case"MISMAGIUS":case 429:m.pokemon_id=429;break;case"HONCHKROW":case 430:m.pokemon_id=430;break;case"GLAMEOW":case 431:m.pokemon_id=431;break;case"PURUGLY":case 432:m.pokemon_id=432;break;case"CHINGLING":case 433:m.pokemon_id=433;break;case"STUNKY":case 434:m.pokemon_id=434;break;case"SKUNTANK":case 435:m.pokemon_id=435;break;case"BRONZOR":case 436:m.pokemon_id=436;break;case"BRONZONG":case 437:m.pokemon_id=437;break;case"BONSLY":case 438:m.pokemon_id=438;break;case"MIME_JR":case 439:m.pokemon_id=439;break;case"HAPPINY":case 440:m.pokemon_id=440;break;case"CHATOT":case 441:m.pokemon_id=441;break;case"SPIRITOMB":case 442:m.pokemon_id=442;break;case"GIBLE":case 443:m.pokemon_id=443;break;case"GABITE":case 444:m.pokemon_id=444;break;case"GARCHOMP":case 445:m.pokemon_id=445;break;case"MUNCHLAX":case 446:m.pokemon_id=446;break;case"RIOLU":case 447:m.pokemon_id=447;break;case"LUCARIO":case 448:m.pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.pokemon_id=449;break;case"HIPPOWDON":case 450:m.pokemon_id=450;break;case"SKORUPI":case 451:m.pokemon_id=451;break;case"DRAPION":case 452:m.pokemon_id=452;break;case"CROAGUNK":case 453:m.pokemon_id=453;break;case"TOXICROAK":case 454:m.pokemon_id=454;break;case"CARNIVINE":case 455:m.pokemon_id=455;break;case"FINNEON":case 456:m.pokemon_id=456;break;case"LUMINEON":case 457:m.pokemon_id=457;break;case"MANTYKE":case 458:m.pokemon_id=458;break;case"SNOVER":case 459:m.pokemon_id=459;break;case"ABOMASNOW":case 460:m.pokemon_id=460;break;case"WEAVILE":case 461:m.pokemon_id=461;break;case"MAGNEZONE":case 462:m.pokemon_id=462;break;case"LICKILICKY":case 463:m.pokemon_id=463;break;case"RHYPERIOR":case 464:m.pokemon_id=464;break;case"TANGROWTH":case 465:m.pokemon_id=465;break;case"ELECTIVIRE":case 466:m.pokemon_id=466;break;case"MAGMORTAR":case 467:m.pokemon_id=467;break;case"TOGEKISS":case 468:m.pokemon_id=468;break;case"YANMEGA":case 469:m.pokemon_id=469;break;case"LEAFEON":case 470:m.pokemon_id=470;break;case"GLACEON":case 471:m.pokemon_id=471;break;case"GLISCOR":case 472:m.pokemon_id=472;break;case"MAMOSWINE":case 473:m.pokemon_id=473;break;case"PORYGON_Z":case 474:m.pokemon_id=474;break;case"GALLADE":case 475:m.pokemon_id=475;break;case"PROBOPASS":case 476:m.pokemon_id=476;break;case"DUSKNOIR":case 477:m.pokemon_id=477;break;case"FROSLASS":case 478:m.pokemon_id=478;break;case"ROTOM":case 479:m.pokemon_id=479;break;case"UXIE":case 480:m.pokemon_id=480;break;case"MESPRIT":case 481:m.pokemon_id=481;break;case"AZELF":case 482:m.pokemon_id=482;break;case"DIALGA":case 483:m.pokemon_id=483;break;case"PALKIA":case 484:m.pokemon_id=484;break;case"HEATRAN":case 485:m.pokemon_id=485;break;case"REGIGIGAS":case 486:m.pokemon_id=486;break;case"GIRATINA":case 487:m.pokemon_id=487;break;case"CRESSELIA":case 488:m.pokemon_id=488;break;case"PHIONE":case 489:m.pokemon_id=489;break;case"MANAPHY":case 490:m.pokemon_id=490;break;case"DARKRAI":case 491:m.pokemon_id=491;break;case"SHAYMIN":case 492:m.pokemon_id=492;break;case"ARCEUS":case 493:m.pokemon_id=493;break;case"MELTAN":case 808:m.pokemon_id=808;break;case"MELMETAL":case 809:m.pokemon_id=809;break}if(d.cp!=null){m.cp=d.cp|0}if(d.stamina!=null){m.stamina=d.stamina|0}if(d.stamina_max!=null){m.stamina_max=d.stamina_max|0}switch(d.move_1){case"MOVE_UNSET":case 0:m.move_1=0;break;case"THUNDER_SHOCK":case 1:m.move_1=1;break;case"QUICK_ATTACK":case 2:m.move_1=2;break;case"SCRATCH":case 3:m.move_1=3;break;case"EMBER":case 4:m.move_1=4;break;case"VINE_WHIP":case 5:m.move_1=5;break;case"TACKLE":case 6:m.move_1=6;break;case"RAZOR_LEAF":case 7:m.move_1=7;break;case"TAKE_DOWN":case 8:m.move_1=8;break;case"WATER_GUN":case 9:m.move_1=9;break;case"BITE":case 10:m.move_1=10;break;case"POUND":case 11:m.move_1=11;break;case"DOUBLE_SLAP":case 12:m.move_1=12;break;case"WRAP":case 13:m.move_1=13;break;case"HYPER_BEAM":case 14:m.move_1=14;break;case"LICK":case 15:m.move_1=15;break;case"DARK_PULSE":case 16:m.move_1=16;break;case"SMOG":case 17:m.move_1=17;break;case"SLUDGE":case 18:m.move_1=18;break;case"METAL_CLAW":case 19:m.move_1=19;break;case"VICE_GRIP":case 20:m.move_1=20;break;case"FLAME_WHEEL":case 21:m.move_1=21;break;case"MEGAHORN":case 22:m.move_1=22;break;case"WING_ATTACK":case 23:m.move_1=23;break;case"FLAMETHROWER":case 24:m.move_1=24;break;case"SUCKER_PUNCH":case 25:m.move_1=25;break;case"DIG":case 26:m.move_1=26;break;case"LOW_KICK":case 27:m.move_1=27;break;case"CROSS_CHOP":case 28:m.move_1=28;break;case"PSYCHO_CUT":case 29:m.move_1=29;break;case"PSYBEAM":case 30:m.move_1=30;break;case"EARTHQUAKE":case 31:m.move_1=31;break;case"STONE_EDGE":case 32:m.move_1=32;break;case"ICE_PUNCH":case 33:m.move_1=33;break;case"HEART_STAMP":case 34:m.move_1=34;break;case"DISCHARGE":case 35:m.move_1=35;break;case"FLASH_CANNON":case 36:m.move_1=36;break;case"PECK":case 37:m.move_1=37;break;case"DRILL_PECK":case 38:m.move_1=38;break;case"ICE_BEAM":case 39:m.move_1=39;break;case"BLIZZARD":case 40:m.move_1=40;break;case"AIR_SLASH":case 41:m.move_1=41;break;case"HEAT_WAVE":case 42:m.move_1=42;break;case"TWINEEDLE":case 43:m.move_1=43;break;case"POISON_JAB":case 44:m.move_1=44;break;case"AERIAL_ACE":case 45:m.move_1=45;break;case"DRILL_RUN":case 46:m.move_1=46;break;case"PETAL_BLIZZARD":case 47:m.move_1=47;break;case"MEGA_DRAIN":case 48:m.move_1=48;break;case"BUG_BUZZ":case 49:m.move_1=49;break;case"POISON_FANG":case 50:m.move_1=50;break;case"NIGHT_SLASH":case 51:m.move_1=51;break;case"SLASH":case 52:m.move_1=52;break;case"BUBBLE_BEAM":case 53:m.move_1=53;break;case"SUBMISSION":case 54:m.move_1=54;break;case"KARATE_CHOP":case 55:m.move_1=55;break;case"LOW_SWEEP":case 56:m.move_1=56;break;case"AQUA_JET":case 57:m.move_1=57;break;case"AQUA_TAIL":case 58:m.move_1=58;break;case"SEED_BOMB":case 59:m.move_1=59;break;case"PSYSHOCK":case 60:m.move_1=60;break;case"ROCK_THROW":case 61:m.move_1=61;break;case"ANCIENT_POWER":case 62:m.move_1=62;break;case"ROCK_TOMB":case 63:m.move_1=63;break;case"ROCK_SLIDE":case 64:m.move_1=64;break;case"POWER_GEM":case 65:m.move_1=65;break;case"SHADOW_SNEAK":case 66:m.move_1=66;break;case"SHADOW_PUNCH":case 67:m.move_1=67;break;case"SHADOW_CLAW":case 68:m.move_1=68;break;case"OMINOUS_WIND":case 69:m.move_1=69;break;case"SHADOW_BALL":case 70:m.move_1=70;break;case"BULLET_PUNCH":case 71:m.move_1=71;break;case"MAGNET_BOMB":case 72:m.move_1=72;break;case"STEEL_WING":case 73:m.move_1=73;break;case"IRON_HEAD":case 74:m.move_1=74;break;case"PARABOLIC_CHARGE":case 75:m.move_1=75;break;case"SPARK":case 76:m.move_1=76;break;case"THUNDER_PUNCH":case 77:m.move_1=77;break;case"THUNDER":case 78:m.move_1=78;break;case"THUNDERBOLT":case 79:m.move_1=79;break;case"TWISTER":case 80:m.move_1=80;break;case"DRAGON_BREATH":case 81:m.move_1=81;break;case"DRAGON_PULSE":case 82:m.move_1=82;break;case"DRAGON_CLAW":case 83:m.move_1=83;break;case"DISARMING_VOICE":case 84:m.move_1=84;break;case"DRAINING_KISS":case 85:m.move_1=85;break;case"DAZZLING_GLEAM":case 86:m.move_1=86;break;case"MOONBLAST":case 87:m.move_1=87;break;case"PLAY_ROUGH":case 88:m.move_1=88;break;case"CROSS_POISON":case 89:m.move_1=89;break;case"SLUDGE_BOMB":case 90:m.move_1=90;break;case"SLUDGE_WAVE":case 91:m.move_1=91;break;case"GUNK_SHOT":case 92:m.move_1=92;break;case"MUD_SHOT":case 93:m.move_1=93;break;case"BONE_CLUB":case 94:m.move_1=94;break;case"BULLDOZE":case 95:m.move_1=95;break;case"MUD_BOMB":case 96:m.move_1=96;break;case"FURY_CUTTER":case 97:m.move_1=97;break;case"BUG_BITE":case 98:m.move_1=98;break;case"SIGNAL_BEAM":case 99:m.move_1=99;break;case"X_SCISSOR":case 100:m.move_1=100;break;case"FLAME_CHARGE":case 101:m.move_1=101;break;case"FLAME_BURST":case 102:m.move_1=102;break;case"FIRE_BLAST":case 103:m.move_1=103;break;case"BRINE":case 104:m.move_1=104;break;case"WATER_PULSE":case 105:m.move_1=105;break;case"SCALD":case 106:m.move_1=106;break;case"HYDRO_PUMP":case 107:m.move_1=107;break;case"PSYCHIC":case 108:m.move_1=108;break;case"PSYSTRIKE":case 109:m.move_1=109;break;case"ICE_SHARD":case 110:m.move_1=110;break;case"ICY_WIND":case 111:m.move_1=111;break;case"FROST_BREATH":case 112:m.move_1=112;break;case"ABSORB":case 113:m.move_1=113;break;case"GIGA_DRAIN":case 114:m.move_1=114;break;case"FIRE_PUNCH":case 115:m.move_1=115;break;case"SOLAR_BEAM":case 116:m.move_1=116;break;case"LEAF_BLADE":case 117:m.move_1=117;break;case"POWER_WHIP":case 118:m.move_1=118;break;case"SPLASH":case 119:m.move_1=119;break;case"ACID":case 120:m.move_1=120;break;case"AIR_CUTTER":case 121:m.move_1=121;break;case"HURRICANE":case 122:m.move_1=122;break;case"BRICK_BREAK":case 123:m.move_1=123;break;case"CUT":case 124:m.move_1=124;break;case"SWIFT":case 125:m.move_1=125;break;case"HORN_ATTACK":case 126:m.move_1=126;break;case"STOMP":case 127:m.move_1=127;break;case"HEADBUTT":case 128:m.move_1=128;break;case"HYPER_FANG":case 129:m.move_1=129;break;case"SLAM":case 130:m.move_1=130;break;case"BODY_SLAM":case 131:m.move_1=131;break;case"REST":case 132:m.move_1=132;break;case"STRUGGLE":case 133:m.move_1=133;break;case"SCALD_BLASTOISE":case 134:m.move_1=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.move_1=135;break;case"WRAP_GREEN":case 136:m.move_1=136;break;case"WRAP_PINK":case 137:m.move_1=137;break;case"FURY_CUTTER_FAST":case 200:m.move_1=200;break;case"BUG_BITE_FAST":case 201:m.move_1=201;break;case"BITE_FAST":case 202:m.move_1=202;break;case"SUCKER_PUNCH_FAST":case 203:m.move_1=203;break;case"DRAGON_BREATH_FAST":case 204:m.move_1=204;break;case"THUNDER_SHOCK_FAST":case 205:m.move_1=205;break;case"SPARK_FAST":case 206:m.move_1=206;break;case"LOW_KICK_FAST":case 207:m.move_1=207;break;case"KARATE_CHOP_FAST":case 208:m.move_1=208;break;case"EMBER_FAST":case 209:m.move_1=209;break;case"WING_ATTACK_FAST":case 210:m.move_1=210;break;case"PECK_FAST":case 211:m.move_1=211;break;case"LICK_FAST":case 212:m.move_1=212;break;case"SHADOW_CLAW_FAST":case 213:m.move_1=213;break;case"VINE_WHIP_FAST":case 214:m.move_1=214;break;case"RAZOR_LEAF_FAST":case 215:m.move_1=215;break;case"MUD_SHOT_FAST":case 216:m.move_1=216;break;case"ICE_SHARD_FAST":case 217:m.move_1=217;break;case"FROST_BREATH_FAST":case 218:m.move_1=218;break;case"QUICK_ATTACK_FAST":case 219:m.move_1=219;break;case"SCRATCH_FAST":case 220:m.move_1=220;break;case"TACKLE_FAST":case 221:m.move_1=221;break;case"POUND_FAST":case 222:m.move_1=222;break;case"CUT_FAST":case 223:m.move_1=223;break;case"POISON_JAB_FAST":case 224:m.move_1=224;break;case"ACID_FAST":case 225:m.move_1=225;break;case"PSYCHO_CUT_FAST":case 226:m.move_1=226;break;case"ROCK_THROW_FAST":case 227:m.move_1=227;break;case"METAL_CLAW_FAST":case 228:m.move_1=228;break;case"BULLET_PUNCH_FAST":case 229:m.move_1=229;break;case"WATER_GUN_FAST":case 230:m.move_1=230;break;case"SPLASH_FAST":case 231:m.move_1=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.move_1=232;break;case"MUD_SLAP_FAST":case 233:m.move_1=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.move_1=234;break;case"CONFUSION_FAST":case 235:m.move_1=235;break;case"POISON_STING_FAST":case 236:m.move_1=236;break;case"BUBBLE_FAST":case 237:m.move_1=237;break;case"FEINT_ATTACK_FAST":case 238:m.move_1=238;break;case"STEEL_WING_FAST":case 239:m.move_1=239;break;case"FIRE_FANG_FAST":case 240:m.move_1=240;break;case"ROCK_SMASH_FAST":case 241:m.move_1=241;break;case"TRANSFORM_FAST":case 242:m.move_1=242;break;case"COUNTER_FAST":case 243:m.move_1=243;break;case"POWDER_SNOW_FAST":case 244:m.move_1=244;break;case"CLOSE_COMBAT":case 245:m.move_1=245;break;case"DYNAMIC_PUNCH":case 246:m.move_1=246;break;case"FOCUS_BLAST":case 247:m.move_1=247;break;case"AURORA_BEAM":case 248:m.move_1=248;break;case"CHARGE_BEAM_FAST":case 249:m.move_1=249;break;case"VOLT_SWITCH_FAST":case 250:m.move_1=250;break;case"WILD_CHARGE":case 251:m.move_1=251;break;case"ZAP_CANNON":case 252:m.move_1=252;break;case"DRAGON_TAIL_FAST":case 253:m.move_1=253;break;case"AVALANCHE":case 254:m.move_1=254;break;case"AIR_SLASH_FAST":case 255:m.move_1=255;break;case"BRAVE_BIRD":case 256:m.move_1=256;break;case"SKY_ATTACK":case 257:m.move_1=257;break;case"SAND_TOMB":case 258:m.move_1=258;break;case"ROCK_BLAST":case 259:m.move_1=259;break;case"INFESTATION_FAST":case 260:m.move_1=260;break;case"STRUGGLE_BUG_FAST":case 261:m.move_1=261;break;case"SILVER_WIND":case 262:m.move_1=262;break;case"ASTONISH_FAST":case 263:m.move_1=263;break;case"HEX_FAST":case 264:m.move_1=264;break;case"NIGHT_SHADE":case 265:m.move_1=265;break;case"IRON_TAIL_FAST":case 266:m.move_1=266;break;case"GYRO_BALL":case 267:m.move_1=267;break;case"HEAVY_SLAM":case 268:m.move_1=268;break;case"FIRE_SPIN_FAST":case 269:m.move_1=269;break;case"OVERHEAT":case 270:m.move_1=270;break;case"BULLET_SEED_FAST":case 271:m.move_1=271;break;case"GRASS_KNOT":case 272:m.move_1=272;break;case"ENERGY_BALL":case 273:m.move_1=273;break;case"EXTRASENSORY_FAST":case 274:m.move_1=274;break;case"FUTURESIGHT":case 275:m.move_1=275;break;case"MIRROR_COAT":case 276:m.move_1=276;break;case"OUTRAGE":case 277:m.move_1=277;break;case"SNARL_FAST":case 278:m.move_1=278;break;case"CRUNCH":case 279:m.move_1=279;break;case"FOUL_PLAY":case 280:m.move_1=280;break;case"HIDDEN_POWER_FAST":case 281:m.move_1=281;break;case"TAKE_DOWN_FAST":case 282:m.move_1=282;break;case"WATERFALL_FAST":case 283:m.move_1=283;break;case"SURF":case 284:m.move_1=284;break;case"DRACO_METEOR":case 285:m.move_1=285;break;case"DOOM_DESIRE":case 286:m.move_1=286;break;case"YAWN_FAST":case 287:m.move_1=287;break;case"PSYCHO_BOOST":case 288:m.move_1=288;break;case"ORIGIN_PULSE":case 289:m.move_1=289;break;case"PRECIPICE_BLADES":case 290:m.move_1=290;break;case"PRESENT_FAST":case 291:m.move_1=291;break;case"WEATHER_BALL_FIRE":case 292:m.move_1=292;break;case"WEATHER_BALL_ICE":case 293:m.move_1=293;break;case"WEATHER_BALL_ROCK":case 294:m.move_1=294;break;case"WEATHER_BALL_WATER":case 295:m.move_1=295;break;case"FRENZY_PLANT":case 296:m.move_1=296;break;case"SMACK_DOWN_FAST":case 297:m.move_1=297;break;case"BLAST_BURN":case 298:m.move_1=298;break;case"HYDRO_CANNON":case 299:m.move_1=299;break;case"LAST_RESORT":case 300:m.move_1=300;break;case"METEOR_MASH":case 301:m.move_1=301;break;case"SKULL_BASH":case 302:m.move_1=302;break;case"ACID_SPRAY":case 303:m.move_1=303;break;case"EARTH_POWER":case 304:m.move_1=304;break;case"CRABHAMMER":case 305:m.move_1=305;break;case"LUNGE":case 306:m.move_1=306;break;case"CRUSH_CLAW":case 307:m.move_1=307;break;case"OCTAZOOKA":case 308:m.move_1=308;break;case"MIRROR_SHOT":case 309:m.move_1=309;break;case"SUPER_POWER":case 310:m.move_1=310;break;case"FELL_STINGER":case 311:m.move_1=311;break;case"LEAF_TORNADO":case 312:m.move_1=312;break;case"LEECH_LIFE":case 313:m.move_1=313;break;case"DRAIN_PUNCH":case 314:m.move_1=314;break;case"SHADOW_BONE":case 315:m.move_1=315;break;case"MUDDY_WATER":case 316:m.move_1=316;break;case"BLAZE_KICK":case 317:m.move_1=317;break;case"RAZOR_SHELL":case 318:m.move_1=318;break;case"POWER_UP_PUNCH":case 319:m.move_1=319;break}switch(d.move_2){case"MOVE_UNSET":case 0:m.move_2=0;break;case"THUNDER_SHOCK":case 1:m.move_2=1;break;case"QUICK_ATTACK":case 2:m.move_2=2;break;case"SCRATCH":case 3:m.move_2=3;break;case"EMBER":case 4:m.move_2=4;break;case"VINE_WHIP":case 5:m.move_2=5;break;case"TACKLE":case 6:m.move_2=6;break;case"RAZOR_LEAF":case 7:m.move_2=7;break;case"TAKE_DOWN":case 8:m.move_2=8;break;case"WATER_GUN":case 9:m.move_2=9;break;case"BITE":case 10:m.move_2=10;break;case"POUND":case 11:m.move_2=11;break;case"DOUBLE_SLAP":case 12:m.move_2=12;break;case"WRAP":case 13:m.move_2=13;break;case"HYPER_BEAM":case 14:m.move_2=14;break;case"LICK":case 15:m.move_2=15;break;case"DARK_PULSE":case 16:m.move_2=16;break;case"SMOG":case 17:m.move_2=17;break;case"SLUDGE":case 18:m.move_2=18;break;case"METAL_CLAW":case 19:m.move_2=19;break;case"VICE_GRIP":case 20:m.move_2=20;break;case"FLAME_WHEEL":case 21:m.move_2=21;break;case"MEGAHORN":case 22:m.move_2=22;break;case"WING_ATTACK":case 23:m.move_2=23;break;case"FLAMETHROWER":case 24:m.move_2=24;break;case"SUCKER_PUNCH":case 25:m.move_2=25;break;case"DIG":case 26:m.move_2=26;break;case"LOW_KICK":case 27:m.move_2=27;break;case"CROSS_CHOP":case 28:m.move_2=28;break;case"PSYCHO_CUT":case 29:m.move_2=29;break;case"PSYBEAM":case 30:m.move_2=30;break;case"EARTHQUAKE":case 31:m.move_2=31;break;case"STONE_EDGE":case 32:m.move_2=32;break;case"ICE_PUNCH":case 33:m.move_2=33;break;case"HEART_STAMP":case 34:m.move_2=34;break;case"DISCHARGE":case 35:m.move_2=35;break;case"FLASH_CANNON":case 36:m.move_2=36;break;case"PECK":case 37:m.move_2=37;break;case"DRILL_PECK":case 38:m.move_2=38;break;case"ICE_BEAM":case 39:m.move_2=39;break;case"BLIZZARD":case 40:m.move_2=40;break;case"AIR_SLASH":case 41:m.move_2=41;break;case"HEAT_WAVE":case 42:m.move_2=42;break;case"TWINEEDLE":case 43:m.move_2=43;break;case"POISON_JAB":case 44:m.move_2=44;break;case"AERIAL_ACE":case 45:m.move_2=45;break;case"DRILL_RUN":case 46:m.move_2=46;break;case"PETAL_BLIZZARD":case 47:m.move_2=47;break;case"MEGA_DRAIN":case 48:m.move_2=48;break;case"BUG_BUZZ":case 49:m.move_2=49;break;case"POISON_FANG":case 50:m.move_2=50;break;case"NIGHT_SLASH":case 51:m.move_2=51;break;case"SLASH":case 52:m.move_2=52;break;case"BUBBLE_BEAM":case 53:m.move_2=53;break;case"SUBMISSION":case 54:m.move_2=54;break;case"KARATE_CHOP":case 55:m.move_2=55;break;case"LOW_SWEEP":case 56:m.move_2=56;break;case"AQUA_JET":case 57:m.move_2=57;break;case"AQUA_TAIL":case 58:m.move_2=58;break;case"SEED_BOMB":case 59:m.move_2=59;break;case"PSYSHOCK":case 60:m.move_2=60;break;case"ROCK_THROW":case 61:m.move_2=61;break;case"ANCIENT_POWER":case 62:m.move_2=62;break;case"ROCK_TOMB":case 63:m.move_2=63;break;case"ROCK_SLIDE":case 64:m.move_2=64;break;case"POWER_GEM":case 65:m.move_2=65;break;case"SHADOW_SNEAK":case 66:m.move_2=66;break;case"SHADOW_PUNCH":case 67:m.move_2=67;break;case"SHADOW_CLAW":case 68:m.move_2=68;break;case"OMINOUS_WIND":case 69:m.move_2=69;break;case"SHADOW_BALL":case 70:m.move_2=70;break;case"BULLET_PUNCH":case 71:m.move_2=71;break;case"MAGNET_BOMB":case 72:m.move_2=72;break;case"STEEL_WING":case 73:m.move_2=73;break;case"IRON_HEAD":case 74:m.move_2=74;break;case"PARABOLIC_CHARGE":case 75:m.move_2=75;break;case"SPARK":case 76:m.move_2=76;break;case"THUNDER_PUNCH":case 77:m.move_2=77;break;case"THUNDER":case 78:m.move_2=78;break;case"THUNDERBOLT":case 79:m.move_2=79;break;case"TWISTER":case 80:m.move_2=80;break;case"DRAGON_BREATH":case 81:m.move_2=81;break;case"DRAGON_PULSE":case 82:m.move_2=82;break;case"DRAGON_CLAW":case 83:m.move_2=83;break;case"DISARMING_VOICE":case 84:m.move_2=84;break;case"DRAINING_KISS":case 85:m.move_2=85;break;case"DAZZLING_GLEAM":case 86:m.move_2=86;break;case"MOONBLAST":case 87:m.move_2=87;break;case"PLAY_ROUGH":case 88:m.move_2=88;break;case"CROSS_POISON":case 89:m.move_2=89;break;case"SLUDGE_BOMB":case 90:m.move_2=90;break;case"SLUDGE_WAVE":case 91:m.move_2=91;break;case"GUNK_SHOT":case 92:m.move_2=92;break;case"MUD_SHOT":case 93:m.move_2=93;break;case"BONE_CLUB":case 94:m.move_2=94;break;case"BULLDOZE":case 95:m.move_2=95;break;case"MUD_BOMB":case 96:m.move_2=96;break;case"FURY_CUTTER":case 97:m.move_2=97;break;case"BUG_BITE":case 98:m.move_2=98;break;case"SIGNAL_BEAM":case 99:m.move_2=99;break;case"X_SCISSOR":case 100:m.move_2=100;break;case"FLAME_CHARGE":case 101:m.move_2=101;break;case"FLAME_BURST":case 102:m.move_2=102;break;case"FIRE_BLAST":case 103:m.move_2=103;break;case"BRINE":case 104:m.move_2=104;break;case"WATER_PULSE":case 105:m.move_2=105;break;case"SCALD":case 106:m.move_2=106;break;case"HYDRO_PUMP":case 107:m.move_2=107;break;case"PSYCHIC":case 108:m.move_2=108;break;case"PSYSTRIKE":case 109:m.move_2=109;break;case"ICE_SHARD":case 110:m.move_2=110;break;case"ICY_WIND":case 111:m.move_2=111;break;case"FROST_BREATH":case 112:m.move_2=112;break;case"ABSORB":case 113:m.move_2=113;break;case"GIGA_DRAIN":case 114:m.move_2=114;break;case"FIRE_PUNCH":case 115:m.move_2=115;break;case"SOLAR_BEAM":case 116:m.move_2=116;break;case"LEAF_BLADE":case 117:m.move_2=117;break;case"POWER_WHIP":case 118:m.move_2=118;break;case"SPLASH":case 119:m.move_2=119;break;case"ACID":case 120:m.move_2=120;break;case"AIR_CUTTER":case 121:m.move_2=121;break;case"HURRICANE":case 122:m.move_2=122;break;case"BRICK_BREAK":case 123:m.move_2=123;break;case"CUT":case 124:m.move_2=124;break;case"SWIFT":case 125:m.move_2=125;break;case"HORN_ATTACK":case 126:m.move_2=126;break;case"STOMP":case 127:m.move_2=127;break;case"HEADBUTT":case 128:m.move_2=128;break;case"HYPER_FANG":case 129:m.move_2=129;break;case"SLAM":case 130:m.move_2=130;break;case"BODY_SLAM":case 131:m.move_2=131;break;case"REST":case 132:m.move_2=132;break;case"STRUGGLE":case 133:m.move_2=133;break;case"SCALD_BLASTOISE":case 134:m.move_2=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.move_2=135;break;case"WRAP_GREEN":case 136:m.move_2=136;break;case"WRAP_PINK":case 137:m.move_2=137;break;case"FURY_CUTTER_FAST":case 200:m.move_2=200;break;case"BUG_BITE_FAST":case 201:m.move_2=201;break;case"BITE_FAST":case 202:m.move_2=202;break;case"SUCKER_PUNCH_FAST":case 203:m.move_2=203;break;case"DRAGON_BREATH_FAST":case 204:m.move_2=204;break;case"THUNDER_SHOCK_FAST":case 205:m.move_2=205;break;case"SPARK_FAST":case 206:m.move_2=206;break;case"LOW_KICK_FAST":case 207:m.move_2=207;break;case"KARATE_CHOP_FAST":case 208:m.move_2=208;break;case"EMBER_FAST":case 209:m.move_2=209;break;case"WING_ATTACK_FAST":case 210:m.move_2=210;break;case"PECK_FAST":case 211:m.move_2=211;break;case"LICK_FAST":case 212:m.move_2=212;break;case"SHADOW_CLAW_FAST":case 213:m.move_2=213;break;case"VINE_WHIP_FAST":case 214:m.move_2=214;break;case"RAZOR_LEAF_FAST":case 215:m.move_2=215;break;case"MUD_SHOT_FAST":case 216:m.move_2=216;break;case"ICE_SHARD_FAST":case 217:m.move_2=217;break;case"FROST_BREATH_FAST":case 218:m.move_2=218;break;case"QUICK_ATTACK_FAST":case 219:m.move_2=219;break;case"SCRATCH_FAST":case 220:m.move_2=220;break;case"TACKLE_FAST":case 221:m.move_2=221;break;case"POUND_FAST":case 222:m.move_2=222;break;case"CUT_FAST":case 223:m.move_2=223;break;case"POISON_JAB_FAST":case 224:m.move_2=224;break;case"ACID_FAST":case 225:m.move_2=225;break;case"PSYCHO_CUT_FAST":case 226:m.move_2=226;break;case"ROCK_THROW_FAST":case 227:m.move_2=227;break;case"METAL_CLAW_FAST":case 228:m.move_2=228;break;case"BULLET_PUNCH_FAST":case 229:m.move_2=229;break;case"WATER_GUN_FAST":case 230:m.move_2=230;break;case"SPLASH_FAST":case 231:m.move_2=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.move_2=232;break;case"MUD_SLAP_FAST":case 233:m.move_2=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.move_2=234;break;case"CONFUSION_FAST":case 235:m.move_2=235;break;case"POISON_STING_FAST":case 236:m.move_2=236;break;case"BUBBLE_FAST":case 237:m.move_2=237;break;case"FEINT_ATTACK_FAST":case 238:m.move_2=238;break;case"STEEL_WING_FAST":case 239:m.move_2=239;break;case"FIRE_FANG_FAST":case 240:m.move_2=240;break;case"ROCK_SMASH_FAST":case 241:m.move_2=241;break;case"TRANSFORM_FAST":case 242:m.move_2=242;break;case"COUNTER_FAST":case 243:m.move_2=243;break;case"POWDER_SNOW_FAST":case 244:m.move_2=244;break;case"CLOSE_COMBAT":case 245:m.move_2=245;break;case"DYNAMIC_PUNCH":case 246:m.move_2=246;break;case"FOCUS_BLAST":case 247:m.move_2=247;break;case"AURORA_BEAM":case 248:m.move_2=248;break;case"CHARGE_BEAM_FAST":case 249:m.move_2=249;break;case"VOLT_SWITCH_FAST":case 250:m.move_2=250;break;case"WILD_CHARGE":case 251:m.move_2=251;break;case"ZAP_CANNON":case 252:m.move_2=252;break;case"DRAGON_TAIL_FAST":case 253:m.move_2=253;break;case"AVALANCHE":case 254:m.move_2=254;break;case"AIR_SLASH_FAST":case 255:m.move_2=255;break;case"BRAVE_BIRD":case 256:m.move_2=256;break;case"SKY_ATTACK":case 257:m.move_2=257;break;case"SAND_TOMB":case 258:m.move_2=258;break;case"ROCK_BLAST":case 259:m.move_2=259;break;case"INFESTATION_FAST":case 260:m.move_2=260;break;case"STRUGGLE_BUG_FAST":case 261:m.move_2=261;break;case"SILVER_WIND":case 262:m.move_2=262;break;case"ASTONISH_FAST":case 263:m.move_2=263;break;case"HEX_FAST":case 264:m.move_2=264;break;case"NIGHT_SHADE":case 265:m.move_2=265;break;case"IRON_TAIL_FAST":case 266:m.move_2=266;break;case"GYRO_BALL":case 267:m.move_2=267;break;case"HEAVY_SLAM":case 268:m.move_2=268;break;case"FIRE_SPIN_FAST":case 269:m.move_2=269;break;case"OVERHEAT":case 270:m.move_2=270;break;case"BULLET_SEED_FAST":case 271:m.move_2=271;break;case"GRASS_KNOT":case 272:m.move_2=272;break;case"ENERGY_BALL":case 273:m.move_2=273;break;case"EXTRASENSORY_FAST":case 274:m.move_2=274;break;case"FUTURESIGHT":case 275:m.move_2=275;break;case"MIRROR_COAT":case 276:m.move_2=276;break;case"OUTRAGE":case 277:m.move_2=277;break;case"SNARL_FAST":case 278:m.move_2=278;break;case"CRUNCH":case 279:m.move_2=279;break;case"FOUL_PLAY":case 280:m.move_2=280;break;case"HIDDEN_POWER_FAST":case 281:m.move_2=281;break;case"TAKE_DOWN_FAST":case 282:m.move_2=282;break;case"WATERFALL_FAST":case 283:m.move_2=283;break;case"SURF":case 284:m.move_2=284;break;case"DRACO_METEOR":case 285:m.move_2=285;break;case"DOOM_DESIRE":case 286:m.move_2=286;break;case"YAWN_FAST":case 287:m.move_2=287;break;case"PSYCHO_BOOST":case 288:m.move_2=288;break;case"ORIGIN_PULSE":case 289:m.move_2=289;break;case"PRECIPICE_BLADES":case 290:m.move_2=290;break;case"PRESENT_FAST":case 291:m.move_2=291;break;case"WEATHER_BALL_FIRE":case 292:m.move_2=292;break;case"WEATHER_BALL_ICE":case 293:m.move_2=293;break;case"WEATHER_BALL_ROCK":case 294:m.move_2=294;break;case"WEATHER_BALL_WATER":case 295:m.move_2=295;break;case"FRENZY_PLANT":case 296:m.move_2=296;break;case"SMACK_DOWN_FAST":case 297:m.move_2=297;break;case"BLAST_BURN":case 298:m.move_2=298;break;case"HYDRO_CANNON":case 299:m.move_2=299;break;case"LAST_RESORT":case 300:m.move_2=300;break;case"METEOR_MASH":case 301:m.move_2=301;break;case"SKULL_BASH":case 302:m.move_2=302;break;case"ACID_SPRAY":case 303:m.move_2=303;break;case"EARTH_POWER":case 304:m.move_2=304;break;case"CRABHAMMER":case 305:m.move_2=305;break;case"LUNGE":case 306:m.move_2=306;break;case"CRUSH_CLAW":case 307:m.move_2=307;break;case"OCTAZOOKA":case 308:m.move_2=308;break;case"MIRROR_SHOT":case 309:m.move_2=309;break;case"SUPER_POWER":case 310:m.move_2=310;break;case"FELL_STINGER":case 311:m.move_2=311;break;case"LEAF_TORNADO":case 312:m.move_2=312;break;case"LEECH_LIFE":case 313:m.move_2=313;break;case"DRAIN_PUNCH":case 314:m.move_2=314;break;case"SHADOW_BONE":case 315:m.move_2=315;break;case"MUDDY_WATER":case 316:m.move_2=316;break;case"BLAZE_KICK":case 317:m.move_2=317;break;case"RAZOR_SHELL":case 318:m.move_2=318;break;case"POWER_UP_PUNCH":case 319:m.move_2=319;break}if(d.deployed_fort_id!=null){m.deployed_fort_id=String(d.deployed_fort_id)}if(d.owner_name!=null){m.owner_name=String(d.owner_name)}if(d.is_egg!=null){m.is_egg=Boolean(d.is_egg)}if(d.egg_km_walked_target!=null){m.egg_km_walked_target=Number(d.egg_km_walked_target)}if(d.egg_km_walked_start!=null){m.egg_km_walked_start=Number(d.egg_km_walked_start)}if(d.origin!=null){m.origin=d.origin|0}if(d.height_m!=null){m.height_m=Number(d.height_m)}if(d.weight_kg!=null){m.weight_kg=Number(d.weight_kg)}if(d.individual_attack!=null){m.individual_attack=d.individual_attack|0}if(d.individual_defense!=null){m.individual_defense=d.individual_defense|0}if(d.individual_stamina!=null){m.individual_stamina=d.individual_stamina|0}if(d.cp_multiplier!=null){m.cp_multiplier=Number(d.cp_multiplier)}switch(d.pokeball){case"ITEM_UNKNOWN":case 0:m.pokeball=0;break;case"ITEM_POKE_BALL":case 1:m.pokeball=1;break;case"ITEM_GREAT_BALL":case 2:m.pokeball=2;break;case"ITEM_ULTRA_BALL":case 3:m.pokeball=3;break;case"ITEM_MASTER_BALL":case 4:m.pokeball=4;break;case"ITEM_PREMIER_BALL":case 5:m.pokeball=5;break;case"ITEM_POTION":case 101:m.pokeball=101;break;case"ITEM_SUPER_POTION":case 102:m.pokeball=102;break;case"ITEM_HYPER_POTION":case 103:m.pokeball=103;break;case"ITEM_MAX_POTION":case 104:m.pokeball=104;break;case"ITEM_REVIVE":case 201:m.pokeball=201;break;case"ITEM_MAX_REVIVE":case 202:m.pokeball=202;break;case"ITEM_LUCKY_EGG":case 301:m.pokeball=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.pokeball=401;break;case"ITEM_INCENSE_SPICY":case 402:m.pokeball=402;break;case"ITEM_INCENSE_COOL":case 403:m.pokeball=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.pokeball=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.pokeball=405;break;case"ITEM_TROY_DISK":case 501:m.pokeball=501;break;case"ITEM_X_ATTACK":case 602:m.pokeball=602;break;case"ITEM_X_DEFENSE":case 603:m.pokeball=603;break;case"ITEM_X_MIRACLE":case 604:m.pokeball=604;break;case"ITEM_RAZZ_BERRY":case 701:m.pokeball=701;break;case"ITEM_BLUK_BERRY":case 702:m.pokeball=702;break;case"ITEM_NANAB_BERRY":case 703:m.pokeball=703;break;case"ITEM_WEPAR_BERRY":case 704:m.pokeball=704;break;case"ITEM_PINAP_BERRY":case 705:m.pokeball=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.pokeball=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.pokeball=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.pokeball=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.pokeball=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.pokeball=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.pokeball=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.pokeball=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.pokeball=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.pokeball=1002;break;case"ITEM_SUN_STONE":case 1101:m.pokeball=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.pokeball=1102;break;case"ITEM_METAL_COAT":case 1103:m.pokeball=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.pokeball=1104;break;case"ITEM_UP_GRADE":case 1105:m.pokeball=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.pokeball=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.pokeball=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.pokeball=1202;break;case"ITEM_RARE_CANDY":case 1301:m.pokeball=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.pokeball=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.pokeball=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.pokeball=1403;break;case"ITEM_STAR_PIECE":case 1404:m.pokeball=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.pokeball=1405;break}if(d.captured_cell_id!=null){if($util.Long)(m.captured_cell_id=$util.Long.fromValue(d.captured_cell_id)).unsigned=true;else if(typeof d.captured_cell_id==="string")m.captured_cell_id=parseInt(d.captured_cell_id,10);else if(typeof d.captured_cell_id==="number")m.captured_cell_id=d.captured_cell_id;else if(typeof d.captured_cell_id==="object")m.captured_cell_id=new $util.LongBits(d.captured_cell_id.low>>>0,d.captured_cell_id.high>>>0).toNumber(true)}if(d.battles_attacked!=null){m.battles_attacked=d.battles_attacked|0}if(d.battles_defended!=null){m.battles_defended=d.battles_defended|0}if(d.egg_incubator_id!=null){m.egg_incubator_id=String(d.egg_incubator_id)}if(d.creation_time_ms!=null){if($util.Long)(m.creation_time_ms=$util.Long.fromValue(d.creation_time_ms)).unsigned=true;else if(typeof d.creation_time_ms==="string")m.creation_time_ms=parseInt(d.creation_time_ms,10);else if(typeof d.creation_time_ms==="number")m.creation_time_ms=d.creation_time_ms;else if(typeof d.creation_time_ms==="object")m.creation_time_ms=new $util.LongBits(d.creation_time_ms.low>>>0,d.creation_time_ms.high>>>0).toNumber(true)}if(d.num_upgrades!=null){m.num_upgrades=d.num_upgrades|0}if(d.additional_cp_multiplier!=null){m.additional_cp_multiplier=Number(d.additional_cp_multiplier)}if(d.favorite!=null){m.favorite=d.favorite|0}if(d.nickname!=null){m.nickname=String(d.nickname)}if(d.from_fort!=null){m.from_fort=d.from_fort|0}if(d.buddy_candy_awarded!=null){m.buddy_candy_awarded=d.buddy_candy_awarded|0}if(d.buddy_total_km_walked!=null){m.buddy_total_km_walked=Number(d.buddy_total_km_walked)}if(d.display_pokemon_id!=null){m.display_pokemon_id=d.display_pokemon_id|0}if(d.display_cp!=null){m.display_cp=d.display_cp|0}if(d.pokemon_display!=null){if(typeof d.pokemon_display!=="object")throw TypeError(".POGOProtos.Data.PokemonData.pokemon_display: object expected");m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.pokemon_display)}if(d.is_bad!=null){m.is_bad=Boolean(d.is_bad)}if(d.hatched_from_egg!=null){m.hatched_from_egg=Boolean(d.hatched_from_egg)}if(d.coins_returned!=null){m.coins_returned=d.coins_returned|0}if(d.deployed_duration_ms!=null){if($util.Long)(m.deployed_duration_ms=$util.Long.fromValue(d.deployed_duration_ms)).unsigned=false;else if(typeof d.deployed_duration_ms==="string")m.deployed_duration_ms=parseInt(d.deployed_duration_ms,10);else if(typeof d.deployed_duration_ms==="number")m.deployed_duration_ms=d.deployed_duration_ms;else if(typeof d.deployed_duration_ms==="object")m.deployed_duration_ms=new $util.LongBits(d.deployed_duration_ms.low>>>0,d.deployed_duration_ms.high>>>0).toNumber()}if(d.deployed_returned_timestamp_ms!=null){if($util.Long)(m.deployed_returned_timestamp_ms=$util.Long.fromValue(d.deployed_returned_timestamp_ms)).unsigned=false;else if(typeof d.deployed_returned_timestamp_ms==="string")m.deployed_returned_timestamp_ms=parseInt(d.deployed_returned_timestamp_ms,10);else if(typeof d.deployed_returned_timestamp_ms==="number")m.deployed_returned_timestamp_ms=d.deployed_returned_timestamp_ms;else if(typeof d.deployed_returned_timestamp_ms==="object")m.deployed_returned_timestamp_ms=new $util.LongBits(d.deployed_returned_timestamp_ms.low>>>0,d.deployed_returned_timestamp_ms.high>>>0).toNumber()}if(d.cp_multiplier_before_trading!=null){m.cp_multiplier_before_trading=Number(d.cp_multiplier_before_trading)}if(d.trading_original_owner_hash!=null){m.trading_original_owner_hash=d.trading_original_owner_hash|0}if(d.original_owner_nickname!=null){m.original_owner_nickname=String(d.original_owner_nickname)}if(d.traded_time_ms!=null){if($util.Long)(m.traded_time_ms=$util.Long.fromValue(d.traded_time_ms)).unsigned=false;else if(typeof d.traded_time_ms==="string")m.traded_time_ms=parseInt(d.traded_time_ms,10);else if(typeof d.traded_time_ms==="number")m.traded_time_ms=d.traded_time_ms;else if(typeof d.traded_time_ms==="object")m.traded_time_ms=new $util.LongBits(d.traded_time_ms.low>>>0,d.traded_time_ms.high>>>0).toNumber()}if(d.is_lucky!=null){m.is_lucky=Boolean(d.is_lucky)}switch(d.move_3){case"MOVE_UNSET":case 0:m.move_3=0;break;case"THUNDER_SHOCK":case 1:m.move_3=1;break;case"QUICK_ATTACK":case 2:m.move_3=2;break;case"SCRATCH":case 3:m.move_3=3;break;case"EMBER":case 4:m.move_3=4;break;case"VINE_WHIP":case 5:m.move_3=5;break;case"TACKLE":case 6:m.move_3=6;break;case"RAZOR_LEAF":case 7:m.move_3=7;break;case"TAKE_DOWN":case 8:m.move_3=8;break;case"WATER_GUN":case 9:m.move_3=9;break;case"BITE":case 10:m.move_3=10;break;case"POUND":case 11:m.move_3=11;break;case"DOUBLE_SLAP":case 12:m.move_3=12;break;case"WRAP":case 13:m.move_3=13;break;case"HYPER_BEAM":case 14:m.move_3=14;break;case"LICK":case 15:m.move_3=15;break;case"DARK_PULSE":case 16:m.move_3=16;break;case"SMOG":case 17:m.move_3=17;break;case"SLUDGE":case 18:m.move_3=18;break;case"METAL_CLAW":case 19:m.move_3=19;break;case"VICE_GRIP":case 20:m.move_3=20;break;case"FLAME_WHEEL":case 21:m.move_3=21;break;case"MEGAHORN":case 22:m.move_3=22;break;case"WING_ATTACK":case 23:m.move_3=23;break;case"FLAMETHROWER":case 24:m.move_3=24;break;case"SUCKER_PUNCH":case 25:m.move_3=25;break;case"DIG":case 26:m.move_3=26;break;case"LOW_KICK":case 27:m.move_3=27;break;case"CROSS_CHOP":case 28:m.move_3=28;break;case"PSYCHO_CUT":case 29:m.move_3=29;break;case"PSYBEAM":case 30:m.move_3=30;break;case"EARTHQUAKE":case 31:m.move_3=31;break;case"STONE_EDGE":case 32:m.move_3=32;break;case"ICE_PUNCH":case 33:m.move_3=33;break;case"HEART_STAMP":case 34:m.move_3=34;break;case"DISCHARGE":case 35:m.move_3=35;break;case"FLASH_CANNON":case 36:m.move_3=36;break;case"PECK":case 37:m.move_3=37;break;case"DRILL_PECK":case 38:m.move_3=38;break;case"ICE_BEAM":case 39:m.move_3=39;break;case"BLIZZARD":case 40:m.move_3=40;break;case"AIR_SLASH":case 41:m.move_3=41;break;case"HEAT_WAVE":case 42:m.move_3=42;break;case"TWINEEDLE":case 43:m.move_3=43;break;case"POISON_JAB":case 44:m.move_3=44;break;case"AERIAL_ACE":case 45:m.move_3=45;break;case"DRILL_RUN":case 46:m.move_3=46;break;case"PETAL_BLIZZARD":case 47:m.move_3=47;break;case"MEGA_DRAIN":case 48:m.move_3=48;break;case"BUG_BUZZ":case 49:m.move_3=49;break;case"POISON_FANG":case 50:m.move_3=50;break;case"NIGHT_SLASH":case 51:m.move_3=51;break;case"SLASH":case 52:m.move_3=52;break;case"BUBBLE_BEAM":case 53:m.move_3=53;break;case"SUBMISSION":case 54:m.move_3=54;break;case"KARATE_CHOP":case 55:m.move_3=55;break;case"LOW_SWEEP":case 56:m.move_3=56;break;case"AQUA_JET":case 57:m.move_3=57;break;case"AQUA_TAIL":case 58:m.move_3=58;break;case"SEED_BOMB":case 59:m.move_3=59;break;case"PSYSHOCK":case 60:m.move_3=60;break;case"ROCK_THROW":case 61:m.move_3=61;break;case"ANCIENT_POWER":case 62:m.move_3=62;break;case"ROCK_TOMB":case 63:m.move_3=63;break;case"ROCK_SLIDE":case 64:m.move_3=64;break;case"POWER_GEM":case 65:m.move_3=65;break;case"SHADOW_SNEAK":case 66:m.move_3=66;break;case"SHADOW_PUNCH":case 67:m.move_3=67;break;case"SHADOW_CLAW":case 68:m.move_3=68;break;case"OMINOUS_WIND":case 69:m.move_3=69;break;case"SHADOW_BALL":case 70:m.move_3=70;break;case"BULLET_PUNCH":case 71:m.move_3=71;break;case"MAGNET_BOMB":case 72:m.move_3=72;break;case"STEEL_WING":case 73:m.move_3=73;break;case"IRON_HEAD":case 74:m.move_3=74;break;case"PARABOLIC_CHARGE":case 75:m.move_3=75;break;case"SPARK":case 76:m.move_3=76;break;case"THUNDER_PUNCH":case 77:m.move_3=77;break;case"THUNDER":case 78:m.move_3=78;break;case"THUNDERBOLT":case 79:m.move_3=79;break;case"TWISTER":case 80:m.move_3=80;break;case"DRAGON_BREATH":case 81:m.move_3=81;break;case"DRAGON_PULSE":case 82:m.move_3=82;break;case"DRAGON_CLAW":case 83:m.move_3=83;break;case"DISARMING_VOICE":case 84:m.move_3=84;break;case"DRAINING_KISS":case 85:m.move_3=85;break;case"DAZZLING_GLEAM":case 86:m.move_3=86;break;case"MOONBLAST":case 87:m.move_3=87;break;case"PLAY_ROUGH":case 88:m.move_3=88;break;case"CROSS_POISON":case 89:m.move_3=89;break;case"SLUDGE_BOMB":case 90:m.move_3=90;break;case"SLUDGE_WAVE":case 91:m.move_3=91;break;case"GUNK_SHOT":case 92:m.move_3=92;break;case"MUD_SHOT":case 93:m.move_3=93;break;case"BONE_CLUB":case 94:m.move_3=94;break;case"BULLDOZE":case 95:m.move_3=95;break;case"MUD_BOMB":case 96:m.move_3=96;break;case"FURY_CUTTER":case 97:m.move_3=97;break;case"BUG_BITE":case 98:m.move_3=98;break;case"SIGNAL_BEAM":case 99:m.move_3=99;break;case"X_SCISSOR":case 100:m.move_3=100;break;case"FLAME_CHARGE":case 101:m.move_3=101;break;case"FLAME_BURST":case 102:m.move_3=102;break;case"FIRE_BLAST":case 103:m.move_3=103;break;case"BRINE":case 104:m.move_3=104;break;case"WATER_PULSE":case 105:m.move_3=105;break;case"SCALD":case 106:m.move_3=106;break;case"HYDRO_PUMP":case 107:m.move_3=107;break;case"PSYCHIC":case 108:m.move_3=108;break;case"PSYSTRIKE":case 109:m.move_3=109;break;case"ICE_SHARD":case 110:m.move_3=110;break;case"ICY_WIND":case 111:m.move_3=111;break;case"FROST_BREATH":case 112:m.move_3=112;break;case"ABSORB":case 113:m.move_3=113;break;case"GIGA_DRAIN":case 114:m.move_3=114;break;case"FIRE_PUNCH":case 115:m.move_3=115;break;case"SOLAR_BEAM":case 116:m.move_3=116;break;case"LEAF_BLADE":case 117:m.move_3=117;break;case"POWER_WHIP":case 118:m.move_3=118;break;case"SPLASH":case 119:m.move_3=119;break;case"ACID":case 120:m.move_3=120;break;case"AIR_CUTTER":case 121:m.move_3=121;break;case"HURRICANE":case 122:m.move_3=122;break;case"BRICK_BREAK":case 123:m.move_3=123;break;case"CUT":case 124:m.move_3=124;break;case"SWIFT":case 125:m.move_3=125;break;case"HORN_ATTACK":case 126:m.move_3=126;break;case"STOMP":case 127:m.move_3=127;break;case"HEADBUTT":case 128:m.move_3=128;break;case"HYPER_FANG":case 129:m.move_3=129;break;case"SLAM":case 130:m.move_3=130;break;case"BODY_SLAM":case 131:m.move_3=131;break;case"REST":case 132:m.move_3=132;break;case"STRUGGLE":case 133:m.move_3=133;break;case"SCALD_BLASTOISE":case 134:m.move_3=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.move_3=135;break;case"WRAP_GREEN":case 136:m.move_3=136;break;case"WRAP_PINK":case 137:m.move_3=137;break;case"FURY_CUTTER_FAST":case 200:m.move_3=200;break;case"BUG_BITE_FAST":case 201:m.move_3=201;break;case"BITE_FAST":case 202:m.move_3=202;break;case"SUCKER_PUNCH_FAST":case 203:m.move_3=203;break;case"DRAGON_BREATH_FAST":case 204:m.move_3=204;break;case"THUNDER_SHOCK_FAST":case 205:m.move_3=205;break;case"SPARK_FAST":case 206:m.move_3=206;break;case"LOW_KICK_FAST":case 207:m.move_3=207;break;case"KARATE_CHOP_FAST":case 208:m.move_3=208;break;case"EMBER_FAST":case 209:m.move_3=209;break;case"WING_ATTACK_FAST":case 210:m.move_3=210;break;case"PECK_FAST":case 211:m.move_3=211;break;case"LICK_FAST":case 212:m.move_3=212;break;case"SHADOW_CLAW_FAST":case 213:m.move_3=213;break;case"VINE_WHIP_FAST":case 214:m.move_3=214;break;case"RAZOR_LEAF_FAST":case 215:m.move_3=215;break;case"MUD_SHOT_FAST":case 216:m.move_3=216;break;case"ICE_SHARD_FAST":case 217:m.move_3=217;break;case"FROST_BREATH_FAST":case 218:m.move_3=218;break;case"QUICK_ATTACK_FAST":case 219:m.move_3=219;break;case"SCRATCH_FAST":case 220:m.move_3=220;break;case"TACKLE_FAST":case 221:m.move_3=221;break;case"POUND_FAST":case 222:m.move_3=222;break;case"CUT_FAST":case 223:m.move_3=223;break;case"POISON_JAB_FAST":case 224:m.move_3=224;break;case"ACID_FAST":case 225:m.move_3=225;break;case"PSYCHO_CUT_FAST":case 226:m.move_3=226;break;case"ROCK_THROW_FAST":case 227:m.move_3=227;break;case"METAL_CLAW_FAST":case 228:m.move_3=228;break;case"BULLET_PUNCH_FAST":case 229:m.move_3=229;break;case"WATER_GUN_FAST":case 230:m.move_3=230;break;case"SPLASH_FAST":case 231:m.move_3=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.move_3=232;break;case"MUD_SLAP_FAST":case 233:m.move_3=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.move_3=234;break;case"CONFUSION_FAST":case 235:m.move_3=235;break;case"POISON_STING_FAST":case 236:m.move_3=236;break;case"BUBBLE_FAST":case 237:m.move_3=237;break;case"FEINT_ATTACK_FAST":case 238:m.move_3=238;break;case"STEEL_WING_FAST":case 239:m.move_3=239;break;case"FIRE_FANG_FAST":case 240:m.move_3=240;break;case"ROCK_SMASH_FAST":case 241:m.move_3=241;break;case"TRANSFORM_FAST":case 242:m.move_3=242;break;case"COUNTER_FAST":case 243:m.move_3=243;break;case"POWDER_SNOW_FAST":case 244:m.move_3=244;break;case"CLOSE_COMBAT":case 245:m.move_3=245;break;case"DYNAMIC_PUNCH":case 246:m.move_3=246;break;case"FOCUS_BLAST":case 247:m.move_3=247;break;case"AURORA_BEAM":case 248:m.move_3=248;break;case"CHARGE_BEAM_FAST":case 249:m.move_3=249;break;case"VOLT_SWITCH_FAST":case 250:m.move_3=250;break;case"WILD_CHARGE":case 251:m.move_3=251;break;case"ZAP_CANNON":case 252:m.move_3=252;break;case"DRAGON_TAIL_FAST":case 253:m.move_3=253;break;case"AVALANCHE":case 254:m.move_3=254;break;case"AIR_SLASH_FAST":case 255:m.move_3=255;break;case"BRAVE_BIRD":case 256:m.move_3=256;break;case"SKY_ATTACK":case 257:m.move_3=257;break;case"SAND_TOMB":case 258:m.move_3=258;break;case"ROCK_BLAST":case 259:m.move_3=259;break;case"INFESTATION_FAST":case 260:m.move_3=260;break;case"STRUGGLE_BUG_FAST":case 261:m.move_3=261;break;case"SILVER_WIND":case 262:m.move_3=262;break;case"ASTONISH_FAST":case 263:m.move_3=263;break;case"HEX_FAST":case 264:m.move_3=264;break;case"NIGHT_SHADE":case 265:m.move_3=265;break;case"IRON_TAIL_FAST":case 266:m.move_3=266;break;case"GYRO_BALL":case 267:m.move_3=267;break;case"HEAVY_SLAM":case 268:m.move_3=268;break;case"FIRE_SPIN_FAST":case 269:m.move_3=269;break;case"OVERHEAT":case 270:m.move_3=270;break;case"BULLET_SEED_FAST":case 271:m.move_3=271;break;case"GRASS_KNOT":case 272:m.move_3=272;break;case"ENERGY_BALL":case 273:m.move_3=273;break;case"EXTRASENSORY_FAST":case 274:m.move_3=274;break;case"FUTURESIGHT":case 275:m.move_3=275;break;case"MIRROR_COAT":case 276:m.move_3=276;break;case"OUTRAGE":case 277:m.move_3=277;break;case"SNARL_FAST":case 278:m.move_3=278;break;case"CRUNCH":case 279:m.move_3=279;break;case"FOUL_PLAY":case 280:m.move_3=280;break;case"HIDDEN_POWER_FAST":case 281:m.move_3=281;break;case"TAKE_DOWN_FAST":case 282:m.move_3=282;break;case"WATERFALL_FAST":case 283:m.move_3=283;break;case"SURF":case 284:m.move_3=284;break;case"DRACO_METEOR":case 285:m.move_3=285;break;case"DOOM_DESIRE":case 286:m.move_3=286;break;case"YAWN_FAST":case 287:m.move_3=287;break;case"PSYCHO_BOOST":case 288:m.move_3=288;break;case"ORIGIN_PULSE":case 289:m.move_3=289;break;case"PRECIPICE_BLADES":case 290:m.move_3=290;break;case"PRESENT_FAST":case 291:m.move_3=291;break;case"WEATHER_BALL_FIRE":case 292:m.move_3=292;break;case"WEATHER_BALL_ICE":case 293:m.move_3=293;break;case"WEATHER_BALL_ROCK":case 294:m.move_3=294;break;case"WEATHER_BALL_WATER":case 295:m.move_3=295;break;case"FRENZY_PLANT":case 296:m.move_3=296;break;case"SMACK_DOWN_FAST":case 297:m.move_3=297;break;case"BLAST_BURN":case 298:m.move_3=298;break;case"HYDRO_CANNON":case 299:m.move_3=299;break;case"LAST_RESORT":case 300:m.move_3=300;break;case"METEOR_MASH":case 301:m.move_3=301;break;case"SKULL_BASH":case 302:m.move_3=302;break;case"ACID_SPRAY":case 303:m.move_3=303;break;case"EARTH_POWER":case 304:m.move_3=304;break;case"CRABHAMMER":case 305:m.move_3=305;break;case"LUNGE":case 306:m.move_3=306;break;case"CRUSH_CLAW":case 307:m.move_3=307;break;case"OCTAZOOKA":case 308:m.move_3=308;break;case"MIRROR_SHOT":case 309:m.move_3=309;break;case"SUPER_POWER":case 310:m.move_3=310;break;case"FELL_STINGER":case 311:m.move_3=311;break;case"LEAF_TORNADO":case 312:m.move_3=312;break;case"LEECH_LIFE":case 313:m.move_3=313;break;case"DRAIN_PUNCH":case 314:m.move_3=314;break;case"SHADOW_BONE":case 315:m.move_3=315;break;case"MUDDY_WATER":case 316:m.move_3=316;break;case"BLAZE_KICK":case 317:m.move_3=317;break;case"RAZOR_SHELL":case 318:m.move_3=318;break;case"POWER_UP_PUNCH":case 319:m.move_3=319;break}if(d.pvp_combat_stats!=null){if(typeof d.pvp_combat_stats!=="object")throw TypeError(".POGOProtos.Data.PokemonData.pvp_combat_stats: object expected");m.pvp_combat_stats=$root.POGOProtos.Data.Combat.PokemonCombatStats.fromObject(d.pvp_combat_stats)}if(d.npc_combat_stats!=null){if(typeof d.npc_combat_stats!=="object")throw TypeError(".POGOProtos.Data.PokemonData.npc_combat_stats: object expected");m.npc_combat_stats=$root.POGOProtos.Data.Combat.PokemonCombatStats.fromObject(d.npc_combat_stats)}return m};PokemonData.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.id=o.longs===String?"0":0;d.pokemon_id=o.enums===String?"MISSINGNO":0;d.cp=0;d.stamina=0;d.stamina_max=0;d.move_1=o.enums===String?"MOVE_UNSET":0;d.move_2=o.enums===String?"MOVE_UNSET":0;d.deployed_fort_id="";d.owner_name="";d.is_egg=false;d.egg_km_walked_target=0;d.egg_km_walked_start=0;d.origin=0;d.height_m=0;d.weight_kg=0;d.individual_attack=0;d.individual_defense=0;d.individual_stamina=0;d.cp_multiplier=0;d.pokeball=o.enums===String?"ITEM_UNKNOWN":0;if($util.Long){var n=new $util.Long(0,0,true);d.captured_cell_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.captured_cell_id=o.longs===String?"0":0;d.battles_attacked=0;d.battles_defended=0;d.egg_incubator_id="";if($util.Long){var n=new $util.Long(0,0,true);d.creation_time_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.creation_time_ms=o.longs===String?"0":0;d.num_upgrades=0;d.additional_cp_multiplier=0;d.favorite=0;d.nickname="";d.from_fort=0;d.buddy_candy_awarded=0;d.buddy_total_km_walked=0;d.display_pokemon_id=0;d.display_cp=0;d.pokemon_display=null;d.is_bad=false;d.hatched_from_egg=false;d.coins_returned=0;if($util.Long){var n=new $util.Long(0,0,false);d.deployed_duration_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.deployed_duration_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.deployed_returned_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.deployed_returned_timestamp_ms=o.longs===String?"0":0;d.cp_multiplier_before_trading=0;d.trading_original_owner_hash=0;d.original_owner_nickname="";if($util.Long){var n=new $util.Long(0,0,false);d.traded_time_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.traded_time_ms=o.longs===String?"0":0;d.is_lucky=false;d.move_3=o.enums===String?"MOVE_UNSET":0;d.pvp_combat_stats=null;d.npc_combat_stats=null}if(m.id!=null&&m.hasOwnProperty("id")){if(typeof m.id==="number")d.id=o.longs===String?String(m.id):m.id;else d.id=o.longs===String?$util.Long.prototype.toString.call(m.id):o.longs===Number?new $util.LongBits(m.id.low>>>0,m.id.high>>>0).toNumber():m.id}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){d.pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_id]:m.pokemon_id}if(m.cp!=null&&m.hasOwnProperty("cp")){d.cp=m.cp}if(m.stamina!=null&&m.hasOwnProperty("stamina")){d.stamina=m.stamina}if(m.stamina_max!=null&&m.hasOwnProperty("stamina_max")){d.stamina_max=m.stamina_max}if(m.move_1!=null&&m.hasOwnProperty("move_1")){d.move_1=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.move_1]:m.move_1}if(m.move_2!=null&&m.hasOwnProperty("move_2")){d.move_2=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.move_2]:m.move_2}if(m.deployed_fort_id!=null&&m.hasOwnProperty("deployed_fort_id")){d.deployed_fort_id=m.deployed_fort_id}if(m.owner_name!=null&&m.hasOwnProperty("owner_name")){d.owner_name=m.owner_name}if(m.is_egg!=null&&m.hasOwnProperty("is_egg")){d.is_egg=m.is_egg}if(m.egg_km_walked_target!=null&&m.hasOwnProperty("egg_km_walked_target")){d.egg_km_walked_target=o.json&&!isFinite(m.egg_km_walked_target)?String(m.egg_km_walked_target):m.egg_km_walked_target}if(m.egg_km_walked_start!=null&&m.hasOwnProperty("egg_km_walked_start")){d.egg_km_walked_start=o.json&&!isFinite(m.egg_km_walked_start)?String(m.egg_km_walked_start):m.egg_km_walked_start}if(m.origin!=null&&m.hasOwnProperty("origin")){d.origin=m.origin}if(m.height_m!=null&&m.hasOwnProperty("height_m")){d.height_m=o.json&&!isFinite(m.height_m)?String(m.height_m):m.height_m}if(m.weight_kg!=null&&m.hasOwnProperty("weight_kg")){d.weight_kg=o.json&&!isFinite(m.weight_kg)?String(m.weight_kg):m.weight_kg}if(m.individual_attack!=null&&m.hasOwnProperty("individual_attack")){d.individual_attack=m.individual_attack}if(m.individual_defense!=null&&m.hasOwnProperty("individual_defense")){d.individual_defense=m.individual_defense}if(m.individual_stamina!=null&&m.hasOwnProperty("individual_stamina")){d.individual_stamina=m.individual_stamina}if(m.cp_multiplier!=null&&m.hasOwnProperty("cp_multiplier")){d.cp_multiplier=o.json&&!isFinite(m.cp_multiplier)?String(m.cp_multiplier):m.cp_multiplier}if(m.pokeball!=null&&m.hasOwnProperty("pokeball")){d.pokeball=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.pokeball]:m.pokeball}if(m.captured_cell_id!=null&&m.hasOwnProperty("captured_cell_id")){if(typeof m.captured_cell_id==="number")d.captured_cell_id=o.longs===String?String(m.captured_cell_id):m.captured_cell_id;else d.captured_cell_id=o.longs===String?$util.Long.prototype.toString.call(m.captured_cell_id):o.longs===Number?new $util.LongBits(m.captured_cell_id.low>>>0,m.captured_cell_id.high>>>0).toNumber(true):m.captured_cell_id}if(m.battles_attacked!=null&&m.hasOwnProperty("battles_attacked")){d.battles_attacked=m.battles_attacked}if(m.battles_defended!=null&&m.hasOwnProperty("battles_defended")){d.battles_defended=m.battles_defended}if(m.egg_incubator_id!=null&&m.hasOwnProperty("egg_incubator_id")){d.egg_incubator_id=m.egg_incubator_id}if(m.creation_time_ms!=null&&m.hasOwnProperty("creation_time_ms")){if(typeof m.creation_time_ms==="number")d.creation_time_ms=o.longs===String?String(m.creation_time_ms):m.creation_time_ms;else d.creation_time_ms=o.longs===String?$util.Long.prototype.toString.call(m.creation_time_ms):o.longs===Number?new $util.LongBits(m.creation_time_ms.low>>>0,m.creation_time_ms.high>>>0).toNumber(true):m.creation_time_ms}if(m.num_upgrades!=null&&m.hasOwnProperty("num_upgrades")){d.num_upgrades=m.num_upgrades}if(m.additional_cp_multiplier!=null&&m.hasOwnProperty("additional_cp_multiplier")){d.additional_cp_multiplier=o.json&&!isFinite(m.additional_cp_multiplier)?String(m.additional_cp_multiplier):m.additional_cp_multiplier}if(m.favorite!=null&&m.hasOwnProperty("favorite")){d.favorite=m.favorite}if(m.nickname!=null&&m.hasOwnProperty("nickname")){d.nickname=m.nickname}if(m.from_fort!=null&&m.hasOwnProperty("from_fort")){d.from_fort=m.from_fort}if(m.buddy_candy_awarded!=null&&m.hasOwnProperty("buddy_candy_awarded")){d.buddy_candy_awarded=m.buddy_candy_awarded}if(m.buddy_total_km_walked!=null&&m.hasOwnProperty("buddy_total_km_walked")){d.buddy_total_km_walked=o.json&&!isFinite(m.buddy_total_km_walked)?String(m.buddy_total_km_walked):m.buddy_total_km_walked}if(m.display_pokemon_id!=null&&m.hasOwnProperty("display_pokemon_id")){d.display_pokemon_id=m.display_pokemon_id}if(m.display_cp!=null&&m.hasOwnProperty("display_cp")){d.display_cp=m.display_cp}if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display")){d.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.toObject(m.pokemon_display,o)}if(m.is_bad!=null&&m.hasOwnProperty("is_bad")){d.is_bad=m.is_bad}if(m.hatched_from_egg!=null&&m.hasOwnProperty("hatched_from_egg")){d.hatched_from_egg=m.hatched_from_egg}if(m.coins_returned!=null&&m.hasOwnProperty("coins_returned")){d.coins_returned=m.coins_returned}if(m.deployed_duration_ms!=null&&m.hasOwnProperty("deployed_duration_ms")){if(typeof m.deployed_duration_ms==="number")d.deployed_duration_ms=o.longs===String?String(m.deployed_duration_ms):m.deployed_duration_ms;else d.deployed_duration_ms=o.longs===String?$util.Long.prototype.toString.call(m.deployed_duration_ms):o.longs===Number?new $util.LongBits(m.deployed_duration_ms.low>>>0,m.deployed_duration_ms.high>>>0).toNumber():m.deployed_duration_ms}if(m.deployed_returned_timestamp_ms!=null&&m.hasOwnProperty("deployed_returned_timestamp_ms")){if(typeof m.deployed_returned_timestamp_ms==="number")d.deployed_returned_timestamp_ms=o.longs===String?String(m.deployed_returned_timestamp_ms):m.deployed_returned_timestamp_ms;else d.deployed_returned_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.deployed_returned_timestamp_ms):o.longs===Number?new $util.LongBits(m.deployed_returned_timestamp_ms.low>>>0,m.deployed_returned_timestamp_ms.high>>>0).toNumber():m.deployed_returned_timestamp_ms}if(m.cp_multiplier_before_trading!=null&&m.hasOwnProperty("cp_multiplier_before_trading")){d.cp_multiplier_before_trading=o.json&&!isFinite(m.cp_multiplier_before_trading)?String(m.cp_multiplier_before_trading):m.cp_multiplier_before_trading}if(m.trading_original_owner_hash!=null&&m.hasOwnProperty("trading_original_owner_hash")){d.trading_original_owner_hash=m.trading_original_owner_hash}if(m.original_owner_nickname!=null&&m.hasOwnProperty("original_owner_nickname")){d.original_owner_nickname=m.original_owner_nickname}if(m.traded_time_ms!=null&&m.hasOwnProperty("traded_time_ms")){if(typeof m.traded_time_ms==="number")d.traded_time_ms=o.longs===String?String(m.traded_time_ms):m.traded_time_ms;else d.traded_time_ms=o.longs===String?$util.Long.prototype.toString.call(m.traded_time_ms):o.longs===Number?new $util.LongBits(m.traded_time_ms.low>>>0,m.traded_time_ms.high>>>0).toNumber():m.traded_time_ms}if(m.is_lucky!=null&&m.hasOwnProperty("is_lucky")){d.is_lucky=m.is_lucky}if(m.move_3!=null&&m.hasOwnProperty("move_3")){d.move_3=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.move_3]:m.move_3}if(m.pvp_combat_stats!=null&&m.hasOwnProperty("pvp_combat_stats")){d.pvp_combat_stats=$root.POGOProtos.Data.Combat.PokemonCombatStats.toObject(m.pvp_combat_stats,o)}if(m.npc_combat_stats!=null&&m.hasOwnProperty("npc_combat_stats")){d.npc_combat_stats=$root.POGOProtos.Data.Combat.PokemonCombatStats.toObject(m.npc_combat_stats,o)}return d};PokemonData.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokemonData}();Data.PokemonDisplay=function(){function PokemonDisplay(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokemonDisplay.prototype.costume=0;PokemonDisplay.prototype.gender=0;PokemonDisplay.prototype.shiny=false;PokemonDisplay.prototype.form=0;PokemonDisplay.prototype.weather_boosted_condition=0;PokemonDisplay.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.costume!=null&&m.hasOwnProperty("costume"))w.uint32(8).int32(m.costume);if(m.gender!=null&&m.hasOwnProperty("gender"))w.uint32(16).int32(m.gender);if(m.shiny!=null&&m.hasOwnProperty("shiny"))w.uint32(24).bool(m.shiny);if(m.form!=null&&m.hasOwnProperty("form"))w.uint32(32).int32(m.form);if(m.weather_boosted_condition!=null&&m.hasOwnProperty("weather_boosted_condition"))w.uint32(40).int32(m.weather_boosted_condition);return w};PokemonDisplay.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.PokemonDisplay;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.costume=r.int32();break;case 2:m.gender=r.int32();break;case 3:m.shiny=r.bool();break;case 4:m.form=r.int32();break;case 5:m.weather_boosted_condition=r.int32();break;default:r.skipType(t&7);break}}return m};PokemonDisplay.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.PokemonDisplay)return d;var m=new $root.POGOProtos.Data.PokemonDisplay;switch(d.costume){case"COSTUME_UNSET":case 0:m.costume=0;break;case"HOLIDAY_2016":case 1:m.costume=1;break;case"ANNIVERSARY":case 2:m.costume=2;break;case"ONE_YEAR_ANNIVERSARY":case 3:m.costume=3;break;case"HALLOWEEN_2017":case 4:m.costume=4;break;case"SUMMER_2018":case 5:m.costume=5;break;case"FALL_2018":case 6:m.costume=6;break;case"NOVEMBER_2018":case 7:m.costume=7;break;case"WINTER_2018":case 8:m.costume=8;break}switch(d.gender){case"GENDER_UNSET":case 0:m.gender=0;break;case"MALE":case 1:m.gender=1;break;case"FEMALE":case 2:m.gender=2;break;case"GENDERLESS":case 3:m.gender=3;break}if(d.shiny!=null){m.shiny=Boolean(d.shiny)}switch(d.form){case"FORM_UNSET":case 0:m.form=0;break;case"UNOWN_A":case 1:m.form=1;break;case"UNOWN_B":case 2:m.form=2;break;case"UNOWN_C":case 3:m.form=3;break;case"UNOWN_D":case 4:m.form=4;break;case"UNOWN_E":case 5:m.form=5;break;case"UNOWN_F":case 6:m.form=6;break;case"UNOWN_G":case 7:m.form=7;break;case"UNOWN_H":case 8:m.form=8;break;case"UNOWN_I":case 9:m.form=9;break;case"UNOWN_J":case 10:m.form=10;break;case"UNOWN_K":case 11:m.form=11;break;case"UNOWN_L":case 12:m.form=12;break;case"UNOWN_M":case 13:m.form=13;break;case"UNOWN_N":case 14:m.form=14;break;case"UNOWN_O":case 15:m.form=15;break;case"UNOWN_P":case 16:m.form=16;break;case"UNOWN_Q":case 17:m.form=17;break;case"UNOWN_R":case 18:m.form=18;break;case"UNOWN_S":case 19:m.form=19;break;case"UNOWN_T":case 20:m.form=20;break;case"UNOWN_U":case 21:m.form=21;break;case"UNOWN_V":case 22:m.form=22;break;case"UNOWN_W":case 23:m.form=23;break;case"UNOWN_X":case 24:m.form=24;break;case"UNOWN_Y":case 25:m.form=25;break;case"UNOWN_Z":case 26:m.form=26;break;case"UNOWN_EXCLAMATION_POINT":case 27:m.form=27;break;case"UNOWN_QUESTION_MARK":case 28:m.form=28;break;case"CASTFORM_NORMAL":case 29:m.form=29;break;case"CASTFORM_SUNNY":case 30:m.form=30;break;case"CASTFORM_RAINY":case 31:m.form=31;break;case"CASTFORM_SNOWY":case 32:m.form=32;break;case"DEOXYS_NORMAL":case 33:m.form=33;break;case"DEOXYS_ATTACK":case 34:m.form=34;break;case"DEOXYS_DEFENSE":case 35:m.form=35;break;case"DEOXYS_SPEED":case 36:m.form=36;break;case"SPINDA_00":case 37:m.form=37;break;case"SPINDA_01":case 38:m.form=38;break;case"SPINDA_02":case 39:m.form=39;break;case"SPINDA_03":case 40:m.form=40;break;case"SPINDA_04":case 41:m.form=41;break;case"SPINDA_05":case 42:m.form=42;break;case"SPINDA_06":case 43:m.form=43;break;case"SPINDA_07":case 44:m.form=44;break;case"RATTATA_NORMAL":case 45:m.form=45;break;case"RATTATA_ALOLA":case 46:m.form=46;break;case"RATICATE_NORMAL":case 47:m.form=47;break;case"RATICATE_ALOLA":case 48:m.form=48;break;case"RAICHU_NORMAL":case 49:m.form=49;break;case"RAICHU_ALOLA":case 50:m.form=50;break;case"SANDSHREW_NORMAL":case 51:m.form=51;break;case"SANDSHREW_ALOLA":case 52:m.form=52;break;case"SANDSLASH_NORMAL":case 53:m.form=53;break;case"SANDSLASH_ALOLA":case 54:m.form=54;break;case"VULPIX_NORMAL":case 55:m.form=55;break;case"VULPIX_ALOLA":case 56:m.form=56;break;case"NINETALES_NORMAL":case 57:m.form=57;break;case"NINETALES_ALOLA":case 58:m.form=58;break;case"DIGLETT_NORMAL":case 59:m.form=59;break;case"DIGLETT_ALOLA":case 60:m.form=60;break;case"DUGTRIO_NORMAL":case 61:m.form=61;break;case"DUGTRIO_ALOLA":case 62:m.form=62;break;case"MEOWTH_NORMAL":case 63:m.form=63;break;case"MEOWTH_ALOLA":case 64:m.form=64;break;case"PERSIAN_NORMAL":case 65:m.form=65;break;case"PERSIAN_ALOLA":case 66:m.form=66;break;case"GEODUDE_NORMAL":case 67:m.form=67;break;case"GEODUDE_ALOLA":case 68:m.form=68;break;case"GRAVELER_NORMAL":case 69:m.form=69;break;case"GRAVELER_ALOLA":case 70:m.form=70;break;case"GOLEM_NORMAL":case 71:m.form=71;break;case"GOLEM_ALOLA":case 72:m.form=72;break;case"GRIMER_NORMAL":case 73:m.form=73;break;case"GRIMER_ALOLA":case 74:m.form=74;break;case"MUK_NORMAL":case 75:m.form=75;break;case"MUK_ALOLA":case 76:m.form=76;break;case"EXEGGUTOR_NORMAL":case 77:m.form=77;break;case"EXEGGUTOR_ALOLA":case 78:m.form=78;break;case"MAROWAK_NORMAL":case 79:m.form=79;break;case"MAROWAK_ALOLA":case 80:m.form=80;break;case"ROTOM_NORMAL":case 81:m.form=81;break;case"ROTOM_FROST":case 82:m.form=82;break;case"ROTOM_FAN":case 83:m.form=83;break;case"ROTOM_MOW":case 84:m.form=84;break;case"ROTOM_WASH":case 85:m.form=85;break;case"ROTOM_HEAT":case 86:m.form=86;break;case"WORMADAM_PLANT":case 87:m.form=87;break;case"WORMADAM_SANDY":case 88:m.form=88;break;case"WORMADAM_TRASH":case 89:m.form=89;break;case"GIRATINA_ALTERED":case 90:m.form=90;break;case"GIRATINA_ORIGIN":case 91:m.form=91;break;case"SHAYMIN_SKY":case 92:m.form=92;break;case"SHAYMIN_LAND":case 93:m.form=93;break;case"CHERRIM_OVERCAST":case 94:m.form=94;break;case"CHERRIM_SUNNY":case 95:m.form=95;break;case"SHELLOS_WEST_SEA":case 96:m.form=96;break;case"SHELLOS_EAST_SEA":case 97:m.form=97;break;case"GASTRODON_WEST_SEA":case 98:m.form=98;break;case"GASTRODON_EAST_SEA":case 99:m.form=99;break;case"ARCEUS_NORMAL":case 100:m.form=100;break;case"ARCEUS_FIGHTING":case 101:m.form=101;break;case"ARCEUS_FLYING":case 102:m.form=102;break;case"ARCEUS_POISON":case 103:m.form=103;break;case"ARCEUS_GROUND":case 104:m.form=104;break;case"ARCEUS_ROCK":case 105:m.form=105;break;case"ARCEUS_BUG":case 106:m.form=106;break;case"ARCEUS_GHOST":case 107:m.form=107;break;case"ARCEUS_STEEL":case 108:m.form=108;break;case"ARCEUS_FIRE":case 109:m.form=109;break;case"ARCEUS_WATER":case 110:m.form=110;break;case"ARCEUS_GRASS":case 111:m.form=111;break;case"ARCEUS_ELECTRIC":case 112:m.form=112;break;case"ARCEUS_PSYCHIC":case 113:m.form=113;break;case"ARCEUS_ICE":case 114:m.form=114;break;case"ARCEUS_DRAGON":case 115:m.form=115;break;case"ARCEUS_DARK":case 116:m.form=116;break;case"ARCEUS_FAIRY":case 117:m.form=117;break;case"BURMY_PLANT":case 118:m.form=118;break;case"BURMY_SANDY":case 119:m.form=119;break;case"BURMY_TRASH":case 120:m.form=120;break}switch(d.weather_boosted_condition){case"NONE":case 0:m.weather_boosted_condition=0;break;case"CLEAR":case 1:m.weather_boosted_condition=1;break;case"RAINY":case 2:m.weather_boosted_condition=2;break;case"PARTLY_CLOUDY":case 3:m.weather_boosted_condition=3;break;case"OVERCAST":case 4:m.weather_boosted_condition=4;break;case"WINDY":case 5:m.weather_boosted_condition=5;break;case"SNOW":case 6:m.weather_boosted_condition=6;break;case"FOG":case 7:m.weather_boosted_condition=7;break}return m};PokemonDisplay.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.costume=o.enums===String?"COSTUME_UNSET":0;d.gender=o.enums===String?"GENDER_UNSET":0;d.shiny=false;d.form=o.enums===String?"FORM_UNSET":0;d.weather_boosted_condition=o.enums===String?"NONE":0}if(m.costume!=null&&m.hasOwnProperty("costume")){d.costume=o.enums===String?$root.POGOProtos.Enums.Costume[m.costume]:m.costume}if(m.gender!=null&&m.hasOwnProperty("gender")){d.gender=o.enums===String?$root.POGOProtos.Enums.Gender[m.gender]:m.gender}if(m.shiny!=null&&m.hasOwnProperty("shiny")){d.shiny=m.shiny}if(m.form!=null&&m.hasOwnProperty("form")){d.form=o.enums===String?$root.POGOProtos.Enums.Form[m.form]:m.form}if(m.weather_boosted_condition!=null&&m.hasOwnProperty("weather_boosted_condition")){d.weather_boosted_condition=o.enums===String?$root.POGOProtos.Enums.WeatherCondition[m.weather_boosted_condition]:m.weather_boosted_condition}return d};PokemonDisplay.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokemonDisplay}();Data.Quests=function(){var Quests={};Quests.AddFriendQuest=function(){function AddFriendQuest(p){this.added_friend_ids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AddFriendQuest.prototype.added_friend_ids=$util.emptyArray;AddFriendQuest.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.added_friend_ids!=null&&m.added_friend_ids.length){for(var i=0;i<m.added_friend_ids.length;++i)w.uint32(10).string(m.added_friend_ids[i])}return w};AddFriendQuest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.AddFriendQuest;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.added_friend_ids&&m.added_friend_ids.length))m.added_friend_ids=[];m.added_friend_ids.push(r.string());break;default:r.skipType(t&7);break}}return m};AddFriendQuest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.AddFriendQuest)return d;var m=new $root.POGOProtos.Data.Quests.AddFriendQuest;if(d.added_friend_ids){if(!Array.isArray(d.added_friend_ids))throw TypeError(".POGOProtos.Data.Quests.AddFriendQuest.added_friend_ids: array expected");m.added_friend_ids=[];for(var i=0;i<d.added_friend_ids.length;++i){m.added_friend_ids[i]=String(d.added_friend_ids[i])}}return m};AddFriendQuest.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.added_friend_ids=[]}if(m.added_friend_ids&&m.added_friend_ids.length){d.added_friend_ids=[];for(var j=0;j<m.added_friend_ids.length;++j){d.added_friend_ids[j]=m.added_friend_ids[j]}}return d};AddFriendQuest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AddFriendQuest}();Quests.CatchPokemonQuest=function(){function CatchPokemonQuest(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CatchPokemonQuest.encode=function encode(m,w){if(!w)w=$Writer.create();return w};CatchPokemonQuest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.CatchPokemonQuest;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};CatchPokemonQuest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.CatchPokemonQuest)return d;return new $root.POGOProtos.Data.Quests.CatchPokemonQuest};CatchPokemonQuest.toObject=function toObject(){return{}};CatchPokemonQuest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CatchPokemonQuest}();Quests.ClientQuest=function(){function ClientQuest(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ClientQuest.prototype.quest=null;ClientQuest.prototype.quest_display=null;ClientQuest.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.quest!=null&&m.hasOwnProperty("quest"))$root.POGOProtos.Data.Quests.Quest.encode(m.quest,w.uint32(10).fork()).ldelim();if(m.quest_display!=null&&m.hasOwnProperty("quest_display"))$root.POGOProtos.Data.Quests.ClientQuest.QuestDisplay.encode(m.quest_display,w.uint32(18).fork()).ldelim();return w};ClientQuest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.ClientQuest;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.quest=$root.POGOProtos.Data.Quests.Quest.decode(r,r.uint32());break;case 2:m.quest_display=$root.POGOProtos.Data.Quests.ClientQuest.QuestDisplay.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};ClientQuest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.ClientQuest)return d;var m=new $root.POGOProtos.Data.Quests.ClientQuest;if(d.quest!=null){if(typeof d.quest!=="object")throw TypeError(".POGOProtos.Data.Quests.ClientQuest.quest: object expected");m.quest=$root.POGOProtos.Data.Quests.Quest.fromObject(d.quest)}if(d.quest_display!=null){if(typeof d.quest_display!=="object")throw TypeError(".POGOProtos.Data.Quests.ClientQuest.quest_display: object expected");m.quest_display=$root.POGOProtos.Data.Quests.ClientQuest.QuestDisplay.fromObject(d.quest_display)}return m};ClientQuest.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.quest=null;d.quest_display=null}if(m.quest!=null&&m.hasOwnProperty("quest")){d.quest=$root.POGOProtos.Data.Quests.Quest.toObject(m.quest,o)}if(m.quest_display!=null&&m.hasOwnProperty("quest_display")){d.quest_display=$root.POGOProtos.Data.Quests.ClientQuest.QuestDisplay.toObject(m.quest_display,o)}return d};ClientQuest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ClientQuest.QuestDisplay=function(){function QuestDisplay(p){this.dialog=[];this.subdisplay=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}QuestDisplay.prototype.quest_id="";QuestDisplay.prototype.dialog=$util.emptyArray;QuestDisplay.prototype.description="";QuestDisplay.prototype.title="";QuestDisplay.prototype.slot=0;QuestDisplay.prototype.subdisplay=$util.emptyArray;QuestDisplay.prototype.story_ending_quest=false;QuestDisplay.prototype.story_ending_description="";QuestDisplay.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.quest_id!=null&&m.hasOwnProperty("quest_id"))w.uint32(10).string(m.quest_id);if(m.dialog!=null&&m.dialog.length){for(var i=0;i<m.dialog.length;++i)$root.POGOProtos.Data.Quests.QuestDialog.encode(m.dialog[i],w.uint32(18).fork()).ldelim()}if(m.description!=null&&m.hasOwnProperty("description"))w.uint32(26).string(m.description);if(m.title!=null&&m.hasOwnProperty("title"))w.uint32(34).string(m.title);if(m.slot!=null&&m.hasOwnProperty("slot"))w.uint32(40).int32(m.slot);if(m.subdisplay!=null&&m.subdisplay.length){for(var i=0;i<m.subdisplay.length;++i)$root.POGOProtos.Data.Quests.ClientQuest.QuestDisplay.encode(m.subdisplay[i],w.uint32(50).fork()).ldelim()}if(m.story_ending_quest!=null&&m.hasOwnProperty("story_ending_quest"))w.uint32(56).bool(m.story_ending_quest);if(m.story_ending_description!=null&&m.hasOwnProperty("story_ending_description"))w.uint32(66).string(m.story_ending_description);return w};QuestDisplay.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.ClientQuest.QuestDisplay;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.quest_id=r.string();break;case 2:if(!(m.dialog&&m.dialog.length))m.dialog=[];m.dialog.push($root.POGOProtos.Data.Quests.QuestDialog.decode(r,r.uint32()));break;case 3:m.description=r.string();break;case 4:m.title=r.string();break;case 5:m.slot=r.int32();break;case 6:if(!(m.subdisplay&&m.subdisplay.length))m.subdisplay=[];m.subdisplay.push($root.POGOProtos.Data.Quests.ClientQuest.QuestDisplay.decode(r,r.uint32()));break;case 7:m.story_ending_quest=r.bool();break;case 8:m.story_ending_description=r.string();break;default:r.skipType(t&7);break}}return m};QuestDisplay.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.ClientQuest.QuestDisplay)return d;var m=new $root.POGOProtos.Data.Quests.ClientQuest.QuestDisplay;if(d.quest_id!=null){m.quest_id=String(d.quest_id)}if(d.dialog){if(!Array.isArray(d.dialog))throw TypeError(".POGOProtos.Data.Quests.ClientQuest.QuestDisplay.dialog: array expected");m.dialog=[];for(var i=0;i<d.dialog.length;++i){if(typeof d.dialog[i]!=="object")throw TypeError(".POGOProtos.Data.Quests.ClientQuest.QuestDisplay.dialog: object expected");m.dialog[i]=$root.POGOProtos.Data.Quests.QuestDialog.fromObject(d.dialog[i])}}if(d.description!=null){m.description=String(d.description)}if(d.title!=null){m.title=String(d.title)}if(d.slot!=null){m.slot=d.slot|0}if(d.subdisplay){if(!Array.isArray(d.subdisplay))throw TypeError(".POGOProtos.Data.Quests.ClientQuest.QuestDisplay.subdisplay: array expected");m.subdisplay=[];for(var i=0;i<d.subdisplay.length;++i){if(typeof d.subdisplay[i]!=="object")throw TypeError(".POGOProtos.Data.Quests.ClientQuest.QuestDisplay.subdisplay: object expected");m.subdisplay[i]=$root.POGOProtos.Data.Quests.ClientQuest.QuestDisplay.fromObject(d.subdisplay[i])}}if(d.story_ending_quest!=null){m.story_ending_quest=Boolean(d.story_ending_quest)}if(d.story_ending_description!=null){m.story_ending_description=String(d.story_ending_description)}return m};QuestDisplay.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.dialog=[];d.subdisplay=[]}if(o.defaults){d.quest_id="";d.description="";d.title="";d.slot=0;d.story_ending_quest=false;d.story_ending_description=""}if(m.quest_id!=null&&m.hasOwnProperty("quest_id")){d.quest_id=m.quest_id}if(m.dialog&&m.dialog.length){d.dialog=[];for(var j=0;j<m.dialog.length;++j){d.dialog[j]=$root.POGOProtos.Data.Quests.QuestDialog.toObject(m.dialog[j],o)}}if(m.description!=null&&m.hasOwnProperty("description")){d.description=m.description}if(m.title!=null&&m.hasOwnProperty("title")){d.title=m.title}if(m.slot!=null&&m.hasOwnProperty("slot")){d.slot=m.slot}if(m.subdisplay&&m.subdisplay.length){d.subdisplay=[];for(var j=0;j<m.subdisplay.length;++j){d.subdisplay[j]=$root.POGOProtos.Data.Quests.ClientQuest.QuestDisplay.toObject(m.subdisplay[j],o)}}if(m.story_ending_quest!=null&&m.hasOwnProperty("story_ending_quest")){d.story_ending_quest=m.story_ending_quest}if(m.story_ending_description!=null&&m.hasOwnProperty("story_ending_description")){d.story_ending_description=m.story_ending_description}return d};QuestDisplay.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return QuestDisplay}();return ClientQuest}();Quests.Quest=function(){function Quest(p){this.quest_rewards=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Quest.prototype.quest_type=0;Quest.prototype.daily_quest=null;Quest.prototype.multi_part=null;Quest.prototype.catch_pokemon=null;Quest.prototype.add_friend=null;Quest.prototype.trade_pokemon=null;Quest.prototype.quest_id="";Quest.prototype.quest_seed=$util.Long?$util.Long.fromBits(0,0,false):0;Quest.prototype.quest_context=0;Quest.prototype.template_id="";Quest.prototype.progress=0;Quest.prototype.goal=null;Quest.prototype.status=0;Quest.prototype.quest_rewards=$util.emptyArray;Quest.prototype.creation_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Quest.prototype.last_update_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Quest.prototype.compeletion_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Quest.prototype.fort_id="";Quest.prototype.admin_generated=false;Quest.prototype.stamp_count_override_enabled=false;Quest.prototype.stamp_count_override=0;Quest.prototype.s2_cell_id=$util.Long?$util.Long.fromBits(0,0,false):0;Quest.prototype.story_quest_template_version=0;Quest.prototype.daily_counter=null;Quest.prototype.reward_pokemon_icon_url="";var $oneOfFields;Object.defineProperty(Quest.prototype,"Quest",{get:$util.oneOfGetter($oneOfFields=["daily_quest","multi_part","catch_pokemon","add_friend","trade_pokemon"]),set:$util.oneOfSetter($oneOfFields)});Quest.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.quest_type!=null&&m.hasOwnProperty("quest_type"))w.uint32(8).int32(m.quest_type);if(m.daily_quest!=null&&m.hasOwnProperty("daily_quest"))$root.POGOProtos.Data.Quests.Quest.DailyQuest.encode(m.daily_quest,w.uint32(18).fork()).ldelim();if(m.multi_part!=null&&m.hasOwnProperty("multi_part"))$root.POGOProtos.Data.Quests.Quest.MultiPartQuest.encode(m.multi_part,w.uint32(26).fork()).ldelim();if(m.catch_pokemon!=null&&m.hasOwnProperty("catch_pokemon"))$root.POGOProtos.Data.Quests.CatchPokemonQuest.encode(m.catch_pokemon,w.uint32(34).fork()).ldelim();if(m.add_friend!=null&&m.hasOwnProperty("add_friend"))$root.POGOProtos.Data.Quests.AddFriendQuest.encode(m.add_friend,w.uint32(42).fork()).ldelim();if(m.trade_pokemon!=null&&m.hasOwnProperty("trade_pokemon"))$root.POGOProtos.Data.Quests.TradePokemonQuest.encode(m.trade_pokemon,w.uint32(50).fork()).ldelim();if(m.quest_id!=null&&m.hasOwnProperty("quest_id"))w.uint32(802).string(m.quest_id);if(m.quest_seed!=null&&m.hasOwnProperty("quest_seed"))w.uint32(808).int64(m.quest_seed);if(m.quest_context!=null&&m.hasOwnProperty("quest_context"))w.uint32(816).int32(m.quest_context);if(m.template_id!=null&&m.hasOwnProperty("template_id"))w.uint32(826).string(m.template_id);if(m.progress!=null&&m.hasOwnProperty("progress"))w.uint32(832).int32(m.progress);if(m.goal!=null&&m.hasOwnProperty("goal"))$root.POGOProtos.Data.Quests.QuestGoal.encode(m.goal,w.uint32(842).fork()).ldelim();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(848).int32(m.status);if(m.quest_rewards!=null&&m.quest_rewards.length){for(var i=0;i<m.quest_rewards.length;++i)$root.POGOProtos.Data.Quests.QuestReward.encode(m.quest_rewards[i],w.uint32(858).fork()).ldelim()}if(m.creation_timestamp_ms!=null&&m.hasOwnProperty("creation_timestamp_ms"))w.uint32(864).int64(m.creation_timestamp_ms);if(m.last_update_timestamp_ms!=null&&m.hasOwnProperty("last_update_timestamp_ms"))w.uint32(872).int64(m.last_update_timestamp_ms);if(m.compeletion_timestamp_ms!=null&&m.hasOwnProperty("compeletion_timestamp_ms"))w.uint32(880).int64(m.compeletion_timestamp_ms);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(890).string(m.fort_id);if(m.admin_generated!=null&&m.hasOwnProperty("admin_generated"))w.uint32(896).bool(m.admin_generated);if(m.stamp_count_override_enabled!=null&&m.hasOwnProperty("stamp_count_override_enabled"))w.uint32(904).bool(m.stamp_count_override_enabled);if(m.stamp_count_override!=null&&m.hasOwnProperty("stamp_count_override"))w.uint32(912).int32(m.stamp_count_override);if(m.s2_cell_id!=null&&m.hasOwnProperty("s2_cell_id"))w.uint32(920).int64(m.s2_cell_id);if(m.story_quest_template_version!=null&&m.hasOwnProperty("story_quest_template_version"))w.uint32(928).int32(m.story_quest_template_version);if(m.daily_counter!=null&&m.hasOwnProperty("daily_counter"))$root.POGOProtos.Data.Quests.Quest.DailyCounter.encode(m.daily_counter,w.uint32(938).fork()).ldelim();if(m.reward_pokemon_icon_url!=null&&m.hasOwnProperty("reward_pokemon_icon_url"))w.uint32(946).string(m.reward_pokemon_icon_url);return w};Quest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.Quest;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.quest_type=r.int32();break;case 2:m.daily_quest=$root.POGOProtos.Data.Quests.Quest.DailyQuest.decode(r,r.uint32());break;case 3:m.multi_part=$root.POGOProtos.Data.Quests.Quest.MultiPartQuest.decode(r,r.uint32());break;case 4:m.catch_pokemon=$root.POGOProtos.Data.Quests.CatchPokemonQuest.decode(r,r.uint32());break;case 5:m.add_friend=$root.POGOProtos.Data.Quests.AddFriendQuest.decode(r,r.uint32());break;case 6:m.trade_pokemon=$root.POGOProtos.Data.Quests.TradePokemonQuest.decode(r,r.uint32());break;case 100:m.quest_id=r.string();break;case 101:m.quest_seed=r.int64();break;case 102:m.quest_context=r.int32();break;case 103:m.template_id=r.string();break;case 104:m.progress=r.int32();break;case 105:m.goal=$root.POGOProtos.Data.Quests.QuestGoal.decode(r,r.uint32());break;case 106:m.status=r.int32();break;case 107:if(!(m.quest_rewards&&m.quest_rewards.length))m.quest_rewards=[];m.quest_rewards.push($root.POGOProtos.Data.Quests.QuestReward.decode(r,r.uint32()));break;case 108:m.creation_timestamp_ms=r.int64();break;case 109:m.last_update_timestamp_ms=r.int64();break;case 110:m.compeletion_timestamp_ms=r.int64();break;case 111:m.fort_id=r.string();break;case 112:m.admin_generated=r.bool();break;case 113:m.stamp_count_override_enabled=r.bool();break;case 114:m.stamp_count_override=r.int32();break;case 115:m.s2_cell_id=r.int64();break;case 116:m.story_quest_template_version=r.int32();break;case 117:m.daily_counter=$root.POGOProtos.Data.Quests.Quest.DailyCounter.decode(r,r.uint32());break;case 118:m.reward_pokemon_icon_url=r.string();break;default:r.skipType(t&7);break}}return m};Quest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.Quest)return d;var m=new $root.POGOProtos.Data.Quests.Quest;switch(d.quest_type){case"QUEST_UNKNOWN_TYPE":case 0:m.quest_type=0;break;case"QUEST_FIRST_CATCH_OF_THE_DAY":case 1:m.quest_type=1;break;case"QUEST_FIRST_POKESTOP_OF_THE_DAY":case 2:m.quest_type=2;break;case"QUEST_MULTI_PART":case 3:m.quest_type=3;break;case"QUEST_CATCH_POKEMON":case 4:m.quest_type=4;break;case"QUEST_SPIN_POKESTOP":case 5:m.quest_type=5;break;case"QUEST_HATCH_EGG":case 6:m.quest_type=6;break;case"QUEST_COMPLETE_GYM_BATTLE":case 7:m.quest_type=7;break;case"QUEST_COMPLETE_RAID_BATTLE":case 8:m.quest_type=8;break;case"QUEST_COMPLETE_QUEST":case 9:m.quest_type=9;break;case"QUEST_TRANSFER_POKEMON":case 10:m.quest_type=10;break;case"QUEST_FAVORITE_POKEMON":case 11:m.quest_type=11;break;case"QUEST_AUTOCOMPLETE":case 12:m.quest_type=12;break;case"QUEST_USE_BERRY_IN_ENCOUNTER":case 13:m.quest_type=13;break;case"QUEST_UPGRADE_POKEMON":case 14:m.quest_type=14;break;case"QUEST_EVOLVE_POKEMON":case 15:m.quest_type=15;break;case"QUEST_LAND_THROW":case 16:m.quest_type=16;break;case"QUEST_GET_BUDDY_CANDY":case 17:m.quest_type=17;break;case"QUEST_BADGE_RANK":case 18:m.quest_type=18;break;case"QUEST_PLAYER_LEVEL":case 19:m.quest_type=19;break;case"QUEST_JOIN_RAID":case 20:m.quest_type=20;break;case"QUEST_COMPLETE_BATTLE":case 21:m.quest_type=21;break;case"QUEST_ADD_FRIEND":case 22:m.quest_type=22;break;case"QUEST_TRADE_POKEMON":case 23:m.quest_type=23;break;case"QUEST_SEND_GIFT":case 24:m.quest_type=24;break;case"QUEST_EVOLVE_INTO_POKEMON":case 25:m.quest_type=25;break}if(d.daily_quest!=null){if(typeof d.daily_quest!=="object")throw TypeError(".POGOProtos.Data.Quests.Quest.daily_quest: object expected");m.daily_quest=$root.POGOProtos.Data.Quests.Quest.DailyQuest.fromObject(d.daily_quest)}if(d.multi_part!=null){if(typeof d.multi_part!=="object")throw TypeError(".POGOProtos.Data.Quests.Quest.multi_part: object expected");m.multi_part=$root.POGOProtos.Data.Quests.Quest.MultiPartQuest.fromObject(d.multi_part)}if(d.catch_pokemon!=null){if(typeof d.catch_pokemon!=="object")throw TypeError(".POGOProtos.Data.Quests.Quest.catch_pokemon: object expected");m.catch_pokemon=$root.POGOProtos.Data.Quests.CatchPokemonQuest.fromObject(d.catch_pokemon)}if(d.add_friend!=null){if(typeof d.add_friend!=="object")throw TypeError(".POGOProtos.Data.Quests.Quest.add_friend: object expected");m.add_friend=$root.POGOProtos.Data.Quests.AddFriendQuest.fromObject(d.add_friend)}if(d.trade_pokemon!=null){if(typeof d.trade_pokemon!=="object")throw TypeError(".POGOProtos.Data.Quests.Quest.trade_pokemon: object expected");m.trade_pokemon=$root.POGOProtos.Data.Quests.TradePokemonQuest.fromObject(d.trade_pokemon)}if(d.quest_id!=null){m.quest_id=String(d.quest_id)}if(d.quest_seed!=null){if($util.Long)(m.quest_seed=$util.Long.fromValue(d.quest_seed)).unsigned=false;else if(typeof d.quest_seed==="string")m.quest_seed=parseInt(d.quest_seed,10);else if(typeof d.quest_seed==="number")m.quest_seed=d.quest_seed;else if(typeof d.quest_seed==="object")m.quest_seed=new $util.LongBits(d.quest_seed.low>>>0,d.quest_seed.high>>>0).toNumber()}switch(d.quest_context){case"UNSET":case 0:m.quest_context=0;break;case"STORY_QUEST":case 1:m.quest_context=1;break;case"CHALLENGE_QUEST":case 2:m.quest_context=2;break}if(d.template_id!=null){m.template_id=String(d.template_id)}if(d.progress!=null){m.progress=d.progress|0}if(d.goal!=null){if(typeof d.goal!=="object")throw TypeError(".POGOProtos.Data.Quests.Quest.goal: object expected");m.goal=$root.POGOProtos.Data.Quests.QuestGoal.fromObject(d.goal)}switch(d.status){case"STATUS_UNDEFINED":case 0:m.status=0;break;case"STATUS_ACTIVE":case 1:m.status=1;break;case"STATUS_COMPLETED":case 2:m.status=2;break}if(d.quest_rewards){if(!Array.isArray(d.quest_rewards))throw TypeError(".POGOProtos.Data.Quests.Quest.quest_rewards: array expected");m.quest_rewards=[];for(var i=0;i<d.quest_rewards.length;++i){if(typeof d.quest_rewards[i]!=="object")throw TypeError(".POGOProtos.Data.Quests.Quest.quest_rewards: object expected");m.quest_rewards[i]=$root.POGOProtos.Data.Quests.QuestReward.fromObject(d.quest_rewards[i])}}if(d.creation_timestamp_ms!=null){if($util.Long)(m.creation_timestamp_ms=$util.Long.fromValue(d.creation_timestamp_ms)).unsigned=false;else if(typeof d.creation_timestamp_ms==="string")m.creation_timestamp_ms=parseInt(d.creation_timestamp_ms,10);else if(typeof d.creation_timestamp_ms==="number")m.creation_timestamp_ms=d.creation_timestamp_ms;else if(typeof d.creation_timestamp_ms==="object")m.creation_timestamp_ms=new $util.LongBits(d.creation_timestamp_ms.low>>>0,d.creation_timestamp_ms.high>>>0).toNumber()}if(d.last_update_timestamp_ms!=null){if($util.Long)(m.last_update_timestamp_ms=$util.Long.fromValue(d.last_update_timestamp_ms)).unsigned=false;else if(typeof d.last_update_timestamp_ms==="string")m.last_update_timestamp_ms=parseInt(d.last_update_timestamp_ms,10);else if(typeof d.last_update_timestamp_ms==="number")m.last_update_timestamp_ms=d.last_update_timestamp_ms;else if(typeof d.last_update_timestamp_ms==="object")m.last_update_timestamp_ms=new $util.LongBits(d.last_update_timestamp_ms.low>>>0,d.last_update_timestamp_ms.high>>>0).toNumber()}if(d.compeletion_timestamp_ms!=null){if($util.Long)(m.compeletion_timestamp_ms=$util.Long.fromValue(d.compeletion_timestamp_ms)).unsigned=false;else if(typeof d.compeletion_timestamp_ms==="string")m.compeletion_timestamp_ms=parseInt(d.compeletion_timestamp_ms,10);else if(typeof d.compeletion_timestamp_ms==="number")m.compeletion_timestamp_ms=d.compeletion_timestamp_ms;else if(typeof d.compeletion_timestamp_ms==="object")m.compeletion_timestamp_ms=new $util.LongBits(d.compeletion_timestamp_ms.low>>>0,d.compeletion_timestamp_ms.high>>>0).toNumber()}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.admin_generated!=null){m.admin_generated=Boolean(d.admin_generated)}if(d.stamp_count_override_enabled!=null){m.stamp_count_override_enabled=Boolean(d.stamp_count_override_enabled)}if(d.stamp_count_override!=null){m.stamp_count_override=d.stamp_count_override|0}if(d.s2_cell_id!=null){if($util.Long)(m.s2_cell_id=$util.Long.fromValue(d.s2_cell_id)).unsigned=false;else if(typeof d.s2_cell_id==="string")m.s2_cell_id=parseInt(d.s2_cell_id,10);else if(typeof d.s2_cell_id==="number")m.s2_cell_id=d.s2_cell_id;else if(typeof d.s2_cell_id==="object")m.s2_cell_id=new $util.LongBits(d.s2_cell_id.low>>>0,d.s2_cell_id.high>>>0).toNumber()}if(d.story_quest_template_version!=null){m.story_quest_template_version=d.story_quest_template_version|0}if(d.daily_counter!=null){if(typeof d.daily_counter!=="object")throw TypeError(".POGOProtos.Data.Quests.Quest.daily_counter: object expected");m.daily_counter=$root.POGOProtos.Data.Quests.Quest.DailyCounter.fromObject(d.daily_counter)}if(d.reward_pokemon_icon_url!=null){m.reward_pokemon_icon_url=String(d.reward_pokemon_icon_url)}return m};Quest.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.quest_rewards=[]}if(o.defaults){d.quest_type=o.enums===String?"QUEST_UNKNOWN_TYPE":0;d.quest_id="";if($util.Long){var n=new $util.Long(0,0,false);d.quest_seed=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.quest_seed=o.longs===String?"0":0;d.quest_context=o.enums===String?"UNSET":0;d.template_id="";d.progress=0;d.goal=null;d.status=o.enums===String?"STATUS_UNDEFINED":0;if($util.Long){var n=new $util.Long(0,0,false);d.creation_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.creation_timestamp_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.last_update_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.last_update_timestamp_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.compeletion_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.compeletion_timestamp_ms=o.longs===String?"0":0;d.fort_id="";d.admin_generated=false;d.stamp_count_override_enabled=false;d.stamp_count_override=0;if($util.Long){var n=new $util.Long(0,0,false);d.s2_cell_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.s2_cell_id=o.longs===String?"0":0;d.story_quest_template_version=0;d.daily_counter=null;d.reward_pokemon_icon_url=""}if(m.quest_type!=null&&m.hasOwnProperty("quest_type")){d.quest_type=o.enums===String?$root.POGOProtos.Enums.QuestType[m.quest_type]:m.quest_type}if(m.daily_quest!=null&&m.hasOwnProperty("daily_quest")){d.daily_quest=$root.POGOProtos.Data.Quests.Quest.DailyQuest.toObject(m.daily_quest,o);if(o.oneofs)d.Quest="daily_quest"}if(m.multi_part!=null&&m.hasOwnProperty("multi_part")){d.multi_part=$root.POGOProtos.Data.Quests.Quest.MultiPartQuest.toObject(m.multi_part,o);if(o.oneofs)d.Quest="multi_part"}if(m.catch_pokemon!=null&&m.hasOwnProperty("catch_pokemon")){d.catch_pokemon=$root.POGOProtos.Data.Quests.CatchPokemonQuest.toObject(m.catch_pokemon,o);if(o.oneofs)d.Quest="catch_pokemon"}if(m.add_friend!=null&&m.hasOwnProperty("add_friend")){d.add_friend=$root.POGOProtos.Data.Quests.AddFriendQuest.toObject(m.add_friend,o);if(o.oneofs)d.Quest="add_friend"}if(m.trade_pokemon!=null&&m.hasOwnProperty("trade_pokemon")){d.trade_pokemon=$root.POGOProtos.Data.Quests.TradePokemonQuest.toObject(m.trade_pokemon,o);if(o.oneofs)d.Quest="trade_pokemon"}if(m.quest_id!=null&&m.hasOwnProperty("quest_id")){d.quest_id=m.quest_id}if(m.quest_seed!=null&&m.hasOwnProperty("quest_seed")){if(typeof m.quest_seed==="number")d.quest_seed=o.longs===String?String(m.quest_seed):m.quest_seed;else d.quest_seed=o.longs===String?$util.Long.prototype.toString.call(m.quest_seed):o.longs===Number?new $util.LongBits(m.quest_seed.low>>>0,m.quest_seed.high>>>0).toNumber():m.quest_seed}if(m.quest_context!=null&&m.hasOwnProperty("quest_context")){d.quest_context=o.enums===String?$root.POGOProtos.Data.Quests.Quest.Context[m.quest_context]:m.quest_context}if(m.template_id!=null&&m.hasOwnProperty("template_id")){d.template_id=m.template_id}if(m.progress!=null&&m.hasOwnProperty("progress")){d.progress=m.progress}if(m.goal!=null&&m.hasOwnProperty("goal")){d.goal=$root.POGOProtos.Data.Quests.QuestGoal.toObject(m.goal,o)}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Data.Quests.Quest.Status[m.status]:m.status}if(m.quest_rewards&&m.quest_rewards.length){d.quest_rewards=[];for(var j=0;j<m.quest_rewards.length;++j){d.quest_rewards[j]=$root.POGOProtos.Data.Quests.QuestReward.toObject(m.quest_rewards[j],o)}}if(m.creation_timestamp_ms!=null&&m.hasOwnProperty("creation_timestamp_ms")){if(typeof m.creation_timestamp_ms==="number")d.creation_timestamp_ms=o.longs===String?String(m.creation_timestamp_ms):m.creation_timestamp_ms;else d.creation_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.creation_timestamp_ms):o.longs===Number?new $util.LongBits(m.creation_timestamp_ms.low>>>0,m.creation_timestamp_ms.high>>>0).toNumber():m.creation_timestamp_ms}if(m.last_update_timestamp_ms!=null&&m.hasOwnProperty("last_update_timestamp_ms")){if(typeof m.last_update_timestamp_ms==="number")d.last_update_timestamp_ms=o.longs===String?String(m.last_update_timestamp_ms):m.last_update_timestamp_ms;else d.last_update_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.last_update_timestamp_ms):o.longs===Number?new $util.LongBits(m.last_update_timestamp_ms.low>>>0,m.last_update_timestamp_ms.high>>>0).toNumber():m.last_update_timestamp_ms}if(m.compeletion_timestamp_ms!=null&&m.hasOwnProperty("compeletion_timestamp_ms")){if(typeof m.compeletion_timestamp_ms==="number")d.compeletion_timestamp_ms=o.longs===String?String(m.compeletion_timestamp_ms):m.compeletion_timestamp_ms;else d.compeletion_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.compeletion_timestamp_ms):o.longs===Number?new $util.LongBits(m.compeletion_timestamp_ms.low>>>0,m.compeletion_timestamp_ms.high>>>0).toNumber():m.compeletion_timestamp_ms}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.admin_generated!=null&&m.hasOwnProperty("admin_generated")){d.admin_generated=m.admin_generated}if(m.stamp_count_override_enabled!=null&&m.hasOwnProperty("stamp_count_override_enabled")){d.stamp_count_override_enabled=m.stamp_count_override_enabled}if(m.stamp_count_override!=null&&m.hasOwnProperty("stamp_count_override")){d.stamp_count_override=m.stamp_count_override}if(m.s2_cell_id!=null&&m.hasOwnProperty("s2_cell_id")){if(typeof m.s2_cell_id==="number")d.s2_cell_id=o.longs===String?String(m.s2_cell_id):m.s2_cell_id;else d.s2_cell_id=o.longs===String?$util.Long.prototype.toString.call(m.s2_cell_id):o.longs===Number?new $util.LongBits(m.s2_cell_id.low>>>0,m.s2_cell_id.high>>>0).toNumber():m.s2_cell_id}if(m.story_quest_template_version!=null&&m.hasOwnProperty("story_quest_template_version")){d.story_quest_template_version=m.story_quest_template_version}if(m.daily_counter!=null&&m.hasOwnProperty("daily_counter")){d.daily_counter=$root.POGOProtos.Data.Quests.Quest.DailyCounter.toObject(m.daily_counter,o)}if(m.reward_pokemon_icon_url!=null&&m.hasOwnProperty("reward_pokemon_icon_url")){d.reward_pokemon_icon_url=m.reward_pokemon_icon_url}return d};Quest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Quest.MultiPartQuest=function(){function MultiPartQuest(p){this.sub_quests=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}MultiPartQuest.prototype.sub_quests=$util.emptyArray;MultiPartQuest.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.sub_quests!=null&&m.sub_quests.length){for(var i=0;i<m.sub_quests.length;++i)$root.POGOProtos.Data.Quests.Quest.encode(m.sub_quests[i],w.uint32(10).fork()).ldelim()}return w};MultiPartQuest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.Quest.MultiPartQuest;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.sub_quests&&m.sub_quests.length))m.sub_quests=[];m.sub_quests.push($root.POGOProtos.Data.Quests.Quest.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};MultiPartQuest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.Quest.MultiPartQuest)return d;var m=new $root.POGOProtos.Data.Quests.Quest.MultiPartQuest;if(d.sub_quests){if(!Array.isArray(d.sub_quests))throw TypeError(".POGOProtos.Data.Quests.Quest.MultiPartQuest.sub_quests: array expected");m.sub_quests=[];for(var i=0;i<d.sub_quests.length;++i){if(typeof d.sub_quests[i]!=="object")throw TypeError(".POGOProtos.Data.Quests.Quest.MultiPartQuest.sub_quests: object expected");m.sub_quests[i]=$root.POGOProtos.Data.Quests.Quest.fromObject(d.sub_quests[i])}}return m};MultiPartQuest.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.sub_quests=[]}if(m.sub_quests&&m.sub_quests.length){d.sub_quests=[];for(var j=0;j<m.sub_quests.length;++j){d.sub_quests[j]=$root.POGOProtos.Data.Quests.Quest.toObject(m.sub_quests[j],o)}}return d};MultiPartQuest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return MultiPartQuest}();Quest.DailyQuest=function(){function DailyQuest(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DailyQuest.prototype.current_period_bucket=0;DailyQuest.prototype.current_streak_count=0;DailyQuest.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.current_period_bucket!=null&&m.hasOwnProperty("current_period_bucket"))w.uint32(8).int32(m.current_period_bucket);if(m.current_streak_count!=null&&m.hasOwnProperty("current_streak_count"))w.uint32(16).int32(m.current_streak_count);return w};DailyQuest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.Quest.DailyQuest;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.current_period_bucket=r.int32();break;case 2:m.current_streak_count=r.int32();break;default:r.skipType(t&7);break}}return m};DailyQuest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.Quest.DailyQuest)return d;var m=new $root.POGOProtos.Data.Quests.Quest.DailyQuest;if(d.current_period_bucket!=null){m.current_period_bucket=d.current_period_bucket|0}if(d.current_streak_count!=null){m.current_streak_count=d.current_streak_count|0}return m};DailyQuest.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.current_period_bucket=0;d.current_streak_count=0}if(m.current_period_bucket!=null&&m.hasOwnProperty("current_period_bucket")){d.current_period_bucket=m.current_period_bucket}if(m.current_streak_count!=null&&m.hasOwnProperty("current_streak_count")){d.current_streak_count=m.current_streak_count}return d};DailyQuest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DailyQuest}();Quest.DailyCounter=function(){function DailyCounter(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DailyCounter.prototype.window=$util.Long?$util.Long.fromBits(0,0,false):0;DailyCounter.prototype.count=0;DailyCounter.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.window!=null&&m.hasOwnProperty("window"))w.uint32(8).int64(m.window);if(m.count!=null&&m.hasOwnProperty("count"))w.uint32(16).int32(m.count);return w};DailyCounter.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.Quest.DailyCounter;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.window=r.int64();break;case 2:m.count=r.int32();break;default:r.skipType(t&7);break}}return m};DailyCounter.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.Quest.DailyCounter)return d;var m=new $root.POGOProtos.Data.Quests.Quest.DailyCounter;if(d.window!=null){if($util.Long)(m.window=$util.Long.fromValue(d.window)).unsigned=false;else if(typeof d.window==="string")m.window=parseInt(d.window,10);else if(typeof d.window==="number")m.window=d.window;else if(typeof d.window==="object")m.window=new $util.LongBits(d.window.low>>>0,d.window.high>>>0).toNumber()}if(d.count!=null){m.count=d.count|0}return m};DailyCounter.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.window=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.window=o.longs===String?"0":0;d.count=0}if(m.window!=null&&m.hasOwnProperty("window")){if(typeof m.window==="number")d.window=o.longs===String?String(m.window):m.window;else d.window=o.longs===String?$util.Long.prototype.toString.call(m.window):o.longs===Number?new $util.LongBits(m.window.low>>>0,m.window.high>>>0).toNumber():m.window}if(m.count!=null&&m.hasOwnProperty("count")){d.count=m.count}return d};DailyCounter.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DailyCounter}();Quest.Context=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="STORY_QUEST"]=1;values[valuesById[2]="CHALLENGE_QUEST"]=2;return values}();Quest.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="STATUS_UNDEFINED"]=0;values[valuesById[1]="STATUS_ACTIVE"]=1;values[valuesById[2]="STATUS_COMPLETED"]=2;return values}();return Quest}();Quests.QuestCondition=function(){function QuestCondition(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}QuestCondition.prototype.type=0;QuestCondition.prototype.with_pokemon_type=null;QuestCondition.prototype.with_pokemon_category=null;QuestCondition.prototype.with_weather_boost=null;QuestCondition.prototype.with_daily_capture_bonus=null;QuestCondition.prototype.with_daily_spin_bonus=null;QuestCondition.prototype.with_win_raid_status=null;QuestCondition.prototype.with_raid_level=null;QuestCondition.prototype.with_throw_type=null;QuestCondition.prototype.with_win_gym_battle_status=null;QuestCondition.prototype.with_super_effective_charge_move=null;QuestCondition.prototype.with_item=null;QuestCondition.prototype.with_unique_pokestop=null;QuestCondition.prototype.with_quest_context=null;QuestCondition.prototype.with_badge_type=null;QuestCondition.prototype.with_player_level=null;QuestCondition.prototype.with_win_battle_status=null;var $oneOfFields;Object.defineProperty(QuestCondition.prototype,"Condition",{get:$util.oneOfGetter($oneOfFields=["with_pokemon_type","with_pokemon_category","with_weather_boost","with_daily_capture_bonus","with_daily_spin_bonus","with_win_raid_status","with_raid_level","with_throw_type","with_win_gym_battle_status","with_super_effective_charge_move","with_item","with_unique_pokestop","with_quest_context","with_badge_type","with_player_level","with_win_battle_status"]),set:$util.oneOfSetter($oneOfFields)});QuestCondition.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(8).int32(m.type);if(m.with_pokemon_type!=null&&m.hasOwnProperty("with_pokemon_type"))$root.POGOProtos.Data.Quests.QuestCondition.WithPokemonType.encode(m.with_pokemon_type,w.uint32(18).fork()).ldelim();if(m.with_pokemon_category!=null&&m.hasOwnProperty("with_pokemon_category"))$root.POGOProtos.Data.Quests.QuestCondition.WithPokemonCategory.encode(m.with_pokemon_category,w.uint32(26).fork()).ldelim();if(m.with_weather_boost!=null&&m.hasOwnProperty("with_weather_boost"))$root.POGOProtos.Data.Quests.QuestCondition.WithWeatherBoost.encode(m.with_weather_boost,w.uint32(34).fork()).ldelim();if(m.with_daily_capture_bonus!=null&&m.hasOwnProperty("with_daily_capture_bonus"))$root.POGOProtos.Data.Quests.QuestCondition.WithDailyCaptureBonus.encode(m.with_daily_capture_bonus,w.uint32(42).fork()).ldelim();if(m.with_daily_spin_bonus!=null&&m.hasOwnProperty("with_daily_spin_bonus"))$root.POGOProtos.Data.Quests.QuestCondition.WithDailySpinBonus.encode(m.with_daily_spin_bonus,w.uint32(50).fork()).ldelim();if(m.with_win_raid_status!=null&&m.hasOwnProperty("with_win_raid_status"))$root.POGOProtos.Data.Quests.QuestCondition.WithWinRaidStatus.encode(m.with_win_raid_status,w.uint32(58).fork()).ldelim();if(m.with_raid_level!=null&&m.hasOwnProperty("with_raid_level"))$root.POGOProtos.Data.Quests.QuestCondition.WithRaidLevel.encode(m.with_raid_level,w.uint32(66).fork()).ldelim();if(m.with_throw_type!=null&&m.hasOwnProperty("with_throw_type"))$root.POGOProtos.Data.Quests.QuestCondition.WithThrowType.encode(m.with_throw_type,w.uint32(74).fork()).ldelim();if(m.with_win_gym_battle_status!=null&&m.hasOwnProperty("with_win_gym_battle_status"))$root.POGOProtos.Data.Quests.QuestCondition.WithWinGymBattleStatus.encode(m.with_win_gym_battle_status,w.uint32(82).fork()).ldelim();if(m.with_super_effective_charge_move!=null&&m.hasOwnProperty("with_super_effective_charge_move"))$root.POGOProtos.Data.Quests.QuestCondition.WithSuperEffectiveChargeMove.encode(m.with_super_effective_charge_move,w.uint32(90).fork()).ldelim();if(m.with_item!=null&&m.hasOwnProperty("with_item"))$root.POGOProtos.Data.Quests.QuestCondition.WithItem.encode(m.with_item,w.uint32(98).fork()).ldelim();if(m.with_unique_pokestop!=null&&m.hasOwnProperty("with_unique_pokestop"))$root.POGOProtos.Data.Quests.QuestCondition.WithUniquePokestop.encode(m.with_unique_pokestop,w.uint32(106).fork()).ldelim();if(m.with_quest_context!=null&&m.hasOwnProperty("with_quest_context"))$root.POGOProtos.Data.Quests.QuestCondition.WithQuestContext.encode(m.with_quest_context,w.uint32(114).fork()).ldelim();if(m.with_badge_type!=null&&m.hasOwnProperty("with_badge_type"))$root.POGOProtos.Data.Quests.QuestCondition.WithBadgeType.encode(m.with_badge_type,w.uint32(122).fork()).ldelim();if(m.with_player_level!=null&&m.hasOwnProperty("with_player_level"))$root.POGOProtos.Data.Quests.QuestCondition.WithPlayerLevel.encode(m.with_player_level,w.uint32(130).fork()).ldelim();if(m.with_win_battle_status!=null&&m.hasOwnProperty("with_win_battle_status"))$root.POGOProtos.Data.Quests.QuestCondition.WithWinBattleStatus.encode(m.with_win_battle_status,w.uint32(138).fork()).ldelim();return w};QuestCondition.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.type=r.int32();break;case 2:m.with_pokemon_type=$root.POGOProtos.Data.Quests.QuestCondition.WithPokemonType.decode(r,r.uint32());break;case 3:m.with_pokemon_category=$root.POGOProtos.Data.Quests.QuestCondition.WithPokemonCategory.decode(r,r.uint32());break;case 4:m.with_weather_boost=$root.POGOProtos.Data.Quests.QuestCondition.WithWeatherBoost.decode(r,r.uint32());break;case 5:m.with_daily_capture_bonus=$root.POGOProtos.Data.Quests.QuestCondition.WithDailyCaptureBonus.decode(r,r.uint32());break;case 6:m.with_daily_spin_bonus=$root.POGOProtos.Data.Quests.QuestCondition.WithDailySpinBonus.decode(r,r.uint32());break;case 7:m.with_win_raid_status=$root.POGOProtos.Data.Quests.QuestCondition.WithWinRaidStatus.decode(r,r.uint32());break;case 8:m.with_raid_level=$root.POGOProtos.Data.Quests.QuestCondition.WithRaidLevel.decode(r,r.uint32());break;case 9:m.with_throw_type=$root.POGOProtos.Data.Quests.QuestCondition.WithThrowType.decode(r,r.uint32());break;case 10:m.with_win_gym_battle_status=$root.POGOProtos.Data.Quests.QuestCondition.WithWinGymBattleStatus.decode(r,r.uint32());break;case 11:m.with_super_effective_charge_move=$root.POGOProtos.Data.Quests.QuestCondition.WithSuperEffectiveChargeMove.decode(r,r.uint32());break;case 12:m.with_item=$root.POGOProtos.Data.Quests.QuestCondition.WithItem.decode(r,r.uint32());break;case 13:m.with_unique_pokestop=$root.POGOProtos.Data.Quests.QuestCondition.WithUniquePokestop.decode(r,r.uint32());break;case 14:m.with_quest_context=$root.POGOProtos.Data.Quests.QuestCondition.WithQuestContext.decode(r,r.uint32());break;case 15:m.with_badge_type=$root.POGOProtos.Data.Quests.QuestCondition.WithBadgeType.decode(r,r.uint32());break;case 16:m.with_player_level=$root.POGOProtos.Data.Quests.QuestCondition.WithPlayerLevel.decode(r,r.uint32());break;case 17:m.with_win_battle_status=$root.POGOProtos.Data.Quests.QuestCondition.WithWinBattleStatus.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};QuestCondition.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition)return d;var m=new $root.POGOProtos.Data.Quests.QuestCondition;switch(d.type){case"UNSET":case 0:m.type=0;break;case"WITH_POKEMON_TYPE":case 1:m.type=1;break;case"WITH_POKEMON_CATEGORY":case 2:m.type=2;break;case"WITH_WEATHER_BOOST":case 3:m.type=3;break;case"WITH_DAILY_CAPTURE_BONUS":case 4:m.type=4;break;case"WITH_DAILY_SPIN_BONUS":case 5:m.type=5;break;case"WITH_WIN_RAID_STATUS":case 6:m.type=6;break;case"WITH_RAID_LEVEL":case 7:m.type=7;break;case"WITH_THROW_TYPE":case 8:m.type=8;break;case"WITH_WIN_GYM_BATTLE_STATUS":case 9:m.type=9;break;case"WITH_SUPER_EFFECTIVE_CHARGE":case 10:m.type=10;break;case"WITH_ITEM":case 11:m.type=11;break;case"WITH_UNIQUE_POKESTOP":case 12:m.type=12;break;case"WITH_QUEST_CONTEXT":case 13:m.type=13;break;case"WITH_THROW_TYPE_IN_A_ROW":case 14:m.type=14;break;case"WITH_CURVE_BALL":case 15:m.type=15;break;case"WITH_BADGE_TYPE":case 16:m.type=16;break;case"WITH_PLAYER_LEVEL":case 17:m.type=17;break;case"WITH_WIN_BATTLE_STATUS":case 18:m.type=18;break;case"WITH_NEW_FRIEND":case 19:m.type=19;break;case"WITH_DAYS_IN_A_ROW":case 20:m.type=20;break}if(d.with_pokemon_type!=null){if(typeof d.with_pokemon_type!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_pokemon_type: object expected");m.with_pokemon_type=$root.POGOProtos.Data.Quests.QuestCondition.WithPokemonType.fromObject(d.with_pokemon_type)}if(d.with_pokemon_category!=null){if(typeof d.with_pokemon_category!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_pokemon_category: object expected");m.with_pokemon_category=$root.POGOProtos.Data.Quests.QuestCondition.WithPokemonCategory.fromObject(d.with_pokemon_category)}if(d.with_weather_boost!=null){if(typeof d.with_weather_boost!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_weather_boost: object expected");m.with_weather_boost=$root.POGOProtos.Data.Quests.QuestCondition.WithWeatherBoost.fromObject(d.with_weather_boost)}if(d.with_daily_capture_bonus!=null){if(typeof d.with_daily_capture_bonus!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_daily_capture_bonus: object expected");m.with_daily_capture_bonus=$root.POGOProtos.Data.Quests.QuestCondition.WithDailyCaptureBonus.fromObject(d.with_daily_capture_bonus)}if(d.with_daily_spin_bonus!=null){if(typeof d.with_daily_spin_bonus!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_daily_spin_bonus: object expected");m.with_daily_spin_bonus=$root.POGOProtos.Data.Quests.QuestCondition.WithDailySpinBonus.fromObject(d.with_daily_spin_bonus)}if(d.with_win_raid_status!=null){if(typeof d.with_win_raid_status!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_win_raid_status: object expected");m.with_win_raid_status=$root.POGOProtos.Data.Quests.QuestCondition.WithWinRaidStatus.fromObject(d.with_win_raid_status)}if(d.with_raid_level!=null){if(typeof d.with_raid_level!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_raid_level: object expected");m.with_raid_level=$root.POGOProtos.Data.Quests.QuestCondition.WithRaidLevel.fromObject(d.with_raid_level)}if(d.with_throw_type!=null){if(typeof d.with_throw_type!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_throw_type: object expected");m.with_throw_type=$root.POGOProtos.Data.Quests.QuestCondition.WithThrowType.fromObject(d.with_throw_type)}if(d.with_win_gym_battle_status!=null){if(typeof d.with_win_gym_battle_status!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_win_gym_battle_status: object expected");m.with_win_gym_battle_status=$root.POGOProtos.Data.Quests.QuestCondition.WithWinGymBattleStatus.fromObject(d.with_win_gym_battle_status)}if(d.with_super_effective_charge_move!=null){if(typeof d.with_super_effective_charge_move!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_super_effective_charge_move: object expected");m.with_super_effective_charge_move=$root.POGOProtos.Data.Quests.QuestCondition.WithSuperEffectiveChargeMove.fromObject(d.with_super_effective_charge_move)}if(d.with_item!=null){if(typeof d.with_item!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_item: object expected");m.with_item=$root.POGOProtos.Data.Quests.QuestCondition.WithItem.fromObject(d.with_item)}if(d.with_unique_pokestop!=null){if(typeof d.with_unique_pokestop!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_unique_pokestop: object expected");m.with_unique_pokestop=$root.POGOProtos.Data.Quests.QuestCondition.WithUniquePokestop.fromObject(d.with_unique_pokestop)}if(d.with_quest_context!=null){if(typeof d.with_quest_context!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_quest_context: object expected");m.with_quest_context=$root.POGOProtos.Data.Quests.QuestCondition.WithQuestContext.fromObject(d.with_quest_context)}if(d.with_badge_type!=null){if(typeof d.with_badge_type!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_badge_type: object expected");m.with_badge_type=$root.POGOProtos.Data.Quests.QuestCondition.WithBadgeType.fromObject(d.with_badge_type)}if(d.with_player_level!=null){if(typeof d.with_player_level!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_player_level: object expected");m.with_player_level=$root.POGOProtos.Data.Quests.QuestCondition.WithPlayerLevel.fromObject(d.with_player_level)}if(d.with_win_battle_status!=null){if(typeof d.with_win_battle_status!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestCondition.with_win_battle_status: object expected");m.with_win_battle_status=$root.POGOProtos.Data.Quests.QuestCondition.WithWinBattleStatus.fromObject(d.with_win_battle_status)}return m};QuestCondition.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.type=o.enums===String?"UNSET":0}if(m.type!=null&&m.hasOwnProperty("type")){d.type=o.enums===String?$root.POGOProtos.Data.Quests.QuestCondition.ConditionType[m.type]:m.type}if(m.with_pokemon_type!=null&&m.hasOwnProperty("with_pokemon_type")){d.with_pokemon_type=$root.POGOProtos.Data.Quests.QuestCondition.WithPokemonType.toObject(m.with_pokemon_type,o);if(o.oneofs)d.Condition="with_pokemon_type"}if(m.with_pokemon_category!=null&&m.hasOwnProperty("with_pokemon_category")){d.with_pokemon_category=$root.POGOProtos.Data.Quests.QuestCondition.WithPokemonCategory.toObject(m.with_pokemon_category,o);if(o.oneofs)d.Condition="with_pokemon_category"}if(m.with_weather_boost!=null&&m.hasOwnProperty("with_weather_boost")){d.with_weather_boost=$root.POGOProtos.Data.Quests.QuestCondition.WithWeatherBoost.toObject(m.with_weather_boost,o);if(o.oneofs)d.Condition="with_weather_boost"}if(m.with_daily_capture_bonus!=null&&m.hasOwnProperty("with_daily_capture_bonus")){d.with_daily_capture_bonus=$root.POGOProtos.Data.Quests.QuestCondition.WithDailyCaptureBonus.toObject(m.with_daily_capture_bonus,o);if(o.oneofs)d.Condition="with_daily_capture_bonus"}if(m.with_daily_spin_bonus!=null&&m.hasOwnProperty("with_daily_spin_bonus")){d.with_daily_spin_bonus=$root.POGOProtos.Data.Quests.QuestCondition.WithDailySpinBonus.toObject(m.with_daily_spin_bonus,o);if(o.oneofs)d.Condition="with_daily_spin_bonus"}if(m.with_win_raid_status!=null&&m.hasOwnProperty("with_win_raid_status")){d.with_win_raid_status=$root.POGOProtos.Data.Quests.QuestCondition.WithWinRaidStatus.toObject(m.with_win_raid_status,o);if(o.oneofs)d.Condition="with_win_raid_status"}if(m.with_raid_level!=null&&m.hasOwnProperty("with_raid_level")){d.with_raid_level=$root.POGOProtos.Data.Quests.QuestCondition.WithRaidLevel.toObject(m.with_raid_level,o);if(o.oneofs)d.Condition="with_raid_level"}if(m.with_throw_type!=null&&m.hasOwnProperty("with_throw_type")){d.with_throw_type=$root.POGOProtos.Data.Quests.QuestCondition.WithThrowType.toObject(m.with_throw_type,o);if(o.oneofs)d.Condition="with_throw_type"}if(m.with_win_gym_battle_status!=null&&m.hasOwnProperty("with_win_gym_battle_status")){d.with_win_gym_battle_status=$root.POGOProtos.Data.Quests.QuestCondition.WithWinGymBattleStatus.toObject(m.with_win_gym_battle_status,o);if(o.oneofs)d.Condition="with_win_gym_battle_status"}if(m.with_super_effective_charge_move!=null&&m.hasOwnProperty("with_super_effective_charge_move")){d.with_super_effective_charge_move=$root.POGOProtos.Data.Quests.QuestCondition.WithSuperEffectiveChargeMove.toObject(m.with_super_effective_charge_move,o);if(o.oneofs)d.Condition="with_super_effective_charge_move"}if(m.with_item!=null&&m.hasOwnProperty("with_item")){d.with_item=$root.POGOProtos.Data.Quests.QuestCondition.WithItem.toObject(m.with_item,o);if(o.oneofs)d.Condition="with_item"}if(m.with_unique_pokestop!=null&&m.hasOwnProperty("with_unique_pokestop")){d.with_unique_pokestop=$root.POGOProtos.Data.Quests.QuestCondition.WithUniquePokestop.toObject(m.with_unique_pokestop,o);if(o.oneofs)d.Condition="with_unique_pokestop"}if(m.with_quest_context!=null&&m.hasOwnProperty("with_quest_context")){d.with_quest_context=$root.POGOProtos.Data.Quests.QuestCondition.WithQuestContext.toObject(m.with_quest_context,o);if(o.oneofs)d.Condition="with_quest_context"}if(m.with_badge_type!=null&&m.hasOwnProperty("with_badge_type")){d.with_badge_type=$root.POGOProtos.Data.Quests.QuestCondition.WithBadgeType.toObject(m.with_badge_type,o);if(o.oneofs)d.Condition="with_badge_type"}if(m.with_player_level!=null&&m.hasOwnProperty("with_player_level")){d.with_player_level=$root.POGOProtos.Data.Quests.QuestCondition.WithPlayerLevel.toObject(m.with_player_level,o);if(o.oneofs)d.Condition="with_player_level"}if(m.with_win_battle_status!=null&&m.hasOwnProperty("with_win_battle_status")){d.with_win_battle_status=$root.POGOProtos.Data.Quests.QuestCondition.WithWinBattleStatus.toObject(m.with_win_battle_status,o);if(o.oneofs)d.Condition="with_win_battle_status"}return d};QuestCondition.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};QuestCondition.ConditionType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="WITH_POKEMON_TYPE"]=1;values[valuesById[2]="WITH_POKEMON_CATEGORY"]=2;values[valuesById[3]="WITH_WEATHER_BOOST"]=3;values[valuesById[4]="WITH_DAILY_CAPTURE_BONUS"]=4;values[valuesById[5]="WITH_DAILY_SPIN_BONUS"]=5;values[valuesById[6]="WITH_WIN_RAID_STATUS"]=6;values[valuesById[7]="WITH_RAID_LEVEL"]=7;values[valuesById[8]="WITH_THROW_TYPE"]=8;values[valuesById[9]="WITH_WIN_GYM_BATTLE_STATUS"]=9;values[valuesById[10]="WITH_SUPER_EFFECTIVE_CHARGE"]=10;values[valuesById[11]="WITH_ITEM"]=11;values[valuesById[12]="WITH_UNIQUE_POKESTOP"]=12;values[valuesById[13]="WITH_QUEST_CONTEXT"]=13;values[valuesById[14]="WITH_THROW_TYPE_IN_A_ROW"]=14;values[valuesById[15]="WITH_CURVE_BALL"]=15;values[valuesById[16]="WITH_BADGE_TYPE"]=16;values[valuesById[17]="WITH_PLAYER_LEVEL"]=17;values[valuesById[18]="WITH_WIN_BATTLE_STATUS"]=18;values[valuesById[19]="WITH_NEW_FRIEND"]=19;values[valuesById[20]="WITH_DAYS_IN_A_ROW"]=20;return values}();QuestCondition.WithPokemonType=function(){function WithPokemonType(p){this.pokemon_type=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithPokemonType.prototype.pokemon_type=$util.emptyArray;WithPokemonType.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_type!=null&&m.pokemon_type.length){w.uint32(10).fork();for(var i=0;i<m.pokemon_type.length;++i)w.int32(m.pokemon_type[i]);w.ldelim()}return w};WithPokemonType.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithPokemonType;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.pokemon_type&&m.pokemon_type.length))m.pokemon_type=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.pokemon_type.push(r.int32())}else m.pokemon_type.push(r.int32());break;default:r.skipType(t&7);break}}return m};WithPokemonType.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithPokemonType)return d;var m=new $root.POGOProtos.Data.Quests.QuestCondition.WithPokemonType;if(d.pokemon_type){if(!Array.isArray(d.pokemon_type))throw TypeError(".POGOProtos.Data.Quests.QuestCondition.WithPokemonType.pokemon_type: array expected");m.pokemon_type=[];for(var i=0;i<d.pokemon_type.length;++i){switch(d.pokemon_type[i]){default:case"POKEMON_TYPE_NONE":case 0:m.pokemon_type[i]=0;break;case"POKEMON_TYPE_NORMAL":case 1:m.pokemon_type[i]=1;break;case"POKEMON_TYPE_FIGHTING":case 2:m.pokemon_type[i]=2;break;case"POKEMON_TYPE_FLYING":case 3:m.pokemon_type[i]=3;break;case"POKEMON_TYPE_POISON":case 4:m.pokemon_type[i]=4;break;case"POKEMON_TYPE_GROUND":case 5:m.pokemon_type[i]=5;break;case"POKEMON_TYPE_ROCK":case 6:m.pokemon_type[i]=6;break;case"POKEMON_TYPE_BUG":case 7:m.pokemon_type[i]=7;break;case"POKEMON_TYPE_GHOST":case 8:m.pokemon_type[i]=8;break;case"POKEMON_TYPE_STEEL":case 9:m.pokemon_type[i]=9;break;case"POKEMON_TYPE_FIRE":case 10:m.pokemon_type[i]=10;break;case"POKEMON_TYPE_WATER":case 11:m.pokemon_type[i]=11;break;case"POKEMON_TYPE_GRASS":case 12:m.pokemon_type[i]=12;break;case"POKEMON_TYPE_ELECTRIC":case 13:m.pokemon_type[i]=13;break;case"POKEMON_TYPE_PSYCHIC":case 14:m.pokemon_type[i]=14;break;case"POKEMON_TYPE_ICE":case 15:m.pokemon_type[i]=15;break;case"POKEMON_TYPE_DRAGON":case 16:m.pokemon_type[i]=16;break;case"POKEMON_TYPE_DARK":case 17:m.pokemon_type[i]=17;break;case"POKEMON_TYPE_FAIRY":case 18:m.pokemon_type[i]=18;break}}}return m};WithPokemonType.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.pokemon_type=[]}if(m.pokemon_type&&m.pokemon_type.length){d.pokemon_type=[];for(var j=0;j<m.pokemon_type.length;++j){d.pokemon_type[j]=o.enums===String?$root.POGOProtos.Enums.PokemonType[m.pokemon_type[j]]:m.pokemon_type[j]}}return d};WithPokemonType.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithPokemonType}();QuestCondition.WithWeatherBoost=function(){function WithWeatherBoost(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithWeatherBoost.encode=function encode(m,w){if(!w)w=$Writer.create();return w};WithWeatherBoost.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithWeatherBoost;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};WithWeatherBoost.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithWeatherBoost)return d;return new $root.POGOProtos.Data.Quests.QuestCondition.WithWeatherBoost};WithWeatherBoost.toObject=function toObject(){return{}};WithWeatherBoost.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithWeatherBoost}();QuestCondition.WithPokemonCategory=function(){function WithPokemonCategory(p){this.pokemon_ids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithPokemonCategory.prototype.category_name="";WithPokemonCategory.prototype.pokemon_ids=$util.emptyArray;WithPokemonCategory.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.category_name!=null&&m.hasOwnProperty("category_name"))w.uint32(10).string(m.category_name);if(m.pokemon_ids!=null&&m.pokemon_ids.length){w.uint32(18).fork();for(var i=0;i<m.pokemon_ids.length;++i)w.int32(m.pokemon_ids[i]);w.ldelim()}return w};WithPokemonCategory.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithPokemonCategory;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.category_name=r.string();break;case 2:if(!(m.pokemon_ids&&m.pokemon_ids.length))m.pokemon_ids=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.pokemon_ids.push(r.int32())}else m.pokemon_ids.push(r.int32());break;default:r.skipType(t&7);break}}return m};WithPokemonCategory.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithPokemonCategory)return d;var m=new $root.POGOProtos.Data.Quests.QuestCondition.WithPokemonCategory;if(d.category_name!=null){m.category_name=String(d.category_name)}if(d.pokemon_ids){if(!Array.isArray(d.pokemon_ids))throw TypeError(".POGOProtos.Data.Quests.QuestCondition.WithPokemonCategory.pokemon_ids: array expected");m.pokemon_ids=[];for(var i=0;i<d.pokemon_ids.length;++i){switch(d.pokemon_ids[i]){default:case"MISSINGNO":case 0:m.pokemon_ids[i]=0;break;case"BULBASAUR":case 1:m.pokemon_ids[i]=1;break;case"IVYSAUR":case 2:m.pokemon_ids[i]=2;break;case"VENUSAUR":case 3:m.pokemon_ids[i]=3;break;case"CHARMANDER":case 4:m.pokemon_ids[i]=4;break;case"CHARMELEON":case 5:m.pokemon_ids[i]=5;break;case"CHARIZARD":case 6:m.pokemon_ids[i]=6;break;case"SQUIRTLE":case 7:m.pokemon_ids[i]=7;break;case"WARTORTLE":case 8:m.pokemon_ids[i]=8;break;case"BLASTOISE":case 9:m.pokemon_ids[i]=9;break;case"CATERPIE":case 10:m.pokemon_ids[i]=10;break;case"METAPOD":case 11:m.pokemon_ids[i]=11;break;case"BUTTERFREE":case 12:m.pokemon_ids[i]=12;break;case"WEEDLE":case 13:m.pokemon_ids[i]=13;break;case"KAKUNA":case 14:m.pokemon_ids[i]=14;break;case"BEEDRILL":case 15:m.pokemon_ids[i]=15;break;case"PIDGEY":case 16:m.pokemon_ids[i]=16;break;case"PIDGEOTTO":case 17:m.pokemon_ids[i]=17;break;case"PIDGEOT":case 18:m.pokemon_ids[i]=18;break;case"RATTATA":case 19:m.pokemon_ids[i]=19;break;case"RATICATE":case 20:m.pokemon_ids[i]=20;break;case"SPEAROW":case 21:m.pokemon_ids[i]=21;break;case"FEAROW":case 22:m.pokemon_ids[i]=22;break;case"EKANS":case 23:m.pokemon_ids[i]=23;break;case"ARBOK":case 24:m.pokemon_ids[i]=24;break;case"PIKACHU":case 25:m.pokemon_ids[i]=25;break;case"RAICHU":case 26:m.pokemon_ids[i]=26;break;case"SANDSHREW":case 27:m.pokemon_ids[i]=27;break;case"SANDSLASH":case 28:m.pokemon_ids[i]=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_ids[i]=29;break;case"NIDORINA":case 30:m.pokemon_ids[i]=30;break;case"NIDOQUEEN":case 31:m.pokemon_ids[i]=31;break;case"NIDORAN_MALE":case 32:m.pokemon_ids[i]=32;break;case"NIDORINO":case 33:m.pokemon_ids[i]=33;break;case"NIDOKING":case 34:m.pokemon_ids[i]=34;break;case"CLEFAIRY":case 35:m.pokemon_ids[i]=35;break;case"CLEFABLE":case 36:m.pokemon_ids[i]=36;break;case"VULPIX":case 37:m.pokemon_ids[i]=37;break;case"NINETALES":case 38:m.pokemon_ids[i]=38;break;case"JIGGLYPUFF":case 39:m.pokemon_ids[i]=39;break;case"WIGGLYTUFF":case 40:m.pokemon_ids[i]=40;break;case"ZUBAT":case 41:m.pokemon_ids[i]=41;break;case"GOLBAT":case 42:m.pokemon_ids[i]=42;break;case"ODDISH":case 43:m.pokemon_ids[i]=43;break;case"GLOOM":case 44:m.pokemon_ids[i]=44;break;case"VILEPLUME":case 45:m.pokemon_ids[i]=45;break;case"PARAS":case 46:m.pokemon_ids[i]=46;break;case"PARASECT":case 47:m.pokemon_ids[i]=47;break;case"VENONAT":case 48:m.pokemon_ids[i]=48;break;case"VENOMOTH":case 49:m.pokemon_ids[i]=49;break;case"DIGLETT":case 50:m.pokemon_ids[i]=50;break;case"DUGTRIO":case 51:m.pokemon_ids[i]=51;break;case"MEOWTH":case 52:m.pokemon_ids[i]=52;break;case"PERSIAN":case 53:m.pokemon_ids[i]=53;break;case"PSYDUCK":case 54:m.pokemon_ids[i]=54;break;case"GOLDUCK":case 55:m.pokemon_ids[i]=55;break;case"MANKEY":case 56:m.pokemon_ids[i]=56;break;case"PRIMEAPE":case 57:m.pokemon_ids[i]=57;break;case"GROWLITHE":case 58:m.pokemon_ids[i]=58;break;case"ARCANINE":case 59:m.pokemon_ids[i]=59;break;case"POLIWAG":case 60:m.pokemon_ids[i]=60;break;case"POLIWHIRL":case 61:m.pokemon_ids[i]=61;break;case"POLIWRATH":case 62:m.pokemon_ids[i]=62;break;case"ABRA":case 63:m.pokemon_ids[i]=63;break;case"KADABRA":case 64:m.pokemon_ids[i]=64;break;case"ALAKAZAM":case 65:m.pokemon_ids[i]=65;break;case"MACHOP":case 66:m.pokemon_ids[i]=66;break;case"MACHOKE":case 67:m.pokemon_ids[i]=67;break;case"MACHAMP":case 68:m.pokemon_ids[i]=68;break;case"BELLSPROUT":case 69:m.pokemon_ids[i]=69;break;case"WEEPINBELL":case 70:m.pokemon_ids[i]=70;break;case"VICTREEBEL":case 71:m.pokemon_ids[i]=71;break;case"TENTACOOL":case 72:m.pokemon_ids[i]=72;break;case"TENTACRUEL":case 73:m.pokemon_ids[i]=73;break;case"GEODUDE":case 74:m.pokemon_ids[i]=74;break;case"GRAVELER":case 75:m.pokemon_ids[i]=75;break;case"GOLEM":case 76:m.pokemon_ids[i]=76;break;case"PONYTA":case 77:m.pokemon_ids[i]=77;break;case"RAPIDASH":case 78:m.pokemon_ids[i]=78;break;case"SLOWPOKE":case 79:m.pokemon_ids[i]=79;break;case"SLOWBRO":case 80:m.pokemon_ids[i]=80;break;case"MAGNEMITE":case 81:m.pokemon_ids[i]=81;break;case"MAGNETON":case 82:m.pokemon_ids[i]=82;break;case"FARFETCHD":case 83:m.pokemon_ids[i]=83;break;case"DODUO":case 84:m.pokemon_ids[i]=84;break;case"DODRIO":case 85:m.pokemon_ids[i]=85;break;case"SEEL":case 86:m.pokemon_ids[i]=86;break;case"DEWGONG":case 87:m.pokemon_ids[i]=87;break;case"GRIMER":case 88:m.pokemon_ids[i]=88;break;case"MUK":case 89:m.pokemon_ids[i]=89;break;case"SHELLDER":case 90:m.pokemon_ids[i]=90;break;case"CLOYSTER":case 91:m.pokemon_ids[i]=91;break;case"GASTLY":case 92:m.pokemon_ids[i]=92;break;case"HAUNTER":case 93:m.pokemon_ids[i]=93;break;case"GENGAR":case 94:m.pokemon_ids[i]=94;break;case"ONIX":case 95:m.pokemon_ids[i]=95;break;case"DROWZEE":case 96:m.pokemon_ids[i]=96;break;case"HYPNO":case 97:m.pokemon_ids[i]=97;break;case"KRABBY":case 98:m.pokemon_ids[i]=98;break;case"KINGLER":case 99:m.pokemon_ids[i]=99;break;case"VOLTORB":case 100:m.pokemon_ids[i]=100;break;case"ELECTRODE":case 101:m.pokemon_ids[i]=101;break;case"EXEGGCUTE":case 102:m.pokemon_ids[i]=102;break;case"EXEGGUTOR":case 103:m.pokemon_ids[i]=103;break;case"CUBONE":case 104:m.pokemon_ids[i]=104;break;case"MAROWAK":case 105:m.pokemon_ids[i]=105;break;case"HITMONLEE":case 106:m.pokemon_ids[i]=106;break;case"HITMONCHAN":case 107:m.pokemon_ids[i]=107;break;case"LICKITUNG":case 108:m.pokemon_ids[i]=108;break;case"KOFFING":case 109:m.pokemon_ids[i]=109;break;case"WEEZING":case 110:m.pokemon_ids[i]=110;break;case"RHYHORN":case 111:m.pokemon_ids[i]=111;break;case"RHYDON":case 112:m.pokemon_ids[i]=112;break;case"CHANSEY":case 113:m.pokemon_ids[i]=113;break;case"TANGELA":case 114:m.pokemon_ids[i]=114;break;case"KANGASKHAN":case 115:m.pokemon_ids[i]=115;break;case"HORSEA":case 116:m.pokemon_ids[i]=116;break;case"SEADRA":case 117:m.pokemon_ids[i]=117;break;case"GOLDEEN":case 118:m.pokemon_ids[i]=118;break;case"SEAKING":case 119:m.pokemon_ids[i]=119;break;case"STARYU":case 120:m.pokemon_ids[i]=120;break;case"STARMIE":case 121:m.pokemon_ids[i]=121;break;case"MR_MIME":case 122:m.pokemon_ids[i]=122;break;case"SCYTHER":case 123:m.pokemon_ids[i]=123;break;case"JYNX":case 124:m.pokemon_ids[i]=124;break;case"ELECTABUZZ":case 125:m.pokemon_ids[i]=125;break;case"MAGMAR":case 126:m.pokemon_ids[i]=126;break;case"PINSIR":case 127:m.pokemon_ids[i]=127;break;case"TAUROS":case 128:m.pokemon_ids[i]=128;break;case"MAGIKARP":case 129:m.pokemon_ids[i]=129;break;case"GYARADOS":case 130:m.pokemon_ids[i]=130;break;case"LAPRAS":case 131:m.pokemon_ids[i]=131;break;case"DITTO":case 132:m.pokemon_ids[i]=132;break;case"EEVEE":case 133:m.pokemon_ids[i]=133;break;case"VAPOREON":case 134:m.pokemon_ids[i]=134;break;case"JOLTEON":case 135:m.pokemon_ids[i]=135;break;case"FLAREON":case 136:m.pokemon_ids[i]=136;break;case"PORYGON":case 137:m.pokemon_ids[i]=137;break;case"OMANYTE":case 138:m.pokemon_ids[i]=138;break;case"OMASTAR":case 139:m.pokemon_ids[i]=139;break;case"KABUTO":case 140:m.pokemon_ids[i]=140;break;case"KABUTOPS":case 141:m.pokemon_ids[i]=141;break;case"AERODACTYL":case 142:m.pokemon_ids[i]=142;break;case"SNORLAX":case 143:m.pokemon_ids[i]=143;break;case"ARTICUNO":case 144:m.pokemon_ids[i]=144;break;case"ZAPDOS":case 145:m.pokemon_ids[i]=145;break;case"MOLTRES":case 146:m.pokemon_ids[i]=146;break;case"DRATINI":case 147:m.pokemon_ids[i]=147;break;case"DRAGONAIR":case 148:m.pokemon_ids[i]=148;break;case"DRAGONITE":case 149:m.pokemon_ids[i]=149;break;case"MEWTWO":case 150:m.pokemon_ids[i]=150;break;case"MEW":case 151:m.pokemon_ids[i]=151;break;case"CHIKORITA":case 152:m.pokemon_ids[i]=152;break;case"BAYLEEF":case 153:m.pokemon_ids[i]=153;break;case"MEGANIUM":case 154:m.pokemon_ids[i]=154;break;case"CYNDAQUIL":case 155:m.pokemon_ids[i]=155;break;case"QUILAVA":case 156:m.pokemon_ids[i]=156;break;case"TYPHLOSION":case 157:m.pokemon_ids[i]=157;break;case"TOTODILE":case 158:m.pokemon_ids[i]=158;break;case"CROCONAW":case 159:m.pokemon_ids[i]=159;break;case"FERALIGATR":case 160:m.pokemon_ids[i]=160;break;case"SENTRET":case 161:m.pokemon_ids[i]=161;break;case"FURRET":case 162:m.pokemon_ids[i]=162;break;case"HOOTHOOT":case 163:m.pokemon_ids[i]=163;break;case"NOCTOWL":case 164:m.pokemon_ids[i]=164;break;case"LEDYBA":case 165:m.pokemon_ids[i]=165;break;case"LEDIAN":case 166:m.pokemon_ids[i]=166;break;case"SPINARAK":case 167:m.pokemon_ids[i]=167;break;case"ARIADOS":case 168:m.pokemon_ids[i]=168;break;case"CROBAT":case 169:m.pokemon_ids[i]=169;break;case"CHINCHOU":case 170:m.pokemon_ids[i]=170;break;case"LANTURN":case 171:m.pokemon_ids[i]=171;break;case"PICHU":case 172:m.pokemon_ids[i]=172;break;case"CLEFFA":case 173:m.pokemon_ids[i]=173;break;case"IGGLYBUFF":case 174:m.pokemon_ids[i]=174;break;case"TOGEPI":case 175:m.pokemon_ids[i]=175;break;case"TOGETIC":case 176:m.pokemon_ids[i]=176;break;case"NATU":case 177:m.pokemon_ids[i]=177;break;case"XATU":case 178:m.pokemon_ids[i]=178;break;case"MAREEP":case 179:m.pokemon_ids[i]=179;break;case"FLAAFFY":case 180:m.pokemon_ids[i]=180;break;case"AMPHAROS":case 181:m.pokemon_ids[i]=181;break;case"BELLOSSOM":case 182:m.pokemon_ids[i]=182;break;case"MARILL":case 183:m.pokemon_ids[i]=183;break;case"AZUMARILL":case 184:m.pokemon_ids[i]=184;break;case"SUDOWOODO":case 185:m.pokemon_ids[i]=185;break;case"POLITOED":case 186:m.pokemon_ids[i]=186;break;case"HOPPIP":case 187:m.pokemon_ids[i]=187;break;case"SKIPLOOM":case 188:m.pokemon_ids[i]=188;break;case"JUMPLUFF":case 189:m.pokemon_ids[i]=189;break;case"AIPOM":case 190:m.pokemon_ids[i]=190;break;case"SUNKERN":case 191:m.pokemon_ids[i]=191;break;case"SUNFLORA":case 192:m.pokemon_ids[i]=192;break;case"YANMA":case 193:m.pokemon_ids[i]=193;break;case"WOOPER":case 194:m.pokemon_ids[i]=194;break;case"QUAGSIRE":case 195:m.pokemon_ids[i]=195;break;case"ESPEON":case 196:m.pokemon_ids[i]=196;break;case"UMBREON":case 197:m.pokemon_ids[i]=197;break;case"MURKROW":case 198:m.pokemon_ids[i]=198;break;case"SLOWKING":case 199:m.pokemon_ids[i]=199;break;case"MISDREAVUS":case 200:m.pokemon_ids[i]=200;break;case"UNOWN":case 201:m.pokemon_ids[i]=201;break;case"WOBBUFFET":case 202:m.pokemon_ids[i]=202;break;case"GIRAFARIG":case 203:m.pokemon_ids[i]=203;break;case"PINECO":case 204:m.pokemon_ids[i]=204;break;case"FORRETRESS":case 205:m.pokemon_ids[i]=205;break;case"DUNSPARCE":case 206:m.pokemon_ids[i]=206;break;case"GLIGAR":case 207:m.pokemon_ids[i]=207;break;case"STEELIX":case 208:m.pokemon_ids[i]=208;break;case"SNUBBULL":case 209:m.pokemon_ids[i]=209;break;case"GRANBULL":case 210:m.pokemon_ids[i]=210;break;case"QWILFISH":case 211:m.pokemon_ids[i]=211;break;case"SCIZOR":case 212:m.pokemon_ids[i]=212;break;case"SHUCKLE":case 213:m.pokemon_ids[i]=213;break;case"HERACROSS":case 214:m.pokemon_ids[i]=214;break;case"SNEASEL":case 215:m.pokemon_ids[i]=215;break;case"TEDDIURSA":case 216:m.pokemon_ids[i]=216;break;case"URSARING":case 217:m.pokemon_ids[i]=217;break;case"SLUGMA":case 218:m.pokemon_ids[i]=218;break;case"MAGCARGO":case 219:m.pokemon_ids[i]=219;break;case"SWINUB":case 220:m.pokemon_ids[i]=220;break;case"PILOSWINE":case 221:m.pokemon_ids[i]=221;break;case"CORSOLA":case 222:m.pokemon_ids[i]=222;break;case"REMORAID":case 223:m.pokemon_ids[i]=223;break;case"OCTILLERY":case 224:m.pokemon_ids[i]=224;break;case"DELIBIRD":case 225:m.pokemon_ids[i]=225;break;case"MANTINE":case 226:m.pokemon_ids[i]=226;break;case"SKARMORY":case 227:m.pokemon_ids[i]=227;break;case"HOUNDOUR":case 228:m.pokemon_ids[i]=228;break;case"HOUNDOOM":case 229:m.pokemon_ids[i]=229;break;case"KINGDRA":case 230:m.pokemon_ids[i]=230;break;case"PHANPY":case 231:m.pokemon_ids[i]=231;break;case"DONPHAN":case 232:m.pokemon_ids[i]=232;break;case"PORYGON2":case 233:m.pokemon_ids[i]=233;break;case"STANTLER":case 234:m.pokemon_ids[i]=234;break;case"SMEARGLE":case 235:m.pokemon_ids[i]=235;break;case"TYROGUE":case 236:m.pokemon_ids[i]=236;break;case"HITMONTOP":case 237:m.pokemon_ids[i]=237;break;case"SMOOCHUM":case 238:m.pokemon_ids[i]=238;break;case"ELEKID":case 239:m.pokemon_ids[i]=239;break;case"MAGBY":case 240:m.pokemon_ids[i]=240;break;case"MILTANK":case 241:m.pokemon_ids[i]=241;break;case"BLISSEY":case 242:m.pokemon_ids[i]=242;break;case"RAIKOU":case 243:m.pokemon_ids[i]=243;break;case"ENTEI":case 244:m.pokemon_ids[i]=244;break;case"SUICUNE":case 245:m.pokemon_ids[i]=245;break;case"LARVITAR":case 246:m.pokemon_ids[i]=246;break;case"PUPITAR":case 247:m.pokemon_ids[i]=247;break;case"TYRANITAR":case 248:m.pokemon_ids[i]=248;break;case"LUGIA":case 249:m.pokemon_ids[i]=249;break;case"HO_OH":case 250:m.pokemon_ids[i]=250;break;case"CELEBI":case 251:m.pokemon_ids[i]=251;break;case"TREECKO":case 252:m.pokemon_ids[i]=252;break;case"GROVYLE":case 253:m.pokemon_ids[i]=253;break;case"SCEPTILE":case 254:m.pokemon_ids[i]=254;break;case"TORCHIC":case 255:m.pokemon_ids[i]=255;break;case"COMBUSKEN":case 256:m.pokemon_ids[i]=256;break;case"BLAZIKEN":case 257:m.pokemon_ids[i]=257;break;case"MUDKIP":case 258:m.pokemon_ids[i]=258;break;case"MARSHTOMP":case 259:m.pokemon_ids[i]=259;break;case"SWAMPERT":case 260:m.pokemon_ids[i]=260;break;case"POOCHYENA":case 261:m.pokemon_ids[i]=261;break;case"MIGHTYENA":case 262:m.pokemon_ids[i]=262;break;case"ZIGZAGOON":case 263:m.pokemon_ids[i]=263;break;case"LINOONE":case 264:m.pokemon_ids[i]=264;break;case"WURMPLE":case 265:m.pokemon_ids[i]=265;break;case"SILCOON":case 266:m.pokemon_ids[i]=266;break;case"BEAUTIFLY":case 267:m.pokemon_ids[i]=267;break;case"CASCOON":case 268:m.pokemon_ids[i]=268;break;case"DUSTOX":case 269:m.pokemon_ids[i]=269;break;case"LOTAD":case 270:m.pokemon_ids[i]=270;break;case"LOMBRE":case 271:m.pokemon_ids[i]=271;break;case"LUDICOLO":case 272:m.pokemon_ids[i]=272;break;case"SEEDOT":case 273:m.pokemon_ids[i]=273;break;case"NUZLEAF":case 274:m.pokemon_ids[i]=274;break;case"SHIFTRY":case 275:m.pokemon_ids[i]=275;break;case"TAILLOW":case 276:m.pokemon_ids[i]=276;break;case"SWELLOW":case 277:m.pokemon_ids[i]=277;break;case"WINGULL":case 278:m.pokemon_ids[i]=278;break;case"PELIPPER":case 279:m.pokemon_ids[i]=279;break;case"RALTS":case 280:m.pokemon_ids[i]=280;break;case"KIRLIA":case 281:m.pokemon_ids[i]=281;break;case"GARDEVOIR":case 282:m.pokemon_ids[i]=282;break;case"SURSKIT":case 283:m.pokemon_ids[i]=283;break;case"MASQUERAIN":case 284:m.pokemon_ids[i]=284;break;case"SHROOMISH":case 285:m.pokemon_ids[i]=285;break;case"BRELOOM":case 286:m.pokemon_ids[i]=286;break;case"SLAKOTH":case 287:m.pokemon_ids[i]=287;break;case"VIGOROTH":case 288:m.pokemon_ids[i]=288;break;case"SLAKING":case 289:m.pokemon_ids[i]=289;break;case"NINCADA":case 290:m.pokemon_ids[i]=290;break;case"NINJASK":case 291:m.pokemon_ids[i]=291;break;case"SHEDINJA":case 292:m.pokemon_ids[i]=292;break;case"WHISMUR":case 293:m.pokemon_ids[i]=293;break;case"LOUDRED":case 294:m.pokemon_ids[i]=294;break;case"EXPLOUD":case 295:m.pokemon_ids[i]=295;break;case"MAKUHITA":case 296:m.pokemon_ids[i]=296;break;case"HARIYAMA":case 297:m.pokemon_ids[i]=297;break;case"AZURILL":case 298:m.pokemon_ids[i]=298;break;case"NOSEPASS":case 299:m.pokemon_ids[i]=299;break;case"SKITTY":case 300:m.pokemon_ids[i]=300;break;case"DELCATTY":case 301:m.pokemon_ids[i]=301;break;case"SABLEYE":case 302:m.pokemon_ids[i]=302;break;case"MAWILE":case 303:m.pokemon_ids[i]=303;break;case"ARON":case 304:m.pokemon_ids[i]=304;break;case"LAIRON":case 305:m.pokemon_ids[i]=305;break;case"AGGRON":case 306:m.pokemon_ids[i]=306;break;case"MEDITITE":case 307:m.pokemon_ids[i]=307;break;case"MEDICHAM":case 308:m.pokemon_ids[i]=308;break;case"ELECTRIKE":case 309:m.pokemon_ids[i]=309;break;case"MANECTRIC":case 310:m.pokemon_ids[i]=310;break;case"PLUSLE":case 311:m.pokemon_ids[i]=311;break;case"MINUN":case 312:m.pokemon_ids[i]=312;break;case"VOLBEAT":case 313:m.pokemon_ids[i]=313;break;case"ILLUMISE":case 314:m.pokemon_ids[i]=314;break;case"ROSELIA":case 315:m.pokemon_ids[i]=315;break;case"GULPIN":case 316:m.pokemon_ids[i]=316;break;case"SWALOT":case 317:m.pokemon_ids[i]=317;break;case"CARVANHA":case 318:m.pokemon_ids[i]=318;break;case"SHARPEDO":case 319:m.pokemon_ids[i]=319;break;case"WAILMER":case 320:m.pokemon_ids[i]=320;break;case"WAILORD":case 321:m.pokemon_ids[i]=321;break;case"NUMEL":case 322:m.pokemon_ids[i]=322;break;case"CAMERUPT":case 323:m.pokemon_ids[i]=323;break;case"TORKOAL":case 324:m.pokemon_ids[i]=324;break;case"SPOINK":case 325:m.pokemon_ids[i]=325;break;case"GRUMPIG":case 326:m.pokemon_ids[i]=326;break;case"SPINDA":case 327:m.pokemon_ids[i]=327;break;case"TRAPINCH":case 328:m.pokemon_ids[i]=328;break;case"VIBRAVA":case 329:m.pokemon_ids[i]=329;break;case"FLYGON":case 330:m.pokemon_ids[i]=330;break;case"CACNEA":case 331:m.pokemon_ids[i]=331;break;case"CACTURNE":case 332:m.pokemon_ids[i]=332;break;case"SWABLU":case 333:m.pokemon_ids[i]=333;break;case"ALTARIA":case 334:m.pokemon_ids[i]=334;break;case"ZANGOOSE":case 335:m.pokemon_ids[i]=335;break;case"SEVIPER":case 336:m.pokemon_ids[i]=336;break;case"LUNATONE":case 337:m.pokemon_ids[i]=337;break;case"SOLROCK":case 338:m.pokemon_ids[i]=338;break;case"BARBOACH":case 339:m.pokemon_ids[i]=339;break;case"WHISCASH":case 340:m.pokemon_ids[i]=340;break;case"CORPHISH":case 341:m.pokemon_ids[i]=341;break;case"CRAWDAUNT":case 342:m.pokemon_ids[i]=342;break;case"BALTOY":case 343:m.pokemon_ids[i]=343;break;case"CLAYDOL":case 344:m.pokemon_ids[i]=344;break;case"LILEEP":case 345:m.pokemon_ids[i]=345;break;case"CRADILY":case 346:m.pokemon_ids[i]=346;break;case"ANORITH":case 347:m.pokemon_ids[i]=347;break;case"ARMALDO":case 348:m.pokemon_ids[i]=348;break;case"FEEBAS":case 349:m.pokemon_ids[i]=349;break;case"MILOTIC":case 350:m.pokemon_ids[i]=350;break;case"CASTFORM":case 351:m.pokemon_ids[i]=351;break;case"KECLEON":case 352:m.pokemon_ids[i]=352;break;case"SHUPPET":case 353:m.pokemon_ids[i]=353;break;case"BANETTE":case 354:m.pokemon_ids[i]=354;break;case"DUSKULL":case 355:m.pokemon_ids[i]=355;break;case"DUSCLOPS":case 356:m.pokemon_ids[i]=356;break;case"TROPIUS":case 357:m.pokemon_ids[i]=357;break;case"CHIMECHO":case 358:m.pokemon_ids[i]=358;break;case"ABSOL":case 359:m.pokemon_ids[i]=359;break;case"WYNAUT":case 360:m.pokemon_ids[i]=360;break;case"SNORUNT":case 361:m.pokemon_ids[i]=361;break;case"GLALIE":case 362:m.pokemon_ids[i]=362;break;case"SPHEAL":case 363:m.pokemon_ids[i]=363;break;case"SEALEO":case 364:m.pokemon_ids[i]=364;break;case"WALREIN":case 365:m.pokemon_ids[i]=365;break;case"CLAMPERL":case 366:m.pokemon_ids[i]=366;break;case"HUNTAIL":case 367:m.pokemon_ids[i]=367;break;case"GOREBYSS":case 368:m.pokemon_ids[i]=368;break;case"RELICANTH":case 369:m.pokemon_ids[i]=369;break;case"LUVDISC":case 370:m.pokemon_ids[i]=370;break;case"BAGON":case 371:m.pokemon_ids[i]=371;break;case"SHELGON":case 372:m.pokemon_ids[i]=372;break;case"SALAMENCE":case 373:m.pokemon_ids[i]=373;break;case"BELDUM":case 374:m.pokemon_ids[i]=374;break;case"METANG":case 375:m.pokemon_ids[i]=375;break;case"METAGROSS":case 376:m.pokemon_ids[i]=376;break;case"REGIROCK":case 377:m.pokemon_ids[i]=377;break;case"REGICE":case 378:m.pokemon_ids[i]=378;break;case"REGISTEEL":case 379:m.pokemon_ids[i]=379;break;case"LATIAS":case 380:m.pokemon_ids[i]=380;break;case"LATIOS":case 381:m.pokemon_ids[i]=381;break;case"KYOGRE":case 382:m.pokemon_ids[i]=382;break;case"GROUDON":case 383:m.pokemon_ids[i]=383;break;case"RAYQUAZA":case 384:m.pokemon_ids[i]=384;break;case"JIRACHI":case 385:m.pokemon_ids[i]=385;break;case"DEOXYS":case 386:m.pokemon_ids[i]=386;break;case"TURTWIG":case 387:m.pokemon_ids[i]=387;break;case"GROTLE":case 388:m.pokemon_ids[i]=388;break;case"TORTERRA":case 389:m.pokemon_ids[i]=389;break;case"CHIMCHAR":case 390:m.pokemon_ids[i]=390;break;case"MONFERNO":case 391:m.pokemon_ids[i]=391;break;case"INFERNAPE":case 392:m.pokemon_ids[i]=392;break;case"PIPLUP":case 393:m.pokemon_ids[i]=393;break;case"PRINPLUP":case 394:m.pokemon_ids[i]=394;break;case"EMPOLEON":case 395:m.pokemon_ids[i]=395;break;case"STARLY":case 396:m.pokemon_ids[i]=396;break;case"STARAVIA":case 397:m.pokemon_ids[i]=397;break;case"STARAPTOR":case 398:m.pokemon_ids[i]=398;break;case"BIDOOF":case 399:m.pokemon_ids[i]=399;break;case"BIBAREL":case 400:m.pokemon_ids[i]=400;break;case"KRICKETOT":case 401:m.pokemon_ids[i]=401;break;case"KRICKETUNE":case 402:m.pokemon_ids[i]=402;break;case"SHINX":case 403:m.pokemon_ids[i]=403;break;case"LUXIO":case 404:m.pokemon_ids[i]=404;break;case"LUXRAY":case 405:m.pokemon_ids[i]=405;break;case"BUDEW":case 406:m.pokemon_ids[i]=406;break;case"ROSERADE":case 407:m.pokemon_ids[i]=407;break;case"CRANIDOS":case 408:m.pokemon_ids[i]=408;break;case"RAMPARDOS":case 409:m.pokemon_ids[i]=409;break;case"SHIELDON":case 410:m.pokemon_ids[i]=410;break;case"BASTIODON":case 411:m.pokemon_ids[i]=411;break;case"BURMY":case 412:m.pokemon_ids[i]=412;break;case"WORMADAM":case 413:m.pokemon_ids[i]=413;break;case"MOTHIM":case 414:m.pokemon_ids[i]=414;break;case"COMBEE":case 415:m.pokemon_ids[i]=415;break;case"VESPIQUEN":case 416:m.pokemon_ids[i]=416;break;case"PACHIRISU":case 417:m.pokemon_ids[i]=417;break;case"BUIZEL":case 418:m.pokemon_ids[i]=418;break;case"FLOATZEL":case 419:m.pokemon_ids[i]=419;break;case"CHERUBI":case 420:m.pokemon_ids[i]=420;break;case"CHERRIM":case 421:m.pokemon_ids[i]=421;break;case"SHELLOS":case 422:m.pokemon_ids[i]=422;break;case"GASTRODON":case 423:m.pokemon_ids[i]=423;break;case"AMBIPOM":case 424:m.pokemon_ids[i]=424;break;case"DRIFLOON":case 425:m.pokemon_ids[i]=425;break;case"DRIFBLIM":case 426:m.pokemon_ids[i]=426;break;case"BUNEARY":case 427:m.pokemon_ids[i]=427;break;case"LOPUNNY":case 428:m.pokemon_ids[i]=428;break;case"MISMAGIUS":case 429:m.pokemon_ids[i]=429;break;case"HONCHKROW":case 430:m.pokemon_ids[i]=430;break;case"GLAMEOW":case 431:m.pokemon_ids[i]=431;break;case"PURUGLY":case 432:m.pokemon_ids[i]=432;break;case"CHINGLING":case 433:m.pokemon_ids[i]=433;break;case"STUNKY":case 434:m.pokemon_ids[i]=434;break;case"SKUNTANK":case 435:m.pokemon_ids[i]=435;break;case"BRONZOR":case 436:m.pokemon_ids[i]=436;break;case"BRONZONG":case 437:m.pokemon_ids[i]=437;break;case"BONSLY":case 438:m.pokemon_ids[i]=438;break;case"MIME_JR":case 439:m.pokemon_ids[i]=439;break;case"HAPPINY":case 440:m.pokemon_ids[i]=440;break;case"CHATOT":case 441:m.pokemon_ids[i]=441;break;case"SPIRITOMB":case 442:m.pokemon_ids[i]=442;break;case"GIBLE":case 443:m.pokemon_ids[i]=443;break;case"GABITE":case 444:m.pokemon_ids[i]=444;break;case"GARCHOMP":case 445:m.pokemon_ids[i]=445;break;case"MUNCHLAX":case 446:m.pokemon_ids[i]=446;break;case"RIOLU":case 447:m.pokemon_ids[i]=447;break;case"LUCARIO":case 448:m.pokemon_ids[i]=448;break;case"HIPPOPOTAS":case 449:m.pokemon_ids[i]=449;break;case"HIPPOWDON":case 450:m.pokemon_ids[i]=450;break;case"SKORUPI":case 451:m.pokemon_ids[i]=451;break;case"DRAPION":case 452:m.pokemon_ids[i]=452;break;case"CROAGUNK":case 453:m.pokemon_ids[i]=453;break;case"TOXICROAK":case 454:m.pokemon_ids[i]=454;break;case"CARNIVINE":case 455:m.pokemon_ids[i]=455;break;case"FINNEON":case 456:m.pokemon_ids[i]=456;break;case"LUMINEON":case 457:m.pokemon_ids[i]=457;break;case"MANTYKE":case 458:m.pokemon_ids[i]=458;break;case"SNOVER":case 459:m.pokemon_ids[i]=459;break;case"ABOMASNOW":case 460:m.pokemon_ids[i]=460;break;case"WEAVILE":case 461:m.pokemon_ids[i]=461;break;case"MAGNEZONE":case 462:m.pokemon_ids[i]=462;break;case"LICKILICKY":case 463:m.pokemon_ids[i]=463;break;case"RHYPERIOR":case 464:m.pokemon_ids[i]=464;break;case"TANGROWTH":case 465:m.pokemon_ids[i]=465;break;case"ELECTIVIRE":case 466:m.pokemon_ids[i]=466;break;case"MAGMORTAR":case 467:m.pokemon_ids[i]=467;break;case"TOGEKISS":case 468:m.pokemon_ids[i]=468;break;case"YANMEGA":case 469:m.pokemon_ids[i]=469;break;case"LEAFEON":case 470:m.pokemon_ids[i]=470;break;case"GLACEON":case 471:m.pokemon_ids[i]=471;break;case"GLISCOR":case 472:m.pokemon_ids[i]=472;break;case"MAMOSWINE":case 473:m.pokemon_ids[i]=473;break;case"PORYGON_Z":case 474:m.pokemon_ids[i]=474;break;case"GALLADE":case 475:m.pokemon_ids[i]=475;break;case"PROBOPASS":case 476:m.pokemon_ids[i]=476;break;case"DUSKNOIR":case 477:m.pokemon_ids[i]=477;break;case"FROSLASS":case 478:m.pokemon_ids[i]=478;break;case"ROTOM":case 479:m.pokemon_ids[i]=479;break;case"UXIE":case 480:m.pokemon_ids[i]=480;break;case"MESPRIT":case 481:m.pokemon_ids[i]=481;break;case"AZELF":case 482:m.pokemon_ids[i]=482;break;case"DIALGA":case 483:m.pokemon_ids[i]=483;break;case"PALKIA":case 484:m.pokemon_ids[i]=484;break;case"HEATRAN":case 485:m.pokemon_ids[i]=485;break;case"REGIGIGAS":case 486:m.pokemon_ids[i]=486;break;case"GIRATINA":case 487:m.pokemon_ids[i]=487;break;case"CRESSELIA":case 488:m.pokemon_ids[i]=488;break;case"PHIONE":case 489:m.pokemon_ids[i]=489;break;case"MANAPHY":case 490:m.pokemon_ids[i]=490;break;case"DARKRAI":case 491:m.pokemon_ids[i]=491;break;case"SHAYMIN":case 492:m.pokemon_ids[i]=492;break;case"ARCEUS":case 493:m.pokemon_ids[i]=493;break;case"MELTAN":case 808:m.pokemon_ids[i]=808;break;case"MELMETAL":case 809:m.pokemon_ids[i]=809;break}}}return m};WithPokemonCategory.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.pokemon_ids=[]}if(o.defaults){d.category_name=""}if(m.category_name!=null&&m.hasOwnProperty("category_name")){d.category_name=m.category_name}if(m.pokemon_ids&&m.pokemon_ids.length){d.pokemon_ids=[];for(var j=0;j<m.pokemon_ids.length;++j){d.pokemon_ids[j]=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_ids[j]]:m.pokemon_ids[j]}}return d};WithPokemonCategory.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithPokemonCategory}();QuestCondition.WithDailyCaptureBonus=function(){function WithDailyCaptureBonus(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithDailyCaptureBonus.encode=function encode(m,w){if(!w)w=$Writer.create();return w};WithDailyCaptureBonus.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithDailyCaptureBonus;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};WithDailyCaptureBonus.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithDailyCaptureBonus)return d;return new $root.POGOProtos.Data.Quests.QuestCondition.WithDailyCaptureBonus};WithDailyCaptureBonus.toObject=function toObject(){return{}};WithDailyCaptureBonus.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithDailyCaptureBonus}();QuestCondition.WithDailySpinBonus=function(){function WithDailySpinBonus(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithDailySpinBonus.encode=function encode(m,w){if(!w)w=$Writer.create();return w};WithDailySpinBonus.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithDailySpinBonus;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};WithDailySpinBonus.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithDailySpinBonus)return d;return new $root.POGOProtos.Data.Quests.QuestCondition.WithDailySpinBonus};WithDailySpinBonus.toObject=function toObject(){return{}};WithDailySpinBonus.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithDailySpinBonus}();QuestCondition.WithWinRaidStatus=function(){function WithWinRaidStatus(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithWinRaidStatus.encode=function encode(m,w){if(!w)w=$Writer.create();return w};WithWinRaidStatus.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithWinRaidStatus;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};WithWinRaidStatus.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithWinRaidStatus)return d;return new $root.POGOProtos.Data.Quests.QuestCondition.WithWinRaidStatus};WithWinRaidStatus.toObject=function toObject(){return{}};WithWinRaidStatus.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithWinRaidStatus}();QuestCondition.WithRaidLevel=function(){function WithRaidLevel(p){this.raid_level=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithRaidLevel.prototype.raid_level=$util.emptyArray;WithRaidLevel.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.raid_level!=null&&m.raid_level.length){w.uint32(10).fork();for(var i=0;i<m.raid_level.length;++i)w.int32(m.raid_level[i]);w.ldelim()}return w};WithRaidLevel.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithRaidLevel;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.raid_level&&m.raid_level.length))m.raid_level=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.raid_level.push(r.int32())}else m.raid_level.push(r.int32());break;default:r.skipType(t&7);break}}return m};WithRaidLevel.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithRaidLevel)return d;var m=new $root.POGOProtos.Data.Quests.QuestCondition.WithRaidLevel;if(d.raid_level){if(!Array.isArray(d.raid_level))throw TypeError(".POGOProtos.Data.Quests.QuestCondition.WithRaidLevel.raid_level: array expected");m.raid_level=[];for(var i=0;i<d.raid_level.length;++i){switch(d.raid_level[i]){default:case"RAID_LEVEL_UNSET":case 0:m.raid_level[i]=0;break;case"RAID_LEVEL_1":case 1:m.raid_level[i]=1;break;case"RAID_LEVEL_2":case 2:m.raid_level[i]=2;break;case"RAID_LEVEL_3":case 3:m.raid_level[i]=3;break;case"RAID_LEVEL_4":case 4:m.raid_level[i]=4;break;case"RAID_LEVEL_5":case 5:m.raid_level[i]=5;break}}}return m};WithRaidLevel.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.raid_level=[]}if(m.raid_level&&m.raid_level.length){d.raid_level=[];for(var j=0;j<m.raid_level.length;++j){d.raid_level[j]=o.enums===String?$root.POGOProtos.Enums.RaidLevel[m.raid_level[j]]:m.raid_level[j]}}return d};WithRaidLevel.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithRaidLevel}();QuestCondition.WithThrowType=function(){function WithThrowType(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithThrowType.prototype.throw_type=0;WithThrowType.prototype.hit=false;var $oneOfFields;Object.defineProperty(WithThrowType.prototype,"Throw",{get:$util.oneOfGetter($oneOfFields=["throw_type","hit"]),set:$util.oneOfSetter($oneOfFields)});WithThrowType.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.throw_type!=null&&m.hasOwnProperty("throw_type"))w.uint32(8).int32(m.throw_type);if(m.hit!=null&&m.hasOwnProperty("hit"))w.uint32(16).bool(m.hit);return w};WithThrowType.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithThrowType;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.throw_type=r.int32();break;case 2:m.hit=r.bool();break;default:r.skipType(t&7);break}}return m};WithThrowType.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithThrowType)return d;var m=new $root.POGOProtos.Data.Quests.QuestCondition.WithThrowType;switch(d.throw_type){case"ACTIVITY_UNKNOWN":case 0:m.throw_type=0;break;case"ACTIVITY_CATCH_POKEMON":case 1:m.throw_type=1;break;case"ACTIVITY_CATCH_LEGEND_POKEMON":case 2:m.throw_type=2;break;case"ACTIVITY_FLEE_POKEMON":case 3:m.throw_type=3;break;case"ACTIVITY_DEFEAT_FORT":case 4:m.throw_type=4;break;case"ACTIVITY_EVOLVE_POKEMON":case 5:m.throw_type=5;break;case"ACTIVITY_HATCH_EGG":case 6:m.throw_type=6;break;case"ACTIVITY_WALK_KM":case 7:m.throw_type=7;break;case"ACTIVITY_POKEDEX_ENTRY_NEW":case 8:m.throw_type=8;break;case"ACTIVITY_CATCH_FIRST_THROW":case 9:m.throw_type=9;break;case"ACTIVITY_CATCH_NICE_THROW":case 10:m.throw_type=10;break;case"ACTIVITY_CATCH_GREAT_THROW":case 11:m.throw_type=11;break;case"ACTIVITY_CATCH_EXCELLENT_THROW":case 12:m.throw_type=12;break;case"ACTIVITY_CATCH_CURVEBALL":case 13:m.throw_type=13;break;case"ACTIVITY_CATCH_FIRST_CATCH_OF_DAY":case 14:m.throw_type=14;break;case"ACTIVITY_CATCH_MILESTONE":case 15:m.throw_type=15;break;case"ACTIVITY_TRAIN_POKEMON":case 16:m.throw_type=16;break;case"ACTIVITY_SEARCH_FORT":case 17:m.throw_type=17;break;case"ACTIVITY_RELEASE_POKEMON":case 18:m.throw_type=18;break;case"ACTIVITY_HATCH_EGG_SMALL_BONUS":case 19:m.throw_type=19;break;case"ACTIVITY_HATCH_EGG_MEDIUM_BONUS":case 20:m.throw_type=20;break;case"ACTIVITY_HATCH_EGG_LARGE_BONUS":case 21:m.throw_type=21;break;case"ACTIVITY_DEFEAT_GYM_DEFENDER":case 22:m.throw_type=22;break;case"ACTIVITY_DEFEAT_GYM_LEADER":case 23:m.throw_type=23;break;case"ACTIVITY_CATCH_FIRST_CATCH_STREAK_BONUS":case 24:m.throw_type=24;break;case"ACTIVITY_SEARCH_FORT_FIRST_OF_THE_DAY":case 25:m.throw_type=25;break;case"ACTIVITY_SEARCH_FORT_STREAK_BONUS":case 26:m.throw_type=26;break;case"ACTIVITY_DEFEAT_RAID_POKEMON":case 27:m.throw_type=27;break;case"ACTIVITY_FEED_BERRY":case 28:m.throw_type=28;break;case"ACTIVITY_SEARCH_GYM":case 29:m.throw_type=29;break;case"ACTIVITY_NEW_POKESTOP":case 30:m.throw_type=30;break;case"ACTIVITY_GYM_BATTLE_LOSS":case 31:m.throw_type=31;break;case"ACTIVITY_CATCH_AR_PLUS_BONUS":case 32:m.throw_type=32;break;case"ACTIVITY_CATCH_QUEST_POKEMON_ENCOUNTER":case 33:m.throw_type=33;break;case"ACTIVITY_FRIENDSHIP_LEVEL_UP_0":case 35:m.throw_type=35;break;case"ACTIVITY_FRIENDSHIP_LEVEL_UP_1":case 36:m.throw_type=36;break;case"ACTIVITY_FRIENDSHIP_LEVEL_UP_2":case 37:m.throw_type=37;break;case"ACTIVITY_FRIENDSHIP_LEVEL_UP_3":case 38:m.throw_type=38;break;case"ACTIVITY_FRIENDSHIP_LEVEL_UP_4":case 39:m.throw_type=39;break;case"ACTIVITY_SEND_GIFT":case 40:m.throw_type=40;break;case"ACTIVITY_SHARE_EX_RAID_PASS":case 41:m.throw_type=41;break;case"ACTIVITY_RAID_LEVEL_1_ADDITIONAL_XP":case 42:m.throw_type=42;break;case"ACTIVITY_RAID_LEVEL_2_ADDITIONAL_XP":case 43:m.throw_type=43;break;case"ACTIVITY_RAID_LEVEL_3_ADDITIONAL_XP":case 44:m.throw_type=44;break;case"ACTIVITY_RAID_LEVEL_4_ADDITIONAL_XP":case 45:m.throw_type=45;break;case"ACTIVITY_RAID_LEVEL_5_ADDITIONAL_XP":case 46:m.throw_type=46;break}if(d.hit!=null){m.hit=Boolean(d.hit)}return m};WithThrowType.toObject=function toObject(m,o){if(!o)o={};var d={};if(m.throw_type!=null&&m.hasOwnProperty("throw_type")){d.throw_type=o.enums===String?$root.POGOProtos.Enums.ActivityType[m.throw_type]:m.throw_type;if(o.oneofs)d.Throw="throw_type"}if(m.hit!=null&&m.hasOwnProperty("hit")){d.hit=m.hit;if(o.oneofs)d.Throw="hit"}return d};WithThrowType.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithThrowType}();QuestCondition.WithCurveBall=function(){function WithCurveBall(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithCurveBall.encode=function encode(m,w){if(!w)w=$Writer.create();return w};WithCurveBall.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithCurveBall;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};WithCurveBall.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithCurveBall)return d;return new $root.POGOProtos.Data.Quests.QuestCondition.WithCurveBall};WithCurveBall.toObject=function toObject(){return{}};WithCurveBall.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithCurveBall}();QuestCondition.WithWinGymBattleStatus=function(){function WithWinGymBattleStatus(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithWinGymBattleStatus.encode=function encode(m,w){if(!w)w=$Writer.create();return w};WithWinGymBattleStatus.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithWinGymBattleStatus;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};WithWinGymBattleStatus.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithWinGymBattleStatus)return d;return new $root.POGOProtos.Data.Quests.QuestCondition.WithWinGymBattleStatus};WithWinGymBattleStatus.toObject=function toObject(){return{}};WithWinGymBattleStatus.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithWinGymBattleStatus}();QuestCondition.WithSuperEffectiveChargeMove=function(){function WithSuperEffectiveChargeMove(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithSuperEffectiveChargeMove.encode=function encode(m,w){if(!w)w=$Writer.create();return w};WithSuperEffectiveChargeMove.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithSuperEffectiveChargeMove;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};WithSuperEffectiveChargeMove.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithSuperEffectiveChargeMove)return d;return new $root.POGOProtos.Data.Quests.QuestCondition.WithSuperEffectiveChargeMove};WithSuperEffectiveChargeMove.toObject=function toObject(){return{}};WithSuperEffectiveChargeMove.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithSuperEffectiveChargeMove}();QuestCondition.WithItem=function(){function WithItem(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithItem.prototype.item=0;WithItem.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item!=null&&m.hasOwnProperty("item"))w.uint32(8).int32(m.item);return w};WithItem.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithItem;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item=r.int32();break;default:r.skipType(t&7);break}}return m};WithItem.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithItem)return d;var m=new $root.POGOProtos.Data.Quests.QuestCondition.WithItem;switch(d.item){case"ITEM_UNKNOWN":case 0:m.item=0;break;case"ITEM_POKE_BALL":case 1:m.item=1;break;case"ITEM_GREAT_BALL":case 2:m.item=2;break;case"ITEM_ULTRA_BALL":case 3:m.item=3;break;case"ITEM_MASTER_BALL":case 4:m.item=4;break;case"ITEM_PREMIER_BALL":case 5:m.item=5;break;case"ITEM_POTION":case 101:m.item=101;break;case"ITEM_SUPER_POTION":case 102:m.item=102;break;case"ITEM_HYPER_POTION":case 103:m.item=103;break;case"ITEM_MAX_POTION":case 104:m.item=104;break;case"ITEM_REVIVE":case 201:m.item=201;break;case"ITEM_MAX_REVIVE":case 202:m.item=202;break;case"ITEM_LUCKY_EGG":case 301:m.item=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item=402;break;case"ITEM_INCENSE_COOL":case 403:m.item=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item=405;break;case"ITEM_TROY_DISK":case 501:m.item=501;break;case"ITEM_X_ATTACK":case 602:m.item=602;break;case"ITEM_X_DEFENSE":case 603:m.item=603;break;case"ITEM_X_MIRACLE":case 604:m.item=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item=701;break;case"ITEM_BLUK_BERRY":case 702:m.item=702;break;case"ITEM_NANAB_BERRY":case 703:m.item=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item=704;break;case"ITEM_PINAP_BERRY":case 705:m.item=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item=1002;break;case"ITEM_SUN_STONE":case 1101:m.item=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item=1102;break;case"ITEM_METAL_COAT":case 1103:m.item=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item=1104;break;case"ITEM_UP_GRADE":case 1105:m.item=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item=1405;break}return m};WithItem.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item=o.enums===String?"ITEM_UNKNOWN":0}if(m.item!=null&&m.hasOwnProperty("item")){d.item=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item]:m.item}return d};WithItem.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithItem}();QuestCondition.WithUniquePokestop=function(){function WithUniquePokestop(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithUniquePokestop.encode=function encode(m,w){if(!w)w=$Writer.create();return w};WithUniquePokestop.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithUniquePokestop;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};WithUniquePokestop.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithUniquePokestop)return d;return new $root.POGOProtos.Data.Quests.QuestCondition.WithUniquePokestop};WithUniquePokestop.toObject=function toObject(){return{}};WithUniquePokestop.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithUniquePokestop}();QuestCondition.WithQuestContext=function(){function WithQuestContext(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithQuestContext.prototype.context=0;WithQuestContext.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.context!=null&&m.hasOwnProperty("context"))w.uint32(8).int32(m.context);return w};WithQuestContext.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithQuestContext;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.context=r.int32();break;default:r.skipType(t&7);break}}return m};WithQuestContext.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithQuestContext)return d;var m=new $root.POGOProtos.Data.Quests.QuestCondition.WithQuestContext;switch(d.context){case"UNSET":case 0:m.context=0;break;case"STORY_QUEST":case 1:m.context=1;break;case"CHALLENGE_QUEST":case 2:m.context=2;break}return m};WithQuestContext.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.context=o.enums===String?"UNSET":0}if(m.context!=null&&m.hasOwnProperty("context")){d.context=o.enums===String?$root.POGOProtos.Data.Quests.QuestCondition.WithQuestContext.Context[m.context]:m.context}return d};WithQuestContext.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};WithQuestContext.Context=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="STORY_QUEST"]=1;values[valuesById[2]="CHALLENGE_QUEST"]=2;return values}();return WithQuestContext}();QuestCondition.WithBadgeType=function(){function WithBadgeType(p){this.badge_type=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithBadgeType.prototype.badge_type=$util.emptyArray;WithBadgeType.prototype.badge_rank=0;WithBadgeType.prototype.amount=0;WithBadgeType.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.badge_type!=null&&m.badge_type.length){w.uint32(10).fork();for(var i=0;i<m.badge_type.length;++i)w.int32(m.badge_type[i]);w.ldelim()}if(m.badge_rank!=null&&m.hasOwnProperty("badge_rank"))w.uint32(16).int32(m.badge_rank);if(m.amount!=null&&m.hasOwnProperty("amount"))w.uint32(24).int32(m.amount);return w};WithBadgeType.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithBadgeType;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.badge_type&&m.badge_type.length))m.badge_type=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.badge_type.push(r.int32())}else m.badge_type.push(r.int32());break;case 2:m.badge_rank=r.int32();break;case 3:m.amount=r.int32();break;default:r.skipType(t&7);break}}return m};WithBadgeType.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithBadgeType)return d;var m=new $root.POGOProtos.Data.Quests.QuestCondition.WithBadgeType;if(d.badge_type){if(!Array.isArray(d.badge_type))throw TypeError(".POGOProtos.Data.Quests.QuestCondition.WithBadgeType.badge_type: array expected");m.badge_type=[];for(var i=0;i<d.badge_type.length;++i){switch(d.badge_type[i]){default:case"BADGE_UNSET":case 0:m.badge_type[i]=0;break;case"BADGE_TRAVEL_KM":case 1:m.badge_type[i]=1;break;case"BADGE_POKEDEX_ENTRIES":case 2:m.badge_type[i]=2;break;case"BADGE_CAPTURE_TOTAL":case 3:m.badge_type[i]=3;break;case"BADGE_DEFEATED_FORT":case 4:m.badge_type[i]=4;break;case"BADGE_EVOLVED_TOTAL":case 5:m.badge_type[i]=5;break;case"BADGE_HATCHED_TOTAL":case 6:m.badge_type[i]=6;break;case"BADGE_ENCOUNTERED_TOTAL":case 7:m.badge_type[i]=7;break;case"BADGE_POKESTOPS_VISITED":case 8:m.badge_type[i]=8;break;case"BADGE_UNIQUE_POKESTOPS":case 9:m.badge_type[i]=9;break;case"BADGE_POKEBALL_THROWN":case 10:m.badge_type[i]=10;break;case"BADGE_BIG_MAGIKARP":case 11:m.badge_type[i]=11;break;case"BADGE_DEPLOYED_TOTAL":case 12:m.badge_type[i]=12;break;case"BADGE_BATTLE_ATTACK_WON":case 13:m.badge_type[i]=13;break;case"BADGE_BATTLE_TRAINING_WON":case 14:m.badge_type[i]=14;break;case"BADGE_BATTLE_DEFEND_WON":case 15:m.badge_type[i]=15;break;case"BADGE_PRESTIGE_RAISED":case 16:m.badge_type[i]=16;break;case"BADGE_PRESTIGE_DROPPED":case 17:m.badge_type[i]=17;break;case"BADGE_TYPE_NORMAL":case 18:m.badge_type[i]=18;break;case"BADGE_TYPE_FIGHTING":case 19:m.badge_type[i]=19;break;case"BADGE_TYPE_FLYING":case 20:m.badge_type[i]=20;break;case"BADGE_TYPE_POISON":case 21:m.badge_type[i]=21;break;case"BADGE_TYPE_GROUND":case 22:m.badge_type[i]=22;break;case"BADGE_TYPE_ROCK":case 23:m.badge_type[i]=23;break;case"BADGE_TYPE_BUG":case 24:m.badge_type[i]=24;break;case"BADGE_TYPE_GHOST":case 25:m.badge_type[i]=25;break;case"BADGE_TYPE_STEEL":case 26:m.badge_type[i]=26;break;case"BADGE_TYPE_FIRE":case 27:m.badge_type[i]=27;break;case"BADGE_TYPE_WATER":case 28:m.badge_type[i]=28;break;case"BADGE_TYPE_GRASS":case 29:m.badge_type[i]=29;break;case"BADGE_TYPE_ELECTRIC":case 30:m.badge_type[i]=30;break;case"BADGE_TYPE_PSYCHIC":case 31:m.badge_type[i]=31;break;case"BADGE_TYPE_ICE":case 32:m.badge_type[i]=32;break;case"BADGE_TYPE_DRAGON":case 33:m.badge_type[i]=33;break;case"BADGE_TYPE_DARK":case 34:m.badge_type[i]=34;break;case"BADGE_TYPE_FAIRY":case 35:m.badge_type[i]=35;break;case"BADGE_SMALL_RATTATA":case 36:m.badge_type[i]=36;break;case"BADGE_PIKACHU":case 37:m.badge_type[i]=37;break;case"BADGE_UNOWN":case 38:m.badge_type[i]=38;break;case"BADGE_POKEDEX_ENTRIES_GEN2":case 39:m.badge_type[i]=39;break;case"BADGE_RAID_BATTLE_WON":case 40:m.badge_type[i]=40;break;case"BADGE_LEGENDARY_BATTLE_WON":case 41:m.badge_type[i]=41;break;case"BADGE_BERRIES_FED":case 42:m.badge_type[i]=42;break;case"BADGE_HOURS_DEFENDED":case 43:m.badge_type[i]=43;break;case"BADGE_PLACE_HOLDER":case 44:m.badge_type[i]=44;break;case"BADGE_POKEDEX_ENTRIES_GEN3":case 45:m.badge_type[i]=45;break;case"BADGE_CHALLENGE_QUESTS":case 46:m.badge_type[i]=46;break;case"BADGE_MEW_ENCOUNTER":case 47:m.badge_type[i]=47;break;case"BADGE_MAX_LEVEL_FRIENDS":case 48:m.badge_type[i]=48;break;case"BADGE_TRADING":case 49:m.badge_type[i]=49;break;case"BADGE_TRADING_DISTANCE":case 50:m.badge_type[i]=50;break;case"BADGE_POKEDEX_ENTRIES_GEN4":case 51:m.badge_type[i]=51;break;case"BADGE_GREAT_LEAGUE":case 52:m.badge_type[i]=52;break;case"BADGE_ULTRA_LEAGUE":case 53:m.badge_type[i]=53;break;case"BADGE_MASTER_LEAGUE":case 54:m.badge_type[i]=54;break;case"BADGE_EVENT_MIN":case 2e3:m.badge_type[i]=2e3;break;case"BADGE_CHICAGO_FEST_JULY_2017":case 2001:m.badge_type[i]=2001;break;case"BADGE_PIKACHU_OUTBREAK_YOKOHAMA_2017":case 2002:m.badge_type[i]=2002;break;case"BADGE_SAFARI_ZONE_EUROPE_2017":case 2003:m.badge_type[i]=2003;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_07":case 2004:m.badge_type[i]=2004;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_14":case 2005:m.badge_type[i]=2005;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_NORTH":case 2006:m.badge_type[i]=2006;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_SOUTH":case 2007:m.badge_type[i]=2007;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_NORTH":case 2008:m.badge_type[i]=2008;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_SOUTH":case 2009:m.badge_type[i]=2009;break;case"BADGE_APAC_PARTNER_JULY_2018_0":case 2010:m.badge_type[i]=2010;break;case"BADGE_APAC_PARTNER_JULY_2018_1":case 2011:m.badge_type[i]=2011;break;case"BADGE_APAC_PARTNER_JULY_2018_2":case 2012:m.badge_type[i]=2012;break;case"BADGE_APAC_PARTNER_JULY_2018_3":case 2013:m.badge_type[i]=2013;break;case"BADGE_APAC_PARTNER_JULY_2018_4":case 2014:m.badge_type[i]=2014;break;case"BADGE_APAC_PARTNER_JULY_2018_5":case 2015:m.badge_type[i]=2015;break;case"BADGE_APAC_PARTNER_JULY_2018_6":case 2016:m.badge_type[i]=2016;break;case"BADGE_APAC_PARTNER_JULY_2018_7":case 2017:m.badge_type[i]=2017;break;case"BADGE_APAC_PARTNER_JULY_2018_8":case 2018:m.badge_type[i]=2018;break;case"BADGE_APAC_PARTNER_JULY_2018_9":case 2019:m.badge_type[i]=2019;break;case"BADGE_YOKOSUKA_29_AUG_2018_MIKASA":case 2020:m.badge_type[i]=2020;break;case"BADGE_YOKOSUKA_29_AUG_2018_VERNY":case 2021:m.badge_type[i]=2021;break;case"BADGE_YOKOSUKA_29_AUG_2018_KURIHAMA":case 2022:m.badge_type[i]=2022;break;case"BADGE_YOKOSUKA_30_AUG_2018_MIKASA":case 2023:m.badge_type[i]=2023;break;case"BADGE_YOKOSUKA_30_AUG_2018_VERNY":case 2024:m.badge_type[i]=2024;break;case"BADGE_YOKOSUKA_30_AUG_2018_KURIHAMA":case 2025:m.badge_type[i]=2025;break;case"BADGE_YOKOSUKA_31_AUG_2018_MIKASA":case 2026:m.badge_type[i]=2026;break;case"BADGE_YOKOSUKA_31_AUG_2018_VERNY":case 2027:m.badge_type[i]=2027;break;case"BADGE_YOKOSUKA_31_AUG_2018_KURIHAMA":case 2028:m.badge_type[i]=2028;break;case"BADGE_YOKOSUKA_1_SEP_2018_MIKASA":case 2029:m.badge_type[i]=2029;break;case"BADGE_YOKOSUKA_1_SEP_2018_VERNY":case 2030:m.badge_type[i]=2030;break;case"BADGE_YOKOSUKA_1_SEP_2018_KURIHAMA":case 2031:m.badge_type[i]=2031;break;case"BADGE_YOKOSUKA_2_SEP_2018_MIKASA":case 2032:m.badge_type[i]=2032;break;case"BADGE_YOKOSUKA_2_SEP_2018_VERNY":case 2033:m.badge_type[i]=2033;break;case"BADGE_YOKOSUKA_2_SEP_2018_KURIHAMA":case 2034:m.badge_type[i]=2034;break;case"BADGE_TOP_BANANA_1":case 2035:m.badge_type[i]=2035;break;case"BADGE_TOP_BANANA_2":case 2036:m.badge_type[i]=2036;break;case"BADGE_TOP_BANANA_3":case 2037:m.badge_type[i]=2037;break}}}if(d.badge_rank!=null){m.badge_rank=d.badge_rank|0}if(d.amount!=null){m.amount=d.amount|0}return m};WithBadgeType.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.badge_type=[]}if(o.defaults){d.badge_rank=0;d.amount=0}if(m.badge_type&&m.badge_type.length){d.badge_type=[];for(var j=0;j<m.badge_type.length;++j){d.badge_type[j]=o.enums===String?$root.POGOProtos.Enums.BadgeType[m.badge_type[j]]:m.badge_type[j]}}if(m.badge_rank!=null&&m.hasOwnProperty("badge_rank")){d.badge_rank=m.badge_rank}if(m.amount!=null&&m.hasOwnProperty("amount")){d.amount=m.amount}return d};WithBadgeType.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithBadgeType}();QuestCondition.WithPlayerLevel=function(){function WithPlayerLevel(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithPlayerLevel.prototype.level=0;WithPlayerLevel.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.level!=null&&m.hasOwnProperty("level"))w.uint32(8).int32(m.level);return w};WithPlayerLevel.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithPlayerLevel;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.level=r.int32();break;default:r.skipType(t&7);break}}return m};WithPlayerLevel.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithPlayerLevel)return d;var m=new $root.POGOProtos.Data.Quests.QuestCondition.WithPlayerLevel;if(d.level!=null){m.level=d.level|0}return m};WithPlayerLevel.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.level=0}if(m.level!=null&&m.hasOwnProperty("level")){d.level=m.level}return d};WithPlayerLevel.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithPlayerLevel}();QuestCondition.WithWinBattleStatus=function(){function WithWinBattleStatus(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WithWinBattleStatus.encode=function encode(m,w){if(!w)w=$Writer.create();return w};WithWinBattleStatus.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestCondition.WithWinBattleStatus;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};WithWinBattleStatus.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestCondition.WithWinBattleStatus)return d;return new $root.POGOProtos.Data.Quests.QuestCondition.WithWinBattleStatus};WithWinBattleStatus.toObject=function toObject(){return{}};WithWinBattleStatus.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WithWinBattleStatus}();return QuestCondition}();Quests.QuestDialog=function(){function QuestDialog(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}QuestDialog.prototype.text="";QuestDialog.prototype.expression=0;QuestDialog.prototype.image_uri="";QuestDialog.prototype.character=0;QuestDialog.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.text!=null&&m.hasOwnProperty("text"))w.uint32(10).string(m.text);if(m.expression!=null&&m.hasOwnProperty("expression"))w.uint32(16).int32(m.expression);if(m.image_uri!=null&&m.hasOwnProperty("image_uri"))w.uint32(26).string(m.image_uri);if(m.character!=null&&m.hasOwnProperty("character"))w.uint32(32).int32(m.character);return w};QuestDialog.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestDialog;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.text=r.string();break;case 2:m.expression=r.int32();break;case 3:m.image_uri=r.string();break;case 4:m.character=r.int32();break;default:r.skipType(t&7);break}}return m};QuestDialog.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestDialog)return d;var m=new $root.POGOProtos.Data.Quests.QuestDialog;if(d.text!=null){m.text=String(d.text)}switch(d.expression){case"EXPRESSION_UNSET":case 0:m.expression=0;break;case"HAPPY":case 1:m.expression=1;break;case"SYMPATHETIC":case 2:m.expression=2;break;case"ENERGETIC":case 3:m.expression=3;break;case"PUSHY":case 4:m.expression=4;break;case"IMPATIENT":case 5:m.expression=5;break;case"ADMIRATION":case 6:m.expression=6;break}if(d.image_uri!=null){m.image_uri=String(d.image_uri)}switch(d.character){case"CHARACTER_UNSET":case 0:m.character=0;break;case"PROFESSOR_WILLOW":case 1:m.character=1;break}return m};QuestDialog.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.text="";d.expression=o.enums===String?"EXPRESSION_UNSET":0;d.image_uri="";d.character=o.enums===String?"CHARACTER_UNSET":0}if(m.text!=null&&m.hasOwnProperty("text")){d.text=m.text}if(m.expression!=null&&m.hasOwnProperty("expression")){d.expression=o.enums===String?$root.POGOProtos.Data.Quests.QuestDialog.CharacterExpression[m.expression]:m.expression}if(m.image_uri!=null&&m.hasOwnProperty("image_uri")){d.image_uri=m.image_uri}if(m.character!=null&&m.hasOwnProperty("character")){d.character=o.enums===String?$root.POGOProtos.Data.Quests.QuestDialog.Character[m.character]:m.character}return d};QuestDialog.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};QuestDialog.CharacterExpression=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="EXPRESSION_UNSET"]=0;values[valuesById[1]="HAPPY"]=1;values[valuesById[2]="SYMPATHETIC"]=2;values[valuesById[3]="ENERGETIC"]=3;values[valuesById[4]="PUSHY"]=4;values[valuesById[5]="IMPATIENT"]=5;values[valuesById[6]="ADMIRATION"]=6;return values}();QuestDialog.Character=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="CHARACTER_UNSET"]=0;values[valuesById[1]="PROFESSOR_WILLOW"]=1;return values}();return QuestDialog}();Quests.QuestGoal=function(){function QuestGoal(p){this.condition=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}QuestGoal.prototype.condition=$util.emptyArray;QuestGoal.prototype.target=0;QuestGoal.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.condition!=null&&m.condition.length){for(var i=0;i<m.condition.length;++i)$root.POGOProtos.Data.Quests.QuestCondition.encode(m.condition[i],w.uint32(10).fork()).ldelim()}if(m.target!=null&&m.hasOwnProperty("target"))w.uint32(16).int32(m.target);return w};QuestGoal.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestGoal;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.condition&&m.condition.length))m.condition=[];m.condition.push($root.POGOProtos.Data.Quests.QuestCondition.decode(r,r.uint32()));break;case 2:m.target=r.int32();break;default:r.skipType(t&7);break}}return m};QuestGoal.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestGoal)return d;var m=new $root.POGOProtos.Data.Quests.QuestGoal;if(d.condition){if(!Array.isArray(d.condition))throw TypeError(".POGOProtos.Data.Quests.QuestGoal.condition: array expected");m.condition=[];for(var i=0;i<d.condition.length;++i){if(typeof d.condition[i]!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestGoal.condition: object expected");m.condition[i]=$root.POGOProtos.Data.Quests.QuestCondition.fromObject(d.condition[i])}}if(d.target!=null){m.target=d.target|0}return m};QuestGoal.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.condition=[]}if(o.defaults){d.target=0}if(m.condition&&m.condition.length){d.condition=[];for(var j=0;j<m.condition.length;++j){d.condition[j]=$root.POGOProtos.Data.Quests.QuestCondition.toObject(m.condition[j],o)}}if(m.target!=null&&m.hasOwnProperty("target")){d.target=m.target}return d};QuestGoal.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return QuestGoal}();Quests.QuestPokemonEncounter=function(){function QuestPokemonEncounter(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}QuestPokemonEncounter.prototype.quest_id="";QuestPokemonEncounter.prototype.pokemon=null;QuestPokemonEncounter.prototype.encounter_type=0;QuestPokemonEncounter.prototype.is_hidden_ditto=false;QuestPokemonEncounter.prototype.ditto=null;QuestPokemonEncounter.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.quest_id!=null&&m.hasOwnProperty("quest_id"))w.uint32(10).string(m.quest_id);if(m.pokemon!=null&&m.hasOwnProperty("pokemon"))$root.POGOProtos.Data.PokemonData.encode(m.pokemon,w.uint32(18).fork()).ldelim();if(m.encounter_type!=null&&m.hasOwnProperty("encounter_type"))w.uint32(24).int32(m.encounter_type);if(m.is_hidden_ditto!=null&&m.hasOwnProperty("is_hidden_ditto"))w.uint32(32).bool(m.is_hidden_ditto);if(m.ditto!=null&&m.hasOwnProperty("ditto"))$root.POGOProtos.Data.PokemonData.encode(m.ditto,w.uint32(42).fork()).ldelim();return w};QuestPokemonEncounter.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestPokemonEncounter;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.quest_id=r.string();break;case 2:m.pokemon=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 3:m.encounter_type=r.int32();break;case 4:m.is_hidden_ditto=r.bool();break;case 5:m.ditto=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};QuestPokemonEncounter.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestPokemonEncounter)return d;var m=new $root.POGOProtos.Data.Quests.QuestPokemonEncounter;if(d.quest_id!=null){m.quest_id=String(d.quest_id)}if(d.pokemon!=null){if(typeof d.pokemon!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestPokemonEncounter.pokemon: object expected");m.pokemon=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon)}switch(d.encounter_type){case"SPAWN_POINT":case 0:m.encounter_type=0;break;case"INCENSE":case 1:m.encounter_type=1;break;case"DISK":case 2:m.encounter_type=2;break;case"POST_RAID":case 3:m.encounter_type=3;break;case"STORY_QUEST":case 4:m.encounter_type=4;break;case"QUEST_STAMP_CARD":case 5:m.encounter_type=5;break;case"CHALLENGE_QUEST":case 6:m.encounter_type=6;break}if(d.is_hidden_ditto!=null){m.is_hidden_ditto=Boolean(d.is_hidden_ditto)}if(d.ditto!=null){if(typeof d.ditto!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestPokemonEncounter.ditto: object expected");m.ditto=$root.POGOProtos.Data.PokemonData.fromObject(d.ditto)}return m};QuestPokemonEncounter.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.quest_id="";d.pokemon=null;d.encounter_type=o.enums===String?"SPAWN_POINT":0;d.is_hidden_ditto=false;d.ditto=null}if(m.quest_id!=null&&m.hasOwnProperty("quest_id")){d.quest_id=m.quest_id}if(m.pokemon!=null&&m.hasOwnProperty("pokemon")){d.pokemon=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon,o)}if(m.encounter_type!=null&&m.hasOwnProperty("encounter_type")){d.encounter_type=o.enums===String?$root.POGOProtos.Enums.EncounterType[m.encounter_type]:m.encounter_type}if(m.is_hidden_ditto!=null&&m.hasOwnProperty("is_hidden_ditto")){d.is_hidden_ditto=m.is_hidden_ditto}if(m.ditto!=null&&m.hasOwnProperty("ditto")){d.ditto=$root.POGOProtos.Data.PokemonData.toObject(m.ditto,o)}return d};QuestPokemonEncounter.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return QuestPokemonEncounter}();Quests.QuestPrecondition=function(){function QuestPrecondition(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}QuestPrecondition.prototype.type=0;QuestPrecondition.prototype.quest_template_id="";QuestPrecondition.prototype.level=null;QuestPrecondition.prototype.medal=null;QuestPrecondition.prototype.quests=null;var $oneOfFields;Object.defineProperty(QuestPrecondition.prototype,"Condition",{get:$util.oneOfGetter($oneOfFields=["quest_template_id","level","medal","quests"]),set:$util.oneOfSetter($oneOfFields)});QuestPrecondition.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(8).int32(m.type);if(m.quest_template_id!=null&&m.hasOwnProperty("quest_template_id"))w.uint32(18).string(m.quest_template_id);if(m.level!=null&&m.hasOwnProperty("level"))$root.POGOProtos.Data.Quests.QuestPrecondition.Level.encode(m.level,w.uint32(26).fork()).ldelim();if(m.medal!=null&&m.hasOwnProperty("medal"))$root.POGOProtos.Data.Quests.QuestPrecondition.Medal.encode(m.medal,w.uint32(34).fork()).ldelim();if(m.quests!=null&&m.hasOwnProperty("quests"))$root.POGOProtos.Data.Quests.QuestPrecondition.Quests.encode(m.quests,w.uint32(42).fork()).ldelim();return w};QuestPrecondition.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestPrecondition;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.type=r.int32();break;case 2:m.quest_template_id=r.string();break;case 3:m.level=$root.POGOProtos.Data.Quests.QuestPrecondition.Level.decode(r,r.uint32());break;case 4:m.medal=$root.POGOProtos.Data.Quests.QuestPrecondition.Medal.decode(r,r.uint32());break;case 5:m.quests=$root.POGOProtos.Data.Quests.QuestPrecondition.Quests.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};QuestPrecondition.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestPrecondition)return d;var m=new $root.POGOProtos.Data.Quests.QuestPrecondition;switch(d.type){case"QUEST_PRECONDITION_UNSET":case 0:m.type=0;break;case"QUEST_PRECONDITION_QUEST":case 1:m.type=1;break;case"QUEST_PRECONDITION_LEVEL":case 2:m.type=2;break;case"QUEST_PRECONDITION_MEDAL":case 3:m.type=3;break;case"QUEST_PRECONDITION_IS_MINOR":case 4:m.type=4;break;case"QUEST_PRECONDITION_EXCLUSIVE_QUESTS":case 5:m.type=5;break}if(d.quest_template_id!=null){m.quest_template_id=String(d.quest_template_id)}if(d.level!=null){if(typeof d.level!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestPrecondition.level: object expected");m.level=$root.POGOProtos.Data.Quests.QuestPrecondition.Level.fromObject(d.level)}if(d.medal!=null){if(typeof d.medal!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestPrecondition.medal: object expected");m.medal=$root.POGOProtos.Data.Quests.QuestPrecondition.Medal.fromObject(d.medal)}if(d.quests!=null){if(typeof d.quests!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestPrecondition.quests: object expected");m.quests=$root.POGOProtos.Data.Quests.QuestPrecondition.Quests.fromObject(d.quests)}return m};QuestPrecondition.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.type=o.enums===String?"QUEST_PRECONDITION_UNSET":0}if(m.type!=null&&m.hasOwnProperty("type")){d.type=o.enums===String?$root.POGOProtos.Data.Quests.QuestPrecondition.QuestPreconditionType[m.type]:m.type}if(m.quest_template_id!=null&&m.hasOwnProperty("quest_template_id")){d.quest_template_id=m.quest_template_id;if(o.oneofs)d.Condition="quest_template_id"}if(m.level!=null&&m.hasOwnProperty("level")){d.level=$root.POGOProtos.Data.Quests.QuestPrecondition.Level.toObject(m.level,o);if(o.oneofs)d.Condition="level"}if(m.medal!=null&&m.hasOwnProperty("medal")){d.medal=$root.POGOProtos.Data.Quests.QuestPrecondition.Medal.toObject(m.medal,o);if(o.oneofs)d.Condition="medal"}if(m.quests!=null&&m.hasOwnProperty("quests")){d.quests=$root.POGOProtos.Data.Quests.QuestPrecondition.Quests.toObject(m.quests,o);if(o.oneofs)d.Condition="quests"}return d};QuestPrecondition.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};QuestPrecondition.Operator=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="EQUALS"]=1;values[valuesById[2]="GREATER_THAN"]=2;values[valuesById[3]="LESS_THAN"]=3;return values}();QuestPrecondition.QuestPreconditionType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="QUEST_PRECONDITION_UNSET"]=0;values[valuesById[1]="QUEST_PRECONDITION_QUEST"]=1;values[valuesById[2]="QUEST_PRECONDITION_LEVEL"]=2;values[valuesById[3]="QUEST_PRECONDITION_MEDAL"]=3;values[valuesById[4]="QUEST_PRECONDITION_IS_MINOR"]=4;values[valuesById[5]="QUEST_PRECONDITION_EXCLUSIVE_QUESTS"]=5;return values}();QuestPrecondition.Quests=function(){function Quests(p){this.quest_template_ids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Quests.prototype.quest_template_ids=$util.emptyArray;Quests.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.quest_template_ids!=null&&m.quest_template_ids.length){for(var i=0;i<m.quest_template_ids.length;++i)w.uint32(10).string(m.quest_template_ids[i])}return w};Quests.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestPrecondition.Quests;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.quest_template_ids&&m.quest_template_ids.length))m.quest_template_ids=[];m.quest_template_ids.push(r.string());break;default:r.skipType(t&7);break}}return m};Quests.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestPrecondition.Quests)return d;var m=new $root.POGOProtos.Data.Quests.QuestPrecondition.Quests;if(d.quest_template_ids){if(!Array.isArray(d.quest_template_ids))throw TypeError(".POGOProtos.Data.Quests.QuestPrecondition.Quests.quest_template_ids: array expected");m.quest_template_ids=[];for(var i=0;i<d.quest_template_ids.length;++i){m.quest_template_ids[i]=String(d.quest_template_ids[i])}}return m};Quests.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.quest_template_ids=[]}if(m.quest_template_ids&&m.quest_template_ids.length){d.quest_template_ids=[];for(var j=0;j<m.quest_template_ids.length;++j){d.quest_template_ids[j]=m.quest_template_ids[j]}}return d};Quests.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Quests}();QuestPrecondition.Level=function(){function Level(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Level.prototype.operator=0;Level.prototype.level=0;Level.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.operator!=null&&m.hasOwnProperty("operator"))w.uint32(8).int32(m.operator);if(m.level!=null&&m.hasOwnProperty("level"))w.uint32(16).int32(m.level);return w};Level.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestPrecondition.Level;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.operator=r.int32();break;case 2:m.level=r.int32();break;default:r.skipType(t&7);break}}return m};Level.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestPrecondition.Level)return d;var m=new $root.POGOProtos.Data.Quests.QuestPrecondition.Level;switch(d.operator){case"UNSET":case 0:m.operator=0;break;case"EQUALS":case 1:m.operator=1;break;case"GREATER_THAN":case 2:m.operator=2;break;case"LESS_THAN":case 3:m.operator=3;break}if(d.level!=null){m.level=d.level|0}return m};Level.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.operator=o.enums===String?"UNSET":0;d.level=0}if(m.operator!=null&&m.hasOwnProperty("operator")){d.operator=o.enums===String?$root.POGOProtos.Data.Quests.QuestPrecondition.Operator[m.operator]:m.operator}if(m.level!=null&&m.hasOwnProperty("level")){d.level=m.level}return d};Level.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Level}();QuestPrecondition.Medal=function(){function Medal(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Medal.prototype.type=0;Medal.prototype.operator=0;Medal.prototype.badge_rank=0;Medal.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(8).int32(m.type);if(m.operator!=null&&m.hasOwnProperty("operator"))w.uint32(16).int32(m.operator);if(m.badge_rank!=null&&m.hasOwnProperty("badge_rank"))w.uint32(24).int32(m.badge_rank);return w};Medal.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestPrecondition.Medal;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.type=r.int32();break;case 2:m.operator=r.int32();break;case 3:m.badge_rank=r.int32();break;default:r.skipType(t&7);break}}return m};Medal.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestPrecondition.Medal)return d;var m=new $root.POGOProtos.Data.Quests.QuestPrecondition.Medal;switch(d.type){case"BADGE_UNSET":case 0:m.type=0;break;case"BADGE_TRAVEL_KM":case 1:m.type=1;break;case"BADGE_POKEDEX_ENTRIES":case 2:m.type=2;break;case"BADGE_CAPTURE_TOTAL":case 3:m.type=3;break;case"BADGE_DEFEATED_FORT":case 4:m.type=4;break;case"BADGE_EVOLVED_TOTAL":case 5:m.type=5;break;case"BADGE_HATCHED_TOTAL":case 6:m.type=6;break;case"BADGE_ENCOUNTERED_TOTAL":case 7:m.type=7;break;case"BADGE_POKESTOPS_VISITED":case 8:m.type=8;break;case"BADGE_UNIQUE_POKESTOPS":case 9:m.type=9;break;case"BADGE_POKEBALL_THROWN":case 10:m.type=10;break;case"BADGE_BIG_MAGIKARP":case 11:m.type=11;break;case"BADGE_DEPLOYED_TOTAL":case 12:m.type=12;break;case"BADGE_BATTLE_ATTACK_WON":case 13:m.type=13;break;case"BADGE_BATTLE_TRAINING_WON":case 14:m.type=14;break;case"BADGE_BATTLE_DEFEND_WON":case 15:m.type=15;break;case"BADGE_PRESTIGE_RAISED":case 16:m.type=16;break;case"BADGE_PRESTIGE_DROPPED":case 17:m.type=17;break;case"BADGE_TYPE_NORMAL":case 18:m.type=18;break;case"BADGE_TYPE_FIGHTING":case 19:m.type=19;break;case"BADGE_TYPE_FLYING":case 20:m.type=20;break;case"BADGE_TYPE_POISON":case 21:m.type=21;break;case"BADGE_TYPE_GROUND":case 22:m.type=22;break;case"BADGE_TYPE_ROCK":case 23:m.type=23;break;case"BADGE_TYPE_BUG":case 24:m.type=24;break;case"BADGE_TYPE_GHOST":case 25:m.type=25;break;case"BADGE_TYPE_STEEL":case 26:m.type=26;break;case"BADGE_TYPE_FIRE":case 27:m.type=27;break;case"BADGE_TYPE_WATER":case 28:m.type=28;break;case"BADGE_TYPE_GRASS":case 29:m.type=29;break;case"BADGE_TYPE_ELECTRIC":case 30:m.type=30;break;case"BADGE_TYPE_PSYCHIC":case 31:m.type=31;break;case"BADGE_TYPE_ICE":case 32:m.type=32;break;case"BADGE_TYPE_DRAGON":case 33:m.type=33;break;case"BADGE_TYPE_DARK":case 34:m.type=34;break;case"BADGE_TYPE_FAIRY":case 35:m.type=35;break;case"BADGE_SMALL_RATTATA":case 36:m.type=36;break;case"BADGE_PIKACHU":case 37:m.type=37;break;case"BADGE_UNOWN":case 38:m.type=38;break;case"BADGE_POKEDEX_ENTRIES_GEN2":case 39:m.type=39;break;case"BADGE_RAID_BATTLE_WON":case 40:m.type=40;break;case"BADGE_LEGENDARY_BATTLE_WON":case 41:m.type=41;break;case"BADGE_BERRIES_FED":case 42:m.type=42;break;case"BADGE_HOURS_DEFENDED":case 43:m.type=43;break;case"BADGE_PLACE_HOLDER":case 44:m.type=44;break;case"BADGE_POKEDEX_ENTRIES_GEN3":case 45:m.type=45;break;case"BADGE_CHALLENGE_QUESTS":case 46:m.type=46;break;case"BADGE_MEW_ENCOUNTER":case 47:m.type=47;break;case"BADGE_MAX_LEVEL_FRIENDS":case 48:m.type=48;break;case"BADGE_TRADING":case 49:m.type=49;break;case"BADGE_TRADING_DISTANCE":case 50:m.type=50;break;case"BADGE_POKEDEX_ENTRIES_GEN4":case 51:m.type=51;break;case"BADGE_GREAT_LEAGUE":case 52:m.type=52;break;case"BADGE_ULTRA_LEAGUE":case 53:m.type=53;break;case"BADGE_MASTER_LEAGUE":case 54:m.type=54;break;case"BADGE_EVENT_MIN":case 2e3:m.type=2e3;break;case"BADGE_CHICAGO_FEST_JULY_2017":case 2001:m.type=2001;break;case"BADGE_PIKACHU_OUTBREAK_YOKOHAMA_2017":case 2002:m.type=2002;break;case"BADGE_SAFARI_ZONE_EUROPE_2017":case 2003:m.type=2003;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_07":case 2004:m.type=2004;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_14":case 2005:m.type=2005;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_NORTH":case 2006:m.type=2006;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_SOUTH":case 2007:m.type=2007;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_NORTH":case 2008:m.type=2008;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_SOUTH":case 2009:m.type=2009;break;case"BADGE_APAC_PARTNER_JULY_2018_0":case 2010:m.type=2010;break;case"BADGE_APAC_PARTNER_JULY_2018_1":case 2011:m.type=2011;break;case"BADGE_APAC_PARTNER_JULY_2018_2":case 2012:m.type=2012;break;case"BADGE_APAC_PARTNER_JULY_2018_3":case 2013:m.type=2013;break;case"BADGE_APAC_PARTNER_JULY_2018_4":case 2014:m.type=2014;break;case"BADGE_APAC_PARTNER_JULY_2018_5":case 2015:m.type=2015;break;case"BADGE_APAC_PARTNER_JULY_2018_6":case 2016:m.type=2016;break;case"BADGE_APAC_PARTNER_JULY_2018_7":case 2017:m.type=2017;break;case"BADGE_APAC_PARTNER_JULY_2018_8":case 2018:m.type=2018;break;case"BADGE_APAC_PARTNER_JULY_2018_9":case 2019:m.type=2019;break;case"BADGE_YOKOSUKA_29_AUG_2018_MIKASA":case 2020:m.type=2020;break;case"BADGE_YOKOSUKA_29_AUG_2018_VERNY":case 2021:m.type=2021;break;case"BADGE_YOKOSUKA_29_AUG_2018_KURIHAMA":case 2022:m.type=2022;break;case"BADGE_YOKOSUKA_30_AUG_2018_MIKASA":case 2023:m.type=2023;break;case"BADGE_YOKOSUKA_30_AUG_2018_VERNY":case 2024:m.type=2024;break;case"BADGE_YOKOSUKA_30_AUG_2018_KURIHAMA":case 2025:m.type=2025;break;case"BADGE_YOKOSUKA_31_AUG_2018_MIKASA":case 2026:m.type=2026;break;case"BADGE_YOKOSUKA_31_AUG_2018_VERNY":case 2027:m.type=2027;break;case"BADGE_YOKOSUKA_31_AUG_2018_KURIHAMA":case 2028:m.type=2028;break;case"BADGE_YOKOSUKA_1_SEP_2018_MIKASA":case 2029:m.type=2029;break;case"BADGE_YOKOSUKA_1_SEP_2018_VERNY":case 2030:m.type=2030;break;case"BADGE_YOKOSUKA_1_SEP_2018_KURIHAMA":case 2031:m.type=2031;break;case"BADGE_YOKOSUKA_2_SEP_2018_MIKASA":case 2032:m.type=2032;break;case"BADGE_YOKOSUKA_2_SEP_2018_VERNY":case 2033:m.type=2033;break;case"BADGE_YOKOSUKA_2_SEP_2018_KURIHAMA":case 2034:m.type=2034;break;case"BADGE_TOP_BANANA_1":case 2035:m.type=2035;break;case"BADGE_TOP_BANANA_2":case 2036:m.type=2036;break;case"BADGE_TOP_BANANA_3":case 2037:m.type=2037;break}switch(d.operator){case"UNSET":case 0:m.operator=0;break;case"EQUALS":case 1:m.operator=1;break;case"GREATER_THAN":case 2:m.operator=2;break;case"LESS_THAN":case 3:m.operator=3;break}if(d.badge_rank!=null){m.badge_rank=d.badge_rank|0}return m};Medal.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.type=o.enums===String?"BADGE_UNSET":0;d.operator=o.enums===String?"UNSET":0;d.badge_rank=0}if(m.type!=null&&m.hasOwnProperty("type")){d.type=o.enums===String?$root.POGOProtos.Enums.BadgeType[m.type]:m.type}if(m.operator!=null&&m.hasOwnProperty("operator")){d.operator=o.enums===String?$root.POGOProtos.Data.Quests.QuestPrecondition.Operator[m.operator]:m.operator}if(m.badge_rank!=null&&m.hasOwnProperty("badge_rank")){d.badge_rank=m.badge_rank}return d};Medal.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Medal}();return QuestPrecondition}();Quests.QuestReward=function(){function QuestReward(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}QuestReward.prototype.type=0;QuestReward.prototype.exp=0;QuestReward.prototype.item=null;QuestReward.prototype.stardust=0;QuestReward.prototype.candy=null;QuestReward.prototype.avatar_template_id="";QuestReward.prototype.quest_template_id="";QuestReward.prototype.pokemon_encounter=null;var $oneOfFields;Object.defineProperty(QuestReward.prototype,"Reward",{get:$util.oneOfGetter($oneOfFields=["exp","item","stardust","candy","avatar_template_id","quest_template_id","pokemon_encounter"]),set:$util.oneOfSetter($oneOfFields)});QuestReward.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(8).int32(m.type);if(m.exp!=null&&m.hasOwnProperty("exp"))w.uint32(16).int32(m.exp);if(m.item!=null&&m.hasOwnProperty("item"))$root.POGOProtos.Data.Quests.QuestReward.ItemReward.encode(m.item,w.uint32(26).fork()).ldelim();if(m.stardust!=null&&m.hasOwnProperty("stardust"))w.uint32(32).int32(m.stardust);if(m.candy!=null&&m.hasOwnProperty("candy"))$root.POGOProtos.Data.Quests.QuestReward.PokemonCandyReward.encode(m.candy,w.uint32(42).fork()).ldelim();if(m.avatar_template_id!=null&&m.hasOwnProperty("avatar_template_id"))w.uint32(50).string(m.avatar_template_id);if(m.quest_template_id!=null&&m.hasOwnProperty("quest_template_id"))w.uint32(58).string(m.quest_template_id);if(m.pokemon_encounter!=null&&m.hasOwnProperty("pokemon_encounter"))$root.POGOProtos.Data.Quests.QuestReward.PokemonEncounterReward.encode(m.pokemon_encounter,w.uint32(66).fork()).ldelim();return w};QuestReward.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestReward;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.type=r.int32();break;case 2:m.exp=r.int32();break;case 3:m.item=$root.POGOProtos.Data.Quests.QuestReward.ItemReward.decode(r,r.uint32());break;case 4:m.stardust=r.int32();break;case 5:m.candy=$root.POGOProtos.Data.Quests.QuestReward.PokemonCandyReward.decode(r,r.uint32());break;case 6:m.avatar_template_id=r.string();break;case 7:m.quest_template_id=r.string();break;case 8:m.pokemon_encounter=$root.POGOProtos.Data.Quests.QuestReward.PokemonEncounterReward.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};QuestReward.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestReward)return d;var m=new $root.POGOProtos.Data.Quests.QuestReward;switch(d.type){case"UNSET":case 0:m.type=0;break;case"EXPERIENCE":case 1:m.type=1;break;case"ITEM":case 2:m.type=2;break;case"STARDUST":case 3:m.type=3;break;case"CANDY":case 4:m.type=4;break;case"AVATAR_CLOTHING":case 5:m.type=5;break;case"QUEST":case 6:m.type=6;break;case"POKEMON_ENCOUNTER":case 7:m.type=7;break}if(d.exp!=null){m.exp=d.exp|0}if(d.item!=null){if(typeof d.item!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestReward.item: object expected");m.item=$root.POGOProtos.Data.Quests.QuestReward.ItemReward.fromObject(d.item)}if(d.stardust!=null){m.stardust=d.stardust|0}if(d.candy!=null){if(typeof d.candy!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestReward.candy: object expected");m.candy=$root.POGOProtos.Data.Quests.QuestReward.PokemonCandyReward.fromObject(d.candy)}if(d.avatar_template_id!=null){m.avatar_template_id=String(d.avatar_template_id)}if(d.quest_template_id!=null){m.quest_template_id=String(d.quest_template_id)}if(d.pokemon_encounter!=null){if(typeof d.pokemon_encounter!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestReward.pokemon_encounter: object expected");m.pokemon_encounter=$root.POGOProtos.Data.Quests.QuestReward.PokemonEncounterReward.fromObject(d.pokemon_encounter)}return m};QuestReward.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.type=o.enums===String?"UNSET":0}if(m.type!=null&&m.hasOwnProperty("type")){d.type=o.enums===String?$root.POGOProtos.Data.Quests.QuestReward.Type[m.type]:m.type}if(m.exp!=null&&m.hasOwnProperty("exp")){d.exp=m.exp;if(o.oneofs)d.Reward="exp"}if(m.item!=null&&m.hasOwnProperty("item")){d.item=$root.POGOProtos.Data.Quests.QuestReward.ItemReward.toObject(m.item,o);if(o.oneofs)d.Reward="item"}if(m.stardust!=null&&m.hasOwnProperty("stardust")){d.stardust=m.stardust;if(o.oneofs)d.Reward="stardust"}if(m.candy!=null&&m.hasOwnProperty("candy")){d.candy=$root.POGOProtos.Data.Quests.QuestReward.PokemonCandyReward.toObject(m.candy,o);if(o.oneofs)d.Reward="candy"}if(m.avatar_template_id!=null&&m.hasOwnProperty("avatar_template_id")){d.avatar_template_id=m.avatar_template_id;if(o.oneofs)d.Reward="avatar_template_id"}if(m.quest_template_id!=null&&m.hasOwnProperty("quest_template_id")){d.quest_template_id=m.quest_template_id;if(o.oneofs)d.Reward="quest_template_id"}if(m.pokemon_encounter!=null&&m.hasOwnProperty("pokemon_encounter")){d.pokemon_encounter=$root.POGOProtos.Data.Quests.QuestReward.PokemonEncounterReward.toObject(m.pokemon_encounter,o);if(o.oneofs)d.Reward="pokemon_encounter"}return d};QuestReward.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};QuestReward.Type=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="EXPERIENCE"]=1;values[valuesById[2]="ITEM"]=2;values[valuesById[3]="STARDUST"]=3;values[valuesById[4]="CANDY"]=4;values[valuesById[5]="AVATAR_CLOTHING"]=5;values[valuesById[6]="QUEST"]=6;values[valuesById[7]="POKEMON_ENCOUNTER"]=7;return values}();QuestReward.ItemReward=function(){function ItemReward(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ItemReward.prototype.item=0;ItemReward.prototype.amount=0;ItemReward.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item!=null&&m.hasOwnProperty("item"))w.uint32(8).int32(m.item);if(m.amount!=null&&m.hasOwnProperty("amount"))w.uint32(16).int32(m.amount);return w};ItemReward.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestReward.ItemReward;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item=r.int32();break;case 2:m.amount=r.int32();break;default:r.skipType(t&7);break}}return m};ItemReward.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestReward.ItemReward)return d;var m=new $root.POGOProtos.Data.Quests.QuestReward.ItemReward;switch(d.item){case"ITEM_UNKNOWN":case 0:m.item=0;break;case"ITEM_POKE_BALL":case 1:m.item=1;break;case"ITEM_GREAT_BALL":case 2:m.item=2;break;case"ITEM_ULTRA_BALL":case 3:m.item=3;break;case"ITEM_MASTER_BALL":case 4:m.item=4;break;case"ITEM_PREMIER_BALL":case 5:m.item=5;break;case"ITEM_POTION":case 101:m.item=101;break;case"ITEM_SUPER_POTION":case 102:m.item=102;break;case"ITEM_HYPER_POTION":case 103:m.item=103;break;case"ITEM_MAX_POTION":case 104:m.item=104;break;case"ITEM_REVIVE":case 201:m.item=201;break;case"ITEM_MAX_REVIVE":case 202:m.item=202;break;case"ITEM_LUCKY_EGG":case 301:m.item=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item=402;break;case"ITEM_INCENSE_COOL":case 403:m.item=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item=405;break;case"ITEM_TROY_DISK":case 501:m.item=501;break;case"ITEM_X_ATTACK":case 602:m.item=602;break;case"ITEM_X_DEFENSE":case 603:m.item=603;break;case"ITEM_X_MIRACLE":case 604:m.item=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item=701;break;case"ITEM_BLUK_BERRY":case 702:m.item=702;break;case"ITEM_NANAB_BERRY":case 703:m.item=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item=704;break;case"ITEM_PINAP_BERRY":case 705:m.item=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item=1002;break;case"ITEM_SUN_STONE":case 1101:m.item=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item=1102;break;case"ITEM_METAL_COAT":case 1103:m.item=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item=1104;break;case"ITEM_UP_GRADE":case 1105:m.item=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item=1405;break}if(d.amount!=null){m.amount=d.amount|0}return m};ItemReward.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item=o.enums===String?"ITEM_UNKNOWN":0;d.amount=0}if(m.item!=null&&m.hasOwnProperty("item")){d.item=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item]:m.item}if(m.amount!=null&&m.hasOwnProperty("amount")){d.amount=m.amount}return d};ItemReward.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ItemReward}();QuestReward.PokemonCandyReward=function(){function PokemonCandyReward(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokemonCandyReward.prototype.pokemon_id=0;PokemonCandyReward.prototype.amount=0;PokemonCandyReward.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(8).int32(m.pokemon_id);if(m.amount!=null&&m.hasOwnProperty("amount"))w.uint32(16).int32(m.amount);return w};PokemonCandyReward.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestReward.PokemonCandyReward;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.int32();break;case 2:m.amount=r.int32();break;default:r.skipType(t&7);break}}return m};PokemonCandyReward.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestReward.PokemonCandyReward)return d;var m=new $root.POGOProtos.Data.Quests.QuestReward.PokemonCandyReward;switch(d.pokemon_id){case"MISSINGNO":case 0:m.pokemon_id=0;break;case"BULBASAUR":case 1:m.pokemon_id=1;break;case"IVYSAUR":case 2:m.pokemon_id=2;break;case"VENUSAUR":case 3:m.pokemon_id=3;break;case"CHARMANDER":case 4:m.pokemon_id=4;break;case"CHARMELEON":case 5:m.pokemon_id=5;break;case"CHARIZARD":case 6:m.pokemon_id=6;break;case"SQUIRTLE":case 7:m.pokemon_id=7;break;case"WARTORTLE":case 8:m.pokemon_id=8;break;case"BLASTOISE":case 9:m.pokemon_id=9;break;case"CATERPIE":case 10:m.pokemon_id=10;break;case"METAPOD":case 11:m.pokemon_id=11;break;case"BUTTERFREE":case 12:m.pokemon_id=12;break;case"WEEDLE":case 13:m.pokemon_id=13;break;case"KAKUNA":case 14:m.pokemon_id=14;break;case"BEEDRILL":case 15:m.pokemon_id=15;break;case"PIDGEY":case 16:m.pokemon_id=16;break;case"PIDGEOTTO":case 17:m.pokemon_id=17;break;case"PIDGEOT":case 18:m.pokemon_id=18;break;case"RATTATA":case 19:m.pokemon_id=19;break;case"RATICATE":case 20:m.pokemon_id=20;break;case"SPEAROW":case 21:m.pokemon_id=21;break;case"FEAROW":case 22:m.pokemon_id=22;break;case"EKANS":case 23:m.pokemon_id=23;break;case"ARBOK":case 24:m.pokemon_id=24;break;case"PIKACHU":case 25:m.pokemon_id=25;break;case"RAICHU":case 26:m.pokemon_id=26;break;case"SANDSHREW":case 27:m.pokemon_id=27;break;case"SANDSLASH":case 28:m.pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_id=29;break;case"NIDORINA":case 30:m.pokemon_id=30;break;case"NIDOQUEEN":case 31:m.pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.pokemon_id=32;break;case"NIDORINO":case 33:m.pokemon_id=33;break;case"NIDOKING":case 34:m.pokemon_id=34;break;case"CLEFAIRY":case 35:m.pokemon_id=35;break;case"CLEFABLE":case 36:m.pokemon_id=36;break;case"VULPIX":case 37:m.pokemon_id=37;break;case"NINETALES":case 38:m.pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.pokemon_id=40;break;case"ZUBAT":case 41:m.pokemon_id=41;break;case"GOLBAT":case 42:m.pokemon_id=42;break;case"ODDISH":case 43:m.pokemon_id=43;break;case"GLOOM":case 44:m.pokemon_id=44;break;case"VILEPLUME":case 45:m.pokemon_id=45;break;case"PARAS":case 46:m.pokemon_id=46;break;case"PARASECT":case 47:m.pokemon_id=47;break;case"VENONAT":case 48:m.pokemon_id=48;break;case"VENOMOTH":case 49:m.pokemon_id=49;break;case"DIGLETT":case 50:m.pokemon_id=50;break;case"DUGTRIO":case 51:m.pokemon_id=51;break;case"MEOWTH":case 52:m.pokemon_id=52;break;case"PERSIAN":case 53:m.pokemon_id=53;break;case"PSYDUCK":case 54:m.pokemon_id=54;break;case"GOLDUCK":case 55:m.pokemon_id=55;break;case"MANKEY":case 56:m.pokemon_id=56;break;case"PRIMEAPE":case 57:m.pokemon_id=57;break;case"GROWLITHE":case 58:m.pokemon_id=58;break;case"ARCANINE":case 59:m.pokemon_id=59;break;case"POLIWAG":case 60:m.pokemon_id=60;break;case"POLIWHIRL":case 61:m.pokemon_id=61;break;case"POLIWRATH":case 62:m.pokemon_id=62;break;case"ABRA":case 63:m.pokemon_id=63;break;case"KADABRA":case 64:m.pokemon_id=64;break;case"ALAKAZAM":case 65:m.pokemon_id=65;break;case"MACHOP":case 66:m.pokemon_id=66;break;case"MACHOKE":case 67:m.pokemon_id=67;break;case"MACHAMP":case 68:m.pokemon_id=68;break;case"BELLSPROUT":case 69:m.pokemon_id=69;break;case"WEEPINBELL":case 70:m.pokemon_id=70;break;case"VICTREEBEL":case 71:m.pokemon_id=71;break;case"TENTACOOL":case 72:m.pokemon_id=72;break;case"TENTACRUEL":case 73:m.pokemon_id=73;break;case"GEODUDE":case 74:m.pokemon_id=74;break;case"GRAVELER":case 75:m.pokemon_id=75;break;case"GOLEM":case 76:m.pokemon_id=76;break;case"PONYTA":case 77:m.pokemon_id=77;break;case"RAPIDASH":case 78:m.pokemon_id=78;break;case"SLOWPOKE":case 79:m.pokemon_id=79;break;case"SLOWBRO":case 80:m.pokemon_id=80;break;case"MAGNEMITE":case 81:m.pokemon_id=81;break;case"MAGNETON":case 82:m.pokemon_id=82;break;case"FARFETCHD":case 83:m.pokemon_id=83;break;case"DODUO":case 84:m.pokemon_id=84;break;case"DODRIO":case 85:m.pokemon_id=85;break;case"SEEL":case 86:m.pokemon_id=86;break;case"DEWGONG":case 87:m.pokemon_id=87;break;case"GRIMER":case 88:m.pokemon_id=88;break;case"MUK":case 89:m.pokemon_id=89;break;case"SHELLDER":case 90:m.pokemon_id=90;break;case"CLOYSTER":case 91:m.pokemon_id=91;break;case"GASTLY":case 92:m.pokemon_id=92;break;case"HAUNTER":case 93:m.pokemon_id=93;break;case"GENGAR":case 94:m.pokemon_id=94;break;case"ONIX":case 95:m.pokemon_id=95;break;case"DROWZEE":case 96:m.pokemon_id=96;break;case"HYPNO":case 97:m.pokemon_id=97;break;case"KRABBY":case 98:m.pokemon_id=98;break;case"KINGLER":case 99:m.pokemon_id=99;break;case"VOLTORB":case 100:m.pokemon_id=100;break;case"ELECTRODE":case 101:m.pokemon_id=101;break;case"EXEGGCUTE":case 102:m.pokemon_id=102;break;case"EXEGGUTOR":case 103:m.pokemon_id=103;break;case"CUBONE":case 104:m.pokemon_id=104;break;case"MAROWAK":case 105:m.pokemon_id=105;break;case"HITMONLEE":case 106:m.pokemon_id=106;break;case"HITMONCHAN":case 107:m.pokemon_id=107;break;case"LICKITUNG":case 108:m.pokemon_id=108;break;case"KOFFING":case 109:m.pokemon_id=109;break;case"WEEZING":case 110:m.pokemon_id=110;break;case"RHYHORN":case 111:m.pokemon_id=111;break;case"RHYDON":case 112:m.pokemon_id=112;break;case"CHANSEY":case 113:m.pokemon_id=113;break;case"TANGELA":case 114:m.pokemon_id=114;break;case"KANGASKHAN":case 115:m.pokemon_id=115;break;case"HORSEA":case 116:m.pokemon_id=116;break;case"SEADRA":case 117:m.pokemon_id=117;break;case"GOLDEEN":case 118:m.pokemon_id=118;break;case"SEAKING":case 119:m.pokemon_id=119;break;case"STARYU":case 120:m.pokemon_id=120;break;case"STARMIE":case 121:m.pokemon_id=121;break;case"MR_MIME":case 122:m.pokemon_id=122;break;case"SCYTHER":case 123:m.pokemon_id=123;break;case"JYNX":case 124:m.pokemon_id=124;break;case"ELECTABUZZ":case 125:m.pokemon_id=125;break;case"MAGMAR":case 126:m.pokemon_id=126;break;case"PINSIR":case 127:m.pokemon_id=127;break;case"TAUROS":case 128:m.pokemon_id=128;break;case"MAGIKARP":case 129:m.pokemon_id=129;break;case"GYARADOS":case 130:m.pokemon_id=130;break;case"LAPRAS":case 131:m.pokemon_id=131;break;case"DITTO":case 132:m.pokemon_id=132;break;case"EEVEE":case 133:m.pokemon_id=133;break;case"VAPOREON":case 134:m.pokemon_id=134;break;case"JOLTEON":case 135:m.pokemon_id=135;break;case"FLAREON":case 136:m.pokemon_id=136;break;case"PORYGON":case 137:m.pokemon_id=137;break;case"OMANYTE":case 138:m.pokemon_id=138;break;case"OMASTAR":case 139:m.pokemon_id=139;break;case"KABUTO":case 140:m.pokemon_id=140;break;case"KABUTOPS":case 141:m.pokemon_id=141;break;case"AERODACTYL":case 142:m.pokemon_id=142;break;case"SNORLAX":case 143:m.pokemon_id=143;break;case"ARTICUNO":case 144:m.pokemon_id=144;break;case"ZAPDOS":case 145:m.pokemon_id=145;break;case"MOLTRES":case 146:m.pokemon_id=146;break;case"DRATINI":case 147:m.pokemon_id=147;break;case"DRAGONAIR":case 148:m.pokemon_id=148;break;case"DRAGONITE":case 149:m.pokemon_id=149;break;case"MEWTWO":case 150:m.pokemon_id=150;break;case"MEW":case 151:m.pokemon_id=151;break;case"CHIKORITA":case 152:m.pokemon_id=152;break;case"BAYLEEF":case 153:m.pokemon_id=153;break;case"MEGANIUM":case 154:m.pokemon_id=154;break;case"CYNDAQUIL":case 155:m.pokemon_id=155;break;case"QUILAVA":case 156:m.pokemon_id=156;break;case"TYPHLOSION":case 157:m.pokemon_id=157;break;case"TOTODILE":case 158:m.pokemon_id=158;break;case"CROCONAW":case 159:m.pokemon_id=159;break;case"FERALIGATR":case 160:m.pokemon_id=160;break;case"SENTRET":case 161:m.pokemon_id=161;break;case"FURRET":case 162:m.pokemon_id=162;break;case"HOOTHOOT":case 163:m.pokemon_id=163;break;case"NOCTOWL":case 164:m.pokemon_id=164;break;case"LEDYBA":case 165:m.pokemon_id=165;break;case"LEDIAN":case 166:m.pokemon_id=166;break;case"SPINARAK":case 167:m.pokemon_id=167;break;case"ARIADOS":case 168:m.pokemon_id=168;break;case"CROBAT":case 169:m.pokemon_id=169;break;case"CHINCHOU":case 170:m.pokemon_id=170;break;case"LANTURN":case 171:m.pokemon_id=171;break;case"PICHU":case 172:m.pokemon_id=172;break;case"CLEFFA":case 173:m.pokemon_id=173;break;case"IGGLYBUFF":case 174:m.pokemon_id=174;break;case"TOGEPI":case 175:m.pokemon_id=175;break;case"TOGETIC":case 176:m.pokemon_id=176;break;case"NATU":case 177:m.pokemon_id=177;break;case"XATU":case 178:m.pokemon_id=178;break;case"MAREEP":case 179:m.pokemon_id=179;break;case"FLAAFFY":case 180:m.pokemon_id=180;break;case"AMPHAROS":case 181:m.pokemon_id=181;break;case"BELLOSSOM":case 182:m.pokemon_id=182;break;case"MARILL":case 183:m.pokemon_id=183;break;case"AZUMARILL":case 184:m.pokemon_id=184;break;case"SUDOWOODO":case 185:m.pokemon_id=185;break;case"POLITOED":case 186:m.pokemon_id=186;break;case"HOPPIP":case 187:m.pokemon_id=187;break;case"SKIPLOOM":case 188:m.pokemon_id=188;break;case"JUMPLUFF":case 189:m.pokemon_id=189;break;case"AIPOM":case 190:m.pokemon_id=190;break;case"SUNKERN":case 191:m.pokemon_id=191;break;case"SUNFLORA":case 192:m.pokemon_id=192;break;case"YANMA":case 193:m.pokemon_id=193;break;case"WOOPER":case 194:m.pokemon_id=194;break;case"QUAGSIRE":case 195:m.pokemon_id=195;break;case"ESPEON":case 196:m.pokemon_id=196;break;case"UMBREON":case 197:m.pokemon_id=197;break;case"MURKROW":case 198:m.pokemon_id=198;break;case"SLOWKING":case 199:m.pokemon_id=199;break;case"MISDREAVUS":case 200:m.pokemon_id=200;break;case"UNOWN":case 201:m.pokemon_id=201;break;case"WOBBUFFET":case 202:m.pokemon_id=202;break;case"GIRAFARIG":case 203:m.pokemon_id=203;break;case"PINECO":case 204:m.pokemon_id=204;break;case"FORRETRESS":case 205:m.pokemon_id=205;break;case"DUNSPARCE":case 206:m.pokemon_id=206;break;case"GLIGAR":case 207:m.pokemon_id=207;break;case"STEELIX":case 208:m.pokemon_id=208;break;case"SNUBBULL":case 209:m.pokemon_id=209;break;case"GRANBULL":case 210:m.pokemon_id=210;break;case"QWILFISH":case 211:m.pokemon_id=211;break;case"SCIZOR":case 212:m.pokemon_id=212;break;case"SHUCKLE":case 213:m.pokemon_id=213;break;case"HERACROSS":case 214:m.pokemon_id=214;break;case"SNEASEL":case 215:m.pokemon_id=215;break;case"TEDDIURSA":case 216:m.pokemon_id=216;break;case"URSARING":case 217:m.pokemon_id=217;break;case"SLUGMA":case 218:m.pokemon_id=218;break;case"MAGCARGO":case 219:m.pokemon_id=219;break;case"SWINUB":case 220:m.pokemon_id=220;break;case"PILOSWINE":case 221:m.pokemon_id=221;break;case"CORSOLA":case 222:m.pokemon_id=222;break;case"REMORAID":case 223:m.pokemon_id=223;break;case"OCTILLERY":case 224:m.pokemon_id=224;break;case"DELIBIRD":case 225:m.pokemon_id=225;break;case"MANTINE":case 226:m.pokemon_id=226;break;case"SKARMORY":case 227:m.pokemon_id=227;break;case"HOUNDOUR":case 228:m.pokemon_id=228;break;case"HOUNDOOM":case 229:m.pokemon_id=229;break;case"KINGDRA":case 230:m.pokemon_id=230;break;case"PHANPY":case 231:m.pokemon_id=231;break;case"DONPHAN":case 232:m.pokemon_id=232;break;case"PORYGON2":case 233:m.pokemon_id=233;break;case"STANTLER":case 234:m.pokemon_id=234;break;case"SMEARGLE":case 235:m.pokemon_id=235;break;case"TYROGUE":case 236:m.pokemon_id=236;break;case"HITMONTOP":case 237:m.pokemon_id=237;break;case"SMOOCHUM":case 238:m.pokemon_id=238;break;case"ELEKID":case 239:m.pokemon_id=239;break;case"MAGBY":case 240:m.pokemon_id=240;break;case"MILTANK":case 241:m.pokemon_id=241;break;case"BLISSEY":case 242:m.pokemon_id=242;break;case"RAIKOU":case 243:m.pokemon_id=243;break;case"ENTEI":case 244:m.pokemon_id=244;break;case"SUICUNE":case 245:m.pokemon_id=245;break;case"LARVITAR":case 246:m.pokemon_id=246;break;case"PUPITAR":case 247:m.pokemon_id=247;break;case"TYRANITAR":case 248:m.pokemon_id=248;break;case"LUGIA":case 249:m.pokemon_id=249;break;case"HO_OH":case 250:m.pokemon_id=250;break;case"CELEBI":case 251:m.pokemon_id=251;break;case"TREECKO":case 252:m.pokemon_id=252;break;case"GROVYLE":case 253:m.pokemon_id=253;break;case"SCEPTILE":case 254:m.pokemon_id=254;break;case"TORCHIC":case 255:m.pokemon_id=255;break;case"COMBUSKEN":case 256:m.pokemon_id=256;break;case"BLAZIKEN":case 257:m.pokemon_id=257;break;case"MUDKIP":case 258:m.pokemon_id=258;break;case"MARSHTOMP":case 259:m.pokemon_id=259;break;case"SWAMPERT":case 260:m.pokemon_id=260;break;case"POOCHYENA":case 261:m.pokemon_id=261;break;case"MIGHTYENA":case 262:m.pokemon_id=262;break;case"ZIGZAGOON":case 263:m.pokemon_id=263;break;case"LINOONE":case 264:m.pokemon_id=264;break;case"WURMPLE":case 265:m.pokemon_id=265;break;case"SILCOON":case 266:m.pokemon_id=266;break;case"BEAUTIFLY":case 267:m.pokemon_id=267;break;case"CASCOON":case 268:m.pokemon_id=268;break;case"DUSTOX":case 269:m.pokemon_id=269;break;case"LOTAD":case 270:m.pokemon_id=270;break;case"LOMBRE":case 271:m.pokemon_id=271;break;case"LUDICOLO":case 272:m.pokemon_id=272;break;case"SEEDOT":case 273:m.pokemon_id=273;break;case"NUZLEAF":case 274:m.pokemon_id=274;break;case"SHIFTRY":case 275:m.pokemon_id=275;break;case"TAILLOW":case 276:m.pokemon_id=276;break;case"SWELLOW":case 277:m.pokemon_id=277;break;case"WINGULL":case 278:m.pokemon_id=278;break;case"PELIPPER":case 279:m.pokemon_id=279;break;case"RALTS":case 280:m.pokemon_id=280;break;case"KIRLIA":case 281:m.pokemon_id=281;break;case"GARDEVOIR":case 282:m.pokemon_id=282;break;case"SURSKIT":case 283:m.pokemon_id=283;break;case"MASQUERAIN":case 284:m.pokemon_id=284;break;case"SHROOMISH":case 285:m.pokemon_id=285;break;case"BRELOOM":case 286:m.pokemon_id=286;break;case"SLAKOTH":case 287:m.pokemon_id=287;break;case"VIGOROTH":case 288:m.pokemon_id=288;break;case"SLAKING":case 289:m.pokemon_id=289;break;case"NINCADA":case 290:m.pokemon_id=290;break;case"NINJASK":case 291:m.pokemon_id=291;break;case"SHEDINJA":case 292:m.pokemon_id=292;break;case"WHISMUR":case 293:m.pokemon_id=293;break;case"LOUDRED":case 294:m.pokemon_id=294;break;case"EXPLOUD":case 295:m.pokemon_id=295;break;case"MAKUHITA":case 296:m.pokemon_id=296;break;case"HARIYAMA":case 297:m.pokemon_id=297;break;case"AZURILL":case 298:m.pokemon_id=298;break;case"NOSEPASS":case 299:m.pokemon_id=299;break;case"SKITTY":case 300:m.pokemon_id=300;break;case"DELCATTY":case 301:m.pokemon_id=301;break;case"SABLEYE":case 302:m.pokemon_id=302;break;case"MAWILE":case 303:m.pokemon_id=303;break;case"ARON":case 304:m.pokemon_id=304;break;case"LAIRON":case 305:m.pokemon_id=305;break;case"AGGRON":case 306:m.pokemon_id=306;break;case"MEDITITE":case 307:m.pokemon_id=307;break;case"MEDICHAM":case 308:m.pokemon_id=308;break;case"ELECTRIKE":case 309:m.pokemon_id=309;break;case"MANECTRIC":case 310:m.pokemon_id=310;break;case"PLUSLE":case 311:m.pokemon_id=311;break;case"MINUN":case 312:m.pokemon_id=312;break;case"VOLBEAT":case 313:m.pokemon_id=313;break;case"ILLUMISE":case 314:m.pokemon_id=314;break;case"ROSELIA":case 315:m.pokemon_id=315;break;case"GULPIN":case 316:m.pokemon_id=316;break;case"SWALOT":case 317:m.pokemon_id=317;break;case"CARVANHA":case 318:m.pokemon_id=318;break;case"SHARPEDO":case 319:m.pokemon_id=319;break;case"WAILMER":case 320:m.pokemon_id=320;break;case"WAILORD":case 321:m.pokemon_id=321;break;case"NUMEL":case 322:m.pokemon_id=322;break;case"CAMERUPT":case 323:m.pokemon_id=323;break;case"TORKOAL":case 324:m.pokemon_id=324;break;case"SPOINK":case 325:m.pokemon_id=325;break;case"GRUMPIG":case 326:m.pokemon_id=326;break;case"SPINDA":case 327:m.pokemon_id=327;break;case"TRAPINCH":case 328:m.pokemon_id=328;break;case"VIBRAVA":case 329:m.pokemon_id=329;break;case"FLYGON":case 330:m.pokemon_id=330;break;case"CACNEA":case 331:m.pokemon_id=331;break;case"CACTURNE":case 332:m.pokemon_id=332;break;case"SWABLU":case 333:m.pokemon_id=333;break;case"ALTARIA":case 334:m.pokemon_id=334;break;case"ZANGOOSE":case 335:m.pokemon_id=335;break;case"SEVIPER":case 336:m.pokemon_id=336;break;case"LUNATONE":case 337:m.pokemon_id=337;break;case"SOLROCK":case 338:m.pokemon_id=338;break;case"BARBOACH":case 339:m.pokemon_id=339;break;case"WHISCASH":case 340:m.pokemon_id=340;break;case"CORPHISH":case 341:m.pokemon_id=341;break;case"CRAWDAUNT":case 342:m.pokemon_id=342;break;case"BALTOY":case 343:m.pokemon_id=343;break;case"CLAYDOL":case 344:m.pokemon_id=344;break;case"LILEEP":case 345:m.pokemon_id=345;break;case"CRADILY":case 346:m.pokemon_id=346;break;case"ANORITH":case 347:m.pokemon_id=347;break;case"ARMALDO":case 348:m.pokemon_id=348;break;case"FEEBAS":case 349:m.pokemon_id=349;break;case"MILOTIC":case 350:m.pokemon_id=350;break;case"CASTFORM":case 351:m.pokemon_id=351;break;case"KECLEON":case 352:m.pokemon_id=352;break;case"SHUPPET":case 353:m.pokemon_id=353;break;case"BANETTE":case 354:m.pokemon_id=354;break;case"DUSKULL":case 355:m.pokemon_id=355;break;case"DUSCLOPS":case 356:m.pokemon_id=356;break;case"TROPIUS":case 357:m.pokemon_id=357;break;case"CHIMECHO":case 358:m.pokemon_id=358;break;case"ABSOL":case 359:m.pokemon_id=359;break;case"WYNAUT":case 360:m.pokemon_id=360;break;case"SNORUNT":case 361:m.pokemon_id=361;break;case"GLALIE":case 362:m.pokemon_id=362;break;case"SPHEAL":case 363:m.pokemon_id=363;break;case"SEALEO":case 364:m.pokemon_id=364;break;case"WALREIN":case 365:m.pokemon_id=365;break;case"CLAMPERL":case 366:m.pokemon_id=366;break;case"HUNTAIL":case 367:m.pokemon_id=367;break;case"GOREBYSS":case 368:m.pokemon_id=368;break;case"RELICANTH":case 369:m.pokemon_id=369;break;case"LUVDISC":case 370:m.pokemon_id=370;break;case"BAGON":case 371:m.pokemon_id=371;break;case"SHELGON":case 372:m.pokemon_id=372;break;case"SALAMENCE":case 373:m.pokemon_id=373;break;case"BELDUM":case 374:m.pokemon_id=374;break;case"METANG":case 375:m.pokemon_id=375;break;case"METAGROSS":case 376:m.pokemon_id=376;break;case"REGIROCK":case 377:m.pokemon_id=377;break;case"REGICE":case 378:m.pokemon_id=378;break;case"REGISTEEL":case 379:m.pokemon_id=379;break;case"LATIAS":case 380:m.pokemon_id=380;break;case"LATIOS":case 381:m.pokemon_id=381;break;case"KYOGRE":case 382:m.pokemon_id=382;break;case"GROUDON":case 383:m.pokemon_id=383;break;case"RAYQUAZA":case 384:m.pokemon_id=384;break;case"JIRACHI":case 385:m.pokemon_id=385;break;case"DEOXYS":case 386:m.pokemon_id=386;break;case"TURTWIG":case 387:m.pokemon_id=387;break;case"GROTLE":case 388:m.pokemon_id=388;break;case"TORTERRA":case 389:m.pokemon_id=389;break;case"CHIMCHAR":case 390:m.pokemon_id=390;break;case"MONFERNO":case 391:m.pokemon_id=391;break;case"INFERNAPE":case 392:m.pokemon_id=392;break;case"PIPLUP":case 393:m.pokemon_id=393;break;case"PRINPLUP":case 394:m.pokemon_id=394;break;case"EMPOLEON":case 395:m.pokemon_id=395;break;case"STARLY":case 396:m.pokemon_id=396;break;case"STARAVIA":case 397:m.pokemon_id=397;break;case"STARAPTOR":case 398:m.pokemon_id=398;break;case"BIDOOF":case 399:m.pokemon_id=399;break;case"BIBAREL":case 400:m.pokemon_id=400;break;case"KRICKETOT":case 401:m.pokemon_id=401;break;case"KRICKETUNE":case 402:m.pokemon_id=402;break;case"SHINX":case 403:m.pokemon_id=403;break;case"LUXIO":case 404:m.pokemon_id=404;break;case"LUXRAY":case 405:m.pokemon_id=405;break;case"BUDEW":case 406:m.pokemon_id=406;break;case"ROSERADE":case 407:m.pokemon_id=407;break;case"CRANIDOS":case 408:m.pokemon_id=408;break;case"RAMPARDOS":case 409:m.pokemon_id=409;break;case"SHIELDON":case 410:m.pokemon_id=410;break;case"BASTIODON":case 411:m.pokemon_id=411;break;case"BURMY":case 412:m.pokemon_id=412;break;case"WORMADAM":case 413:m.pokemon_id=413;break;case"MOTHIM":case 414:m.pokemon_id=414;break;case"COMBEE":case 415:m.pokemon_id=415;break;case"VESPIQUEN":case 416:m.pokemon_id=416;break;case"PACHIRISU":case 417:m.pokemon_id=417;break;case"BUIZEL":case 418:m.pokemon_id=418;break;case"FLOATZEL":case 419:m.pokemon_id=419;break;case"CHERUBI":case 420:m.pokemon_id=420;break;case"CHERRIM":case 421:m.pokemon_id=421;break;case"SHELLOS":case 422:m.pokemon_id=422;break;case"GASTRODON":case 423:m.pokemon_id=423;break;case"AMBIPOM":case 424:m.pokemon_id=424;break;case"DRIFLOON":case 425:m.pokemon_id=425;break;case"DRIFBLIM":case 426:m.pokemon_id=426;break;case"BUNEARY":case 427:m.pokemon_id=427;break;case"LOPUNNY":case 428:m.pokemon_id=428;break;case"MISMAGIUS":case 429:m.pokemon_id=429;break;case"HONCHKROW":case 430:m.pokemon_id=430;break;case"GLAMEOW":case 431:m.pokemon_id=431;break;case"PURUGLY":case 432:m.pokemon_id=432;break;case"CHINGLING":case 433:m.pokemon_id=433;break;case"STUNKY":case 434:m.pokemon_id=434;break;case"SKUNTANK":case 435:m.pokemon_id=435;break;case"BRONZOR":case 436:m.pokemon_id=436;break;case"BRONZONG":case 437:m.pokemon_id=437;break;case"BONSLY":case 438:m.pokemon_id=438;break;case"MIME_JR":case 439:m.pokemon_id=439;break;case"HAPPINY":case 440:m.pokemon_id=440;break;case"CHATOT":case 441:m.pokemon_id=441;break;case"SPIRITOMB":case 442:m.pokemon_id=442;break;case"GIBLE":case 443:m.pokemon_id=443;break;case"GABITE":case 444:m.pokemon_id=444;break;case"GARCHOMP":case 445:m.pokemon_id=445;break;case"MUNCHLAX":case 446:m.pokemon_id=446;break;case"RIOLU":case 447:m.pokemon_id=447;break;case"LUCARIO":case 448:m.pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.pokemon_id=449;break;case"HIPPOWDON":case 450:m.pokemon_id=450;break;case"SKORUPI":case 451:m.pokemon_id=451;break;case"DRAPION":case 452:m.pokemon_id=452;break;case"CROAGUNK":case 453:m.pokemon_id=453;break;case"TOXICROAK":case 454:m.pokemon_id=454;break;case"CARNIVINE":case 455:m.pokemon_id=455;break;case"FINNEON":case 456:m.pokemon_id=456;break;case"LUMINEON":case 457:m.pokemon_id=457;break;case"MANTYKE":case 458:m.pokemon_id=458;break;case"SNOVER":case 459:m.pokemon_id=459;break;case"ABOMASNOW":case 460:m.pokemon_id=460;break;case"WEAVILE":case 461:m.pokemon_id=461;break;case"MAGNEZONE":case 462:m.pokemon_id=462;break;case"LICKILICKY":case 463:m.pokemon_id=463;break;case"RHYPERIOR":case 464:m.pokemon_id=464;break;case"TANGROWTH":case 465:m.pokemon_id=465;break;case"ELECTIVIRE":case 466:m.pokemon_id=466;break;case"MAGMORTAR":case 467:m.pokemon_id=467;break;case"TOGEKISS":case 468:m.pokemon_id=468;break;case"YANMEGA":case 469:m.pokemon_id=469;break;case"LEAFEON":case 470:m.pokemon_id=470;break;case"GLACEON":case 471:m.pokemon_id=471;break;case"GLISCOR":case 472:m.pokemon_id=472;break;case"MAMOSWINE":case 473:m.pokemon_id=473;break;case"PORYGON_Z":case 474:m.pokemon_id=474;break;case"GALLADE":case 475:m.pokemon_id=475;break;case"PROBOPASS":case 476:m.pokemon_id=476;break;case"DUSKNOIR":case 477:m.pokemon_id=477;break;case"FROSLASS":case 478:m.pokemon_id=478;break;case"ROTOM":case 479:m.pokemon_id=479;break;case"UXIE":case 480:m.pokemon_id=480;break;case"MESPRIT":case 481:m.pokemon_id=481;break;case"AZELF":case 482:m.pokemon_id=482;break;case"DIALGA":case 483:m.pokemon_id=483;break;case"PALKIA":case 484:m.pokemon_id=484;break;case"HEATRAN":case 485:m.pokemon_id=485;break;case"REGIGIGAS":case 486:m.pokemon_id=486;break;case"GIRATINA":case 487:m.pokemon_id=487;break;case"CRESSELIA":case 488:m.pokemon_id=488;break;case"PHIONE":case 489:m.pokemon_id=489;break;case"MANAPHY":case 490:m.pokemon_id=490;break;case"DARKRAI":case 491:m.pokemon_id=491;break;case"SHAYMIN":case 492:m.pokemon_id=492;break;case"ARCEUS":case 493:m.pokemon_id=493;break;case"MELTAN":case 808:m.pokemon_id=808;break;case"MELMETAL":case 809:m.pokemon_id=809;break}if(d.amount!=null){m.amount=d.amount|0}return m};PokemonCandyReward.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon_id=o.enums===String?"MISSINGNO":0;d.amount=0}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){d.pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_id]:m.pokemon_id}if(m.amount!=null&&m.hasOwnProperty("amount")){d.amount=m.amount}return d};PokemonCandyReward.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokemonCandyReward}();QuestReward.PokemonEncounterReward=function(){function PokemonEncounterReward(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokemonEncounterReward.prototype.pokemon_id=0;PokemonEncounterReward.prototype.use_quest_pokemon_encounter_distribuition=false;PokemonEncounterReward.prototype.pokemon_display=null;PokemonEncounterReward.prototype.is_hidden_ditto=false;PokemonEncounterReward.prototype.ditto_display=null;var $oneOfFields;Object.defineProperty(PokemonEncounterReward.prototype,"Type",{get:$util.oneOfGetter($oneOfFields=["pokemon_id","use_quest_pokemon_encounter_distribuition"]),set:$util.oneOfSetter($oneOfFields)});PokemonEncounterReward.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(8).int32(m.pokemon_id);if(m.use_quest_pokemon_encounter_distribuition!=null&&m.hasOwnProperty("use_quest_pokemon_encounter_distribuition"))w.uint32(16).bool(m.use_quest_pokemon_encounter_distribuition);if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display"))$root.POGOProtos.Data.PokemonDisplay.encode(m.pokemon_display,w.uint32(26).fork()).ldelim();if(m.is_hidden_ditto!=null&&m.hasOwnProperty("is_hidden_ditto"))w.uint32(32).bool(m.is_hidden_ditto);if(m.ditto_display!=null&&m.hasOwnProperty("ditto_display"))$root.POGOProtos.Data.PokemonDisplay.encode(m.ditto_display,w.uint32(42).fork()).ldelim();return w};PokemonEncounterReward.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestReward.PokemonEncounterReward;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.int32();break;case 2:m.use_quest_pokemon_encounter_distribuition=r.bool();break;case 3:m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;case 4:m.is_hidden_ditto=r.bool();break;case 5:m.ditto_display=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};PokemonEncounterReward.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestReward.PokemonEncounterReward)return d;var m=new $root.POGOProtos.Data.Quests.QuestReward.PokemonEncounterReward;switch(d.pokemon_id){case"MISSINGNO":case 0:m.pokemon_id=0;break;case"BULBASAUR":case 1:m.pokemon_id=1;break;case"IVYSAUR":case 2:m.pokemon_id=2;break;case"VENUSAUR":case 3:m.pokemon_id=3;break;case"CHARMANDER":case 4:m.pokemon_id=4;break;case"CHARMELEON":case 5:m.pokemon_id=5;break;case"CHARIZARD":case 6:m.pokemon_id=6;break;case"SQUIRTLE":case 7:m.pokemon_id=7;break;case"WARTORTLE":case 8:m.pokemon_id=8;break;case"BLASTOISE":case 9:m.pokemon_id=9;break;case"CATERPIE":case 10:m.pokemon_id=10;break;case"METAPOD":case 11:m.pokemon_id=11;break;case"BUTTERFREE":case 12:m.pokemon_id=12;break;case"WEEDLE":case 13:m.pokemon_id=13;break;case"KAKUNA":case 14:m.pokemon_id=14;break;case"BEEDRILL":case 15:m.pokemon_id=15;break;case"PIDGEY":case 16:m.pokemon_id=16;break;case"PIDGEOTTO":case 17:m.pokemon_id=17;break;case"PIDGEOT":case 18:m.pokemon_id=18;break;case"RATTATA":case 19:m.pokemon_id=19;break;case"RATICATE":case 20:m.pokemon_id=20;break;case"SPEAROW":case 21:m.pokemon_id=21;break;case"FEAROW":case 22:m.pokemon_id=22;break;case"EKANS":case 23:m.pokemon_id=23;break;case"ARBOK":case 24:m.pokemon_id=24;break;case"PIKACHU":case 25:m.pokemon_id=25;break;case"RAICHU":case 26:m.pokemon_id=26;break;case"SANDSHREW":case 27:m.pokemon_id=27;break;case"SANDSLASH":case 28:m.pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_id=29;break;case"NIDORINA":case 30:m.pokemon_id=30;break;case"NIDOQUEEN":case 31:m.pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.pokemon_id=32;break;case"NIDORINO":case 33:m.pokemon_id=33;break;case"NIDOKING":case 34:m.pokemon_id=34;break;case"CLEFAIRY":case 35:m.pokemon_id=35;break;case"CLEFABLE":case 36:m.pokemon_id=36;break;case"VULPIX":case 37:m.pokemon_id=37;break;case"NINETALES":case 38:m.pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.pokemon_id=40;break;case"ZUBAT":case 41:m.pokemon_id=41;break;case"GOLBAT":case 42:m.pokemon_id=42;break;case"ODDISH":case 43:m.pokemon_id=43;break;case"GLOOM":case 44:m.pokemon_id=44;break;case"VILEPLUME":case 45:m.pokemon_id=45;break;case"PARAS":case 46:m.pokemon_id=46;break;case"PARASECT":case 47:m.pokemon_id=47;break;case"VENONAT":case 48:m.pokemon_id=48;break;case"VENOMOTH":case 49:m.pokemon_id=49;break;case"DIGLETT":case 50:m.pokemon_id=50;break;case"DUGTRIO":case 51:m.pokemon_id=51;break;case"MEOWTH":case 52:m.pokemon_id=52;break;case"PERSIAN":case 53:m.pokemon_id=53;break;case"PSYDUCK":case 54:m.pokemon_id=54;break;case"GOLDUCK":case 55:m.pokemon_id=55;break;case"MANKEY":case 56:m.pokemon_id=56;break;case"PRIMEAPE":case 57:m.pokemon_id=57;break;case"GROWLITHE":case 58:m.pokemon_id=58;break;case"ARCANINE":case 59:m.pokemon_id=59;break;case"POLIWAG":case 60:m.pokemon_id=60;break;case"POLIWHIRL":case 61:m.pokemon_id=61;break;case"POLIWRATH":case 62:m.pokemon_id=62;break;case"ABRA":case 63:m.pokemon_id=63;break;case"KADABRA":case 64:m.pokemon_id=64;break;case"ALAKAZAM":case 65:m.pokemon_id=65;break;case"MACHOP":case 66:m.pokemon_id=66;break;case"MACHOKE":case 67:m.pokemon_id=67;break;case"MACHAMP":case 68:m.pokemon_id=68;break;case"BELLSPROUT":case 69:m.pokemon_id=69;break;case"WEEPINBELL":case 70:m.pokemon_id=70;break;case"VICTREEBEL":case 71:m.pokemon_id=71;break;case"TENTACOOL":case 72:m.pokemon_id=72;break;case"TENTACRUEL":case 73:m.pokemon_id=73;break;case"GEODUDE":case 74:m.pokemon_id=74;break;case"GRAVELER":case 75:m.pokemon_id=75;break;case"GOLEM":case 76:m.pokemon_id=76;break;case"PONYTA":case 77:m.pokemon_id=77;break;case"RAPIDASH":case 78:m.pokemon_id=78;break;case"SLOWPOKE":case 79:m.pokemon_id=79;break;case"SLOWBRO":case 80:m.pokemon_id=80;break;case"MAGNEMITE":case 81:m.pokemon_id=81;break;case"MAGNETON":case 82:m.pokemon_id=82;break;case"FARFETCHD":case 83:m.pokemon_id=83;break;case"DODUO":case 84:m.pokemon_id=84;break;case"DODRIO":case 85:m.pokemon_id=85;break;case"SEEL":case 86:m.pokemon_id=86;break;case"DEWGONG":case 87:m.pokemon_id=87;break;case"GRIMER":case 88:m.pokemon_id=88;break;case"MUK":case 89:m.pokemon_id=89;break;case"SHELLDER":case 90:m.pokemon_id=90;break;case"CLOYSTER":case 91:m.pokemon_id=91;break;case"GASTLY":case 92:m.pokemon_id=92;break;case"HAUNTER":case 93:m.pokemon_id=93;break;case"GENGAR":case 94:m.pokemon_id=94;break;case"ONIX":case 95:m.pokemon_id=95;break;case"DROWZEE":case 96:m.pokemon_id=96;break;case"HYPNO":case 97:m.pokemon_id=97;break;case"KRABBY":case 98:m.pokemon_id=98;break;case"KINGLER":case 99:m.pokemon_id=99;break;case"VOLTORB":case 100:m.pokemon_id=100;break;case"ELECTRODE":case 101:m.pokemon_id=101;break;case"EXEGGCUTE":case 102:m.pokemon_id=102;break;case"EXEGGUTOR":case 103:m.pokemon_id=103;break;case"CUBONE":case 104:m.pokemon_id=104;break;case"MAROWAK":case 105:m.pokemon_id=105;break;case"HITMONLEE":case 106:m.pokemon_id=106;break;case"HITMONCHAN":case 107:m.pokemon_id=107;break;case"LICKITUNG":case 108:m.pokemon_id=108;break;case"KOFFING":case 109:m.pokemon_id=109;break;case"WEEZING":case 110:m.pokemon_id=110;break;case"RHYHORN":case 111:m.pokemon_id=111;break;case"RHYDON":case 112:m.pokemon_id=112;break;case"CHANSEY":case 113:m.pokemon_id=113;break;case"TANGELA":case 114:m.pokemon_id=114;break;case"KANGASKHAN":case 115:m.pokemon_id=115;break;case"HORSEA":case 116:m.pokemon_id=116;break;case"SEADRA":case 117:m.pokemon_id=117;break;case"GOLDEEN":case 118:m.pokemon_id=118;break;case"SEAKING":case 119:m.pokemon_id=119;break;case"STARYU":case 120:m.pokemon_id=120;break;case"STARMIE":case 121:m.pokemon_id=121;break;case"MR_MIME":case 122:m.pokemon_id=122;break;case"SCYTHER":case 123:m.pokemon_id=123;break;case"JYNX":case 124:m.pokemon_id=124;break;case"ELECTABUZZ":case 125:m.pokemon_id=125;break;case"MAGMAR":case 126:m.pokemon_id=126;break;case"PINSIR":case 127:m.pokemon_id=127;break;case"TAUROS":case 128:m.pokemon_id=128;break;case"MAGIKARP":case 129:m.pokemon_id=129;break;case"GYARADOS":case 130:m.pokemon_id=130;break;case"LAPRAS":case 131:m.pokemon_id=131;break;case"DITTO":case 132:m.pokemon_id=132;break;case"EEVEE":case 133:m.pokemon_id=133;break;case"VAPOREON":case 134:m.pokemon_id=134;break;case"JOLTEON":case 135:m.pokemon_id=135;break;case"FLAREON":case 136:m.pokemon_id=136;break;case"PORYGON":case 137:m.pokemon_id=137;break;case"OMANYTE":case 138:m.pokemon_id=138;break;case"OMASTAR":case 139:m.pokemon_id=139;break;case"KABUTO":case 140:m.pokemon_id=140;break;case"KABUTOPS":case 141:m.pokemon_id=141;break;case"AERODACTYL":case 142:m.pokemon_id=142;break;case"SNORLAX":case 143:m.pokemon_id=143;break;case"ARTICUNO":case 144:m.pokemon_id=144;break;case"ZAPDOS":case 145:m.pokemon_id=145;break;case"MOLTRES":case 146:m.pokemon_id=146;break;case"DRATINI":case 147:m.pokemon_id=147;break;case"DRAGONAIR":case 148:m.pokemon_id=148;break;case"DRAGONITE":case 149:m.pokemon_id=149;break;case"MEWTWO":case 150:m.pokemon_id=150;break;case"MEW":case 151:m.pokemon_id=151;break;case"CHIKORITA":case 152:m.pokemon_id=152;break;case"BAYLEEF":case 153:m.pokemon_id=153;break;case"MEGANIUM":case 154:m.pokemon_id=154;break;case"CYNDAQUIL":case 155:m.pokemon_id=155;break;case"QUILAVA":case 156:m.pokemon_id=156;break;case"TYPHLOSION":case 157:m.pokemon_id=157;break;case"TOTODILE":case 158:m.pokemon_id=158;break;case"CROCONAW":case 159:m.pokemon_id=159;break;case"FERALIGATR":case 160:m.pokemon_id=160;break;case"SENTRET":case 161:m.pokemon_id=161;break;case"FURRET":case 162:m.pokemon_id=162;break;case"HOOTHOOT":case 163:m.pokemon_id=163;break;case"NOCTOWL":case 164:m.pokemon_id=164;break;case"LEDYBA":case 165:m.pokemon_id=165;break;case"LEDIAN":case 166:m.pokemon_id=166;break;case"SPINARAK":case 167:m.pokemon_id=167;break;case"ARIADOS":case 168:m.pokemon_id=168;break;case"CROBAT":case 169:m.pokemon_id=169;break;case"CHINCHOU":case 170:m.pokemon_id=170;break;case"LANTURN":case 171:m.pokemon_id=171;break;case"PICHU":case 172:m.pokemon_id=172;break;case"CLEFFA":case 173:m.pokemon_id=173;break;case"IGGLYBUFF":case 174:m.pokemon_id=174;break;case"TOGEPI":case 175:m.pokemon_id=175;break;case"TOGETIC":case 176:m.pokemon_id=176;break;case"NATU":case 177:m.pokemon_id=177;break;case"XATU":case 178:m.pokemon_id=178;break;case"MAREEP":case 179:m.pokemon_id=179;break;case"FLAAFFY":case 180:m.pokemon_id=180;break;case"AMPHAROS":case 181:m.pokemon_id=181;break;case"BELLOSSOM":case 182:m.pokemon_id=182;break;case"MARILL":case 183:m.pokemon_id=183;break;case"AZUMARILL":case 184:m.pokemon_id=184;break;case"SUDOWOODO":case 185:m.pokemon_id=185;break;case"POLITOED":case 186:m.pokemon_id=186;break;case"HOPPIP":case 187:m.pokemon_id=187;break;case"SKIPLOOM":case 188:m.pokemon_id=188;break;case"JUMPLUFF":case 189:m.pokemon_id=189;break;case"AIPOM":case 190:m.pokemon_id=190;break;case"SUNKERN":case 191:m.pokemon_id=191;break;case"SUNFLORA":case 192:m.pokemon_id=192;break;case"YANMA":case 193:m.pokemon_id=193;break;case"WOOPER":case 194:m.pokemon_id=194;break;case"QUAGSIRE":case 195:m.pokemon_id=195;break;case"ESPEON":case 196:m.pokemon_id=196;break;case"UMBREON":case 197:m.pokemon_id=197;break;case"MURKROW":case 198:m.pokemon_id=198;break;case"SLOWKING":case 199:m.pokemon_id=199;break;case"MISDREAVUS":case 200:m.pokemon_id=200;break;case"UNOWN":case 201:m.pokemon_id=201;break;case"WOBBUFFET":case 202:m.pokemon_id=202;break;case"GIRAFARIG":case 203:m.pokemon_id=203;break;case"PINECO":case 204:m.pokemon_id=204;break;case"FORRETRESS":case 205:m.pokemon_id=205;break;case"DUNSPARCE":case 206:m.pokemon_id=206;break;case"GLIGAR":case 207:m.pokemon_id=207;break;case"STEELIX":case 208:m.pokemon_id=208;break;case"SNUBBULL":case 209:m.pokemon_id=209;break;case"GRANBULL":case 210:m.pokemon_id=210;break;case"QWILFISH":case 211:m.pokemon_id=211;break;case"SCIZOR":case 212:m.pokemon_id=212;break;case"SHUCKLE":case 213:m.pokemon_id=213;break;case"HERACROSS":case 214:m.pokemon_id=214;break;case"SNEASEL":case 215:m.pokemon_id=215;break;case"TEDDIURSA":case 216:m.pokemon_id=216;break;case"URSARING":case 217:m.pokemon_id=217;break;case"SLUGMA":case 218:m.pokemon_id=218;break;case"MAGCARGO":case 219:m.pokemon_id=219;break;case"SWINUB":case 220:m.pokemon_id=220;break;case"PILOSWINE":case 221:m.pokemon_id=221;break;case"CORSOLA":case 222:m.pokemon_id=222;break;case"REMORAID":case 223:m.pokemon_id=223;break;case"OCTILLERY":case 224:m.pokemon_id=224;break;case"DELIBIRD":case 225:m.pokemon_id=225;break;case"MANTINE":case 226:m.pokemon_id=226;break;case"SKARMORY":case 227:m.pokemon_id=227;break;case"HOUNDOUR":case 228:m.pokemon_id=228;break;case"HOUNDOOM":case 229:m.pokemon_id=229;break;case"KINGDRA":case 230:m.pokemon_id=230;break;case"PHANPY":case 231:m.pokemon_id=231;break;case"DONPHAN":case 232:m.pokemon_id=232;break;case"PORYGON2":case 233:m.pokemon_id=233;break;case"STANTLER":case 234:m.pokemon_id=234;break;case"SMEARGLE":case 235:m.pokemon_id=235;break;case"TYROGUE":case 236:m.pokemon_id=236;break;case"HITMONTOP":case 237:m.pokemon_id=237;break;case"SMOOCHUM":case 238:m.pokemon_id=238;break;case"ELEKID":case 239:m.pokemon_id=239;break;case"MAGBY":case 240:m.pokemon_id=240;break;case"MILTANK":case 241:m.pokemon_id=241;break;case"BLISSEY":case 242:m.pokemon_id=242;break;case"RAIKOU":case 243:m.pokemon_id=243;break;case"ENTEI":case 244:m.pokemon_id=244;break;case"SUICUNE":case 245:m.pokemon_id=245;break;case"LARVITAR":case 246:m.pokemon_id=246;break;case"PUPITAR":case 247:m.pokemon_id=247;break;case"TYRANITAR":case 248:m.pokemon_id=248;break;case"LUGIA":case 249:m.pokemon_id=249;break;case"HO_OH":case 250:m.pokemon_id=250;break;case"CELEBI":case 251:m.pokemon_id=251;break;case"TREECKO":case 252:m.pokemon_id=252;break;case"GROVYLE":case 253:m.pokemon_id=253;break;case"SCEPTILE":case 254:m.pokemon_id=254;break;case"TORCHIC":case 255:m.pokemon_id=255;break;case"COMBUSKEN":case 256:m.pokemon_id=256;break;case"BLAZIKEN":case 257:m.pokemon_id=257;break;case"MUDKIP":case 258:m.pokemon_id=258;break;case"MARSHTOMP":case 259:m.pokemon_id=259;break;case"SWAMPERT":case 260:m.pokemon_id=260;break;case"POOCHYENA":case 261:m.pokemon_id=261;break;case"MIGHTYENA":case 262:m.pokemon_id=262;break;case"ZIGZAGOON":case 263:m.pokemon_id=263;break;case"LINOONE":case 264:m.pokemon_id=264;break;case"WURMPLE":case 265:m.pokemon_id=265;break;case"SILCOON":case 266:m.pokemon_id=266;break;case"BEAUTIFLY":case 267:m.pokemon_id=267;break;case"CASCOON":case 268:m.pokemon_id=268;break;case"DUSTOX":case 269:m.pokemon_id=269;break;case"LOTAD":case 270:m.pokemon_id=270;break;case"LOMBRE":case 271:m.pokemon_id=271;break;case"LUDICOLO":case 272:m.pokemon_id=272;break;case"SEEDOT":case 273:m.pokemon_id=273;break;case"NUZLEAF":case 274:m.pokemon_id=274;break;case"SHIFTRY":case 275:m.pokemon_id=275;break;case"TAILLOW":case 276:m.pokemon_id=276;break;case"SWELLOW":case 277:m.pokemon_id=277;break;case"WINGULL":case 278:m.pokemon_id=278;break;case"PELIPPER":case 279:m.pokemon_id=279;break;case"RALTS":case 280:m.pokemon_id=280;break;case"KIRLIA":case 281:m.pokemon_id=281;break;case"GARDEVOIR":case 282:m.pokemon_id=282;break;case"SURSKIT":case 283:m.pokemon_id=283;break;case"MASQUERAIN":case 284:m.pokemon_id=284;break;case"SHROOMISH":case 285:m.pokemon_id=285;break;case"BRELOOM":case 286:m.pokemon_id=286;break;case"SLAKOTH":case 287:m.pokemon_id=287;break;case"VIGOROTH":case 288:m.pokemon_id=288;break;case"SLAKING":case 289:m.pokemon_id=289;break;case"NINCADA":case 290:m.pokemon_id=290;break;case"NINJASK":case 291:m.pokemon_id=291;break;case"SHEDINJA":case 292:m.pokemon_id=292;break;case"WHISMUR":case 293:m.pokemon_id=293;break;case"LOUDRED":case 294:m.pokemon_id=294;break;case"EXPLOUD":case 295:m.pokemon_id=295;break;case"MAKUHITA":case 296:m.pokemon_id=296;break;case"HARIYAMA":case 297:m.pokemon_id=297;break;case"AZURILL":case 298:m.pokemon_id=298;break;case"NOSEPASS":case 299:m.pokemon_id=299;break;case"SKITTY":case 300:m.pokemon_id=300;break;case"DELCATTY":case 301:m.pokemon_id=301;break;case"SABLEYE":case 302:m.pokemon_id=302;break;case"MAWILE":case 303:m.pokemon_id=303;break;case"ARON":case 304:m.pokemon_id=304;break;case"LAIRON":case 305:m.pokemon_id=305;break;case"AGGRON":case 306:m.pokemon_id=306;break;case"MEDITITE":case 307:m.pokemon_id=307;break;case"MEDICHAM":case 308:m.pokemon_id=308;break;case"ELECTRIKE":case 309:m.pokemon_id=309;break;case"MANECTRIC":case 310:m.pokemon_id=310;break;case"PLUSLE":case 311:m.pokemon_id=311;break;case"MINUN":case 312:m.pokemon_id=312;break;case"VOLBEAT":case 313:m.pokemon_id=313;break;case"ILLUMISE":case 314:m.pokemon_id=314;break;case"ROSELIA":case 315:m.pokemon_id=315;break;case"GULPIN":case 316:m.pokemon_id=316;break;case"SWALOT":case 317:m.pokemon_id=317;break;case"CARVANHA":case 318:m.pokemon_id=318;break;case"SHARPEDO":case 319:m.pokemon_id=319;break;case"WAILMER":case 320:m.pokemon_id=320;break;case"WAILORD":case 321:m.pokemon_id=321;break;case"NUMEL":case 322:m.pokemon_id=322;break;case"CAMERUPT":case 323:m.pokemon_id=323;break;case"TORKOAL":case 324:m.pokemon_id=324;break;case"SPOINK":case 325:m.pokemon_id=325;break;case"GRUMPIG":case 326:m.pokemon_id=326;break;case"SPINDA":case 327:m.pokemon_id=327;break;case"TRAPINCH":case 328:m.pokemon_id=328;break;case"VIBRAVA":case 329:m.pokemon_id=329;break;case"FLYGON":case 330:m.pokemon_id=330;break;case"CACNEA":case 331:m.pokemon_id=331;break;case"CACTURNE":case 332:m.pokemon_id=332;break;case"SWABLU":case 333:m.pokemon_id=333;break;case"ALTARIA":case 334:m.pokemon_id=334;break;case"ZANGOOSE":case 335:m.pokemon_id=335;break;case"SEVIPER":case 336:m.pokemon_id=336;break;case"LUNATONE":case 337:m.pokemon_id=337;break;case"SOLROCK":case 338:m.pokemon_id=338;break;case"BARBOACH":case 339:m.pokemon_id=339;break;case"WHISCASH":case 340:m.pokemon_id=340;break;case"CORPHISH":case 341:m.pokemon_id=341;break;case"CRAWDAUNT":case 342:m.pokemon_id=342;break;case"BALTOY":case 343:m.pokemon_id=343;break;case"CLAYDOL":case 344:m.pokemon_id=344;break;case"LILEEP":case 345:m.pokemon_id=345;break;case"CRADILY":case 346:m.pokemon_id=346;break;case"ANORITH":case 347:m.pokemon_id=347;break;case"ARMALDO":case 348:m.pokemon_id=348;break;case"FEEBAS":case 349:m.pokemon_id=349;break;case"MILOTIC":case 350:m.pokemon_id=350;break;case"CASTFORM":case 351:m.pokemon_id=351;break;case"KECLEON":case 352:m.pokemon_id=352;break;case"SHUPPET":case 353:m.pokemon_id=353;break;case"BANETTE":case 354:m.pokemon_id=354;break;case"DUSKULL":case 355:m.pokemon_id=355;break;case"DUSCLOPS":case 356:m.pokemon_id=356;break;case"TROPIUS":case 357:m.pokemon_id=357;break;case"CHIMECHO":case 358:m.pokemon_id=358;break;case"ABSOL":case 359:m.pokemon_id=359;break;case"WYNAUT":case 360:m.pokemon_id=360;break;case"SNORUNT":case 361:m.pokemon_id=361;break;case"GLALIE":case 362:m.pokemon_id=362;break;case"SPHEAL":case 363:m.pokemon_id=363;break;case"SEALEO":case 364:m.pokemon_id=364;break;case"WALREIN":case 365:m.pokemon_id=365;break;case"CLAMPERL":case 366:m.pokemon_id=366;break;case"HUNTAIL":case 367:m.pokemon_id=367;break;case"GOREBYSS":case 368:m.pokemon_id=368;break;case"RELICANTH":case 369:m.pokemon_id=369;break;case"LUVDISC":case 370:m.pokemon_id=370;break;case"BAGON":case 371:m.pokemon_id=371;break;case"SHELGON":case 372:m.pokemon_id=372;break;case"SALAMENCE":case 373:m.pokemon_id=373;break;case"BELDUM":case 374:m.pokemon_id=374;break;case"METANG":case 375:m.pokemon_id=375;break;case"METAGROSS":case 376:m.pokemon_id=376;break;case"REGIROCK":case 377:m.pokemon_id=377;break;case"REGICE":case 378:m.pokemon_id=378;break;case"REGISTEEL":case 379:m.pokemon_id=379;break;case"LATIAS":case 380:m.pokemon_id=380;break;case"LATIOS":case 381:m.pokemon_id=381;break;case"KYOGRE":case 382:m.pokemon_id=382;break;case"GROUDON":case 383:m.pokemon_id=383;break;case"RAYQUAZA":case 384:m.pokemon_id=384;break;case"JIRACHI":case 385:m.pokemon_id=385;break;case"DEOXYS":case 386:m.pokemon_id=386;break;case"TURTWIG":case 387:m.pokemon_id=387;break;case"GROTLE":case 388:m.pokemon_id=388;break;case"TORTERRA":case 389:m.pokemon_id=389;break;case"CHIMCHAR":case 390:m.pokemon_id=390;break;case"MONFERNO":case 391:m.pokemon_id=391;break;case"INFERNAPE":case 392:m.pokemon_id=392;break;case"PIPLUP":case 393:m.pokemon_id=393;break;case"PRINPLUP":case 394:m.pokemon_id=394;break;case"EMPOLEON":case 395:m.pokemon_id=395;break;case"STARLY":case 396:m.pokemon_id=396;break;case"STARAVIA":case 397:m.pokemon_id=397;break;case"STARAPTOR":case 398:m.pokemon_id=398;break;case"BIDOOF":case 399:m.pokemon_id=399;break;case"BIBAREL":case 400:m.pokemon_id=400;break;case"KRICKETOT":case 401:m.pokemon_id=401;break;case"KRICKETUNE":case 402:m.pokemon_id=402;break;case"SHINX":case 403:m.pokemon_id=403;break;case"LUXIO":case 404:m.pokemon_id=404;break;case"LUXRAY":case 405:m.pokemon_id=405;break;case"BUDEW":case 406:m.pokemon_id=406;break;case"ROSERADE":case 407:m.pokemon_id=407;break;case"CRANIDOS":case 408:m.pokemon_id=408;break;case"RAMPARDOS":case 409:m.pokemon_id=409;break;case"SHIELDON":case 410:m.pokemon_id=410;break;case"BASTIODON":case 411:m.pokemon_id=411;break;case"BURMY":case 412:m.pokemon_id=412;break;case"WORMADAM":case 413:m.pokemon_id=413;break;case"MOTHIM":case 414:m.pokemon_id=414;break;case"COMBEE":case 415:m.pokemon_id=415;break;case"VESPIQUEN":case 416:m.pokemon_id=416;break;case"PACHIRISU":case 417:m.pokemon_id=417;break;case"BUIZEL":case 418:m.pokemon_id=418;break;case"FLOATZEL":case 419:m.pokemon_id=419;break;case"CHERUBI":case 420:m.pokemon_id=420;break;case"CHERRIM":case 421:m.pokemon_id=421;break;case"SHELLOS":case 422:m.pokemon_id=422;break;case"GASTRODON":case 423:m.pokemon_id=423;break;case"AMBIPOM":case 424:m.pokemon_id=424;break;case"DRIFLOON":case 425:m.pokemon_id=425;break;case"DRIFBLIM":case 426:m.pokemon_id=426;break;case"BUNEARY":case 427:m.pokemon_id=427;break;case"LOPUNNY":case 428:m.pokemon_id=428;break;case"MISMAGIUS":case 429:m.pokemon_id=429;break;case"HONCHKROW":case 430:m.pokemon_id=430;break;case"GLAMEOW":case 431:m.pokemon_id=431;break;case"PURUGLY":case 432:m.pokemon_id=432;break;case"CHINGLING":case 433:m.pokemon_id=433;break;case"STUNKY":case 434:m.pokemon_id=434;break;case"SKUNTANK":case 435:m.pokemon_id=435;break;case"BRONZOR":case 436:m.pokemon_id=436;break;case"BRONZONG":case 437:m.pokemon_id=437;break;case"BONSLY":case 438:m.pokemon_id=438;break;case"MIME_JR":case 439:m.pokemon_id=439;break;case"HAPPINY":case 440:m.pokemon_id=440;break;case"CHATOT":case 441:m.pokemon_id=441;break;case"SPIRITOMB":case 442:m.pokemon_id=442;break;case"GIBLE":case 443:m.pokemon_id=443;break;case"GABITE":case 444:m.pokemon_id=444;break;case"GARCHOMP":case 445:m.pokemon_id=445;break;case"MUNCHLAX":case 446:m.pokemon_id=446;break;case"RIOLU":case 447:m.pokemon_id=447;break;case"LUCARIO":case 448:m.pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.pokemon_id=449;break;case"HIPPOWDON":case 450:m.pokemon_id=450;break;case"SKORUPI":case 451:m.pokemon_id=451;break;case"DRAPION":case 452:m.pokemon_id=452;break;case"CROAGUNK":case 453:m.pokemon_id=453;break;case"TOXICROAK":case 454:m.pokemon_id=454;break;case"CARNIVINE":case 455:m.pokemon_id=455;break;case"FINNEON":case 456:m.pokemon_id=456;break;case"LUMINEON":case 457:m.pokemon_id=457;break;case"MANTYKE":case 458:m.pokemon_id=458;break;case"SNOVER":case 459:m.pokemon_id=459;break;case"ABOMASNOW":case 460:m.pokemon_id=460;break;case"WEAVILE":case 461:m.pokemon_id=461;break;case"MAGNEZONE":case 462:m.pokemon_id=462;break;case"LICKILICKY":case 463:m.pokemon_id=463;break;case"RHYPERIOR":case 464:m.pokemon_id=464;break;case"TANGROWTH":case 465:m.pokemon_id=465;break;case"ELECTIVIRE":case 466:m.pokemon_id=466;break;case"MAGMORTAR":case 467:m.pokemon_id=467;break;case"TOGEKISS":case 468:m.pokemon_id=468;break;case"YANMEGA":case 469:m.pokemon_id=469;break;case"LEAFEON":case 470:m.pokemon_id=470;break;case"GLACEON":case 471:m.pokemon_id=471;break;case"GLISCOR":case 472:m.pokemon_id=472;break;case"MAMOSWINE":case 473:m.pokemon_id=473;break;case"PORYGON_Z":case 474:m.pokemon_id=474;break;case"GALLADE":case 475:m.pokemon_id=475;break;case"PROBOPASS":case 476:m.pokemon_id=476;break;case"DUSKNOIR":case 477:m.pokemon_id=477;break;case"FROSLASS":case 478:m.pokemon_id=478;break;case"ROTOM":case 479:m.pokemon_id=479;break;case"UXIE":case 480:m.pokemon_id=480;break;case"MESPRIT":case 481:m.pokemon_id=481;break;case"AZELF":case 482:m.pokemon_id=482;break;case"DIALGA":case 483:m.pokemon_id=483;break;case"PALKIA":case 484:m.pokemon_id=484;break;case"HEATRAN":case 485:m.pokemon_id=485;break;case"REGIGIGAS":case 486:m.pokemon_id=486;break;case"GIRATINA":case 487:m.pokemon_id=487;break;case"CRESSELIA":case 488:m.pokemon_id=488;break;case"PHIONE":case 489:m.pokemon_id=489;break;case"MANAPHY":case 490:m.pokemon_id=490;break;case"DARKRAI":case 491:m.pokemon_id=491;break;case"SHAYMIN":case 492:m.pokemon_id=492;break;case"ARCEUS":case 493:m.pokemon_id=493;break;case"MELTAN":case 808:m.pokemon_id=808;break;case"MELMETAL":case 809:m.pokemon_id=809;break}if(d.use_quest_pokemon_encounter_distribuition!=null){m.use_quest_pokemon_encounter_distribuition=Boolean(d.use_quest_pokemon_encounter_distribuition)}if(d.pokemon_display!=null){if(typeof d.pokemon_display!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestReward.PokemonEncounterReward.pokemon_display: object expected");m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.pokemon_display)}if(d.is_hidden_ditto!=null){m.is_hidden_ditto=Boolean(d.is_hidden_ditto)}if(d.ditto_display!=null){if(typeof d.ditto_display!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestReward.PokemonEncounterReward.ditto_display: object expected");m.ditto_display=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.ditto_display)}return m};PokemonEncounterReward.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon_display=null;d.is_hidden_ditto=false;d.ditto_display=null}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){d.pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_id]:m.pokemon_id;if(o.oneofs)d.Type="pokemon_id"}if(m.use_quest_pokemon_encounter_distribuition!=null&&m.hasOwnProperty("use_quest_pokemon_encounter_distribuition")){d.use_quest_pokemon_encounter_distribuition=m.use_quest_pokemon_encounter_distribuition;if(o.oneofs)d.Type="use_quest_pokemon_encounter_distribuition"}if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display")){d.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.toObject(m.pokemon_display,o)}if(m.is_hidden_ditto!=null&&m.hasOwnProperty("is_hidden_ditto")){d.is_hidden_ditto=m.is_hidden_ditto}if(m.ditto_display!=null&&m.hasOwnProperty("ditto_display")){d.ditto_display=$root.POGOProtos.Data.PokemonDisplay.toObject(m.ditto_display,o)}return d};PokemonEncounterReward.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokemonEncounterReward}();return QuestReward}();Quests.Quests=function(){function Quests(p){this.quest=[];this.completed_story_quest=[];this.quest_pokemon_encounter=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Quests.prototype.quest=$util.emptyArray;Quests.prototype.completed_story_quest=$util.emptyArray;Quests.prototype.quest_pokemon_encounter=$util.emptyArray;Quests.prototype.stamp_card=null;Quests.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.quest!=null&&m.quest.length){for(var i=0;i<m.quest.length;++i)$root.POGOProtos.Data.Quests.Quest.encode(m.quest[i],w.uint32(10).fork()).ldelim()}if(m.completed_story_quest!=null&&m.completed_story_quest.length){for(var i=0;i<m.completed_story_quest.length;++i)w.uint32(18).string(m.completed_story_quest[i])}if(m.quest_pokemon_encounter!=null&&m.quest_pokemon_encounter.length){for(var i=0;i<m.quest_pokemon_encounter.length;++i)$root.POGOProtos.Data.Quests.QuestPokemonEncounter.encode(m.quest_pokemon_encounter[i],w.uint32(26).fork()).ldelim()}if(m.stamp_card!=null&&m.hasOwnProperty("stamp_card"))$root.POGOProtos.Data.Quests.QuestStampCard.encode(m.stamp_card,w.uint32(34).fork()).ldelim();return w};Quests.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.Quests;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.quest&&m.quest.length))m.quest=[];m.quest.push($root.POGOProtos.Data.Quests.Quest.decode(r,r.uint32()));break;case 2:if(!(m.completed_story_quest&&m.completed_story_quest.length))m.completed_story_quest=[];m.completed_story_quest.push(r.string());break;case 3:if(!(m.quest_pokemon_encounter&&m.quest_pokemon_encounter.length))m.quest_pokemon_encounter=[];m.quest_pokemon_encounter.push($root.POGOProtos.Data.Quests.QuestPokemonEncounter.decode(r,r.uint32()));break;case 4:m.stamp_card=$root.POGOProtos.Data.Quests.QuestStampCard.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};Quests.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.Quests)return d;var m=new $root.POGOProtos.Data.Quests.Quests;if(d.quest){if(!Array.isArray(d.quest))throw TypeError(".POGOProtos.Data.Quests.Quests.quest: array expected");m.quest=[];for(var i=0;i<d.quest.length;++i){if(typeof d.quest[i]!=="object")throw TypeError(".POGOProtos.Data.Quests.Quests.quest: object expected");m.quest[i]=$root.POGOProtos.Data.Quests.Quest.fromObject(d.quest[i])}}if(d.completed_story_quest){if(!Array.isArray(d.completed_story_quest))throw TypeError(".POGOProtos.Data.Quests.Quests.completed_story_quest: array expected");m.completed_story_quest=[];for(var i=0;i<d.completed_story_quest.length;++i){m.completed_story_quest[i]=String(d.completed_story_quest[i])}}if(d.quest_pokemon_encounter){if(!Array.isArray(d.quest_pokemon_encounter))throw TypeError(".POGOProtos.Data.Quests.Quests.quest_pokemon_encounter: array expected");m.quest_pokemon_encounter=[];for(var i=0;i<d.quest_pokemon_encounter.length;++i){if(typeof d.quest_pokemon_encounter[i]!=="object")throw TypeError(".POGOProtos.Data.Quests.Quests.quest_pokemon_encounter: object expected");m.quest_pokemon_encounter[i]=$root.POGOProtos.Data.Quests.QuestPokemonEncounter.fromObject(d.quest_pokemon_encounter[i])}}if(d.stamp_card!=null){if(typeof d.stamp_card!=="object")throw TypeError(".POGOProtos.Data.Quests.Quests.stamp_card: object expected");m.stamp_card=$root.POGOProtos.Data.Quests.QuestStampCard.fromObject(d.stamp_card)}return m};Quests.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.quest=[];d.completed_story_quest=[];d.quest_pokemon_encounter=[]}if(o.defaults){d.stamp_card=null}if(m.quest&&m.quest.length){d.quest=[];for(var j=0;j<m.quest.length;++j){d.quest[j]=$root.POGOProtos.Data.Quests.Quest.toObject(m.quest[j],o)}}if(m.completed_story_quest&&m.completed_story_quest.length){d.completed_story_quest=[];for(var j=0;j<m.completed_story_quest.length;++j){d.completed_story_quest[j]=m.completed_story_quest[j]}}if(m.quest_pokemon_encounter&&m.quest_pokemon_encounter.length){d.quest_pokemon_encounter=[];for(var j=0;j<m.quest_pokemon_encounter.length;++j){d.quest_pokemon_encounter[j]=$root.POGOProtos.Data.Quests.QuestPokemonEncounter.toObject(m.quest_pokemon_encounter[j],o)}}if(m.stamp_card!=null&&m.hasOwnProperty("stamp_card")){d.stamp_card=$root.POGOProtos.Data.Quests.QuestStampCard.toObject(m.stamp_card,o)}return d};Quests.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Quests}();Quests.QuestStamp=function(){function QuestStamp(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}QuestStamp.prototype.context=0;QuestStamp.prototype.timestamp_ms=$util.Long?$util.Long.fromBits(0,0,true):0;QuestStamp.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.context!=null&&m.hasOwnProperty("context"))w.uint32(8).int32(m.context);if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms"))w.uint32(16).uint64(m.timestamp_ms);return w};QuestStamp.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestStamp;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.context=r.int32();break;case 2:m.timestamp_ms=r.uint64();break;default:r.skipType(t&7);break}}return m};QuestStamp.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestStamp)return d;var m=new $root.POGOProtos.Data.Quests.QuestStamp;switch(d.context){case"UNSET":case 0:m.context=0;break;case"STORY_QUEST":case 1:m.context=1;break;case"CHALLENGE_QUEST":case 2:m.context=2;break}if(d.timestamp_ms!=null){if($util.Long)(m.timestamp_ms=$util.Long.fromValue(d.timestamp_ms)).unsigned=true;else if(typeof d.timestamp_ms==="string")m.timestamp_ms=parseInt(d.timestamp_ms,10);else if(typeof d.timestamp_ms==="number")m.timestamp_ms=d.timestamp_ms;else if(typeof d.timestamp_ms==="object")m.timestamp_ms=new $util.LongBits(d.timestamp_ms.low>>>0,d.timestamp_ms.high>>>0).toNumber(true)}return m};QuestStamp.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.context=o.enums===String?"UNSET":0;if($util.Long){var n=new $util.Long(0,0,true);d.timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.timestamp_ms=o.longs===String?"0":0}if(m.context!=null&&m.hasOwnProperty("context")){d.context=o.enums===String?$root.POGOProtos.Data.Quests.QuestStamp.Context[m.context]:m.context}if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms")){if(typeof m.timestamp_ms==="number")d.timestamp_ms=o.longs===String?String(m.timestamp_ms):m.timestamp_ms;else d.timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.timestamp_ms):o.longs===Number?new $util.LongBits(m.timestamp_ms.low>>>0,m.timestamp_ms.high>>>0).toNumber(true):m.timestamp_ms}return d};QuestStamp.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};QuestStamp.Context=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="STORY_QUEST"]=1;values[valuesById[2]="CHALLENGE_QUEST"]=2;return values}();return QuestStamp}();Quests.QuestStampCard=function(){function QuestStampCard(p){this.stamp=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}QuestStampCard.prototype.stamp=$util.emptyArray;QuestStampCard.prototype.target=0;QuestStampCard.prototype.remaining_daily_stamps=0;QuestStampCard.prototype.id="";QuestStampCard.prototype.icon_url="";QuestStampCard.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.stamp!=null&&m.stamp.length){for(var i=0;i<m.stamp.length;++i)$root.POGOProtos.Data.Quests.QuestStamp.encode(m.stamp[i],w.uint32(10).fork()).ldelim()}if(m.target!=null&&m.hasOwnProperty("target"))w.uint32(16).int32(m.target);if(m.remaining_daily_stamps!=null&&m.hasOwnProperty("remaining_daily_stamps"))w.uint32(24).int32(m.remaining_daily_stamps);if(m.id!=null&&m.hasOwnProperty("id"))w.uint32(34).string(m.id);if(m.icon_url!=null&&m.hasOwnProperty("icon_url"))w.uint32(42).string(m.icon_url);return w};QuestStampCard.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.QuestStampCard;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.stamp&&m.stamp.length))m.stamp=[];m.stamp.push($root.POGOProtos.Data.Quests.QuestStamp.decode(r,r.uint32()));break;case 2:m.target=r.int32();break;case 3:m.remaining_daily_stamps=r.int32();break;case 4:m.id=r.string();break;case 5:m.icon_url=r.string();break;default:r.skipType(t&7);break}}return m};QuestStampCard.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.QuestStampCard)return d;var m=new $root.POGOProtos.Data.Quests.QuestStampCard;if(d.stamp){if(!Array.isArray(d.stamp))throw TypeError(".POGOProtos.Data.Quests.QuestStampCard.stamp: array expected");m.stamp=[];for(var i=0;i<d.stamp.length;++i){if(typeof d.stamp[i]!=="object")throw TypeError(".POGOProtos.Data.Quests.QuestStampCard.stamp: object expected");m.stamp[i]=$root.POGOProtos.Data.Quests.QuestStamp.fromObject(d.stamp[i])}}if(d.target!=null){m.target=d.target|0}if(d.remaining_daily_stamps!=null){m.remaining_daily_stamps=d.remaining_daily_stamps|0}if(d.id!=null){m.id=String(d.id)}if(d.icon_url!=null){m.icon_url=String(d.icon_url)}return m};QuestStampCard.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.stamp=[]}if(o.defaults){d.target=0;d.remaining_daily_stamps=0;d.id="";d.icon_url=""}if(m.stamp&&m.stamp.length){d.stamp=[];for(var j=0;j<m.stamp.length;++j){d.stamp[j]=$root.POGOProtos.Data.Quests.QuestStamp.toObject(m.stamp[j],o)}}if(m.target!=null&&m.hasOwnProperty("target")){d.target=m.target}if(m.remaining_daily_stamps!=null&&m.hasOwnProperty("remaining_daily_stamps")){d.remaining_daily_stamps=m.remaining_daily_stamps}if(m.id!=null&&m.hasOwnProperty("id")){d.id=m.id}if(m.icon_url!=null&&m.hasOwnProperty("icon_url")){d.icon_url=m.icon_url}return d};QuestStampCard.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return QuestStampCard}();Quests.TradePokemonQuest=function(){function TradePokemonQuest(p){this.friend_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}TradePokemonQuest.prototype.friend_id=$util.emptyArray;TradePokemonQuest.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.friend_id!=null&&m.friend_id.length){for(var i=0;i<m.friend_id.length;++i)w.uint32(10).string(m.friend_id[i])}return w};TradePokemonQuest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Quests.TradePokemonQuest;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.friend_id&&m.friend_id.length))m.friend_id=[];m.friend_id.push(r.string());break;default:r.skipType(t&7);break}}return m};TradePokemonQuest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Quests.TradePokemonQuest)return d;var m=new $root.POGOProtos.Data.Quests.TradePokemonQuest;if(d.friend_id){if(!Array.isArray(d.friend_id))throw TypeError(".POGOProtos.Data.Quests.TradePokemonQuest.friend_id: array expected");m.friend_id=[];for(var i=0;i<d.friend_id.length;++i){m.friend_id[i]=String(d.friend_id[i])}}return m};TradePokemonQuest.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.friend_id=[]}if(m.friend_id&&m.friend_id.length){d.friend_id=[];for(var j=0;j<m.friend_id.length;++j){d.friend_id[j]=m.friend_id[j]}}return d};TradePokemonQuest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return TradePokemonQuest}();return Quests}();Data.Raid=function(){var Raid={};Raid.EventInfo=function(){function EventInfo(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EventInfo.prototype.image_url="";EventInfo.prototype.icon_url="";EventInfo.prototype.name_key="";EventInfo.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.image_url!=null&&m.hasOwnProperty("image_url"))w.uint32(10).string(m.image_url);if(m.icon_url!=null&&m.hasOwnProperty("icon_url"))w.uint32(18).string(m.icon_url);if(m.name_key!=null&&m.hasOwnProperty("name_key"))w.uint32(26).string(m.name_key);return w};EventInfo.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Raid.EventInfo;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.image_url=r.string();break;case 2:m.icon_url=r.string();break;case 3:m.name_key=r.string();break;default:r.skipType(t&7);break}}return m};EventInfo.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Raid.EventInfo)return d;var m=new $root.POGOProtos.Data.Raid.EventInfo;if(d.image_url!=null){m.image_url=String(d.image_url)}if(d.icon_url!=null){m.icon_url=String(d.icon_url)}if(d.name_key!=null){m.name_key=String(d.name_key)}return m};EventInfo.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.image_url="";d.icon_url="";d.name_key=""}if(m.image_url!=null&&m.hasOwnProperty("image_url")){d.image_url=m.image_url}if(m.icon_url!=null&&m.hasOwnProperty("icon_url")){d.icon_url=m.icon_url}if(m.name_key!=null&&m.hasOwnProperty("name_key")){d.name_key=m.name_key}return d};EventInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EventInfo}();Raid.ExclusiveRaidCancellation=function(){function ExclusiveRaidCancellation(p){this.rewards=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ExclusiveRaidCancellation.prototype.fort_id="";ExclusiveRaidCancellation.prototype.start_time_ms=$util.Long?$util.Long.fromBits(0,0,false):0;ExclusiveRaidCancellation.prototype.end_time_ms=$util.Long?$util.Long.fromBits(0,0,false):0;ExclusiveRaidCancellation.prototype.image_url="";ExclusiveRaidCancellation.prototype.latitude=0;ExclusiveRaidCancellation.prototype.longitude=0;ExclusiveRaidCancellation.prototype.gym_name="";ExclusiveRaidCancellation.prototype.rewards=$util.emptyArray;ExclusiveRaidCancellation.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(10).string(m.fort_id);if(m.start_time_ms!=null&&m.hasOwnProperty("start_time_ms"))w.uint32(16).int64(m.start_time_ms);if(m.end_time_ms!=null&&m.hasOwnProperty("end_time_ms"))w.uint32(24).int64(m.end_time_ms);if(m.image_url!=null&&m.hasOwnProperty("image_url"))w.uint32(34).string(m.image_url);if(m.latitude!=null&&m.hasOwnProperty("latitude"))w.uint32(41).double(m.latitude);if(m.longitude!=null&&m.hasOwnProperty("longitude"))w.uint32(49).double(m.longitude);if(m.gym_name!=null&&m.hasOwnProperty("gym_name"))w.uint32(58).string(m.gym_name);if(m.rewards!=null&&m.rewards.length){for(var i=0;i<m.rewards.length;++i)$root.POGOProtos.Inventory.LootItem.encode(m.rewards[i],w.uint32(66).fork()).ldelim()}return w};ExclusiveRaidCancellation.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Raid.ExclusiveRaidCancellation;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fort_id=r.string();break;case 2:m.start_time_ms=r.int64();break;case 3:m.end_time_ms=r.int64();break;case 4:m.image_url=r.string();break;case 5:m.latitude=r.double();break;case 6:m.longitude=r.double();break;case 7:m.gym_name=r.string();break;case 8:if(!(m.rewards&&m.rewards.length))m.rewards=[];m.rewards.push($root.POGOProtos.Inventory.LootItem.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};ExclusiveRaidCancellation.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Raid.ExclusiveRaidCancellation)return d;var m=new $root.POGOProtos.Data.Raid.ExclusiveRaidCancellation;if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.start_time_ms!=null){if($util.Long)(m.start_time_ms=$util.Long.fromValue(d.start_time_ms)).unsigned=false;else if(typeof d.start_time_ms==="string")m.start_time_ms=parseInt(d.start_time_ms,10);else if(typeof d.start_time_ms==="number")m.start_time_ms=d.start_time_ms;else if(typeof d.start_time_ms==="object")m.start_time_ms=new $util.LongBits(d.start_time_ms.low>>>0,d.start_time_ms.high>>>0).toNumber()}if(d.end_time_ms!=null){if($util.Long)(m.end_time_ms=$util.Long.fromValue(d.end_time_ms)).unsigned=false;else if(typeof d.end_time_ms==="string")m.end_time_ms=parseInt(d.end_time_ms,10);else if(typeof d.end_time_ms==="number")m.end_time_ms=d.end_time_ms;else if(typeof d.end_time_ms==="object")m.end_time_ms=new $util.LongBits(d.end_time_ms.low>>>0,d.end_time_ms.high>>>0).toNumber()}if(d.image_url!=null){m.image_url=String(d.image_url)}if(d.latitude!=null){m.latitude=Number(d.latitude)}if(d.longitude!=null){m.longitude=Number(d.longitude)}if(d.gym_name!=null){m.gym_name=String(d.gym_name)}if(d.rewards){if(!Array.isArray(d.rewards))throw TypeError(".POGOProtos.Data.Raid.ExclusiveRaidCancellation.rewards: array expected");m.rewards=[];for(var i=0;i<d.rewards.length;++i){if(typeof d.rewards[i]!=="object")throw TypeError(".POGOProtos.Data.Raid.ExclusiveRaidCancellation.rewards: object expected");m.rewards[i]=$root.POGOProtos.Inventory.LootItem.fromObject(d.rewards[i])}}return m};ExclusiveRaidCancellation.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.rewards=[]}if(o.defaults){d.fort_id="";if($util.Long){var n=new $util.Long(0,0,false);d.start_time_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.start_time_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.end_time_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.end_time_ms=o.longs===String?"0":0;d.image_url="";d.latitude=0;d.longitude=0;d.gym_name=""}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.start_time_ms!=null&&m.hasOwnProperty("start_time_ms")){if(typeof m.start_time_ms==="number")d.start_time_ms=o.longs===String?String(m.start_time_ms):m.start_time_ms;else d.start_time_ms=o.longs===String?$util.Long.prototype.toString.call(m.start_time_ms):o.longs===Number?new $util.LongBits(m.start_time_ms.low>>>0,m.start_time_ms.high>>>0).toNumber():m.start_time_ms}if(m.end_time_ms!=null&&m.hasOwnProperty("end_time_ms")){if(typeof m.end_time_ms==="number")d.end_time_ms=o.longs===String?String(m.end_time_ms):m.end_time_ms;else d.end_time_ms=o.longs===String?$util.Long.prototype.toString.call(m.end_time_ms):o.longs===Number?new $util.LongBits(m.end_time_ms.low>>>0,m.end_time_ms.high>>>0).toNumber():m.end_time_ms}if(m.image_url!=null&&m.hasOwnProperty("image_url")){d.image_url=m.image_url}if(m.latitude!=null&&m.hasOwnProperty("latitude")){d.latitude=o.json&&!isFinite(m.latitude)?String(m.latitude):m.latitude}if(m.longitude!=null&&m.hasOwnProperty("longitude")){d.longitude=o.json&&!isFinite(m.longitude)?String(m.longitude):m.longitude}if(m.gym_name!=null&&m.hasOwnProperty("gym_name")){d.gym_name=m.gym_name}if(m.rewards&&m.rewards.length){d.rewards=[];for(var j=0;j<m.rewards.length;++j){d.rewards[j]=$root.POGOProtos.Inventory.LootItem.toObject(m.rewards[j],o)}}return d};ExclusiveRaidCancellation.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ExclusiveRaidCancellation}();Raid.ExclusiveTicketInfo=function(){function ExclusiveTicketInfo(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ExclusiveTicketInfo.prototype.raid_seed=$util.Long?$util.Long.fromBits(0,0,false):0;ExclusiveTicketInfo.prototype.fort_id="";ExclusiveTicketInfo.prototype.start_time_ms=$util.Long?$util.Long.fromBits(0,0,false):0;ExclusiveTicketInfo.prototype.end_time_ms=$util.Long?$util.Long.fromBits(0,0,false):0;ExclusiveTicketInfo.prototype.image_url="";ExclusiveTicketInfo.prototype.latitude=0;ExclusiveTicketInfo.prototype.longitude=0;ExclusiveTicketInfo.prototype.gym_name="";ExclusiveTicketInfo.prototype.spawn_time_ms=$util.Long?$util.Long.fromBits(0,0,false):0;ExclusiveTicketInfo.prototype.is_cancelled=false;ExclusiveTicketInfo.prototype.raid_pokemon=null;ExclusiveTicketInfo.prototype.inviter=null;ExclusiveTicketInfo.prototype.invitee=null;ExclusiveTicketInfo.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed"))w.uint32(8).int64(m.raid_seed);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(18).string(m.fort_id);if(m.start_time_ms!=null&&m.hasOwnProperty("start_time_ms"))w.uint32(32).int64(m.start_time_ms);if(m.end_time_ms!=null&&m.hasOwnProperty("end_time_ms"))w.uint32(40).int64(m.end_time_ms);if(m.image_url!=null&&m.hasOwnProperty("image_url"))w.uint32(50).string(m.image_url);if(m.latitude!=null&&m.hasOwnProperty("latitude"))w.uint32(57).double(m.latitude);if(m.longitude!=null&&m.hasOwnProperty("longitude"))w.uint32(65).double(m.longitude);if(m.gym_name!=null&&m.hasOwnProperty("gym_name"))w.uint32(74).string(m.gym_name);if(m.spawn_time_ms!=null&&m.hasOwnProperty("spawn_time_ms"))w.uint32(80).int64(m.spawn_time_ms);if(m.is_cancelled!=null&&m.hasOwnProperty("is_cancelled"))w.uint32(88).bool(m.is_cancelled);if(m.raid_pokemon!=null&&m.hasOwnProperty("raid_pokemon"))$root.POGOProtos.Data.PokemonData.encode(m.raid_pokemon,w.uint32(98).fork()).ldelim();if(m.inviter!=null&&m.hasOwnProperty("inviter"))$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.encode(m.inviter,w.uint32(106).fork()).ldelim();if(m.invitee!=null&&m.hasOwnProperty("invitee"))$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.encode(m.invitee,w.uint32(114).fork()).ldelim();return w};ExclusiveTicketInfo.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Raid.ExclusiveTicketInfo;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.raid_seed=r.int64();break;case 2:m.fort_id=r.string();break;case 4:m.start_time_ms=r.int64();break;case 5:m.end_time_ms=r.int64();break;case 6:m.image_url=r.string();break;case 7:m.latitude=r.double();break;case 8:m.longitude=r.double();break;case 9:m.gym_name=r.string();break;case 10:m.spawn_time_ms=r.int64();break;case 11:m.is_cancelled=r.bool();break;case 12:m.raid_pokemon=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 13:m.inviter=$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.decode(r,r.uint32());break;case 14:m.invitee=$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};ExclusiveTicketInfo.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Raid.ExclusiveTicketInfo)return d;var m=new $root.POGOProtos.Data.Raid.ExclusiveTicketInfo;if(d.raid_seed!=null){if($util.Long)(m.raid_seed=$util.Long.fromValue(d.raid_seed)).unsigned=false;else if(typeof d.raid_seed==="string")m.raid_seed=parseInt(d.raid_seed,10);else if(typeof d.raid_seed==="number")m.raid_seed=d.raid_seed;else if(typeof d.raid_seed==="object")m.raid_seed=new $util.LongBits(d.raid_seed.low>>>0,d.raid_seed.high>>>0).toNumber()}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.start_time_ms!=null){if($util.Long)(m.start_time_ms=$util.Long.fromValue(d.start_time_ms)).unsigned=false;else if(typeof d.start_time_ms==="string")m.start_time_ms=parseInt(d.start_time_ms,10);else if(typeof d.start_time_ms==="number")m.start_time_ms=d.start_time_ms;else if(typeof d.start_time_ms==="object")m.start_time_ms=new $util.LongBits(d.start_time_ms.low>>>0,d.start_time_ms.high>>>0).toNumber()}if(d.end_time_ms!=null){if($util.Long)(m.end_time_ms=$util.Long.fromValue(d.end_time_ms)).unsigned=false;else if(typeof d.end_time_ms==="string")m.end_time_ms=parseInt(d.end_time_ms,10);else if(typeof d.end_time_ms==="number")m.end_time_ms=d.end_time_ms;else if(typeof d.end_time_ms==="object")m.end_time_ms=new $util.LongBits(d.end_time_ms.low>>>0,d.end_time_ms.high>>>0).toNumber()}if(d.image_url!=null){m.image_url=String(d.image_url)}if(d.latitude!=null){m.latitude=Number(d.latitude)}if(d.longitude!=null){m.longitude=Number(d.longitude)}if(d.gym_name!=null){m.gym_name=String(d.gym_name)}if(d.spawn_time_ms!=null){if($util.Long)(m.spawn_time_ms=$util.Long.fromValue(d.spawn_time_ms)).unsigned=false;else if(typeof d.spawn_time_ms==="string")m.spawn_time_ms=parseInt(d.spawn_time_ms,10);else if(typeof d.spawn_time_ms==="number")m.spawn_time_ms=d.spawn_time_ms;else if(typeof d.spawn_time_ms==="object")m.spawn_time_ms=new $util.LongBits(d.spawn_time_ms.low>>>0,d.spawn_time_ms.high>>>0).toNumber()}if(d.is_cancelled!=null){m.is_cancelled=Boolean(d.is_cancelled)}if(d.raid_pokemon!=null){if(typeof d.raid_pokemon!=="object")throw TypeError(".POGOProtos.Data.Raid.ExclusiveTicketInfo.raid_pokemon: object expected");m.raid_pokemon=$root.POGOProtos.Data.PokemonData.fromObject(d.raid_pokemon)}if(d.inviter!=null){if(typeof d.inviter!=="object")throw TypeError(".POGOProtos.Data.Raid.ExclusiveTicketInfo.inviter: object expected");m.inviter=$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.fromObject(d.inviter)}if(d.invitee!=null){if(typeof d.invitee!=="object")throw TypeError(".POGOProtos.Data.Raid.ExclusiveTicketInfo.invitee: object expected");m.invitee=$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.fromObject(d.invitee)}return m};ExclusiveTicketInfo.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.raid_seed=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_seed=o.longs===String?"0":0;d.fort_id="";if($util.Long){var n=new $util.Long(0,0,false);d.start_time_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.start_time_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.end_time_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.end_time_ms=o.longs===String?"0":0;d.image_url="";d.latitude=0;d.longitude=0;d.gym_name="";if($util.Long){var n=new $util.Long(0,0,false);d.spawn_time_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.spawn_time_ms=o.longs===String?"0":0;d.is_cancelled=false;d.raid_pokemon=null;d.inviter=null;d.invitee=null}if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed")){if(typeof m.raid_seed==="number")d.raid_seed=o.longs===String?String(m.raid_seed):m.raid_seed;else d.raid_seed=o.longs===String?$util.Long.prototype.toString.call(m.raid_seed):o.longs===Number?new $util.LongBits(m.raid_seed.low>>>0,m.raid_seed.high>>>0).toNumber():m.raid_seed}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.start_time_ms!=null&&m.hasOwnProperty("start_time_ms")){if(typeof m.start_time_ms==="number")d.start_time_ms=o.longs===String?String(m.start_time_ms):m.start_time_ms;else d.start_time_ms=o.longs===String?$util.Long.prototype.toString.call(m.start_time_ms):o.longs===Number?new $util.LongBits(m.start_time_ms.low>>>0,m.start_time_ms.high>>>0).toNumber():m.start_time_ms}if(m.end_time_ms!=null&&m.hasOwnProperty("end_time_ms")){if(typeof m.end_time_ms==="number")d.end_time_ms=o.longs===String?String(m.end_time_ms):m.end_time_ms;else d.end_time_ms=o.longs===String?$util.Long.prototype.toString.call(m.end_time_ms):o.longs===Number?new $util.LongBits(m.end_time_ms.low>>>0,m.end_time_ms.high>>>0).toNumber():m.end_time_ms}if(m.image_url!=null&&m.hasOwnProperty("image_url")){d.image_url=m.image_url}if(m.latitude!=null&&m.hasOwnProperty("latitude")){d.latitude=o.json&&!isFinite(m.latitude)?String(m.latitude):m.latitude}if(m.longitude!=null&&m.hasOwnProperty("longitude")){d.longitude=o.json&&!isFinite(m.longitude)?String(m.longitude):m.longitude}if(m.gym_name!=null&&m.hasOwnProperty("gym_name")){d.gym_name=m.gym_name}if(m.spawn_time_ms!=null&&m.hasOwnProperty("spawn_time_ms")){if(typeof m.spawn_time_ms==="number")d.spawn_time_ms=o.longs===String?String(m.spawn_time_ms):m.spawn_time_ms;else d.spawn_time_ms=o.longs===String?$util.Long.prototype.toString.call(m.spawn_time_ms):o.longs===Number?new $util.LongBits(m.spawn_time_ms.low>>>0,m.spawn_time_ms.high>>>0).toNumber():m.spawn_time_ms}if(m.is_cancelled!=null&&m.hasOwnProperty("is_cancelled")){d.is_cancelled=m.is_cancelled}if(m.raid_pokemon!=null&&m.hasOwnProperty("raid_pokemon")){d.raid_pokemon=$root.POGOProtos.Data.PokemonData.toObject(m.raid_pokemon,o)}if(m.inviter!=null&&m.hasOwnProperty("inviter")){d.inviter=$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.toObject(m.inviter,o)}if(m.invitee!=null&&m.hasOwnProperty("invitee")){d.invitee=$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.toObject(m.invitee,o)}return d};ExclusiveTicketInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ExclusiveTicketInfo}();Raid.Lobby=function(){function Lobby(p){this.lobby_id=[];this.players=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Lobby.prototype.lobby_id=$util.emptyArray;Lobby.prototype.players=$util.emptyArray;Lobby.prototype.player_join_end_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Lobby.prototype.pokemon_selection_end_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Lobby.prototype.raid_battle_start_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Lobby.prototype.raid_battle_end_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Lobby.prototype.raid_battle_id="";Lobby.prototype.owner_nickname="";Lobby.prototype["private"]=false;Lobby.prototype.creation_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Lobby.prototype.battle_plfe_instance=0;Lobby.prototype.weather_condition=0;Lobby.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.lobby_id!=null&&m.lobby_id.length){w.uint32(10).fork();for(var i=0;i<m.lobby_id.length;++i)w.int32(m.lobby_id[i]);w.ldelim()}if(m.players!=null&&m.players.length){for(var i=0;i<m.players.length;++i)$root.POGOProtos.Data.Battle.BattleParticipant.encode(m.players[i],w.uint32(18).fork()).ldelim()}if(m.player_join_end_ms!=null&&m.hasOwnProperty("player_join_end_ms"))w.uint32(24).int64(m.player_join_end_ms);if(m.pokemon_selection_end_ms!=null&&m.hasOwnProperty("pokemon_selection_end_ms"))w.uint32(32).int64(m.pokemon_selection_end_ms);if(m.raid_battle_start_ms!=null&&m.hasOwnProperty("raid_battle_start_ms"))w.uint32(40).int64(m.raid_battle_start_ms);if(m.raid_battle_end_ms!=null&&m.hasOwnProperty("raid_battle_end_ms"))w.uint32(48).int64(m.raid_battle_end_ms);if(m.raid_battle_id!=null&&m.hasOwnProperty("raid_battle_id"))w.uint32(66).string(m.raid_battle_id);if(m.owner_nickname!=null&&m.hasOwnProperty("owner_nickname"))w.uint32(74).string(m.owner_nickname);if(m["private"]!=null&&m.hasOwnProperty("private"))w.uint32(80).bool(m["private"]);if(m.creation_ms!=null&&m.hasOwnProperty("creation_ms"))w.uint32(88).int64(m.creation_ms);if(m.battle_plfe_instance!=null&&m.hasOwnProperty("battle_plfe_instance"))w.uint32(96).int32(m.battle_plfe_instance);if(m.weather_condition!=null&&m.hasOwnProperty("weather_condition"))w.uint32(104).int32(m.weather_condition);return w};Lobby.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Raid.Lobby;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.lobby_id&&m.lobby_id.length))m.lobby_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.lobby_id.push(r.int32())}else m.lobby_id.push(r.int32());break;case 2:if(!(m.players&&m.players.length))m.players=[];m.players.push($root.POGOProtos.Data.Battle.BattleParticipant.decode(r,r.uint32()));break;case 3:m.player_join_end_ms=r.int64();break;case 4:m.pokemon_selection_end_ms=r.int64();break;case 5:m.raid_battle_start_ms=r.int64();break;case 6:m.raid_battle_end_ms=r.int64();break;case 8:m.raid_battle_id=r.string();break;case 9:m.owner_nickname=r.string();break;case 10:m["private"]=r.bool();break;case 11:m.creation_ms=r.int64();break;case 12:m.battle_plfe_instance=r.int32();break;case 13:m.weather_condition=r.int32();break;default:r.skipType(t&7);break}}return m};Lobby.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Raid.Lobby)return d;var m=new $root.POGOProtos.Data.Raid.Lobby;if(d.lobby_id){if(!Array.isArray(d.lobby_id))throw TypeError(".POGOProtos.Data.Raid.Lobby.lobby_id: array expected");m.lobby_id=[];for(var i=0;i<d.lobby_id.length;++i){m.lobby_id[i]=d.lobby_id[i]|0}}if(d.players){if(!Array.isArray(d.players))throw TypeError(".POGOProtos.Data.Raid.Lobby.players: array expected");m.players=[];for(var i=0;i<d.players.length;++i){if(typeof d.players[i]!=="object")throw TypeError(".POGOProtos.Data.Raid.Lobby.players: object expected");m.players[i]=$root.POGOProtos.Data.Battle.BattleParticipant.fromObject(d.players[i])}}if(d.player_join_end_ms!=null){if($util.Long)(m.player_join_end_ms=$util.Long.fromValue(d.player_join_end_ms)).unsigned=false;else if(typeof d.player_join_end_ms==="string")m.player_join_end_ms=parseInt(d.player_join_end_ms,10);else if(typeof d.player_join_end_ms==="number")m.player_join_end_ms=d.player_join_end_ms;else if(typeof d.player_join_end_ms==="object")m.player_join_end_ms=new $util.LongBits(d.player_join_end_ms.low>>>0,d.player_join_end_ms.high>>>0).toNumber()}if(d.pokemon_selection_end_ms!=null){if($util.Long)(m.pokemon_selection_end_ms=$util.Long.fromValue(d.pokemon_selection_end_ms)).unsigned=false;else if(typeof d.pokemon_selection_end_ms==="string")m.pokemon_selection_end_ms=parseInt(d.pokemon_selection_end_ms,10);else if(typeof d.pokemon_selection_end_ms==="number")m.pokemon_selection_end_ms=d.pokemon_selection_end_ms;else if(typeof d.pokemon_selection_end_ms==="object")m.pokemon_selection_end_ms=new $util.LongBits(d.pokemon_selection_end_ms.low>>>0,d.pokemon_selection_end_ms.high>>>0).toNumber()}if(d.raid_battle_start_ms!=null){if($util.Long)(m.raid_battle_start_ms=$util.Long.fromValue(d.raid_battle_start_ms)).unsigned=false;else if(typeof d.raid_battle_start_ms==="string")m.raid_battle_start_ms=parseInt(d.raid_battle_start_ms,10);else if(typeof d.raid_battle_start_ms==="number")m.raid_battle_start_ms=d.raid_battle_start_ms;else if(typeof d.raid_battle_start_ms==="object")m.raid_battle_start_ms=new $util.LongBits(d.raid_battle_start_ms.low>>>0,d.raid_battle_start_ms.high>>>0).toNumber()}if(d.raid_battle_end_ms!=null){if($util.Long)(m.raid_battle_end_ms=$util.Long.fromValue(d.raid_battle_end_ms)).unsigned=false;else if(typeof d.raid_battle_end_ms==="string")m.raid_battle_end_ms=parseInt(d.raid_battle_end_ms,10);else if(typeof d.raid_battle_end_ms==="number")m.raid_battle_end_ms=d.raid_battle_end_ms;else if(typeof d.raid_battle_end_ms==="object")m.raid_battle_end_ms=new $util.LongBits(d.raid_battle_end_ms.low>>>0,d.raid_battle_end_ms.high>>>0).toNumber()}if(d.raid_battle_id!=null){m.raid_battle_id=String(d.raid_battle_id)}if(d.owner_nickname!=null){m.owner_nickname=String(d.owner_nickname)}if(d["private"]!=null){m["private"]=Boolean(d["private"])}if(d.creation_ms!=null){if($util.Long)(m.creation_ms=$util.Long.fromValue(d.creation_ms)).unsigned=false;else if(typeof d.creation_ms==="string")m.creation_ms=parseInt(d.creation_ms,10);else if(typeof d.creation_ms==="number")m.creation_ms=d.creation_ms;else if(typeof d.creation_ms==="object")m.creation_ms=new $util.LongBits(d.creation_ms.low>>>0,d.creation_ms.high>>>0).toNumber()}if(d.battle_plfe_instance!=null){m.battle_plfe_instance=d.battle_plfe_instance|0}switch(d.weather_condition){case"NONE":case 0:m.weather_condition=0;break;case"CLEAR":case 1:m.weather_condition=1;break;case"RAINY":case 2:m.weather_condition=2;break;case"PARTLY_CLOUDY":case 3:m.weather_condition=3;break;case"OVERCAST":case 4:m.weather_condition=4;break;case"WINDY":case 5:m.weather_condition=5;break;case"SNOW":case 6:m.weather_condition=6;break;case"FOG":case 7:m.weather_condition=7;break}return m};Lobby.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.lobby_id=[];d.players=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.player_join_end_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.player_join_end_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_selection_end_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_selection_end_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.raid_battle_start_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_battle_start_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.raid_battle_end_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_battle_end_ms=o.longs===String?"0":0;d.raid_battle_id="";d.owner_nickname="";d["private"]=false;if($util.Long){var n=new $util.Long(0,0,false);d.creation_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.creation_ms=o.longs===String?"0":0;d.battle_plfe_instance=0;d.weather_condition=o.enums===String?"NONE":0}if(m.lobby_id&&m.lobby_id.length){d.lobby_id=[];for(var j=0;j<m.lobby_id.length;++j){d.lobby_id[j]=m.lobby_id[j]}}if(m.players&&m.players.length){d.players=[];for(var j=0;j<m.players.length;++j){d.players[j]=$root.POGOProtos.Data.Battle.BattleParticipant.toObject(m.players[j],o)}}if(m.player_join_end_ms!=null&&m.hasOwnProperty("player_join_end_ms")){if(typeof m.player_join_end_ms==="number")d.player_join_end_ms=o.longs===String?String(m.player_join_end_ms):m.player_join_end_ms;else d.player_join_end_ms=o.longs===String?$util.Long.prototype.toString.call(m.player_join_end_ms):o.longs===Number?new $util.LongBits(m.player_join_end_ms.low>>>0,m.player_join_end_ms.high>>>0).toNumber():m.player_join_end_ms}if(m.pokemon_selection_end_ms!=null&&m.hasOwnProperty("pokemon_selection_end_ms")){if(typeof m.pokemon_selection_end_ms==="number")d.pokemon_selection_end_ms=o.longs===String?String(m.pokemon_selection_end_ms):m.pokemon_selection_end_ms;else d.pokemon_selection_end_ms=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_selection_end_ms):o.longs===Number?new $util.LongBits(m.pokemon_selection_end_ms.low>>>0,m.pokemon_selection_end_ms.high>>>0).toNumber():m.pokemon_selection_end_ms}if(m.raid_battle_start_ms!=null&&m.hasOwnProperty("raid_battle_start_ms")){if(typeof m.raid_battle_start_ms==="number")d.raid_battle_start_ms=o.longs===String?String(m.raid_battle_start_ms):m.raid_battle_start_ms;else d.raid_battle_start_ms=o.longs===String?$util.Long.prototype.toString.call(m.raid_battle_start_ms):o.longs===Number?new $util.LongBits(m.raid_battle_start_ms.low>>>0,m.raid_battle_start_ms.high>>>0).toNumber():m.raid_battle_start_ms}if(m.raid_battle_end_ms!=null&&m.hasOwnProperty("raid_battle_end_ms")){if(typeof m.raid_battle_end_ms==="number")d.raid_battle_end_ms=o.longs===String?String(m.raid_battle_end_ms):m.raid_battle_end_ms;else d.raid_battle_end_ms=o.longs===String?$util.Long.prototype.toString.call(m.raid_battle_end_ms):o.longs===Number?new $util.LongBits(m.raid_battle_end_ms.low>>>0,m.raid_battle_end_ms.high>>>0).toNumber():m.raid_battle_end_ms}if(m.raid_battle_id!=null&&m.hasOwnProperty("raid_battle_id")){d.raid_battle_id=m.raid_battle_id}if(m.owner_nickname!=null&&m.hasOwnProperty("owner_nickname")){d.owner_nickname=m.owner_nickname}if(m["private"]!=null&&m.hasOwnProperty("private")){d["private"]=m["private"]}if(m.creation_ms!=null&&m.hasOwnProperty("creation_ms")){if(typeof m.creation_ms==="number")d.creation_ms=o.longs===String?String(m.creation_ms):m.creation_ms;else d.creation_ms=o.longs===String?$util.Long.prototype.toString.call(m.creation_ms):o.longs===Number?new $util.LongBits(m.creation_ms.low>>>0,m.creation_ms.high>>>0).toNumber():m.creation_ms}if(m.battle_plfe_instance!=null&&m.hasOwnProperty("battle_plfe_instance")){d.battle_plfe_instance=m.battle_plfe_instance}if(m.weather_condition!=null&&m.hasOwnProperty("weather_condition")){d.weather_condition=o.enums===String?$root.POGOProtos.Enums.WeatherCondition[m.weather_condition]:m.weather_condition}return d};Lobby.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Lobby}();Raid.Participation=function(){function Participation(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Participation.prototype.individual_damage_pokeballs=0;Participation.prototype.team_damage_pokeballs=0;Participation.prototype.gym_ownership_pokeballs=0;Participation.prototype.base_pokeballs=0;Participation.prototype.blue_percentage=0;Participation.prototype.red_percentage=0;Participation.prototype.yellow_percentage=0;Participation.prototype.bonus_item_multiplier=0;Participation.prototype.highest_friendship_milestone=0;Participation.prototype.highest_friendship_pokeballs=0;Participation.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.individual_damage_pokeballs!=null&&m.hasOwnProperty("individual_damage_pokeballs"))w.uint32(8).int32(m.individual_damage_pokeballs);if(m.team_damage_pokeballs!=null&&m.hasOwnProperty("team_damage_pokeballs"))w.uint32(16).int32(m.team_damage_pokeballs);if(m.gym_ownership_pokeballs!=null&&m.hasOwnProperty("gym_ownership_pokeballs"))w.uint32(24).int32(m.gym_ownership_pokeballs);if(m.base_pokeballs!=null&&m.hasOwnProperty("base_pokeballs"))w.uint32(32).int32(m.base_pokeballs);if(m.blue_percentage!=null&&m.hasOwnProperty("blue_percentage"))w.uint32(41).double(m.blue_percentage);if(m.red_percentage!=null&&m.hasOwnProperty("red_percentage"))w.uint32(49).double(m.red_percentage);if(m.yellow_percentage!=null&&m.hasOwnProperty("yellow_percentage"))w.uint32(57).double(m.yellow_percentage);if(m.bonus_item_multiplier!=null&&m.hasOwnProperty("bonus_item_multiplier"))w.uint32(69).float(m.bonus_item_multiplier);if(m.highest_friendship_milestone!=null&&m.hasOwnProperty("highest_friendship_milestone"))w.uint32(72).int32(m.highest_friendship_milestone);if(m.highest_friendship_pokeballs!=null&&m.hasOwnProperty("highest_friendship_pokeballs"))w.uint32(80).int32(m.highest_friendship_pokeballs);return w};Participation.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Raid.Participation;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.individual_damage_pokeballs=r.int32();break;case 2:m.team_damage_pokeballs=r.int32();break;case 3:m.gym_ownership_pokeballs=r.int32();break;case 4:m.base_pokeballs=r.int32();break;case 5:m.blue_percentage=r.double();break;case 6:m.red_percentage=r.double();break;case 7:m.yellow_percentage=r.double();break;case 8:m.bonus_item_multiplier=r.float();break;case 9:m.highest_friendship_milestone=r.int32();break;case 10:m.highest_friendship_pokeballs=r.int32();break;default:r.skipType(t&7);break}}return m};Participation.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Raid.Participation)return d;var m=new $root.POGOProtos.Data.Raid.Participation;if(d.individual_damage_pokeballs!=null){m.individual_damage_pokeballs=d.individual_damage_pokeballs|0}if(d.team_damage_pokeballs!=null){m.team_damage_pokeballs=d.team_damage_pokeballs|0}if(d.gym_ownership_pokeballs!=null){m.gym_ownership_pokeballs=d.gym_ownership_pokeballs|0}if(d.base_pokeballs!=null){m.base_pokeballs=d.base_pokeballs|0}if(d.blue_percentage!=null){m.blue_percentage=Number(d.blue_percentage)}if(d.red_percentage!=null){m.red_percentage=Number(d.red_percentage)}if(d.yellow_percentage!=null){m.yellow_percentage=Number(d.yellow_percentage)}if(d.bonus_item_multiplier!=null){m.bonus_item_multiplier=Number(d.bonus_item_multiplier)}switch(d.highest_friendship_milestone){case"FRIENDSHIP_LEVEL_UNSET":case 0:m.highest_friendship_milestone=0;break;case"FRIENDSHIP_LEVEL_0":case 1:m.highest_friendship_milestone=1;break;case"FRIENDSHIP_LEVEL_1":case 2:m.highest_friendship_milestone=2;break;case"FRIENDSHIP_LEVEL_2":case 3:m.highest_friendship_milestone=3;break;case"FRIENDSHIP_LEVEL_3":case 4:m.highest_friendship_milestone=4;break;case"FRIENDSHIP_LEVEL_4":case 5:m.highest_friendship_milestone=5;break}if(d.highest_friendship_pokeballs!=null){m.highest_friendship_pokeballs=d.highest_friendship_pokeballs|0}return m};Participation.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.individual_damage_pokeballs=0;d.team_damage_pokeballs=0;d.gym_ownership_pokeballs=0;d.base_pokeballs=0;d.blue_percentage=0;d.red_percentage=0;d.yellow_percentage=0;d.bonus_item_multiplier=0;d.highest_friendship_milestone=o.enums===String?"FRIENDSHIP_LEVEL_UNSET":0;d.highest_friendship_pokeballs=0}if(m.individual_damage_pokeballs!=null&&m.hasOwnProperty("individual_damage_pokeballs")){d.individual_damage_pokeballs=m.individual_damage_pokeballs}if(m.team_damage_pokeballs!=null&&m.hasOwnProperty("team_damage_pokeballs")){d.team_damage_pokeballs=m.team_damage_pokeballs}if(m.gym_ownership_pokeballs!=null&&m.hasOwnProperty("gym_ownership_pokeballs")){d.gym_ownership_pokeballs=m.gym_ownership_pokeballs}if(m.base_pokeballs!=null&&m.hasOwnProperty("base_pokeballs")){d.base_pokeballs=m.base_pokeballs}if(m.blue_percentage!=null&&m.hasOwnProperty("blue_percentage")){d.blue_percentage=o.json&&!isFinite(m.blue_percentage)?String(m.blue_percentage):m.blue_percentage}if(m.red_percentage!=null&&m.hasOwnProperty("red_percentage")){d.red_percentage=o.json&&!isFinite(m.red_percentage)?String(m.red_percentage):m.red_percentage}if(m.yellow_percentage!=null&&m.hasOwnProperty("yellow_percentage")){d.yellow_percentage=o.json&&!isFinite(m.yellow_percentage)?String(m.yellow_percentage):m.yellow_percentage}if(m.bonus_item_multiplier!=null&&m.hasOwnProperty("bonus_item_multiplier")){d.bonus_item_multiplier=o.json&&!isFinite(m.bonus_item_multiplier)?String(m.bonus_item_multiplier):m.bonus_item_multiplier}if(m.highest_friendship_milestone!=null&&m.hasOwnProperty("highest_friendship_milestone")){d.highest_friendship_milestone=o.enums===String?$root.POGOProtos.Enums.FriendshipLevelMilestone[m.highest_friendship_milestone]:m.highest_friendship_milestone}if(m.highest_friendship_pokeballs!=null&&m.hasOwnProperty("highest_friendship_pokeballs")){d.highest_friendship_pokeballs=m.highest_friendship_pokeballs}return d};Participation.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Participation}();Raid.PlayerRaidInfo=function(){function PlayerRaidInfo(p){this.raids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerRaidInfo.prototype.total_completed_raids=0;PlayerRaidInfo.prototype.total_completed_legendary_raids=0;PlayerRaidInfo.prototype.raids=$util.emptyArray;PlayerRaidInfo.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.total_completed_raids!=null&&m.hasOwnProperty("total_completed_raids"))w.uint32(24).int32(m.total_completed_raids);if(m.total_completed_legendary_raids!=null&&m.hasOwnProperty("total_completed_legendary_raids"))w.uint32(32).int32(m.total_completed_legendary_raids);if(m.raids!=null&&m.raids.length){for(var i=0;i<m.raids.length;++i)$root.POGOProtos.Data.Raid.Raid.encode(m.raids[i],w.uint32(42).fork()).ldelim()}return w};PlayerRaidInfo.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Raid.PlayerRaidInfo;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 3:m.total_completed_raids=r.int32();break;case 4:m.total_completed_legendary_raids=r.int32();break;case 5:if(!(m.raids&&m.raids.length))m.raids=[];m.raids.push($root.POGOProtos.Data.Raid.Raid.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};PlayerRaidInfo.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Raid.PlayerRaidInfo)return d;var m=new $root.POGOProtos.Data.Raid.PlayerRaidInfo;if(d.total_completed_raids!=null){m.total_completed_raids=d.total_completed_raids|0}if(d.total_completed_legendary_raids!=null){m.total_completed_legendary_raids=d.total_completed_legendary_raids|0}if(d.raids){if(!Array.isArray(d.raids))throw TypeError(".POGOProtos.Data.Raid.PlayerRaidInfo.raids: array expected");m.raids=[];for(var i=0;i<d.raids.length;++i){if(typeof d.raids[i]!=="object")throw TypeError(".POGOProtos.Data.Raid.PlayerRaidInfo.raids: object expected");m.raids[i]=$root.POGOProtos.Data.Raid.Raid.fromObject(d.raids[i])}}return m};PlayerRaidInfo.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.raids=[]}if(o.defaults){d.total_completed_raids=0;d.total_completed_legendary_raids=0}if(m.total_completed_raids!=null&&m.hasOwnProperty("total_completed_raids")){d.total_completed_raids=m.total_completed_raids}if(m.total_completed_legendary_raids!=null&&m.hasOwnProperty("total_completed_legendary_raids")){d.total_completed_legendary_raids=m.total_completed_legendary_raids}if(m.raids&&m.raids.length){d.raids=[];for(var j=0;j<m.raids.length;++j){d.raids[j]=$root.POGOProtos.Data.Raid.Raid.toObject(m.raids[j],o)}}return d};PlayerRaidInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlayerRaidInfo}();Raid.Raid=function(){function Raid(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Raid.prototype.raid_seed=$util.Long?$util.Long.fromBits(0,0,false):0;Raid.prototype.started_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Raid.prototype.completed_ms=$util.Long?$util.Long.fromBits(0,0,false):0;Raid.prototype.encounter_pokemon_id=0;Raid.prototype.completed_battle=false;Raid.prototype.received_rewards=false;Raid.prototype.finished_encounter=false;Raid.prototype.received_default_rewards=false;Raid.prototype.incremented_raid_friends=false;Raid.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed"))w.uint32(8).int64(m.raid_seed);if(m.started_ms!=null&&m.hasOwnProperty("started_ms"))w.uint32(16).int64(m.started_ms);if(m.completed_ms!=null&&m.hasOwnProperty("completed_ms"))w.uint32(24).int64(m.completed_ms);if(m.encounter_pokemon_id!=null&&m.hasOwnProperty("encounter_pokemon_id"))w.uint32(32).int32(m.encounter_pokemon_id);if(m.completed_battle!=null&&m.hasOwnProperty("completed_battle"))w.uint32(40).bool(m.completed_battle);if(m.received_rewards!=null&&m.hasOwnProperty("received_rewards"))w.uint32(48).bool(m.received_rewards);if(m.finished_encounter!=null&&m.hasOwnProperty("finished_encounter"))w.uint32(56).bool(m.finished_encounter);if(m.received_default_rewards!=null&&m.hasOwnProperty("received_default_rewards"))w.uint32(64).bool(m.received_default_rewards);if(m.incremented_raid_friends!=null&&m.hasOwnProperty("incremented_raid_friends"))w.uint32(72).bool(m.incremented_raid_friends);return w};Raid.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Raid.Raid;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.raid_seed=r.int64();break;case 2:m.started_ms=r.int64();break;case 3:m.completed_ms=r.int64();break;case 4:m.encounter_pokemon_id=r.int32();break;case 5:m.completed_battle=r.bool();break;case 6:m.received_rewards=r.bool();break;case 7:m.finished_encounter=r.bool();break;case 8:m.received_default_rewards=r.bool();break;case 9:m.incremented_raid_friends=r.bool();break;default:r.skipType(t&7);break}}return m};Raid.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Raid.Raid)return d;var m=new $root.POGOProtos.Data.Raid.Raid;if(d.raid_seed!=null){if($util.Long)(m.raid_seed=$util.Long.fromValue(d.raid_seed)).unsigned=false;else if(typeof d.raid_seed==="string")m.raid_seed=parseInt(d.raid_seed,10);else if(typeof d.raid_seed==="number")m.raid_seed=d.raid_seed;else if(typeof d.raid_seed==="object")m.raid_seed=new $util.LongBits(d.raid_seed.low>>>0,d.raid_seed.high>>>0).toNumber()}if(d.started_ms!=null){if($util.Long)(m.started_ms=$util.Long.fromValue(d.started_ms)).unsigned=false;else if(typeof d.started_ms==="string")m.started_ms=parseInt(d.started_ms,10);else if(typeof d.started_ms==="number")m.started_ms=d.started_ms;else if(typeof d.started_ms==="object")m.started_ms=new $util.LongBits(d.started_ms.low>>>0,d.started_ms.high>>>0).toNumber()}if(d.completed_ms!=null){if($util.Long)(m.completed_ms=$util.Long.fromValue(d.completed_ms)).unsigned=false;else if(typeof d.completed_ms==="string")m.completed_ms=parseInt(d.completed_ms,10);else if(typeof d.completed_ms==="number")m.completed_ms=d.completed_ms;else if(typeof d.completed_ms==="object")m.completed_ms=new $util.LongBits(d.completed_ms.low>>>0,d.completed_ms.high>>>0).toNumber()}switch(d.encounter_pokemon_id){case"MISSINGNO":case 0:m.encounter_pokemon_id=0;break;case"BULBASAUR":case 1:m.encounter_pokemon_id=1;break;case"IVYSAUR":case 2:m.encounter_pokemon_id=2;break;case"VENUSAUR":case 3:m.encounter_pokemon_id=3;break;case"CHARMANDER":case 4:m.encounter_pokemon_id=4;break;case"CHARMELEON":case 5:m.encounter_pokemon_id=5;break;case"CHARIZARD":case 6:m.encounter_pokemon_id=6;break;case"SQUIRTLE":case 7:m.encounter_pokemon_id=7;break;case"WARTORTLE":case 8:m.encounter_pokemon_id=8;break;case"BLASTOISE":case 9:m.encounter_pokemon_id=9;break;case"CATERPIE":case 10:m.encounter_pokemon_id=10;break;case"METAPOD":case 11:m.encounter_pokemon_id=11;break;case"BUTTERFREE":case 12:m.encounter_pokemon_id=12;break;case"WEEDLE":case 13:m.encounter_pokemon_id=13;break;case"KAKUNA":case 14:m.encounter_pokemon_id=14;break;case"BEEDRILL":case 15:m.encounter_pokemon_id=15;break;case"PIDGEY":case 16:m.encounter_pokemon_id=16;break;case"PIDGEOTTO":case 17:m.encounter_pokemon_id=17;break;case"PIDGEOT":case 18:m.encounter_pokemon_id=18;break;case"RATTATA":case 19:m.encounter_pokemon_id=19;break;case"RATICATE":case 20:m.encounter_pokemon_id=20;break;case"SPEAROW":case 21:m.encounter_pokemon_id=21;break;case"FEAROW":case 22:m.encounter_pokemon_id=22;break;case"EKANS":case 23:m.encounter_pokemon_id=23;break;case"ARBOK":case 24:m.encounter_pokemon_id=24;break;case"PIKACHU":case 25:m.encounter_pokemon_id=25;break;case"RAICHU":case 26:m.encounter_pokemon_id=26;break;case"SANDSHREW":case 27:m.encounter_pokemon_id=27;break;case"SANDSLASH":case 28:m.encounter_pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.encounter_pokemon_id=29;break;case"NIDORINA":case 30:m.encounter_pokemon_id=30;break;case"NIDOQUEEN":case 31:m.encounter_pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.encounter_pokemon_id=32;break;case"NIDORINO":case 33:m.encounter_pokemon_id=33;break;case"NIDOKING":case 34:m.encounter_pokemon_id=34;break;case"CLEFAIRY":case 35:m.encounter_pokemon_id=35;break;case"CLEFABLE":case 36:m.encounter_pokemon_id=36;break;case"VULPIX":case 37:m.encounter_pokemon_id=37;break;case"NINETALES":case 38:m.encounter_pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.encounter_pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.encounter_pokemon_id=40;break;case"ZUBAT":case 41:m.encounter_pokemon_id=41;break;case"GOLBAT":case 42:m.encounter_pokemon_id=42;break;case"ODDISH":case 43:m.encounter_pokemon_id=43;break;case"GLOOM":case 44:m.encounter_pokemon_id=44;break;case"VILEPLUME":case 45:m.encounter_pokemon_id=45;break;case"PARAS":case 46:m.encounter_pokemon_id=46;break;case"PARASECT":case 47:m.encounter_pokemon_id=47;break;case"VENONAT":case 48:m.encounter_pokemon_id=48;break;case"VENOMOTH":case 49:m.encounter_pokemon_id=49;break;case"DIGLETT":case 50:m.encounter_pokemon_id=50;break;case"DUGTRIO":case 51:m.encounter_pokemon_id=51;break;case"MEOWTH":case 52:m.encounter_pokemon_id=52;break;case"PERSIAN":case 53:m.encounter_pokemon_id=53;break;case"PSYDUCK":case 54:m.encounter_pokemon_id=54;break;case"GOLDUCK":case 55:m.encounter_pokemon_id=55;break;case"MANKEY":case 56:m.encounter_pokemon_id=56;break;case"PRIMEAPE":case 57:m.encounter_pokemon_id=57;break;case"GROWLITHE":case 58:m.encounter_pokemon_id=58;break;case"ARCANINE":case 59:m.encounter_pokemon_id=59;break;case"POLIWAG":case 60:m.encounter_pokemon_id=60;break;case"POLIWHIRL":case 61:m.encounter_pokemon_id=61;break;case"POLIWRATH":case 62:m.encounter_pokemon_id=62;break;case"ABRA":case 63:m.encounter_pokemon_id=63;break;case"KADABRA":case 64:m.encounter_pokemon_id=64;break;case"ALAKAZAM":case 65:m.encounter_pokemon_id=65;break;case"MACHOP":case 66:m.encounter_pokemon_id=66;break;case"MACHOKE":case 67:m.encounter_pokemon_id=67;break;case"MACHAMP":case 68:m.encounter_pokemon_id=68;break;case"BELLSPROUT":case 69:m.encounter_pokemon_id=69;break;case"WEEPINBELL":case 70:m.encounter_pokemon_id=70;break;case"VICTREEBEL":case 71:m.encounter_pokemon_id=71;break;case"TENTACOOL":case 72:m.encounter_pokemon_id=72;break;case"TENTACRUEL":case 73:m.encounter_pokemon_id=73;break;case"GEODUDE":case 74:m.encounter_pokemon_id=74;break;case"GRAVELER":case 75:m.encounter_pokemon_id=75;break;case"GOLEM":case 76:m.encounter_pokemon_id=76;break;case"PONYTA":case 77:m.encounter_pokemon_id=77;break;case"RAPIDASH":case 78:m.encounter_pokemon_id=78;break;case"SLOWPOKE":case 79:m.encounter_pokemon_id=79;break;case"SLOWBRO":case 80:m.encounter_pokemon_id=80;break;case"MAGNEMITE":case 81:m.encounter_pokemon_id=81;break;case"MAGNETON":case 82:m.encounter_pokemon_id=82;break;case"FARFETCHD":case 83:m.encounter_pokemon_id=83;break;case"DODUO":case 84:m.encounter_pokemon_id=84;break;case"DODRIO":case 85:m.encounter_pokemon_id=85;break;case"SEEL":case 86:m.encounter_pokemon_id=86;break;case"DEWGONG":case 87:m.encounter_pokemon_id=87;break;case"GRIMER":case 88:m.encounter_pokemon_id=88;break;case"MUK":case 89:m.encounter_pokemon_id=89;break;case"SHELLDER":case 90:m.encounter_pokemon_id=90;break;case"CLOYSTER":case 91:m.encounter_pokemon_id=91;break;case"GASTLY":case 92:m.encounter_pokemon_id=92;break;case"HAUNTER":case 93:m.encounter_pokemon_id=93;break;case"GENGAR":case 94:m.encounter_pokemon_id=94;break;case"ONIX":case 95:m.encounter_pokemon_id=95;break;case"DROWZEE":case 96:m.encounter_pokemon_id=96;break;case"HYPNO":case 97:m.encounter_pokemon_id=97;break;case"KRABBY":case 98:m.encounter_pokemon_id=98;break;case"KINGLER":case 99:m.encounter_pokemon_id=99;break;case"VOLTORB":case 100:m.encounter_pokemon_id=100;break;case"ELECTRODE":case 101:m.encounter_pokemon_id=101;break;case"EXEGGCUTE":case 102:m.encounter_pokemon_id=102;break;case"EXEGGUTOR":case 103:m.encounter_pokemon_id=103;break;case"CUBONE":case 104:m.encounter_pokemon_id=104;break;case"MAROWAK":case 105:m.encounter_pokemon_id=105;break;case"HITMONLEE":case 106:m.encounter_pokemon_id=106;break;case"HITMONCHAN":case 107:m.encounter_pokemon_id=107;break;case"LICKITUNG":case 108:m.encounter_pokemon_id=108;break;case"KOFFING":case 109:m.encounter_pokemon_id=109;break;case"WEEZING":case 110:m.encounter_pokemon_id=110;break;case"RHYHORN":case 111:m.encounter_pokemon_id=111;break;case"RHYDON":case 112:m.encounter_pokemon_id=112;break;case"CHANSEY":case 113:m.encounter_pokemon_id=113;break;case"TANGELA":case 114:m.encounter_pokemon_id=114;break;case"KANGASKHAN":case 115:m.encounter_pokemon_id=115;break;case"HORSEA":case 116:m.encounter_pokemon_id=116;break;case"SEADRA":case 117:m.encounter_pokemon_id=117;break;case"GOLDEEN":case 118:m.encounter_pokemon_id=118;break;case"SEAKING":case 119:m.encounter_pokemon_id=119;break;case"STARYU":case 120:m.encounter_pokemon_id=120;break;case"STARMIE":case 121:m.encounter_pokemon_id=121;break;case"MR_MIME":case 122:m.encounter_pokemon_id=122;break;case"SCYTHER":case 123:m.encounter_pokemon_id=123;break;case"JYNX":case 124:m.encounter_pokemon_id=124;break;case"ELECTABUZZ":case 125:m.encounter_pokemon_id=125;break;case"MAGMAR":case 126:m.encounter_pokemon_id=126;break;case"PINSIR":case 127:m.encounter_pokemon_id=127;break;case"TAUROS":case 128:m.encounter_pokemon_id=128;break;case"MAGIKARP":case 129:m.encounter_pokemon_id=129;break;case"GYARADOS":case 130:m.encounter_pokemon_id=130;break;case"LAPRAS":case 131:m.encounter_pokemon_id=131;break;case"DITTO":case 132:m.encounter_pokemon_id=132;break;case"EEVEE":case 133:m.encounter_pokemon_id=133;break;case"VAPOREON":case 134:m.encounter_pokemon_id=134;break;case"JOLTEON":case 135:m.encounter_pokemon_id=135;break;case"FLAREON":case 136:m.encounter_pokemon_id=136;break;case"PORYGON":case 137:m.encounter_pokemon_id=137;break;case"OMANYTE":case 138:m.encounter_pokemon_id=138;break;case"OMASTAR":case 139:m.encounter_pokemon_id=139;break;case"KABUTO":case 140:m.encounter_pokemon_id=140;break;case"KABUTOPS":case 141:m.encounter_pokemon_id=141;break;case"AERODACTYL":case 142:m.encounter_pokemon_id=142;break;case"SNORLAX":case 143:m.encounter_pokemon_id=143;break;case"ARTICUNO":case 144:m.encounter_pokemon_id=144;break;case"ZAPDOS":case 145:m.encounter_pokemon_id=145;break;case"MOLTRES":case 146:m.encounter_pokemon_id=146;break;case"DRATINI":case 147:m.encounter_pokemon_id=147;break;case"DRAGONAIR":case 148:m.encounter_pokemon_id=148;break;case"DRAGONITE":case 149:m.encounter_pokemon_id=149;break;case"MEWTWO":case 150:m.encounter_pokemon_id=150;break;case"MEW":case 151:m.encounter_pokemon_id=151;break;case"CHIKORITA":case 152:m.encounter_pokemon_id=152;break;case"BAYLEEF":case 153:m.encounter_pokemon_id=153;break;case"MEGANIUM":case 154:m.encounter_pokemon_id=154;break;case"CYNDAQUIL":case 155:m.encounter_pokemon_id=155;break;case"QUILAVA":case 156:m.encounter_pokemon_id=156;break;case"TYPHLOSION":case 157:m.encounter_pokemon_id=157;break;case"TOTODILE":case 158:m.encounter_pokemon_id=158;break;case"CROCONAW":case 159:m.encounter_pokemon_id=159;break;case"FERALIGATR":case 160:m.encounter_pokemon_id=160;break;case"SENTRET":case 161:m.encounter_pokemon_id=161;break;case"FURRET":case 162:m.encounter_pokemon_id=162;break;case"HOOTHOOT":case 163:m.encounter_pokemon_id=163;break;case"NOCTOWL":case 164:m.encounter_pokemon_id=164;break;case"LEDYBA":case 165:m.encounter_pokemon_id=165;break;case"LEDIAN":case 166:m.encounter_pokemon_id=166;break;case"SPINARAK":case 167:m.encounter_pokemon_id=167;break;case"ARIADOS":case 168:m.encounter_pokemon_id=168;break;case"CROBAT":case 169:m.encounter_pokemon_id=169;break;case"CHINCHOU":case 170:m.encounter_pokemon_id=170;break;case"LANTURN":case 171:m.encounter_pokemon_id=171;break;case"PICHU":case 172:m.encounter_pokemon_id=172;break;case"CLEFFA":case 173:m.encounter_pokemon_id=173;break;case"IGGLYBUFF":case 174:m.encounter_pokemon_id=174;break;case"TOGEPI":case 175:m.encounter_pokemon_id=175;break;case"TOGETIC":case 176:m.encounter_pokemon_id=176;break;case"NATU":case 177:m.encounter_pokemon_id=177;break;case"XATU":case 178:m.encounter_pokemon_id=178;break;case"MAREEP":case 179:m.encounter_pokemon_id=179;break;case"FLAAFFY":case 180:m.encounter_pokemon_id=180;break;case"AMPHAROS":case 181:m.encounter_pokemon_id=181;break;case"BELLOSSOM":case 182:m.encounter_pokemon_id=182;break;case"MARILL":case 183:m.encounter_pokemon_id=183;break;case"AZUMARILL":case 184:m.encounter_pokemon_id=184;break;case"SUDOWOODO":case 185:m.encounter_pokemon_id=185;break;case"POLITOED":case 186:m.encounter_pokemon_id=186;break;case"HOPPIP":case 187:m.encounter_pokemon_id=187;break;case"SKIPLOOM":case 188:m.encounter_pokemon_id=188;break;case"JUMPLUFF":case 189:m.encounter_pokemon_id=189;break;case"AIPOM":case 190:m.encounter_pokemon_id=190;break;case"SUNKERN":case 191:m.encounter_pokemon_id=191;break;case"SUNFLORA":case 192:m.encounter_pokemon_id=192;break;case"YANMA":case 193:m.encounter_pokemon_id=193;break;case"WOOPER":case 194:m.encounter_pokemon_id=194;break;case"QUAGSIRE":case 195:m.encounter_pokemon_id=195;break;case"ESPEON":case 196:m.encounter_pokemon_id=196;break;case"UMBREON":case 197:m.encounter_pokemon_id=197;break;case"MURKROW":case 198:m.encounter_pokemon_id=198;break;case"SLOWKING":case 199:m.encounter_pokemon_id=199;break;case"MISDREAVUS":case 200:m.encounter_pokemon_id=200;break;case"UNOWN":case 201:m.encounter_pokemon_id=201;break;case"WOBBUFFET":case 202:m.encounter_pokemon_id=202;break;case"GIRAFARIG":case 203:m.encounter_pokemon_id=203;break;case"PINECO":case 204:m.encounter_pokemon_id=204;break;case"FORRETRESS":case 205:m.encounter_pokemon_id=205;break;case"DUNSPARCE":case 206:m.encounter_pokemon_id=206;break;case"GLIGAR":case 207:m.encounter_pokemon_id=207;break;case"STEELIX":case 208:m.encounter_pokemon_id=208;break;case"SNUBBULL":case 209:m.encounter_pokemon_id=209;break;case"GRANBULL":case 210:m.encounter_pokemon_id=210;break;case"QWILFISH":case 211:m.encounter_pokemon_id=211;break;case"SCIZOR":case 212:m.encounter_pokemon_id=212;break;case"SHUCKLE":case 213:m.encounter_pokemon_id=213;break;case"HERACROSS":case 214:m.encounter_pokemon_id=214;break;case"SNEASEL":case 215:m.encounter_pokemon_id=215;break;case"TEDDIURSA":case 216:m.encounter_pokemon_id=216;break;case"URSARING":case 217:m.encounter_pokemon_id=217;break;case"SLUGMA":case 218:m.encounter_pokemon_id=218;break;case"MAGCARGO":case 219:m.encounter_pokemon_id=219;break;case"SWINUB":case 220:m.encounter_pokemon_id=220;break;case"PILOSWINE":case 221:m.encounter_pokemon_id=221;break;case"CORSOLA":case 222:m.encounter_pokemon_id=222;break;case"REMORAID":case 223:m.encounter_pokemon_id=223;break;case"OCTILLERY":case 224:m.encounter_pokemon_id=224;break;case"DELIBIRD":case 225:m.encounter_pokemon_id=225;break;case"MANTINE":case 226:m.encounter_pokemon_id=226;break;case"SKARMORY":case 227:m.encounter_pokemon_id=227;break;case"HOUNDOUR":case 228:m.encounter_pokemon_id=228;break;case"HOUNDOOM":case 229:m.encounter_pokemon_id=229;break;case"KINGDRA":case 230:m.encounter_pokemon_id=230;break;case"PHANPY":case 231:m.encounter_pokemon_id=231;break;case"DONPHAN":case 232:m.encounter_pokemon_id=232;break;case"PORYGON2":case 233:m.encounter_pokemon_id=233;break;case"STANTLER":case 234:m.encounter_pokemon_id=234;break;case"SMEARGLE":case 235:m.encounter_pokemon_id=235;break;case"TYROGUE":case 236:m.encounter_pokemon_id=236;break;case"HITMONTOP":case 237:m.encounter_pokemon_id=237;break;case"SMOOCHUM":case 238:m.encounter_pokemon_id=238;break;case"ELEKID":case 239:m.encounter_pokemon_id=239;break;case"MAGBY":case 240:m.encounter_pokemon_id=240;break;case"MILTANK":case 241:m.encounter_pokemon_id=241;break;case"BLISSEY":case 242:m.encounter_pokemon_id=242;break;case"RAIKOU":case 243:m.encounter_pokemon_id=243;break;case"ENTEI":case 244:m.encounter_pokemon_id=244;break;case"SUICUNE":case 245:m.encounter_pokemon_id=245;break;case"LARVITAR":case 246:m.encounter_pokemon_id=246;break;case"PUPITAR":case 247:m.encounter_pokemon_id=247;break;case"TYRANITAR":case 248:m.encounter_pokemon_id=248;break;case"LUGIA":case 249:m.encounter_pokemon_id=249;break;case"HO_OH":case 250:m.encounter_pokemon_id=250;break;case"CELEBI":case 251:m.encounter_pokemon_id=251;break;case"TREECKO":case 252:m.encounter_pokemon_id=252;break;case"GROVYLE":case 253:m.encounter_pokemon_id=253;break;case"SCEPTILE":case 254:m.encounter_pokemon_id=254;break;case"TORCHIC":case 255:m.encounter_pokemon_id=255;break;case"COMBUSKEN":case 256:m.encounter_pokemon_id=256;break;case"BLAZIKEN":case 257:m.encounter_pokemon_id=257;break;case"MUDKIP":case 258:m.encounter_pokemon_id=258;break;case"MARSHTOMP":case 259:m.encounter_pokemon_id=259;break;case"SWAMPERT":case 260:m.encounter_pokemon_id=260;break;case"POOCHYENA":case 261:m.encounter_pokemon_id=261;break;case"MIGHTYENA":case 262:m.encounter_pokemon_id=262;break;case"ZIGZAGOON":case 263:m.encounter_pokemon_id=263;break;case"LINOONE":case 264:m.encounter_pokemon_id=264;break;case"WURMPLE":case 265:m.encounter_pokemon_id=265;break;case"SILCOON":case 266:m.encounter_pokemon_id=266;break;case"BEAUTIFLY":case 267:m.encounter_pokemon_id=267;break;case"CASCOON":case 268:m.encounter_pokemon_id=268;break;case"DUSTOX":case 269:m.encounter_pokemon_id=269;break;case"LOTAD":case 270:m.encounter_pokemon_id=270;break;case"LOMBRE":case 271:m.encounter_pokemon_id=271;break;case"LUDICOLO":case 272:m.encounter_pokemon_id=272;break;case"SEEDOT":case 273:m.encounter_pokemon_id=273;break;case"NUZLEAF":case 274:m.encounter_pokemon_id=274;break;case"SHIFTRY":case 275:m.encounter_pokemon_id=275;break;case"TAILLOW":case 276:m.encounter_pokemon_id=276;break;case"SWELLOW":case 277:m.encounter_pokemon_id=277;break;case"WINGULL":case 278:m.encounter_pokemon_id=278;break;case"PELIPPER":case 279:m.encounter_pokemon_id=279;break;case"RALTS":case 280:m.encounter_pokemon_id=280;break;case"KIRLIA":case 281:m.encounter_pokemon_id=281;break;case"GARDEVOIR":case 282:m.encounter_pokemon_id=282;break;case"SURSKIT":case 283:m.encounter_pokemon_id=283;break;case"MASQUERAIN":case 284:m.encounter_pokemon_id=284;break;case"SHROOMISH":case 285:m.encounter_pokemon_id=285;break;case"BRELOOM":case 286:m.encounter_pokemon_id=286;break;case"SLAKOTH":case 287:m.encounter_pokemon_id=287;break;case"VIGOROTH":case 288:m.encounter_pokemon_id=288;break;case"SLAKING":case 289:m.encounter_pokemon_id=289;break;case"NINCADA":case 290:m.encounter_pokemon_id=290;break;case"NINJASK":case 291:m.encounter_pokemon_id=291;break;case"SHEDINJA":case 292:m.encounter_pokemon_id=292;break;case"WHISMUR":case 293:m.encounter_pokemon_id=293;break;case"LOUDRED":case 294:m.encounter_pokemon_id=294;break;case"EXPLOUD":case 295:m.encounter_pokemon_id=295;break;case"MAKUHITA":case 296:m.encounter_pokemon_id=296;break;case"HARIYAMA":case 297:m.encounter_pokemon_id=297;break;case"AZURILL":case 298:m.encounter_pokemon_id=298;break;case"NOSEPASS":case 299:m.encounter_pokemon_id=299;break;case"SKITTY":case 300:m.encounter_pokemon_id=300;break;case"DELCATTY":case 301:m.encounter_pokemon_id=301;break;case"SABLEYE":case 302:m.encounter_pokemon_id=302;break;case"MAWILE":case 303:m.encounter_pokemon_id=303;break;case"ARON":case 304:m.encounter_pokemon_id=304;break;case"LAIRON":case 305:m.encounter_pokemon_id=305;break;case"AGGRON":case 306:m.encounter_pokemon_id=306;break;case"MEDITITE":case 307:m.encounter_pokemon_id=307;break;case"MEDICHAM":case 308:m.encounter_pokemon_id=308;break;case"ELECTRIKE":case 309:m.encounter_pokemon_id=309;break;case"MANECTRIC":case 310:m.encounter_pokemon_id=310;break;case"PLUSLE":case 311:m.encounter_pokemon_id=311;break;case"MINUN":case 312:m.encounter_pokemon_id=312;break;case"VOLBEAT":case 313:m.encounter_pokemon_id=313;break;case"ILLUMISE":case 314:m.encounter_pokemon_id=314;break;case"ROSELIA":case 315:m.encounter_pokemon_id=315;break;case"GULPIN":case 316:m.encounter_pokemon_id=316;break;case"SWALOT":case 317:m.encounter_pokemon_id=317;break;case"CARVANHA":case 318:m.encounter_pokemon_id=318;break;case"SHARPEDO":case 319:m.encounter_pokemon_id=319;break;case"WAILMER":case 320:m.encounter_pokemon_id=320;break;case"WAILORD":case 321:m.encounter_pokemon_id=321;break;case"NUMEL":case 322:m.encounter_pokemon_id=322;break;case"CAMERUPT":case 323:m.encounter_pokemon_id=323;break;case"TORKOAL":case 324:m.encounter_pokemon_id=324;break;case"SPOINK":case 325:m.encounter_pokemon_id=325;break;case"GRUMPIG":case 326:m.encounter_pokemon_id=326;break;case"SPINDA":case 327:m.encounter_pokemon_id=327;break;case"TRAPINCH":case 328:m.encounter_pokemon_id=328;break;case"VIBRAVA":case 329:m.encounter_pokemon_id=329;break;case"FLYGON":case 330:m.encounter_pokemon_id=330;break;case"CACNEA":case 331:m.encounter_pokemon_id=331;break;case"CACTURNE":case 332:m.encounter_pokemon_id=332;break;case"SWABLU":case 333:m.encounter_pokemon_id=333;break;case"ALTARIA":case 334:m.encounter_pokemon_id=334;break;case"ZANGOOSE":case 335:m.encounter_pokemon_id=335;break;case"SEVIPER":case 336:m.encounter_pokemon_id=336;break;case"LUNATONE":case 337:m.encounter_pokemon_id=337;break;case"SOLROCK":case 338:m.encounter_pokemon_id=338;break;case"BARBOACH":case 339:m.encounter_pokemon_id=339;break;case"WHISCASH":case 340:m.encounter_pokemon_id=340;break;case"CORPHISH":case 341:m.encounter_pokemon_id=341;break;case"CRAWDAUNT":case 342:m.encounter_pokemon_id=342;break;case"BALTOY":case 343:m.encounter_pokemon_id=343;break;case"CLAYDOL":case 344:m.encounter_pokemon_id=344;break;case"LILEEP":case 345:m.encounter_pokemon_id=345;break;case"CRADILY":case 346:m.encounter_pokemon_id=346;break;case"ANORITH":case 347:m.encounter_pokemon_id=347;break;case"ARMALDO":case 348:m.encounter_pokemon_id=348;break;case"FEEBAS":case 349:m.encounter_pokemon_id=349;break;case"MILOTIC":case 350:m.encounter_pokemon_id=350;break;case"CASTFORM":case 351:m.encounter_pokemon_id=351;break;case"KECLEON":case 352:m.encounter_pokemon_id=352;break;case"SHUPPET":case 353:m.encounter_pokemon_id=353;break;case"BANETTE":case 354:m.encounter_pokemon_id=354;break;case"DUSKULL":case 355:m.encounter_pokemon_id=355;break;case"DUSCLOPS":case 356:m.encounter_pokemon_id=356;break;case"TROPIUS":case 357:m.encounter_pokemon_id=357;break;case"CHIMECHO":case 358:m.encounter_pokemon_id=358;break;case"ABSOL":case 359:m.encounter_pokemon_id=359;break;case"WYNAUT":case 360:m.encounter_pokemon_id=360;break;case"SNORUNT":case 361:m.encounter_pokemon_id=361;break;case"GLALIE":case 362:m.encounter_pokemon_id=362;break;case"SPHEAL":case 363:m.encounter_pokemon_id=363;break;case"SEALEO":case 364:m.encounter_pokemon_id=364;break;case"WALREIN":case 365:m.encounter_pokemon_id=365;break;case"CLAMPERL":case 366:m.encounter_pokemon_id=366;break;case"HUNTAIL":case 367:m.encounter_pokemon_id=367;break;case"GOREBYSS":case 368:m.encounter_pokemon_id=368;break;case"RELICANTH":case 369:m.encounter_pokemon_id=369;break;case"LUVDISC":case 370:m.encounter_pokemon_id=370;break;case"BAGON":case 371:m.encounter_pokemon_id=371;break;case"SHELGON":case 372:m.encounter_pokemon_id=372;break;case"SALAMENCE":case 373:m.encounter_pokemon_id=373;break;case"BELDUM":case 374:m.encounter_pokemon_id=374;break;case"METANG":case 375:m.encounter_pokemon_id=375;break;case"METAGROSS":case 376:m.encounter_pokemon_id=376;break;case"REGIROCK":case 377:m.encounter_pokemon_id=377;break;case"REGICE":case 378:m.encounter_pokemon_id=378;break;case"REGISTEEL":case 379:m.encounter_pokemon_id=379;break;case"LATIAS":case 380:m.encounter_pokemon_id=380;break;case"LATIOS":case 381:m.encounter_pokemon_id=381;break;case"KYOGRE":case 382:m.encounter_pokemon_id=382;break;case"GROUDON":case 383:m.encounter_pokemon_id=383;break;case"RAYQUAZA":case 384:m.encounter_pokemon_id=384;break;case"JIRACHI":case 385:m.encounter_pokemon_id=385;break;case"DEOXYS":case 386:m.encounter_pokemon_id=386;break;case"TURTWIG":case 387:m.encounter_pokemon_id=387;break;case"GROTLE":case 388:m.encounter_pokemon_id=388;break;case"TORTERRA":case 389:m.encounter_pokemon_id=389;break;case"CHIMCHAR":case 390:m.encounter_pokemon_id=390;break;case"MONFERNO":case 391:m.encounter_pokemon_id=391;break;case"INFERNAPE":case 392:m.encounter_pokemon_id=392;break;case"PIPLUP":case 393:m.encounter_pokemon_id=393;break;case"PRINPLUP":case 394:m.encounter_pokemon_id=394;break;case"EMPOLEON":case 395:m.encounter_pokemon_id=395;break;case"STARLY":case 396:m.encounter_pokemon_id=396;break;case"STARAVIA":case 397:m.encounter_pokemon_id=397;break;case"STARAPTOR":case 398:m.encounter_pokemon_id=398;break;case"BIDOOF":case 399:m.encounter_pokemon_id=399;break;case"BIBAREL":case 400:m.encounter_pokemon_id=400;break;case"KRICKETOT":case 401:m.encounter_pokemon_id=401;break;case"KRICKETUNE":case 402:m.encounter_pokemon_id=402;break;case"SHINX":case 403:m.encounter_pokemon_id=403;break;case"LUXIO":case 404:m.encounter_pokemon_id=404;break;case"LUXRAY":case 405:m.encounter_pokemon_id=405;break;case"BUDEW":case 406:m.encounter_pokemon_id=406;break;case"ROSERADE":case 407:m.encounter_pokemon_id=407;break;case"CRANIDOS":case 408:m.encounter_pokemon_id=408;break;case"RAMPARDOS":case 409:m.encounter_pokemon_id=409;break;case"SHIELDON":case 410:m.encounter_pokemon_id=410;break;case"BASTIODON":case 411:m.encounter_pokemon_id=411;break;case"BURMY":case 412:m.encounter_pokemon_id=412;break;case"WORMADAM":case 413:m.encounter_pokemon_id=413;break;case"MOTHIM":case 414:m.encounter_pokemon_id=414;break;case"COMBEE":case 415:m.encounter_pokemon_id=415;break;case"VESPIQUEN":case 416:m.encounter_pokemon_id=416;break;case"PACHIRISU":case 417:m.encounter_pokemon_id=417;break;case"BUIZEL":case 418:m.encounter_pokemon_id=418;break;case"FLOATZEL":case 419:m.encounter_pokemon_id=419;break;case"CHERUBI":case 420:m.encounter_pokemon_id=420;break;case"CHERRIM":case 421:m.encounter_pokemon_id=421;break;case"SHELLOS":case 422:m.encounter_pokemon_id=422;break;case"GASTRODON":case 423:m.encounter_pokemon_id=423;break;case"AMBIPOM":case 424:m.encounter_pokemon_id=424;break;case"DRIFLOON":case 425:m.encounter_pokemon_id=425;break;case"DRIFBLIM":case 426:m.encounter_pokemon_id=426;break;case"BUNEARY":case 427:m.encounter_pokemon_id=427;break;case"LOPUNNY":case 428:m.encounter_pokemon_id=428;break;case"MISMAGIUS":case 429:m.encounter_pokemon_id=429;break;case"HONCHKROW":case 430:m.encounter_pokemon_id=430;break;case"GLAMEOW":case 431:m.encounter_pokemon_id=431;break;case"PURUGLY":case 432:m.encounter_pokemon_id=432;break;case"CHINGLING":case 433:m.encounter_pokemon_id=433;break;case"STUNKY":case 434:m.encounter_pokemon_id=434;break;case"SKUNTANK":case 435:m.encounter_pokemon_id=435;break;case"BRONZOR":case 436:m.encounter_pokemon_id=436;break;case"BRONZONG":case 437:m.encounter_pokemon_id=437;break;case"BONSLY":case 438:m.encounter_pokemon_id=438;break;case"MIME_JR":case 439:m.encounter_pokemon_id=439;break;case"HAPPINY":case 440:m.encounter_pokemon_id=440;break;case"CHATOT":case 441:m.encounter_pokemon_id=441;break;case"SPIRITOMB":case 442:m.encounter_pokemon_id=442;break;case"GIBLE":case 443:m.encounter_pokemon_id=443;break;case"GABITE":case 444:m.encounter_pokemon_id=444;break;case"GARCHOMP":case 445:m.encounter_pokemon_id=445;break;case"MUNCHLAX":case 446:m.encounter_pokemon_id=446;break;case"RIOLU":case 447:m.encounter_pokemon_id=447;break;case"LUCARIO":case 448:m.encounter_pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.encounter_pokemon_id=449;break;case"HIPPOWDON":case 450:m.encounter_pokemon_id=450;break;case"SKORUPI":case 451:m.encounter_pokemon_id=451;break;case"DRAPION":case 452:m.encounter_pokemon_id=452;break;case"CROAGUNK":case 453:m.encounter_pokemon_id=453;break;case"TOXICROAK":case 454:m.encounter_pokemon_id=454;break;case"CARNIVINE":case 455:m.encounter_pokemon_id=455;break;case"FINNEON":case 456:m.encounter_pokemon_id=456;break;case"LUMINEON":case 457:m.encounter_pokemon_id=457;break;case"MANTYKE":case 458:m.encounter_pokemon_id=458;break;case"SNOVER":case 459:m.encounter_pokemon_id=459;break;case"ABOMASNOW":case 460:m.encounter_pokemon_id=460;break;case"WEAVILE":case 461:m.encounter_pokemon_id=461;break;case"MAGNEZONE":case 462:m.encounter_pokemon_id=462;break;case"LICKILICKY":case 463:m.encounter_pokemon_id=463;break;case"RHYPERIOR":case 464:m.encounter_pokemon_id=464;break;case"TANGROWTH":case 465:m.encounter_pokemon_id=465;break;case"ELECTIVIRE":case 466:m.encounter_pokemon_id=466;break;case"MAGMORTAR":case 467:m.encounter_pokemon_id=467;break;case"TOGEKISS":case 468:m.encounter_pokemon_id=468;break;case"YANMEGA":case 469:m.encounter_pokemon_id=469;break;case"LEAFEON":case 470:m.encounter_pokemon_id=470;break;case"GLACEON":case 471:m.encounter_pokemon_id=471;break;case"GLISCOR":case 472:m.encounter_pokemon_id=472;break;case"MAMOSWINE":case 473:m.encounter_pokemon_id=473;break;case"PORYGON_Z":case 474:m.encounter_pokemon_id=474;break;case"GALLADE":case 475:m.encounter_pokemon_id=475;break;case"PROBOPASS":case 476:m.encounter_pokemon_id=476;break;case"DUSKNOIR":case 477:m.encounter_pokemon_id=477;break;case"FROSLASS":case 478:m.encounter_pokemon_id=478;break;case"ROTOM":case 479:m.encounter_pokemon_id=479;break;case"UXIE":case 480:m.encounter_pokemon_id=480;break;case"MESPRIT":case 481:m.encounter_pokemon_id=481;break;case"AZELF":case 482:m.encounter_pokemon_id=482;break;case"DIALGA":case 483:m.encounter_pokemon_id=483;break;case"PALKIA":case 484:m.encounter_pokemon_id=484;break;case"HEATRAN":case 485:m.encounter_pokemon_id=485;break;case"REGIGIGAS":case 486:m.encounter_pokemon_id=486;break;case"GIRATINA":case 487:m.encounter_pokemon_id=487;break;case"CRESSELIA":case 488:m.encounter_pokemon_id=488;break;case"PHIONE":case 489:m.encounter_pokemon_id=489;break;case"MANAPHY":case 490:m.encounter_pokemon_id=490;break;case"DARKRAI":case 491:m.encounter_pokemon_id=491;break;case"SHAYMIN":case 492:m.encounter_pokemon_id=492;break;case"ARCEUS":case 493:m.encounter_pokemon_id=493;break;case"MELTAN":case 808:m.encounter_pokemon_id=808;break;case"MELMETAL":case 809:m.encounter_pokemon_id=809;break}if(d.completed_battle!=null){m.completed_battle=Boolean(d.completed_battle)}if(d.received_rewards!=null){m.received_rewards=Boolean(d.received_rewards)}if(d.finished_encounter!=null){m.finished_encounter=Boolean(d.finished_encounter)}if(d.received_default_rewards!=null){m.received_default_rewards=Boolean(d.received_default_rewards)}if(d.incremented_raid_friends!=null){m.incremented_raid_friends=Boolean(d.incremented_raid_friends)}return m};Raid.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.raid_seed=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_seed=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.started_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.started_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.completed_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.completed_ms=o.longs===String?"0":0;d.encounter_pokemon_id=o.enums===String?"MISSINGNO":0;d.completed_battle=false;d.received_rewards=false;d.finished_encounter=false;d.received_default_rewards=false;d.incremented_raid_friends=false}if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed")){if(typeof m.raid_seed==="number")d.raid_seed=o.longs===String?String(m.raid_seed):m.raid_seed;else d.raid_seed=o.longs===String?$util.Long.prototype.toString.call(m.raid_seed):o.longs===Number?new $util.LongBits(m.raid_seed.low>>>0,m.raid_seed.high>>>0).toNumber():m.raid_seed}if(m.started_ms!=null&&m.hasOwnProperty("started_ms")){if(typeof m.started_ms==="number")d.started_ms=o.longs===String?String(m.started_ms):m.started_ms;else d.started_ms=o.longs===String?$util.Long.prototype.toString.call(m.started_ms):o.longs===Number?new $util.LongBits(m.started_ms.low>>>0,m.started_ms.high>>>0).toNumber():m.started_ms}if(m.completed_ms!=null&&m.hasOwnProperty("completed_ms")){if(typeof m.completed_ms==="number")d.completed_ms=o.longs===String?String(m.completed_ms):m.completed_ms;else d.completed_ms=o.longs===String?$util.Long.prototype.toString.call(m.completed_ms):o.longs===Number?new $util.LongBits(m.completed_ms.low>>>0,m.completed_ms.high>>>0).toNumber():m.completed_ms}if(m.encounter_pokemon_id!=null&&m.hasOwnProperty("encounter_pokemon_id")){d.encounter_pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.encounter_pokemon_id]:m.encounter_pokemon_id}if(m.completed_battle!=null&&m.hasOwnProperty("completed_battle")){d.completed_battle=m.completed_battle}if(m.received_rewards!=null&&m.hasOwnProperty("received_rewards")){d.received_rewards=m.received_rewards}if(m.finished_encounter!=null&&m.hasOwnProperty("finished_encounter")){d.finished_encounter=m.finished_encounter}if(m.received_default_rewards!=null&&m.hasOwnProperty("received_default_rewards")){d.received_default_rewards=m.received_default_rewards}if(m.incremented_raid_friends!=null&&m.hasOwnProperty("incremented_raid_friends")){d.incremented_raid_friends=m.incremented_raid_friends}return d};Raid.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Raid}();Raid.RaidEncounter=function(){function RaidEncounter(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RaidEncounter.prototype.pokemon=null;RaidEncounter.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,false):0;RaidEncounter.prototype.spawnpoint_id="";RaidEncounter.prototype.capture_probabilities=null;RaidEncounter.prototype.throws_remaining=0;RaidEncounter.prototype.raid_level=0;RaidEncounter.prototype.fort_id="";RaidEncounter.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon!=null&&m.hasOwnProperty("pokemon"))$root.POGOProtos.Data.PokemonData.encode(m.pokemon,w.uint32(10).fork()).ldelim();if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(16).int64(m.encounter_id);if(m.spawnpoint_id!=null&&m.hasOwnProperty("spawnpoint_id"))w.uint32(26).string(m.spawnpoint_id);if(m.capture_probabilities!=null&&m.hasOwnProperty("capture_probabilities"))$root.POGOProtos.Data.Capture.CaptureProbability.encode(m.capture_probabilities,w.uint32(34).fork()).ldelim();if(m.throws_remaining!=null&&m.hasOwnProperty("throws_remaining"))w.uint32(40).int32(m.throws_remaining);if(m.raid_level!=null&&m.hasOwnProperty("raid_level"))w.uint32(48).int32(m.raid_level);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(58).string(m.fort_id);return w};RaidEncounter.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Raid.RaidEncounter;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 2:m.encounter_id=r.int64();break;case 3:m.spawnpoint_id=r.string();break;case 4:m.capture_probabilities=$root.POGOProtos.Data.Capture.CaptureProbability.decode(r,r.uint32());break;case 5:m.throws_remaining=r.int32();break;case 6:m.raid_level=r.int32();break;case 7:m.fort_id=r.string();break;default:r.skipType(t&7);break}}return m};RaidEncounter.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Raid.RaidEncounter)return d;var m=new $root.POGOProtos.Data.Raid.RaidEncounter;if(d.pokemon!=null){if(typeof d.pokemon!=="object")throw TypeError(".POGOProtos.Data.Raid.RaidEncounter.pokemon: object expected");m.pokemon=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon)}if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=false;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber()}if(d.spawnpoint_id!=null){m.spawnpoint_id=String(d.spawnpoint_id)}if(d.capture_probabilities!=null){if(typeof d.capture_probabilities!=="object")throw TypeError(".POGOProtos.Data.Raid.RaidEncounter.capture_probabilities: object expected");m.capture_probabilities=$root.POGOProtos.Data.Capture.CaptureProbability.fromObject(d.capture_probabilities)}if(d.throws_remaining!=null){m.throws_remaining=d.throws_remaining|0}switch(d.raid_level){case"RAID_LEVEL_UNSET":case 0:m.raid_level=0;break;case"RAID_LEVEL_1":case 1:m.raid_level=1;break;case"RAID_LEVEL_2":case 2:m.raid_level=2;break;case"RAID_LEVEL_3":case 3:m.raid_level=3;break;case"RAID_LEVEL_4":case 4:m.raid_level=4;break;case"RAID_LEVEL_5":case 5:m.raid_level=5;break}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}return m};RaidEncounter.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon=null;if($util.Long){var n=new $util.Long(0,0,false);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0;d.spawnpoint_id="";d.capture_probabilities=null;d.throws_remaining=0;d.raid_level=o.enums===String?"RAID_LEVEL_UNSET":0;d.fort_id=""}if(m.pokemon!=null&&m.hasOwnProperty("pokemon")){d.pokemon=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon,o)}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber():m.encounter_id}if(m.spawnpoint_id!=null&&m.hasOwnProperty("spawnpoint_id")){d.spawnpoint_id=m.spawnpoint_id}if(m.capture_probabilities!=null&&m.hasOwnProperty("capture_probabilities")){d.capture_probabilities=$root.POGOProtos.Data.Capture.CaptureProbability.toObject(m.capture_probabilities,o)}if(m.throws_remaining!=null&&m.hasOwnProperty("throws_remaining")){d.throws_remaining=m.throws_remaining}if(m.raid_level!=null&&m.hasOwnProperty("raid_level")){d.raid_level=o.enums===String?$root.POGOProtos.Enums.RaidLevel[m.raid_level]:m.raid_level}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}return d};RaidEncounter.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RaidEncounter}();Raid.RaidInfo=function(){function RaidInfo(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RaidInfo.prototype.raid_seed=$util.Long?$util.Long.fromBits(0,0,false):0;RaidInfo.prototype.raid_spawn_ms=$util.Long?$util.Long.fromBits(0,0,false):0;RaidInfo.prototype.raid_battle_ms=$util.Long?$util.Long.fromBits(0,0,false):0;RaidInfo.prototype.raid_end_ms=$util.Long?$util.Long.fromBits(0,0,false):0;RaidInfo.prototype.raid_pokemon=null;RaidInfo.prototype.raid_level=0;RaidInfo.prototype.complete=false;RaidInfo.prototype.is_exclusive=false;RaidInfo.prototype.is_raid_hidden=false;RaidInfo.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed"))w.uint32(8).int64(m.raid_seed);if(m.raid_spawn_ms!=null&&m.hasOwnProperty("raid_spawn_ms"))w.uint32(16).int64(m.raid_spawn_ms);if(m.raid_battle_ms!=null&&m.hasOwnProperty("raid_battle_ms"))w.uint32(24).int64(m.raid_battle_ms);if(m.raid_end_ms!=null&&m.hasOwnProperty("raid_end_ms"))w.uint32(32).int64(m.raid_end_ms);if(m.raid_pokemon!=null&&m.hasOwnProperty("raid_pokemon"))$root.POGOProtos.Data.PokemonData.encode(m.raid_pokemon,w.uint32(42).fork()).ldelim();if(m.raid_level!=null&&m.hasOwnProperty("raid_level"))w.uint32(48).int32(m.raid_level);if(m.complete!=null&&m.hasOwnProperty("complete"))w.uint32(56).bool(m.complete);if(m.is_exclusive!=null&&m.hasOwnProperty("is_exclusive"))w.uint32(64).bool(m.is_exclusive);if(m.is_raid_hidden!=null&&m.hasOwnProperty("is_raid_hidden"))w.uint32(72).bool(m.is_raid_hidden);return w};RaidInfo.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Raid.RaidInfo;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.raid_seed=r.int64();break;case 2:m.raid_spawn_ms=r.int64();break;case 3:m.raid_battle_ms=r.int64();break;case 4:m.raid_end_ms=r.int64();break;case 5:m.raid_pokemon=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 6:m.raid_level=r.int32();break;case 7:m.complete=r.bool();break;case 8:m.is_exclusive=r.bool();break;case 9:m.is_raid_hidden=r.bool();break;default:r.skipType(t&7);break}}return m};RaidInfo.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Raid.RaidInfo)return d;var m=new $root.POGOProtos.Data.Raid.RaidInfo;if(d.raid_seed!=null){if($util.Long)(m.raid_seed=$util.Long.fromValue(d.raid_seed)).unsigned=false;else if(typeof d.raid_seed==="string")m.raid_seed=parseInt(d.raid_seed,10);else if(typeof d.raid_seed==="number")m.raid_seed=d.raid_seed;else if(typeof d.raid_seed==="object")m.raid_seed=new $util.LongBits(d.raid_seed.low>>>0,d.raid_seed.high>>>0).toNumber()}if(d.raid_spawn_ms!=null){if($util.Long)(m.raid_spawn_ms=$util.Long.fromValue(d.raid_spawn_ms)).unsigned=false;else if(typeof d.raid_spawn_ms==="string")m.raid_spawn_ms=parseInt(d.raid_spawn_ms,10);else if(typeof d.raid_spawn_ms==="number")m.raid_spawn_ms=d.raid_spawn_ms;else if(typeof d.raid_spawn_ms==="object")m.raid_spawn_ms=new $util.LongBits(d.raid_spawn_ms.low>>>0,d.raid_spawn_ms.high>>>0).toNumber()}if(d.raid_battle_ms!=null){if($util.Long)(m.raid_battle_ms=$util.Long.fromValue(d.raid_battle_ms)).unsigned=false;else if(typeof d.raid_battle_ms==="string")m.raid_battle_ms=parseInt(d.raid_battle_ms,10);else if(typeof d.raid_battle_ms==="number")m.raid_battle_ms=d.raid_battle_ms;else if(typeof d.raid_battle_ms==="object")m.raid_battle_ms=new $util.LongBits(d.raid_battle_ms.low>>>0,d.raid_battle_ms.high>>>0).toNumber()}if(d.raid_end_ms!=null){if($util.Long)(m.raid_end_ms=$util.Long.fromValue(d.raid_end_ms)).unsigned=false;else if(typeof d.raid_end_ms==="string")m.raid_end_ms=parseInt(d.raid_end_ms,10);else if(typeof d.raid_end_ms==="number")m.raid_end_ms=d.raid_end_ms;else if(typeof d.raid_end_ms==="object")m.raid_end_ms=new $util.LongBits(d.raid_end_ms.low>>>0,d.raid_end_ms.high>>>0).toNumber()}if(d.raid_pokemon!=null){if(typeof d.raid_pokemon!=="object")throw TypeError(".POGOProtos.Data.Raid.RaidInfo.raid_pokemon: object expected");m.raid_pokemon=$root.POGOProtos.Data.PokemonData.fromObject(d.raid_pokemon)}switch(d.raid_level){case"RAID_LEVEL_UNSET":case 0:m.raid_level=0;break;case"RAID_LEVEL_1":case 1:m.raid_level=1;break;case"RAID_LEVEL_2":case 2:m.raid_level=2;break;case"RAID_LEVEL_3":case 3:m.raid_level=3;break;case"RAID_LEVEL_4":case 4:m.raid_level=4;break;case"RAID_LEVEL_5":case 5:m.raid_level=5;break}if(d.complete!=null){m.complete=Boolean(d.complete)}if(d.is_exclusive!=null){m.is_exclusive=Boolean(d.is_exclusive)}if(d.is_raid_hidden!=null){m.is_raid_hidden=Boolean(d.is_raid_hidden)}return m};RaidInfo.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.raid_seed=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_seed=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.raid_spawn_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_spawn_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.raid_battle_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_battle_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.raid_end_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_end_ms=o.longs===String?"0":0;d.raid_pokemon=null;d.raid_level=o.enums===String?"RAID_LEVEL_UNSET":0;d.complete=false;d.is_exclusive=false;d.is_raid_hidden=false}if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed")){if(typeof m.raid_seed==="number")d.raid_seed=o.longs===String?String(m.raid_seed):m.raid_seed;else d.raid_seed=o.longs===String?$util.Long.prototype.toString.call(m.raid_seed):o.longs===Number?new $util.LongBits(m.raid_seed.low>>>0,m.raid_seed.high>>>0).toNumber():m.raid_seed}if(m.raid_spawn_ms!=null&&m.hasOwnProperty("raid_spawn_ms")){if(typeof m.raid_spawn_ms==="number")d.raid_spawn_ms=o.longs===String?String(m.raid_spawn_ms):m.raid_spawn_ms;else d.raid_spawn_ms=o.longs===String?$util.Long.prototype.toString.call(m.raid_spawn_ms):o.longs===Number?new $util.LongBits(m.raid_spawn_ms.low>>>0,m.raid_spawn_ms.high>>>0).toNumber():m.raid_spawn_ms}if(m.raid_battle_ms!=null&&m.hasOwnProperty("raid_battle_ms")){if(typeof m.raid_battle_ms==="number")d.raid_battle_ms=o.longs===String?String(m.raid_battle_ms):m.raid_battle_ms;else d.raid_battle_ms=o.longs===String?$util.Long.prototype.toString.call(m.raid_battle_ms):o.longs===Number?new $util.LongBits(m.raid_battle_ms.low>>>0,m.raid_battle_ms.high>>>0).toNumber():m.raid_battle_ms}if(m.raid_end_ms!=null&&m.hasOwnProperty("raid_end_ms")){if(typeof m.raid_end_ms==="number")d.raid_end_ms=o.longs===String?String(m.raid_end_ms):m.raid_end_ms;else d.raid_end_ms=o.longs===String?$util.Long.prototype.toString.call(m.raid_end_ms):o.longs===Number?new $util.LongBits(m.raid_end_ms.low>>>0,m.raid_end_ms.high>>>0).toNumber():m.raid_end_ms}if(m.raid_pokemon!=null&&m.hasOwnProperty("raid_pokemon")){d.raid_pokemon=$root.POGOProtos.Data.PokemonData.toObject(m.raid_pokemon,o)}if(m.raid_level!=null&&m.hasOwnProperty("raid_level")){d.raid_level=o.enums===String?$root.POGOProtos.Enums.RaidLevel[m.raid_level]:m.raid_level}if(m.complete!=null&&m.hasOwnProperty("complete")){d.complete=m.complete}if(m.is_exclusive!=null&&m.hasOwnProperty("is_exclusive")){d.is_exclusive=m.is_exclusive}if(m.is_raid_hidden!=null&&m.hasOwnProperty("is_raid_hidden")){d.is_raid_hidden=m.is_raid_hidden}return d};RaidInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RaidInfo}();Raid.SharedExclusiveTicketTrainerInfo=function(){function SharedExclusiveTicketTrainerInfo(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SharedExclusiveTicketTrainerInfo.prototype.codename="";SharedExclusiveTicketTrainerInfo.prototype.player_id="";SharedExclusiveTicketTrainerInfo.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.codename!=null&&m.hasOwnProperty("codename"))w.uint32(10).string(m.codename);if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(18).string(m.player_id);return w};SharedExclusiveTicketTrainerInfo.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.codename=r.string();break;case 2:m.player_id=r.string();break;default:r.skipType(t&7);break}}return m};SharedExclusiveTicketTrainerInfo.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo)return d;var m=new $root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo;if(d.codename!=null){m.codename=String(d.codename)}if(d.player_id!=null){m.player_id=String(d.player_id)}return m};SharedExclusiveTicketTrainerInfo.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.codename="";d.player_id=""}if(m.codename!=null&&m.hasOwnProperty("codename")){d.codename=m.codename}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}return d};SharedExclusiveTicketTrainerInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SharedExclusiveTicketTrainerInfo}();return Raid}();Data.Redeem=function(){var Redeem={};Redeem.PokeCandy=function(){function PokeCandy(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokeCandy.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;PokeCandy.prototype.candy_count=0;PokeCandy.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(9).fixed64(m.pokemon_id);if(m.candy_count!=null&&m.hasOwnProperty("candy_count"))w.uint32(16).int32(m.candy_count);return w};PokeCandy.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Redeem.PokeCandy;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.fixed64();break;case 2:m.candy_count=r.int32();break;default:r.skipType(t&7);break}}return m};PokeCandy.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Redeem.PokeCandy)return d;var m=new $root.POGOProtos.Data.Redeem.PokeCandy;if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}if(d.candy_count!=null){m.candy_count=d.candy_count|0}return m};PokeCandy.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0;d.candy_count=0}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}if(m.candy_count!=null&&m.hasOwnProperty("candy_count")){d.candy_count=m.candy_count}return d};PokeCandy.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokeCandy}();Redeem.RedeemedAvatarItem=function(){function RedeemedAvatarItem(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RedeemedAvatarItem.prototype.avatar_template_id="";RedeemedAvatarItem.prototype.item_count=0;RedeemedAvatarItem.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.avatar_template_id!=null&&m.hasOwnProperty("avatar_template_id"))w.uint32(10).string(m.avatar_template_id);if(m.item_count!=null&&m.hasOwnProperty("item_count"))w.uint32(16).int32(m.item_count);return w};RedeemedAvatarItem.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Redeem.RedeemedAvatarItem;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.avatar_template_id=r.string();break;case 2:m.item_count=r.int32();break;default:r.skipType(t&7);break}}return m};RedeemedAvatarItem.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Redeem.RedeemedAvatarItem)return d;var m=new $root.POGOProtos.Data.Redeem.RedeemedAvatarItem;if(d.avatar_template_id!=null){m.avatar_template_id=String(d.avatar_template_id)}if(d.item_count!=null){m.item_count=d.item_count|0}return m};RedeemedAvatarItem.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.avatar_template_id="";d.item_count=0}if(m.avatar_template_id!=null&&m.hasOwnProperty("avatar_template_id")){d.avatar_template_id=m.avatar_template_id}if(m.item_count!=null&&m.hasOwnProperty("item_count")){d.item_count=m.item_count}return d};RedeemedAvatarItem.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RedeemedAvatarItem}();Redeem.RedeemedItem=function(){function RedeemedItem(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RedeemedItem.prototype.item=0;RedeemedItem.prototype.item_count=0;RedeemedItem.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item!=null&&m.hasOwnProperty("item"))w.uint32(8).int32(m.item);if(m.item_count!=null&&m.hasOwnProperty("item_count"))w.uint32(16).int32(m.item_count);return w};RedeemedItem.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Redeem.RedeemedItem;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item=r.int32();break;case 2:m.item_count=r.int32();break;default:r.skipType(t&7);break}}return m};RedeemedItem.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Redeem.RedeemedItem)return d;var m=new $root.POGOProtos.Data.Redeem.RedeemedItem;switch(d.item){case"ITEM_UNKNOWN":case 0:m.item=0;break;case"ITEM_POKE_BALL":case 1:m.item=1;break;case"ITEM_GREAT_BALL":case 2:m.item=2;break;case"ITEM_ULTRA_BALL":case 3:m.item=3;break;case"ITEM_MASTER_BALL":case 4:m.item=4;break;case"ITEM_PREMIER_BALL":case 5:m.item=5;break;case"ITEM_POTION":case 101:m.item=101;break;case"ITEM_SUPER_POTION":case 102:m.item=102;break;case"ITEM_HYPER_POTION":case 103:m.item=103;break;case"ITEM_MAX_POTION":case 104:m.item=104;break;case"ITEM_REVIVE":case 201:m.item=201;break;case"ITEM_MAX_REVIVE":case 202:m.item=202;break;case"ITEM_LUCKY_EGG":case 301:m.item=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item=402;break;case"ITEM_INCENSE_COOL":case 403:m.item=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item=405;break;case"ITEM_TROY_DISK":case 501:m.item=501;break;case"ITEM_X_ATTACK":case 602:m.item=602;break;case"ITEM_X_DEFENSE":case 603:m.item=603;break;case"ITEM_X_MIRACLE":case 604:m.item=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item=701;break;case"ITEM_BLUK_BERRY":case 702:m.item=702;break;case"ITEM_NANAB_BERRY":case 703:m.item=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item=704;break;case"ITEM_PINAP_BERRY":case 705:m.item=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item=1002;break;case"ITEM_SUN_STONE":case 1101:m.item=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item=1102;break;case"ITEM_METAL_COAT":case 1103:m.item=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item=1104;break;case"ITEM_UP_GRADE":case 1105:m.item=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item=1405;break}if(d.item_count!=null){m.item_count=d.item_count|0}return m};RedeemedItem.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item=o.enums===String?"ITEM_UNKNOWN":0;d.item_count=0}if(m.item!=null&&m.hasOwnProperty("item")){d.item=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item]:m.item}if(m.item_count!=null&&m.hasOwnProperty("item_count")){d.item_count=m.item_count}return d};RedeemedItem.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RedeemedItem}();Redeem.RedeemPasscodeReward=function(){function RedeemPasscodeReward(p){this.items=[];this.avatar_items=[];this.egg_pokemon=[];this.pokemon=[];this.poke_candy=[];this.badges=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RedeemPasscodeReward.prototype.items=$util.emptyArray;RedeemPasscodeReward.prototype.avatar_items=$util.emptyArray;RedeemPasscodeReward.prototype.egg_pokemon=$util.emptyArray;RedeemPasscodeReward.prototype.pokemon=$util.emptyArray;RedeemPasscodeReward.prototype.poke_candy=$util.emptyArray;RedeemPasscodeReward.prototype.stardust=0;RedeemPasscodeReward.prototype.pokecoins=0;RedeemPasscodeReward.prototype.badges=$util.emptyArray;RedeemPasscodeReward.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.items!=null&&m.items.length){for(var i=0;i<m.items.length;++i)$root.POGOProtos.Data.Redeem.RedeemedItem.encode(m.items[i],w.uint32(10).fork()).ldelim()}if(m.avatar_items!=null&&m.avatar_items.length){for(var i=0;i<m.avatar_items.length;++i)$root.POGOProtos.Data.Redeem.RedeemedAvatarItem.encode(m.avatar_items[i],w.uint32(18).fork()).ldelim()}if(m.egg_pokemon!=null&&m.egg_pokemon.length){for(var i=0;i<m.egg_pokemon.length;++i)$root.POGOProtos.Data.PokemonData.encode(m.egg_pokemon[i],w.uint32(26).fork()).ldelim()}if(m.pokemon!=null&&m.pokemon.length){for(var i=0;i<m.pokemon.length;++i)$root.POGOProtos.Data.PokemonData.encode(m.pokemon[i],w.uint32(34).fork()).ldelim()}if(m.poke_candy!=null&&m.poke_candy.length){for(var i=0;i<m.poke_candy.length;++i)$root.POGOProtos.Data.Redeem.PokeCandy.encode(m.poke_candy[i],w.uint32(42).fork()).ldelim()}if(m.stardust!=null&&m.hasOwnProperty("stardust"))w.uint32(48).int32(m.stardust);if(m.pokecoins!=null&&m.hasOwnProperty("pokecoins"))w.uint32(56).int32(m.pokecoins);if(m.badges!=null&&m.badges.length){w.uint32(66).fork();for(var i=0;i<m.badges.length;++i)w.int32(m.badges[i]);w.ldelim()}return w};RedeemPasscodeReward.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Redeem.RedeemPasscodeReward;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.items&&m.items.length))m.items=[];m.items.push($root.POGOProtos.Data.Redeem.RedeemedItem.decode(r,r.uint32()));break;case 2:if(!(m.avatar_items&&m.avatar_items.length))m.avatar_items=[];m.avatar_items.push($root.POGOProtos.Data.Redeem.RedeemedAvatarItem.decode(r,r.uint32()));break;case 3:if(!(m.egg_pokemon&&m.egg_pokemon.length))m.egg_pokemon=[];m.egg_pokemon.push($root.POGOProtos.Data.PokemonData.decode(r,r.uint32()));break;case 4:if(!(m.pokemon&&m.pokemon.length))m.pokemon=[];m.pokemon.push($root.POGOProtos.Data.PokemonData.decode(r,r.uint32()));break;case 5:if(!(m.poke_candy&&m.poke_candy.length))m.poke_candy=[];m.poke_candy.push($root.POGOProtos.Data.Redeem.PokeCandy.decode(r,r.uint32()));break;case 6:m.stardust=r.int32();break;case 7:m.pokecoins=r.int32();break;case 8:if(!(m.badges&&m.badges.length))m.badges=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.badges.push(r.int32())}else m.badges.push(r.int32());break;default:r.skipType(t&7);break}}return m};RedeemPasscodeReward.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Redeem.RedeemPasscodeReward)return d;var m=new $root.POGOProtos.Data.Redeem.RedeemPasscodeReward;if(d.items){if(!Array.isArray(d.items))throw TypeError(".POGOProtos.Data.Redeem.RedeemPasscodeReward.items: array expected");m.items=[];for(var i=0;i<d.items.length;++i){if(typeof d.items[i]!=="object")throw TypeError(".POGOProtos.Data.Redeem.RedeemPasscodeReward.items: object expected");m.items[i]=$root.POGOProtos.Data.Redeem.RedeemedItem.fromObject(d.items[i])}}if(d.avatar_items){if(!Array.isArray(d.avatar_items))throw TypeError(".POGOProtos.Data.Redeem.RedeemPasscodeReward.avatar_items: array expected");m.avatar_items=[];for(var i=0;i<d.avatar_items.length;++i){if(typeof d.avatar_items[i]!=="object")throw TypeError(".POGOProtos.Data.Redeem.RedeemPasscodeReward.avatar_items: object expected");m.avatar_items[i]=$root.POGOProtos.Data.Redeem.RedeemedAvatarItem.fromObject(d.avatar_items[i])}}if(d.egg_pokemon){if(!Array.isArray(d.egg_pokemon))throw TypeError(".POGOProtos.Data.Redeem.RedeemPasscodeReward.egg_pokemon: array expected");m.egg_pokemon=[];for(var i=0;i<d.egg_pokemon.length;++i){if(typeof d.egg_pokemon[i]!=="object")throw TypeError(".POGOProtos.Data.Redeem.RedeemPasscodeReward.egg_pokemon: object expected");m.egg_pokemon[i]=$root.POGOProtos.Data.PokemonData.fromObject(d.egg_pokemon[i])}}if(d.pokemon){if(!Array.isArray(d.pokemon))throw TypeError(".POGOProtos.Data.Redeem.RedeemPasscodeReward.pokemon: array expected");m.pokemon=[];for(var i=0;i<d.pokemon.length;++i){if(typeof d.pokemon[i]!=="object")throw TypeError(".POGOProtos.Data.Redeem.RedeemPasscodeReward.pokemon: object expected");m.pokemon[i]=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon[i])}}if(d.poke_candy){if(!Array.isArray(d.poke_candy))throw TypeError(".POGOProtos.Data.Redeem.RedeemPasscodeReward.poke_candy: array expected");m.poke_candy=[];for(var i=0;i<d.poke_candy.length;++i){if(typeof d.poke_candy[i]!=="object")throw TypeError(".POGOProtos.Data.Redeem.RedeemPasscodeReward.poke_candy: object expected");m.poke_candy[i]=$root.POGOProtos.Data.Redeem.PokeCandy.fromObject(d.poke_candy[i])}}if(d.stardust!=null){m.stardust=d.stardust|0}if(d.pokecoins!=null){m.pokecoins=d.pokecoins|0}if(d.badges){if(!Array.isArray(d.badges))throw TypeError(".POGOProtos.Data.Redeem.RedeemPasscodeReward.badges: array expected");m.badges=[];for(var i=0;i<d.badges.length;++i){switch(d.badges[i]){default:case"BADGE_UNSET":case 0:m.badges[i]=0;break;case"BADGE_TRAVEL_KM":case 1:m.badges[i]=1;break;case"BADGE_POKEDEX_ENTRIES":case 2:m.badges[i]=2;break;case"BADGE_CAPTURE_TOTAL":case 3:m.badges[i]=3;break;case"BADGE_DEFEATED_FORT":case 4:m.badges[i]=4;break;case"BADGE_EVOLVED_TOTAL":case 5:m.badges[i]=5;break;case"BADGE_HATCHED_TOTAL":case 6:m.badges[i]=6;break;case"BADGE_ENCOUNTERED_TOTAL":case 7:m.badges[i]=7;break;case"BADGE_POKESTOPS_VISITED":case 8:m.badges[i]=8;break;case"BADGE_UNIQUE_POKESTOPS":case 9:m.badges[i]=9;break;case"BADGE_POKEBALL_THROWN":case 10:m.badges[i]=10;break;case"BADGE_BIG_MAGIKARP":case 11:m.badges[i]=11;break;case"BADGE_DEPLOYED_TOTAL":case 12:m.badges[i]=12;break;case"BADGE_BATTLE_ATTACK_WON":case 13:m.badges[i]=13;break;case"BADGE_BATTLE_TRAINING_WON":case 14:m.badges[i]=14;break;case"BADGE_BATTLE_DEFEND_WON":case 15:m.badges[i]=15;break;case"BADGE_PRESTIGE_RAISED":case 16:m.badges[i]=16;break;case"BADGE_PRESTIGE_DROPPED":case 17:m.badges[i]=17;break;case"BADGE_TYPE_NORMAL":case 18:m.badges[i]=18;break;case"BADGE_TYPE_FIGHTING":case 19:m.badges[i]=19;break;case"BADGE_TYPE_FLYING":case 20:m.badges[i]=20;break;case"BADGE_TYPE_POISON":case 21:m.badges[i]=21;break;case"BADGE_TYPE_GROUND":case 22:m.badges[i]=22;break;case"BADGE_TYPE_ROCK":case 23:m.badges[i]=23;break;case"BADGE_TYPE_BUG":case 24:m.badges[i]=24;break;case"BADGE_TYPE_GHOST":case 25:m.badges[i]=25;break;case"BADGE_TYPE_STEEL":case 26:m.badges[i]=26;break;case"BADGE_TYPE_FIRE":case 27:m.badges[i]=27;break;case"BADGE_TYPE_WATER":case 28:m.badges[i]=28;break;case"BADGE_TYPE_GRASS":case 29:m.badges[i]=29;break;case"BADGE_TYPE_ELECTRIC":case 30:m.badges[i]=30;break;case"BADGE_TYPE_PSYCHIC":case 31:m.badges[i]=31;break;case"BADGE_TYPE_ICE":case 32:m.badges[i]=32;break;case"BADGE_TYPE_DRAGON":case 33:m.badges[i]=33;break;case"BADGE_TYPE_DARK":case 34:m.badges[i]=34;break;case"BADGE_TYPE_FAIRY":case 35:m.badges[i]=35;break;case"BADGE_SMALL_RATTATA":case 36:m.badges[i]=36;break;case"BADGE_PIKACHU":case 37:m.badges[i]=37;break;case"BADGE_UNOWN":case 38:m.badges[i]=38;break;case"BADGE_POKEDEX_ENTRIES_GEN2":case 39:m.badges[i]=39;break;case"BADGE_RAID_BATTLE_WON":case 40:m.badges[i]=40;break;case"BADGE_LEGENDARY_BATTLE_WON":case 41:m.badges[i]=41;break;case"BADGE_BERRIES_FED":case 42:m.badges[i]=42;break;case"BADGE_HOURS_DEFENDED":case 43:m.badges[i]=43;break;case"BADGE_PLACE_HOLDER":case 44:m.badges[i]=44;break;case"BADGE_POKEDEX_ENTRIES_GEN3":case 45:m.badges[i]=45;break;case"BADGE_CHALLENGE_QUESTS":case 46:m.badges[i]=46;break;case"BADGE_MEW_ENCOUNTER":case 47:m.badges[i]=47;break;case"BADGE_MAX_LEVEL_FRIENDS":case 48:m.badges[i]=48;break;case"BADGE_TRADING":case 49:m.badges[i]=49;break;case"BADGE_TRADING_DISTANCE":case 50:m.badges[i]=50;break;case"BADGE_POKEDEX_ENTRIES_GEN4":case 51:m.badges[i]=51;break;case"BADGE_GREAT_LEAGUE":case 52:m.badges[i]=52;break;case"BADGE_ULTRA_LEAGUE":case 53:m.badges[i]=53;break;case"BADGE_MASTER_LEAGUE":case 54:m.badges[i]=54;break;case"BADGE_EVENT_MIN":case 2e3:m.badges[i]=2e3;break;case"BADGE_CHICAGO_FEST_JULY_2017":case 2001:m.badges[i]=2001;break;case"BADGE_PIKACHU_OUTBREAK_YOKOHAMA_2017":case 2002:m.badges[i]=2002;break;case"BADGE_SAFARI_ZONE_EUROPE_2017":case 2003:m.badges[i]=2003;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_07":case 2004:m.badges[i]=2004;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_14":case 2005:m.badges[i]=2005;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_NORTH":case 2006:m.badges[i]=2006;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_SOUTH":case 2007:m.badges[i]=2007;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_NORTH":case 2008:m.badges[i]=2008;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_SOUTH":case 2009:m.badges[i]=2009;break;case"BADGE_APAC_PARTNER_JULY_2018_0":case 2010:m.badges[i]=2010;break;case"BADGE_APAC_PARTNER_JULY_2018_1":case 2011:m.badges[i]=2011;break;case"BADGE_APAC_PARTNER_JULY_2018_2":case 2012:m.badges[i]=2012;break;case"BADGE_APAC_PARTNER_JULY_2018_3":case 2013:m.badges[i]=2013;break;case"BADGE_APAC_PARTNER_JULY_2018_4":case 2014:m.badges[i]=2014;break;case"BADGE_APAC_PARTNER_JULY_2018_5":case 2015:m.badges[i]=2015;break;case"BADGE_APAC_PARTNER_JULY_2018_6":case 2016:m.badges[i]=2016;break;case"BADGE_APAC_PARTNER_JULY_2018_7":case 2017:m.badges[i]=2017;break;case"BADGE_APAC_PARTNER_JULY_2018_8":case 2018:m.badges[i]=2018;break;case"BADGE_APAC_PARTNER_JULY_2018_9":case 2019:m.badges[i]=2019;break;case"BADGE_YOKOSUKA_29_AUG_2018_MIKASA":case 2020:m.badges[i]=2020;break;case"BADGE_YOKOSUKA_29_AUG_2018_VERNY":case 2021:m.badges[i]=2021;break;case"BADGE_YOKOSUKA_29_AUG_2018_KURIHAMA":case 2022:m.badges[i]=2022;break;case"BADGE_YOKOSUKA_30_AUG_2018_MIKASA":case 2023:m.badges[i]=2023;break;case"BADGE_YOKOSUKA_30_AUG_2018_VERNY":case 2024:m.badges[i]=2024;break;case"BADGE_YOKOSUKA_30_AUG_2018_KURIHAMA":case 2025:m.badges[i]=2025;break;case"BADGE_YOKOSUKA_31_AUG_2018_MIKASA":case 2026:m.badges[i]=2026;break;case"BADGE_YOKOSUKA_31_AUG_2018_VERNY":case 2027:m.badges[i]=2027;break;case"BADGE_YOKOSUKA_31_AUG_2018_KURIHAMA":case 2028:m.badges[i]=2028;break;case"BADGE_YOKOSUKA_1_SEP_2018_MIKASA":case 2029:m.badges[i]=2029;break;case"BADGE_YOKOSUKA_1_SEP_2018_VERNY":case 2030:m.badges[i]=2030;break;case"BADGE_YOKOSUKA_1_SEP_2018_KURIHAMA":case 2031:m.badges[i]=2031;break;case"BADGE_YOKOSUKA_2_SEP_2018_MIKASA":case 2032:m.badges[i]=2032;break;case"BADGE_YOKOSUKA_2_SEP_2018_VERNY":case 2033:m.badges[i]=2033;break;case"BADGE_YOKOSUKA_2_SEP_2018_KURIHAMA":case 2034:m.badges[i]=2034;break;case"BADGE_TOP_BANANA_1":case 2035:m.badges[i]=2035;break;case"BADGE_TOP_BANANA_2":case 2036:m.badges[i]=2036;break;case"BADGE_TOP_BANANA_3":case 2037:m.badges[i]=2037;break}}}return m};RedeemPasscodeReward.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.items=[];d.avatar_items=[];d.egg_pokemon=[];d.pokemon=[];d.poke_candy=[];d.badges=[]}if(o.defaults){d.stardust=0;d.pokecoins=0}if(m.items&&m.items.length){d.items=[];for(var j=0;j<m.items.length;++j){d.items[j]=$root.POGOProtos.Data.Redeem.RedeemedItem.toObject(m.items[j],o)}}if(m.avatar_items&&m.avatar_items.length){d.avatar_items=[];for(var j=0;j<m.avatar_items.length;++j){d.avatar_items[j]=$root.POGOProtos.Data.Redeem.RedeemedAvatarItem.toObject(m.avatar_items[j],o)}}if(m.egg_pokemon&&m.egg_pokemon.length){d.egg_pokemon=[];for(var j=0;j<m.egg_pokemon.length;++j){d.egg_pokemon[j]=$root.POGOProtos.Data.PokemonData.toObject(m.egg_pokemon[j],o)}}if(m.pokemon&&m.pokemon.length){d.pokemon=[];for(var j=0;j<m.pokemon.length;++j){d.pokemon[j]=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon[j],o)}}if(m.poke_candy&&m.poke_candy.length){d.poke_candy=[];for(var j=0;j<m.poke_candy.length;++j){d.poke_candy[j]=$root.POGOProtos.Data.Redeem.PokeCandy.toObject(m.poke_candy[j],o)}}if(m.stardust!=null&&m.hasOwnProperty("stardust")){d.stardust=m.stardust}if(m.pokecoins!=null&&m.hasOwnProperty("pokecoins")){d.pokecoins=m.pokecoins}if(m.badges&&m.badges.length){d.badges=[];for(var j=0;j<m.badges.length;++j){d.badges[j]=o.enums===String?$root.POGOProtos.Enums.BadgeType[m.badges[j]]:m.badges[j]}}return d};RedeemPasscodeReward.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RedeemPasscodeReward}();return Redeem}();Data.Sfida=function(){var Sfida={};Sfida.SfidaMetrics=function(){function SfidaMetrics(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaMetrics.prototype.distance_walked_km=0;SfidaMetrics.prototype.step_count=0;SfidaMetrics.prototype.calories_burned=0;SfidaMetrics.prototype.exercise_time_ms=$util.Long?$util.Long.fromBits(0,0,false):0;SfidaMetrics.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.distance_walked_km!=null&&m.hasOwnProperty("distance_walked_km"))w.uint32(9).double(m.distance_walked_km);if(m.step_count!=null&&m.hasOwnProperty("step_count"))w.uint32(16).int32(m.step_count);if(m.calories_burned!=null&&m.hasOwnProperty("calories_burned"))w.uint32(25).double(m.calories_burned);if(m.exercise_time_ms!=null&&m.hasOwnProperty("exercise_time_ms"))w.uint32(32).int64(m.exercise_time_ms);return w};SfidaMetrics.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Sfida.SfidaMetrics;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.distance_walked_km=r.double();break;case 2:m.step_count=r.int32();break;case 3:m.calories_burned=r.double();break;case 4:m.exercise_time_ms=r.int64();break;default:r.skipType(t&7);break}}return m};SfidaMetrics.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Sfida.SfidaMetrics)return d;var m=new $root.POGOProtos.Data.Sfida.SfidaMetrics;if(d.distance_walked_km!=null){m.distance_walked_km=Number(d.distance_walked_km)}if(d.step_count!=null){m.step_count=d.step_count|0}if(d.calories_burned!=null){m.calories_burned=Number(d.calories_burned)}if(d.exercise_time_ms!=null){if($util.Long)(m.exercise_time_ms=$util.Long.fromValue(d.exercise_time_ms)).unsigned=false;else if(typeof d.exercise_time_ms==="string")m.exercise_time_ms=parseInt(d.exercise_time_ms,10);else if(typeof d.exercise_time_ms==="number")m.exercise_time_ms=d.exercise_time_ms;else if(typeof d.exercise_time_ms==="object")m.exercise_time_ms=new $util.LongBits(d.exercise_time_ms.low>>>0,d.exercise_time_ms.high>>>0).toNumber()}return m};SfidaMetrics.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.distance_walked_km=0;d.step_count=0;d.calories_burned=0;if($util.Long){var n=new $util.Long(0,0,false);d.exercise_time_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.exercise_time_ms=o.longs===String?"0":0}if(m.distance_walked_km!=null&&m.hasOwnProperty("distance_walked_km")){d.distance_walked_km=o.json&&!isFinite(m.distance_walked_km)?String(m.distance_walked_km):m.distance_walked_km}if(m.step_count!=null&&m.hasOwnProperty("step_count")){d.step_count=m.step_count}if(m.calories_burned!=null&&m.hasOwnProperty("calories_burned")){d.calories_burned=o.json&&!isFinite(m.calories_burned)?String(m.calories_burned):m.calories_burned}if(m.exercise_time_ms!=null&&m.hasOwnProperty("exercise_time_ms")){if(typeof m.exercise_time_ms==="number")d.exercise_time_ms=o.longs===String?String(m.exercise_time_ms):m.exercise_time_ms;else d.exercise_time_ms=o.longs===String?$util.Long.prototype.toString.call(m.exercise_time_ms):o.longs===Number?new $util.LongBits(m.exercise_time_ms.low>>>0,m.exercise_time_ms.high>>>0).toNumber():m.exercise_time_ms}return d};SfidaMetrics.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SfidaMetrics}();Sfida.SfidaMetricsUpdate=function(){function SfidaMetricsUpdate(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaMetricsUpdate.prototype.update_type=0;SfidaMetricsUpdate.prototype.timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;SfidaMetricsUpdate.prototype.metrics=null;SfidaMetricsUpdate.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.update_type!=null&&m.hasOwnProperty("update_type"))w.uint32(8).int32(m.update_type);if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms"))w.uint32(16).int64(m.timestamp_ms);if(m.metrics!=null&&m.hasOwnProperty("metrics"))$root.POGOProtos.Data.Sfida.SfidaMetrics.encode(m.metrics,w.uint32(26).fork()).ldelim();return w};SfidaMetricsUpdate.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Sfida.SfidaMetricsUpdate;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.update_type=r.int32();break;case 2:m.timestamp_ms=r.int64();break;case 3:m.metrics=$root.POGOProtos.Data.Sfida.SfidaMetrics.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};SfidaMetricsUpdate.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Sfida.SfidaMetricsUpdate)return d;var m=new $root.POGOProtos.Data.Sfida.SfidaMetricsUpdate;switch(d.update_type){case"UNSET":case 0:m.update_type=0;break;case"INITIALIZATION":case 1:m.update_type=1;break;case"ACCUMULATION":case 2:m.update_type=2;break}if(d.timestamp_ms!=null){if($util.Long)(m.timestamp_ms=$util.Long.fromValue(d.timestamp_ms)).unsigned=false;else if(typeof d.timestamp_ms==="string")m.timestamp_ms=parseInt(d.timestamp_ms,10);else if(typeof d.timestamp_ms==="number")m.timestamp_ms=d.timestamp_ms;else if(typeof d.timestamp_ms==="object")m.timestamp_ms=new $util.LongBits(d.timestamp_ms.low>>>0,d.timestamp_ms.high>>>0).toNumber()}if(d.metrics!=null){if(typeof d.metrics!=="object")throw TypeError(".POGOProtos.Data.Sfida.SfidaMetricsUpdate.metrics: object expected");m.metrics=$root.POGOProtos.Data.Sfida.SfidaMetrics.fromObject(d.metrics)}return m};SfidaMetricsUpdate.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.update_type=o.enums===String?"UNSET":0;if($util.Long){var n=new $util.Long(0,0,false);d.timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.timestamp_ms=o.longs===String?"0":0;d.metrics=null}if(m.update_type!=null&&m.hasOwnProperty("update_type")){d.update_type=o.enums===String?$root.POGOProtos.Data.Sfida.SfidaMetricsUpdate.UpdateType[m.update_type]:m.update_type}if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms")){if(typeof m.timestamp_ms==="number")d.timestamp_ms=o.longs===String?String(m.timestamp_ms):m.timestamp_ms;else d.timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.timestamp_ms):o.longs===Number?new $util.LongBits(m.timestamp_ms.low>>>0,m.timestamp_ms.high>>>0).toNumber():m.timestamp_ms}if(m.metrics!=null&&m.hasOwnProperty("metrics")){d.metrics=$root.POGOProtos.Data.Sfida.SfidaMetrics.toObject(m.metrics,o)}return d};SfidaMetricsUpdate.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SfidaMetricsUpdate.UpdateType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="INITIALIZATION"]=1;values[valuesById[2]="ACCUMULATION"]=2;return values}();return SfidaMetricsUpdate}();Sfida.SfidaNearbyPokemon=function(){function SfidaNearbyPokemon(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaNearbyPokemon.prototype.pokedex_number=0;SfidaNearbyPokemon.prototype.uncaught=false;SfidaNearbyPokemon.prototype.pokemon_display=null;SfidaNearbyPokemon.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokedex_number!=null&&m.hasOwnProperty("pokedex_number"))w.uint32(8).int32(m.pokedex_number);if(m.uncaught!=null&&m.hasOwnProperty("uncaught"))w.uint32(16).bool(m.uncaught);if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display"))$root.POGOProtos.Data.PokemonDisplay.encode(m.pokemon_display,w.uint32(26).fork()).ldelim();return w};SfidaNearbyPokemon.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Sfida.SfidaNearbyPokemon;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokedex_number=r.int32();break;case 2:m.uncaught=r.bool();break;case 3:m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};SfidaNearbyPokemon.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Sfida.SfidaNearbyPokemon)return d;var m=new $root.POGOProtos.Data.Sfida.SfidaNearbyPokemon;if(d.pokedex_number!=null){m.pokedex_number=d.pokedex_number|0}if(d.uncaught!=null){m.uncaught=Boolean(d.uncaught)}if(d.pokemon_display!=null){if(typeof d.pokemon_display!=="object")throw TypeError(".POGOProtos.Data.Sfida.SfidaNearbyPokemon.pokemon_display: object expected");m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.pokemon_display)}return m};SfidaNearbyPokemon.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokedex_number=0;d.uncaught=false;d.pokemon_display=null}if(m.pokedex_number!=null&&m.hasOwnProperty("pokedex_number")){d.pokedex_number=m.pokedex_number}if(m.uncaught!=null&&m.hasOwnProperty("uncaught")){d.uncaught=m.uncaught}if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display")){d.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.toObject(m.pokemon_display,o)}return d};SfidaNearbyPokemon.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SfidaNearbyPokemon}();return Sfida}();Data.Store=function(){var Store={};Store.CurrencyQuantity=function(){function CurrencyQuantity(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CurrencyQuantity.prototype.currency_type="";CurrencyQuantity.prototype.quantity=0;CurrencyQuantity.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.currency_type!=null&&m.hasOwnProperty("currency_type"))w.uint32(10).string(m.currency_type);if(m.quantity!=null&&m.hasOwnProperty("quantity"))w.uint32(16).int32(m.quantity);return w};CurrencyQuantity.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Store.CurrencyQuantity;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.currency_type=r.string();break;case 2:m.quantity=r.int32();break;default:r.skipType(t&7);break}}return m};CurrencyQuantity.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Store.CurrencyQuantity)return d;var m=new $root.POGOProtos.Data.Store.CurrencyQuantity;if(d.currency_type!=null){m.currency_type=String(d.currency_type)}if(d.quantity!=null){m.quantity=d.quantity|0}return m};CurrencyQuantity.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.currency_type="";d.quantity=0}if(m.currency_type!=null&&m.hasOwnProperty("currency_type")){d.currency_type=m.currency_type}if(m.quantity!=null&&m.hasOwnProperty("quantity")){d.quantity=m.quantity}return d};CurrencyQuantity.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CurrencyQuantity}();Store.CurrencyUpdate=function(){function CurrencyUpdate(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CurrencyUpdate.prototype.currency_name="";CurrencyUpdate.prototype.currency_delta=0;CurrencyUpdate.prototype.currency_balance=0;CurrencyUpdate.prototype.fiat_purchased_balance=0;CurrencyUpdate.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.currency_name!=null&&m.hasOwnProperty("currency_name"))w.uint32(10).string(m.currency_name);if(m.currency_delta!=null&&m.hasOwnProperty("currency_delta"))w.uint32(16).int32(m.currency_delta);if(m.currency_balance!=null&&m.hasOwnProperty("currency_balance"))w.uint32(24).int32(m.currency_balance);if(m.fiat_purchased_balance!=null&&m.hasOwnProperty("fiat_purchased_balance"))w.uint32(32).int32(m.fiat_purchased_balance);return w};CurrencyUpdate.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Store.CurrencyUpdate;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.currency_name=r.string();break;case 2:m.currency_delta=r.int32();break;case 3:m.currency_balance=r.int32();break;case 4:m.fiat_purchased_balance=r.int32();break;default:r.skipType(t&7);break}}return m};CurrencyUpdate.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Store.CurrencyUpdate)return d;var m=new $root.POGOProtos.Data.Store.CurrencyUpdate;if(d.currency_name!=null){m.currency_name=String(d.currency_name)}if(d.currency_delta!=null){m.currency_delta=d.currency_delta|0}if(d.currency_balance!=null){m.currency_balance=d.currency_balance|0}if(d.fiat_purchased_balance!=null){m.fiat_purchased_balance=d.fiat_purchased_balance|0}return m};CurrencyUpdate.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.currency_name="";d.currency_delta=0;d.currency_balance=0;d.fiat_purchased_balance=0}if(m.currency_name!=null&&m.hasOwnProperty("currency_name")){d.currency_name=m.currency_name}if(m.currency_delta!=null&&m.hasOwnProperty("currency_delta")){d.currency_delta=m.currency_delta}if(m.currency_balance!=null&&m.hasOwnProperty("currency_balance")){d.currency_balance=m.currency_balance}if(m.fiat_purchased_balance!=null&&m.hasOwnProperty("fiat_purchased_balance")){d.fiat_purchased_balance=m.fiat_purchased_balance}return d};CurrencyUpdate.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CurrencyUpdate}();return Store}();Data.Telemetry=function(){var Telemetry={};Telemetry.AssetBundleDownloadTelemetry=function(){function AssetBundleDownloadTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AssetBundleDownloadTelemetry.prototype.asset_event_id=0;AssetBundleDownloadTelemetry.prototype.bundle_name="";AssetBundleDownloadTelemetry.prototype.size=0;AssetBundleDownloadTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.asset_event_id!=null&&m.hasOwnProperty("asset_event_id"))w.uint32(8).int32(m.asset_event_id);if(m.bundle_name!=null&&m.hasOwnProperty("bundle_name"))w.uint32(18).string(m.bundle_name);if(m.size!=null&&m.hasOwnProperty("size"))w.uint32(24).uint32(m.size);return w};AssetBundleDownloadTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.AssetBundleDownloadTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.asset_event_id=r.int32();break;case 2:m.bundle_name=r.string();break;case 3:m.size=r.uint32();break;default:r.skipType(t&7);break}}return m};AssetBundleDownloadTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.AssetBundleDownloadTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.AssetBundleDownloadTelemetry;switch(d.asset_event_id){case"UNDEFINED_ASSET_EVENT":case 0:m.asset_event_id=0;break;case"DOWNLOAD_START":case 1:m.asset_event_id=1;break;case"DOWNLOAD_FINISHED":case 2:m.asset_event_id=2;break;case"DOWNLOAD_FAILED":case 3:m.asset_event_id=3;break;case"ASSET_RETRIEVED_FROM_CACHE":case 4:m.asset_event_id=4;break;case"CACHE_THRASH":case 5:m.asset_event_id=5;break}if(d.bundle_name!=null){m.bundle_name=String(d.bundle_name)}if(d.size!=null){m.size=d.size>>>0}return m};AssetBundleDownloadTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.asset_event_id=o.enums===String?"UNDEFINED_ASSET_EVENT":0;d.bundle_name="";d.size=0}if(m.asset_event_id!=null&&m.hasOwnProperty("asset_event_id")){d.asset_event_id=o.enums===String?$root.POGOProtos.Enums.AssetTelemetryIds[m.asset_event_id]:m.asset_event_id}if(m.bundle_name!=null&&m.hasOwnProperty("bundle_name")){d.bundle_name=m.bundle_name}if(m.size!=null&&m.hasOwnProperty("size")){d.size=m.size}return d};AssetBundleDownloadTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AssetBundleDownloadTelemetry}();Telemetry.AssetPoiDownloadTelemetry=function(){function AssetPoiDownloadTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AssetPoiDownloadTelemetry.prototype.asset_event_id=0;AssetPoiDownloadTelemetry.prototype.fort_id="";AssetPoiDownloadTelemetry.prototype.size=0;AssetPoiDownloadTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.asset_event_id!=null&&m.hasOwnProperty("asset_event_id"))w.uint32(8).int32(m.asset_event_id);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(18).string(m.fort_id);if(m.size!=null&&m.hasOwnProperty("size"))w.uint32(24).uint32(m.size);return w};AssetPoiDownloadTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.AssetPoiDownloadTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.asset_event_id=r.int32();break;case 2:m.fort_id=r.string();break;case 3:m.size=r.uint32();break;default:r.skipType(t&7);break}}return m};AssetPoiDownloadTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.AssetPoiDownloadTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.AssetPoiDownloadTelemetry;switch(d.asset_event_id){case"UNDEFINED_ASSET_EVENT":case 0:m.asset_event_id=0;break;case"DOWNLOAD_START":case 1:m.asset_event_id=1;break;case"DOWNLOAD_FINISHED":case 2:m.asset_event_id=2;break;case"DOWNLOAD_FAILED":case 3:m.asset_event_id=3;break;case"ASSET_RETRIEVED_FROM_CACHE":case 4:m.asset_event_id=4;break;case"CACHE_THRASH":case 5:m.asset_event_id=5;break}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.size!=null){m.size=d.size>>>0}return m};AssetPoiDownloadTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.asset_event_id=o.enums===String?"UNDEFINED_ASSET_EVENT":0;d.fort_id="";d.size=0}if(m.asset_event_id!=null&&m.hasOwnProperty("asset_event_id")){d.asset_event_id=o.enums===String?$root.POGOProtos.Enums.AssetTelemetryIds[m.asset_event_id]:m.asset_event_id}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.size!=null&&m.hasOwnProperty("size")){d.size=m.size}return d};AssetPoiDownloadTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AssetPoiDownloadTelemetry}();Telemetry.AssetStreamCacheCulledTelemetry=function(){function AssetStreamCacheCulledTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AssetStreamCacheCulledTelemetry.prototype.asset_event_id=0;AssetStreamCacheCulledTelemetry.prototype.space_released=0;AssetStreamCacheCulledTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.asset_event_id!=null&&m.hasOwnProperty("asset_event_id"))w.uint32(8).int32(m.asset_event_id);if(m.space_released!=null&&m.hasOwnProperty("space_released"))w.uint32(16).uint32(m.space_released);return w};AssetStreamCacheCulledTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.AssetStreamCacheCulledTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.asset_event_id=r.int32();break;case 2:m.space_released=r.uint32();break;default:r.skipType(t&7);break}}return m};AssetStreamCacheCulledTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.AssetStreamCacheCulledTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.AssetStreamCacheCulledTelemetry;switch(d.asset_event_id){case"UNDEFINED_ASSET_EVENT":case 0:m.asset_event_id=0;break;case"DOWNLOAD_START":case 1:m.asset_event_id=1;break;case"DOWNLOAD_FINISHED":case 2:m.asset_event_id=2;break;case"DOWNLOAD_FAILED":case 3:m.asset_event_id=3;break;case"ASSET_RETRIEVED_FROM_CACHE":case 4:m.asset_event_id=4;break;case"CACHE_THRASH":case 5:m.asset_event_id=5;break}if(d.space_released!=null){m.space_released=d.space_released>>>0}return m};AssetStreamCacheCulledTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.asset_event_id=o.enums===String?"UNDEFINED_ASSET_EVENT":0;d.space_released=0}if(m.asset_event_id!=null&&m.hasOwnProperty("asset_event_id")){d.asset_event_id=o.enums===String?$root.POGOProtos.Enums.AssetTelemetryIds[m.asset_event_id]:m.asset_event_id}if(m.space_released!=null&&m.hasOwnProperty("space_released")){d.space_released=m.space_released}return d};AssetStreamCacheCulledTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AssetStreamCacheCulledTelemetry}();Telemetry.AssetStreamDownloadTelemetry=function(){function AssetStreamDownloadTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AssetStreamDownloadTelemetry.prototype.asset_event_id=0;AssetStreamDownloadTelemetry.prototype.url="";AssetStreamDownloadTelemetry.prototype.size=0;AssetStreamDownloadTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.asset_event_id!=null&&m.hasOwnProperty("asset_event_id"))w.uint32(8).int32(m.asset_event_id);if(m.url!=null&&m.hasOwnProperty("url"))w.uint32(18).string(m.url);if(m.size!=null&&m.hasOwnProperty("size"))w.uint32(24).uint32(m.size);return w};AssetStreamDownloadTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.AssetStreamDownloadTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.asset_event_id=r.int32();break;case 2:m.url=r.string();break;case 3:m.size=r.uint32();break;default:r.skipType(t&7);break}}return m};AssetStreamDownloadTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.AssetStreamDownloadTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.AssetStreamDownloadTelemetry;switch(d.asset_event_id){case"UNDEFINED_ASSET_EVENT":case 0:m.asset_event_id=0;break;case"DOWNLOAD_START":case 1:m.asset_event_id=1;break;case"DOWNLOAD_FINISHED":case 2:m.asset_event_id=2;break;case"DOWNLOAD_FAILED":case 3:m.asset_event_id=3;break;case"ASSET_RETRIEVED_FROM_CACHE":case 4:m.asset_event_id=4;break;case"CACHE_THRASH":case 5:m.asset_event_id=5;break}if(d.url!=null){m.url=String(d.url)}if(d.size!=null){m.size=d.size>>>0}return m};AssetStreamDownloadTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.asset_event_id=o.enums===String?"UNDEFINED_ASSET_EVENT":0;d.url="";d.size=0}if(m.asset_event_id!=null&&m.hasOwnProperty("asset_event_id")){d.asset_event_id=o.enums===String?$root.POGOProtos.Enums.AssetTelemetryIds[m.asset_event_id]:m.asset_event_id}if(m.url!=null&&m.hasOwnProperty("url")){d.url=m.url}if(m.size!=null&&m.hasOwnProperty("size")){d.size=m.size}return d};AssetStreamDownloadTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AssetStreamDownloadTelemetry}();Telemetry.AvatarCustomizationTelemetry=function(){function AvatarCustomizationTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AvatarCustomizationTelemetry.prototype.avatar_customization_click_id=0;AvatarCustomizationTelemetry.prototype.asset_name="";AvatarCustomizationTelemetry.prototype.sku="";AvatarCustomizationTelemetry.prototype.has_enough_coins=false;AvatarCustomizationTelemetry.prototype.group_name="";AvatarCustomizationTelemetry.prototype.color_choice_id="";AvatarCustomizationTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.avatar_customization_click_id!=null&&m.hasOwnProperty("avatar_customization_click_id"))w.uint32(8).int32(m.avatar_customization_click_id);if(m.asset_name!=null&&m.hasOwnProperty("asset_name"))w.uint32(18).string(m.asset_name);if(m.sku!=null&&m.hasOwnProperty("sku"))w.uint32(26).string(m.sku);if(m.has_enough_coins!=null&&m.hasOwnProperty("has_enough_coins"))w.uint32(32).bool(m.has_enough_coins);if(m.group_name!=null&&m.hasOwnProperty("group_name"))w.uint32(42).string(m.group_name);if(m.color_choice_id!=null&&m.hasOwnProperty("color_choice_id"))w.uint32(50).string(m.color_choice_id);return w};AvatarCustomizationTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.AvatarCustomizationTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.avatar_customization_click_id=r.int32();break;case 2:m.asset_name=r.string();break;case 3:m.sku=r.string();break;case 4:m.has_enough_coins=r.bool();break;case 5:m.group_name=r.string();break;case 6:m.color_choice_id=r.string();break;default:r.skipType(t&7);break}}return m};AvatarCustomizationTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.AvatarCustomizationTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.AvatarCustomizationTelemetry;switch(d.avatar_customization_click_id){case"UNDEFINED_AVATAR_CUSTOMIZATION":case 0:m.avatar_customization_click_id=0;break;case"EQUIP_ITEM":case 1:m.avatar_customization_click_id=1;break;case"OPEN_FEATURES":case 2:m.avatar_customization_click_id=2;break;case"OPEN_STORE":case 3:m.avatar_customization_click_id=3;break;case"PURCHASE_ITEM":case 4:m.avatar_customization_click_id=4;break;case"PURCHASE_ERROR":case 5:m.avatar_customization_click_id=5;break;case"SELECT_ITEM_GROUP":case 6:m.avatar_customization_click_id=6;break;case"SELECT_SLOT":case 7:m.avatar_customization_click_id=7;break;case"SELECT_COLOR":case 8:m.avatar_customization_click_id=8;break;case"SHOW_QUICK_SHOP":case 9:m.avatar_customization_click_id=9;break}if(d.asset_name!=null){m.asset_name=String(d.asset_name)}if(d.sku!=null){m.sku=String(d.sku)}if(d.has_enough_coins!=null){m.has_enough_coins=Boolean(d.has_enough_coins)}if(d.group_name!=null){m.group_name=String(d.group_name)}if(d.color_choice_id!=null){m.color_choice_id=String(d.color_choice_id)}return m};AvatarCustomizationTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.avatar_customization_click_id=o.enums===String?"UNDEFINED_AVATAR_CUSTOMIZATION":0;d.asset_name="";d.sku="";d.has_enough_coins=false;d.group_name="";d.color_choice_id=""}if(m.avatar_customization_click_id!=null&&m.hasOwnProperty("avatar_customization_click_id")){d.avatar_customization_click_id=o.enums===String?$root.POGOProtos.Enums.AvatarCustomizationTelemetryIds[m.avatar_customization_click_id]:m.avatar_customization_click_id}if(m.asset_name!=null&&m.hasOwnProperty("asset_name")){d.asset_name=m.asset_name}if(m.sku!=null&&m.hasOwnProperty("sku")){d.sku=m.sku}if(m.has_enough_coins!=null&&m.hasOwnProperty("has_enough_coins")){d.has_enough_coins=m.has_enough_coins}if(m.group_name!=null&&m.hasOwnProperty("group_name")){d.group_name=m.group_name}if(m.color_choice_id!=null&&m.hasOwnProperty("color_choice_id")){d.color_choice_id=m.color_choice_id}return d};AvatarCustomizationTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AvatarCustomizationTelemetry}();Telemetry.BattlePartyTelemetry=function(){function BattlePartyTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BattlePartyTelemetry.prototype.battle_party_click_id=0;BattlePartyTelemetry.prototype.battle_party_count=0;BattlePartyTelemetry.prototype.battle_party_number=0;BattlePartyTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.battle_party_click_id!=null&&m.hasOwnProperty("battle_party_click_id"))w.uint32(8).int32(m.battle_party_click_id);if(m.battle_party_count!=null&&m.hasOwnProperty("battle_party_count"))w.uint32(16).int32(m.battle_party_count);if(m.battle_party_number!=null&&m.hasOwnProperty("battle_party_number"))w.uint32(24).int32(m.battle_party_number);return w};BattlePartyTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.BattlePartyTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.battle_party_click_id=r.int32();break;case 2:m.battle_party_count=r.int32();break;case 3:m.battle_party_number=r.int32();break;default:r.skipType(t&7);break}}return m};BattlePartyTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.BattlePartyTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.BattlePartyTelemetry;switch(d.battle_party_click_id){case"UNDEFINED_BATTLE_PARTY_EVENT":case 0:m.battle_party_click_id=0;break;case"ADD":case 1:m.battle_party_click_id=1;break;case"REMOVE":case 2:m.battle_party_click_id=2;break;case"GYM_BATTLE":case 3:m.battle_party_click_id=3;break;case"RAID_BATTLE":case 4:m.battle_party_click_id=4;break;case"BATTLE_POKEMON_CHANGED":case 5:m.battle_party_click_id=5;break}if(d.battle_party_count!=null){m.battle_party_count=d.battle_party_count|0}if(d.battle_party_number!=null){m.battle_party_number=d.battle_party_number|0}return m};BattlePartyTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.battle_party_click_id=o.enums===String?"UNDEFINED_BATTLE_PARTY_EVENT":0;d.battle_party_count=0;d.battle_party_number=0}if(m.battle_party_click_id!=null&&m.hasOwnProperty("battle_party_click_id")){d.battle_party_click_id=o.enums===String?$root.POGOProtos.Enums.BattlePartyTelemetryIds[m.battle_party_click_id]:m.battle_party_click_id}if(m.battle_party_count!=null&&m.hasOwnProperty("battle_party_count")){d.battle_party_count=m.battle_party_count}if(m.battle_party_number!=null&&m.hasOwnProperty("battle_party_number")){d.battle_party_number=m.battle_party_number}return d};BattlePartyTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BattlePartyTelemetry}();Telemetry.BootTelemetry=function(){function BootTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BootTelemetry.prototype.nearest_poi_distance=0;BootTelemetry.prototype.poi_within_one_km_count=0;BootTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.nearest_poi_distance!=null&&m.hasOwnProperty("nearest_poi_distance"))w.uint32(13).float(m.nearest_poi_distance);if(m.poi_within_one_km_count!=null&&m.hasOwnProperty("poi_within_one_km_count"))w.uint32(16).int32(m.poi_within_one_km_count);return w};BootTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.BootTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.nearest_poi_distance=r.float();break;case 2:m.poi_within_one_km_count=r.int32();break;default:r.skipType(t&7);break}}return m};BootTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.BootTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.BootTelemetry;if(d.nearest_poi_distance!=null){m.nearest_poi_distance=Number(d.nearest_poi_distance)}if(d.poi_within_one_km_count!=null){m.poi_within_one_km_count=d.poi_within_one_km_count|0}return m};BootTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.nearest_poi_distance=0;d.poi_within_one_km_count=0}if(m.nearest_poi_distance!=null&&m.hasOwnProperty("nearest_poi_distance")){d.nearest_poi_distance=o.json&&!isFinite(m.nearest_poi_distance)?String(m.nearest_poi_distance):m.nearest_poi_distance}if(m.poi_within_one_km_count!=null&&m.hasOwnProperty("poi_within_one_km_count")){d.poi_within_one_km_count=m.poi_within_one_km_count}return d};BootTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BootTelemetry}();Telemetry.BootTime=function(){function BootTime(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BootTime.prototype.duration=null;BootTime.prototype.boot_phase=0;BootTime.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.duration!=null&&m.hasOwnProperty("duration"))$root.POGOProtos.Data.Telemetry.PlatformMetricData.encode(m.duration,w.uint32(10).fork()).ldelim();if(m.boot_phase!=null&&m.hasOwnProperty("boot_phase"))w.uint32(16).int32(m.boot_phase);return w};BootTime.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.BootTime;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.duration=$root.POGOProtos.Data.Telemetry.PlatformMetricData.decode(r,r.uint32());break;case 2:m.boot_phase=r.int32();break;default:r.skipType(t&7);break}}return m};BootTime.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.BootTime)return d;var m=new $root.POGOProtos.Data.Telemetry.BootTime;if(d.duration!=null){if(typeof d.duration!=="object")throw TypeError(".POGOProtos.Data.Telemetry.BootTime.duration: object expected");m.duration=$root.POGOProtos.Data.Telemetry.PlatformMetricData.fromObject(d.duration)}switch(d.boot_phase){case"UNDEFINED":case 0:m.boot_phase=0;break;case"TIME_TO_MAP":case 1:m.boot_phase=1;break;case"LOGO_SCREEN_TIME":case 2:m.boot_phase=2;break;case"MAIN_SCENE_LOAD_TIME":case 3:m.boot_phase=3;break;case"WAIT_FOR_AUTH":case 4:m.boot_phase=4;break;case"INIT_REMOTE_CONFIG_VERSIONS":case 5:m.boot_phase=5;break;case"INIT_BUNDLE_DIGEST":case 6:m.boot_phase=6;break;case"INIT_GMT":case 7:m.boot_phase=7;break;case"DOWNLOAD_I18N":case 8:m.boot_phase=8;break;case"DOWNLOAD_GLOBAL_ASSETS":case 9:m.boot_phase=9;break;case"REGISTER_PUSH_NOTIFICATION":case 10:m.boot_phase=10;break;case"INITIALIZE_UPSIGHT":case 11:m.boot_phase=11;break;case"INITIALIZE_CRITTERCISM":case 12:m.boot_phase=12;break;case"LOGIN_VERSION_CHECK":case 13:m.boot_phase=13;break;case"LOGIN_GET_PLAYER":case 14:m.boot_phase=14;break;case"LOGIN_AUTHENTICATION":case 15:m.boot_phase=15;break;case"MODAL_TIME":case 16:m.boot_phase=16;break}return m};BootTime.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.duration=null;d.boot_phase=o.enums===String?"UNDEFINED":0}if(m.duration!=null&&m.hasOwnProperty("duration")){d.duration=$root.POGOProtos.Data.Telemetry.PlatformMetricData.toObject(m.duration,o)}if(m.boot_phase!=null&&m.hasOwnProperty("boot_phase")){d.boot_phase=o.enums===String?$root.POGOProtos.Data.Telemetry.BootTime.BootPhase[m.boot_phase]:m.boot_phase}return d};BootTime.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BootTime.BootPhase=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED"]=0;values[valuesById[1]="TIME_TO_MAP"]=1;values[valuesById[2]="LOGO_SCREEN_TIME"]=2;values[valuesById[3]="MAIN_SCENE_LOAD_TIME"]=3;values[valuesById[4]="WAIT_FOR_AUTH"]=4;values[valuesById[5]="INIT_REMOTE_CONFIG_VERSIONS"]=5;values[valuesById[6]="INIT_BUNDLE_DIGEST"]=6;values[valuesById[7]="INIT_GMT"]=7;values[valuesById[8]="DOWNLOAD_I18N"]=8;values[valuesById[9]="DOWNLOAD_GLOBAL_ASSETS"]=9;values[valuesById[10]="REGISTER_PUSH_NOTIFICATION"]=10;values[valuesById[11]="INITIALIZE_UPSIGHT"]=11;values[valuesById[12]="INITIALIZE_CRITTERCISM"]=12;values[valuesById[13]="LOGIN_VERSION_CHECK"]=13;values[valuesById[14]="LOGIN_GET_PLAYER"]=14;values[valuesById[15]="LOGIN_AUTHENTICATION"]=15;values[valuesById[16]="MODAL_TIME"]=16;return values}();return BootTime}();Telemetry.CatchPokemonTelemetry=function(){function CatchPokemonTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CatchPokemonTelemetry.prototype.status="";CatchPokemonTelemetry.prototype.encounter_pokemon_telemetry=null;CatchPokemonTelemetry.prototype.balltype=0;CatchPokemonTelemetry.prototype.hit_grade=0;CatchPokemonTelemetry.prototype.curve_ball=false;CatchPokemonTelemetry.prototype.miss_percent=0;CatchPokemonTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(10).string(m.status);if(m.encounter_pokemon_telemetry!=null&&m.hasOwnProperty("encounter_pokemon_telemetry"))$root.POGOProtos.Data.Telemetry.EncounterPokemonTelemetry.encode(m.encounter_pokemon_telemetry,w.uint32(18).fork()).ldelim();if(m.balltype!=null&&m.hasOwnProperty("balltype"))w.uint32(24).int32(m.balltype);if(m.hit_grade!=null&&m.hasOwnProperty("hit_grade"))w.uint32(32).int32(m.hit_grade);if(m.curve_ball!=null&&m.hasOwnProperty("curve_ball"))w.uint32(40).bool(m.curve_ball);if(m.miss_percent!=null&&m.hasOwnProperty("miss_percent"))w.uint32(49).double(m.miss_percent);return w};CatchPokemonTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.CatchPokemonTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.string();break;case 2:m.encounter_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.EncounterPokemonTelemetry.decode(r,r.uint32());break;case 3:m.balltype=r.int32();break;case 4:m.hit_grade=r.int32();break;case 5:m.curve_ball=r.bool();break;case 6:m.miss_percent=r.double();break;default:r.skipType(t&7);break}}return m};CatchPokemonTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.CatchPokemonTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.CatchPokemonTelemetry;if(d.status!=null){m.status=String(d.status)}if(d.encounter_pokemon_telemetry!=null){if(typeof d.encounter_pokemon_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.CatchPokemonTelemetry.encounter_pokemon_telemetry: object expected");m.encounter_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.EncounterPokemonTelemetry.fromObject(d.encounter_pokemon_telemetry)}if(d.balltype!=null){m.balltype=d.balltype|0}if(d.hit_grade!=null){m.hit_grade=d.hit_grade|0}if(d.curve_ball!=null){m.curve_ball=Boolean(d.curve_ball)}if(d.miss_percent!=null){m.miss_percent=Number(d.miss_percent)}return m};CatchPokemonTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status="";d.encounter_pokemon_telemetry=null;d.balltype=0;d.hit_grade=0;d.curve_ball=false;d.miss_percent=0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=m.status}if(m.encounter_pokemon_telemetry!=null&&m.hasOwnProperty("encounter_pokemon_telemetry")){d.encounter_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.EncounterPokemonTelemetry.toObject(m.encounter_pokemon_telemetry,o)}if(m.balltype!=null&&m.hasOwnProperty("balltype")){d.balltype=m.balltype}if(m.hit_grade!=null&&m.hasOwnProperty("hit_grade")){d.hit_grade=m.hit_grade}if(m.curve_ball!=null&&m.hasOwnProperty("curve_ball")){d.curve_ball=m.curve_ball}if(m.miss_percent!=null&&m.hasOwnProperty("miss_percent")){d.miss_percent=o.json&&!isFinite(m.miss_percent)?String(m.miss_percent):m.miss_percent}return d};CatchPokemonTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CatchPokemonTelemetry}();Telemetry.ChangeArTelemetry=function(){function ChangeArTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ChangeArTelemetry.prototype.ar_enabled=false;ChangeArTelemetry.prototype.ar_plus_enabled=false;ChangeArTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.ar_enabled!=null&&m.hasOwnProperty("ar_enabled"))w.uint32(8).bool(m.ar_enabled);if(m.ar_plus_enabled!=null&&m.hasOwnProperty("ar_plus_enabled"))w.uint32(16).bool(m.ar_plus_enabled);return w};ChangeArTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.ChangeArTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.ar_enabled=r.bool();break;case 2:m.ar_plus_enabled=r.bool();break;default:r.skipType(t&7);break}}return m};ChangeArTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.ChangeArTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.ChangeArTelemetry;if(d.ar_enabled!=null){m.ar_enabled=Boolean(d.ar_enabled)}if(d.ar_plus_enabled!=null){m.ar_plus_enabled=Boolean(d.ar_plus_enabled)}return m};ChangeArTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.ar_enabled=false;d.ar_plus_enabled=false}if(m.ar_enabled!=null&&m.hasOwnProperty("ar_enabled")){d.ar_enabled=m.ar_enabled}if(m.ar_plus_enabled!=null&&m.hasOwnProperty("ar_plus_enabled")){d.ar_plus_enabled=m.ar_plus_enabled}return d};ChangeArTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ChangeArTelemetry}();Telemetry.CheckEncounterTrayInfoTelemetry=function(){function CheckEncounterTrayInfoTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CheckEncounterTrayInfoTelemetry.prototype.berry_tray_info=false;CheckEncounterTrayInfoTelemetry.prototype.ball_tray_info=false;CheckEncounterTrayInfoTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.berry_tray_info!=null&&m.hasOwnProperty("berry_tray_info"))w.uint32(8).bool(m.berry_tray_info);if(m.ball_tray_info!=null&&m.hasOwnProperty("ball_tray_info"))w.uint32(16).bool(m.ball_tray_info);return w};CheckEncounterTrayInfoTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.CheckEncounterTrayInfoTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.berry_tray_info=r.bool();break;case 2:m.ball_tray_info=r.bool();break;default:r.skipType(t&7);break}}return m};CheckEncounterTrayInfoTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.CheckEncounterTrayInfoTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.CheckEncounterTrayInfoTelemetry;if(d.berry_tray_info!=null){m.berry_tray_info=Boolean(d.berry_tray_info)}if(d.ball_tray_info!=null){m.ball_tray_info=Boolean(d.ball_tray_info)}return m};CheckEncounterTrayInfoTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.berry_tray_info=false;d.ball_tray_info=false}if(m.berry_tray_info!=null&&m.hasOwnProperty("berry_tray_info")){d.berry_tray_info=m.berry_tray_info}if(m.ball_tray_info!=null&&m.hasOwnProperty("ball_tray_info")){d.ball_tray_info=m.ball_tray_info}return d};CheckEncounterTrayInfoTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CheckEncounterTrayInfoTelemetry}();Telemetry.ClientTelemetryOmni=function(){function ClientTelemetryOmni(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ClientTelemetryOmni.prototype.boot_time=null;ClientTelemetryOmni.prototype.frame_rate=null;ClientTelemetryOmni.prototype.generic_click_telemetry=null;ClientTelemetryOmni.prototype.map_events_telemetry=null;ClientTelemetryOmni.prototype.spin_pokestop_telemetry=null;ClientTelemetryOmni.prototype.profile_page_telemetry=null;ClientTelemetryOmni.prototype.shopping_page_telemetry=null;ClientTelemetryOmni.prototype.encounter_pokemon_telemetry=null;ClientTelemetryOmni.prototype.catch_pokemon_telemetry=null;ClientTelemetryOmni.prototype.deploy_pokemon_telemetry=null;ClientTelemetryOmni.prototype.feed_pokemon_telemetry=null;ClientTelemetryOmni.prototype.evolve_pokemon_telemetry=null;ClientTelemetryOmni.prototype.release_pokemon_telemetry=null;ClientTelemetryOmni.prototype.nickname_pokemon_telemetry=null;ClientTelemetryOmni.prototype.news_page_telemetry=null;ClientTelemetryOmni.prototype.item_telemetry=null;ClientTelemetryOmni.prototype.battle_party_telemetry=null;ClientTelemetryOmni.prototype.passcode_redeem_telemetry=null;ClientTelemetryOmni.prototype.link_login_telemetry=null;ClientTelemetryOmni.prototype.raid_telemetry=null;ClientTelemetryOmni.prototype.push_notification_telemetry=null;ClientTelemetryOmni.prototype.avatar_customization_telemetry=null;ClientTelemetryOmni.prototype.read_point_of_interest_description_telemetry=null;ClientTelemetryOmni.prototype.web_telemetry=null;ClientTelemetryOmni.prototype.change_ar_telemetry=null;ClientTelemetryOmni.prototype.weather_detail_click_telemetry=null;ClientTelemetryOmni.prototype.user_issue_weather_report=null;ClientTelemetryOmni.prototype.pokemon_inventory_telemetry=null;ClientTelemetryOmni.prototype.social_telemetry=null;ClientTelemetryOmni.prototype.check_encounter_info_telemetry=null;ClientTelemetryOmni.prototype.pokemon_go_plus_telemetry=null;ClientTelemetryOmni.prototype.rpc_timing_telemetry=null;ClientTelemetryOmni.prototype.social_gift_count_telemetry=null;ClientTelemetryOmni.prototype.asset_bundle_telemetry=null;ClientTelemetryOmni.prototype.asset_poi_download_telemetry=null;ClientTelemetryOmni.prototype.asset_stream_download_telemetry=null;ClientTelemetryOmni.prototype.asset_stream_cache_culled_telemetry=null;ClientTelemetryOmni.prototype.rpc_socket_timing_telemetry=null;ClientTelemetryOmni.prototype.permissions_flow=null;ClientTelemetryOmni.prototype.device_service_toggle=null;ClientTelemetryOmni.prototype.boot_telemetry=null;ClientTelemetryOmni.prototype.user_attributes=null;ClientTelemetryOmni.prototype.onboarding_telemetry=null;ClientTelemetryOmni.prototype.login_action_telemetry=null;ClientTelemetryOmni.prototype.server_data=null;var $oneOfFields;Object.defineProperty(ClientTelemetryOmni.prototype,"TelemetryData",{get:$util.oneOfGetter($oneOfFields=["boot_time","frame_rate","generic_click_telemetry","map_events_telemetry","spin_pokestop_telemetry","profile_page_telemetry","shopping_page_telemetry","encounter_pokemon_telemetry","catch_pokemon_telemetry","deploy_pokemon_telemetry","feed_pokemon_telemetry","evolve_pokemon_telemetry","release_pokemon_telemetry","nickname_pokemon_telemetry","news_page_telemetry","item_telemetry","battle_party_telemetry","passcode_redeem_telemetry","link_login_telemetry","raid_telemetry","push_notification_telemetry","avatar_customization_telemetry","read_point_of_interest_description_telemetry","web_telemetry","change_ar_telemetry","weather_detail_click_telemetry","user_issue_weather_report","pokemon_inventory_telemetry","social_telemetry","check_encounter_info_telemetry","pokemon_go_plus_telemetry","rpc_timing_telemetry","social_gift_count_telemetry","asset_bundle_telemetry","asset_poi_download_telemetry","asset_stream_download_telemetry","asset_stream_cache_culled_telemetry","rpc_socket_timing_telemetry","permissions_flow","device_service_toggle","boot_telemetry","user_attributes","onboarding_telemetry","login_action_telemetry","server_data"]),set:$util.oneOfSetter($oneOfFields)});ClientTelemetryOmni.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.boot_time!=null&&m.hasOwnProperty("boot_time"))$root.POGOProtos.Data.Telemetry.BootTime.encode(m.boot_time,w.uint32(10).fork()).ldelim();if(m.frame_rate!=null&&m.hasOwnProperty("frame_rate"))$root.POGOProtos.Data.Telemetry.FrameRate.encode(m.frame_rate,w.uint32(18).fork()).ldelim();if(m.generic_click_telemetry!=null&&m.hasOwnProperty("generic_click_telemetry"))$root.POGOProtos.Data.Telemetry.GenericClickTelemetry.encode(m.generic_click_telemetry,w.uint32(26).fork()).ldelim();if(m.map_events_telemetry!=null&&m.hasOwnProperty("map_events_telemetry"))$root.POGOProtos.Data.Telemetry.MapEventsTelemetry.encode(m.map_events_telemetry,w.uint32(34).fork()).ldelim();if(m.spin_pokestop_telemetry!=null&&m.hasOwnProperty("spin_pokestop_telemetry"))$root.POGOProtos.Data.Telemetry.SpinPokestopTelemetry.encode(m.spin_pokestop_telemetry,w.uint32(42).fork()).ldelim();if(m.profile_page_telemetry!=null&&m.hasOwnProperty("profile_page_telemetry"))$root.POGOProtos.Data.Telemetry.ProfilePageTelemetry.encode(m.profile_page_telemetry,w.uint32(50).fork()).ldelim();if(m.shopping_page_telemetry!=null&&m.hasOwnProperty("shopping_page_telemetry"))$root.POGOProtos.Data.Telemetry.ShoppingPageTelemetry.encode(m.shopping_page_telemetry,w.uint32(58).fork()).ldelim();if(m.encounter_pokemon_telemetry!=null&&m.hasOwnProperty("encounter_pokemon_telemetry"))$root.POGOProtos.Data.Telemetry.EncounterPokemonTelemetry.encode(m.encounter_pokemon_telemetry,w.uint32(66).fork()).ldelim();if(m.catch_pokemon_telemetry!=null&&m.hasOwnProperty("catch_pokemon_telemetry"))$root.POGOProtos.Data.Telemetry.CatchPokemonTelemetry.encode(m.catch_pokemon_telemetry,w.uint32(74).fork()).ldelim();if(m.deploy_pokemon_telemetry!=null&&m.hasOwnProperty("deploy_pokemon_telemetry"))$root.POGOProtos.Data.Telemetry.DeployPokemonTelemetry.encode(m.deploy_pokemon_telemetry,w.uint32(82).fork()).ldelim();if(m.feed_pokemon_telemetry!=null&&m.hasOwnProperty("feed_pokemon_telemetry"))$root.POGOProtos.Data.Telemetry.FeedPokemonTelemetry.encode(m.feed_pokemon_telemetry,w.uint32(90).fork()).ldelim();if(m.evolve_pokemon_telemetry!=null&&m.hasOwnProperty("evolve_pokemon_telemetry"))$root.POGOProtos.Data.Telemetry.EvolvePokemonTelemetry.encode(m.evolve_pokemon_telemetry,w.uint32(98).fork()).ldelim();if(m.release_pokemon_telemetry!=null&&m.hasOwnProperty("release_pokemon_telemetry"))$root.POGOProtos.Data.Telemetry.ReleasePokemonTelemetry.encode(m.release_pokemon_telemetry,w.uint32(106).fork()).ldelim();if(m.nickname_pokemon_telemetry!=null&&m.hasOwnProperty("nickname_pokemon_telemetry"))$root.POGOProtos.Data.Telemetry.NicknamePokemonTelemetry.encode(m.nickname_pokemon_telemetry,w.uint32(114).fork()).ldelim();if(m.news_page_telemetry!=null&&m.hasOwnProperty("news_page_telemetry"))$root.POGOProtos.Data.Telemetry.NewsPageTelemetry.encode(m.news_page_telemetry,w.uint32(122).fork()).ldelim();if(m.item_telemetry!=null&&m.hasOwnProperty("item_telemetry"))$root.POGOProtos.Data.Telemetry.ItemTelemetry.encode(m.item_telemetry,w.uint32(130).fork()).ldelim();if(m.battle_party_telemetry!=null&&m.hasOwnProperty("battle_party_telemetry"))$root.POGOProtos.Data.Telemetry.BattlePartyTelemetry.encode(m.battle_party_telemetry,w.uint32(138).fork()).ldelim();if(m.passcode_redeem_telemetry!=null&&m.hasOwnProperty("passcode_redeem_telemetry"))$root.POGOProtos.Data.Telemetry.PasscodeRedeemTelemetry.encode(m.passcode_redeem_telemetry,w.uint32(146).fork()).ldelim();if(m.link_login_telemetry!=null&&m.hasOwnProperty("link_login_telemetry"))$root.POGOProtos.Data.Telemetry.LinkLoginTelemetry.encode(m.link_login_telemetry,w.uint32(154).fork()).ldelim();if(m.raid_telemetry!=null&&m.hasOwnProperty("raid_telemetry"))$root.POGOProtos.Data.Telemetry.RaidTelemetry.encode(m.raid_telemetry,w.uint32(162).fork()).ldelim();if(m.push_notification_telemetry!=null&&m.hasOwnProperty("push_notification_telemetry"))$root.POGOProtos.Data.Telemetry.PushNotificationTelemetry.encode(m.push_notification_telemetry,w.uint32(170).fork()).ldelim();if(m.avatar_customization_telemetry!=null&&m.hasOwnProperty("avatar_customization_telemetry"))$root.POGOProtos.Data.Telemetry.AvatarCustomizationTelemetry.encode(m.avatar_customization_telemetry,w.uint32(178).fork()).ldelim();if(m.read_point_of_interest_description_telemetry!=null&&m.hasOwnProperty("read_point_of_interest_description_telemetry"))$root.POGOProtos.Data.Telemetry.ReadPointOfInterestDescriptionTelemetry.encode(m.read_point_of_interest_description_telemetry,w.uint32(186).fork()).ldelim();if(m.web_telemetry!=null&&m.hasOwnProperty("web_telemetry"))$root.POGOProtos.Data.Telemetry.WebTelemetry.encode(m.web_telemetry,w.uint32(194).fork()).ldelim();if(m.change_ar_telemetry!=null&&m.hasOwnProperty("change_ar_telemetry"))$root.POGOProtos.Data.Telemetry.ChangeArTelemetry.encode(m.change_ar_telemetry,w.uint32(202).fork()).ldelim();if(m.weather_detail_click_telemetry!=null&&m.hasOwnProperty("weather_detail_click_telemetry"))$root.POGOProtos.Data.Telemetry.WeatherDetailClickTelemetry.encode(m.weather_detail_click_telemetry,w.uint32(210).fork()).ldelim();if(m.user_issue_weather_report!=null&&m.hasOwnProperty("user_issue_weather_report"))$root.POGOProtos.Data.Player.UserIssueWeatherReport.encode(m.user_issue_weather_report,w.uint32(218).fork()).ldelim();if(m.pokemon_inventory_telemetry!=null&&m.hasOwnProperty("pokemon_inventory_telemetry"))$root.POGOProtos.Data.Telemetry.PokemonInventoryTelemetry.encode(m.pokemon_inventory_telemetry,w.uint32(226).fork()).ldelim();if(m.social_telemetry!=null&&m.hasOwnProperty("social_telemetry"))$root.POGOProtos.Data.Telemetry.SocialTelemetry.encode(m.social_telemetry,w.uint32(234).fork()).ldelim();if(m.check_encounter_info_telemetry!=null&&m.hasOwnProperty("check_encounter_info_telemetry"))$root.POGOProtos.Data.Telemetry.CheckEncounterTrayInfoTelemetry.encode(m.check_encounter_info_telemetry,w.uint32(242).fork()).ldelim();if(m.pokemon_go_plus_telemetry!=null&&m.hasOwnProperty("pokemon_go_plus_telemetry"))$root.POGOProtos.Data.Telemetry.PokemonGoPlusTelemetry.encode(m.pokemon_go_plus_telemetry,w.uint32(250).fork()).ldelim();if(m.rpc_timing_telemetry!=null&&m.hasOwnProperty("rpc_timing_telemetry"))$root.POGOProtos.Data.Telemetry.RpcResponseTelemetry.encode(m.rpc_timing_telemetry,w.uint32(258).fork()).ldelim();if(m.social_gift_count_telemetry!=null&&m.hasOwnProperty("social_gift_count_telemetry"))$root.POGOProtos.Settings.SocialGiftCountTelemetry.encode(m.social_gift_count_telemetry,w.uint32(266).fork()).ldelim();if(m.asset_bundle_telemetry!=null&&m.hasOwnProperty("asset_bundle_telemetry"))$root.POGOProtos.Data.Telemetry.AssetBundleDownloadTelemetry.encode(m.asset_bundle_telemetry,w.uint32(274).fork()).ldelim();if(m.asset_poi_download_telemetry!=null&&m.hasOwnProperty("asset_poi_download_telemetry"))$root.POGOProtos.Data.Telemetry.AssetPoiDownloadTelemetry.encode(m.asset_poi_download_telemetry,w.uint32(282).fork()).ldelim();if(m.asset_stream_download_telemetry!=null&&m.hasOwnProperty("asset_stream_download_telemetry"))$root.POGOProtos.Data.Telemetry.AssetStreamDownloadTelemetry.encode(m.asset_stream_download_telemetry,w.uint32(290).fork()).ldelim();if(m.asset_stream_cache_culled_telemetry!=null&&m.hasOwnProperty("asset_stream_cache_culled_telemetry"))$root.POGOProtos.Data.Telemetry.AssetStreamCacheCulledTelemetry.encode(m.asset_stream_cache_culled_telemetry,w.uint32(298).fork()).ldelim();if(m.rpc_socket_timing_telemetry!=null&&m.hasOwnProperty("rpc_socket_timing_telemetry"))$root.POGOProtos.Data.Telemetry.RpcSocketResponseTelemetry.encode(m.rpc_socket_timing_telemetry,w.uint32(306).fork()).ldelim();if(m.permissions_flow!=null&&m.hasOwnProperty("permissions_flow"))$root.POGOProtos.Data.Telemetry.PermissionsFlowTelemetry.encode(m.permissions_flow,w.uint32(314).fork()).ldelim();if(m.device_service_toggle!=null&&m.hasOwnProperty("device_service_toggle"))$root.POGOProtos.Data.Telemetry.DeviceServiceToggleTelemetry.encode(m.device_service_toggle,w.uint32(322).fork()).ldelim();if(m.boot_telemetry!=null&&m.hasOwnProperty("boot_telemetry"))$root.POGOProtos.Data.Telemetry.BootTelemetry.encode(m.boot_telemetry,w.uint32(330).fork()).ldelim();if(m.user_attributes!=null&&m.hasOwnProperty("user_attributes"))$root.POGOProtos.Data.Player.UserAttributes.encode(m.user_attributes,w.uint32(338).fork()).ldelim();if(m.onboarding_telemetry!=null&&m.hasOwnProperty("onboarding_telemetry"))$root.POGOProtos.Data.Telemetry.OnboardingTelemetry.encode(m.onboarding_telemetry,w.uint32(346).fork()).ldelim();if(m.login_action_telemetry!=null&&m.hasOwnProperty("login_action_telemetry"))$root.POGOProtos.Data.Telemetry.LoginActionTelemetry.encode(m.login_action_telemetry,w.uint32(354).fork()).ldelim();if(m.server_data!=null&&m.hasOwnProperty("server_data"))$root.POGOProtos.Data.Telemetry.PlatformServerData.encode(m.server_data,w.uint32(8010).fork()).ldelim();return w};ClientTelemetryOmni.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.ClientTelemetryOmni;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.boot_time=$root.POGOProtos.Data.Telemetry.BootTime.decode(r,r.uint32());break;case 2:m.frame_rate=$root.POGOProtos.Data.Telemetry.FrameRate.decode(r,r.uint32());break;case 3:m.generic_click_telemetry=$root.POGOProtos.Data.Telemetry.GenericClickTelemetry.decode(r,r.uint32());break;case 4:m.map_events_telemetry=$root.POGOProtos.Data.Telemetry.MapEventsTelemetry.decode(r,r.uint32());break;case 5:m.spin_pokestop_telemetry=$root.POGOProtos.Data.Telemetry.SpinPokestopTelemetry.decode(r,r.uint32());break;case 6:m.profile_page_telemetry=$root.POGOProtos.Data.Telemetry.ProfilePageTelemetry.decode(r,r.uint32());break;case 7:m.shopping_page_telemetry=$root.POGOProtos.Data.Telemetry.ShoppingPageTelemetry.decode(r,r.uint32());break;case 8:m.encounter_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.EncounterPokemonTelemetry.decode(r,r.uint32());break;case 9:m.catch_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.CatchPokemonTelemetry.decode(r,r.uint32());break;case 10:m.deploy_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.DeployPokemonTelemetry.decode(r,r.uint32());break;case 11:m.feed_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.FeedPokemonTelemetry.decode(r,r.uint32());break;case 12:m.evolve_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.EvolvePokemonTelemetry.decode(r,r.uint32());break;case 13:m.release_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.ReleasePokemonTelemetry.decode(r,r.uint32());break;case 14:m.nickname_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.NicknamePokemonTelemetry.decode(r,r.uint32());break;case 15:m.news_page_telemetry=$root.POGOProtos.Data.Telemetry.NewsPageTelemetry.decode(r,r.uint32());break;case 16:m.item_telemetry=$root.POGOProtos.Data.Telemetry.ItemTelemetry.decode(r,r.uint32());break;case 17:m.battle_party_telemetry=$root.POGOProtos.Data.Telemetry.BattlePartyTelemetry.decode(r,r.uint32());break;case 18:m.passcode_redeem_telemetry=$root.POGOProtos.Data.Telemetry.PasscodeRedeemTelemetry.decode(r,r.uint32());break;case 19:m.link_login_telemetry=$root.POGOProtos.Data.Telemetry.LinkLoginTelemetry.decode(r,r.uint32());break;case 20:m.raid_telemetry=$root.POGOProtos.Data.Telemetry.RaidTelemetry.decode(r,r.uint32());break;case 21:m.push_notification_telemetry=$root.POGOProtos.Data.Telemetry.PushNotificationTelemetry.decode(r,r.uint32());break;case 22:m.avatar_customization_telemetry=$root.POGOProtos.Data.Telemetry.AvatarCustomizationTelemetry.decode(r,r.uint32());break;case 23:m.read_point_of_interest_description_telemetry=$root.POGOProtos.Data.Telemetry.ReadPointOfInterestDescriptionTelemetry.decode(r,r.uint32());break;case 24:m.web_telemetry=$root.POGOProtos.Data.Telemetry.WebTelemetry.decode(r,r.uint32());break;case 25:m.change_ar_telemetry=$root.POGOProtos.Data.Telemetry.ChangeArTelemetry.decode(r,r.uint32());break;case 26:m.weather_detail_click_telemetry=$root.POGOProtos.Data.Telemetry.WeatherDetailClickTelemetry.decode(r,r.uint32());break;case 27:m.user_issue_weather_report=$root.POGOProtos.Data.Player.UserIssueWeatherReport.decode(r,r.uint32());break;case 28:m.pokemon_inventory_telemetry=$root.POGOProtos.Data.Telemetry.PokemonInventoryTelemetry.decode(r,r.uint32());break;case 29:m.social_telemetry=$root.POGOProtos.Data.Telemetry.SocialTelemetry.decode(r,r.uint32());break;case 30:m.check_encounter_info_telemetry=$root.POGOProtos.Data.Telemetry.CheckEncounterTrayInfoTelemetry.decode(r,r.uint32());break;case 31:m.pokemon_go_plus_telemetry=$root.POGOProtos.Data.Telemetry.PokemonGoPlusTelemetry.decode(r,r.uint32());break;case 32:m.rpc_timing_telemetry=$root.POGOProtos.Data.Telemetry.RpcResponseTelemetry.decode(r,r.uint32());break;case 33:m.social_gift_count_telemetry=$root.POGOProtos.Settings.SocialGiftCountTelemetry.decode(r,r.uint32());break;case 34:m.asset_bundle_telemetry=$root.POGOProtos.Data.Telemetry.AssetBundleDownloadTelemetry.decode(r,r.uint32());break;case 35:m.asset_poi_download_telemetry=$root.POGOProtos.Data.Telemetry.AssetPoiDownloadTelemetry.decode(r,r.uint32());break;case 36:m.asset_stream_download_telemetry=$root.POGOProtos.Data.Telemetry.AssetStreamDownloadTelemetry.decode(r,r.uint32());break;case 37:m.asset_stream_cache_culled_telemetry=$root.POGOProtos.Data.Telemetry.AssetStreamCacheCulledTelemetry.decode(r,r.uint32());break;case 38:m.rpc_socket_timing_telemetry=$root.POGOProtos.Data.Telemetry.RpcSocketResponseTelemetry.decode(r,r.uint32());break;case 39:m.permissions_flow=$root.POGOProtos.Data.Telemetry.PermissionsFlowTelemetry.decode(r,r.uint32());break;case 40:m.device_service_toggle=$root.POGOProtos.Data.Telemetry.DeviceServiceToggleTelemetry.decode(r,r.uint32());break;case 41:m.boot_telemetry=$root.POGOProtos.Data.Telemetry.BootTelemetry.decode(r,r.uint32());break;case 42:m.user_attributes=$root.POGOProtos.Data.Player.UserAttributes.decode(r,r.uint32());break;case 43:m.onboarding_telemetry=$root.POGOProtos.Data.Telemetry.OnboardingTelemetry.decode(r,r.uint32());break;case 44:m.login_action_telemetry=$root.POGOProtos.Data.Telemetry.LoginActionTelemetry.decode(r,r.uint32());break;case 1001:m.server_data=$root.POGOProtos.Data.Telemetry.PlatformServerData.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};ClientTelemetryOmni.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.ClientTelemetryOmni)return d;var m=new $root.POGOProtos.Data.Telemetry.ClientTelemetryOmni;if(d.boot_time!=null){if(typeof d.boot_time!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.boot_time: object expected");m.boot_time=$root.POGOProtos.Data.Telemetry.BootTime.fromObject(d.boot_time)}if(d.frame_rate!=null){if(typeof d.frame_rate!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.frame_rate: object expected");m.frame_rate=$root.POGOProtos.Data.Telemetry.FrameRate.fromObject(d.frame_rate)}if(d.generic_click_telemetry!=null){if(typeof d.generic_click_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.generic_click_telemetry: object expected");m.generic_click_telemetry=$root.POGOProtos.Data.Telemetry.GenericClickTelemetry.fromObject(d.generic_click_telemetry)}if(d.map_events_telemetry!=null){if(typeof d.map_events_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.map_events_telemetry: object expected");m.map_events_telemetry=$root.POGOProtos.Data.Telemetry.MapEventsTelemetry.fromObject(d.map_events_telemetry)}if(d.spin_pokestop_telemetry!=null){if(typeof d.spin_pokestop_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.spin_pokestop_telemetry: object expected");m.spin_pokestop_telemetry=$root.POGOProtos.Data.Telemetry.SpinPokestopTelemetry.fromObject(d.spin_pokestop_telemetry)}if(d.profile_page_telemetry!=null){if(typeof d.profile_page_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.profile_page_telemetry: object expected");m.profile_page_telemetry=$root.POGOProtos.Data.Telemetry.ProfilePageTelemetry.fromObject(d.profile_page_telemetry)}if(d.shopping_page_telemetry!=null){if(typeof d.shopping_page_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.shopping_page_telemetry: object expected");m.shopping_page_telemetry=$root.POGOProtos.Data.Telemetry.ShoppingPageTelemetry.fromObject(d.shopping_page_telemetry)}if(d.encounter_pokemon_telemetry!=null){if(typeof d.encounter_pokemon_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.encounter_pokemon_telemetry: object expected");m.encounter_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.EncounterPokemonTelemetry.fromObject(d.encounter_pokemon_telemetry)}if(d.catch_pokemon_telemetry!=null){if(typeof d.catch_pokemon_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.catch_pokemon_telemetry: object expected");m.catch_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.CatchPokemonTelemetry.fromObject(d.catch_pokemon_telemetry)}if(d.deploy_pokemon_telemetry!=null){if(typeof d.deploy_pokemon_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.deploy_pokemon_telemetry: object expected");m.deploy_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.DeployPokemonTelemetry.fromObject(d.deploy_pokemon_telemetry)}if(d.feed_pokemon_telemetry!=null){if(typeof d.feed_pokemon_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.feed_pokemon_telemetry: object expected");m.feed_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.FeedPokemonTelemetry.fromObject(d.feed_pokemon_telemetry)}if(d.evolve_pokemon_telemetry!=null){if(typeof d.evolve_pokemon_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.evolve_pokemon_telemetry: object expected");m.evolve_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.EvolvePokemonTelemetry.fromObject(d.evolve_pokemon_telemetry)}if(d.release_pokemon_telemetry!=null){if(typeof d.release_pokemon_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.release_pokemon_telemetry: object expected");m.release_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.ReleasePokemonTelemetry.fromObject(d.release_pokemon_telemetry)}if(d.nickname_pokemon_telemetry!=null){if(typeof d.nickname_pokemon_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.nickname_pokemon_telemetry: object expected");m.nickname_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.NicknamePokemonTelemetry.fromObject(d.nickname_pokemon_telemetry)}if(d.news_page_telemetry!=null){if(typeof d.news_page_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.news_page_telemetry: object expected");m.news_page_telemetry=$root.POGOProtos.Data.Telemetry.NewsPageTelemetry.fromObject(d.news_page_telemetry)}if(d.item_telemetry!=null){if(typeof d.item_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.item_telemetry: object expected");m.item_telemetry=$root.POGOProtos.Data.Telemetry.ItemTelemetry.fromObject(d.item_telemetry)}if(d.battle_party_telemetry!=null){if(typeof d.battle_party_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.battle_party_telemetry: object expected");m.battle_party_telemetry=$root.POGOProtos.Data.Telemetry.BattlePartyTelemetry.fromObject(d.battle_party_telemetry)}if(d.passcode_redeem_telemetry!=null){if(typeof d.passcode_redeem_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.passcode_redeem_telemetry: object expected");m.passcode_redeem_telemetry=$root.POGOProtos.Data.Telemetry.PasscodeRedeemTelemetry.fromObject(d.passcode_redeem_telemetry)}if(d.link_login_telemetry!=null){if(typeof d.link_login_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.link_login_telemetry: object expected");m.link_login_telemetry=$root.POGOProtos.Data.Telemetry.LinkLoginTelemetry.fromObject(d.link_login_telemetry)}if(d.raid_telemetry!=null){if(typeof d.raid_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.raid_telemetry: object expected");m.raid_telemetry=$root.POGOProtos.Data.Telemetry.RaidTelemetry.fromObject(d.raid_telemetry)}if(d.push_notification_telemetry!=null){if(typeof d.push_notification_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.push_notification_telemetry: object expected");m.push_notification_telemetry=$root.POGOProtos.Data.Telemetry.PushNotificationTelemetry.fromObject(d.push_notification_telemetry)}if(d.avatar_customization_telemetry!=null){if(typeof d.avatar_customization_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.avatar_customization_telemetry: object expected");m.avatar_customization_telemetry=$root.POGOProtos.Data.Telemetry.AvatarCustomizationTelemetry.fromObject(d.avatar_customization_telemetry)}if(d.read_point_of_interest_description_telemetry!=null){if(typeof d.read_point_of_interest_description_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.read_point_of_interest_description_telemetry: object expected");m.read_point_of_interest_description_telemetry=$root.POGOProtos.Data.Telemetry.ReadPointOfInterestDescriptionTelemetry.fromObject(d.read_point_of_interest_description_telemetry)}if(d.web_telemetry!=null){if(typeof d.web_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.web_telemetry: object expected");m.web_telemetry=$root.POGOProtos.Data.Telemetry.WebTelemetry.fromObject(d.web_telemetry)}if(d.change_ar_telemetry!=null){if(typeof d.change_ar_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.change_ar_telemetry: object expected");m.change_ar_telemetry=$root.POGOProtos.Data.Telemetry.ChangeArTelemetry.fromObject(d.change_ar_telemetry)}if(d.weather_detail_click_telemetry!=null){if(typeof d.weather_detail_click_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.weather_detail_click_telemetry: object expected");m.weather_detail_click_telemetry=$root.POGOProtos.Data.Telemetry.WeatherDetailClickTelemetry.fromObject(d.weather_detail_click_telemetry)}if(d.user_issue_weather_report!=null){if(typeof d.user_issue_weather_report!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.user_issue_weather_report: object expected");m.user_issue_weather_report=$root.POGOProtos.Data.Player.UserIssueWeatherReport.fromObject(d.user_issue_weather_report)}if(d.pokemon_inventory_telemetry!=null){if(typeof d.pokemon_inventory_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.pokemon_inventory_telemetry: object expected");m.pokemon_inventory_telemetry=$root.POGOProtos.Data.Telemetry.PokemonInventoryTelemetry.fromObject(d.pokemon_inventory_telemetry)}if(d.social_telemetry!=null){if(typeof d.social_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.social_telemetry: object expected");m.social_telemetry=$root.POGOProtos.Data.Telemetry.SocialTelemetry.fromObject(d.social_telemetry)}if(d.check_encounter_info_telemetry!=null){if(typeof d.check_encounter_info_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.check_encounter_info_telemetry: object expected");m.check_encounter_info_telemetry=$root.POGOProtos.Data.Telemetry.CheckEncounterTrayInfoTelemetry.fromObject(d.check_encounter_info_telemetry)}if(d.pokemon_go_plus_telemetry!=null){if(typeof d.pokemon_go_plus_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.pokemon_go_plus_telemetry: object expected");m.pokemon_go_plus_telemetry=$root.POGOProtos.Data.Telemetry.PokemonGoPlusTelemetry.fromObject(d.pokemon_go_plus_telemetry)}if(d.rpc_timing_telemetry!=null){if(typeof d.rpc_timing_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.rpc_timing_telemetry: object expected");m.rpc_timing_telemetry=$root.POGOProtos.Data.Telemetry.RpcResponseTelemetry.fromObject(d.rpc_timing_telemetry)}if(d.social_gift_count_telemetry!=null){if(typeof d.social_gift_count_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.social_gift_count_telemetry: object expected");m.social_gift_count_telemetry=$root.POGOProtos.Settings.SocialGiftCountTelemetry.fromObject(d.social_gift_count_telemetry)}if(d.asset_bundle_telemetry!=null){if(typeof d.asset_bundle_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.asset_bundle_telemetry: object expected");m.asset_bundle_telemetry=$root.POGOProtos.Data.Telemetry.AssetBundleDownloadTelemetry.fromObject(d.asset_bundle_telemetry)}if(d.asset_poi_download_telemetry!=null){if(typeof d.asset_poi_download_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.asset_poi_download_telemetry: object expected");m.asset_poi_download_telemetry=$root.POGOProtos.Data.Telemetry.AssetPoiDownloadTelemetry.fromObject(d.asset_poi_download_telemetry)}if(d.asset_stream_download_telemetry!=null){if(typeof d.asset_stream_download_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.asset_stream_download_telemetry: object expected");m.asset_stream_download_telemetry=$root.POGOProtos.Data.Telemetry.AssetStreamDownloadTelemetry.fromObject(d.asset_stream_download_telemetry)}if(d.asset_stream_cache_culled_telemetry!=null){if(typeof d.asset_stream_cache_culled_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.asset_stream_cache_culled_telemetry: object expected");m.asset_stream_cache_culled_telemetry=$root.POGOProtos.Data.Telemetry.AssetStreamCacheCulledTelemetry.fromObject(d.asset_stream_cache_culled_telemetry)}if(d.rpc_socket_timing_telemetry!=null){if(typeof d.rpc_socket_timing_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.rpc_socket_timing_telemetry: object expected");m.rpc_socket_timing_telemetry=$root.POGOProtos.Data.Telemetry.RpcSocketResponseTelemetry.fromObject(d.rpc_socket_timing_telemetry)}if(d.permissions_flow!=null){if(typeof d.permissions_flow!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.permissions_flow: object expected");m.permissions_flow=$root.POGOProtos.Data.Telemetry.PermissionsFlowTelemetry.fromObject(d.permissions_flow)}if(d.device_service_toggle!=null){if(typeof d.device_service_toggle!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.device_service_toggle: object expected");m.device_service_toggle=$root.POGOProtos.Data.Telemetry.DeviceServiceToggleTelemetry.fromObject(d.device_service_toggle)}if(d.boot_telemetry!=null){if(typeof d.boot_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.boot_telemetry: object expected");m.boot_telemetry=$root.POGOProtos.Data.Telemetry.BootTelemetry.fromObject(d.boot_telemetry)}if(d.user_attributes!=null){if(typeof d.user_attributes!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.user_attributes: object expected");m.user_attributes=$root.POGOProtos.Data.Player.UserAttributes.fromObject(d.user_attributes)}if(d.onboarding_telemetry!=null){if(typeof d.onboarding_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.onboarding_telemetry: object expected");m.onboarding_telemetry=$root.POGOProtos.Data.Telemetry.OnboardingTelemetry.fromObject(d.onboarding_telemetry)}if(d.login_action_telemetry!=null){if(typeof d.login_action_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.login_action_telemetry: object expected");m.login_action_telemetry=$root.POGOProtos.Data.Telemetry.LoginActionTelemetry.fromObject(d.login_action_telemetry)}if(d.server_data!=null){if(typeof d.server_data!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ClientTelemetryOmni.server_data: object expected");m.server_data=$root.POGOProtos.Data.Telemetry.PlatformServerData.fromObject(d.server_data)}return m};ClientTelemetryOmni.toObject=function toObject(m,o){if(!o)o={};var d={};if(m.boot_time!=null&&m.hasOwnProperty("boot_time")){d.boot_time=$root.POGOProtos.Data.Telemetry.BootTime.toObject(m.boot_time,o);if(o.oneofs)d.TelemetryData="boot_time"}if(m.frame_rate!=null&&m.hasOwnProperty("frame_rate")){d.frame_rate=$root.POGOProtos.Data.Telemetry.FrameRate.toObject(m.frame_rate,o);if(o.oneofs)d.TelemetryData="frame_rate"}if(m.generic_click_telemetry!=null&&m.hasOwnProperty("generic_click_telemetry")){d.generic_click_telemetry=$root.POGOProtos.Data.Telemetry.GenericClickTelemetry.toObject(m.generic_click_telemetry,o);if(o.oneofs)d.TelemetryData="generic_click_telemetry"}if(m.map_events_telemetry!=null&&m.hasOwnProperty("map_events_telemetry")){d.map_events_telemetry=$root.POGOProtos.Data.Telemetry.MapEventsTelemetry.toObject(m.map_events_telemetry,o);if(o.oneofs)d.TelemetryData="map_events_telemetry"}if(m.spin_pokestop_telemetry!=null&&m.hasOwnProperty("spin_pokestop_telemetry")){d.spin_pokestop_telemetry=$root.POGOProtos.Data.Telemetry.SpinPokestopTelemetry.toObject(m.spin_pokestop_telemetry,o);if(o.oneofs)d.TelemetryData="spin_pokestop_telemetry"}if(m.profile_page_telemetry!=null&&m.hasOwnProperty("profile_page_telemetry")){d.profile_page_telemetry=$root.POGOProtos.Data.Telemetry.ProfilePageTelemetry.toObject(m.profile_page_telemetry,o);if(o.oneofs)d.TelemetryData="profile_page_telemetry"}if(m.shopping_page_telemetry!=null&&m.hasOwnProperty("shopping_page_telemetry")){d.shopping_page_telemetry=$root.POGOProtos.Data.Telemetry.ShoppingPageTelemetry.toObject(m.shopping_page_telemetry,o);if(o.oneofs)d.TelemetryData="shopping_page_telemetry"}if(m.encounter_pokemon_telemetry!=null&&m.hasOwnProperty("encounter_pokemon_telemetry")){d.encounter_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.EncounterPokemonTelemetry.toObject(m.encounter_pokemon_telemetry,o);if(o.oneofs)d.TelemetryData="encounter_pokemon_telemetry"}if(m.catch_pokemon_telemetry!=null&&m.hasOwnProperty("catch_pokemon_telemetry")){d.catch_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.CatchPokemonTelemetry.toObject(m.catch_pokemon_telemetry,o);if(o.oneofs)d.TelemetryData="catch_pokemon_telemetry"}if(m.deploy_pokemon_telemetry!=null&&m.hasOwnProperty("deploy_pokemon_telemetry")){d.deploy_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.DeployPokemonTelemetry.toObject(m.deploy_pokemon_telemetry,o);if(o.oneofs)d.TelemetryData="deploy_pokemon_telemetry"}if(m.feed_pokemon_telemetry!=null&&m.hasOwnProperty("feed_pokemon_telemetry")){d.feed_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.FeedPokemonTelemetry.toObject(m.feed_pokemon_telemetry,o);if(o.oneofs)d.TelemetryData="feed_pokemon_telemetry"}if(m.evolve_pokemon_telemetry!=null&&m.hasOwnProperty("evolve_pokemon_telemetry")){d.evolve_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.EvolvePokemonTelemetry.toObject(m.evolve_pokemon_telemetry,o);if(o.oneofs)d.TelemetryData="evolve_pokemon_telemetry"}if(m.release_pokemon_telemetry!=null&&m.hasOwnProperty("release_pokemon_telemetry")){d.release_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.ReleasePokemonTelemetry.toObject(m.release_pokemon_telemetry,o);if(o.oneofs)d.TelemetryData="release_pokemon_telemetry"}if(m.nickname_pokemon_telemetry!=null&&m.hasOwnProperty("nickname_pokemon_telemetry")){d.nickname_pokemon_telemetry=$root.POGOProtos.Data.Telemetry.NicknamePokemonTelemetry.toObject(m.nickname_pokemon_telemetry,o);if(o.oneofs)d.TelemetryData="nickname_pokemon_telemetry"}if(m.news_page_telemetry!=null&&m.hasOwnProperty("news_page_telemetry")){d.news_page_telemetry=$root.POGOProtos.Data.Telemetry.NewsPageTelemetry.toObject(m.news_page_telemetry,o);if(o.oneofs)d.TelemetryData="news_page_telemetry"}if(m.item_telemetry!=null&&m.hasOwnProperty("item_telemetry")){d.item_telemetry=$root.POGOProtos.Data.Telemetry.ItemTelemetry.toObject(m.item_telemetry,o);if(o.oneofs)d.TelemetryData="item_telemetry"}if(m.battle_party_telemetry!=null&&m.hasOwnProperty("battle_party_telemetry")){d.battle_party_telemetry=$root.POGOProtos.Data.Telemetry.BattlePartyTelemetry.toObject(m.battle_party_telemetry,o);if(o.oneofs)d.TelemetryData="battle_party_telemetry"}if(m.passcode_redeem_telemetry!=null&&m.hasOwnProperty("passcode_redeem_telemetry")){d.passcode_redeem_telemetry=$root.POGOProtos.Data.Telemetry.PasscodeRedeemTelemetry.toObject(m.passcode_redeem_telemetry,o);if(o.oneofs)d.TelemetryData="passcode_redeem_telemetry"}if(m.link_login_telemetry!=null&&m.hasOwnProperty("link_login_telemetry")){d.link_login_telemetry=$root.POGOProtos.Data.Telemetry.LinkLoginTelemetry.toObject(m.link_login_telemetry,o);if(o.oneofs)d.TelemetryData="link_login_telemetry"}if(m.raid_telemetry!=null&&m.hasOwnProperty("raid_telemetry")){d.raid_telemetry=$root.POGOProtos.Data.Telemetry.RaidTelemetry.toObject(m.raid_telemetry,o);if(o.oneofs)d.TelemetryData="raid_telemetry"}if(m.push_notification_telemetry!=null&&m.hasOwnProperty("push_notification_telemetry")){d.push_notification_telemetry=$root.POGOProtos.Data.Telemetry.PushNotificationTelemetry.toObject(m.push_notification_telemetry,o);if(o.oneofs)d.TelemetryData="push_notification_telemetry"}if(m.avatar_customization_telemetry!=null&&m.hasOwnProperty("avatar_customization_telemetry")){d.avatar_customization_telemetry=$root.POGOProtos.Data.Telemetry.AvatarCustomizationTelemetry.toObject(m.avatar_customization_telemetry,o);if(o.oneofs)d.TelemetryData="avatar_customization_telemetry"}if(m.read_point_of_interest_description_telemetry!=null&&m.hasOwnProperty("read_point_of_interest_description_telemetry")){d.read_point_of_interest_description_telemetry=$root.POGOProtos.Data.Telemetry.ReadPointOfInterestDescriptionTelemetry.toObject(m.read_point_of_interest_description_telemetry,o);if(o.oneofs)d.TelemetryData="read_point_of_interest_description_telemetry"}if(m.web_telemetry!=null&&m.hasOwnProperty("web_telemetry")){d.web_telemetry=$root.POGOProtos.Data.Telemetry.WebTelemetry.toObject(m.web_telemetry,o);if(o.oneofs)d.TelemetryData="web_telemetry"}if(m.change_ar_telemetry!=null&&m.hasOwnProperty("change_ar_telemetry")){d.change_ar_telemetry=$root.POGOProtos.Data.Telemetry.ChangeArTelemetry.toObject(m.change_ar_telemetry,o);if(o.oneofs)d.TelemetryData="change_ar_telemetry"}if(m.weather_detail_click_telemetry!=null&&m.hasOwnProperty("weather_detail_click_telemetry")){d.weather_detail_click_telemetry=$root.POGOProtos.Data.Telemetry.WeatherDetailClickTelemetry.toObject(m.weather_detail_click_telemetry,o);if(o.oneofs)d.TelemetryData="weather_detail_click_telemetry"}if(m.user_issue_weather_report!=null&&m.hasOwnProperty("user_issue_weather_report")){d.user_issue_weather_report=$root.POGOProtos.Data.Player.UserIssueWeatherReport.toObject(m.user_issue_weather_report,o);if(o.oneofs)d.TelemetryData="user_issue_weather_report"}if(m.pokemon_inventory_telemetry!=null&&m.hasOwnProperty("pokemon_inventory_telemetry")){d.pokemon_inventory_telemetry=$root.POGOProtos.Data.Telemetry.PokemonInventoryTelemetry.toObject(m.pokemon_inventory_telemetry,o);if(o.oneofs)d.TelemetryData="pokemon_inventory_telemetry"}if(m.social_telemetry!=null&&m.hasOwnProperty("social_telemetry")){d.social_telemetry=$root.POGOProtos.Data.Telemetry.SocialTelemetry.toObject(m.social_telemetry,o);if(o.oneofs)d.TelemetryData="social_telemetry"}if(m.check_encounter_info_telemetry!=null&&m.hasOwnProperty("check_encounter_info_telemetry")){d.check_encounter_info_telemetry=$root.POGOProtos.Data.Telemetry.CheckEncounterTrayInfoTelemetry.toObject(m.check_encounter_info_telemetry,o);if(o.oneofs)d.TelemetryData="check_encounter_info_telemetry"}if(m.pokemon_go_plus_telemetry!=null&&m.hasOwnProperty("pokemon_go_plus_telemetry")){d.pokemon_go_plus_telemetry=$root.POGOProtos.Data.Telemetry.PokemonGoPlusTelemetry.toObject(m.pokemon_go_plus_telemetry,o);if(o.oneofs)d.TelemetryData="pokemon_go_plus_telemetry"}if(m.rpc_timing_telemetry!=null&&m.hasOwnProperty("rpc_timing_telemetry")){d.rpc_timing_telemetry=$root.POGOProtos.Data.Telemetry.RpcResponseTelemetry.toObject(m.rpc_timing_telemetry,o);if(o.oneofs)d.TelemetryData="rpc_timing_telemetry"}if(m.social_gift_count_telemetry!=null&&m.hasOwnProperty("social_gift_count_telemetry")){d.social_gift_count_telemetry=$root.POGOProtos.Settings.SocialGiftCountTelemetry.toObject(m.social_gift_count_telemetry,o);if(o.oneofs)d.TelemetryData="social_gift_count_telemetry"}if(m.asset_bundle_telemetry!=null&&m.hasOwnProperty("asset_bundle_telemetry")){d.asset_bundle_telemetry=$root.POGOProtos.Data.Telemetry.AssetBundleDownloadTelemetry.toObject(m.asset_bundle_telemetry,o);if(o.oneofs)d.TelemetryData="asset_bundle_telemetry"}if(m.asset_poi_download_telemetry!=null&&m.hasOwnProperty("asset_poi_download_telemetry")){d.asset_poi_download_telemetry=$root.POGOProtos.Data.Telemetry.AssetPoiDownloadTelemetry.toObject(m.asset_poi_download_telemetry,o);if(o.oneofs)d.TelemetryData="asset_poi_download_telemetry"}if(m.asset_stream_download_telemetry!=null&&m.hasOwnProperty("asset_stream_download_telemetry")){d.asset_stream_download_telemetry=$root.POGOProtos.Data.Telemetry.AssetStreamDownloadTelemetry.toObject(m.asset_stream_download_telemetry,o);if(o.oneofs)d.TelemetryData="asset_stream_download_telemetry"}if(m.asset_stream_cache_culled_telemetry!=null&&m.hasOwnProperty("asset_stream_cache_culled_telemetry")){d.asset_stream_cache_culled_telemetry=$root.POGOProtos.Data.Telemetry.AssetStreamCacheCulledTelemetry.toObject(m.asset_stream_cache_culled_telemetry,o);if(o.oneofs)d.TelemetryData="asset_stream_cache_culled_telemetry"}if(m.rpc_socket_timing_telemetry!=null&&m.hasOwnProperty("rpc_socket_timing_telemetry")){d.rpc_socket_timing_telemetry=$root.POGOProtos.Data.Telemetry.RpcSocketResponseTelemetry.toObject(m.rpc_socket_timing_telemetry,o);if(o.oneofs)d.TelemetryData="rpc_socket_timing_telemetry"}if(m.permissions_flow!=null&&m.hasOwnProperty("permissions_flow")){d.permissions_flow=$root.POGOProtos.Data.Telemetry.PermissionsFlowTelemetry.toObject(m.permissions_flow,o);if(o.oneofs)d.TelemetryData="permissions_flow"}if(m.device_service_toggle!=null&&m.hasOwnProperty("device_service_toggle")){d.device_service_toggle=$root.POGOProtos.Data.Telemetry.DeviceServiceToggleTelemetry.toObject(m.device_service_toggle,o);if(o.oneofs)d.TelemetryData="device_service_toggle"}if(m.boot_telemetry!=null&&m.hasOwnProperty("boot_telemetry")){d.boot_telemetry=$root.POGOProtos.Data.Telemetry.BootTelemetry.toObject(m.boot_telemetry,o);if(o.oneofs)d.TelemetryData="boot_telemetry"}if(m.user_attributes!=null&&m.hasOwnProperty("user_attributes")){d.user_attributes=$root.POGOProtos.Data.Player.UserAttributes.toObject(m.user_attributes,o);if(o.oneofs)d.TelemetryData="user_attributes"}if(m.onboarding_telemetry!=null&&m.hasOwnProperty("onboarding_telemetry")){d.onboarding_telemetry=$root.POGOProtos.Data.Telemetry.OnboardingTelemetry.toObject(m.onboarding_telemetry,o);if(o.oneofs)d.TelemetryData="onboarding_telemetry"}if(m.login_action_telemetry!=null&&m.hasOwnProperty("login_action_telemetry")){d.login_action_telemetry=$root.POGOProtos.Data.Telemetry.LoginActionTelemetry.toObject(m.login_action_telemetry,o);if(o.oneofs)d.TelemetryData="login_action_telemetry"}if(m.server_data!=null&&m.hasOwnProperty("server_data")){d.server_data=$root.POGOProtos.Data.Telemetry.PlatformServerData.toObject(m.server_data,o);if(o.oneofs)d.TelemetryData="server_data"}return d};ClientTelemetryOmni.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ClientTelemetryOmni}();Telemetry.DeployPokemonTelemetry=function(){function DeployPokemonTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DeployPokemonTelemetry.prototype.status=0;DeployPokemonTelemetry.prototype.pokemon=null;DeployPokemonTelemetry.prototype.gym_id="";DeployPokemonTelemetry.prototype.team=0;DeployPokemonTelemetry.prototype.defender_count=0;DeployPokemonTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.pokemon!=null&&m.hasOwnProperty("pokemon"))$root.POGOProtos.Data.Telemetry.PokemonTelemetry.encode(m.pokemon,w.uint32(18).fork()).ldelim();if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(26).string(m.gym_id);if(m.team!=null&&m.hasOwnProperty("team"))w.uint32(32).int32(m.team);if(m.defender_count!=null&&m.hasOwnProperty("defender_count"))w.uint32(40).int32(m.defender_count);return w};DeployPokemonTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.DeployPokemonTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.decode(r,r.uint32());break;case 3:m.gym_id=r.string();break;case 4:m.team=r.int32();break;case 5:m.defender_count=r.int32();break;default:r.skipType(t&7);break}}return m};DeployPokemonTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.DeployPokemonTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.DeployPokemonTelemetry;if(d.status!=null){m.status=d.status|0}if(d.pokemon!=null){if(typeof d.pokemon!=="object")throw TypeError(".POGOProtos.Data.Telemetry.DeployPokemonTelemetry.pokemon: object expected");m.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.fromObject(d.pokemon)}if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.team!=null){m.team=d.team|0}if(d.defender_count!=null){m.defender_count=d.defender_count|0}return m};DeployPokemonTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=0;d.pokemon=null;d.gym_id="";d.team=0;d.defender_count=0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=m.status}if(m.pokemon!=null&&m.hasOwnProperty("pokemon")){d.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.toObject(m.pokemon,o)}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.team!=null&&m.hasOwnProperty("team")){d.team=m.team}if(m.defender_count!=null&&m.hasOwnProperty("defender_count")){d.defender_count=m.defender_count}return d};DeployPokemonTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DeployPokemonTelemetry}();Telemetry.DeviceServiceToggleTelemetry=function(){function DeviceServiceToggleTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DeviceServiceToggleTelemetry.prototype.device_service_telemetry_id=0;DeviceServiceToggleTelemetry.prototype.was_enabled=false;DeviceServiceToggleTelemetry.prototype.was_subsequent=false;DeviceServiceToggleTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.device_service_telemetry_id!=null&&m.hasOwnProperty("device_service_telemetry_id"))w.uint32(8).int32(m.device_service_telemetry_id);if(m.was_enabled!=null&&m.hasOwnProperty("was_enabled"))w.uint32(16).bool(m.was_enabled);if(m.was_subsequent!=null&&m.hasOwnProperty("was_subsequent"))w.uint32(24).bool(m.was_subsequent);return w};DeviceServiceToggleTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.DeviceServiceToggleTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.device_service_telemetry_id=r.int32();break;case 2:m.was_enabled=r.bool();break;case 3:m.was_subsequent=r.bool();break;default:r.skipType(t&7);break}}return m};DeviceServiceToggleTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.DeviceServiceToggleTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.DeviceServiceToggleTelemetry;switch(d.device_service_telemetry_id){case"UNDEFINED_DEVICE_SERVICE":case 0:m.device_service_telemetry_id=0;break;case"FITNESS":case 1:m.device_service_telemetry_id=1;break;case"SMART_WATCH":case 2:m.device_service_telemetry_id=2;break;case"SFIDA_DEVICE_SERVICE":case 3:m.device_service_telemetry_id=3;break}if(d.was_enabled!=null){m.was_enabled=Boolean(d.was_enabled)}if(d.was_subsequent!=null){m.was_subsequent=Boolean(d.was_subsequent)}return m};DeviceServiceToggleTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.device_service_telemetry_id=o.enums===String?"UNDEFINED_DEVICE_SERVICE":0;d.was_enabled=false;d.was_subsequent=false}if(m.device_service_telemetry_id!=null&&m.hasOwnProperty("device_service_telemetry_id")){d.device_service_telemetry_id=o.enums===String?$root.POGOProtos.Enums.DeviceServiceTelemetryIds[m.device_service_telemetry_id]:m.device_service_telemetry_id}if(m.was_enabled!=null&&m.hasOwnProperty("was_enabled")){d.was_enabled=m.was_enabled}if(m.was_subsequent!=null&&m.hasOwnProperty("was_subsequent")){d.was_subsequent=m.was_subsequent}return d};DeviceServiceToggleTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DeviceServiceToggleTelemetry}();Telemetry.Distribution=function(){function Distribution(p){this.bucket_counts=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Distribution.prototype.count=$util.Long?$util.Long.fromBits(0,0,false):0;Distribution.prototype.mean=0;Distribution.prototype.sum_of_squared_deviation=0;Distribution.prototype.range=null;Distribution.prototype.bucket_options=null;Distribution.prototype.bucket_counts=$util.emptyArray;Distribution.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.count!=null&&m.hasOwnProperty("count"))w.uint32(8).int64(m.count);if(m.mean!=null&&m.hasOwnProperty("mean"))w.uint32(21).float(m.mean);if(m.sum_of_squared_deviation!=null&&m.hasOwnProperty("sum_of_squared_deviation"))w.uint32(25).double(m.sum_of_squared_deviation);if(m.range!=null&&m.hasOwnProperty("range"))$root.POGOProtos.Data.Telemetry.Distribution.Range.encode(m.range,w.uint32(34).fork()).ldelim();if(m.bucket_options!=null&&m.hasOwnProperty("bucket_options"))$root.POGOProtos.Data.Telemetry.Distribution.BucketOptions.encode(m.bucket_options,w.uint32(42).fork()).ldelim();if(m.bucket_counts!=null&&m.bucket_counts.length){w.uint32(50).fork();for(var i=0;i<m.bucket_counts.length;++i)w.int64(m.bucket_counts[i]);w.ldelim()}return w};Distribution.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.Distribution;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.count=r.int64();break;case 2:m.mean=r.float();break;case 3:m.sum_of_squared_deviation=r.double();break;case 4:m.range=$root.POGOProtos.Data.Telemetry.Distribution.Range.decode(r,r.uint32());break;case 5:m.bucket_options=$root.POGOProtos.Data.Telemetry.Distribution.BucketOptions.decode(r,r.uint32());break;case 6:if(!(m.bucket_counts&&m.bucket_counts.length))m.bucket_counts=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.bucket_counts.push(r.int64())}else m.bucket_counts.push(r.int64());break;default:r.skipType(t&7);break}}return m};Distribution.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.Distribution)return d;var m=new $root.POGOProtos.Data.Telemetry.Distribution;if(d.count!=null){if($util.Long)(m.count=$util.Long.fromValue(d.count)).unsigned=false;else if(typeof d.count==="string")m.count=parseInt(d.count,10);else if(typeof d.count==="number")m.count=d.count;else if(typeof d.count==="object")m.count=new $util.LongBits(d.count.low>>>0,d.count.high>>>0).toNumber()}if(d.mean!=null){m.mean=Number(d.mean)}if(d.sum_of_squared_deviation!=null){m.sum_of_squared_deviation=Number(d.sum_of_squared_deviation)}if(d.range!=null){if(typeof d.range!=="object")throw TypeError(".POGOProtos.Data.Telemetry.Distribution.range: object expected");m.range=$root.POGOProtos.Data.Telemetry.Distribution.Range.fromObject(d.range)}if(d.bucket_options!=null){if(typeof d.bucket_options!=="object")throw TypeError(".POGOProtos.Data.Telemetry.Distribution.bucket_options: object expected");m.bucket_options=$root.POGOProtos.Data.Telemetry.Distribution.BucketOptions.fromObject(d.bucket_options)}if(d.bucket_counts){if(!Array.isArray(d.bucket_counts))throw TypeError(".POGOProtos.Data.Telemetry.Distribution.bucket_counts: array expected");m.bucket_counts=[];for(var i=0;i<d.bucket_counts.length;++i){if($util.Long)(m.bucket_counts[i]=$util.Long.fromValue(d.bucket_counts[i])).unsigned=false;else if(typeof d.bucket_counts[i]==="string")m.bucket_counts[i]=parseInt(d.bucket_counts[i],10);else if(typeof d.bucket_counts[i]==="number")m.bucket_counts[i]=d.bucket_counts[i];else if(typeof d.bucket_counts[i]==="object")m.bucket_counts[i]=new $util.LongBits(d.bucket_counts[i].low>>>0,d.bucket_counts[i].high>>>0).toNumber()}}return m};Distribution.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.bucket_counts=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.count=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.count=o.longs===String?"0":0;d.mean=0;d.sum_of_squared_deviation=0;d.range=null;d.bucket_options=null}if(m.count!=null&&m.hasOwnProperty("count")){if(typeof m.count==="number")d.count=o.longs===String?String(m.count):m.count;else d.count=o.longs===String?$util.Long.prototype.toString.call(m.count):o.longs===Number?new $util.LongBits(m.count.low>>>0,m.count.high>>>0).toNumber():m.count}if(m.mean!=null&&m.hasOwnProperty("mean")){d.mean=o.json&&!isFinite(m.mean)?String(m.mean):m.mean}if(m.sum_of_squared_deviation!=null&&m.hasOwnProperty("sum_of_squared_deviation")){d.sum_of_squared_deviation=o.json&&!isFinite(m.sum_of_squared_deviation)?String(m.sum_of_squared_deviation):m.sum_of_squared_deviation}if(m.range!=null&&m.hasOwnProperty("range")){d.range=$root.POGOProtos.Data.Telemetry.Distribution.Range.toObject(m.range,o)}if(m.bucket_options!=null&&m.hasOwnProperty("bucket_options")){d.bucket_options=$root.POGOProtos.Data.Telemetry.Distribution.BucketOptions.toObject(m.bucket_options,o)}if(m.bucket_counts&&m.bucket_counts.length){d.bucket_counts=[];for(var j=0;j<m.bucket_counts.length;++j){if(typeof m.bucket_counts[j]==="number")d.bucket_counts[j]=o.longs===String?String(m.bucket_counts[j]):m.bucket_counts[j];else d.bucket_counts[j]=o.longs===String?$util.Long.prototype.toString.call(m.bucket_counts[j]):o.longs===Number?new $util.LongBits(m.bucket_counts[j].low>>>0,m.bucket_counts[j].high>>>0).toNumber():m.bucket_counts[j]}}return d};Distribution.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Distribution.BucketOptions=function(){function BucketOptions(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BucketOptions.prototype.linear_buckets=null;BucketOptions.prototype.exponential_buckets=null;BucketOptions.prototype.explicit_buckets=null;var $oneOfFields;Object.defineProperty(BucketOptions.prototype,"BucketType",{get:$util.oneOfGetter($oneOfFields=["linear_buckets","exponential_buckets","explicit_buckets"]),set:$util.oneOfSetter($oneOfFields)});BucketOptions.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.linear_buckets!=null&&m.hasOwnProperty("linear_buckets"))$root.POGOProtos.Data.Telemetry.Distribution.LinearBuckets.encode(m.linear_buckets,w.uint32(10).fork()).ldelim();if(m.exponential_buckets!=null&&m.hasOwnProperty("exponential_buckets"))$root.POGOProtos.Data.Telemetry.Distribution.ExponentialBuckets.encode(m.exponential_buckets,w.uint32(18).fork()).ldelim();if(m.explicit_buckets!=null&&m.hasOwnProperty("explicit_buckets"))$root.POGOProtos.Data.Telemetry.Distribution.ExplicitBuckets.encode(m.explicit_buckets,w.uint32(26).fork()).ldelim();return w};BucketOptions.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.Distribution.BucketOptions;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.linear_buckets=$root.POGOProtos.Data.Telemetry.Distribution.LinearBuckets.decode(r,r.uint32());break;case 2:m.exponential_buckets=$root.POGOProtos.Data.Telemetry.Distribution.ExponentialBuckets.decode(r,r.uint32());break;case 3:m.explicit_buckets=$root.POGOProtos.Data.Telemetry.Distribution.ExplicitBuckets.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};BucketOptions.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.Distribution.BucketOptions)return d;var m=new $root.POGOProtos.Data.Telemetry.Distribution.BucketOptions;if(d.linear_buckets!=null){if(typeof d.linear_buckets!=="object")throw TypeError(".POGOProtos.Data.Telemetry.Distribution.BucketOptions.linear_buckets: object expected");m.linear_buckets=$root.POGOProtos.Data.Telemetry.Distribution.LinearBuckets.fromObject(d.linear_buckets)}if(d.exponential_buckets!=null){if(typeof d.exponential_buckets!=="object")throw TypeError(".POGOProtos.Data.Telemetry.Distribution.BucketOptions.exponential_buckets: object expected");m.exponential_buckets=$root.POGOProtos.Data.Telemetry.Distribution.ExponentialBuckets.fromObject(d.exponential_buckets)}if(d.explicit_buckets!=null){if(typeof d.explicit_buckets!=="object")throw TypeError(".POGOProtos.Data.Telemetry.Distribution.BucketOptions.explicit_buckets: object expected");m.explicit_buckets=$root.POGOProtos.Data.Telemetry.Distribution.ExplicitBuckets.fromObject(d.explicit_buckets)}return m};BucketOptions.toObject=function toObject(m,o){if(!o)o={};var d={};if(m.linear_buckets!=null&&m.hasOwnProperty("linear_buckets")){d.linear_buckets=$root.POGOProtos.Data.Telemetry.Distribution.LinearBuckets.toObject(m.linear_buckets,o);if(o.oneofs)d.BucketType="linear_buckets"}if(m.exponential_buckets!=null&&m.hasOwnProperty("exponential_buckets")){d.exponential_buckets=$root.POGOProtos.Data.Telemetry.Distribution.ExponentialBuckets.toObject(m.exponential_buckets,o);if(o.oneofs)d.BucketType="exponential_buckets"}if(m.explicit_buckets!=null&&m.hasOwnProperty("explicit_buckets")){d.explicit_buckets=$root.POGOProtos.Data.Telemetry.Distribution.ExplicitBuckets.toObject(m.explicit_buckets,o);if(o.oneofs)d.BucketType="explicit_buckets"}return d};BucketOptions.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BucketOptions.ExplicitBuckets=function(){function ExplicitBuckets(p){this.bounds=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ExplicitBuckets.prototype.bounds=$util.emptyArray;ExplicitBuckets.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.bounds!=null&&m.bounds.length){w.uint32(10).fork();for(var i=0;i<m.bounds.length;++i)w.int64(m.bounds[i]);w.ldelim()}return w};ExplicitBuckets.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.Distribution.BucketOptions.ExplicitBuckets;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.bounds&&m.bounds.length))m.bounds=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.bounds.push(r.int64())}else m.bounds.push(r.int64());break;default:r.skipType(t&7);break}}return m};ExplicitBuckets.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.Distribution.BucketOptions.ExplicitBuckets)return d;var m=new $root.POGOProtos.Data.Telemetry.Distribution.BucketOptions.ExplicitBuckets;if(d.bounds){if(!Array.isArray(d.bounds))throw TypeError(".POGOProtos.Data.Telemetry.Distribution.BucketOptions.ExplicitBuckets.bounds: array expected");m.bounds=[];for(var i=0;i<d.bounds.length;++i){if($util.Long)(m.bounds[i]=$util.Long.fromValue(d.bounds[i])).unsigned=false;else if(typeof d.bounds[i]==="string")m.bounds[i]=parseInt(d.bounds[i],10);else if(typeof d.bounds[i]==="number")m.bounds[i]=d.bounds[i];else if(typeof d.bounds[i]==="object")m.bounds[i]=new $util.LongBits(d.bounds[i].low>>>0,d.bounds[i].high>>>0).toNumber()}}return m};ExplicitBuckets.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.bounds=[]}if(m.bounds&&m.bounds.length){d.bounds=[];for(var j=0;j<m.bounds.length;++j){if(typeof m.bounds[j]==="number")d.bounds[j]=o.longs===String?String(m.bounds[j]):m.bounds[j];else d.bounds[j]=o.longs===String?$util.Long.prototype.toString.call(m.bounds[j]):o.longs===Number?new $util.LongBits(m.bounds[j].low>>>0,m.bounds[j].high>>>0).toNumber():m.bounds[j]}}return d};ExplicitBuckets.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ExplicitBuckets}();BucketOptions.ExponentialBuckets=function(){function ExponentialBuckets(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ExponentialBuckets.prototype.num_finite_buckets=$util.Long?$util.Long.fromBits(0,0,false):0;ExponentialBuckets.prototype.growth_factor=0;ExponentialBuckets.prototype.scale=0;ExponentialBuckets.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.num_finite_buckets!=null&&m.hasOwnProperty("num_finite_buckets"))w.uint32(8).int64(m.num_finite_buckets);if(m.growth_factor!=null&&m.hasOwnProperty("growth_factor"))w.uint32(21).float(m.growth_factor);if(m.scale!=null&&m.hasOwnProperty("scale"))w.uint32(29).float(m.scale);return w};ExponentialBuckets.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.Distribution.BucketOptions.ExponentialBuckets;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.num_finite_buckets=r.int64();break;case 2:m.growth_factor=r.float();break;case 3:m.scale=r.float();break;default:r.skipType(t&7);break}}return m};ExponentialBuckets.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.Distribution.BucketOptions.ExponentialBuckets)return d;var m=new $root.POGOProtos.Data.Telemetry.Distribution.BucketOptions.ExponentialBuckets;if(d.num_finite_buckets!=null){if($util.Long)(m.num_finite_buckets=$util.Long.fromValue(d.num_finite_buckets)).unsigned=false;else if(typeof d.num_finite_buckets==="string")m.num_finite_buckets=parseInt(d.num_finite_buckets,10);else if(typeof d.num_finite_buckets==="number")m.num_finite_buckets=d.num_finite_buckets;else if(typeof d.num_finite_buckets==="object")m.num_finite_buckets=new $util.LongBits(d.num_finite_buckets.low>>>0,d.num_finite_buckets.high>>>0).toNumber()}if(d.growth_factor!=null){m.growth_factor=Number(d.growth_factor)}if(d.scale!=null){m.scale=Number(d.scale)}return m};ExponentialBuckets.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.num_finite_buckets=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.num_finite_buckets=o.longs===String?"0":0;d.growth_factor=0;d.scale=0}if(m.num_finite_buckets!=null&&m.hasOwnProperty("num_finite_buckets")){if(typeof m.num_finite_buckets==="number")d.num_finite_buckets=o.longs===String?String(m.num_finite_buckets):m.num_finite_buckets;else d.num_finite_buckets=o.longs===String?$util.Long.prototype.toString.call(m.num_finite_buckets):o.longs===Number?new $util.LongBits(m.num_finite_buckets.low>>>0,m.num_finite_buckets.high>>>0).toNumber():m.num_finite_buckets}if(m.growth_factor!=null&&m.hasOwnProperty("growth_factor")){d.growth_factor=o.json&&!isFinite(m.growth_factor)?String(m.growth_factor):m.growth_factor}if(m.scale!=null&&m.hasOwnProperty("scale")){d.scale=o.json&&!isFinite(m.scale)?String(m.scale):m.scale}return d};ExponentialBuckets.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ExponentialBuckets}();BucketOptions.LinearBuckets=function(){function LinearBuckets(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LinearBuckets.prototype.num_finite_buckets=$util.Long?$util.Long.fromBits(0,0,false):0;LinearBuckets.prototype.width=$util.Long?$util.Long.fromBits(0,0,false):0;LinearBuckets.prototype.offset=$util.Long?$util.Long.fromBits(0,0,false):0;LinearBuckets.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.num_finite_buckets!=null&&m.hasOwnProperty("num_finite_buckets"))w.uint32(8).int64(m.num_finite_buckets);if(m.width!=null&&m.hasOwnProperty("width"))w.uint32(16).int64(m.width);if(m.offset!=null&&m.hasOwnProperty("offset"))w.uint32(24).int64(m.offset);return w};LinearBuckets.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.Distribution.BucketOptions.LinearBuckets;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.num_finite_buckets=r.int64();break;case 2:m.width=r.int64();break;case 3:m.offset=r.int64();break;default:r.skipType(t&7);break}}return m};LinearBuckets.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.Distribution.BucketOptions.LinearBuckets)return d;var m=new $root.POGOProtos.Data.Telemetry.Distribution.BucketOptions.LinearBuckets;if(d.num_finite_buckets!=null){if($util.Long)(m.num_finite_buckets=$util.Long.fromValue(d.num_finite_buckets)).unsigned=false;else if(typeof d.num_finite_buckets==="string")m.num_finite_buckets=parseInt(d.num_finite_buckets,10);else if(typeof d.num_finite_buckets==="number")m.num_finite_buckets=d.num_finite_buckets;else if(typeof d.num_finite_buckets==="object")m.num_finite_buckets=new $util.LongBits(d.num_finite_buckets.low>>>0,d.num_finite_buckets.high>>>0).toNumber()}if(d.width!=null){if($util.Long)(m.width=$util.Long.fromValue(d.width)).unsigned=false;else if(typeof d.width==="string")m.width=parseInt(d.width,10);else if(typeof d.width==="number")m.width=d.width;else if(typeof d.width==="object")m.width=new $util.LongBits(d.width.low>>>0,d.width.high>>>0).toNumber()}if(d.offset!=null){if($util.Long)(m.offset=$util.Long.fromValue(d.offset)).unsigned=false;else if(typeof d.offset==="string")m.offset=parseInt(d.offset,10);else if(typeof d.offset==="number")m.offset=d.offset;else if(typeof d.offset==="object")m.offset=new $util.LongBits(d.offset.low>>>0,d.offset.high>>>0).toNumber()}return m};LinearBuckets.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.num_finite_buckets=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.num_finite_buckets=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.width=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.width=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.offset=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.offset=o.longs===String?"0":0}if(m.num_finite_buckets!=null&&m.hasOwnProperty("num_finite_buckets")){if(typeof m.num_finite_buckets==="number")d.num_finite_buckets=o.longs===String?String(m.num_finite_buckets):m.num_finite_buckets;else d.num_finite_buckets=o.longs===String?$util.Long.prototype.toString.call(m.num_finite_buckets):o.longs===Number?new $util.LongBits(m.num_finite_buckets.low>>>0,m.num_finite_buckets.high>>>0).toNumber():m.num_finite_buckets}if(m.width!=null&&m.hasOwnProperty("width")){if(typeof m.width==="number")d.width=o.longs===String?String(m.width):m.width;else d.width=o.longs===String?$util.Long.prototype.toString.call(m.width):o.longs===Number?new $util.LongBits(m.width.low>>>0,m.width.high>>>0).toNumber():m.width}if(m.offset!=null&&m.hasOwnProperty("offset")){if(typeof m.offset==="number")d.offset=o.longs===String?String(m.offset):m.offset;else d.offset=o.longs===String?$util.Long.prototype.toString.call(m.offset):o.longs===Number?new $util.LongBits(m.offset.low>>>0,m.offset.high>>>0).toNumber():m.offset}return d};LinearBuckets.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return LinearBuckets}();return BucketOptions}();Distribution.ExplicitBuckets=function(){function ExplicitBuckets(p){this.bounds=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ExplicitBuckets.prototype.bounds=$util.emptyArray;ExplicitBuckets.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.bounds!=null&&m.bounds.length){w.uint32(10).fork();for(var i=0;i<m.bounds.length;++i)w.int64(m.bounds[i]);w.ldelim()}return w};ExplicitBuckets.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.Distribution.ExplicitBuckets;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.bounds&&m.bounds.length))m.bounds=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.bounds.push(r.int64())}else m.bounds.push(r.int64());break;default:r.skipType(t&7);break}}return m};ExplicitBuckets.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.Distribution.ExplicitBuckets)return d;var m=new $root.POGOProtos.Data.Telemetry.Distribution.ExplicitBuckets;if(d.bounds){if(!Array.isArray(d.bounds))throw TypeError(".POGOProtos.Data.Telemetry.Distribution.ExplicitBuckets.bounds: array expected");m.bounds=[];for(var i=0;i<d.bounds.length;++i){if($util.Long)(m.bounds[i]=$util.Long.fromValue(d.bounds[i])).unsigned=false;else if(typeof d.bounds[i]==="string")m.bounds[i]=parseInt(d.bounds[i],10);else if(typeof d.bounds[i]==="number")m.bounds[i]=d.bounds[i];else if(typeof d.bounds[i]==="object")m.bounds[i]=new $util.LongBits(d.bounds[i].low>>>0,d.bounds[i].high>>>0).toNumber()}}return m};ExplicitBuckets.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.bounds=[]}if(m.bounds&&m.bounds.length){d.bounds=[];for(var j=0;j<m.bounds.length;++j){if(typeof m.bounds[j]==="number")d.bounds[j]=o.longs===String?String(m.bounds[j]):m.bounds[j];else d.bounds[j]=o.longs===String?$util.Long.prototype.toString.call(m.bounds[j]):o.longs===Number?new $util.LongBits(m.bounds[j].low>>>0,m.bounds[j].high>>>0).toNumber():m.bounds[j]}}return d};ExplicitBuckets.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ExplicitBuckets}();Distribution.ExponentialBuckets=function(){function ExponentialBuckets(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ExponentialBuckets.prototype.num_finite_buckets=$util.Long?$util.Long.fromBits(0,0,false):0;ExponentialBuckets.prototype.growth_factor=0;ExponentialBuckets.prototype.scale=0;ExponentialBuckets.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.num_finite_buckets!=null&&m.hasOwnProperty("num_finite_buckets"))w.uint32(8).int64(m.num_finite_buckets);if(m.growth_factor!=null&&m.hasOwnProperty("growth_factor"))w.uint32(21).float(m.growth_factor);if(m.scale!=null&&m.hasOwnProperty("scale"))w.uint32(29).float(m.scale);return w};ExponentialBuckets.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.Distribution.ExponentialBuckets;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.num_finite_buckets=r.int64();break;case 2:m.growth_factor=r.float();break;case 3:m.scale=r.float();break;default:r.skipType(t&7);break}}return m};ExponentialBuckets.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.Distribution.ExponentialBuckets)return d;var m=new $root.POGOProtos.Data.Telemetry.Distribution.ExponentialBuckets;if(d.num_finite_buckets!=null){if($util.Long)(m.num_finite_buckets=$util.Long.fromValue(d.num_finite_buckets)).unsigned=false;else if(typeof d.num_finite_buckets==="string")m.num_finite_buckets=parseInt(d.num_finite_buckets,10);else if(typeof d.num_finite_buckets==="number")m.num_finite_buckets=d.num_finite_buckets;else if(typeof d.num_finite_buckets==="object")m.num_finite_buckets=new $util.LongBits(d.num_finite_buckets.low>>>0,d.num_finite_buckets.high>>>0).toNumber()}if(d.growth_factor!=null){m.growth_factor=Number(d.growth_factor)}if(d.scale!=null){m.scale=Number(d.scale)}return m};ExponentialBuckets.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.num_finite_buckets=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.num_finite_buckets=o.longs===String?"0":0;d.growth_factor=0;d.scale=0}if(m.num_finite_buckets!=null&&m.hasOwnProperty("num_finite_buckets")){if(typeof m.num_finite_buckets==="number")d.num_finite_buckets=o.longs===String?String(m.num_finite_buckets):m.num_finite_buckets;else d.num_finite_buckets=o.longs===String?$util.Long.prototype.toString.call(m.num_finite_buckets):o.longs===Number?new $util.LongBits(m.num_finite_buckets.low>>>0,m.num_finite_buckets.high>>>0).toNumber():m.num_finite_buckets}if(m.growth_factor!=null&&m.hasOwnProperty("growth_factor")){d.growth_factor=o.json&&!isFinite(m.growth_factor)?String(m.growth_factor):m.growth_factor}if(m.scale!=null&&m.hasOwnProperty("scale")){d.scale=o.json&&!isFinite(m.scale)?String(m.scale):m.scale}return d};ExponentialBuckets.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ExponentialBuckets}();Distribution.LinearBuckets=function(){function LinearBuckets(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LinearBuckets.prototype.num_finite_buckets=$util.Long?$util.Long.fromBits(0,0,false):0;LinearBuckets.prototype.width=$util.Long?$util.Long.fromBits(0,0,false):0;LinearBuckets.prototype.offset=$util.Long?$util.Long.fromBits(0,0,false):0;LinearBuckets.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.num_finite_buckets!=null&&m.hasOwnProperty("num_finite_buckets"))w.uint32(8).int64(m.num_finite_buckets);if(m.width!=null&&m.hasOwnProperty("width"))w.uint32(16).int64(m.width);if(m.offset!=null&&m.hasOwnProperty("offset"))w.uint32(24).int64(m.offset);return w};LinearBuckets.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.Distribution.LinearBuckets;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.num_finite_buckets=r.int64();break;case 2:m.width=r.int64();break;case 3:m.offset=r.int64();break;default:r.skipType(t&7);break}}return m};LinearBuckets.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.Distribution.LinearBuckets)return d;var m=new $root.POGOProtos.Data.Telemetry.Distribution.LinearBuckets;if(d.num_finite_buckets!=null){if($util.Long)(m.num_finite_buckets=$util.Long.fromValue(d.num_finite_buckets)).unsigned=false;else if(typeof d.num_finite_buckets==="string")m.num_finite_buckets=parseInt(d.num_finite_buckets,10);else if(typeof d.num_finite_buckets==="number")m.num_finite_buckets=d.num_finite_buckets;else if(typeof d.num_finite_buckets==="object")m.num_finite_buckets=new $util.LongBits(d.num_finite_buckets.low>>>0,d.num_finite_buckets.high>>>0).toNumber()}if(d.width!=null){if($util.Long)(m.width=$util.Long.fromValue(d.width)).unsigned=false;else if(typeof d.width==="string")m.width=parseInt(d.width,10);else if(typeof d.width==="number")m.width=d.width;else if(typeof d.width==="object")m.width=new $util.LongBits(d.width.low>>>0,d.width.high>>>0).toNumber()}if(d.offset!=null){if($util.Long)(m.offset=$util.Long.fromValue(d.offset)).unsigned=false;else if(typeof d.offset==="string")m.offset=parseInt(d.offset,10);else if(typeof d.offset==="number")m.offset=d.offset;else if(typeof d.offset==="object")m.offset=new $util.LongBits(d.offset.low>>>0,d.offset.high>>>0).toNumber()}return m};LinearBuckets.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.num_finite_buckets=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.num_finite_buckets=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.width=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.width=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.offset=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.offset=o.longs===String?"0":0}if(m.num_finite_buckets!=null&&m.hasOwnProperty("num_finite_buckets")){if(typeof m.num_finite_buckets==="number")d.num_finite_buckets=o.longs===String?String(m.num_finite_buckets):m.num_finite_buckets;else d.num_finite_buckets=o.longs===String?$util.Long.prototype.toString.call(m.num_finite_buckets):o.longs===Number?new $util.LongBits(m.num_finite_buckets.low>>>0,m.num_finite_buckets.high>>>0).toNumber():m.num_finite_buckets}if(m.width!=null&&m.hasOwnProperty("width")){if(typeof m.width==="number")d.width=o.longs===String?String(m.width):m.width;else d.width=o.longs===String?$util.Long.prototype.toString.call(m.width):o.longs===Number?new $util.LongBits(m.width.low>>>0,m.width.high>>>0).toNumber():m.width}if(m.offset!=null&&m.hasOwnProperty("offset")){if(typeof m.offset==="number")d.offset=o.longs===String?String(m.offset):m.offset;else d.offset=o.longs===String?$util.Long.prototype.toString.call(m.offset):o.longs===Number?new $util.LongBits(m.offset.low>>>0,m.offset.high>>>0).toNumber():m.offset}return d};LinearBuckets.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return LinearBuckets}();Distribution.Range=function(){function Range(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Range.prototype.min=$util.Long?$util.Long.fromBits(0,0,false):0;Range.prototype.max=$util.Long?$util.Long.fromBits(0,0,false):0;Range.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.min!=null&&m.hasOwnProperty("min"))w.uint32(8).int64(m.min);if(m.max!=null&&m.hasOwnProperty("max"))w.uint32(16).int64(m.max);return w};Range.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.Distribution.Range;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.min=r.int64();break;case 2:m.max=r.int64();break;default:r.skipType(t&7);break}}return m};Range.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.Distribution.Range)return d;var m=new $root.POGOProtos.Data.Telemetry.Distribution.Range;if(d.min!=null){if($util.Long)(m.min=$util.Long.fromValue(d.min)).unsigned=false;else if(typeof d.min==="string")m.min=parseInt(d.min,10);else if(typeof d.min==="number")m.min=d.min;else if(typeof d.min==="object")m.min=new $util.LongBits(d.min.low>>>0,d.min.high>>>0).toNumber()}if(d.max!=null){if($util.Long)(m.max=$util.Long.fromValue(d.max)).unsigned=false;else if(typeof d.max==="string")m.max=parseInt(d.max,10);else if(typeof d.max==="number")m.max=d.max;else if(typeof d.max==="object")m.max=new $util.LongBits(d.max.low>>>0,d.max.high>>>0).toNumber()}return m};Range.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.min=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.min=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.max=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.max=o.longs===String?"0":0}if(m.min!=null&&m.hasOwnProperty("min")){if(typeof m.min==="number")d.min=o.longs===String?String(m.min):m.min;else d.min=o.longs===String?$util.Long.prototype.toString.call(m.min):o.longs===Number?new $util.LongBits(m.min.low>>>0,m.min.high>>>0).toNumber():m.min}if(m.max!=null&&m.hasOwnProperty("max")){if(typeof m.max==="number")d.max=o.longs===String?String(m.max):m.max;else d.max=o.longs===String?$util.Long.prototype.toString.call(m.max):o.longs===Number?new $util.LongBits(m.max.low>>>0,m.max.high>>>0).toNumber():m.max}return d};Range.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Range}();return Distribution}();Telemetry.EncounterPokemonTelemetry=function(){function EncounterPokemonTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EncounterPokemonTelemetry.prototype.pokemon=null;EncounterPokemonTelemetry.prototype.map_pokemon_type="";EncounterPokemonTelemetry.prototype.ar_enabled=false;EncounterPokemonTelemetry.prototype.ar_plus_enabled=false;EncounterPokemonTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon!=null&&m.hasOwnProperty("pokemon"))$root.POGOProtos.Data.Telemetry.PokemonTelemetry.encode(m.pokemon,w.uint32(10).fork()).ldelim();if(m.map_pokemon_type!=null&&m.hasOwnProperty("map_pokemon_type"))w.uint32(18).string(m.map_pokemon_type);if(m.ar_enabled!=null&&m.hasOwnProperty("ar_enabled"))w.uint32(24).bool(m.ar_enabled);if(m.ar_plus_enabled!=null&&m.hasOwnProperty("ar_plus_enabled"))w.uint32(32).bool(m.ar_plus_enabled);return w};EncounterPokemonTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.EncounterPokemonTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.decode(r,r.uint32());break;case 2:m.map_pokemon_type=r.string();break;case 3:m.ar_enabled=r.bool();break;case 4:m.ar_plus_enabled=r.bool();break;default:r.skipType(t&7);break}}return m};EncounterPokemonTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.EncounterPokemonTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.EncounterPokemonTelemetry;if(d.pokemon!=null){if(typeof d.pokemon!=="object")throw TypeError(".POGOProtos.Data.Telemetry.EncounterPokemonTelemetry.pokemon: object expected");m.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.fromObject(d.pokemon)}if(d.map_pokemon_type!=null){m.map_pokemon_type=String(d.map_pokemon_type)}if(d.ar_enabled!=null){m.ar_enabled=Boolean(d.ar_enabled)}if(d.ar_plus_enabled!=null){m.ar_plus_enabled=Boolean(d.ar_plus_enabled)}return m};EncounterPokemonTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon=null;d.map_pokemon_type="";d.ar_enabled=false;d.ar_plus_enabled=false}if(m.pokemon!=null&&m.hasOwnProperty("pokemon")){d.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.toObject(m.pokemon,o)}if(m.map_pokemon_type!=null&&m.hasOwnProperty("map_pokemon_type")){d.map_pokemon_type=m.map_pokemon_type}if(m.ar_enabled!=null&&m.hasOwnProperty("ar_enabled")){d.ar_enabled=m.ar_enabled}if(m.ar_plus_enabled!=null&&m.hasOwnProperty("ar_plus_enabled")){d.ar_plus_enabled=m.ar_plus_enabled}return d};EncounterPokemonTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EncounterPokemonTelemetry}();Telemetry.EvolvePokemonTelemetry=function(){function EvolvePokemonTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EvolvePokemonTelemetry.prototype.pokemon=null;EvolvePokemonTelemetry.prototype.evolved_pokemon=null;EvolvePokemonTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon!=null&&m.hasOwnProperty("pokemon"))$root.POGOProtos.Data.Telemetry.PokemonTelemetry.encode(m.pokemon,w.uint32(10).fork()).ldelim();if(m.evolved_pokemon!=null&&m.hasOwnProperty("evolved_pokemon"))$root.POGOProtos.Data.Telemetry.PokemonTelemetry.encode(m.evolved_pokemon,w.uint32(18).fork()).ldelim();return w};EvolvePokemonTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.EvolvePokemonTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.decode(r,r.uint32());break;case 2:m.evolved_pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};EvolvePokemonTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.EvolvePokemonTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.EvolvePokemonTelemetry;if(d.pokemon!=null){if(typeof d.pokemon!=="object")throw TypeError(".POGOProtos.Data.Telemetry.EvolvePokemonTelemetry.pokemon: object expected");m.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.fromObject(d.pokemon)}if(d.evolved_pokemon!=null){if(typeof d.evolved_pokemon!=="object")throw TypeError(".POGOProtos.Data.Telemetry.EvolvePokemonTelemetry.evolved_pokemon: object expected");m.evolved_pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.fromObject(d.evolved_pokemon)}return m};EvolvePokemonTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon=null;d.evolved_pokemon=null}if(m.pokemon!=null&&m.hasOwnProperty("pokemon")){d.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.toObject(m.pokemon,o)}if(m.evolved_pokemon!=null&&m.hasOwnProperty("evolved_pokemon")){d.evolved_pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.toObject(m.evolved_pokemon,o)}return d};EvolvePokemonTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EvolvePokemonTelemetry}();Telemetry.FavoritePokemonTelemetry=function(){function FavoritePokemonTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FavoritePokemonTelemetry.prototype.pokemon=null;FavoritePokemonTelemetry.prototype.favored=false;FavoritePokemonTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon!=null&&m.hasOwnProperty("pokemon"))$root.POGOProtos.Data.Telemetry.PokemonTelemetry.encode(m.pokemon,w.uint32(10).fork()).ldelim();if(m.favored!=null&&m.hasOwnProperty("favored"))w.uint32(16).bool(m.favored);return w};FavoritePokemonTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.FavoritePokemonTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.decode(r,r.uint32());break;case 2:m.favored=r.bool();break;default:r.skipType(t&7);break}}return m};FavoritePokemonTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.FavoritePokemonTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.FavoritePokemonTelemetry;if(d.pokemon!=null){if(typeof d.pokemon!=="object")throw TypeError(".POGOProtos.Data.Telemetry.FavoritePokemonTelemetry.pokemon: object expected");m.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.fromObject(d.pokemon)}if(d.favored!=null){m.favored=Boolean(d.favored)}return m};FavoritePokemonTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon=null;d.favored=false}if(m.pokemon!=null&&m.hasOwnProperty("pokemon")){d.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.toObject(m.pokemon,o)}if(m.favored!=null&&m.hasOwnProperty("favored")){d.favored=m.favored}return d};FavoritePokemonTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FavoritePokemonTelemetry}();Telemetry.FeedPokemonTelemetry=function(){function FeedPokemonTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FeedPokemonTelemetry.prototype.status=0;FeedPokemonTelemetry.prototype.pokemon=null;FeedPokemonTelemetry.prototype.gym_id="";FeedPokemonTelemetry.prototype.team=0;FeedPokemonTelemetry.prototype.defender_count=0;FeedPokemonTelemetry.prototype.motivation=0;FeedPokemonTelemetry.prototype.cp_now=0;FeedPokemonTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.pokemon!=null&&m.hasOwnProperty("pokemon"))$root.POGOProtos.Data.Telemetry.PokemonTelemetry.encode(m.pokemon,w.uint32(18).fork()).ldelim();if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(26).string(m.gym_id);if(m.team!=null&&m.hasOwnProperty("team"))w.uint32(32).int32(m.team);if(m.defender_count!=null&&m.hasOwnProperty("defender_count"))w.uint32(40).int32(m.defender_count);if(m.motivation!=null&&m.hasOwnProperty("motivation"))w.uint32(48).int32(m.motivation);if(m.cp_now!=null&&m.hasOwnProperty("cp_now"))w.uint32(56).int32(m.cp_now);return w};FeedPokemonTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.FeedPokemonTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.decode(r,r.uint32());break;case 3:m.gym_id=r.string();break;case 4:m.team=r.int32();break;case 5:m.defender_count=r.int32();break;case 6:m.motivation=r.int32();break;case 7:m.cp_now=r.int32();break;default:r.skipType(t&7);break}}return m};FeedPokemonTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.FeedPokemonTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.FeedPokemonTelemetry;if(d.status!=null){m.status=d.status|0}if(d.pokemon!=null){if(typeof d.pokemon!=="object")throw TypeError(".POGOProtos.Data.Telemetry.FeedPokemonTelemetry.pokemon: object expected");m.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.fromObject(d.pokemon)}if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.team!=null){m.team=d.team|0}if(d.defender_count!=null){m.defender_count=d.defender_count|0}if(d.motivation!=null){m.motivation=d.motivation|0}if(d.cp_now!=null){m.cp_now=d.cp_now|0}return m};FeedPokemonTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=0;d.pokemon=null;d.gym_id="";d.team=0;d.defender_count=0;d.motivation=0;d.cp_now=0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=m.status}if(m.pokemon!=null&&m.hasOwnProperty("pokemon")){d.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.toObject(m.pokemon,o)}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.team!=null&&m.hasOwnProperty("team")){d.team=m.team}if(m.defender_count!=null&&m.hasOwnProperty("defender_count")){d.defender_count=m.defender_count}if(m.motivation!=null&&m.hasOwnProperty("motivation")){d.motivation=m.motivation}if(m.cp_now!=null&&m.hasOwnProperty("cp_now")){d.cp_now=m.cp_now}return d};FeedPokemonTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FeedPokemonTelemetry}();Telemetry.FrameRate=function(){function FrameRate(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FrameRate.prototype.sampled_frame_rate=null;FrameRate.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.sampled_frame_rate!=null&&m.hasOwnProperty("sampled_frame_rate"))$root.POGOProtos.Data.Telemetry.PlatformMetricData.encode(m.sampled_frame_rate,w.uint32(10).fork()).ldelim();return w};FrameRate.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.FrameRate;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.sampled_frame_rate=$root.POGOProtos.Data.Telemetry.PlatformMetricData.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};FrameRate.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.FrameRate)return d;var m=new $root.POGOProtos.Data.Telemetry.FrameRate;if(d.sampled_frame_rate!=null){if(typeof d.sampled_frame_rate!=="object")throw TypeError(".POGOProtos.Data.Telemetry.FrameRate.sampled_frame_rate: object expected");m.sampled_frame_rate=$root.POGOProtos.Data.Telemetry.PlatformMetricData.fromObject(d.sampled_frame_rate)}return m};FrameRate.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.sampled_frame_rate=null}if(m.sampled_frame_rate!=null&&m.hasOwnProperty("sampled_frame_rate")){d.sampled_frame_rate=$root.POGOProtos.Data.Telemetry.PlatformMetricData.toObject(m.sampled_frame_rate,o)}return d};FrameRate.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FrameRate}();Telemetry.GenericClickTelemetry=function(){function GenericClickTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GenericClickTelemetry.prototype.generic_click_id=0;GenericClickTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.generic_click_id!=null&&m.hasOwnProperty("generic_click_id"))w.uint32(8).int32(m.generic_click_id);return w};GenericClickTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.GenericClickTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.generic_click_id=r.int32();break;default:r.skipType(t&7);break}}return m};GenericClickTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.GenericClickTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.GenericClickTelemetry;switch(d.generic_click_id){case"UNDEFINED_GENERIC_EVENT":case 0:m.generic_click_id=0;break;case"SPEED_WARNING_SHOW":case 1:m.generic_click_id=1;break;case"SPEED_WARNING_PASSENGER":case 2:m.generic_click_id=2;break}return m};GenericClickTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.generic_click_id=o.enums===String?"UNDEFINED_GENERIC_EVENT":0}if(m.generic_click_id!=null&&m.hasOwnProperty("generic_click_id")){d.generic_click_id=o.enums===String?$root.POGOProtos.Enums.GenericClickTelemetryIds[m.generic_click_id]:m.generic_click_id}return d};GenericClickTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GenericClickTelemetry}();Telemetry.ItemTelemetry=function(){function ItemTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ItemTelemetry.prototype.item_use_click_id=0;ItemTelemetry.prototype.item_id=0;ItemTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_use_click_id!=null&&m.hasOwnProperty("item_use_click_id"))w.uint32(8).int32(m.item_use_click_id);if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(16).int32(m.item_id);return w};ItemTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.ItemTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_use_click_id=r.int32();break;case 2:m.item_id=r.int32();break;default:r.skipType(t&7);break}}return m};ItemTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.ItemTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.ItemTelemetry;switch(d.item_use_click_id){case"UNDEFINED_ITEM_EVENT":case 0:m.item_use_click_id=0;break;case"USE_ITEM":case 1:m.item_use_click_id=1;break;case"RECYCLE_ITEM":case 2:m.item_use_click_id=2;break}if(d.item_id!=null){m.item_id=d.item_id|0}return m};ItemTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_use_click_id=o.enums===String?"UNDEFINED_ITEM_EVENT":0;d.item_id=0}if(m.item_use_click_id!=null&&m.hasOwnProperty("item_use_click_id")){d.item_use_click_id=o.enums===String?$root.POGOProtos.Enums.ItemUseTelemetryIds[m.item_use_click_id]:m.item_use_click_id}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=m.item_id}return d};ItemTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ItemTelemetry}();Telemetry.LinkLoginTelemetry=function(){function LinkLoginTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LinkLoginTelemetry.prototype.linked=false;LinkLoginTelemetry.prototype.success="";LinkLoginTelemetry.prototype.error="";LinkLoginTelemetry.prototype.active_auth_provider_id="";LinkLoginTelemetry.prototype.provider="";LinkLoginTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.linked!=null&&m.hasOwnProperty("linked"))w.uint32(8).bool(m.linked);if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(18).string(m.success);if(m.error!=null&&m.hasOwnProperty("error"))w.uint32(26).string(m.error);if(m.active_auth_provider_id!=null&&m.hasOwnProperty("active_auth_provider_id"))w.uint32(34).string(m.active_auth_provider_id);if(m.provider!=null&&m.hasOwnProperty("provider"))w.uint32(42).string(m.provider);return w};LinkLoginTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.LinkLoginTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.linked=r.bool();break;case 2:m.success=r.string();break;case 3:m.error=r.string();break;case 4:m.active_auth_provider_id=r.string();break;case 5:m.provider=r.string();break;default:r.skipType(t&7);break}}return m};LinkLoginTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.LinkLoginTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.LinkLoginTelemetry;if(d.linked!=null){m.linked=Boolean(d.linked)}if(d.success!=null){m.success=String(d.success)}if(d.error!=null){m.error=String(d.error)}if(d.active_auth_provider_id!=null){m.active_auth_provider_id=String(d.active_auth_provider_id)}if(d.provider!=null){m.provider=String(d.provider)}return m};LinkLoginTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.linked=false;d.success="";d.error="";d.active_auth_provider_id="";d.provider=""}if(m.linked!=null&&m.hasOwnProperty("linked")){d.linked=m.linked}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.error!=null&&m.hasOwnProperty("error")){d.error=m.error}if(m.active_auth_provider_id!=null&&m.hasOwnProperty("active_auth_provider_id")){d.active_auth_provider_id=m.active_auth_provider_id}if(m.provider!=null&&m.hasOwnProperty("provider")){d.provider=m.provider}return d};LinkLoginTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return LinkLoginTelemetry}();Telemetry.LoginActionTelemetry=function(){function LoginActionTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LoginActionTelemetry.prototype.login_action_id=0;LoginActionTelemetry.prototype.first_time=false;LoginActionTelemetry.prototype.success=false;LoginActionTelemetry.prototype.intent_existing=false;LoginActionTelemetry.prototype.error="";LoginActionTelemetry.prototype.auth_status="";LoginActionTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.login_action_id!=null&&m.hasOwnProperty("login_action_id"))w.uint32(8).int32(m.login_action_id);if(m.first_time!=null&&m.hasOwnProperty("first_time"))w.uint32(16).bool(m.first_time);if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(24).bool(m.success);if(m.intent_existing!=null&&m.hasOwnProperty("intent_existing"))w.uint32(32).bool(m.intent_existing);if(m.error!=null&&m.hasOwnProperty("error"))w.uint32(42).string(m.error);if(m.auth_status!=null&&m.hasOwnProperty("auth_status"))w.uint32(50).string(m.auth_status);return w};LoginActionTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.LoginActionTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.login_action_id=r.int32();break;case 2:m.first_time=r.bool();break;case 3:m.success=r.bool();break;case 4:m.intent_existing=r.bool();break;case 5:m.error=r.string();break;case 6:m.auth_status=r.string();break;default:r.skipType(t&7);break}}return m};LoginActionTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.LoginActionTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.LoginActionTelemetry;switch(d.login_action_id){case"UNDEFINED_LOGIN_ACTION":case 0:m.login_action_id=0;break;case"CLICK_AGE_GATE":case 1:m.login_action_id=1;break;case"CLICK_NEW_PLAYER":case 2:m.login_action_id=2;break;case"CLICK_EXISTING_PLAYER":case 3:m.login_action_id=3;break;case"CLICK_GOOGLE":case 4:m.login_action_id=4;break;case"COMPLETE_GOOGLE":case 5:m.login_action_id=5;break;case"CANCEL_GOOGLE":case 6:m.login_action_id=6;break;case"CLICK_FACEBOOK":case 7:m.login_action_id=7;break;case"COMPLETE_FACEBOOK":case 8:m.login_action_id=8;break;case"CANCEL_FACEBOOK":case 9:m.login_action_id=9;break;case"CLICK_PTC":case 10:m.login_action_id=10;break;case"EXIT_PTC":case 11:m.login_action_id=11;break;case"CLICK_PTC_REGISTER":case 12:m.login_action_id=12;break;case"CLICK_PTC_SIGN_IN":case 13:m.login_action_id=13;break;case"CANCEL_PTC_SIGN_IN":case 14:m.login_action_id=14;break;case"COMPLETE_PTC_SIGN_IN":case 15:m.login_action_id=15;break;case"CLICK_SUPERAWESOME":case 16:m.login_action_id=16;break;case"EXIT_SUPERAWESOME":case 17:m.login_action_id=17;break;case"CLICK_SUPERAWESOME_REGISTER":case 18:m.login_action_id=18;break;case"CLICK_SUPERAWESOME_FORGOT_PASSWORD":case 19:m.login_action_id=19;break;case"CLICK_SUPERAWESOME_SIGN_IN":case 20:m.login_action_id=20;break;case"CANCEL_SUPERAWESOME_SIGN_IN":case 21:m.login_action_id=21;break;case"COMPLETE_SUPERAWESOME_SIGN_IN":case 22:m.login_action_id=22;break;case"EXIT_NEW_PLAYER":case 23:m.login_action_id=23;break;case"EXIT_EXISTING_PLAYER":case 24:m.login_action_id=24;break;case"LOGIN_STARTED":case 25:m.login_action_id=25;break}if(d.first_time!=null){m.first_time=Boolean(d.first_time)}if(d.success!=null){m.success=Boolean(d.success)}if(d.intent_existing!=null){m.intent_existing=Boolean(d.intent_existing)}if(d.error!=null){m.error=String(d.error)}if(d.auth_status!=null){m.auth_status=String(d.auth_status)}return m};LoginActionTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.login_action_id=o.enums===String?"UNDEFINED_LOGIN_ACTION":0;d.first_time=false;d.success=false;d.intent_existing=false;d.error="";d.auth_status=""}if(m.login_action_id!=null&&m.hasOwnProperty("login_action_id")){d.login_action_id=o.enums===String?$root.POGOProtos.Enums.LoginActionTelemetryIds[m.login_action_id]:m.login_action_id}if(m.first_time!=null&&m.hasOwnProperty("first_time")){d.first_time=m.first_time}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.intent_existing!=null&&m.hasOwnProperty("intent_existing")){d.intent_existing=m.intent_existing}if(m.error!=null&&m.hasOwnProperty("error")){d.error=m.error}if(m.auth_status!=null&&m.hasOwnProperty("auth_status")){d.auth_status=m.auth_status}return d};LoginActionTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return LoginActionTelemetry}();Telemetry.MapEventsTelemetry=function(){function MapEventsTelemetry(p){this.guard_pokemon_level=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}MapEventsTelemetry.prototype.map_event_click_id=0;MapEventsTelemetry.prototype.fort_id="";MapEventsTelemetry.prototype.guard_pokemon_level=$util.emptyArray;MapEventsTelemetry.prototype.team=0;MapEventsTelemetry.prototype.is_player_in_range=false;MapEventsTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.map_event_click_id!=null&&m.hasOwnProperty("map_event_click_id"))w.uint32(8).int32(m.map_event_click_id);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(18).string(m.fort_id);if(m.guard_pokemon_level!=null&&m.guard_pokemon_level.length){w.uint32(26).fork();for(var i=0;i<m.guard_pokemon_level.length;++i)w.int32(m.guard_pokemon_level[i]);w.ldelim()}if(m.team!=null&&m.hasOwnProperty("team"))w.uint32(32).int32(m.team);if(m.is_player_in_range!=null&&m.hasOwnProperty("is_player_in_range"))w.uint32(40).bool(m.is_player_in_range);return w};MapEventsTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.MapEventsTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.map_event_click_id=r.int32();break;case 2:m.fort_id=r.string();break;case 3:if(!(m.guard_pokemon_level&&m.guard_pokemon_level.length))m.guard_pokemon_level=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.guard_pokemon_level.push(r.int32())}else m.guard_pokemon_level.push(r.int32());break;case 4:m.team=r.int32();break;case 5:m.is_player_in_range=r.bool();break;default:r.skipType(t&7);break}}return m};MapEventsTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.MapEventsTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.MapEventsTelemetry;switch(d.map_event_click_id){case"UNDEFINED_MAP_EVENT":case 0:m.map_event_click_id=0;break;case"ITEM_BAG":case 1:m.map_event_click_id=1;break;case"MAIN_MENU":case 2:m.map_event_click_id=2;break;case"POKEDEX":case 3:m.map_event_click_id=3;break;case"PROFILE":case 4:m.map_event_click_id=4;break;case"SETTINGS":case 5:m.map_event_click_id=5;break;case"SHOP_FROM_MAP":case 6:m.map_event_click_id=6;break;case"GYM":case 7:m.map_event_click_id=7;break;case"POKESTOP":case 8:m.map_event_click_id=8;break;case"RESEARCH":case 9:m.map_event_click_id=9;break;case"COMPASS":case 10:m.map_event_click_id=10;break;case"NEARBY":case 11:m.map_event_click_id=11;break}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.guard_pokemon_level){if(!Array.isArray(d.guard_pokemon_level))throw TypeError(".POGOProtos.Data.Telemetry.MapEventsTelemetry.guard_pokemon_level: array expected");m.guard_pokemon_level=[];for(var i=0;i<d.guard_pokemon_level.length;++i){m.guard_pokemon_level[i]=d.guard_pokemon_level[i]|0}}if(d.team!=null){m.team=d.team|0}if(d.is_player_in_range!=null){m.is_player_in_range=Boolean(d.is_player_in_range)}return m};MapEventsTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.guard_pokemon_level=[]}if(o.defaults){d.map_event_click_id=o.enums===String?"UNDEFINED_MAP_EVENT":0;d.fort_id="";d.team=0;d.is_player_in_range=false}if(m.map_event_click_id!=null&&m.hasOwnProperty("map_event_click_id")){d.map_event_click_id=o.enums===String?$root.POGOProtos.Enums.MapEventsTelemetryIds[m.map_event_click_id]:m.map_event_click_id}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.guard_pokemon_level&&m.guard_pokemon_level.length){d.guard_pokemon_level=[];for(var j=0;j<m.guard_pokemon_level.length;++j){d.guard_pokemon_level[j]=m.guard_pokemon_level[j]}}if(m.team!=null&&m.hasOwnProperty("team")){d.team=m.team}if(m.is_player_in_range!=null&&m.hasOwnProperty("is_player_in_range")){d.is_player_in_range=m.is_player_in_range}return d};MapEventsTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return MapEventsTelemetry}();Telemetry.NewsPageTelemetry=function(){function NewsPageTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}NewsPageTelemetry.prototype.news_page_click_id=0;NewsPageTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.news_page_click_id!=null&&m.hasOwnProperty("news_page_click_id"))w.uint32(8).int32(m.news_page_click_id);return w};NewsPageTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.NewsPageTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.news_page_click_id=r.int32();break;default:r.skipType(t&7);break}}return m};NewsPageTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.NewsPageTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.NewsPageTelemetry;switch(d.news_page_click_id){case"UNDEFINED_NEWS_EVENT":case 0:m.news_page_click_id=0;break;case"NEWS_VIEWED":case 1:m.news_page_click_id=1;break;case"NEWS_DISMISSED":case 2:m.news_page_click_id=2;break;case"NEWS_LINK_CLICKED":case 3:m.news_page_click_id=3;break;case"NEWS_UPDATED_APP":case 4:m.news_page_click_id=4;break}return m};NewsPageTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.news_page_click_id=o.enums===String?"UNDEFINED_NEWS_EVENT":0}if(m.news_page_click_id!=null&&m.hasOwnProperty("news_page_click_id")){d.news_page_click_id=o.enums===String?$root.POGOProtos.Enums.NewsPageTelemetryIds[m.news_page_click_id]:m.news_page_click_id}return d};NewsPageTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return NewsPageTelemetry}();Telemetry.NicknamePokemonTelemetry=function(){function NicknamePokemonTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}NicknamePokemonTelemetry.prototype.pokemon=null;NicknamePokemonTelemetry.prototype.nickname="";NicknamePokemonTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon!=null&&m.hasOwnProperty("pokemon"))$root.POGOProtos.Data.Telemetry.PokemonTelemetry.encode(m.pokemon,w.uint32(10).fork()).ldelim();if(m.nickname!=null&&m.hasOwnProperty("nickname"))w.uint32(18).string(m.nickname);return w};NicknamePokemonTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.NicknamePokemonTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.decode(r,r.uint32());break;case 2:m.nickname=r.string();break;default:r.skipType(t&7);break}}return m};NicknamePokemonTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.NicknamePokemonTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.NicknamePokemonTelemetry;if(d.pokemon!=null){if(typeof d.pokemon!=="object")throw TypeError(".POGOProtos.Data.Telemetry.NicknamePokemonTelemetry.pokemon: object expected");m.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.fromObject(d.pokemon)}if(d.nickname!=null){m.nickname=String(d.nickname)}return m};NicknamePokemonTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon=null;d.nickname=""}if(m.pokemon!=null&&m.hasOwnProperty("pokemon")){d.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.toObject(m.pokemon,o)}if(m.nickname!=null&&m.hasOwnProperty("nickname")){d.nickname=m.nickname}return d};NicknamePokemonTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return NicknamePokemonTelemetry}();Telemetry.OnboardingTelemetry=function(){function OnboardingTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OnboardingTelemetry.prototype.onboarding_path=0;OnboardingTelemetry.prototype.event_id=0;OnboardingTelemetry.prototype.data=0;OnboardingTelemetry.prototype.conversation="";OnboardingTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.onboarding_path!=null&&m.hasOwnProperty("onboarding_path"))w.uint32(8).int32(m.onboarding_path);if(m.event_id!=null&&m.hasOwnProperty("event_id"))w.uint32(16).int32(m.event_id);if(m.data!=null&&m.hasOwnProperty("data"))w.uint32(24).int32(m.data);if(m.conversation!=null&&m.hasOwnProperty("conversation"))w.uint32(34).string(m.conversation);return w};OnboardingTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.OnboardingTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.onboarding_path=r.int32();break;case 2:m.event_id=r.int32();break;case 3:m.data=r.int32();break;case 4:m.conversation=r.string();break;default:r.skipType(t&7);break}}return m};OnboardingTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.OnboardingTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.OnboardingTelemetry;switch(d.onboarding_path){case"V1":case 0:m.onboarding_path=0;break;case"V2":case 1:m.onboarding_path=1;break}switch(d.event_id){case"TOS_ACCEPTED":case 0:m.event_id=0;break;case"PRIVACY_ACCEPTED":case 1:m.event_id=1;break;case"CONVERSATION":case 2:m.event_id=2;break;case"ENCOUNTER_ENTER":case 3:m.event_id=3;break;case"ENCOUNTER_LEAVE":case 4:m.event_id=4;break;case"AVATAR_SELECTION_ONBOARDING":case 5:m.event_id=5;break;case"AVATAR_GENDER":case 6:m.event_id=6;break;case"AVATAR_GENDER_CHOSEN":case 7:m.event_id=7;break;case"AVATAR_HEAD_CHOSEN":case 8:m.event_id=8;break;case"AVATAR_BODY_CHOSEN":case 9:m.event_id=9;break;case"AVATAR_TRY_AGAIN":case 10:m.event_id=10;break;case"AVATAR_ACCEPTED":case 11:m.event_id=11;break;case"NAME_ENTRY":case 12:m.event_id=12;break;case"NAME_UNAVAILABLE":case 13:m.event_id=13;break;case"NAME_ACCEPTED":case 14:m.event_id=14;break;case"POKEDEX_TUTORIAL_STARTED":case 15:m.event_id=15;break;case"POKEDEX_TUTORIAL_INFO_PANEL_EXIT_PRESSED":case 16:m.event_id=16;break;case"POKEDEX_EXIT_PRESSED":case 17:m.event_id=17;break;case"EGG_TUTORIAL_STARTED":case 18:m.event_id=18;break;case"EGG_TUTORIAL_PRESS":case 19:m.event_id=19;break;case"EGG_TUTORIAL_FINISHED":case 20:m.event_id=20;break;case"POKESTOP_LETSGO":case 21:m.event_id=21;break;case"WILD_POKEMON_ENCOUNTER_ENTERED":case 22:m.event_id=22;break;case"WILD_POKEMON_CAUGHT":case 23:m.event_id=23;break;case"AR_STANDARD_ENABLED":case 24:m.event_id=24;break;case"AR_STANDARD_REJECTED":case 25:m.event_id=25;break;case"AR_PLUS_ENABLED":case 26:m.event_id=26;break;case"AR_PLUS_REJECTED":case 27:m.event_id=27;break}if(d.data!=null){m.data=d.data|0}if(d.conversation!=null){m.conversation=String(d.conversation)}return m};OnboardingTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.onboarding_path=o.enums===String?"V1":0;d.event_id=o.enums===String?"TOS_ACCEPTED":0;d.data=0;d.conversation=""}if(m.onboarding_path!=null&&m.hasOwnProperty("onboarding_path")){d.onboarding_path=o.enums===String?$root.POGOProtos.Enums.OnboardingPathIds[m.onboarding_path]:m.onboarding_path}if(m.event_id!=null&&m.hasOwnProperty("event_id")){d.event_id=o.enums===String?$root.POGOProtos.Enums.OnboardingEventIds[m.event_id]:m.event_id}if(m.data!=null&&m.hasOwnProperty("data")){d.data=m.data}if(m.conversation!=null&&m.hasOwnProperty("conversation")){d.conversation=m.conversation}return d};OnboardingTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return OnboardingTelemetry}();Telemetry.PasscodeRedeemTelemetry=function(){function PasscodeRedeemTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PasscodeRedeemTelemetry.prototype.result="";PasscodeRedeemTelemetry.prototype.passcode="";PasscodeRedeemTelemetry.prototype.country_code="";PasscodeRedeemTelemetry.prototype.language_code="";PasscodeRedeemTelemetry.prototype.bundle_version="";PasscodeRedeemTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(10).string(m.result);if(m.passcode!=null&&m.hasOwnProperty("passcode"))w.uint32(18).string(m.passcode);if(m.country_code!=null&&m.hasOwnProperty("country_code"))w.uint32(26).string(m.country_code);if(m.language_code!=null&&m.hasOwnProperty("language_code"))w.uint32(34).string(m.language_code);if(m.bundle_version!=null&&m.hasOwnProperty("bundle_version"))w.uint32(42).string(m.bundle_version);return w};PasscodeRedeemTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.PasscodeRedeemTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.string();break;case 2:m.passcode=r.string();break;case 3:m.country_code=r.string();break;case 4:m.language_code=r.string();break;case 5:m.bundle_version=r.string();break;default:r.skipType(t&7);break}}return m};PasscodeRedeemTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.PasscodeRedeemTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.PasscodeRedeemTelemetry;if(d.result!=null){m.result=String(d.result)}if(d.passcode!=null){m.passcode=String(d.passcode)}if(d.country_code!=null){m.country_code=String(d.country_code)}if(d.language_code!=null){m.language_code=String(d.language_code)}if(d.bundle_version!=null){m.bundle_version=String(d.bundle_version)}return m};PasscodeRedeemTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result="";d.passcode="";d.country_code="";d.language_code="";d.bundle_version=""}if(m.result!=null&&m.hasOwnProperty("result")){d.result=m.result}if(m.passcode!=null&&m.hasOwnProperty("passcode")){d.passcode=m.passcode}if(m.country_code!=null&&m.hasOwnProperty("country_code")){d.country_code=m.country_code}if(m.language_code!=null&&m.hasOwnProperty("language_code")){d.language_code=m.language_code}if(m.bundle_version!=null&&m.hasOwnProperty("bundle_version")){d.bundle_version=m.bundle_version}return d};PasscodeRedeemTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PasscodeRedeemTelemetry}();Telemetry.PermissionsFlowTelemetry=function(){function PermissionsFlowTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PermissionsFlowTelemetry.prototype.permission_context_telemetry_ids=0;PermissionsFlowTelemetry.prototype.device_service_telemetry_ids=0;PermissionsFlowTelemetry.prototype.permission_flow_step_telemetry_ids=0;PermissionsFlowTelemetry.prototype.success=false;PermissionsFlowTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.permission_context_telemetry_ids!=null&&m.hasOwnProperty("permission_context_telemetry_ids"))w.uint32(8).int32(m.permission_context_telemetry_ids);if(m.device_service_telemetry_ids!=null&&m.hasOwnProperty("device_service_telemetry_ids"))w.uint32(16).int32(m.device_service_telemetry_ids);if(m.permission_flow_step_telemetry_ids!=null&&m.hasOwnProperty("permission_flow_step_telemetry_ids"))w.uint32(24).int32(m.permission_flow_step_telemetry_ids);if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(32).bool(m.success);return w};PermissionsFlowTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.PermissionsFlowTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.permission_context_telemetry_ids=r.int32();break;case 2:m.device_service_telemetry_ids=r.int32();break;case 3:m.permission_flow_step_telemetry_ids=r.int32();break;case 4:m.success=r.bool();break;default:r.skipType(t&7);break}}return m};PermissionsFlowTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.PermissionsFlowTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.PermissionsFlowTelemetry;switch(d.permission_context_telemetry_ids){case"UNDEFINED_PERMISSION_CONTEXT":case 0:m.permission_context_telemetry_ids=0;break;case"EGG_HATCH":case 1:m.permission_context_telemetry_ids=1;break;case"BUDDY_CANDY_FOUND":case 2:m.permission_context_telemetry_ids=2;break;case"PLAYER_PROFILE_CLICKED":case 3:m.permission_context_telemetry_ids=3;break;case"SMART_WATCH_INSTALLED":case 4:m.permission_context_telemetry_ids=4;break;case"SFIDA_SESSION_STARTED":case 5:m.permission_context_telemetry_ids=5;break;case"SETTINGS_TOGGLE":case 6:m.permission_context_telemetry_ids=6;break}switch(d.device_service_telemetry_ids){case"UNDEFINED_DEVICE_SERVICE":case 0:m.device_service_telemetry_ids=0;break;case"FITNESS":case 1:m.device_service_telemetry_ids=1;break;case"SMART_WATCH":case 2:m.device_service_telemetry_ids=2;break;case"SFIDA_DEVICE_SERVICE":case 3:m.device_service_telemetry_ids=3;break}switch(d.permission_flow_step_telemetry_ids){case"UNDEFINED_PERMISSION_FLOW_STEP":case 0:m.permission_flow_step_telemetry_ids=0;break;case"INITIAL_PROMPT":case 1:m.permission_flow_step_telemetry_ids=1;break;case"FITNESS_PERMISSION":case 2:m.permission_flow_step_telemetry_ids=2;break;case"LOCATION_PERMISSION":case 3:m.permission_flow_step_telemetry_ids=3;break}if(d.success!=null){m.success=Boolean(d.success)}return m};PermissionsFlowTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.permission_context_telemetry_ids=o.enums===String?"UNDEFINED_PERMISSION_CONTEXT":0;d.device_service_telemetry_ids=o.enums===String?"UNDEFINED_DEVICE_SERVICE":0;d.permission_flow_step_telemetry_ids=o.enums===String?"UNDEFINED_PERMISSION_FLOW_STEP":0;d.success=false}if(m.permission_context_telemetry_ids!=null&&m.hasOwnProperty("permission_context_telemetry_ids")){d.permission_context_telemetry_ids=o.enums===String?$root.POGOProtos.Enums.PermissionContextTelemetryIds[m.permission_context_telemetry_ids]:m.permission_context_telemetry_ids}if(m.device_service_telemetry_ids!=null&&m.hasOwnProperty("device_service_telemetry_ids")){d.device_service_telemetry_ids=o.enums===String?$root.POGOProtos.Enums.DeviceServiceTelemetryIds[m.device_service_telemetry_ids]:m.device_service_telemetry_ids}if(m.permission_flow_step_telemetry_ids!=null&&m.hasOwnProperty("permission_flow_step_telemetry_ids")){d.permission_flow_step_telemetry_ids=o.enums===String?$root.POGOProtos.Enums.PermissionFlowStepTelemetryIds[m.permission_flow_step_telemetry_ids]:m.permission_flow_step_telemetry_ids}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}return d};PermissionsFlowTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PermissionsFlowTelemetry}();Telemetry.PlatformMetricData=function(){function PlatformMetricData(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlatformMetricData.prototype.common_telemetry=null;PlatformMetricData.prototype.long_value=$util.Long?$util.Long.fromBits(0,0,false):0;PlatformMetricData.prototype.double_value=0;PlatformMetricData.prototype.boolean_value=false;PlatformMetricData.prototype.distribution=null;PlatformMetricData.prototype.metric_kind=0;var $oneOfFields;Object.defineProperty(PlatformMetricData.prototype,"DatapointValue",{get:$util.oneOfGetter($oneOfFields=["long_value","double_value","boolean_value","distribution"]),set:$util.oneOfSetter($oneOfFields)});PlatformMetricData.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.common_telemetry!=null&&m.hasOwnProperty("common_telemetry"))$root.POGOProtos.Data.Telemetry.TelemetryCommon.encode(m.common_telemetry,w.uint32(10).fork()).ldelim();if(m.long_value!=null&&m.hasOwnProperty("long_value"))w.uint32(16).int64(m.long_value);if(m.double_value!=null&&m.hasOwnProperty("double_value"))w.uint32(25).double(m.double_value);if(m.boolean_value!=null&&m.hasOwnProperty("boolean_value"))w.uint32(32).bool(m.boolean_value);if(m.distribution!=null&&m.hasOwnProperty("distribution"))$root.POGOProtos.Data.Telemetry.Distribution.encode(m.distribution,w.uint32(42).fork()).ldelim();if(m.metric_kind!=null&&m.hasOwnProperty("metric_kind"))w.uint32(48).int32(m.metric_kind);return w};PlatformMetricData.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.PlatformMetricData;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.common_telemetry=$root.POGOProtos.Data.Telemetry.TelemetryCommon.decode(r,r.uint32());break;case 2:m.long_value=r.int64();break;case 3:m.double_value=r.double();break;case 4:m.boolean_value=r.bool();break;case 5:m.distribution=$root.POGOProtos.Data.Telemetry.Distribution.decode(r,r.uint32());break;case 6:m.metric_kind=r.int32();break;default:r.skipType(t&7);break}}return m};PlatformMetricData.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.PlatformMetricData)return d;var m=new $root.POGOProtos.Data.Telemetry.PlatformMetricData;if(d.common_telemetry!=null){if(typeof d.common_telemetry!=="object")throw TypeError(".POGOProtos.Data.Telemetry.PlatformMetricData.common_telemetry: object expected");m.common_telemetry=$root.POGOProtos.Data.Telemetry.TelemetryCommon.fromObject(d.common_telemetry)}if(d.long_value!=null){if($util.Long)(m.long_value=$util.Long.fromValue(d.long_value)).unsigned=false;else if(typeof d.long_value==="string")m.long_value=parseInt(d.long_value,10);else if(typeof d.long_value==="number")m.long_value=d.long_value;else if(typeof d.long_value==="object")m.long_value=new $util.LongBits(d.long_value.low>>>0,d.long_value.high>>>0).toNumber()}if(d.double_value!=null){m.double_value=Number(d.double_value)}if(d.boolean_value!=null){m.boolean_value=Boolean(d.boolean_value)}if(d.distribution!=null){if(typeof d.distribution!=="object")throw TypeError(".POGOProtos.Data.Telemetry.PlatformMetricData.distribution: object expected");m.distribution=$root.POGOProtos.Data.Telemetry.Distribution.fromObject(d.distribution)}switch(d.metric_kind){case"UNSPECIFIED":case 0:m.metric_kind=0;break;case"GAUGE":case 1:m.metric_kind=1;break;case"DELTA":case 2:m.metric_kind=2;break;case"CUMULATIVE":case 3:m.metric_kind=3;break}return m};PlatformMetricData.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.common_telemetry=null;d.metric_kind=o.enums===String?"UNSPECIFIED":0}if(m.common_telemetry!=null&&m.hasOwnProperty("common_telemetry")){d.common_telemetry=$root.POGOProtos.Data.Telemetry.TelemetryCommon.toObject(m.common_telemetry,o)}if(m.long_value!=null&&m.hasOwnProperty("long_value")){if(typeof m.long_value==="number")d.long_value=o.longs===String?String(m.long_value):m.long_value;else d.long_value=o.longs===String?$util.Long.prototype.toString.call(m.long_value):o.longs===Number?new $util.LongBits(m.long_value.low>>>0,m.long_value.high>>>0).toNumber():m.long_value;if(o.oneofs)d.DatapointValue="long_value"}if(m.double_value!=null&&m.hasOwnProperty("double_value")){d.double_value=o.json&&!isFinite(m.double_value)?String(m.double_value):m.double_value;if(o.oneofs)d.DatapointValue="double_value"}if(m.boolean_value!=null&&m.hasOwnProperty("boolean_value")){d.boolean_value=m.boolean_value;if(o.oneofs)d.DatapointValue="boolean_value"}if(m.distribution!=null&&m.hasOwnProperty("distribution")){d.distribution=$root.POGOProtos.Data.Telemetry.Distribution.toObject(m.distribution,o);if(o.oneofs)d.DatapointValue="distribution"}if(m.metric_kind!=null&&m.hasOwnProperty("metric_kind")){d.metric_kind=o.enums===String?$root.POGOProtos.Data.Telemetry.PlatformMetricData.Kind[m.metric_kind]:m.metric_kind}return d};PlatformMetricData.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PlatformMetricData.Kind=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSPECIFIED"]=0;values[valuesById[1]="GAUGE"]=1;values[valuesById[2]="DELTA"]=2;values[valuesById[3]="CUMULATIVE"]=3;return values}();return PlatformMetricData}();Telemetry.PlatformServerData=function(){function PlatformServerData(p){this.experiment_ids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlatformServerData.prototype.user_id="";PlatformServerData.prototype.telemetry_id="";PlatformServerData.prototype.session_id="";PlatformServerData.prototype.experiment_ids=$util.emptyArray;PlatformServerData.prototype.event_request_id="";PlatformServerData.prototype.server_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;PlatformServerData.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.user_id!=null&&m.hasOwnProperty("user_id"))w.uint32(10).string(m.user_id);if(m.telemetry_id!=null&&m.hasOwnProperty("telemetry_id"))w.uint32(18).string(m.telemetry_id);if(m.session_id!=null&&m.hasOwnProperty("session_id"))w.uint32(26).string(m.session_id);if(m.experiment_ids!=null&&m.experiment_ids.length){w.uint32(34).fork();for(var i=0;i<m.experiment_ids.length;++i)w.int32(m.experiment_ids[i]);w.ldelim()}if(m.event_request_id!=null&&m.hasOwnProperty("event_request_id"))w.uint32(42).string(m.event_request_id);if(m.server_timestamp_ms!=null&&m.hasOwnProperty("server_timestamp_ms"))w.uint32(48).int64(m.server_timestamp_ms);return w};PlatformServerData.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.PlatformServerData;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.user_id=r.string();break;case 2:m.telemetry_id=r.string();break;case 3:m.session_id=r.string();break;case 4:if(!(m.experiment_ids&&m.experiment_ids.length))m.experiment_ids=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.experiment_ids.push(r.int32())}else m.experiment_ids.push(r.int32());break;case 5:m.event_request_id=r.string();break;case 6:m.server_timestamp_ms=r.int64();break;default:r.skipType(t&7);break}}return m};PlatformServerData.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.PlatformServerData)return d;var m=new $root.POGOProtos.Data.Telemetry.PlatformServerData;if(d.user_id!=null){m.user_id=String(d.user_id)}if(d.telemetry_id!=null){m.telemetry_id=String(d.telemetry_id)}if(d.session_id!=null){m.session_id=String(d.session_id)}if(d.experiment_ids){if(!Array.isArray(d.experiment_ids))throw TypeError(".POGOProtos.Data.Telemetry.PlatformServerData.experiment_ids: array expected");m.experiment_ids=[];for(var i=0;i<d.experiment_ids.length;++i){m.experiment_ids[i]=d.experiment_ids[i]|0}}if(d.event_request_id!=null){m.event_request_id=String(d.event_request_id)}if(d.server_timestamp_ms!=null){if($util.Long)(m.server_timestamp_ms=$util.Long.fromValue(d.server_timestamp_ms)).unsigned=false;else if(typeof d.server_timestamp_ms==="string")m.server_timestamp_ms=parseInt(d.server_timestamp_ms,10);else if(typeof d.server_timestamp_ms==="number")m.server_timestamp_ms=d.server_timestamp_ms;else if(typeof d.server_timestamp_ms==="object")m.server_timestamp_ms=new $util.LongBits(d.server_timestamp_ms.low>>>0,d.server_timestamp_ms.high>>>0).toNumber()}return m};PlatformServerData.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.experiment_ids=[]}if(o.defaults){d.user_id="";d.telemetry_id="";d.session_id="";d.event_request_id="";if($util.Long){var n=new $util.Long(0,0,false);d.server_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.server_timestamp_ms=o.longs===String?"0":0}if(m.user_id!=null&&m.hasOwnProperty("user_id")){d.user_id=m.user_id}if(m.telemetry_id!=null&&m.hasOwnProperty("telemetry_id")){d.telemetry_id=m.telemetry_id}if(m.session_id!=null&&m.hasOwnProperty("session_id")){d.session_id=m.session_id}if(m.experiment_ids&&m.experiment_ids.length){d.experiment_ids=[];for(var j=0;j<m.experiment_ids.length;++j){d.experiment_ids[j]=m.experiment_ids[j]}}if(m.event_request_id!=null&&m.hasOwnProperty("event_request_id")){d.event_request_id=m.event_request_id}if(m.server_timestamp_ms!=null&&m.hasOwnProperty("server_timestamp_ms")){if(typeof m.server_timestamp_ms==="number")d.server_timestamp_ms=o.longs===String?String(m.server_timestamp_ms):m.server_timestamp_ms;else d.server_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.server_timestamp_ms):o.longs===Number?new $util.LongBits(m.server_timestamp_ms.low>>>0,m.server_timestamp_ms.high>>>0).toNumber():m.server_timestamp_ms}return d};PlatformServerData.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlatformServerData}();Telemetry.PokemonGoPlusTelemetry=function(){function PokemonGoPlusTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokemonGoPlusTelemetry.prototype.pgp_event_ids=0;PokemonGoPlusTelemetry.prototype.count=0;PokemonGoPlusTelemetry.prototype.version=0;PokemonGoPlusTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pgp_event_ids!=null&&m.hasOwnProperty("pgp_event_ids"))w.uint32(8).int32(m.pgp_event_ids);if(m.count!=null&&m.hasOwnProperty("count"))w.uint32(16).int32(m.count);if(m.version!=null&&m.hasOwnProperty("version"))w.uint32(24).int32(m.version);return w};PokemonGoPlusTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.PokemonGoPlusTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pgp_event_ids=r.int32();break;case 2:m.count=r.int32();break;case 3:m.version=r.int32();break;default:r.skipType(t&7);break}}return m};PokemonGoPlusTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.PokemonGoPlusTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.PokemonGoPlusTelemetry;switch(d.pgp_event_ids){case"UNDEFINED_POKEMON_GO_PLUS_EVENT":case 0:m.pgp_event_ids=0;break;case"CANNOT_CONNECT_TO_PGP":case 1:m.pgp_event_ids=1;break;case"REGISTERING_PGP_FAILED":case 2:m.pgp_event_ids=2;break;case"REGISTERING_RETRY":case 3:m.pgp_event_ids=3;break;case"CONNECTION_SUCCESS":case 4:m.pgp_event_ids=4;break;case"PGP_DISCONNECTED_BY_USER":case 5:m.pgp_event_ids=5;break;case"PGP_DISCONNECTED_BY_TIMEOUT":case 6:m.pgp_event_ids=6;break;case"PGP_DISCONNECTED_BY_ERROR":case 7:m.pgp_event_ids=7;break;case"PGP_LOW_BATTERY":case 8:m.pgp_event_ids=8;break;case"BLUETOOTH_SENT_ERROR":case 9:m.pgp_event_ids=9;break;case"PGP_SEEN_BY_DEVICE":case 10:m.pgp_event_ids=10;break;case"POKEMON_CAUGHT":case 11:m.pgp_event_ids=11;break;case"POKEMON_NOT_CAUGHT":case 12:m.pgp_event_ids=12;break;case"POKEMON_NOT_CAUGHT_DUE_ERROR":case 13:m.pgp_event_ids=13;break;case"POKESTOP_SPUN":case 14:m.pgp_event_ids=14;break;case"POKESTOP_NOT_SPUN_DUE_ERROR":case 15:m.pgp_event_ids=15;break}if(d.count!=null){m.count=d.count|0}if(d.version!=null){m.version=d.version|0}return m};PokemonGoPlusTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pgp_event_ids=o.enums===String?"UNDEFINED_POKEMON_GO_PLUS_EVENT":0;d.count=0;d.version=0}if(m.pgp_event_ids!=null&&m.hasOwnProperty("pgp_event_ids")){d.pgp_event_ids=o.enums===String?$root.POGOProtos.Enums.PokemonGoPlusIds[m.pgp_event_ids]:m.pgp_event_ids}if(m.count!=null&&m.hasOwnProperty("count")){d.count=m.count}if(m.version!=null&&m.hasOwnProperty("version")){d.version=m.version}return d};PokemonGoPlusTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokemonGoPlusTelemetry}();Telemetry.PokemonInventoryTelemetry=function(){function PokemonInventoryTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokemonInventoryTelemetry.prototype.pokemon_inventory_click_ids=0;PokemonInventoryTelemetry.prototype.sort_id="";PokemonInventoryTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_inventory_click_ids!=null&&m.hasOwnProperty("pokemon_inventory_click_ids"))w.uint32(8).int32(m.pokemon_inventory_click_ids);if(m.sort_id!=null&&m.hasOwnProperty("sort_id"))w.uint32(18).string(m.sort_id);return w};PokemonInventoryTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.PokemonInventoryTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_inventory_click_ids=r.int32();break;case 2:m.sort_id=r.string();break;default:r.skipType(t&7);break}}return m};PokemonInventoryTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.PokemonInventoryTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.PokemonInventoryTelemetry;switch(d.pokemon_inventory_click_ids){case"UNDEFINED_POKEMON_INVENTORY_EVENT":case 0:m.pokemon_inventory_click_ids=0;break;case"OPEN":case 1:m.pokemon_inventory_click_ids=1;break;case"SORTING_CHANGE":case 2:m.pokemon_inventory_click_ids=2;break;case"FILTER":case 3:m.pokemon_inventory_click_ids=3;break}if(d.sort_id!=null){m.sort_id=String(d.sort_id)}return m};PokemonInventoryTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon_inventory_click_ids=o.enums===String?"UNDEFINED_POKEMON_INVENTORY_EVENT":0;d.sort_id=""}if(m.pokemon_inventory_click_ids!=null&&m.hasOwnProperty("pokemon_inventory_click_ids")){d.pokemon_inventory_click_ids=o.enums===String?$root.POGOProtos.Enums.PokemonInventoryTelemetryIds[m.pokemon_inventory_click_ids]:m.pokemon_inventory_click_ids}if(m.sort_id!=null&&m.hasOwnProperty("sort_id")){d.sort_id=m.sort_id}return d};PokemonInventoryTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokemonInventoryTelemetry}();Telemetry.PokemonTelemetry=function(){function PokemonTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokemonTelemetry.prototype.pokemon_id=0;PokemonTelemetry.prototype.cp=0;PokemonTelemetry.prototype.weight_kg=0;PokemonTelemetry.prototype.height_m=0;PokemonTelemetry.prototype.pokemon_level=0;PokemonTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(8).int32(m.pokemon_id);if(m.cp!=null&&m.hasOwnProperty("cp"))w.uint32(16).int32(m.cp);if(m.weight_kg!=null&&m.hasOwnProperty("weight_kg"))w.uint32(29).float(m.weight_kg);if(m.height_m!=null&&m.hasOwnProperty("height_m"))w.uint32(37).float(m.height_m);if(m.pokemon_level!=null&&m.hasOwnProperty("pokemon_level"))w.uint32(40).int32(m.pokemon_level);return w};PokemonTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.PokemonTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.int32();break;case 2:m.cp=r.int32();break;case 3:m.weight_kg=r.float();break;case 4:m.height_m=r.float();break;case 5:m.pokemon_level=r.int32();break;default:r.skipType(t&7);break}}return m};PokemonTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.PokemonTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.PokemonTelemetry;if(d.pokemon_id!=null){m.pokemon_id=d.pokemon_id|0}if(d.cp!=null){m.cp=d.cp|0}if(d.weight_kg!=null){m.weight_kg=Number(d.weight_kg)}if(d.height_m!=null){m.height_m=Number(d.height_m)}if(d.pokemon_level!=null){m.pokemon_level=d.pokemon_level|0}return m};PokemonTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon_id=0;d.cp=0;d.weight_kg=0;d.height_m=0;d.pokemon_level=0}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){d.pokemon_id=m.pokemon_id}if(m.cp!=null&&m.hasOwnProperty("cp")){d.cp=m.cp}if(m.weight_kg!=null&&m.hasOwnProperty("weight_kg")){d.weight_kg=o.json&&!isFinite(m.weight_kg)?String(m.weight_kg):m.weight_kg}if(m.height_m!=null&&m.hasOwnProperty("height_m")){d.height_m=o.json&&!isFinite(m.height_m)?String(m.height_m):m.height_m}if(m.pokemon_level!=null&&m.hasOwnProperty("pokemon_level")){d.pokemon_level=m.pokemon_level}return d};PokemonTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokemonTelemetry}();Telemetry.PokestopReward=function(){function PokestopReward(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokestopReward.prototype.item_id=0;PokestopReward.prototype.item_count=0;PokestopReward.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(8).int32(m.item_id);if(m.item_count!=null&&m.hasOwnProperty("item_count"))w.uint32(16).int32(m.item_count);return w};PokestopReward.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.PokestopReward;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.int32();break;case 2:m.item_count=r.int32();break;default:r.skipType(t&7);break}}return m};PokestopReward.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.PokestopReward)return d;var m=new $root.POGOProtos.Data.Telemetry.PokestopReward;if(d.item_id!=null){m.item_id=d.item_id|0}if(d.item_count!=null){m.item_count=d.item_count|0}return m};PokestopReward.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id=0;d.item_count=0}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=m.item_id}if(m.item_count!=null&&m.hasOwnProperty("item_count")){d.item_count=m.item_count}return d};PokestopReward.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokestopReward}();Telemetry.ProfilePageTelemetry=function(){function ProfilePageTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ProfilePageTelemetry.prototype.profile_page_click_id=0;ProfilePageTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.profile_page_click_id!=null&&m.hasOwnProperty("profile_page_click_id"))w.uint32(8).int32(m.profile_page_click_id);return w};ProfilePageTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.ProfilePageTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.profile_page_click_id=r.int32();break;default:r.skipType(t&7);break}}return m};ProfilePageTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.ProfilePageTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.ProfilePageTelemetry;switch(d.profile_page_click_id){case"UNDEFINED_PROFILE_PAGE":case 0:m.profile_page_click_id=0;break;case"SHOP_FROM_PROFILE":case 1:m.profile_page_click_id=1;break;case"LOG":case 2:m.profile_page_click_id=2;break;case"SET_BUDDY":case 3:m.profile_page_click_id=3;break;case"CUSTOMIZE_AVATAR":case 4:m.profile_page_click_id=4;break}return m};ProfilePageTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.profile_page_click_id=o.enums===String?"UNDEFINED_PROFILE_PAGE":0}if(m.profile_page_click_id!=null&&m.hasOwnProperty("profile_page_click_id")){d.profile_page_click_id=o.enums===String?$root.POGOProtos.Enums.ProfilePageTelemetryIds[m.profile_page_click_id]:m.profile_page_click_id}return d};ProfilePageTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ProfilePageTelemetry}();Telemetry.PushNotificationTelemetry=function(){function PushNotificationTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PushNotificationTelemetry.prototype.notification_id=0;PushNotificationTelemetry.prototype.category="";PushNotificationTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.notification_id!=null&&m.hasOwnProperty("notification_id"))w.uint32(8).int32(m.notification_id);if(m.category!=null&&m.hasOwnProperty("category"))w.uint32(18).string(m.category);return w};PushNotificationTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.PushNotificationTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.notification_id=r.int32();break;case 2:m.category=r.string();break;default:r.skipType(t&7);break}}return m};PushNotificationTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.PushNotificationTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.PushNotificationTelemetry;switch(d.notification_id){case"UNDEFINED_PUSH_NOTIFICATION_EVENT":case 0:m.notification_id=0;break;case"OPEN_APP":case 1:m.notification_id=1;break}if(d.category!=null){m.category=String(d.category)}return m};PushNotificationTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.notification_id=o.enums===String?"UNDEFINED_PUSH_NOTIFICATION_EVENT":0;d.category=""}if(m.notification_id!=null&&m.hasOwnProperty("notification_id")){d.notification_id=o.enums===String?$root.POGOProtos.Enums.PushNotificationTelemetryIds[m.notification_id]:m.notification_id}if(m.category!=null&&m.hasOwnProperty("category")){d.category=m.category}return d};PushNotificationTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PushNotificationTelemetry}();Telemetry.RaidTelemetry=function(){function RaidTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RaidTelemetry.prototype.raid_telemetry_id=0;RaidTelemetry.prototype.bundle_version="";RaidTelemetry.prototype.time_since_enter_raid=0;RaidTelemetry.prototype.time_since_last_raid_telemetry=0;RaidTelemetry.prototype.raid_level=0;RaidTelemetry.prototype.private_lobby=false;RaidTelemetry.prototype.ticket_item="";RaidTelemetry.prototype.num_players_in_lobby=0;RaidTelemetry.prototype.battle_party_number=0;RaidTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.raid_telemetry_id!=null&&m.hasOwnProperty("raid_telemetry_id"))w.uint32(8).int32(m.raid_telemetry_id);if(m.bundle_version!=null&&m.hasOwnProperty("bundle_version"))w.uint32(18).string(m.bundle_version);if(m.time_since_enter_raid!=null&&m.hasOwnProperty("time_since_enter_raid"))w.uint32(29).float(m.time_since_enter_raid);if(m.time_since_last_raid_telemetry!=null&&m.hasOwnProperty("time_since_last_raid_telemetry"))w.uint32(37).float(m.time_since_last_raid_telemetry);if(m.raid_level!=null&&m.hasOwnProperty("raid_level"))w.uint32(40).int32(m.raid_level);if(m.private_lobby!=null&&m.hasOwnProperty("private_lobby"))w.uint32(48).bool(m.private_lobby);if(m.ticket_item!=null&&m.hasOwnProperty("ticket_item"))w.uint32(58).string(m.ticket_item);if(m.num_players_in_lobby!=null&&m.hasOwnProperty("num_players_in_lobby"))w.uint32(64).int32(m.num_players_in_lobby);if(m.battle_party_number!=null&&m.hasOwnProperty("battle_party_number"))w.uint32(72).int32(m.battle_party_number);return w};RaidTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.RaidTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.raid_telemetry_id=r.int32();break;case 2:m.bundle_version=r.string();break;case 3:m.time_since_enter_raid=r.float();break;case 4:m.time_since_last_raid_telemetry=r.float();break;case 5:m.raid_level=r.int32();break;case 6:m.private_lobby=r.bool();break;case 7:m.ticket_item=r.string();break;case 8:m.num_players_in_lobby=r.int32();break;case 9:m.battle_party_number=r.int32();break;default:r.skipType(t&7);break}}return m};RaidTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.RaidTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.RaidTelemetry;switch(d.raid_telemetry_id){case"UNDEFINED_RAID_EVENT":case 0:m.raid_telemetry_id=0;break;case"APPROACH_ENTER":case 1:m.raid_telemetry_id=1;break;case"APPROACH_CLICK_SPINNER":case 2:m.raid_telemetry_id=2;break;case"APPROACH_JOIN":case 3:m.raid_telemetry_id=3;break;case"APPROACH_TICKET_CONFIRMATION":case 4:m.raid_telemetry_id=4;break;case"APPROACH_CLICK_TUTORIAL":case 5:m.raid_telemetry_id=5;break;case"APPROACH_CLICK_SHOP":case 6:m.raid_telemetry_id=6;break;case"APPROACH_CLICK_INSPECT":case 7:m.raid_telemetry_id=7;break;case"LOBBY_ENTER":case 8:m.raid_telemetry_id=8;break;case"LOBBY_CLICK_INVENTORY":case 9:m.raid_telemetry_id=9;break;case"LOBBY_CLICK_EXIT":case 10:m.raid_telemetry_id=10;break;case"LOBBY_TAP_AVATAR":case 11:m.raid_telemetry_id=11;break;case"LOBBY_CLICK_REJOIN_BATTLE":case 12:m.raid_telemetry_id=12;break;case"LOBBY_CLICK_LOBBY_PUBLIC":case 13:m.raid_telemetry_id=13;break}if(d.bundle_version!=null){m.bundle_version=String(d.bundle_version)}if(d.time_since_enter_raid!=null){m.time_since_enter_raid=Number(d.time_since_enter_raid)}if(d.time_since_last_raid_telemetry!=null){m.time_since_last_raid_telemetry=Number(d.time_since_last_raid_telemetry)}if(d.raid_level!=null){m.raid_level=d.raid_level|0}if(d.private_lobby!=null){m.private_lobby=Boolean(d.private_lobby)}if(d.ticket_item!=null){m.ticket_item=String(d.ticket_item)}if(d.num_players_in_lobby!=null){m.num_players_in_lobby=d.num_players_in_lobby|0}if(d.battle_party_number!=null){m.battle_party_number=d.battle_party_number|0}return m};RaidTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.raid_telemetry_id=o.enums===String?"UNDEFINED_RAID_EVENT":0;d.bundle_version="";d.time_since_enter_raid=0;d.time_since_last_raid_telemetry=0;d.raid_level=0;d.private_lobby=false;d.ticket_item="";d.num_players_in_lobby=0;d.battle_party_number=0}if(m.raid_telemetry_id!=null&&m.hasOwnProperty("raid_telemetry_id")){d.raid_telemetry_id=o.enums===String?$root.POGOProtos.Enums.RaidTelemetryIds[m.raid_telemetry_id]:m.raid_telemetry_id}if(m.bundle_version!=null&&m.hasOwnProperty("bundle_version")){d.bundle_version=m.bundle_version}if(m.time_since_enter_raid!=null&&m.hasOwnProperty("time_since_enter_raid")){d.time_since_enter_raid=o.json&&!isFinite(m.time_since_enter_raid)?String(m.time_since_enter_raid):m.time_since_enter_raid}if(m.time_since_last_raid_telemetry!=null&&m.hasOwnProperty("time_since_last_raid_telemetry")){d.time_since_last_raid_telemetry=o.json&&!isFinite(m.time_since_last_raid_telemetry)?String(m.time_since_last_raid_telemetry):m.time_since_last_raid_telemetry}if(m.raid_level!=null&&m.hasOwnProperty("raid_level")){d.raid_level=m.raid_level}if(m.private_lobby!=null&&m.hasOwnProperty("private_lobby")){d.private_lobby=m.private_lobby}if(m.ticket_item!=null&&m.hasOwnProperty("ticket_item")){d.ticket_item=m.ticket_item}if(m.num_players_in_lobby!=null&&m.hasOwnProperty("num_players_in_lobby")){d.num_players_in_lobby=m.num_players_in_lobby}if(m.battle_party_number!=null&&m.hasOwnProperty("battle_party_number")){d.battle_party_number=m.battle_party_number}return d};RaidTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RaidTelemetry}();Telemetry.ReadPointOfInterestDescriptionTelemetry=function(){function ReadPointOfInterestDescriptionTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ReadPointOfInterestDescriptionTelemetry.prototype.result="";ReadPointOfInterestDescriptionTelemetry.prototype.fort_id="";ReadPointOfInterestDescriptionTelemetry.prototype.fort_type=0;ReadPointOfInterestDescriptionTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(10).string(m.result);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(18).string(m.fort_id);if(m.fort_type!=null&&m.hasOwnProperty("fort_type"))w.uint32(24).int32(m.fort_type);return w};ReadPointOfInterestDescriptionTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.ReadPointOfInterestDescriptionTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.string();break;case 2:m.fort_id=r.string();break;case 3:m.fort_type=r.int32();break;default:r.skipType(t&7);break}}return m};ReadPointOfInterestDescriptionTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.ReadPointOfInterestDescriptionTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.ReadPointOfInterestDescriptionTelemetry;if(d.result!=null){m.result=String(d.result)}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.fort_type!=null){m.fort_type=d.fort_type|0}return m};ReadPointOfInterestDescriptionTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result="";d.fort_id="";d.fort_type=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=m.result}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.fort_type!=null&&m.hasOwnProperty("fort_type")){d.fort_type=m.fort_type}return d};ReadPointOfInterestDescriptionTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ReadPointOfInterestDescriptionTelemetry}();Telemetry.ReleasePokemonTelemetry=function(){function ReleasePokemonTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ReleasePokemonTelemetry.prototype.pokemon=null;ReleasePokemonTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon!=null&&m.hasOwnProperty("pokemon"))$root.POGOProtos.Data.Telemetry.PokemonTelemetry.encode(m.pokemon,w.uint32(10).fork()).ldelim();return w};ReleasePokemonTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.ReleasePokemonTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};ReleasePokemonTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.ReleasePokemonTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.ReleasePokemonTelemetry;if(d.pokemon!=null){if(typeof d.pokemon!=="object")throw TypeError(".POGOProtos.Data.Telemetry.ReleasePokemonTelemetry.pokemon: object expected");m.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.fromObject(d.pokemon)}return m};ReleasePokemonTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon=null}if(m.pokemon!=null&&m.hasOwnProperty("pokemon")){d.pokemon=$root.POGOProtos.Data.Telemetry.PokemonTelemetry.toObject(m.pokemon,o)}return d};ReleasePokemonTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ReleasePokemonTelemetry}();Telemetry.RpcResponseTelemetry=function(){function RpcResponseTelemetry(p){this.response_timings=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RpcResponseTelemetry.prototype.window_duration=0;RpcResponseTelemetry.prototype.response_timings=$util.emptyArray;RpcResponseTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.window_duration!=null&&m.hasOwnProperty("window_duration"))w.uint32(13).float(m.window_duration);if(m.response_timings!=null&&m.response_timings.length){for(var i=0;i<m.response_timings.length;++i)$root.POGOProtos.Data.Telemetry.RpcResponseTime.encode(m.response_timings[i],w.uint32(18).fork()).ldelim()}return w};RpcResponseTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.RpcResponseTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.window_duration=r.float();break;case 2:if(!(m.response_timings&&m.response_timings.length))m.response_timings=[];m.response_timings.push($root.POGOProtos.Data.Telemetry.RpcResponseTime.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};RpcResponseTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.RpcResponseTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.RpcResponseTelemetry;if(d.window_duration!=null){m.window_duration=Number(d.window_duration)}if(d.response_timings){if(!Array.isArray(d.response_timings))throw TypeError(".POGOProtos.Data.Telemetry.RpcResponseTelemetry.response_timings: array expected");m.response_timings=[];for(var i=0;i<d.response_timings.length;++i){if(typeof d.response_timings[i]!=="object")throw TypeError(".POGOProtos.Data.Telemetry.RpcResponseTelemetry.response_timings: object expected");m.response_timings[i]=$root.POGOProtos.Data.Telemetry.RpcResponseTime.fromObject(d.response_timings[i])}}return m};RpcResponseTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.response_timings=[]}if(o.defaults){d.window_duration=0}if(m.window_duration!=null&&m.hasOwnProperty("window_duration")){d.window_duration=o.json&&!isFinite(m.window_duration)?String(m.window_duration):m.window_duration}if(m.response_timings&&m.response_timings.length){d.response_timings=[];for(var j=0;j<m.response_timings.length;++j){d.response_timings[j]=$root.POGOProtos.Data.Telemetry.RpcResponseTime.toObject(m.response_timings[j],o)}}return d};RpcResponseTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RpcResponseTelemetry}();Telemetry.RpcResponseTime=function(){function RpcResponseTime(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RpcResponseTime.prototype.rpc_id=0;RpcResponseTime.prototype.count_call=0;RpcResponseTime.prototype.average_response_time=0;RpcResponseTime.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.rpc_id!=null&&m.hasOwnProperty("rpc_id"))w.uint32(8).int32(m.rpc_id);if(m.count_call!=null&&m.hasOwnProperty("count_call"))w.uint32(16).int32(m.count_call);if(m.average_response_time!=null&&m.hasOwnProperty("average_response_time"))w.uint32(29).float(m.average_response_time);return w};RpcResponseTime.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.RpcResponseTime;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.rpc_id=r.int32();break;case 2:m.count_call=r.int32();break;case 3:m.average_response_time=r.float();break;default:r.skipType(t&7);break}}return m};RpcResponseTime.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.RpcResponseTime)return d;var m=new $root.POGOProtos.Data.Telemetry.RpcResponseTime;switch(d.rpc_id){case"METHOD_UNSET":case 0:m.rpc_id=0;break;case"GET_PLAYER":case 2:m.rpc_id=2;break;case"GET_HOLO_INVENTORY":case 4:m.rpc_id=4;break;case"DOWNLOAD_SETTINGS":case 5:m.rpc_id=5;break;case"DOWNLOAD_ITEM_TEMPLATES":case 6:m.rpc_id=6;break;case"DOWNLOAD_REMOTE_CONFIG_VERSION":case 7:m.rpc_id=7;break;case"REGISTER_BACKGROUND_DEVICE":case 8:m.rpc_id=8;break;case"GET_PLAYER_DAY":case 9:m.rpc_id=9;break;case"ACKNOWLEDGE_PUNISHMENT":case 10:m.rpc_id=10;break;case"FORT_SEARCH":case 101:m.rpc_id=101;break;case"ENCOUNTER":case 102:m.rpc_id=102;break;case"CATCH_POKEMON":case 103:m.rpc_id=103;break;case"FORT_DETAILS":case 104:m.rpc_id=104;break;case"GET_MAP_OBJECTS":case 106:m.rpc_id=106;break;case"FORT_DEPLOY_POKEMON":case 110:m.rpc_id=110;break;case"FORT_RECALL_POKEMON":case 111:m.rpc_id=111;break;case"RELEASE_POKEMON":case 112:m.rpc_id=112;break;case"USE_ITEM_POTION":case 113:m.rpc_id=113;break;case"USE_ITEM_CAPTURE":case 114:m.rpc_id=114;break;case"USE_ITEM_FLEE":case 115:m.rpc_id=115;break;case"USE_ITEM_REVIVE":case 116:m.rpc_id=116;break;case"GET_PLAYER_PROFILE":case 121:m.rpc_id=121;break;case"EVOLVE_POKEMON":case 125:m.rpc_id=125;break;case"GET_HATCHED_EGGS":case 126:m.rpc_id=126;break;case"ENCOUNTER_TUTORIAL_COMPLETE":case 127:m.rpc_id=127;break;case"LEVEL_UP_REWARDS":case 128:m.rpc_id=128;break;case"CHECK_AWARDED_BADGES":case 129:m.rpc_id=129;break;case"USE_ITEM_GYM":case 133:m.rpc_id=133;break;case"GET_GYM_DETAILS":case 134:m.rpc_id=134;break;case"START_GYM_BATTLE":case 135:m.rpc_id=135;break;case"ATTACK_GYM":case 136:m.rpc_id=136;break;case"RECYCLE_INVENTORY_ITEM":case 137:m.rpc_id=137;break;case"COLLECT_DAILY_BONUS":case 138:m.rpc_id=138;break;case"USE_ITEM_XP_BOOST":case 139:m.rpc_id=139;break;case"USE_ITEM_EGG_INCUBATOR":case 140:m.rpc_id=140;break;case"USE_INCENSE":case 141:m.rpc_id=141;break;case"GET_INCENSE_POKEMON":case 142:m.rpc_id=142;break;case"INCENSE_ENCOUNTER":case 143:m.rpc_id=143;break;case"ADD_FORT_MODIFIER":case 144:m.rpc_id=144;break;case"DISK_ENCOUNTER":case 145:m.rpc_id=145;break;case"COLLECT_DAILY_DEFENDER_BONUS":case 146:m.rpc_id=146;break;case"UPGRADE_POKEMON":case 147:m.rpc_id=147;break;case"SET_FAVORITE_POKEMON":case 148:m.rpc_id=148;break;case"NICKNAME_POKEMON":case 149:m.rpc_id=149;break;case"EQUIP_BADGE":case 150:m.rpc_id=150;break;case"SET_CONTACT_SETTINGS":case 151:m.rpc_id=151;break;case"SET_BUDDY_POKEMON":case 152:m.rpc_id=152;break;case"GET_BUDDY_WALKED":case 153:m.rpc_id=153;break;case"USE_ITEM_ENCOUNTER":case 154:m.rpc_id=154;break;case"GYM_DEPLOY":case 155:m.rpc_id=155;break;case"GYM_GET_INFO":case 156:m.rpc_id=156;break;case"GYM_START_SESSION":case 157:m.rpc_id=157;break;case"GYM_BATTLE_ATTACK":case 158:m.rpc_id=158;break;case"JOIN_LOBBY":case 159:m.rpc_id=159;break;case"LEAVE_LOBBY":case 160:m.rpc_id=160;break;case"SET_LOBBY_VISIBILITY":case 161:m.rpc_id=161;break;case"SET_LOBBY_POKEMON":case 162:m.rpc_id=162;break;case"GET_RAID_DETAILS":case 163:m.rpc_id=163;break;case"GYM_FEED_POKEMON":case 164:m.rpc_id=164;break;case"START_RAID_BATTLE":case 165:m.rpc_id=165;break;case"ATTACK_RAID":case 166:m.rpc_id=166;break;case"AWARD_POKECOIN":case 167:m.rpc_id=167;break;case"USE_ITEM_STARDUST_BOOST":case 168:m.rpc_id=168;break;case"GET_ASSET_DIGEST":case 300:m.rpc_id=300;break;case"GET_DOWNLOAD_URLS":case 301:m.rpc_id=301;break;case"CLAIM_CODENAME":case 403:m.rpc_id=403;break;case"SET_AVATAR":case 404:m.rpc_id=404;break;case"SET_PLAYER_TEAM":case 405:m.rpc_id=405;break;case"MARK_TUTORIAL_COMPLETE":case 406:m.rpc_id=406;break;case"UPDATE_PERFORMANCE_METRICS":case 407:m.rpc_id=407;break;case"CHECK_CHALLENGE":case 600:m.rpc_id=600;break;case"VERIFY_CHALLENGE":case 601:m.rpc_id=601;break;case"ECHO":case 666:m.rpc_id=666;break;case"SFIDA_REGISTRATION":case 800:m.rpc_id=800;break;case"SFIDA_ACTION_LOG":case 801:m.rpc_id=801;break;case"SFIDA_CERTIFICATION":case 802:m.rpc_id=802;break;case"SFIDA_UPDATE":case 803:m.rpc_id=803;break;case"SFIDA_ACTION":case 804:m.rpc_id=804;break;case"SFIDA_DOWSER":case 805:m.rpc_id=805;break;case"SFIDA_CAPTURE":case 806:m.rpc_id=806;break;case"LIST_AVATAR_CUSTOMIZATIONS":case 807:m.rpc_id=807;break;case"SET_AVATAR_ITEM_AS_VIEWED":case 808:m.rpc_id=808;break;case"GET_INBOX":case 809:m.rpc_id=809;break;case"LIST_GYM_BADGES":case 811:m.rpc_id=811;break;case"GET_GYM_BADGE_DETAILS":case 812:m.rpc_id=812;break;case"USE_ITEM_MOVE_REROLL":case 813:m.rpc_id=813;break;case"USE_ITEM_RARE_CANDY":case 814:m.rpc_id=814;break;case"AWARD_FREE_RAID_TICKET":case 815:m.rpc_id=815;break;case"FETCH_ALL_NEWS":case 816:m.rpc_id=816;break;case"MARK_READ_NEWS_ARTICLE":case 817:m.rpc_id=817;break;case"GET_PLAYER_DISPLAY_INFO":case 818:m.rpc_id=818;break;case"BELUGA_TRANSACTION_START":case 819:m.rpc_id=819;break;case"BELUGA_TRANSACTION_COMPLETE":case 820:m.rpc_id=820;break;case"GET_NEW_QUESTS":case 900:m.rpc_id=900;break;case"GET_QUEST_DETAILS":case 901:m.rpc_id=901;break;case"COMPLETE_QUEST":case 902:m.rpc_id=902;break;case"REMOVE_QUEST":case 903:m.rpc_id=903;break;case"QUEST_ENCOUNTER":case 904:m.rpc_id=904;break;case"COMPLETE_QUEST_STAMP_CARD":case 905:m.rpc_id=905;break;case"SEND_GIFT":case 950:m.rpc_id=950;break;case"OPEN_GIFT":case 951:m.rpc_id=951;break;case"GIFT_DETAILS":case 952:m.rpc_id=952;break;case"DELETE_GIFT":case 953:m.rpc_id=953;break;case"SAVE_PLAYER_SNAPSHOT":case 954:m.rpc_id=954;break;case"GET_FRIENDSHIP_MILESTONE_REWARDS":case 955:m.rpc_id=955;break;case"CHECK_SEND_GIFT":case 956:m.rpc_id=956;break;case"SET_FRIEND_NICKNAME":case 957:m.rpc_id=957;break;case"DELETE_GIFT_FROM_INVENTORY":case 958:m.rpc_id=958;break;case"SAVE_SOCIAL_PLAYER_SETTINGS":case 959:m.rpc_id=959;break;case"SHARE_EX_RAID_PASS":case 960:m.rpc_id=960;break;case"CHECK_SHARE_EX_RAID_PASS":case 961:m.rpc_id=961;break;case"DECLINE_SHARED_EX_RAID_PASS":case 962:m.rpc_id=962;break;case"OPEN_TRADING":case 970:m.rpc_id=970;break;case"UPDATE_TRADING":case 971:m.rpc_id=971;break;case"CONFIRM_TRADING":case 972:m.rpc_id=972;break;case"CANCEL_TRADING":case 973:m.rpc_id=973;break;case"GET_TRADING":case 974:m.rpc_id=974;break;case"GET_FITNESS_REWARDS":case 980:m.rpc_id=980;break;case"GET_COMBAT_PLAYER_PROFILE":case 990:m.rpc_id=990;break;case"GENERATE_COMBAT_CHALLENGE_ID":case 991:m.rpc_id=991;break;case"CREATE_COMBAT_CHALLENGE":case 992:m.rpc_id=992;break;case"OPEN_COMBAT_CHALLENGE":case 993:m.rpc_id=993;break;case"GET_COMBAT_CHALLENGE":case 994:m.rpc_id=994;break;case"ACCEPT_COMBAT_CHALLENGE":case 995:m.rpc_id=995;break;case"DECLINE_COMBAT_CHALLENGE":case 996:m.rpc_id=996;break;case"CANCEL_COMBAT_CHALLENGE":case 997:m.rpc_id=997;break;case"SUBMIT_COMBAT_CHALLENGE_POKEMONS":case 998:m.rpc_id=998;break;case"SAVE_COMBAT_PLAYER_PREFERENCES":case 999:m.rpc_id=999;break;case"OPEN_COMBAT_SESSION":case 1e3:m.rpc_id=1e3;break;case"UPDATE_COMBAT":case 1001:m.rpc_id=1001;break;case"QUIT_COMBAT":case 1002:m.rpc_id=1002;break;case"GET_COMBAT_RESULTS":case 1003:m.rpc_id=1003;break;case"UNLOCK_SPECIAL_MOVE":case 1004:m.rpc_id=1004;break;case"GET_NPC_COMBAT_REWARDS":case 1005:m.rpc_id=1005;break;case"COMBAT_FRIEND_REQUEST":case 1006:m.rpc_id=1006;break;case"OPEN_NPC_COMBAT_SESSION":case 1007:m.rpc_id=1007;break;case"START_TUTORIAL_ACTION":case 1008:m.rpc_id=1008;break;case"GET_TUTORIAL_EGG_ACTION":case 1009:m.rpc_id=1009;break;case"SEND_PROBE":case 1020:m.rpc_id=1020;break;case"PROBE_DATA":case 1021:m.rpc_id=1021;break;case"COMBAT_DATA":case 1022:m.rpc_id=1022;break;case"COMBAT_CHALLENGE_DATA":case 1023:m.rpc_id=1023;break;case"GET_SIGNED_GMAP_URL":case 1105:m.rpc_id=1105;break;case"REGISTER_PUSH_NOTIFICATION":case 5e3:m.rpc_id=5e3;break;case"UNREGISTER_PUSH_NOTIFICATION":case 5001:m.rpc_id=5001;break;case"UPDATE_NOTIFICATION_STATUS":case 5002:m.rpc_id=5002;break;case"OPT_OUT_PUSH_NOTIFICATION_CATEGORY":case 5003:m.rpc_id=5003;break;case"DOWNLOAD_GAME_MASTER_TEMPLATES":case 5004:m.rpc_id=5004;break;case"GET_INVENTORY":case 5005:m.rpc_id=5005;break;case"REDEEM_PASSCODE":case 5006:m.rpc_id=5006;break;case"PING":case 5007:m.rpc_id=5007;break;case"ADD_LOGIN_ACTION":case 5008:m.rpc_id=5008;break;case"REMOVE_LOGIN_ACTION":case 5009:m.rpc_id=5009;break;case"LIST_LOGIN_ACTION":case 5010:m.rpc_id=5010;break;case"ADD_NEW_POI":case 5011:m.rpc_id=5011;break;case"PROXY_SOCIAL_ACTION":case 5012:m.rpc_id=5012;break;case"CLIENT_TELEMETRY":case 5013:m.rpc_id=5013;break;case"GET_AVAILABLE_SUBMISSIONS":case 5014:m.rpc_id=5014;break;case"GET_SIGNED_URL_FOR_PHOTO_UPLOAD":case 5015:m.rpc_id=5015;break;case"REPLACE_LOGIN_ACTION":case 5016:m.rpc_id=5016;break;case"PROXY_SOCIAL_SIDE_CHANNEL_ACTION":case 5017:m.rpc_id=5017;break;case"COLLECT_CLIENT_TELEMETRY":case 5018:m.rpc_id=5018;break;case"PURCHASE_SKU":case 5019:m.rpc_id=5019;break;case"GET_AVAILABLE_SKUS_AND_BALANCES":case 5020:m.rpc_id=5020;break;case"REDEEM_GOOGLE_RECEIPT":case 5021:m.rpc_id=5021;break;case"REDEEM_APPLE_RECEIPT":case 5022:m.rpc_id=5022;break;case"REDEEM_DESKTOP_RECEIPT":case 5023:m.rpc_id=5023;break;case"UPDATE_FITNESS_METRICS":case 5024:m.rpc_id=5024;break;case"GET_FITNESS_REPORT":case 5025:m.rpc_id=5025;break;case"GET_CLIENT_TELEMETRY_SETTINGS":case 5026:m.rpc_id=5026;break;case"REGISTER_BACKGROUND_SERVICE":case 5028:m.rpc_id=5028;break;case"GET_CLIENT_BGMODE_SETTINGS":case 5029:m.rpc_id=5029;break;case"PING_ASYNC":case 5027:m.rpc_id=5027;break;case"PING_DOWNSTREAM":case 5030:m.rpc_id=5030;break;case"SET_IN_GAME_CURRENCY_EXCHANGE_RATE":case 5032:m.rpc_id=5032;break;case"REQUEST_GEOFENCE_UPDATES":case 5033:m.rpc_id=5033;break;case"UPDATE_PLAYER_LOCATION":case 5034:m.rpc_id=5034;break;case"PROFANITY_FILTER_ACTION":case 5035:m.rpc_id=5035;break}if(d.count_call!=null){m.count_call=d.count_call|0}if(d.average_response_time!=null){m.average_response_time=Number(d.average_response_time)}return m};RpcResponseTime.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.rpc_id=o.enums===String?"METHOD_UNSET":0;d.count_call=0;d.average_response_time=0}if(m.rpc_id!=null&&m.hasOwnProperty("rpc_id")){d.rpc_id=o.enums===String?$root.POGOProtos.Networking.Requests.RequestType[m.rpc_id]:m.rpc_id}if(m.count_call!=null&&m.hasOwnProperty("count_call")){d.count_call=m.count_call}if(m.average_response_time!=null&&m.hasOwnProperty("average_response_time")){d.average_response_time=o.json&&!isFinite(m.average_response_time)?String(m.average_response_time):m.average_response_time}return d};RpcResponseTime.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RpcResponseTime}();Telemetry.RpcSocketResponseTelemetry=function(){function RpcSocketResponseTelemetry(p){this.response_timings=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RpcSocketResponseTelemetry.prototype.window_duration=0;RpcSocketResponseTelemetry.prototype.response_timings=$util.emptyArray;RpcSocketResponseTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.window_duration!=null&&m.hasOwnProperty("window_duration"))w.uint32(13).float(m.window_duration);if(m.response_timings!=null&&m.response_timings.length){for(var i=0;i<m.response_timings.length;++i)$root.POGOProtos.Data.Telemetry.RpcSocketResponseTime.encode(m.response_timings[i],w.uint32(18).fork()).ldelim()}return w};RpcSocketResponseTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.RpcSocketResponseTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.window_duration=r.float();break;case 2:if(!(m.response_timings&&m.response_timings.length))m.response_timings=[];m.response_timings.push($root.POGOProtos.Data.Telemetry.RpcSocketResponseTime.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};RpcSocketResponseTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.RpcSocketResponseTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.RpcSocketResponseTelemetry;if(d.window_duration!=null){m.window_duration=Number(d.window_duration)}if(d.response_timings){if(!Array.isArray(d.response_timings))throw TypeError(".POGOProtos.Data.Telemetry.RpcSocketResponseTelemetry.response_timings: array expected");m.response_timings=[];for(var i=0;i<d.response_timings.length;++i){if(typeof d.response_timings[i]!=="object")throw TypeError(".POGOProtos.Data.Telemetry.RpcSocketResponseTelemetry.response_timings: object expected");m.response_timings[i]=$root.POGOProtos.Data.Telemetry.RpcSocketResponseTime.fromObject(d.response_timings[i])}}return m};RpcSocketResponseTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.response_timings=[]}if(o.defaults){d.window_duration=0}if(m.window_duration!=null&&m.hasOwnProperty("window_duration")){d.window_duration=o.json&&!isFinite(m.window_duration)?String(m.window_duration):m.window_duration}if(m.response_timings&&m.response_timings.length){d.response_timings=[];for(var j=0;j<m.response_timings.length;++j){d.response_timings[j]=$root.POGOProtos.Data.Telemetry.RpcSocketResponseTime.toObject(m.response_timings[j],o)}}return d};RpcSocketResponseTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RpcSocketResponseTelemetry}();Telemetry.RpcSocketResponseTime=function(){function RpcSocketResponseTime(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RpcSocketResponseTime.prototype.request_id=$util.Long?$util.Long.fromBits(0,0,true):0;RpcSocketResponseTime.prototype.probe_id="";RpcSocketResponseTime.prototype.response_time=0;RpcSocketResponseTime.prototype.side_channel=false;RpcSocketResponseTime.prototype.ad_hoc=false;RpcSocketResponseTime.prototype.ad_hoc_delay=0;RpcSocketResponseTime.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.request_id!=null&&m.hasOwnProperty("request_id"))w.uint32(8).uint64(m.request_id);if(m.probe_id!=null&&m.hasOwnProperty("probe_id"))w.uint32(18).string(m.probe_id);if(m.response_time!=null&&m.hasOwnProperty("response_time"))w.uint32(29).float(m.response_time);if(m.side_channel!=null&&m.hasOwnProperty("side_channel"))w.uint32(32).bool(m.side_channel);if(m.ad_hoc!=null&&m.hasOwnProperty("ad_hoc"))w.uint32(40).bool(m.ad_hoc);if(m.ad_hoc_delay!=null&&m.hasOwnProperty("ad_hoc_delay"))w.uint32(53).float(m.ad_hoc_delay);return w};RpcSocketResponseTime.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.RpcSocketResponseTime;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.request_id=r.uint64();break;case 2:m.probe_id=r.string();break;case 3:m.response_time=r.float();break;case 4:m.side_channel=r.bool();break;case 5:m.ad_hoc=r.bool();break;case 6:m.ad_hoc_delay=r.float();break;default:r.skipType(t&7);break}}return m};RpcSocketResponseTime.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.RpcSocketResponseTime)return d;var m=new $root.POGOProtos.Data.Telemetry.RpcSocketResponseTime;if(d.request_id!=null){if($util.Long)(m.request_id=$util.Long.fromValue(d.request_id)).unsigned=true;else if(typeof d.request_id==="string")m.request_id=parseInt(d.request_id,10);else if(typeof d.request_id==="number")m.request_id=d.request_id;else if(typeof d.request_id==="object")m.request_id=new $util.LongBits(d.request_id.low>>>0,d.request_id.high>>>0).toNumber(true)}if(d.probe_id!=null){m.probe_id=String(d.probe_id)}if(d.response_time!=null){m.response_time=Number(d.response_time)}if(d.side_channel!=null){m.side_channel=Boolean(d.side_channel)}if(d.ad_hoc!=null){m.ad_hoc=Boolean(d.ad_hoc)}if(d.ad_hoc_delay!=null){m.ad_hoc_delay=Number(d.ad_hoc_delay)}return m};RpcSocketResponseTime.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,true);d.request_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.request_id=o.longs===String?"0":0;d.probe_id="";d.response_time=0;d.side_channel=false;d.ad_hoc=false;d.ad_hoc_delay=0}if(m.request_id!=null&&m.hasOwnProperty("request_id")){if(typeof m.request_id==="number")d.request_id=o.longs===String?String(m.request_id):m.request_id;else d.request_id=o.longs===String?$util.Long.prototype.toString.call(m.request_id):o.longs===Number?new $util.LongBits(m.request_id.low>>>0,m.request_id.high>>>0).toNumber(true):m.request_id}if(m.probe_id!=null&&m.hasOwnProperty("probe_id")){d.probe_id=m.probe_id}if(m.response_time!=null&&m.hasOwnProperty("response_time")){d.response_time=o.json&&!isFinite(m.response_time)?String(m.response_time):m.response_time}if(m.side_channel!=null&&m.hasOwnProperty("side_channel")){d.side_channel=m.side_channel}if(m.ad_hoc!=null&&m.hasOwnProperty("ad_hoc")){d.ad_hoc=m.ad_hoc}if(m.ad_hoc_delay!=null&&m.hasOwnProperty("ad_hoc_delay")){d.ad_hoc_delay=o.json&&!isFinite(m.ad_hoc_delay)?String(m.ad_hoc_delay):m.ad_hoc_delay}return d};RpcSocketResponseTime.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RpcSocketResponseTime}();Telemetry.ShoppingPageTelemetry=function(){function ShoppingPageTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ShoppingPageTelemetry.prototype.shopping_page_click_id=0;ShoppingPageTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.shopping_page_click_id!=null&&m.hasOwnProperty("shopping_page_click_id"))w.uint32(8).int32(m.shopping_page_click_id);return w};ShoppingPageTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.ShoppingPageTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.shopping_page_click_id=r.int32();break;default:r.skipType(t&7);break}}return m};ShoppingPageTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.ShoppingPageTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.ShoppingPageTelemetry;switch(d.shopping_page_click_id){case"UNDEFINED_SHOPPING_PAGE_EVENT":case 0:m.shopping_page_click_id=0;break;case"CLICK_CUSTOMIZE_AVATAR":case 1:m.shopping_page_click_id=1;break;case"QUICK_SHOP_MORE":case 2:m.shopping_page_click_id=2;break;case"QUICK_SHOP_EXCHANGE":case 3:m.shopping_page_click_id=3;break}return m};ShoppingPageTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.shopping_page_click_id=o.enums===String?"UNDEFINED_SHOPPING_PAGE_EVENT":0}if(m.shopping_page_click_id!=null&&m.hasOwnProperty("shopping_page_click_id")){d.shopping_page_click_id=o.enums===String?$root.POGOProtos.Enums.ShoppingPageTelemetryIds[m.shopping_page_click_id]:m.shopping_page_click_id}return d};ShoppingPageTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ShoppingPageTelemetry}();Telemetry.SocialTelemetry=function(){function SocialTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SocialTelemetry.prototype.social_click_id=0;SocialTelemetry.prototype.pages_scrolled_in_friends_list=0;SocialTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.social_click_id!=null&&m.hasOwnProperty("social_click_id"))w.uint32(8).int32(m.social_click_id);if(m.pages_scrolled_in_friends_list!=null&&m.hasOwnProperty("pages_scrolled_in_friends_list"))w.uint32(16).int32(m.pages_scrolled_in_friends_list);return w};SocialTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.SocialTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.social_click_id=r.int32();break;case 2:m.pages_scrolled_in_friends_list=r.int32();break;default:r.skipType(t&7);break}}return m};SocialTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.SocialTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.SocialTelemetry;switch(d.social_click_id){case"UNDEFINED_SOCIAL":case 0:m.social_click_id=0;break;case"FRIEND_TAB":case 1:m.social_click_id=1;break;case"NOTIFICATION_TAB":case 2:m.social_click_id=2;break;case"FRIEND_PROFILE":case 3:m.social_click_id=3;break;case"OPEN_FRIEND_SHIP_LEVEL_DETAIL":case 4:m.social_click_id=4;break;case"CLOSE_OPEN_GIFT_CONFIRMATION":case 5:m.social_click_id=5;break;case"FRIEND_LIST_SORT_CHANGED":case 6:m.social_click_id=6;break;case"FRIEND_LIST_CLOSED":case 7:m.social_click_id=7;break}if(d.pages_scrolled_in_friends_list!=null){m.pages_scrolled_in_friends_list=d.pages_scrolled_in_friends_list|0}return m};SocialTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.social_click_id=o.enums===String?"UNDEFINED_SOCIAL":0;d.pages_scrolled_in_friends_list=0}if(m.social_click_id!=null&&m.hasOwnProperty("social_click_id")){d.social_click_id=o.enums===String?$root.POGOProtos.Enums.SocialTelemetryIds[m.social_click_id]:m.social_click_id}if(m.pages_scrolled_in_friends_list!=null&&m.hasOwnProperty("pages_scrolled_in_friends_list")){d.pages_scrolled_in_friends_list=m.pages_scrolled_in_friends_list}return d};SocialTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SocialTelemetry}();Telemetry.SpinPokestopTelemetry=function(){function SpinPokestopTelemetry(p){this.pokestop_rewards=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SpinPokestopTelemetry.prototype.result="";SpinPokestopTelemetry.prototype.fort_id="";SpinPokestopTelemetry.prototype.fort_type=0;SpinPokestopTelemetry.prototype.pokestop_rewards=$util.emptyArray;SpinPokestopTelemetry.prototype.total_rewards=0;SpinPokestopTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(10).string(m.result);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(18).string(m.fort_id);if(m.fort_type!=null&&m.hasOwnProperty("fort_type"))w.uint32(24).int32(m.fort_type);if(m.pokestop_rewards!=null&&m.pokestop_rewards.length){for(var i=0;i<m.pokestop_rewards.length;++i)$root.POGOProtos.Data.Telemetry.PokestopReward.encode(m.pokestop_rewards[i],w.uint32(34).fork()).ldelim()}if(m.total_rewards!=null&&m.hasOwnProperty("total_rewards"))w.uint32(40).int32(m.total_rewards);return w};SpinPokestopTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.SpinPokestopTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.string();break;case 2:m.fort_id=r.string();break;case 3:m.fort_type=r.int32();break;case 4:if(!(m.pokestop_rewards&&m.pokestop_rewards.length))m.pokestop_rewards=[];m.pokestop_rewards.push($root.POGOProtos.Data.Telemetry.PokestopReward.decode(r,r.uint32()));break;case 5:m.total_rewards=r.int32();break;default:r.skipType(t&7);break}}return m};SpinPokestopTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.SpinPokestopTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.SpinPokestopTelemetry;if(d.result!=null){m.result=String(d.result)}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.fort_type!=null){m.fort_type=d.fort_type|0}if(d.pokestop_rewards){if(!Array.isArray(d.pokestop_rewards))throw TypeError(".POGOProtos.Data.Telemetry.SpinPokestopTelemetry.pokestop_rewards: array expected");m.pokestop_rewards=[];for(var i=0;i<d.pokestop_rewards.length;++i){if(typeof d.pokestop_rewards[i]!=="object")throw TypeError(".POGOProtos.Data.Telemetry.SpinPokestopTelemetry.pokestop_rewards: object expected");m.pokestop_rewards[i]=$root.POGOProtos.Data.Telemetry.PokestopReward.fromObject(d.pokestop_rewards[i])}}if(d.total_rewards!=null){m.total_rewards=d.total_rewards|0}return m};SpinPokestopTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.pokestop_rewards=[]}if(o.defaults){d.result="";d.fort_id="";d.fort_type=0;d.total_rewards=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=m.result}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.fort_type!=null&&m.hasOwnProperty("fort_type")){d.fort_type=m.fort_type}if(m.pokestop_rewards&&m.pokestop_rewards.length){d.pokestop_rewards=[];for(var j=0;j<m.pokestop_rewards.length;++j){d.pokestop_rewards[j]=$root.POGOProtos.Data.Telemetry.PokestopReward.toObject(m.pokestop_rewards[j],o)}}if(m.total_rewards!=null&&m.hasOwnProperty("total_rewards")){d.total_rewards=m.total_rewards}return d};SpinPokestopTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SpinPokestopTelemetry}();Telemetry.TelemetryCommon=function(){function TelemetryCommon(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}TelemetryCommon.prototype.timestamp=$util.Long?$util.Long.fromBits(0,0,false):0;TelemetryCommon.prototype.correlation_vector="";TelemetryCommon.prototype.event_id="";TelemetryCommon.prototype.client_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;TelemetryCommon.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.timestamp!=null&&m.hasOwnProperty("timestamp"))w.uint32(8).int64(m.timestamp);if(m.correlation_vector!=null&&m.hasOwnProperty("correlation_vector"))w.uint32(18).string(m.correlation_vector);if(m.event_id!=null&&m.hasOwnProperty("event_id"))w.uint32(26).string(m.event_id);if(m.client_timestamp_ms!=null&&m.hasOwnProperty("client_timestamp_ms"))w.uint32(32).int64(m.client_timestamp_ms);return w};TelemetryCommon.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.TelemetryCommon;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.timestamp=r.int64();break;case 2:m.correlation_vector=r.string();break;case 3:m.event_id=r.string();break;case 4:m.client_timestamp_ms=r.int64();break;default:r.skipType(t&7);break}}return m};TelemetryCommon.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.TelemetryCommon)return d;var m=new $root.POGOProtos.Data.Telemetry.TelemetryCommon;if(d.timestamp!=null){if($util.Long)(m.timestamp=$util.Long.fromValue(d.timestamp)).unsigned=false;else if(typeof d.timestamp==="string")m.timestamp=parseInt(d.timestamp,10);else if(typeof d.timestamp==="number")m.timestamp=d.timestamp;else if(typeof d.timestamp==="object")m.timestamp=new $util.LongBits(d.timestamp.low>>>0,d.timestamp.high>>>0).toNumber()}if(d.correlation_vector!=null){m.correlation_vector=String(d.correlation_vector)}if(d.event_id!=null){m.event_id=String(d.event_id)}if(d.client_timestamp_ms!=null){if($util.Long)(m.client_timestamp_ms=$util.Long.fromValue(d.client_timestamp_ms)).unsigned=false;else if(typeof d.client_timestamp_ms==="string")m.client_timestamp_ms=parseInt(d.client_timestamp_ms,10);else if(typeof d.client_timestamp_ms==="number")m.client_timestamp_ms=d.client_timestamp_ms;else if(typeof d.client_timestamp_ms==="object")m.client_timestamp_ms=new $util.LongBits(d.client_timestamp_ms.low>>>0,d.client_timestamp_ms.high>>>0).toNumber()}return m};TelemetryCommon.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.timestamp=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.timestamp=o.longs===String?"0":0;d.correlation_vector="";d.event_id="";if($util.Long){var n=new $util.Long(0,0,false);d.client_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.client_timestamp_ms=o.longs===String?"0":0}if(m.timestamp!=null&&m.hasOwnProperty("timestamp")){if(typeof m.timestamp==="number")d.timestamp=o.longs===String?String(m.timestamp):m.timestamp;else d.timestamp=o.longs===String?$util.Long.prototype.toString.call(m.timestamp):o.longs===Number?new $util.LongBits(m.timestamp.low>>>0,m.timestamp.high>>>0).toNumber():m.timestamp}if(m.correlation_vector!=null&&m.hasOwnProperty("correlation_vector")){d.correlation_vector=m.correlation_vector}if(m.event_id!=null&&m.hasOwnProperty("event_id")){d.event_id=m.event_id}if(m.client_timestamp_ms!=null&&m.hasOwnProperty("client_timestamp_ms")){if(typeof m.client_timestamp_ms==="number")d.client_timestamp_ms=o.longs===String?String(m.client_timestamp_ms):m.client_timestamp_ms;else d.client_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.client_timestamp_ms):o.longs===Number?new $util.LongBits(m.client_timestamp_ms.low>>>0,m.client_timestamp_ms.high>>>0).toNumber():m.client_timestamp_ms}return d};TelemetryCommon.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return TelemetryCommon}();Telemetry.WeatherDetailClickTelemetry=function(){function WeatherDetailClickTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WeatherDetailClickTelemetry.prototype.gameplay_weather_type="";WeatherDetailClickTelemetry.prototype.alert_active=false;WeatherDetailClickTelemetry.prototype.severity=0;WeatherDetailClickTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gameplay_weather_type!=null&&m.hasOwnProperty("gameplay_weather_type"))w.uint32(10).string(m.gameplay_weather_type);if(m.alert_active!=null&&m.hasOwnProperty("alert_active"))w.uint32(16).bool(m.alert_active);if(m.severity!=null&&m.hasOwnProperty("severity"))w.uint32(24).int32(m.severity);return w};WeatherDetailClickTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.WeatherDetailClickTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gameplay_weather_type=r.string();break;case 2:m.alert_active=r.bool();break;case 3:m.severity=r.int32();break;default:r.skipType(t&7);break}}return m};WeatherDetailClickTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.WeatherDetailClickTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.WeatherDetailClickTelemetry;if(d.gameplay_weather_type!=null){m.gameplay_weather_type=String(d.gameplay_weather_type)}if(d.alert_active!=null){m.alert_active=Boolean(d.alert_active)}if(d.severity!=null){m.severity=d.severity|0}return m};WeatherDetailClickTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.gameplay_weather_type="";d.alert_active=false;d.severity=0}if(m.gameplay_weather_type!=null&&m.hasOwnProperty("gameplay_weather_type")){d.gameplay_weather_type=m.gameplay_weather_type}if(m.alert_active!=null&&m.hasOwnProperty("alert_active")){d.alert_active=m.alert_active}if(m.severity!=null&&m.hasOwnProperty("severity")){d.severity=m.severity}return d};WeatherDetailClickTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WeatherDetailClickTelemetry}();Telemetry.WebTelemetry=function(){function WebTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WebTelemetry.prototype.web_click_ids=0;WebTelemetry.prototype.url="";WebTelemetry.prototype.fort_id="";WebTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.web_click_ids!=null&&m.hasOwnProperty("web_click_ids"))w.uint32(8).int32(m.web_click_ids);if(m.url!=null&&m.hasOwnProperty("url"))w.uint32(18).string(m.url);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(26).string(m.fort_id);return w};WebTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Telemetry.WebTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.web_click_ids=r.int32();break;case 2:m.url=r.string();break;case 3:m.fort_id=r.string();break;default:r.skipType(t&7);break}}return m};WebTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Telemetry.WebTelemetry)return d;var m=new $root.POGOProtos.Data.Telemetry.WebTelemetry;switch(d.web_click_ids){case"UNDEFINED_WEB_EVENT":case 0:m.web_click_ids=0;break;case"POINT_OF_INTEREST_DESCRIPTION_WEB_CLICK":case 1:m.web_click_ids=1;break}if(d.url!=null){m.url=String(d.url)}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}return m};WebTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.web_click_ids=o.enums===String?"UNDEFINED_WEB_EVENT":0;d.url="";d.fort_id=""}if(m.web_click_ids!=null&&m.hasOwnProperty("web_click_ids")){d.web_click_ids=o.enums===String?$root.POGOProtos.Enums.WebTelemetryIds[m.web_click_ids]:m.web_click_ids}if(m.url!=null&&m.hasOwnProperty("url")){d.url=m.url}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}return d};WebTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WebTelemetry}();return Telemetry}();Data.Token=function(){var Token={};Token.FbToken=function(){function FbToken(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FbToken.prototype.token="";FbToken.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.token!=null&&m.hasOwnProperty("token"))w.uint32(10).string(m.token);return w};FbToken.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Token.FbToken;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.token=r.string();break;default:r.skipType(t&7);break}}return m};FbToken.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Token.FbToken)return d;var m=new $root.POGOProtos.Data.Token.FbToken;if(d.token!=null){m.token=String(d.token)}return m};FbToken.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.token=""}if(m.token!=null&&m.hasOwnProperty("token")){d.token=m.token}return d};FbToken.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FbToken}();Token.GoogleToken=function(){function GoogleToken(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GoogleToken.prototype.id_token="";GoogleToken.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.id_token!=null&&m.hasOwnProperty("id_token"))w.uint32(10).string(m.id_token);return w};GoogleToken.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Token.GoogleToken;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.id_token=r.string();break;default:r.skipType(t&7);break}}return m};GoogleToken.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Token.GoogleToken)return d;var m=new $root.POGOProtos.Data.Token.GoogleToken;if(d.id_token!=null){m.id_token=String(d.id_token)}return m};GoogleToken.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.id_token=""}if(m.id_token!=null&&m.hasOwnProperty("id_token")){d.id_token=m.id_token}return d};GoogleToken.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GoogleToken}();Token.PtcToken=function(){function PtcToken(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PtcToken.prototype.token="";PtcToken.prototype.expiration=0;PtcToken.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.token!=null&&m.hasOwnProperty("token"))w.uint32(10).string(m.token);if(m.expiration!=null&&m.hasOwnProperty("expiration"))w.uint32(16).int32(m.expiration);return w};PtcToken.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Token.PtcToken;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.token=r.string();break;case 2:m.expiration=r.int32();break;default:r.skipType(t&7);break}}return m};PtcToken.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Token.PtcToken)return d;var m=new $root.POGOProtos.Data.Token.PtcToken;if(d.token!=null){m.token=String(d.token)}if(d.expiration!=null){m.expiration=d.expiration|0}return m};PtcToken.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.token="";d.expiration=0}if(m.token!=null&&m.hasOwnProperty("token")){d.token=m.token}if(m.expiration!=null&&m.hasOwnProperty("expiration")){d.expiration=m.expiration}return d};PtcToken.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PtcToken}();Token.SfidaAuthToken=function(){function SfidaAuthToken(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaAuthToken.prototype.response_token=$util.newBuffer([]);SfidaAuthToken.prototype.sfida_id="";SfidaAuthToken.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.response_token!=null&&m.hasOwnProperty("response_token"))w.uint32(10).bytes(m.response_token);if(m.sfida_id!=null&&m.hasOwnProperty("sfida_id"))w.uint32(18).string(m.sfida_id);return w};SfidaAuthToken.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Token.SfidaAuthToken;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.response_token=r.bytes();break;case 2:m.sfida_id=r.string();break;default:r.skipType(t&7);break}}return m};SfidaAuthToken.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Token.SfidaAuthToken)return d;var m=new $root.POGOProtos.Data.Token.SfidaAuthToken;if(d.response_token!=null){if(typeof d.response_token==="string")$util.base64.decode(d.response_token,m.response_token=$util.newBuffer($util.base64.length(d.response_token)),0);else if(d.response_token.length)m.response_token=d.response_token}if(d.sfida_id!=null){m.sfida_id=String(d.sfida_id)}return m};SfidaAuthToken.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if(o.bytes===String)d.response_token="";else{d.response_token=[];if(o.bytes!==Array)d.response_token=$util.newBuffer(d.response_token)}d.sfida_id=""}if(m.response_token!=null&&m.hasOwnProperty("response_token")){d.response_token=o.bytes===String?$util.base64.encode(m.response_token,0,m.response_token.length):o.bytes===Array?Array.prototype.slice.call(m.response_token):m.response_token}if(m.sfida_id!=null&&m.hasOwnProperty("sfida_id")){d.sfida_id=m.sfida_id}return d};SfidaAuthToken.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SfidaAuthToken}();Token.SuperAwesomeToken=function(){function SuperAwesomeToken(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SuperAwesomeToken.prototype.token="";SuperAwesomeToken.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.token!=null&&m.hasOwnProperty("token"))w.uint32(10).string(m.token);return w};SuperAwesomeToken.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Token.SuperAwesomeToken;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.token=r.string();break;default:r.skipType(t&7);break}}return m};SuperAwesomeToken.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Token.SuperAwesomeToken)return d;var m=new $root.POGOProtos.Data.Token.SuperAwesomeToken;if(d.token!=null){m.token=String(d.token)}return m};SuperAwesomeToken.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.token=""}if(m.token!=null&&m.hasOwnProperty("token")){d.token=m.token}return d};SuperAwesomeToken.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SuperAwesomeToken}();return Token}();Data.Trading=function(){var Trading={};Trading.ExcludedPokemon=function(){function ExcludedPokemon(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ExcludedPokemon.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;ExcludedPokemon.prototype.exclusion_reason=0;ExcludedPokemon.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(9).fixed64(m.pokemon_id);if(m.exclusion_reason!=null&&m.hasOwnProperty("exclusion_reason"))w.uint32(16).int32(m.exclusion_reason);return w};ExcludedPokemon.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Trading.ExcludedPokemon;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.fixed64();break;case 2:m.exclusion_reason=r.int32();break;default:r.skipType(t&7);break}}return m};ExcludedPokemon.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Trading.ExcludedPokemon)return d;var m=new $root.POGOProtos.Data.Trading.ExcludedPokemon;if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}switch(d.exclusion_reason){case"UNSET":case 0:m.exclusion_reason=0;break;case"MYTHICAL_POKEMON":case 1:m.exclusion_reason=1;break;case"SLASHED":case 2:m.exclusion_reason=2;break;case"GYM_DEPLOYED":case 3:m.exclusion_reason=3;break;case"BUDDY":case 4:m.exclusion_reason=4;break;case"STAMINA_NOT_FULL":case 5:m.exclusion_reason=5;break;case"EGG_NOT_HATCHED":case 6:m.exclusion_reason=6;break;case"FRIENDSHIP_LEVEL_LOW":case 7:m.exclusion_reason=7;break;case"FRIEND_CANNOT_AFFORD":case 8:m.exclusion_reason=8;break;case"FRIEND_REACHED_DAILY_LIMIT":case 9:m.exclusion_reason=9;break;case"ALREADY_TRADED":case 10:m.exclusion_reason=10;break;case"PLAYER_CANNOT_AFFORD":case 11:m.exclusion_reason=11;break;case"PLAYER_REACHED_DAILY_LIMIT":case 12:m.exclusion_reason=12;break;case"FAVORITE":case 13:m.exclusion_reason=13;break}return m};ExcludedPokemon.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0;d.exclusion_reason=o.enums===String?"UNSET":0}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}if(m.exclusion_reason!=null&&m.hasOwnProperty("exclusion_reason")){d.exclusion_reason=o.enums===String?$root.POGOProtos.Data.Trading.ExcludedPokemon.ExclusionReason[m.exclusion_reason]:m.exclusion_reason}return d};ExcludedPokemon.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ExcludedPokemon.ExclusionReason=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="MYTHICAL_POKEMON"]=1;values[valuesById[2]="SLASHED"]=2;values[valuesById[3]="GYM_DEPLOYED"]=3;values[valuesById[4]="BUDDY"]=4;values[valuesById[5]="STAMINA_NOT_FULL"]=5;values[valuesById[6]="EGG_NOT_HATCHED"]=6;values[valuesById[7]="FRIENDSHIP_LEVEL_LOW"]=7;values[valuesById[8]="FRIEND_CANNOT_AFFORD"]=8;values[valuesById[9]="FRIEND_REACHED_DAILY_LIMIT"]=9;values[valuesById[10]="ALREADY_TRADED"]=10;values[valuesById[11]="PLAYER_CANNOT_AFFORD"]=11;values[valuesById[12]="PLAYER_REACHED_DAILY_LIMIT"]=12;values[valuesById[13]="FAVORITE"]=13;return values}();return ExcludedPokemon}();Trading.Trading=function(){function Trading(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Trading.prototype.state=0;Trading.prototype.expiration_ms=$util.Long?$util.Long.fromBits(0,0,true):0;Trading.prototype.player=null;Trading.prototype.friend=null;Trading.prototype.trading_s2_cell_id=$util.Long?$util.Long.fromBits(0,0,false):0;Trading.prototype.transaction_log="";Trading.prototype.friendship_level_data=null;Trading.prototype.is_special_trading=false;Trading.prototype.pre_trading_friendship_level=null;Trading.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.state!=null&&m.hasOwnProperty("state"))w.uint32(8).int32(m.state);if(m.expiration_ms!=null&&m.hasOwnProperty("expiration_ms"))w.uint32(16).uint64(m.expiration_ms);if(m.player!=null&&m.hasOwnProperty("player"))$root.POGOProtos.Data.Trading.TradingPlayer.encode(m.player,w.uint32(26).fork()).ldelim();if(m.friend!=null&&m.hasOwnProperty("friend"))$root.POGOProtos.Data.Trading.TradingPlayer.encode(m.friend,w.uint32(34).fork()).ldelim();if(m.trading_s2_cell_id!=null&&m.hasOwnProperty("trading_s2_cell_id"))w.uint32(40).int64(m.trading_s2_cell_id);if(m.transaction_log!=null&&m.hasOwnProperty("transaction_log"))w.uint32(50).string(m.transaction_log);if(m.friendship_level_data!=null&&m.hasOwnProperty("friendship_level_data"))$root.POGOProtos.Data.Friends.FriendshipLevelData.encode(m.friendship_level_data,w.uint32(58).fork()).ldelim();if(m.is_special_trading!=null&&m.hasOwnProperty("is_special_trading"))w.uint32(64).bool(m.is_special_trading);if(m.pre_trading_friendship_level!=null&&m.hasOwnProperty("pre_trading_friendship_level"))$root.POGOProtos.Data.Friends.FriendshipLevelData.encode(m.pre_trading_friendship_level,w.uint32(74).fork()).ldelim();return w};Trading.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Trading.Trading;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.state=r.int32();break;case 2:m.expiration_ms=r.uint64();break;case 3:m.player=$root.POGOProtos.Data.Trading.TradingPlayer.decode(r,r.uint32());break;case 4:m.friend=$root.POGOProtos.Data.Trading.TradingPlayer.decode(r,r.uint32());break;case 5:m.trading_s2_cell_id=r.int64();break;case 6:m.transaction_log=r.string();break;case 7:m.friendship_level_data=$root.POGOProtos.Data.Friends.FriendshipLevelData.decode(r,r.uint32());break;case 8:m.is_special_trading=r.bool();break;case 9:m.pre_trading_friendship_level=$root.POGOProtos.Data.Friends.FriendshipLevelData.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};Trading.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Trading.Trading)return d;var m=new $root.POGOProtos.Data.Trading.Trading;switch(d.state){case"UNSET":case 0:m.state=0;break;case"PRIMORDIAL":case 1:m.state=1;break;case"WAIT":case 2:m.state=2;break;case"ACTIVE":case 3:m.state=3;break;case"CONFIRMED":case 4:m.state=4;break;case"FINISHED":case 5:m.state=5;break}if(d.expiration_ms!=null){if($util.Long)(m.expiration_ms=$util.Long.fromValue(d.expiration_ms)).unsigned=true;else if(typeof d.expiration_ms==="string")m.expiration_ms=parseInt(d.expiration_ms,10);else if(typeof d.expiration_ms==="number")m.expiration_ms=d.expiration_ms;else if(typeof d.expiration_ms==="object")m.expiration_ms=new $util.LongBits(d.expiration_ms.low>>>0,d.expiration_ms.high>>>0).toNumber(true)}if(d.player!=null){if(typeof d.player!=="object")throw TypeError(".POGOProtos.Data.Trading.Trading.player: object expected");m.player=$root.POGOProtos.Data.Trading.TradingPlayer.fromObject(d.player)}if(d.friend!=null){if(typeof d.friend!=="object")throw TypeError(".POGOProtos.Data.Trading.Trading.friend: object expected");m.friend=$root.POGOProtos.Data.Trading.TradingPlayer.fromObject(d.friend)}if(d.trading_s2_cell_id!=null){if($util.Long)(m.trading_s2_cell_id=$util.Long.fromValue(d.trading_s2_cell_id)).unsigned=false;else if(typeof d.trading_s2_cell_id==="string")m.trading_s2_cell_id=parseInt(d.trading_s2_cell_id,10);else if(typeof d.trading_s2_cell_id==="number")m.trading_s2_cell_id=d.trading_s2_cell_id;else if(typeof d.trading_s2_cell_id==="object")m.trading_s2_cell_id=new $util.LongBits(d.trading_s2_cell_id.low>>>0,d.trading_s2_cell_id.high>>>0).toNumber()}if(d.transaction_log!=null){m.transaction_log=String(d.transaction_log)}if(d.friendship_level_data!=null){if(typeof d.friendship_level_data!=="object")throw TypeError(".POGOProtos.Data.Trading.Trading.friendship_level_data: object expected");m.friendship_level_data=$root.POGOProtos.Data.Friends.FriendshipLevelData.fromObject(d.friendship_level_data)}if(d.is_special_trading!=null){m.is_special_trading=Boolean(d.is_special_trading)}if(d.pre_trading_friendship_level!=null){if(typeof d.pre_trading_friendship_level!=="object")throw TypeError(".POGOProtos.Data.Trading.Trading.pre_trading_friendship_level: object expected");m.pre_trading_friendship_level=$root.POGOProtos.Data.Friends.FriendshipLevelData.fromObject(d.pre_trading_friendship_level)}return m};Trading.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.state=o.enums===String?"UNSET":0;if($util.Long){var n=new $util.Long(0,0,true);d.expiration_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.expiration_ms=o.longs===String?"0":0;d.player=null;d.friend=null;if($util.Long){var n=new $util.Long(0,0,false);d.trading_s2_cell_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.trading_s2_cell_id=o.longs===String?"0":0;d.transaction_log="";d.friendship_level_data=null;d.is_special_trading=false;d.pre_trading_friendship_level=null}if(m.state!=null&&m.hasOwnProperty("state")){d.state=o.enums===String?$root.POGOProtos.Data.Trading.Trading.TradingState[m.state]:m.state}if(m.expiration_ms!=null&&m.hasOwnProperty("expiration_ms")){if(typeof m.expiration_ms==="number")d.expiration_ms=o.longs===String?String(m.expiration_ms):m.expiration_ms;else d.expiration_ms=o.longs===String?$util.Long.prototype.toString.call(m.expiration_ms):o.longs===Number?new $util.LongBits(m.expiration_ms.low>>>0,m.expiration_ms.high>>>0).toNumber(true):m.expiration_ms}if(m.player!=null&&m.hasOwnProperty("player")){d.player=$root.POGOProtos.Data.Trading.TradingPlayer.toObject(m.player,o)}if(m.friend!=null&&m.hasOwnProperty("friend")){d.friend=$root.POGOProtos.Data.Trading.TradingPlayer.toObject(m.friend,o)}if(m.trading_s2_cell_id!=null&&m.hasOwnProperty("trading_s2_cell_id")){if(typeof m.trading_s2_cell_id==="number")d.trading_s2_cell_id=o.longs===String?String(m.trading_s2_cell_id):m.trading_s2_cell_id;else d.trading_s2_cell_id=o.longs===String?$util.Long.prototype.toString.call(m.trading_s2_cell_id):o.longs===Number?new $util.LongBits(m.trading_s2_cell_id.low>>>0,m.trading_s2_cell_id.high>>>0).toNumber():m.trading_s2_cell_id}if(m.transaction_log!=null&&m.hasOwnProperty("transaction_log")){d.transaction_log=m.transaction_log}if(m.friendship_level_data!=null&&m.hasOwnProperty("friendship_level_data")){d.friendship_level_data=$root.POGOProtos.Data.Friends.FriendshipLevelData.toObject(m.friendship_level_data,o)}if(m.is_special_trading!=null&&m.hasOwnProperty("is_special_trading")){d.is_special_trading=m.is_special_trading}if(m.pre_trading_friendship_level!=null&&m.hasOwnProperty("pre_trading_friendship_level")){d.pre_trading_friendship_level=$root.POGOProtos.Data.Friends.FriendshipLevelData.toObject(m.pre_trading_friendship_level,o)}return d};Trading.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Trading.TradingState=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="PRIMORDIAL"]=1;values[valuesById[2]="WAIT"]=2;values[valuesById[3]="ACTIVE"]=3;values[valuesById[4]="CONFIRMED"]=4;values[valuesById[5]="FINISHED"]=5;return values}();return Trading}();Trading.TradingPlayer=function(){function TradingPlayer(p){this.excluded_pokemon=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}TradingPlayer.prototype.player_id="";TradingPlayer.prototype.public_profile=null;TradingPlayer.prototype.excluded_pokemon=$util.emptyArray;TradingPlayer.prototype.trading_pokemon=null;TradingPlayer.prototype.bonus=null;TradingPlayer.prototype.price=null;TradingPlayer.prototype.can_afford_trading=false;TradingPlayer.prototype.has_confirmed=false;TradingPlayer.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);if(m.public_profile!=null&&m.hasOwnProperty("public_profile"))$root.POGOProtos.Data.Player.PlayerPublicProfile.encode(m.public_profile,w.uint32(18).fork()).ldelim();if(m.excluded_pokemon!=null&&m.excluded_pokemon.length){for(var i=0;i<m.excluded_pokemon.length;++i)$root.POGOProtos.Data.Trading.ExcludedPokemon.encode(m.excluded_pokemon[i],w.uint32(26).fork()).ldelim()}if(m.trading_pokemon!=null&&m.hasOwnProperty("trading_pokemon"))$root.POGOProtos.Data.Trading.TradingPokemon.encode(m.trading_pokemon,w.uint32(34).fork()).ldelim();if(m.bonus!=null&&m.hasOwnProperty("bonus"))$root.POGOProtos.Inventory.Loot.encode(m.bonus,w.uint32(42).fork()).ldelim();if(m.price!=null&&m.hasOwnProperty("price"))$root.POGOProtos.Inventory.Loot.encode(m.price,w.uint32(50).fork()).ldelim();if(m.can_afford_trading!=null&&m.hasOwnProperty("can_afford_trading"))w.uint32(56).bool(m.can_afford_trading);if(m.has_confirmed!=null&&m.hasOwnProperty("has_confirmed"))w.uint32(64).bool(m.has_confirmed);return w};TradingPlayer.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Trading.TradingPlayer;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;case 2:m.public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.decode(r,r.uint32());break;case 3:if(!(m.excluded_pokemon&&m.excluded_pokemon.length))m.excluded_pokemon=[];m.excluded_pokemon.push($root.POGOProtos.Data.Trading.ExcludedPokemon.decode(r,r.uint32()));break;case 4:m.trading_pokemon=$root.POGOProtos.Data.Trading.TradingPokemon.decode(r,r.uint32());break;case 5:m.bonus=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;case 6:m.price=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;case 7:m.can_afford_trading=r.bool();break;case 8:m.has_confirmed=r.bool();break;default:r.skipType(t&7);break}}return m};TradingPlayer.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Trading.TradingPlayer)return d;var m=new $root.POGOProtos.Data.Trading.TradingPlayer;if(d.player_id!=null){m.player_id=String(d.player_id)}if(d.public_profile!=null){if(typeof d.public_profile!=="object")throw TypeError(".POGOProtos.Data.Trading.TradingPlayer.public_profile: object expected");m.public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.fromObject(d.public_profile)}if(d.excluded_pokemon){if(!Array.isArray(d.excluded_pokemon))throw TypeError(".POGOProtos.Data.Trading.TradingPlayer.excluded_pokemon: array expected");m.excluded_pokemon=[];for(var i=0;i<d.excluded_pokemon.length;++i){if(typeof d.excluded_pokemon[i]!=="object")throw TypeError(".POGOProtos.Data.Trading.TradingPlayer.excluded_pokemon: object expected");m.excluded_pokemon[i]=$root.POGOProtos.Data.Trading.ExcludedPokemon.fromObject(d.excluded_pokemon[i])}}if(d.trading_pokemon!=null){if(typeof d.trading_pokemon!=="object")throw TypeError(".POGOProtos.Data.Trading.TradingPlayer.trading_pokemon: object expected");m.trading_pokemon=$root.POGOProtos.Data.Trading.TradingPokemon.fromObject(d.trading_pokemon)}if(d.bonus!=null){if(typeof d.bonus!=="object")throw TypeError(".POGOProtos.Data.Trading.TradingPlayer.bonus: object expected");m.bonus=$root.POGOProtos.Inventory.Loot.fromObject(d.bonus)}if(d.price!=null){if(typeof d.price!=="object")throw TypeError(".POGOProtos.Data.Trading.TradingPlayer.price: object expected");m.price=$root.POGOProtos.Inventory.Loot.fromObject(d.price)}if(d.can_afford_trading!=null){m.can_afford_trading=Boolean(d.can_afford_trading)}if(d.has_confirmed!=null){m.has_confirmed=Boolean(d.has_confirmed)}return m};TradingPlayer.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.excluded_pokemon=[]}if(o.defaults){d.player_id="";d.public_profile=null;d.trading_pokemon=null;d.bonus=null;d.price=null;d.can_afford_trading=false;d.has_confirmed=false}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}if(m.public_profile!=null&&m.hasOwnProperty("public_profile")){d.public_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.toObject(m.public_profile,o)}if(m.excluded_pokemon&&m.excluded_pokemon.length){d.excluded_pokemon=[];for(var j=0;j<m.excluded_pokemon.length;++j){d.excluded_pokemon[j]=$root.POGOProtos.Data.Trading.ExcludedPokemon.toObject(m.excluded_pokemon[j],o)}}if(m.trading_pokemon!=null&&m.hasOwnProperty("trading_pokemon")){d.trading_pokemon=$root.POGOProtos.Data.Trading.TradingPokemon.toObject(m.trading_pokemon,o)}if(m.bonus!=null&&m.hasOwnProperty("bonus")){d.bonus=$root.POGOProtos.Inventory.Loot.toObject(m.bonus,o)}if(m.price!=null&&m.hasOwnProperty("price")){d.price=$root.POGOProtos.Inventory.Loot.toObject(m.price,o)}if(m.can_afford_trading!=null&&m.hasOwnProperty("can_afford_trading")){d.can_afford_trading=m.can_afford_trading}if(m.has_confirmed!=null&&m.hasOwnProperty("has_confirmed")){d.has_confirmed=m.has_confirmed}return d};TradingPlayer.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return TradingPlayer}();Trading.TradingPokemon=function(){function TradingPokemon(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}TradingPokemon.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;TradingPokemon.prototype.pokedex_entry_number=0;TradingPokemon.prototype.original_cp=0;TradingPokemon.prototype.adjusted_cp_min=0;TradingPokemon.prototype.adjusted_cp_max=0;TradingPokemon.prototype.original_stamina=0;TradingPokemon.prototype.adjusted_stamina_min=0;TradingPokemon.prototype.adjusted_stamina_max=0;TradingPokemon.prototype.friend_level_cap=false;TradingPokemon.prototype.move1=0;TradingPokemon.prototype.move2=0;TradingPokemon.prototype.pokemon_display=null;TradingPokemon.prototype.captured_s2_cell_id=$util.Long?$util.Long.fromBits(0,0,false):0;TradingPokemon.prototype.traded_pokemon=null;TradingPokemon.prototype.pokeball=null;TradingPokemon.prototype.individual_attack=0;TradingPokemon.prototype.individual_defense=0;TradingPokemon.prototype.individual_stamina=0;TradingPokemon.prototype.nickname="";TradingPokemon.prototype.favorite=false;TradingPokemon.prototype.move3=0;TradingPokemon.prototype.creation_time_ms=$util.Long?$util.Long.fromBits(0,0,false):0;TradingPokemon.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(9).fixed64(m.pokemon_id);if(m.pokedex_entry_number!=null&&m.hasOwnProperty("pokedex_entry_number"))w.uint32(16).int32(m.pokedex_entry_number);if(m.original_cp!=null&&m.hasOwnProperty("original_cp"))w.uint32(24).int32(m.original_cp);if(m.adjusted_cp_min!=null&&m.hasOwnProperty("adjusted_cp_min"))w.uint32(32).int32(m.adjusted_cp_min);if(m.adjusted_cp_max!=null&&m.hasOwnProperty("adjusted_cp_max"))w.uint32(40).int32(m.adjusted_cp_max);if(m.original_stamina!=null&&m.hasOwnProperty("original_stamina"))w.uint32(48).int32(m.original_stamina);if(m.adjusted_stamina_min!=null&&m.hasOwnProperty("adjusted_stamina_min"))w.uint32(56).int32(m.adjusted_stamina_min);if(m.adjusted_stamina_max!=null&&m.hasOwnProperty("adjusted_stamina_max"))w.uint32(64).int32(m.adjusted_stamina_max);if(m.friend_level_cap!=null&&m.hasOwnProperty("friend_level_cap"))w.uint32(72).bool(m.friend_level_cap);if(m.move1!=null&&m.hasOwnProperty("move1"))w.uint32(80).int32(m.move1);if(m.move2!=null&&m.hasOwnProperty("move2"))w.uint32(88).int32(m.move2);if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display"))$root.POGOProtos.Data.PokemonDisplay.encode(m.pokemon_display,w.uint32(98).fork()).ldelim();if(m.captured_s2_cell_id!=null&&m.hasOwnProperty("captured_s2_cell_id"))w.uint32(104).int64(m.captured_s2_cell_id);if(m.traded_pokemon!=null&&m.hasOwnProperty("traded_pokemon"))$root.POGOProtos.Data.PokemonData.encode(m.traded_pokemon,w.uint32(114).fork()).ldelim();if(m.pokeball!=null&&m.hasOwnProperty("pokeball"))$root.POGOProtos.Inventory.Item.ItemData.encode(m.pokeball,w.uint32(122).fork()).ldelim();if(m.individual_attack!=null&&m.hasOwnProperty("individual_attack"))w.uint32(128).int32(m.individual_attack);if(m.individual_defense!=null&&m.hasOwnProperty("individual_defense"))w.uint32(136).int32(m.individual_defense);if(m.individual_stamina!=null&&m.hasOwnProperty("individual_stamina"))w.uint32(144).int32(m.individual_stamina);if(m.nickname!=null&&m.hasOwnProperty("nickname"))w.uint32(154).string(m.nickname);if(m.favorite!=null&&m.hasOwnProperty("favorite"))w.uint32(160).bool(m.favorite);if(m.move3!=null&&m.hasOwnProperty("move3"))w.uint32(168).int32(m.move3);if(m.creation_time_ms!=null&&m.hasOwnProperty("creation_time_ms"))w.uint32(176).int64(m.creation_time_ms);return w};TradingPokemon.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Data.Trading.TradingPokemon;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.fixed64();break;case 2:m.pokedex_entry_number=r.int32();break;case 3:m.original_cp=r.int32();break;case 4:m.adjusted_cp_min=r.int32();break;case 5:m.adjusted_cp_max=r.int32();break;case 6:m.original_stamina=r.int32();break;case 7:m.adjusted_stamina_min=r.int32();break;case 8:m.adjusted_stamina_max=r.int32();break;case 9:m.friend_level_cap=r.bool();break;case 10:m.move1=r.int32();break;case 11:m.move2=r.int32();break;case 12:m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;case 13:m.captured_s2_cell_id=r.int64();break;case 14:m.traded_pokemon=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 15:m.pokeball=$root.POGOProtos.Inventory.Item.ItemData.decode(r,r.uint32());break;case 16:m.individual_attack=r.int32();break;case 17:m.individual_defense=r.int32();break;case 18:m.individual_stamina=r.int32();break;case 19:m.nickname=r.string();break;case 20:m.favorite=r.bool();break;case 21:m.move3=r.int32();break;case 22:m.creation_time_ms=r.int64();break;default:r.skipType(t&7);break}}return m};TradingPokemon.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Data.Trading.TradingPokemon)return d;var m=new $root.POGOProtos.Data.Trading.TradingPokemon;if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}if(d.pokedex_entry_number!=null){m.pokedex_entry_number=d.pokedex_entry_number|0}if(d.original_cp!=null){m.original_cp=d.original_cp|0}if(d.adjusted_cp_min!=null){m.adjusted_cp_min=d.adjusted_cp_min|0}if(d.adjusted_cp_max!=null){m.adjusted_cp_max=d.adjusted_cp_max|0}if(d.original_stamina!=null){m.original_stamina=d.original_stamina|0}if(d.adjusted_stamina_min!=null){m.adjusted_stamina_min=d.adjusted_stamina_min|0}if(d.adjusted_stamina_max!=null){m.adjusted_stamina_max=d.adjusted_stamina_max|0}if(d.friend_level_cap!=null){m.friend_level_cap=Boolean(d.friend_level_cap)}switch(d.move1){case"MOVE_UNSET":case 0:m.move1=0;break;case"THUNDER_SHOCK":case 1:m.move1=1;break;case"QUICK_ATTACK":case 2:m.move1=2;break;case"SCRATCH":case 3:m.move1=3;break;case"EMBER":case 4:m.move1=4;break;case"VINE_WHIP":case 5:m.move1=5;break;case"TACKLE":case 6:m.move1=6;break;case"RAZOR_LEAF":case 7:m.move1=7;break;case"TAKE_DOWN":case 8:m.move1=8;break;case"WATER_GUN":case 9:m.move1=9;break;case"BITE":case 10:m.move1=10;break;case"POUND":case 11:m.move1=11;break;case"DOUBLE_SLAP":case 12:m.move1=12;break;case"WRAP":case 13:m.move1=13;break;case"HYPER_BEAM":case 14:m.move1=14;break;case"LICK":case 15:m.move1=15;break;case"DARK_PULSE":case 16:m.move1=16;break;case"SMOG":case 17:m.move1=17;break;case"SLUDGE":case 18:m.move1=18;break;case"METAL_CLAW":case 19:m.move1=19;break;case"VICE_GRIP":case 20:m.move1=20;break;case"FLAME_WHEEL":case 21:m.move1=21;break;case"MEGAHORN":case 22:m.move1=22;break;case"WING_ATTACK":case 23:m.move1=23;break;case"FLAMETHROWER":case 24:m.move1=24;break;case"SUCKER_PUNCH":case 25:m.move1=25;break;case"DIG":case 26:m.move1=26;break;case"LOW_KICK":case 27:m.move1=27;break;case"CROSS_CHOP":case 28:m.move1=28;break;case"PSYCHO_CUT":case 29:m.move1=29;break;case"PSYBEAM":case 30:m.move1=30;break;case"EARTHQUAKE":case 31:m.move1=31;break;case"STONE_EDGE":case 32:m.move1=32;break;case"ICE_PUNCH":case 33:m.move1=33;break;case"HEART_STAMP":case 34:m.move1=34;break;case"DISCHARGE":case 35:m.move1=35;break;case"FLASH_CANNON":case 36:m.move1=36;break;case"PECK":case 37:m.move1=37;break;case"DRILL_PECK":case 38:m.move1=38;break;case"ICE_BEAM":case 39:m.move1=39;break;case"BLIZZARD":case 40:m.move1=40;break;case"AIR_SLASH":case 41:m.move1=41;break;case"HEAT_WAVE":case 42:m.move1=42;break;case"TWINEEDLE":case 43:m.move1=43;break;case"POISON_JAB":case 44:m.move1=44;break;case"AERIAL_ACE":case 45:m.move1=45;break;case"DRILL_RUN":case 46:m.move1=46;break;case"PETAL_BLIZZARD":case 47:m.move1=47;break;case"MEGA_DRAIN":case 48:m.move1=48;break;case"BUG_BUZZ":case 49:m.move1=49;break;case"POISON_FANG":case 50:m.move1=50;break;case"NIGHT_SLASH":case 51:m.move1=51;break;case"SLASH":case 52:m.move1=52;break;case"BUBBLE_BEAM":case 53:m.move1=53;break;case"SUBMISSION":case 54:m.move1=54;break;case"KARATE_CHOP":case 55:m.move1=55;break;case"LOW_SWEEP":case 56:m.move1=56;break;case"AQUA_JET":case 57:m.move1=57;break;case"AQUA_TAIL":case 58:m.move1=58;break;case"SEED_BOMB":case 59:m.move1=59;break;case"PSYSHOCK":case 60:m.move1=60;break;case"ROCK_THROW":case 61:m.move1=61;break;case"ANCIENT_POWER":case 62:m.move1=62;break;case"ROCK_TOMB":case 63:m.move1=63;break;case"ROCK_SLIDE":case 64:m.move1=64;break;case"POWER_GEM":case 65:m.move1=65;break;case"SHADOW_SNEAK":case 66:m.move1=66;break;case"SHADOW_PUNCH":case 67:m.move1=67;break;case"SHADOW_CLAW":case 68:m.move1=68;break;case"OMINOUS_WIND":case 69:m.move1=69;break;case"SHADOW_BALL":case 70:m.move1=70;break;case"BULLET_PUNCH":case 71:m.move1=71;break;case"MAGNET_BOMB":case 72:m.move1=72;break;case"STEEL_WING":case 73:m.move1=73;break;case"IRON_HEAD":case 74:m.move1=74;break;case"PARABOLIC_CHARGE":case 75:m.move1=75;break;case"SPARK":case 76:m.move1=76;break;case"THUNDER_PUNCH":case 77:m.move1=77;break;case"THUNDER":case 78:m.move1=78;break;case"THUNDERBOLT":case 79:m.move1=79;break;case"TWISTER":case 80:m.move1=80;break;case"DRAGON_BREATH":case 81:m.move1=81;break;case"DRAGON_PULSE":case 82:m.move1=82;break;case"DRAGON_CLAW":case 83:m.move1=83;break;case"DISARMING_VOICE":case 84:m.move1=84;break;case"DRAINING_KISS":case 85:m.move1=85;break;case"DAZZLING_GLEAM":case 86:m.move1=86;break;case"MOONBLAST":case 87:m.move1=87;break;case"PLAY_ROUGH":case 88:m.move1=88;break;case"CROSS_POISON":case 89:m.move1=89;break;case"SLUDGE_BOMB":case 90:m.move1=90;break;case"SLUDGE_WAVE":case 91:m.move1=91;break;case"GUNK_SHOT":case 92:m.move1=92;break;case"MUD_SHOT":case 93:m.move1=93;break;case"BONE_CLUB":case 94:m.move1=94;break;case"BULLDOZE":case 95:m.move1=95;break;case"MUD_BOMB":case 96:m.move1=96;break;case"FURY_CUTTER":case 97:m.move1=97;break;case"BUG_BITE":case 98:m.move1=98;break;case"SIGNAL_BEAM":case 99:m.move1=99;break;case"X_SCISSOR":case 100:m.move1=100;break;case"FLAME_CHARGE":case 101:m.move1=101;break;case"FLAME_BURST":case 102:m.move1=102;break;case"FIRE_BLAST":case 103:m.move1=103;break;case"BRINE":case 104:m.move1=104;break;case"WATER_PULSE":case 105:m.move1=105;break;case"SCALD":case 106:m.move1=106;break;case"HYDRO_PUMP":case 107:m.move1=107;break;case"PSYCHIC":case 108:m.move1=108;break;case"PSYSTRIKE":case 109:m.move1=109;break;case"ICE_SHARD":case 110:m.move1=110;break;case"ICY_WIND":case 111:m.move1=111;break;case"FROST_BREATH":case 112:m.move1=112;break;case"ABSORB":case 113:m.move1=113;break;case"GIGA_DRAIN":case 114:m.move1=114;break;case"FIRE_PUNCH":case 115:m.move1=115;break;case"SOLAR_BEAM":case 116:m.move1=116;break;case"LEAF_BLADE":case 117:m.move1=117;break;case"POWER_WHIP":case 118:m.move1=118;break;case"SPLASH":case 119:m.move1=119;break;case"ACID":case 120:m.move1=120;break;case"AIR_CUTTER":case 121:m.move1=121;break;case"HURRICANE":case 122:m.move1=122;break;case"BRICK_BREAK":case 123:m.move1=123;break;case"CUT":case 124:m.move1=124;break;case"SWIFT":case 125:m.move1=125;break;case"HORN_ATTACK":case 126:m.move1=126;break;case"STOMP":case 127:m.move1=127;break;case"HEADBUTT":case 128:m.move1=128;break;case"HYPER_FANG":case 129:m.move1=129;break;case"SLAM":case 130:m.move1=130;break;case"BODY_SLAM":case 131:m.move1=131;break;case"REST":case 132:m.move1=132;break;case"STRUGGLE":case 133:m.move1=133;break;case"SCALD_BLASTOISE":case 134:m.move1=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.move1=135;break;case"WRAP_GREEN":case 136:m.move1=136;break;case"WRAP_PINK":case 137:m.move1=137;break;case"FURY_CUTTER_FAST":case 200:m.move1=200;break;case"BUG_BITE_FAST":case 201:m.move1=201;break;case"BITE_FAST":case 202:m.move1=202;break;case"SUCKER_PUNCH_FAST":case 203:m.move1=203;break;case"DRAGON_BREATH_FAST":case 204:m.move1=204;break;case"THUNDER_SHOCK_FAST":case 205:m.move1=205;break;case"SPARK_FAST":case 206:m.move1=206;break;case"LOW_KICK_FAST":case 207:m.move1=207;break;case"KARATE_CHOP_FAST":case 208:m.move1=208;break;case"EMBER_FAST":case 209:m.move1=209;break;case"WING_ATTACK_FAST":case 210:m.move1=210;break;case"PECK_FAST":case 211:m.move1=211;break;case"LICK_FAST":case 212:m.move1=212;break;case"SHADOW_CLAW_FAST":case 213:m.move1=213;break;case"VINE_WHIP_FAST":case 214:m.move1=214;break;case"RAZOR_LEAF_FAST":case 215:m.move1=215;break;case"MUD_SHOT_FAST":case 216:m.move1=216;break;case"ICE_SHARD_FAST":case 217:m.move1=217;break;case"FROST_BREATH_FAST":case 218:m.move1=218;break;case"QUICK_ATTACK_FAST":case 219:m.move1=219;break;case"SCRATCH_FAST":case 220:m.move1=220;break;case"TACKLE_FAST":case 221:m.move1=221;break;case"POUND_FAST":case 222:m.move1=222;break;case"CUT_FAST":case 223:m.move1=223;break;case"POISON_JAB_FAST":case 224:m.move1=224;break;case"ACID_FAST":case 225:m.move1=225;break;case"PSYCHO_CUT_FAST":case 226:m.move1=226;break;case"ROCK_THROW_FAST":case 227:m.move1=227;break;case"METAL_CLAW_FAST":case 228:m.move1=228;break;case"BULLET_PUNCH_FAST":case 229:m.move1=229;break;case"WATER_GUN_FAST":case 230:m.move1=230;break;case"SPLASH_FAST":case 231:m.move1=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.move1=232;break;case"MUD_SLAP_FAST":case 233:m.move1=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.move1=234;break;case"CONFUSION_FAST":case 235:m.move1=235;break;case"POISON_STING_FAST":case 236:m.move1=236;break;case"BUBBLE_FAST":case 237:m.move1=237;break;case"FEINT_ATTACK_FAST":case 238:m.move1=238;break;case"STEEL_WING_FAST":case 239:m.move1=239;break;case"FIRE_FANG_FAST":case 240:m.move1=240;break;case"ROCK_SMASH_FAST":case 241:m.move1=241;break;case"TRANSFORM_FAST":case 242:m.move1=242;break;case"COUNTER_FAST":case 243:m.move1=243;break;case"POWDER_SNOW_FAST":case 244:m.move1=244;break;case"CLOSE_COMBAT":case 245:m.move1=245;break;case"DYNAMIC_PUNCH":case 246:m.move1=246;break;case"FOCUS_BLAST":case 247:m.move1=247;break;case"AURORA_BEAM":case 248:m.move1=248;break;case"CHARGE_BEAM_FAST":case 249:m.move1=249;break;case"VOLT_SWITCH_FAST":case 250:m.move1=250;break;case"WILD_CHARGE":case 251:m.move1=251;break;case"ZAP_CANNON":case 252:m.move1=252;break;case"DRAGON_TAIL_FAST":case 253:m.move1=253;break;case"AVALANCHE":case 254:m.move1=254;break;case"AIR_SLASH_FAST":case 255:m.move1=255;break;case"BRAVE_BIRD":case 256:m.move1=256;break;case"SKY_ATTACK":case 257:m.move1=257;break;case"SAND_TOMB":case 258:m.move1=258;break;case"ROCK_BLAST":case 259:m.move1=259;break;case"INFESTATION_FAST":case 260:m.move1=260;break;case"STRUGGLE_BUG_FAST":case 261:m.move1=261;break;case"SILVER_WIND":case 262:m.move1=262;break;case"ASTONISH_FAST":case 263:m.move1=263;break;case"HEX_FAST":case 264:m.move1=264;break;case"NIGHT_SHADE":case 265:m.move1=265;break;case"IRON_TAIL_FAST":case 266:m.move1=266;break;case"GYRO_BALL":case 267:m.move1=267;break;case"HEAVY_SLAM":case 268:m.move1=268;break;case"FIRE_SPIN_FAST":case 269:m.move1=269;break;case"OVERHEAT":case 270:m.move1=270;break;case"BULLET_SEED_FAST":case 271:m.move1=271;break;case"GRASS_KNOT":case 272:m.move1=272;break;case"ENERGY_BALL":case 273:m.move1=273;break;case"EXTRASENSORY_FAST":case 274:m.move1=274;break;case"FUTURESIGHT":case 275:m.move1=275;break;case"MIRROR_COAT":case 276:m.move1=276;break;case"OUTRAGE":case 277:m.move1=277;break;case"SNARL_FAST":case 278:m.move1=278;break;case"CRUNCH":case 279:m.move1=279;break;case"FOUL_PLAY":case 280:m.move1=280;break;case"HIDDEN_POWER_FAST":case 281:m.move1=281;break;case"TAKE_DOWN_FAST":case 282:m.move1=282;break;case"WATERFALL_FAST":case 283:m.move1=283;break;case"SURF":case 284:m.move1=284;break;case"DRACO_METEOR":case 285:m.move1=285;break;case"DOOM_DESIRE":case 286:m.move1=286;break;case"YAWN_FAST":case 287:m.move1=287;break;case"PSYCHO_BOOST":case 288:m.move1=288;break;case"ORIGIN_PULSE":case 289:m.move1=289;break;case"PRECIPICE_BLADES":case 290:m.move1=290;break;case"PRESENT_FAST":case 291:m.move1=291;break;case"WEATHER_BALL_FIRE":case 292:m.move1=292;break;case"WEATHER_BALL_ICE":case 293:m.move1=293;break;case"WEATHER_BALL_ROCK":case 294:m.move1=294;break;case"WEATHER_BALL_WATER":case 295:m.move1=295;break;case"FRENZY_PLANT":case 296:m.move1=296;break;case"SMACK_DOWN_FAST":case 297:m.move1=297;break;case"BLAST_BURN":case 298:m.move1=298;break;case"HYDRO_CANNON":case 299:m.move1=299;break;case"LAST_RESORT":case 300:m.move1=300;break;case"METEOR_MASH":case 301:m.move1=301;break;case"SKULL_BASH":case 302:m.move1=302;break;case"ACID_SPRAY":case 303:m.move1=303;break;case"EARTH_POWER":case 304:m.move1=304;break;case"CRABHAMMER":case 305:m.move1=305;break;case"LUNGE":case 306:m.move1=306;break;case"CRUSH_CLAW":case 307:m.move1=307;break;case"OCTAZOOKA":case 308:m.move1=308;break;case"MIRROR_SHOT":case 309:m.move1=309;break;case"SUPER_POWER":case 310:m.move1=310;break;case"FELL_STINGER":case 311:m.move1=311;break;case"LEAF_TORNADO":case 312:m.move1=312;break;case"LEECH_LIFE":case 313:m.move1=313;break;case"DRAIN_PUNCH":case 314:m.move1=314;break;case"SHADOW_BONE":case 315:m.move1=315;break;case"MUDDY_WATER":case 316:m.move1=316;break;case"BLAZE_KICK":case 317:m.move1=317;break;case"RAZOR_SHELL":case 318:m.move1=318;break;case"POWER_UP_PUNCH":case 319:m.move1=319;break}switch(d.move2){case"MOVE_UNSET":case 0:m.move2=0;break;case"THUNDER_SHOCK":case 1:m.move2=1;break;case"QUICK_ATTACK":case 2:m.move2=2;break;case"SCRATCH":case 3:m.move2=3;break;case"EMBER":case 4:m.move2=4;break;case"VINE_WHIP":case 5:m.move2=5;break;case"TACKLE":case 6:m.move2=6;break;case"RAZOR_LEAF":case 7:m.move2=7;break;case"TAKE_DOWN":case 8:m.move2=8;break;case"WATER_GUN":case 9:m.move2=9;break;case"BITE":case 10:m.move2=10;break;case"POUND":case 11:m.move2=11;break;case"DOUBLE_SLAP":case 12:m.move2=12;break;case"WRAP":case 13:m.move2=13;break;case"HYPER_BEAM":case 14:m.move2=14;break;case"LICK":case 15:m.move2=15;break;case"DARK_PULSE":case 16:m.move2=16;break;case"SMOG":case 17:m.move2=17;break;case"SLUDGE":case 18:m.move2=18;break;case"METAL_CLAW":case 19:m.move2=19;break;case"VICE_GRIP":case 20:m.move2=20;break;case"FLAME_WHEEL":case 21:m.move2=21;break;case"MEGAHORN":case 22:m.move2=22;break;case"WING_ATTACK":case 23:m.move2=23;break;case"FLAMETHROWER":case 24:m.move2=24;break;case"SUCKER_PUNCH":case 25:m.move2=25;break;case"DIG":case 26:m.move2=26;break;case"LOW_KICK":case 27:m.move2=27;break;case"CROSS_CHOP":case 28:m.move2=28;break;case"PSYCHO_CUT":case 29:m.move2=29;break;case"PSYBEAM":case 30:m.move2=30;break;case"EARTHQUAKE":case 31:m.move2=31;break;case"STONE_EDGE":case 32:m.move2=32;break;case"ICE_PUNCH":case 33:m.move2=33;break;case"HEART_STAMP":case 34:m.move2=34;break;case"DISCHARGE":case 35:m.move2=35;break;case"FLASH_CANNON":case 36:m.move2=36;break;case"PECK":case 37:m.move2=37;break;case"DRILL_PECK":case 38:m.move2=38;break;case"ICE_BEAM":case 39:m.move2=39;break;case"BLIZZARD":case 40:m.move2=40;break;case"AIR_SLASH":case 41:m.move2=41;break;case"HEAT_WAVE":case 42:m.move2=42;break;case"TWINEEDLE":case 43:m.move2=43;break;case"POISON_JAB":case 44:m.move2=44;break;case"AERIAL_ACE":case 45:m.move2=45;break;case"DRILL_RUN":case 46:m.move2=46;break;case"PETAL_BLIZZARD":case 47:m.move2=47;break;case"MEGA_DRAIN":case 48:m.move2=48;break;case"BUG_BUZZ":case 49:m.move2=49;break;case"POISON_FANG":case 50:m.move2=50;break;case"NIGHT_SLASH":case 51:m.move2=51;break;case"SLASH":case 52:m.move2=52;break;case"BUBBLE_BEAM":case 53:m.move2=53;break;case"SUBMISSION":case 54:m.move2=54;break;case"KARATE_CHOP":case 55:m.move2=55;break;case"LOW_SWEEP":case 56:m.move2=56;break;case"AQUA_JET":case 57:m.move2=57;break;case"AQUA_TAIL":case 58:m.move2=58;break;case"SEED_BOMB":case 59:m.move2=59;break;case"PSYSHOCK":case 60:m.move2=60;break;case"ROCK_THROW":case 61:m.move2=61;break;case"ANCIENT_POWER":case 62:m.move2=62;break;case"ROCK_TOMB":case 63:m.move2=63;break;case"ROCK_SLIDE":case 64:m.move2=64;break;case"POWER_GEM":case 65:m.move2=65;break;case"SHADOW_SNEAK":case 66:m.move2=66;break;case"SHADOW_PUNCH":case 67:m.move2=67;break;case"SHADOW_CLAW":case 68:m.move2=68;break;case"OMINOUS_WIND":case 69:m.move2=69;break;case"SHADOW_BALL":case 70:m.move2=70;break;case"BULLET_PUNCH":case 71:m.move2=71;break;case"MAGNET_BOMB":case 72:m.move2=72;break;case"STEEL_WING":case 73:m.move2=73;break;case"IRON_HEAD":case 74:m.move2=74;break;case"PARABOLIC_CHARGE":case 75:m.move2=75;break;case"SPARK":case 76:m.move2=76;break;case"THUNDER_PUNCH":case 77:m.move2=77;break;case"THUNDER":case 78:m.move2=78;break;case"THUNDERBOLT":case 79:m.move2=79;break;case"TWISTER":case 80:m.move2=80;break;case"DRAGON_BREATH":case 81:m.move2=81;break;case"DRAGON_PULSE":case 82:m.move2=82;break;case"DRAGON_CLAW":case 83:m.move2=83;break;case"DISARMING_VOICE":case 84:m.move2=84;break;case"DRAINING_KISS":case 85:m.move2=85;break;case"DAZZLING_GLEAM":case 86:m.move2=86;break;case"MOONBLAST":case 87:m.move2=87;break;case"PLAY_ROUGH":case 88:m.move2=88;break;case"CROSS_POISON":case 89:m.move2=89;break;case"SLUDGE_BOMB":case 90:m.move2=90;break;case"SLUDGE_WAVE":case 91:m.move2=91;break;case"GUNK_SHOT":case 92:m.move2=92;break;case"MUD_SHOT":case 93:m.move2=93;break;case"BONE_CLUB":case 94:m.move2=94;break;case"BULLDOZE":case 95:m.move2=95;break;case"MUD_BOMB":case 96:m.move2=96;break;case"FURY_CUTTER":case 97:m.move2=97;break;case"BUG_BITE":case 98:m.move2=98;break;case"SIGNAL_BEAM":case 99:m.move2=99;break;case"X_SCISSOR":case 100:m.move2=100;break;case"FLAME_CHARGE":case 101:m.move2=101;break;case"FLAME_BURST":case 102:m.move2=102;break;case"FIRE_BLAST":case 103:m.move2=103;break;case"BRINE":case 104:m.move2=104;break;case"WATER_PULSE":case 105:m.move2=105;break;case"SCALD":case 106:m.move2=106;break;case"HYDRO_PUMP":case 107:m.move2=107;break;case"PSYCHIC":case 108:m.move2=108;break;case"PSYSTRIKE":case 109:m.move2=109;break;case"ICE_SHARD":case 110:m.move2=110;break;case"ICY_WIND":case 111:m.move2=111;break;case"FROST_BREATH":case 112:m.move2=112;break;case"ABSORB":case 113:m.move2=113;break;case"GIGA_DRAIN":case 114:m.move2=114;break;case"FIRE_PUNCH":case 115:m.move2=115;break;case"SOLAR_BEAM":case 116:m.move2=116;break;case"LEAF_BLADE":case 117:m.move2=117;break;case"POWER_WHIP":case 118:m.move2=118;break;case"SPLASH":case 119:m.move2=119;break;case"ACID":case 120:m.move2=120;break;case"AIR_CUTTER":case 121:m.move2=121;break;case"HURRICANE":case 122:m.move2=122;break;case"BRICK_BREAK":case 123:m.move2=123;break;case"CUT":case 124:m.move2=124;break;case"SWIFT":case 125:m.move2=125;break;case"HORN_ATTACK":case 126:m.move2=126;break;case"STOMP":case 127:m.move2=127;break;case"HEADBUTT":case 128:m.move2=128;break;case"HYPER_FANG":case 129:m.move2=129;break;case"SLAM":case 130:m.move2=130;break;case"BODY_SLAM":case 131:m.move2=131;break;case"REST":case 132:m.move2=132;break;case"STRUGGLE":case 133:m.move2=133;break;case"SCALD_BLASTOISE":case 134:m.move2=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.move2=135;break;case"WRAP_GREEN":case 136:m.move2=136;break;case"WRAP_PINK":case 137:m.move2=137;break;case"FURY_CUTTER_FAST":case 200:m.move2=200;break;case"BUG_BITE_FAST":case 201:m.move2=201;break;case"BITE_FAST":case 202:m.move2=202;break;case"SUCKER_PUNCH_FAST":case 203:m.move2=203;break;case"DRAGON_BREATH_FAST":case 204:m.move2=204;break;case"THUNDER_SHOCK_FAST":case 205:m.move2=205;break;case"SPARK_FAST":case 206:m.move2=206;break;case"LOW_KICK_FAST":case 207:m.move2=207;break;case"KARATE_CHOP_FAST":case 208:m.move2=208;break;case"EMBER_FAST":case 209:m.move2=209;break;case"WING_ATTACK_FAST":case 210:m.move2=210;break;case"PECK_FAST":case 211:m.move2=211;break;case"LICK_FAST":case 212:m.move2=212;break;case"SHADOW_CLAW_FAST":case 213:m.move2=213;break;case"VINE_WHIP_FAST":case 214:m.move2=214;break;case"RAZOR_LEAF_FAST":case 215:m.move2=215;break;case"MUD_SHOT_FAST":case 216:m.move2=216;break;case"ICE_SHARD_FAST":case 217:m.move2=217;break;case"FROST_BREATH_FAST":case 218:m.move2=218;break;case"QUICK_ATTACK_FAST":case 219:m.move2=219;break;case"SCRATCH_FAST":case 220:m.move2=220;break;case"TACKLE_FAST":case 221:m.move2=221;break;case"POUND_FAST":case 222:m.move2=222;break;case"CUT_FAST":case 223:m.move2=223;break;case"POISON_JAB_FAST":case 224:m.move2=224;break;case"ACID_FAST":case 225:m.move2=225;break;case"PSYCHO_CUT_FAST":case 226:m.move2=226;break;case"ROCK_THROW_FAST":case 227:m.move2=227;break;case"METAL_CLAW_FAST":case 228:m.move2=228;break;case"BULLET_PUNCH_FAST":case 229:m.move2=229;break;case"WATER_GUN_FAST":case 230:m.move2=230;break;case"SPLASH_FAST":case 231:m.move2=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.move2=232;break;case"MUD_SLAP_FAST":case 233:m.move2=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.move2=234;break;case"CONFUSION_FAST":case 235:m.move2=235;break;case"POISON_STING_FAST":case 236:m.move2=236;break;case"BUBBLE_FAST":case 237:m.move2=237;break;case"FEINT_ATTACK_FAST":case 238:m.move2=238;break;case"STEEL_WING_FAST":case 239:m.move2=239;break;case"FIRE_FANG_FAST":case 240:m.move2=240;break;case"ROCK_SMASH_FAST":case 241:m.move2=241;break;case"TRANSFORM_FAST":case 242:m.move2=242;break;case"COUNTER_FAST":case 243:m.move2=243;break;case"POWDER_SNOW_FAST":case 244:m.move2=244;break;case"CLOSE_COMBAT":case 245:m.move2=245;break;case"DYNAMIC_PUNCH":case 246:m.move2=246;break;case"FOCUS_BLAST":case 247:m.move2=247;break;case"AURORA_BEAM":case 248:m.move2=248;break;case"CHARGE_BEAM_FAST":case 249:m.move2=249;break;case"VOLT_SWITCH_FAST":case 250:m.move2=250;break;case"WILD_CHARGE":case 251:m.move2=251;break;case"ZAP_CANNON":case 252:m.move2=252;break;case"DRAGON_TAIL_FAST":case 253:m.move2=253;break;case"AVALANCHE":case 254:m.move2=254;break;case"AIR_SLASH_FAST":case 255:m.move2=255;break;case"BRAVE_BIRD":case 256:m.move2=256;break;case"SKY_ATTACK":case 257:m.move2=257;break;case"SAND_TOMB":case 258:m.move2=258;break;case"ROCK_BLAST":case 259:m.move2=259;break;case"INFESTATION_FAST":case 260:m.move2=260;break;case"STRUGGLE_BUG_FAST":case 261:m.move2=261;break;case"SILVER_WIND":case 262:m.move2=262;break;case"ASTONISH_FAST":case 263:m.move2=263;break;case"HEX_FAST":case 264:m.move2=264;break;case"NIGHT_SHADE":case 265:m.move2=265;break;case"IRON_TAIL_FAST":case 266:m.move2=266;break;case"GYRO_BALL":case 267:m.move2=267;break;case"HEAVY_SLAM":case 268:m.move2=268;break;case"FIRE_SPIN_FAST":case 269:m.move2=269;break;case"OVERHEAT":case 270:m.move2=270;break;case"BULLET_SEED_FAST":case 271:m.move2=271;break;case"GRASS_KNOT":case 272:m.move2=272;break;case"ENERGY_BALL":case 273:m.move2=273;break;case"EXTRASENSORY_FAST":case 274:m.move2=274;break;case"FUTURESIGHT":case 275:m.move2=275;break;case"MIRROR_COAT":case 276:m.move2=276;break;case"OUTRAGE":case 277:m.move2=277;break;case"SNARL_FAST":case 278:m.move2=278;break;case"CRUNCH":case 279:m.move2=279;break;case"FOUL_PLAY":case 280:m.move2=280;break;case"HIDDEN_POWER_FAST":case 281:m.move2=281;break;case"TAKE_DOWN_FAST":case 282:m.move2=282;break;case"WATERFALL_FAST":case 283:m.move2=283;break;case"SURF":case 284:m.move2=284;break;case"DRACO_METEOR":case 285:m.move2=285;break;case"DOOM_DESIRE":case 286:m.move2=286;break;case"YAWN_FAST":case 287:m.move2=287;break;case"PSYCHO_BOOST":case 288:m.move2=288;break;case"ORIGIN_PULSE":case 289:m.move2=289;break;case"PRECIPICE_BLADES":case 290:m.move2=290;break;case"PRESENT_FAST":case 291:m.move2=291;break;case"WEATHER_BALL_FIRE":case 292:m.move2=292;break;case"WEATHER_BALL_ICE":case 293:m.move2=293;break;case"WEATHER_BALL_ROCK":case 294:m.move2=294;break;case"WEATHER_BALL_WATER":case 295:m.move2=295;break;case"FRENZY_PLANT":case 296:m.move2=296;break;case"SMACK_DOWN_FAST":case 297:m.move2=297;break;case"BLAST_BURN":case 298:m.move2=298;break;case"HYDRO_CANNON":case 299:m.move2=299;break;case"LAST_RESORT":case 300:m.move2=300;break;case"METEOR_MASH":case 301:m.move2=301;break;case"SKULL_BASH":case 302:m.move2=302;break;case"ACID_SPRAY":case 303:m.move2=303;break;case"EARTH_POWER":case 304:m.move2=304;break;case"CRABHAMMER":case 305:m.move2=305;break;case"LUNGE":case 306:m.move2=306;break;case"CRUSH_CLAW":case 307:m.move2=307;break;case"OCTAZOOKA":case 308:m.move2=308;break;case"MIRROR_SHOT":case 309:m.move2=309;break;case"SUPER_POWER":case 310:m.move2=310;break;case"FELL_STINGER":case 311:m.move2=311;break;case"LEAF_TORNADO":case 312:m.move2=312;break;case"LEECH_LIFE":case 313:m.move2=313;break;case"DRAIN_PUNCH":case 314:m.move2=314;break;case"SHADOW_BONE":case 315:m.move2=315;break;case"MUDDY_WATER":case 316:m.move2=316;break;case"BLAZE_KICK":case 317:m.move2=317;break;case"RAZOR_SHELL":case 318:m.move2=318;break;case"POWER_UP_PUNCH":case 319:m.move2=319;break}if(d.pokemon_display!=null){if(typeof d.pokemon_display!=="object")throw TypeError(".POGOProtos.Data.Trading.TradingPokemon.pokemon_display: object expected");m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.pokemon_display)}if(d.captured_s2_cell_id!=null){if($util.Long)(m.captured_s2_cell_id=$util.Long.fromValue(d.captured_s2_cell_id)).unsigned=false;else if(typeof d.captured_s2_cell_id==="string")m.captured_s2_cell_id=parseInt(d.captured_s2_cell_id,10);else if(typeof d.captured_s2_cell_id==="number")m.captured_s2_cell_id=d.captured_s2_cell_id;else if(typeof d.captured_s2_cell_id==="object")m.captured_s2_cell_id=new $util.LongBits(d.captured_s2_cell_id.low>>>0,d.captured_s2_cell_id.high>>>0).toNumber()}if(d.traded_pokemon!=null){if(typeof d.traded_pokemon!=="object")throw TypeError(".POGOProtos.Data.Trading.TradingPokemon.traded_pokemon: object expected");m.traded_pokemon=$root.POGOProtos.Data.PokemonData.fromObject(d.traded_pokemon)}if(d.pokeball!=null){if(typeof d.pokeball!=="object")throw TypeError(".POGOProtos.Data.Trading.TradingPokemon.pokeball: object expected");m.pokeball=$root.POGOProtos.Inventory.Item.ItemData.fromObject(d.pokeball)}if(d.individual_attack!=null){m.individual_attack=d.individual_attack|0}if(d.individual_defense!=null){m.individual_defense=d.individual_defense|0}if(d.individual_stamina!=null){m.individual_stamina=d.individual_stamina|0}if(d.nickname!=null){m.nickname=String(d.nickname)}if(d.favorite!=null){m.favorite=Boolean(d.favorite)}switch(d.move3){case"MOVE_UNSET":case 0:m.move3=0;break;case"THUNDER_SHOCK":case 1:m.move3=1;break;case"QUICK_ATTACK":case 2:m.move3=2;break;case"SCRATCH":case 3:m.move3=3;break;case"EMBER":case 4:m.move3=4;break;case"VINE_WHIP":case 5:m.move3=5;break;case"TACKLE":case 6:m.move3=6;break;case"RAZOR_LEAF":case 7:m.move3=7;break;case"TAKE_DOWN":case 8:m.move3=8;break;case"WATER_GUN":case 9:m.move3=9;break;case"BITE":case 10:m.move3=10;break;case"POUND":case 11:m.move3=11;break;case"DOUBLE_SLAP":case 12:m.move3=12;break;case"WRAP":case 13:m.move3=13;break;case"HYPER_BEAM":case 14:m.move3=14;break;case"LICK":case 15:m.move3=15;break;case"DARK_PULSE":case 16:m.move3=16;break;case"SMOG":case 17:m.move3=17;break;case"SLUDGE":case 18:m.move3=18;break;case"METAL_CLAW":case 19:m.move3=19;break;case"VICE_GRIP":case 20:m.move3=20;break;case"FLAME_WHEEL":case 21:m.move3=21;break;case"MEGAHORN":case 22:m.move3=22;break;case"WING_ATTACK":case 23:m.move3=23;break;case"FLAMETHROWER":case 24:m.move3=24;break;case"SUCKER_PUNCH":case 25:m.move3=25;break;case"DIG":case 26:m.move3=26;break;case"LOW_KICK":case 27:m.move3=27;break;case"CROSS_CHOP":case 28:m.move3=28;break;case"PSYCHO_CUT":case 29:m.move3=29;break;case"PSYBEAM":case 30:m.move3=30;break;case"EARTHQUAKE":case 31:m.move3=31;break;case"STONE_EDGE":case 32:m.move3=32;break;case"ICE_PUNCH":case 33:m.move3=33;break;case"HEART_STAMP":case 34:m.move3=34;break;case"DISCHARGE":case 35:m.move3=35;break;case"FLASH_CANNON":case 36:m.move3=36;break;case"PECK":case 37:m.move3=37;break;case"DRILL_PECK":case 38:m.move3=38;break;case"ICE_BEAM":case 39:m.move3=39;break;case"BLIZZARD":case 40:m.move3=40;break;case"AIR_SLASH":case 41:m.move3=41;break;case"HEAT_WAVE":case 42:m.move3=42;break;case"TWINEEDLE":case 43:m.move3=43;break;case"POISON_JAB":case 44:m.move3=44;break;case"AERIAL_ACE":case 45:m.move3=45;break;case"DRILL_RUN":case 46:m.move3=46;break;case"PETAL_BLIZZARD":case 47:m.move3=47;break;case"MEGA_DRAIN":case 48:m.move3=48;break;case"BUG_BUZZ":case 49:m.move3=49;break;case"POISON_FANG":case 50:m.move3=50;break;case"NIGHT_SLASH":case 51:m.move3=51;break;case"SLASH":case 52:m.move3=52;break;case"BUBBLE_BEAM":case 53:m.move3=53;break;case"SUBMISSION":case 54:m.move3=54;break;case"KARATE_CHOP":case 55:m.move3=55;break;case"LOW_SWEEP":case 56:m.move3=56;break;case"AQUA_JET":case 57:m.move3=57;break;case"AQUA_TAIL":case 58:m.move3=58;break;case"SEED_BOMB":case 59:m.move3=59;break;case"PSYSHOCK":case 60:m.move3=60;break;case"ROCK_THROW":case 61:m.move3=61;break;case"ANCIENT_POWER":case 62:m.move3=62;break;case"ROCK_TOMB":case 63:m.move3=63;break;case"ROCK_SLIDE":case 64:m.move3=64;break;case"POWER_GEM":case 65:m.move3=65;break;case"SHADOW_SNEAK":case 66:m.move3=66;break;case"SHADOW_PUNCH":case 67:m.move3=67;break;case"SHADOW_CLAW":case 68:m.move3=68;break;case"OMINOUS_WIND":case 69:m.move3=69;break;case"SHADOW_BALL":case 70:m.move3=70;break;case"BULLET_PUNCH":case 71:m.move3=71;break;case"MAGNET_BOMB":case 72:m.move3=72;break;case"STEEL_WING":case 73:m.move3=73;break;case"IRON_HEAD":case 74:m.move3=74;break;case"PARABOLIC_CHARGE":case 75:m.move3=75;break;case"SPARK":case 76:m.move3=76;break;case"THUNDER_PUNCH":case 77:m.move3=77;break;case"THUNDER":case 78:m.move3=78;break;case"THUNDERBOLT":case 79:m.move3=79;break;case"TWISTER":case 80:m.move3=80;break;case"DRAGON_BREATH":case 81:m.move3=81;break;case"DRAGON_PULSE":case 82:m.move3=82;break;case"DRAGON_CLAW":case 83:m.move3=83;break;case"DISARMING_VOICE":case 84:m.move3=84;break;case"DRAINING_KISS":case 85:m.move3=85;break;case"DAZZLING_GLEAM":case 86:m.move3=86;break;case"MOONBLAST":case 87:m.move3=87;break;case"PLAY_ROUGH":case 88:m.move3=88;break;case"CROSS_POISON":case 89:m.move3=89;break;case"SLUDGE_BOMB":case 90:m.move3=90;break;case"SLUDGE_WAVE":case 91:m.move3=91;break;case"GUNK_SHOT":case 92:m.move3=92;break;case"MUD_SHOT":case 93:m.move3=93;break;case"BONE_CLUB":case 94:m.move3=94;break;case"BULLDOZE":case 95:m.move3=95;break;case"MUD_BOMB":case 96:m.move3=96;break;case"FURY_CUTTER":case 97:m.move3=97;break;case"BUG_BITE":case 98:m.move3=98;break;case"SIGNAL_BEAM":case 99:m.move3=99;break;case"X_SCISSOR":case 100:m.move3=100;break;case"FLAME_CHARGE":case 101:m.move3=101;break;case"FLAME_BURST":case 102:m.move3=102;break;case"FIRE_BLAST":case 103:m.move3=103;break;case"BRINE":case 104:m.move3=104;break;case"WATER_PULSE":case 105:m.move3=105;break;case"SCALD":case 106:m.move3=106;break;case"HYDRO_PUMP":case 107:m.move3=107;break;case"PSYCHIC":case 108:m.move3=108;break;case"PSYSTRIKE":case 109:m.move3=109;break;case"ICE_SHARD":case 110:m.move3=110;break;case"ICY_WIND":case 111:m.move3=111;break;case"FROST_BREATH":case 112:m.move3=112;break;case"ABSORB":case 113:m.move3=113;break;case"GIGA_DRAIN":case 114:m.move3=114;break;case"FIRE_PUNCH":case 115:m.move3=115;break;case"SOLAR_BEAM":case 116:m.move3=116;break;case"LEAF_BLADE":case 117:m.move3=117;break;case"POWER_WHIP":case 118:m.move3=118;break;case"SPLASH":case 119:m.move3=119;break;case"ACID":case 120:m.move3=120;break;case"AIR_CUTTER":case 121:m.move3=121;break;case"HURRICANE":case 122:m.move3=122;break;case"BRICK_BREAK":case 123:m.move3=123;break;case"CUT":case 124:m.move3=124;break;case"SWIFT":case 125:m.move3=125;break;case"HORN_ATTACK":case 126:m.move3=126;break;case"STOMP":case 127:m.move3=127;break;case"HEADBUTT":case 128:m.move3=128;break;case"HYPER_FANG":case 129:m.move3=129;break;case"SLAM":case 130:m.move3=130;break;case"BODY_SLAM":case 131:m.move3=131;break;case"REST":case 132:m.move3=132;break;case"STRUGGLE":case 133:m.move3=133;break;case"SCALD_BLASTOISE":case 134:m.move3=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.move3=135;break;case"WRAP_GREEN":case 136:m.move3=136;break;case"WRAP_PINK":case 137:m.move3=137;break;case"FURY_CUTTER_FAST":case 200:m.move3=200;break;case"BUG_BITE_FAST":case 201:m.move3=201;break;case"BITE_FAST":case 202:m.move3=202;break;case"SUCKER_PUNCH_FAST":case 203:m.move3=203;break;case"DRAGON_BREATH_FAST":case 204:m.move3=204;break;case"THUNDER_SHOCK_FAST":case 205:m.move3=205;break;case"SPARK_FAST":case 206:m.move3=206;break;case"LOW_KICK_FAST":case 207:m.move3=207;break;case"KARATE_CHOP_FAST":case 208:m.move3=208;break;case"EMBER_FAST":case 209:m.move3=209;break;case"WING_ATTACK_FAST":case 210:m.move3=210;break;case"PECK_FAST":case 211:m.move3=211;break;case"LICK_FAST":case 212:m.move3=212;break;case"SHADOW_CLAW_FAST":case 213:m.move3=213;break;case"VINE_WHIP_FAST":case 214:m.move3=214;break;case"RAZOR_LEAF_FAST":case 215:m.move3=215;break;case"MUD_SHOT_FAST":case 216:m.move3=216;break;case"ICE_SHARD_FAST":case 217:m.move3=217;break;case"FROST_BREATH_FAST":case 218:m.move3=218;break;case"QUICK_ATTACK_FAST":case 219:m.move3=219;break;case"SCRATCH_FAST":case 220:m.move3=220;break;case"TACKLE_FAST":case 221:m.move3=221;break;case"POUND_FAST":case 222:m.move3=222;break;case"CUT_FAST":case 223:m.move3=223;break;case"POISON_JAB_FAST":case 224:m.move3=224;break;case"ACID_FAST":case 225:m.move3=225;break;case"PSYCHO_CUT_FAST":case 226:m.move3=226;break;case"ROCK_THROW_FAST":case 227:m.move3=227;break;case"METAL_CLAW_FAST":case 228:m.move3=228;break;case"BULLET_PUNCH_FAST":case 229:m.move3=229;break;case"WATER_GUN_FAST":case 230:m.move3=230;break;case"SPLASH_FAST":case 231:m.move3=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.move3=232;break;case"MUD_SLAP_FAST":case 233:m.move3=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.move3=234;break;case"CONFUSION_FAST":case 235:m.move3=235;break;case"POISON_STING_FAST":case 236:m.move3=236;break;case"BUBBLE_FAST":case 237:m.move3=237;break;case"FEINT_ATTACK_FAST":case 238:m.move3=238;break;case"STEEL_WING_FAST":case 239:m.move3=239;break;case"FIRE_FANG_FAST":case 240:m.move3=240;break;case"ROCK_SMASH_FAST":case 241:m.move3=241;break;case"TRANSFORM_FAST":case 242:m.move3=242;break;case"COUNTER_FAST":case 243:m.move3=243;break;case"POWDER_SNOW_FAST":case 244:m.move3=244;break;case"CLOSE_COMBAT":case 245:m.move3=245;break;case"DYNAMIC_PUNCH":case 246:m.move3=246;break;case"FOCUS_BLAST":case 247:m.move3=247;break;case"AURORA_BEAM":case 248:m.move3=248;break;case"CHARGE_BEAM_FAST":case 249:m.move3=249;break;case"VOLT_SWITCH_FAST":case 250:m.move3=250;break;case"WILD_CHARGE":case 251:m.move3=251;break;case"ZAP_CANNON":case 252:m.move3=252;break;case"DRAGON_TAIL_FAST":case 253:m.move3=253;break;case"AVALANCHE":case 254:m.move3=254;break;case"AIR_SLASH_FAST":case 255:m.move3=255;break;case"BRAVE_BIRD":case 256:m.move3=256;break;case"SKY_ATTACK":case 257:m.move3=257;break;case"SAND_TOMB":case 258:m.move3=258;break;case"ROCK_BLAST":case 259:m.move3=259;break;case"INFESTATION_FAST":case 260:m.move3=260;break;case"STRUGGLE_BUG_FAST":case 261:m.move3=261;break;case"SILVER_WIND":case 262:m.move3=262;break;case"ASTONISH_FAST":case 263:m.move3=263;break;case"HEX_FAST":case 264:m.move3=264;break;case"NIGHT_SHADE":case 265:m.move3=265;break;case"IRON_TAIL_FAST":case 266:m.move3=266;break;case"GYRO_BALL":case 267:m.move3=267;break;case"HEAVY_SLAM":case 268:m.move3=268;break;case"FIRE_SPIN_FAST":case 269:m.move3=269;break;case"OVERHEAT":case 270:m.move3=270;break;case"BULLET_SEED_FAST":case 271:m.move3=271;break;case"GRASS_KNOT":case 272:m.move3=272;break;case"ENERGY_BALL":case 273:m.move3=273;break;case"EXTRASENSORY_FAST":case 274:m.move3=274;break;case"FUTURESIGHT":case 275:m.move3=275;break;case"MIRROR_COAT":case 276:m.move3=276;break;case"OUTRAGE":case 277:m.move3=277;break;case"SNARL_FAST":case 278:m.move3=278;break;case"CRUNCH":case 279:m.move3=279;break;case"FOUL_PLAY":case 280:m.move3=280;break;case"HIDDEN_POWER_FAST":case 281:m.move3=281;break;case"TAKE_DOWN_FAST":case 282:m.move3=282;break;case"WATERFALL_FAST":case 283:m.move3=283;break;case"SURF":case 284:m.move3=284;break;case"DRACO_METEOR":case 285:m.move3=285;break;case"DOOM_DESIRE":case 286:m.move3=286;break;case"YAWN_FAST":case 287:m.move3=287;break;case"PSYCHO_BOOST":case 288:m.move3=288;break;case"ORIGIN_PULSE":case 289:m.move3=289;break;case"PRECIPICE_BLADES":case 290:m.move3=290;break;case"PRESENT_FAST":case 291:m.move3=291;break;case"WEATHER_BALL_FIRE":case 292:m.move3=292;break;case"WEATHER_BALL_ICE":case 293:m.move3=293;break;case"WEATHER_BALL_ROCK":case 294:m.move3=294;break;case"WEATHER_BALL_WATER":case 295:m.move3=295;break;case"FRENZY_PLANT":case 296:m.move3=296;break;case"SMACK_DOWN_FAST":case 297:m.move3=297;break;case"BLAST_BURN":case 298:m.move3=298;break;case"HYDRO_CANNON":case 299:m.move3=299;break;case"LAST_RESORT":case 300:m.move3=300;break;case"METEOR_MASH":case 301:m.move3=301;break;case"SKULL_BASH":case 302:m.move3=302;break;case"ACID_SPRAY":case 303:m.move3=303;break;case"EARTH_POWER":case 304:m.move3=304;break;case"CRABHAMMER":case 305:m.move3=305;break;case"LUNGE":case 306:m.move3=306;break;case"CRUSH_CLAW":case 307:m.move3=307;break;case"OCTAZOOKA":case 308:m.move3=308;break;case"MIRROR_SHOT":case 309:m.move3=309;break;case"SUPER_POWER":case 310:m.move3=310;break;case"FELL_STINGER":case 311:m.move3=311;break;case"LEAF_TORNADO":case 312:m.move3=312;break;case"LEECH_LIFE":case 313:m.move3=313;break;case"DRAIN_PUNCH":case 314:m.move3=314;break;case"SHADOW_BONE":case 315:m.move3=315;break;case"MUDDY_WATER":case 316:m.move3=316;break;case"BLAZE_KICK":case 317:m.move3=317;break;case"RAZOR_SHELL":case 318:m.move3=318;break;case"POWER_UP_PUNCH":case 319:m.move3=319;break}if(d.creation_time_ms!=null){if($util.Long)(m.creation_time_ms=$util.Long.fromValue(d.creation_time_ms)).unsigned=false;else if(typeof d.creation_time_ms==="string")m.creation_time_ms=parseInt(d.creation_time_ms,10);else if(typeof d.creation_time_ms==="number")m.creation_time_ms=d.creation_time_ms;else if(typeof d.creation_time_ms==="object")m.creation_time_ms=new $util.LongBits(d.creation_time_ms.low>>>0,d.creation_time_ms.high>>>0).toNumber()}return m};TradingPokemon.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0;d.pokedex_entry_number=0;d.original_cp=0;d.adjusted_cp_min=0;d.adjusted_cp_max=0;d.original_stamina=0;d.adjusted_stamina_min=0;d.adjusted_stamina_max=0;d.friend_level_cap=false;d.move1=o.enums===String?"MOVE_UNSET":0;d.move2=o.enums===String?"MOVE_UNSET":0;d.pokemon_display=null;if($util.Long){var n=new $util.Long(0,0,false);d.captured_s2_cell_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.captured_s2_cell_id=o.longs===String?"0":0;d.traded_pokemon=null;d.pokeball=null;d.individual_attack=0;d.individual_defense=0;d.individual_stamina=0;d.nickname="";d.favorite=false;d.move3=o.enums===String?"MOVE_UNSET":0;if($util.Long){var n=new $util.Long(0,0,false);d.creation_time_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.creation_time_ms=o.longs===String?"0":0}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}if(m.pokedex_entry_number!=null&&m.hasOwnProperty("pokedex_entry_number")){d.pokedex_entry_number=m.pokedex_entry_number}if(m.original_cp!=null&&m.hasOwnProperty("original_cp")){d.original_cp=m.original_cp}if(m.adjusted_cp_min!=null&&m.hasOwnProperty("adjusted_cp_min")){d.adjusted_cp_min=m.adjusted_cp_min}if(m.adjusted_cp_max!=null&&m.hasOwnProperty("adjusted_cp_max")){d.adjusted_cp_max=m.adjusted_cp_max}if(m.original_stamina!=null&&m.hasOwnProperty("original_stamina")){d.original_stamina=m.original_stamina}if(m.adjusted_stamina_min!=null&&m.hasOwnProperty("adjusted_stamina_min")){d.adjusted_stamina_min=m.adjusted_stamina_min}if(m.adjusted_stamina_max!=null&&m.hasOwnProperty("adjusted_stamina_max")){d.adjusted_stamina_max=m.adjusted_stamina_max}if(m.friend_level_cap!=null&&m.hasOwnProperty("friend_level_cap")){d.friend_level_cap=m.friend_level_cap}if(m.move1!=null&&m.hasOwnProperty("move1")){d.move1=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.move1]:m.move1}if(m.move2!=null&&m.hasOwnProperty("move2")){d.move2=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.move2]:m.move2}if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display")){d.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.toObject(m.pokemon_display,o)}if(m.captured_s2_cell_id!=null&&m.hasOwnProperty("captured_s2_cell_id")){if(typeof m.captured_s2_cell_id==="number")d.captured_s2_cell_id=o.longs===String?String(m.captured_s2_cell_id):m.captured_s2_cell_id;else d.captured_s2_cell_id=o.longs===String?$util.Long.prototype.toString.call(m.captured_s2_cell_id):o.longs===Number?new $util.LongBits(m.captured_s2_cell_id.low>>>0,m.captured_s2_cell_id.high>>>0).toNumber():m.captured_s2_cell_id}if(m.traded_pokemon!=null&&m.hasOwnProperty("traded_pokemon")){d.traded_pokemon=$root.POGOProtos.Data.PokemonData.toObject(m.traded_pokemon,o)}if(m.pokeball!=null&&m.hasOwnProperty("pokeball")){d.pokeball=$root.POGOProtos.Inventory.Item.ItemData.toObject(m.pokeball,o)}if(m.individual_attack!=null&&m.hasOwnProperty("individual_attack")){d.individual_attack=m.individual_attack}if(m.individual_defense!=null&&m.hasOwnProperty("individual_defense")){d.individual_defense=m.individual_defense}if(m.individual_stamina!=null&&m.hasOwnProperty("individual_stamina")){d.individual_stamina=m.individual_stamina}if(m.nickname!=null&&m.hasOwnProperty("nickname")){d.nickname=m.nickname}if(m.favorite!=null&&m.hasOwnProperty("favorite")){d.favorite=m.favorite}if(m.move3!=null&&m.hasOwnProperty("move3")){d.move3=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.move3]:m.move3}if(m.creation_time_ms!=null&&m.hasOwnProperty("creation_time_ms")){if(typeof m.creation_time_ms==="number")d.creation_time_ms=o.longs===String?String(m.creation_time_ms):m.creation_time_ms;else d.creation_time_ms=o.longs===String?$util.Long.prototype.toString.call(m.creation_time_ms):o.longs===Number?new $util.LongBits(m.creation_time_ms.low>>>0,m.creation_time_ms.high>>>0).toNumber():m.creation_time_ms}return d};TradingPokemon.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return TradingPokemon}();return Trading}();return Data}();POGOProtos.Enums=function(){var Enums={};Enums.ActivityType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ACTIVITY_UNKNOWN"]=0;values[valuesById[1]="ACTIVITY_CATCH_POKEMON"]=1;values[valuesById[2]="ACTIVITY_CATCH_LEGEND_POKEMON"]=2;values[valuesById[3]="ACTIVITY_FLEE_POKEMON"]=3;values[valuesById[4]="ACTIVITY_DEFEAT_FORT"]=4;values[valuesById[5]="ACTIVITY_EVOLVE_POKEMON"]=5;values[valuesById[6]="ACTIVITY_HATCH_EGG"]=6;values[valuesById[7]="ACTIVITY_WALK_KM"]=7;values[valuesById[8]="ACTIVITY_POKEDEX_ENTRY_NEW"]=8;values[valuesById[9]="ACTIVITY_CATCH_FIRST_THROW"]=9;values[valuesById[10]="ACTIVITY_CATCH_NICE_THROW"]=10;values[valuesById[11]="ACTIVITY_CATCH_GREAT_THROW"]=11;values[valuesById[12]="ACTIVITY_CATCH_EXCELLENT_THROW"]=12;values[valuesById[13]="ACTIVITY_CATCH_CURVEBALL"]=13;values[valuesById[14]="ACTIVITY_CATCH_FIRST_CATCH_OF_DAY"]=14;values[valuesById[15]="ACTIVITY_CATCH_MILESTONE"]=15;values[valuesById[16]="ACTIVITY_TRAIN_POKEMON"]=16;values[valuesById[17]="ACTIVITY_SEARCH_FORT"]=17;values[valuesById[18]="ACTIVITY_RELEASE_POKEMON"]=18;values[valuesById[19]="ACTIVITY_HATCH_EGG_SMALL_BONUS"]=19;values[valuesById[20]="ACTIVITY_HATCH_EGG_MEDIUM_BONUS"]=20;values[valuesById[21]="ACTIVITY_HATCH_EGG_LARGE_BONUS"]=21;values[valuesById[22]="ACTIVITY_DEFEAT_GYM_DEFENDER"]=22;values[valuesById[23]="ACTIVITY_DEFEAT_GYM_LEADER"]=23;values[valuesById[24]="ACTIVITY_CATCH_FIRST_CATCH_STREAK_BONUS"]=24;values[valuesById[25]="ACTIVITY_SEARCH_FORT_FIRST_OF_THE_DAY"]=25;values[valuesById[26]="ACTIVITY_SEARCH_FORT_STREAK_BONUS"]=26;values[valuesById[27]="ACTIVITY_DEFEAT_RAID_POKEMON"]=27;values[valuesById[28]="ACTIVITY_FEED_BERRY"]=28;values[valuesById[29]="ACTIVITY_SEARCH_GYM"]=29;values[valuesById[30]="ACTIVITY_NEW_POKESTOP"]=30;values[valuesById[31]="ACTIVITY_GYM_BATTLE_LOSS"]=31;values[valuesById[32]="ACTIVITY_CATCH_AR_PLUS_BONUS"]=32;values[valuesById[33]="ACTIVITY_CATCH_QUEST_POKEMON_ENCOUNTER"]=33;values[valuesById[35]="ACTIVITY_FRIENDSHIP_LEVEL_UP_0"]=35;values[valuesById[36]="ACTIVITY_FRIENDSHIP_LEVEL_UP_1"]=36;values[valuesById[37]="ACTIVITY_FRIENDSHIP_LEVEL_UP_2"]=37;values[valuesById[38]="ACTIVITY_FRIENDSHIP_LEVEL_UP_3"]=38;values[valuesById[39]="ACTIVITY_FRIENDSHIP_LEVEL_UP_4"]=39;values[valuesById[40]="ACTIVITY_SEND_GIFT"]=40;values[valuesById[41]="ACTIVITY_SHARE_EX_RAID_PASS"]=41;values[valuesById[42]="ACTIVITY_RAID_LEVEL_1_ADDITIONAL_XP"]=42;values[valuesById[43]="ACTIVITY_RAID_LEVEL_2_ADDITIONAL_XP"]=43;values[valuesById[44]="ACTIVITY_RAID_LEVEL_3_ADDITIONAL_XP"]=44;values[valuesById[45]="ACTIVITY_RAID_LEVEL_4_ADDITIONAL_XP"]=45;values[valuesById[46]="ACTIVITY_RAID_LEVEL_5_ADDITIONAL_XP"]=46;return values}();Enums.ArContext=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ENCOUNTER"]=0;return values}();Enums.ArPlusMode=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ARPLUS"]=0;values[valuesById[1]="AR"]=1;values[valuesById[2]="NORMAL"]=2;return values}();Enums.AssetBundleStatus=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNLOADED"]=0;values[valuesById[1]="LOADING"]=1;values[valuesById[2]="LOADED"]=2;values[valuesById[3]="FAILED_ASSET_BUNDLE_STATUS"]=3;return values}();Enums.AvatarCompletion=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="SUCCESS_AVATAR_COMPLETION"]=0;values[valuesById[1]="QUIT"]=1;return values}();Enums.BadgeType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="BADGE_UNSET"]=0;values[valuesById[1]="BADGE_TRAVEL_KM"]=1;values[valuesById[2]="BADGE_POKEDEX_ENTRIES"]=2;values[valuesById[3]="BADGE_CAPTURE_TOTAL"]=3;values[valuesById[4]="BADGE_DEFEATED_FORT"]=4;values[valuesById[5]="BADGE_EVOLVED_TOTAL"]=5;values[valuesById[6]="BADGE_HATCHED_TOTAL"]=6;values[valuesById[7]="BADGE_ENCOUNTERED_TOTAL"]=7;values[valuesById[8]="BADGE_POKESTOPS_VISITED"]=8;values[valuesById[9]="BADGE_UNIQUE_POKESTOPS"]=9;values[valuesById[10]="BADGE_POKEBALL_THROWN"]=10;values[valuesById[11]="BADGE_BIG_MAGIKARP"]=11;values[valuesById[12]="BADGE_DEPLOYED_TOTAL"]=12;values[valuesById[13]="BADGE_BATTLE_ATTACK_WON"]=13;values[valuesById[14]="BADGE_BATTLE_TRAINING_WON"]=14;values[valuesById[15]="BADGE_BATTLE_DEFEND_WON"]=15;values[valuesById[16]="BADGE_PRESTIGE_RAISED"]=16;values[valuesById[17]="BADGE_PRESTIGE_DROPPED"]=17;values[valuesById[18]="BADGE_TYPE_NORMAL"]=18;values[valuesById[19]="BADGE_TYPE_FIGHTING"]=19;values[valuesById[20]="BADGE_TYPE_FLYING"]=20;values[valuesById[21]="BADGE_TYPE_POISON"]=21;values[valuesById[22]="BADGE_TYPE_GROUND"]=22;values[valuesById[23]="BADGE_TYPE_ROCK"]=23;values[valuesById[24]="BADGE_TYPE_BUG"]=24;values[valuesById[25]="BADGE_TYPE_GHOST"]=25;values[valuesById[26]="BADGE_TYPE_STEEL"]=26;values[valuesById[27]="BADGE_TYPE_FIRE"]=27;values[valuesById[28]="BADGE_TYPE_WATER"]=28;values[valuesById[29]="BADGE_TYPE_GRASS"]=29;values[valuesById[30]="BADGE_TYPE_ELECTRIC"]=30;values[valuesById[31]="BADGE_TYPE_PSYCHIC"]=31;values[valuesById[32]="BADGE_TYPE_ICE"]=32;values[valuesById[33]="BADGE_TYPE_DRAGON"]=33;values[valuesById[34]="BADGE_TYPE_DARK"]=34;values[valuesById[35]="BADGE_TYPE_FAIRY"]=35;values[valuesById[36]="BADGE_SMALL_RATTATA"]=36;values[valuesById[37]="BADGE_PIKACHU"]=37;values[valuesById[38]="BADGE_UNOWN"]=38;values[valuesById[39]="BADGE_POKEDEX_ENTRIES_GEN2"]=39;values[valuesById[40]="BADGE_RAID_BATTLE_WON"]=40;values[valuesById[41]="BADGE_LEGENDARY_BATTLE_WON"]=41;values[valuesById[42]="BADGE_BERRIES_FED"]=42;values[valuesById[43]="BADGE_HOURS_DEFENDED"]=43;values[valuesById[44]="BADGE_PLACE_HOLDER"]=44;values[valuesById[45]="BADGE_POKEDEX_ENTRIES_GEN3"]=45;values[valuesById[46]="BADGE_CHALLENGE_QUESTS"]=46;values[valuesById[47]="BADGE_MEW_ENCOUNTER"]=47;values[valuesById[48]="BADGE_MAX_LEVEL_FRIENDS"]=48;values[valuesById[49]="BADGE_TRADING"]=49;values[valuesById[50]="BADGE_TRADING_DISTANCE"]=50;values[valuesById[51]="BADGE_POKEDEX_ENTRIES_GEN4"]=51;values[valuesById[52]="BADGE_GREAT_LEAGUE"]=52;values[valuesById[53]="BADGE_ULTRA_LEAGUE"]=53;values[valuesById[54]="BADGE_MASTER_LEAGUE"]=54;values[valuesById[2e3]="BADGE_EVENT_MIN"]=2e3;values[valuesById[2001]="BADGE_CHICAGO_FEST_JULY_2017"]=2001;values[valuesById[2002]="BADGE_PIKACHU_OUTBREAK_YOKOHAMA_2017"]=2002;values[valuesById[2003]="BADGE_SAFARI_ZONE_EUROPE_2017"]=2003;values[valuesById[2004]="BADGE_SAFARI_ZONE_EUROPE_2017_10_07"]=2004;values[valuesById[2005]="BADGE_SAFARI_ZONE_EUROPE_2017_10_14"]=2005;values[valuesById[2006]="BADGE_CHICAGO_FEST_JULY_2018_SAT_NORTH"]=2006;values[valuesById[2007]="BADGE_CHICAGO_FEST_JULY_2018_SAT_SOUTH"]=2007;values[valuesById[2008]="BADGE_CHICAGO_FEST_JULY_2018_SUN_NORTH"]=2008;values[valuesById[2009]="BADGE_CHICAGO_FEST_JULY_2018_SUN_SOUTH"]=2009;values[valuesById[2010]="BADGE_APAC_PARTNER_JULY_2018_0"]=2010;values[valuesById[2011]="BADGE_APAC_PARTNER_JULY_2018_1"]=2011;values[valuesById[2012]="BADGE_APAC_PARTNER_JULY_2018_2"]=2012;values[valuesById[2013]="BADGE_APAC_PARTNER_JULY_2018_3"]=2013;values[valuesById[2014]="BADGE_APAC_PARTNER_JULY_2018_4"]=2014;values[valuesById[2015]="BADGE_APAC_PARTNER_JULY_2018_5"]=2015;values[valuesById[2016]="BADGE_APAC_PARTNER_JULY_2018_6"]=2016;values[valuesById[2017]="BADGE_APAC_PARTNER_JULY_2018_7"]=2017;values[valuesById[2018]="BADGE_APAC_PARTNER_JULY_2018_8"]=2018;values[valuesById[2019]="BADGE_APAC_PARTNER_JULY_2018_9"]=2019;values[valuesById[2020]="BADGE_YOKOSUKA_29_AUG_2018_MIKASA"]=2020;values[valuesById[2021]="BADGE_YOKOSUKA_29_AUG_2018_VERNY"]=2021;values[valuesById[2022]="BADGE_YOKOSUKA_29_AUG_2018_KURIHAMA"]=2022;values[valuesById[2023]="BADGE_YOKOSUKA_30_AUG_2018_MIKASA"]=2023;values[valuesById[2024]="BADGE_YOKOSUKA_30_AUG_2018_VERNY"]=2024;values[valuesById[2025]="BADGE_YOKOSUKA_30_AUG_2018_KURIHAMA"]=2025;values[valuesById[2026]="BADGE_YOKOSUKA_31_AUG_2018_MIKASA"]=2026;values[valuesById[2027]="BADGE_YOKOSUKA_31_AUG_2018_VERNY"]=2027;values[valuesById[2028]="BADGE_YOKOSUKA_31_AUG_2018_KURIHAMA"]=2028;values[valuesById[2029]="BADGE_YOKOSUKA_1_SEP_2018_MIKASA"]=2029;values[valuesById[2030]="BADGE_YOKOSUKA_1_SEP_2018_VERNY"]=2030;values[valuesById[2031]="BADGE_YOKOSUKA_1_SEP_2018_KURIHAMA"]=2031;values[valuesById[2032]="BADGE_YOKOSUKA_2_SEP_2018_MIKASA"]=2032;values[valuesById[2033]="BADGE_YOKOSUKA_2_SEP_2018_VERNY"]=2033;values[valuesById[2034]="BADGE_YOKOSUKA_2_SEP_2018_KURIHAMA"]=2034;values[valuesById[2035]="BADGE_TOP_BANANA_1"]=2035;values[valuesById[2036]="BADGE_TOP_BANANA_2"]=2036;values[valuesById[2037]="BADGE_TOP_BANANA_3"]=2037;return values}();Enums.BattleResultsExit=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="LEAVE_GYM"]=0;values[valuesById[1]="LEAVE_BATTLE"]=1;values[valuesById[2]="CONTINUE_BATTLE"]=2;return values}();Enums.BuddySize=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="BUDDY_MEDIUM"]=0;values[valuesById[1]="BUDDY_SHOULDER"]=1;values[valuesById[2]="BUDDY_BIG"]=2;values[valuesById[3]="BUDDY_FLYING"]=3;values[valuesById[4]="BUDDY_BABY"]=4;return values}();Enums.CameraInterpolation=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="CAM_INTERP_CUT"]=0;values[valuesById[1]="CAM_INTERP_LINEAR"]=1;values[valuesById[2]="CAM_INTERP_SMOOTH"]=2;values[valuesById[3]="CAM_INTERP_SMOOTH_ROT_LINEAR_MOVE"]=3;values[valuesById[4]="CAM_INTERP_DEPENDS"]=4;return values}();Enums.CameraTarget=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="CAM_TARGET_ATTACKER"]=0;values[valuesById[1]="CAM_TARGET_ATTACKER_EDGE"]=1;values[valuesById[2]="CAM_TARGET_ATTACKER_GROUND"]=2;values[valuesById[3]="CAM_TARGET_DEFENDER"]=3;values[valuesById[4]="CAM_TARGET_DEFENDER_EDGE"]=4;values[valuesById[5]="CAM_TARGET_DEFENDER_GROUND"]=5;values[valuesById[6]="CAM_TARGET_ATTACKER_DEFENDER"]=6;values[valuesById[7]="CAM_TARGET_ATTACKER_DEFENDER_EDGE"]=7;values[valuesById[8]="CAM_TARGET_DEFENDER_ATTACKER"]=8;values[valuesById[9]="CAM_TARGET_DEFENDER_ATTACKER_EDGE"]=9;values[valuesById[11]="CAM_TARGET_ATTACKER_DEFENDER_MIRROR"]=11;values[valuesById[12]="CAM_TARGET_SHOULDER_ATTACKER_DEFENDER"]=12;values[valuesById[13]="CAM_TARGET_SHOULDER_ATTACKER_DEFENDER_MIRROR"]=13;values[valuesById[14]="CAM_TARGET_ATTACKER_DEFENDER_WORLD"]=14;return values}();Enums.CameraType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="DEFAULT_CAMERA"]=0;values[valuesById[1]="SHOULDER"]=1;values[valuesById[2]="ENEMY_POKEMON_FOCUS"]=2;values[valuesById[3]="MY_POKEMON_FOCUS"]=3;return values}();Enums.CameraZoomInLevel=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="DEFAULT_CAMERA_ZOOM_IN_LEVEL"]=0;values[valuesById[1]="NICE_CAMERA_ZOOM_IN_LEVEL"]=1;values[valuesById[2]="GREAT_CAMERA_ZOOM_IN_LEVEL"]=2;values[valuesById[3]="EXCELLENT_CAMERA_ZOOM_IN_LEVEL"]=3;return values}();Enums.CentralState=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNKNOWN_CENTRAL_STATE"]=0;values[valuesById[1]="RESETTING"]=1;values[valuesById[2]="UNSUPPORTED"]=2;values[valuesById[3]="UNAUTHORIZED"]=3;values[valuesById[4]="POWERED_OFF"]=4;values[valuesById[5]="POWERED_ON"]=5;return values}();Enums.CombatPlayerFinishState=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="WINNER"]=0;values[valuesById[1]="LOSER"]=1;values[valuesById[2]="DRAW"]=2;return values}();Enums.CombatRewardStatus=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_REWARD_STATUS"]=0;values[valuesById[1]="REWARDS_GRANTED"]=1;values[valuesById[2]="MAX_REWARDS_RECEIVED"]=2;values[valuesById[3]="PLAYER_BAG_FULL"]=3;return values}();Enums.CombatType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="COMBAT_TYPE_UNSET"]=0;values[valuesById[1]="SOLO"]=1;values[valuesById[2]="QR_CODE"]=2;values[valuesById[3]="FRIENDS"]=3;values[valuesById[4]="NEARBY_COMBAT"]=4;return values}();Enums.ConditionType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_CONDITION"]=0;values[valuesById[1]="WITH_POKEMON_CP_LIMIT"]=1;values[valuesById[2]="WITH_PLAYER_LEVEL"]=2;values[valuesById[3]="WITH_POKEMON_TYPE"]=3;values[valuesById[4]="WITH_POKEMON_CATEGORY"]=4;return values}();Enums.Costume=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="COSTUME_UNSET"]=0;values[valuesById[1]="HOLIDAY_2016"]=1;values[valuesById[2]="ANNIVERSARY"]=2;values[valuesById[3]="ONE_YEAR_ANNIVERSARY"]=3;values[valuesById[4]="HALLOWEEN_2017"]=4;values[valuesById[5]="SUMMER_2018"]=5;values[valuesById[6]="FALL_2018"]=6;values[valuesById[7]="NOVEMBER_2018"]=7;values[valuesById[8]="WINTER_2018"]=8;return values}();Enums.CurrencyType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNKNOWN_CURRENCY_TYPE"]=0;values[valuesById[1]="POKECOIN"]=1;values[valuesById[2]="STARDUST"]=2;return values}();Enums.EncounterType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="SPAWN_POINT"]=0;values[valuesById[1]="INCENSE"]=1;values[valuesById[2]="DISK"]=2;values[valuesById[3]="POST_RAID"]=3;values[valuesById[4]="STORY_QUEST"]=4;values[valuesById[5]="QUEST_STAMP_CARD"]=5;values[valuesById[6]="CHALLENGE_QUEST"]=6;return values}();Enums.Filter=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_FILTER"]=0;values[valuesById[1]="ALL"]=1;values[valuesById[2]="DEFAULT"]=2;values[valuesById[3]="OWNED"]=3;values[valuesById[4]="FEATURED"]=4;values[valuesById[5]="PURCHASABLE"]=5;values[valuesById[6]="UNLOCKABLE"]=6;return values}();Enums.Form=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="FORM_UNSET"]=0;values[valuesById[1]="UNOWN_A"]=1;values[valuesById[2]="UNOWN_B"]=2;values[valuesById[3]="UNOWN_C"]=3;values[valuesById[4]="UNOWN_D"]=4;values[valuesById[5]="UNOWN_E"]=5;values[valuesById[6]="UNOWN_F"]=6;values[valuesById[7]="UNOWN_G"]=7;values[valuesById[8]="UNOWN_H"]=8;values[valuesById[9]="UNOWN_I"]=9;values[valuesById[10]="UNOWN_J"]=10;values[valuesById[11]="UNOWN_K"]=11;values[valuesById[12]="UNOWN_L"]=12;values[valuesById[13]="UNOWN_M"]=13;values[valuesById[14]="UNOWN_N"]=14;values[valuesById[15]="UNOWN_O"]=15;values[valuesById[16]="UNOWN_P"]=16;values[valuesById[17]="UNOWN_Q"]=17;values[valuesById[18]="UNOWN_R"]=18;values[valuesById[19]="UNOWN_S"]=19;values[valuesById[20]="UNOWN_T"]=20;values[valuesById[21]="UNOWN_U"]=21;values[valuesById[22]="UNOWN_V"]=22;values[valuesById[23]="UNOWN_W"]=23;values[valuesById[24]="UNOWN_X"]=24;values[valuesById[25]="UNOWN_Y"]=25;values[valuesById[26]="UNOWN_Z"]=26;values[valuesById[27]="UNOWN_EXCLAMATION_POINT"]=27;values[valuesById[28]="UNOWN_QUESTION_MARK"]=28;values[valuesById[29]="CASTFORM_NORMAL"]=29;values[valuesById[30]="CASTFORM_SUNNY"]=30;values[valuesById[31]="CASTFORM_RAINY"]=31;values[valuesById[32]="CASTFORM_SNOWY"]=32;values[valuesById[33]="DEOXYS_NORMAL"]=33;values[valuesById[34]="DEOXYS_ATTACK"]=34;values[valuesById[35]="DEOXYS_DEFENSE"]=35;values[valuesById[36]="DEOXYS_SPEED"]=36;values[valuesById[37]="SPINDA_00"]=37;values[valuesById[38]="SPINDA_01"]=38;values[valuesById[39]="SPINDA_02"]=39;values[valuesById[40]="SPINDA_03"]=40;values[valuesById[41]="SPINDA_04"]=41;values[valuesById[42]="SPINDA_05"]=42;values[valuesById[43]="SPINDA_06"]=43;values[valuesById[44]="SPINDA_07"]=44;values[valuesById[45]="RATTATA_NORMAL"]=45;values[valuesById[46]="RATTATA_ALOLA"]=46;values[valuesById[47]="RATICATE_NORMAL"]=47;values[valuesById[48]="RATICATE_ALOLA"]=48;values[valuesById[49]="RAICHU_NORMAL"]=49;values[valuesById[50]="RAICHU_ALOLA"]=50;values[valuesById[51]="SANDSHREW_NORMAL"]=51;values[valuesById[52]="SANDSHREW_ALOLA"]=52;values[valuesById[53]="SANDSLASH_NORMAL"]=53;values[valuesById[54]="SANDSLASH_ALOLA"]=54;values[valuesById[55]="VULPIX_NORMAL"]=55;values[valuesById[56]="VULPIX_ALOLA"]=56;values[valuesById[57]="NINETALES_NORMAL"]=57;values[valuesById[58]="NINETALES_ALOLA"]=58;values[valuesById[59]="DIGLETT_NORMAL"]=59;values[valuesById[60]="DIGLETT_ALOLA"]=60;values[valuesById[61]="DUGTRIO_NORMAL"]=61;values[valuesById[62]="DUGTRIO_ALOLA"]=62;values[valuesById[63]="MEOWTH_NORMAL"]=63;values[valuesById[64]="MEOWTH_ALOLA"]=64;values[valuesById[65]="PERSIAN_NORMAL"]=65;values[valuesById[66]="PERSIAN_ALOLA"]=66;values[valuesById[67]="GEODUDE_NORMAL"]=67;values[valuesById[68]="GEODUDE_ALOLA"]=68;values[valuesById[69]="GRAVELER_NORMAL"]=69;values[valuesById[70]="GRAVELER_ALOLA"]=70;values[valuesById[71]="GOLEM_NORMAL"]=71;values[valuesById[72]="GOLEM_ALOLA"]=72;values[valuesById[73]="GRIMER_NORMAL"]=73;values[valuesById[74]="GRIMER_ALOLA"]=74;values[valuesById[75]="MUK_NORMAL"]=75;values[valuesById[76]="MUK_ALOLA"]=76;values[valuesById[77]="EXEGGUTOR_NORMAL"]=77;values[valuesById[78]="EXEGGUTOR_ALOLA"]=78;values[valuesById[79]="MAROWAK_NORMAL"]=79;values[valuesById[80]="MAROWAK_ALOLA"]=80;values[valuesById[81]="ROTOM_NORMAL"]=81;values[valuesById[82]="ROTOM_FROST"]=82;values[valuesById[83]="ROTOM_FAN"]=83;values[valuesById[84]="ROTOM_MOW"]=84;values[valuesById[85]="ROTOM_WASH"]=85;values[valuesById[86]="ROTOM_HEAT"]=86;values[valuesById[87]="WORMADAM_PLANT"]=87;values[valuesById[88]="WORMADAM_SANDY"]=88;values[valuesById[89]="WORMADAM_TRASH"]=89;values[valuesById[90]="GIRATINA_ALTERED"]=90;values[valuesById[91]="GIRATINA_ORIGIN"]=91;values[valuesById[92]="SHAYMIN_SKY"]=92;values[valuesById[93]="SHAYMIN_LAND"]=93;values[valuesById[94]="CHERRIM_OVERCAST"]=94;values[valuesById[95]="CHERRIM_SUNNY"]=95;values[valuesById[96]="SHELLOS_WEST_SEA"]=96;values[valuesById[97]="SHELLOS_EAST_SEA"]=97;values[valuesById[98]="GASTRODON_WEST_SEA"]=98;values[valuesById[99]="GASTRODON_EAST_SEA"]=99;values[valuesById[100]="ARCEUS_NORMAL"]=100;values[valuesById[101]="ARCEUS_FIGHTING"]=101;values[valuesById[102]="ARCEUS_FLYING"]=102;values[valuesById[103]="ARCEUS_POISON"]=103;values[valuesById[104]="ARCEUS_GROUND"]=104;values[valuesById[105]="ARCEUS_ROCK"]=105;values[valuesById[106]="ARCEUS_BUG"]=106;values[valuesById[107]="ARCEUS_GHOST"]=107;values[valuesById[108]="ARCEUS_STEEL"]=108;values[valuesById[109]="ARCEUS_FIRE"]=109;values[valuesById[110]="ARCEUS_WATER"]=110;values[valuesById[111]="ARCEUS_GRASS"]=111;values[valuesById[112]="ARCEUS_ELECTRIC"]=112;values[valuesById[113]="ARCEUS_PSYCHIC"]=113;values[valuesById[114]="ARCEUS_ICE"]=114;values[valuesById[115]="ARCEUS_DRAGON"]=115;values[valuesById[116]="ARCEUS_DARK"]=116;values[valuesById[117]="ARCEUS_FAIRY"]=117;values[valuesById[118]="BURMY_PLANT"]=118;values[valuesById[119]="BURMY_SANDY"]=119;values[valuesById[120]="BURMY_TRASH"]=120;return values}();Enums.FriendshipLevelMilestone=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="FRIENDSHIP_LEVEL_UNSET"]=0;values[valuesById[1]="FRIENDSHIP_LEVEL_0"]=1;values[valuesById[2]="FRIENDSHIP_LEVEL_1"]=2;values[valuesById[3]="FRIENDSHIP_LEVEL_2"]=3;values[valuesById[4]="FRIENDSHIP_LEVEL_3"]=4;values[valuesById[5]="FRIENDSHIP_LEVEL_4"]=5;return values}();Enums.Gender=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="GENDER_UNSET"]=0;values[valuesById[1]="MALE"]=1;values[valuesById[2]="FEMALE"]=2;values[valuesById[3]="GENDERLESS"]=3;return values}();Enums.GymBadgeType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="GYM_BADGE_UNSET"]=0;values[valuesById[1]="GYM_BADGE_VANILLA"]=1;values[valuesById[2]="GYM_BADGE_BRONZE"]=2;values[valuesById[3]="GYM_BADGE_SILVER"]=3;values[valuesById[4]="GYM_BADGE_GOLD"]=4;return values}();Enums.HoloIapItemCategory=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="IAP_CATEGORY_NONE"]=0;values[valuesById[1]="IAP_CATEGORY_BUNDLE"]=1;values[valuesById[2]="IAP_CATEGORY_ITEMS"]=2;values[valuesById[3]="IAP_CATEGORY_UPGRADES"]=3;values[valuesById[4]="IAP_CATEGORY_POKECOINS"]=4;values[valuesById[5]="IAP_CATEGORY_AVATAR"]=5;values[valuesById[6]="IAP_CATEGORY_AVATAR_STORE_LINK"]=6;return values}();Enums.IdentityProvider=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_IDENTITY_PROVIDER"]=0;values[valuesById[1]="GOOGLE"]=1;values[valuesById[2]="PTC"]=2;values[valuesById[3]="FACEBOOK"]=3;values[valuesById[4]="BACKGROUND"]=4;values[valuesById[5]="INTERNAL"]=5;values[valuesById[6]="SFIDA"]=6;values[valuesById[7]="SUPER_AWESOME"]=7;return values}();Enums.IncubationResult=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="SUCCESS_INCUBATION_RESULT"]=0;values[valuesById[1]="FAILURE"]=1;return values}();Enums.InvitationType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="INVITATION_TYPE_UNSET"]=0;values[valuesById[1]="INVITATION_TYPE_CODE"]=1;values[valuesById[2]="INVITATION_TYPE_FACEBOOK"]=2;values[valuesById[3]="INVITATION_TYPE_SERVER_REQUEST"]=3;return values}();Enums.ItemCategory=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ITEM_CATEGORY_NONE"]=0;values[valuesById[1]="ITEM_CATEGORY_POKEBALL"]=1;values[valuesById[2]="ITEM_CATEGORY_FOOD"]=2;values[valuesById[3]="ITEM_CATEGORY_MEDICINE"]=3;values[valuesById[4]="ITEM_CATEGORY_BOOST"]=4;values[valuesById[5]="ITEM_CATEGORY_UTILITES"]=5;values[valuesById[6]="ITEM_CATEGORY_CAMERA"]=6;values[valuesById[7]="ITEM_CATEGORY_DISK"]=7;values[valuesById[8]="ITEM_CATEGORY_INCUBATOR"]=8;values[valuesById[9]="ITEM_CATEGORY_INCENSE"]=9;values[valuesById[10]="ITEM_CATEGORY_XP_BOOST"]=10;values[valuesById[11]="ITEM_CATEGORY_INVENTORY_UPGRADE"]=11;values[valuesById[12]="ITEM_CATEGORY_EVOLUTION_REQUIREMENT"]=12;values[valuesById[13]="ITEM_CATEGORY_MOVE_REROLL"]=13;values[valuesById[14]="ITEM_CATEGORY_CANDY"]=14;values[valuesById[15]="ITEM_CATEGORY_RAID_TICKET"]=15;values[valuesById[16]="ITEM_CATEGORY_STARDUST_BOOST"]=16;values[valuesById[17]="ITEM_CATEGORY_FRIEND_GIFT_BOX"]=17;return values}();Enums.ItemEffect=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ITEM_EFFECT_NONE"]=0;values[valuesById[1e3]="ITEM_EFFECT_CAP_NO_FLEE"]=1e3;values[valuesById[1002]="ITEM_EFFECT_CAP_NO_MOVEMENT"]=1002;values[valuesById[1003]="ITEM_EFFECT_CAP_NO_THREAT"]=1003;values[valuesById[1004]="ITEM_EFFECT_CAP_TARGET_MAX"]=1004;values[valuesById[1005]="ITEM_EFFECT_CAP_TARGET_SLOW"]=1005;values[valuesById[1006]="ITEM_EFFECT_CAP_CHANCE_NIGHT"]=1006;values[valuesById[1007]="ITEM_EFFECT_CAP_CHANCE_TRAINER"]=1007;values[valuesById[1008]="ITEM_EFFECT_CAP_CHANCE_FIRST_THROW"]=1008;values[valuesById[1009]="ITEM_EFFECT_CAP_CHANCE_LEGEND"]=1009;values[valuesById[1010]="ITEM_EFFECT_CAP_CHANCE_HEAVY"]=1010;values[valuesById[1011]="ITEM_EFFECT_CAP_CHANCE_REPEAT"]=1011;values[valuesById[1012]="ITEM_EFFECT_CAP_CHANCE_MULTI_THROW"]=1012;values[valuesById[1013]="ITEM_EFFECT_CAP_CHANCE_ALWAYS"]=1013;values[valuesById[1014]="ITEM_EFFECT_CAP_CHANCE_SINGLE_THROW"]=1014;values[valuesById[1015]="ITEM_EFFECT_CANDY_AWARD"]=1015;values[valuesById[1016]="ITEM_EFFECT_FULL_MOTIVATION"]=1016;return values}();Enums.NotificationCategory=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_NOTIFICATION_CATEGORY"]=0;values[valuesById[1]="GYM_REMOVAL"]=1;values[valuesById[2]="POKEMON_HUNGRY"]=2;values[valuesById[3]="EXCLUSIVE_RAID_INVITE"]=3;values[valuesById[4]="EXCLUSIVE_RAID_CANCELLATION"]=4;values[valuesById[5]="SHARED_EXCLUSIVE_RAID_INVITE"]=5;values[valuesById[6]="GIFTBOX_INCOMING"]=6;values[valuesById[7]="GIFTBOX_DELIVERED"]=7;values[valuesById[8]="FRIENDSHIP_MILESTONE_REWARD"]=8;values[valuesById[9]="GYM_BATTLE_FRIENDSHIP_INCREMENT"]=9;values[valuesById[10]="BGMODE_EGG_HATCH"]=10;values[valuesById[11]="BGMODE_BUDDY_CANDY"]=11;values[valuesById[12]="BGMODE_WEEKLY_FITNESS_REPORT"]=12;values[valuesById[13]="BGMODE_OFF_SESSION_DISTANCE"]=13;values[valuesById[14]="COMBAT_CHALLENGE_OPENED"]=14;values[valuesById[15]="FRIEND_INVITE_RECEIVED"]=15;values[valuesById[16]="FRIEND_INVITE_ACCEPTED"]=16;return values}();Enums.NotificationState=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_STATE"]=0;values[valuesById[1]="VIEWED"]=1;return values}();Enums.NotificationType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NO_NOTIFICATIONS"]=0;values[valuesById[1]="POKEMON_NOTIFICATIONS"]=1;values[valuesById[2]="POKESTOP_NOTIFICATIONS"]=2;values[valuesById[3]="ALL_NOTIFICATIONS"]=3;return values}();Enums.OnboardingEventIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="TOS_ACCEPTED"]=0;values[valuesById[1]="PRIVACY_ACCEPTED"]=1;values[valuesById[2]="CONVERSATION"]=2;values[valuesById[3]="ENCOUNTER_ENTER"]=3;values[valuesById[4]="ENCOUNTER_LEAVE"]=4;values[valuesById[5]="AVATAR_SELECTION_ONBOARDING"]=5;values[valuesById[6]="AVATAR_GENDER"]=6;values[valuesById[7]="AVATAR_GENDER_CHOSEN"]=7;values[valuesById[8]="AVATAR_HEAD_CHOSEN"]=8;values[valuesById[9]="AVATAR_BODY_CHOSEN"]=9;values[valuesById[10]="AVATAR_TRY_AGAIN"]=10;values[valuesById[11]="AVATAR_ACCEPTED"]=11;values[valuesById[12]="NAME_ENTRY"]=12;values[valuesById[13]="NAME_UNAVAILABLE"]=13;values[valuesById[14]="NAME_ACCEPTED"]=14;values[valuesById[15]="POKEDEX_TUTORIAL_STARTED"]=15;values[valuesById[16]="POKEDEX_TUTORIAL_INFO_PANEL_EXIT_PRESSED"]=16;values[valuesById[17]="POKEDEX_EXIT_PRESSED"]=17;values[valuesById[18]="EGG_TUTORIAL_STARTED"]=18;values[valuesById[19]="EGG_TUTORIAL_PRESS"]=19;values[valuesById[20]="EGG_TUTORIAL_FINISHED"]=20;values[valuesById[21]="POKESTOP_LETSGO"]=21;values[valuesById[22]="WILD_POKEMON_ENCOUNTER_ENTERED"]=22;values[valuesById[23]="WILD_POKEMON_CAUGHT"]=23;values[valuesById[24]="AR_STANDARD_ENABLED"]=24;values[valuesById[25]="AR_STANDARD_REJECTED"]=25;values[valuesById[26]="AR_PLUS_ENABLED"]=26;values[valuesById[27]="AR_PLUS_REJECTED"]=27;return values}();Enums.OnboardingPathIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="V1"]=0;values[valuesById[1]="V2"]=1;return values}();Enums.Platform=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="IOS"]=1;values[valuesById[2]="ANDROID"]=2;values[valuesById[3]="OSX"]=3;values[valuesById[4]="WINDOWS"]=4;values[valuesById[5]="APPLE_WATCH"]=5;return values}();Enums.PluginState=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNKNOWN_PLUGIN_STATE"]=0;values[valuesById[1]="INITIALIZED"]=1;values[valuesById[2]="STARTING"]=2;values[valuesById[3]="STARTED"]=3;values[valuesById[4]="RESUMED"]=4;values[valuesById[5]="PAUSED"]=5;values[valuesById[6]="STOPPED"]=6;return values}();Enums.PoiSubmissionTutorialPage=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="WHAT_IS_POKESTOP"]=0;values[valuesById[1]="SUBMIT_FOR_REVIEW"]=1;values[valuesById[2]="HOW_TO_CHOOSE_A_LOCATION"]=2;values[valuesById[3]="DESCRIBE_A_LOCATION"]=3;return values}();Enums.PokemonAnim=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NONE_POKEMON_ANIM"]=0;values[valuesById[1]="IDLE_01"]=1;values[valuesById[2]="IDLE_02"]=2;values[valuesById[3]="LAND"]=3;values[valuesById[4]="ATTACK_01"]=4;values[valuesById[5]="ATTACK_02"]=5;values[valuesById[6]="DAMAGED"]=6;values[valuesById[7]="STUNNED"]=7;values[valuesById[8]="LOOP"]=8;values[valuesById[9]="_MAX"]=9;return values}();Enums.PokemonClass=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="POKEMON_CLASS_NORMAL"]=0;values[valuesById[1]="POKEMON_CLASS_LEGENDARY"]=1;values[valuesById[2]="POKEMON_CLASS_MYTHIC"]=2;return values}();Enums.PokemonCreateContext=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="CREATE_CONTEXT_WILD"]=0;values[valuesById[1]="CREATE_CONTEXT_EGG"]=1;values[valuesById[2]="CREATE_CONTEXT_EVOLVE"]=2;return values}();Enums.PokemonFamilyId=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="FAMILY_UNSET"]=0;values[valuesById[1]="FAMILY_BULBASAUR"]=1;values[valuesById[4]="FAMILY_CHARMANDER"]=4;values[valuesById[7]="FAMILY_SQUIRTLE"]=7;values[valuesById[10]="FAMILY_CATERPIE"]=10;values[valuesById[13]="FAMILY_WEEDLE"]=13;values[valuesById[16]="FAMILY_PIDGEY"]=16;values[valuesById[19]="FAMILY_RATTATA"]=19;values[valuesById[21]="FAMILY_SPEAROW"]=21;values[valuesById[23]="FAMILY_EKANS"]=23;values[valuesById[25]="FAMILY_PIKACHU"]=25;values[valuesById[27]="FAMILY_SANDSHREW"]=27;values[valuesById[29]="FAMILY_NIDORAN_FEMALE"]=29;values[valuesById[32]="FAMILY_NIDORAN_MALE"]=32;values[valuesById[35]="FAMILY_CLEFAIRY"]=35;values[valuesById[37]="FAMILY_VULPIX"]=37;values[valuesById[39]="FAMILY_JIGGLYPUFF"]=39;values[valuesById[41]="FAMILY_ZUBAT"]=41;values[valuesById[43]="FAMILY_ODDISH"]=43;values[valuesById[46]="FAMILY_PARAS"]=46;values[valuesById[48]="FAMILY_VENONAT"]=48;values[valuesById[50]="FAMILY_DIGLETT"]=50;values[valuesById[52]="FAMILY_MEOWTH"]=52;values[valuesById[54]="FAMILY_PSYDUCK"]=54;values[valuesById[56]="FAMILY_MANKEY"]=56;values[valuesById[58]="FAMILY_GROWLITHE"]=58;values[valuesById[60]="FAMILY_POLIWAG"]=60;values[valuesById[63]="FAMILY_ABRA"]=63;values[valuesById[66]="FAMILY_MACHOP"]=66;values[valuesById[69]="FAMILY_BELLSPROUT"]=69;values[valuesById[72]="FAMILY_TENTACOOL"]=72;values[valuesById[74]="FAMILY_GEODUDE"]=74;values[valuesById[77]="FAMILY_PONYTA"]=77;values[valuesById[79]="FAMILY_SLOWPOKE"]=79;values[valuesById[81]="FAMILY_MAGNEMITE"]=81;values[valuesById[83]="FAMILY_FARFETCHD"]=83;values[valuesById[84]="FAMILY_DODUO"]=84;values[valuesById[86]="FAMILY_SEEL"]=86;values[valuesById[88]="FAMILY_GRIMER"]=88;values[valuesById[90]="FAMILY_SHELLDER"]=90;values[valuesById[92]="FAMILY_GASTLY"]=92;values[valuesById[95]="FAMILY_ONIX"]=95;values[valuesById[96]="FAMILY_DROWZEE"]=96;values[valuesById[97]="FAMILY_HYPNO"]=97;values[valuesById[98]="FAMILY_KRABBY"]=98;values[valuesById[100]="FAMILY_VOLTORB"]=100;values[valuesById[102]="FAMILY_EXEGGCUTE"]=102;values[valuesById[104]="FAMILY_CUBONE"]=104;values[valuesById[106]="FAMILY_HITMONLEE"]=106;values[valuesById[107]="FAMILY_HITMONCHAN"]=107;values[valuesById[108]="FAMILY_LICKITUNG"]=108;values[valuesById[109]="FAMILY_KOFFING"]=109;values[valuesById[111]="FAMILY_RHYHORN"]=111;values[valuesById[113]="FAMILY_CHANSEY"]=113;values[valuesById[114]="FAMILY_TANGELA"]=114;values[valuesById[115]="FAMILY_KANGASKHAN"]=115;values[valuesById[116]="FAMILY_HORSEA"]=116;values[valuesById[118]="FAMILY_GOLDEEN"]=118;values[valuesById[120]="FAMILY_STARYU"]=120;values[valuesById[122]="FAMILY_MR_MIME"]=122;values[valuesById[123]="FAMILY_SCYTHER"]=123;values[valuesById[124]="FAMILY_JYNX"]=124;values[valuesById[125]="FAMILY_ELECTABUZZ"]=125;values[valuesById[126]="FAMILY_MAGMAR"]=126;values[valuesById[127]="FAMILY_PINSIR"]=127;values[valuesById[128]="FAMILY_TAUROS"]=128;values[valuesById[129]="FAMILY_MAGIKARP"]=129;values[valuesById[131]="FAMILY_LAPRAS"]=131;values[valuesById[132]="FAMILY_DITTO"]=132;values[valuesById[133]="FAMILY_EEVEE"]=133;values[valuesById[137]="FAMILY_PORYGON"]=137;values[valuesById[138]="FAMILY_OMANYTE"]=138;values[valuesById[140]="FAMILY_KABUTO"]=140;values[valuesById[142]="FAMILY_AERODACTYL"]=142;values[valuesById[143]="FAMILY_SNORLAX"]=143;values[valuesById[144]="FAMILY_ARTICUNO"]=144;values[valuesById[145]="FAMILY_ZAPDOS"]=145;values[valuesById[146]="FAMILY_MOLTRES"]=146;values[valuesById[147]="FAMILY_DRATINI"]=147;values[valuesById[150]="FAMILY_MEWTWO"]=150;values[valuesById[151]="FAMILY_MEW"]=151;values[valuesById[152]="FAMILY_CHIKORITA"]=152;values[valuesById[155]="FAMILY_CYNDAQUIL"]=155;values[valuesById[158]="FAMILY_TOTODILE"]=158;values[valuesById[161]="FAMILY_SENTRET"]=161;values[valuesById[163]="FAMILY_HOOTHOOT"]=163;values[valuesById[165]="FAMILY_LEDYBA"]=165;values[valuesById[167]="FAMILY_SPINARAK"]=167;values[valuesById[170]="FAMILY_CHINCHOU"]=170;values[valuesById[175]="FAMILY_TOGEPI"]=175;values[valuesById[177]="FAMILY_NATU"]=177;values[valuesById[179]="FAMILY_MAREEP"]=179;values[valuesById[183]="FAMILY_MARILL"]=183;values[valuesById[185]="FAMILY_SUDOWOODO"]=185;values[valuesById[187]="FAMILY_HOPPIP"]=187;values[valuesById[190]="FAMILY_AIPOM"]=190;values[valuesById[191]="FAMILY_SUNKERN"]=191;values[valuesById[193]="FAMILY_YANMA"]=193;values[valuesById[194]="FAMILY_WOOPER"]=194;values[valuesById[198]="FAMILY_MURKROW"]=198;values[valuesById[200]="FAMILY_MISDREAVUS"]=200;values[valuesById[201]="FAMILY_UNOWN"]=201;values[valuesById[202]="FAMILY_WOBBUFFET"]=202;values[valuesById[203]="FAMILY_GIRAFARIG"]=203;values[valuesById[204]="FAMILY_PINECO"]=204;values[valuesById[206]="FAMILY_DUNSPARCE"]=206;values[valuesById[207]="FAMILY_GLIGAR"]=207;values[valuesById[209]="FAMILY_SNUBBULL"]=209;values[valuesById[211]="FAMILY_QWILFISH"]=211;values[valuesById[213]="FAMILY_SHUCKLE"]=213;values[valuesById[214]="FAMILY_HERACROSS"]=214;values[valuesById[215]="FAMILY_SNEASEL"]=215;values[valuesById[216]="FAMILY_TEDDIURSA"]=216;values[valuesById[218]="FAMILY_SLUGMA"]=218;values[valuesById[220]="FAMILY_SWINUB"]=220;values[valuesById[222]="FAMILY_CORSOLA"]=222;values[valuesById[223]="FAMILY_REMORAID"]=223;values[valuesById[225]="FAMILY_DELIBIRD"]=225;values[valuesById[226]="FAMILY_MANTINE"]=226;values[valuesById[227]="FAMILY_SKARMORY"]=227;values[valuesById[228]="FAMILY_HOUNDOUR"]=228;values[valuesById[231]="FAMILY_PHANPY"]=231;values[valuesById[234]="FAMILY_STANTLER"]=234;values[valuesById[235]="FAMILY_SMEARGLE"]=235;values[valuesById[236]="FAMILY_TYROGUE"]=236;values[valuesById[241]="FAMILY_MILTANK"]=241;values[valuesById[243]="FAMILY_RAIKOU"]=243;values[valuesById[244]="FAMILY_ENTEI"]=244;values[valuesById[245]="FAMILY_SUICUNE"]=245;values[valuesById[246]="FAMILY_LARVITAR"]=246;values[valuesById[249]="FAMILY_LUGIA"]=249;values[valuesById[250]="FAMILY_HO_OH"]=250;values[valuesById[251]="FAMILY_CELEBI"]=251;values[valuesById[252]="FAMILY_TREECKO"]=252;values[valuesById[255]="FAMILY_TORCHIC"]=255;values[valuesById[258]="FAMILY_MUDKIP"]=258;values[valuesById[261]="FAMILY_POOCHYENA"]=261;values[valuesById[263]="FAMILY_ZIGZAGOON"]=263;values[valuesById[265]="FAMILY_WURMPLE"]=265;values[valuesById[270]="FAMILY_LOTAD"]=270;values[valuesById[273]="FAMILY_SEEDOT"]=273;values[valuesById[276]="FAMILY_TAILLOW"]=276;values[valuesById[278]="FAMILY_WINGULL"]=278;values[valuesById[280]="FAMILY_RALTS"]=280;values[valuesById[283]="FAMILY_SURSKIT"]=283;values[valuesById[285]="FAMILY_SHROOMISH"]=285;values[valuesById[287]="FAMILY_SLAKOTH"]=287;values[valuesById[290]="FAMILY_NINCADA"]=290;values[valuesById[293]="FAMILY_WHISMUR"]=293;values[valuesById[296]="FAMILY_MAKUHITA"]=296;values[valuesById[299]="FAMILY_NOSEPASS"]=299;values[valuesById[300]="FAMILY_SKITTY"]=300;values[valuesById[302]="FAMILY_SABLEYE"]=302;values[valuesById[303]="FAMILY_MAWILE"]=303;values[valuesById[304]="FAMILY_ARON"]=304;values[valuesById[307]="FAMILY_MEDITITE"]=307;values[valuesById[309]="FAMILY_ELECTRIKE"]=309;values[valuesById[311]="FAMILY_PLUSLE"]=311;values[valuesById[312]="FAMILY_MINUN"]=312;values[valuesById[313]="FAMILY_VOLBEAT"]=313;values[valuesById[314]="FAMILY_ILLUMISE"]=314;values[valuesById[315]="FAMILY_ROSELIA"]=315;values[valuesById[316]="FAMILY_GULPIN"]=316;values[valuesById[318]="FAMILY_CARVANHA"]=318;values[valuesById[320]="FAMILY_WAILMER"]=320;values[valuesById[322]="FAMILY_NUMEL"]=322;values[valuesById[324]="FAMILY_TORKOAL"]=324;values[valuesById[325]="FAMILY_SPOINK"]=325;values[valuesById[327]="FAMILY_SPINDA"]=327;values[valuesById[328]="FAMILY_TRAPINCH"]=328;values[valuesById[331]="FAMILY_CACNEA"]=331;values[valuesById[333]="FAMILY_SWABLU"]=333;values[valuesById[335]="FAMILY_ZANGOOSE"]=335;values[valuesById[336]="FAMILY_SEVIPER"]=336;values[valuesById[337]="FAMILY_LUNATONE"]=337;values[valuesById[338]="FAMILY_SOLROCK"]=338;values[valuesById[339]="FAMILY_BARBOACH"]=339;values[valuesById[341]="FAMILY_CORPHISH"]=341;values[valuesById[343]="FAMILY_BALTOY"]=343;values[valuesById[345]="FAMILY_LILEEP"]=345;values[valuesById[347]="FAMILY_ANORITH"]=347;values[valuesById[349]="FAMILY_FEEBAS"]=349;values[valuesById[351]="FAMILY_CASTFORM"]=351;values[valuesById[352]="FAMILY_KECLEON"]=352;values[valuesById[353]="FAMILY_SHUPPET"]=353;values[valuesById[355]="FAMILY_DUSKULL"]=355;values[valuesById[357]="FAMILY_TROPIUS"]=357;values[valuesById[358]="FAMILY_CHIMECHO"]=358;values[valuesById[359]="FAMILY_ABSOL"]=359;values[valuesById[361]="FAMILY_SNORUNT"]=361;values[valuesById[363]="FAMILY_SPHEAL"]=363;values[valuesById[366]="FAMILY_CLAMPERL"]=366;values[valuesById[369]="FAMILY_RELICANTH"]=369;values[valuesById[370]="FAMILY_LUVDISC"]=370;values[valuesById[371]="FAMILY_BAGON"]=371;values[valuesById[374]="FAMILY_BELDUM"]=374;values[valuesById[377]="FAMILY_REGIROCK"]=377;values[valuesById[378]="FAMILY_REGICE"]=378;values[valuesById[379]="FAMILY_REGISTEEL"]=379;values[valuesById[380]="FAMILY_LATIAS"]=380;values[valuesById[381]="FAMILY_LATIOS"]=381;values[valuesById[382]="FAMILY_KYOGRE"]=382;values[valuesById[383]="FAMILY_GROUDON"]=383;values[valuesById[384]="FAMILY_RAYQUAZA"]=384;values[valuesById[385]="FAMILY_JIRACHI"]=385;values[valuesById[386]="FAMILY_DEOXYS"]=386;values[valuesById[387]="FAMILY_TURTWIG"]=387;values[valuesById[390]="FAMILY_CHIMCHAR"]=390;values[valuesById[393]="FAMILY_PIPLUP"]=393;values[valuesById[396]="FAMILY_STARLY"]=396;values[valuesById[399]="FAMILY_BIDOOF"]=399;values[valuesById[401]="FAMILY_KRICKETOT"]=401;values[valuesById[403]="FAMILY_SHINX"]=403;values[valuesById[408]="FAMILY_CRANIDOS"]=408;values[valuesById[410]="FAMILY_SHIELDON"]=410;values[valuesById[412]="FAMILY_BURMY"]=412;values[valuesById[415]="FAMILY_COMBEE"]=415;values[valuesById[417]="FAMILY_PACHIRISU"]=417;values[valuesById[418]="FAMILY_BUIZEL"]=418;values[valuesById[420]="FAMILY_CHERUBI"]=420;values[valuesById[422]="FAMILY_SHELLOS"]=422;values[valuesById[425]="FAMILY_DRIFLOON"]=425;values[valuesById[427]="FAMILY_BUNEARY"]=427;values[valuesById[431]="FAMILY_GLAMEOW"]=431;values[valuesById[434]="FAMILY_STUNKY"]=434;values[valuesById[436]="FAMILY_BRONZOR"]=436;values[valuesById[441]="FAMILY_CHATOT"]=441;values[valuesById[442]="FAMILY_SPIRITOMB"]=442;values[valuesById[443]="FAMILY_GIBLE"]=443;values[valuesById[448]="FAMILY_LUCARIO"]=448;values[valuesById[449]="FAMILY_HIPPOPOTAS"]=449;values[valuesById[451]="FAMILY_SKORUPI"]=451;values[valuesById[453]="FAMILY_CROAGUNK"]=453;values[valuesById[455]="FAMILY_CARNIVINE"]=455;values[valuesById[456]="FAMILY_FINNEON"]=456;values[valuesById[459]="FAMILY_SNOVER"]=459;values[valuesById[479]="FAMILY_ROTOM"]=479;values[valuesById[480]="FAMILY_UXIE"]=480;values[valuesById[481]="FAMILY_MESPRIT"]=481;values[valuesById[482]="FAMILY_AZELF"]=482;values[valuesById[483]="FAMILY_DIALGA"]=483;values[valuesById[484]="FAMILY_PALKIA"]=484;values[valuesById[485]="FAMILY_HEATRAN"]=485;values[valuesById[486]="FAMILY_REGIGIGAS"]=486;values[valuesById[487]="FAMILY_GIRATINA"]=487;values[valuesById[488]="FAMILY_CRESSELIA"]=488;values[valuesById[489]="FAMILY_PHIONE"]=489;values[valuesById[490]="FAMILY_MANAPHY"]=490;values[valuesById[491]="FAMILY_DARKRAI"]=491;values[valuesById[492]="FAMILY_SHAYMIN"]=492;values[valuesById[493]="FAMILY_ARCEUS"]=493;values[valuesById[808]="FAMILY_MELTAN"]=808;return values}();Enums.PokemonGoPlusIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_POKEMON_GO_PLUS_EVENT"]=0;values[valuesById[1]="CANNOT_CONNECT_TO_PGP"]=1;values[valuesById[2]="REGISTERING_PGP_FAILED"]=2;values[valuesById[3]="REGISTERING_RETRY"]=3;values[valuesById[4]="CONNECTION_SUCCESS"]=4;values[valuesById[5]="PGP_DISCONNECTED_BY_USER"]=5;values[valuesById[6]="PGP_DISCONNECTED_BY_TIMEOUT"]=6;values[valuesById[7]="PGP_DISCONNECTED_BY_ERROR"]=7;values[valuesById[8]="PGP_LOW_BATTERY"]=8;values[valuesById[9]="BLUETOOTH_SENT_ERROR"]=9;values[valuesById[10]="PGP_SEEN_BY_DEVICE"]=10;values[valuesById[11]="POKEMON_CAUGHT"]=11;values[valuesById[12]="POKEMON_NOT_CAUGHT"]=12;values[valuesById[13]="POKEMON_NOT_CAUGHT_DUE_ERROR"]=13;values[valuesById[14]="POKESTOP_SPUN"]=14;values[valuesById[15]="POKESTOP_NOT_SPUN_DUE_ERROR"]=15;return values}();Enums.DeviceKind=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="POKEMON_GO_PLUS_KIND"]=0;values[valuesById[1]="POKE_BALL_PLUS"]=1;return values}();Enums.PokemonId=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="MISSINGNO"]=0;values[valuesById[1]="BULBASAUR"]=1;values[valuesById[2]="IVYSAUR"]=2;values[valuesById[3]="VENUSAUR"]=3;values[valuesById[4]="CHARMANDER"]=4;values[valuesById[5]="CHARMELEON"]=5;values[valuesById[6]="CHARIZARD"]=6;values[valuesById[7]="SQUIRTLE"]=7;values[valuesById[8]="WARTORTLE"]=8;values[valuesById[9]="BLASTOISE"]=9;values[valuesById[10]="CATERPIE"]=10;values[valuesById[11]="METAPOD"]=11;values[valuesById[12]="BUTTERFREE"]=12;values[valuesById[13]="WEEDLE"]=13;values[valuesById[14]="KAKUNA"]=14;values[valuesById[15]="BEEDRILL"]=15;values[valuesById[16]="PIDGEY"]=16;values[valuesById[17]="PIDGEOTTO"]=17;values[valuesById[18]="PIDGEOT"]=18;values[valuesById[19]="RATTATA"]=19;values[valuesById[20]="RATICATE"]=20;values[valuesById[21]="SPEAROW"]=21;values[valuesById[22]="FEAROW"]=22;values[valuesById[23]="EKANS"]=23;values[valuesById[24]="ARBOK"]=24;values[valuesById[25]="PIKACHU"]=25;values[valuesById[26]="RAICHU"]=26;values[valuesById[27]="SANDSHREW"]=27;values[valuesById[28]="SANDSLASH"]=28;values[valuesById[29]="NIDORAN_FEMALE"]=29;values[valuesById[30]="NIDORINA"]=30;values[valuesById[31]="NIDOQUEEN"]=31;values[valuesById[32]="NIDORAN_MALE"]=32;values[valuesById[33]="NIDORINO"]=33;values[valuesById[34]="NIDOKING"]=34;values[valuesById[35]="CLEFAIRY"]=35;values[valuesById[36]="CLEFABLE"]=36;values[valuesById[37]="VULPIX"]=37;values[valuesById[38]="NINETALES"]=38;values[valuesById[39]="JIGGLYPUFF"]=39;values[valuesById[40]="WIGGLYTUFF"]=40;values[valuesById[41]="ZUBAT"]=41;values[valuesById[42]="GOLBAT"]=42;values[valuesById[43]="ODDISH"]=43;values[valuesById[44]="GLOOM"]=44;values[valuesById[45]="VILEPLUME"]=45;values[valuesById[46]="PARAS"]=46;values[valuesById[47]="PARASECT"]=47;values[valuesById[48]="VENONAT"]=48;values[valuesById[49]="VENOMOTH"]=49;values[valuesById[50]="DIGLETT"]=50;values[valuesById[51]="DUGTRIO"]=51;values[valuesById[52]="MEOWTH"]=52;values[valuesById[53]="PERSIAN"]=53;values[valuesById[54]="PSYDUCK"]=54;values[valuesById[55]="GOLDUCK"]=55;values[valuesById[56]="MANKEY"]=56;values[valuesById[57]="PRIMEAPE"]=57;values[valuesById[58]="GROWLITHE"]=58;values[valuesById[59]="ARCANINE"]=59;values[valuesById[60]="POLIWAG"]=60;values[valuesById[61]="POLIWHIRL"]=61;values[valuesById[62]="POLIWRATH"]=62;values[valuesById[63]="ABRA"]=63;values[valuesById[64]="KADABRA"]=64;values[valuesById[65]="ALAKAZAM"]=65;values[valuesById[66]="MACHOP"]=66;values[valuesById[67]="MACHOKE"]=67;values[valuesById[68]="MACHAMP"]=68;values[valuesById[69]="BELLSPROUT"]=69;values[valuesById[70]="WEEPINBELL"]=70;values[valuesById[71]="VICTREEBEL"]=71;values[valuesById[72]="TENTACOOL"]=72;values[valuesById[73]="TENTACRUEL"]=73;values[valuesById[74]="GEODUDE"]=74;values[valuesById[75]="GRAVELER"]=75;values[valuesById[76]="GOLEM"]=76;values[valuesById[77]="PONYTA"]=77;values[valuesById[78]="RAPIDASH"]=78;values[valuesById[79]="SLOWPOKE"]=79;values[valuesById[80]="SLOWBRO"]=80;values[valuesById[81]="MAGNEMITE"]=81;values[valuesById[82]="MAGNETON"]=82;values[valuesById[83]="FARFETCHD"]=83;values[valuesById[84]="DODUO"]=84;values[valuesById[85]="DODRIO"]=85;values[valuesById[86]="SEEL"]=86;values[valuesById[87]="DEWGONG"]=87;values[valuesById[88]="GRIMER"]=88;values[valuesById[89]="MUK"]=89;values[valuesById[90]="SHELLDER"]=90;values[valuesById[91]="CLOYSTER"]=91;values[valuesById[92]="GASTLY"]=92;values[valuesById[93]="HAUNTER"]=93;values[valuesById[94]="GENGAR"]=94;values[valuesById[95]="ONIX"]=95;values[valuesById[96]="DROWZEE"]=96;values[valuesById[97]="HYPNO"]=97;values[valuesById[98]="KRABBY"]=98;values[valuesById[99]="KINGLER"]=99;values[valuesById[100]="VOLTORB"]=100;values[valuesById[101]="ELECTRODE"]=101;values[valuesById[102]="EXEGGCUTE"]=102;values[valuesById[103]="EXEGGUTOR"]=103;values[valuesById[104]="CUBONE"]=104;values[valuesById[105]="MAROWAK"]=105;values[valuesById[106]="HITMONLEE"]=106;values[valuesById[107]="HITMONCHAN"]=107;values[valuesById[108]="LICKITUNG"]=108;values[valuesById[109]="KOFFING"]=109;values[valuesById[110]="WEEZING"]=110;values[valuesById[111]="RHYHORN"]=111;values[valuesById[112]="RHYDON"]=112;values[valuesById[113]="CHANSEY"]=113;values[valuesById[114]="TANGELA"]=114;values[valuesById[115]="KANGASKHAN"]=115;values[valuesById[116]="HORSEA"]=116;values[valuesById[117]="SEADRA"]=117;values[valuesById[118]="GOLDEEN"]=118;values[valuesById[119]="SEAKING"]=119;values[valuesById[120]="STARYU"]=120;values[valuesById[121]="STARMIE"]=121;values[valuesById[122]="MR_MIME"]=122;values[valuesById[123]="SCYTHER"]=123;values[valuesById[124]="JYNX"]=124;values[valuesById[125]="ELECTABUZZ"]=125;values[valuesById[126]="MAGMAR"]=126;values[valuesById[127]="PINSIR"]=127;values[valuesById[128]="TAUROS"]=128;values[valuesById[129]="MAGIKARP"]=129;values[valuesById[130]="GYARADOS"]=130;values[valuesById[131]="LAPRAS"]=131;values[valuesById[132]="DITTO"]=132;values[valuesById[133]="EEVEE"]=133;values[valuesById[134]="VAPOREON"]=134;values[valuesById[135]="JOLTEON"]=135;values[valuesById[136]="FLAREON"]=136;values[valuesById[137]="PORYGON"]=137;values[valuesById[138]="OMANYTE"]=138;values[valuesById[139]="OMASTAR"]=139;values[valuesById[140]="KABUTO"]=140;values[valuesById[141]="KABUTOPS"]=141;values[valuesById[142]="AERODACTYL"]=142;values[valuesById[143]="SNORLAX"]=143;values[valuesById[144]="ARTICUNO"]=144;values[valuesById[145]="ZAPDOS"]=145;values[valuesById[146]="MOLTRES"]=146;values[valuesById[147]="DRATINI"]=147;values[valuesById[148]="DRAGONAIR"]=148;values[valuesById[149]="DRAGONITE"]=149;values[valuesById[150]="MEWTWO"]=150;values[valuesById[151]="MEW"]=151;values[valuesById[152]="CHIKORITA"]=152;values[valuesById[153]="BAYLEEF"]=153;values[valuesById[154]="MEGANIUM"]=154;values[valuesById[155]="CYNDAQUIL"]=155;values[valuesById[156]="QUILAVA"]=156;values[valuesById[157]="TYPHLOSION"]=157;values[valuesById[158]="TOTODILE"]=158;values[valuesById[159]="CROCONAW"]=159;values[valuesById[160]="FERALIGATR"]=160;values[valuesById[161]="SENTRET"]=161;values[valuesById[162]="FURRET"]=162;values[valuesById[163]="HOOTHOOT"]=163;values[valuesById[164]="NOCTOWL"]=164;values[valuesById[165]="LEDYBA"]=165;values[valuesById[166]="LEDIAN"]=166;values[valuesById[167]="SPINARAK"]=167;values[valuesById[168]="ARIADOS"]=168;values[valuesById[169]="CROBAT"]=169;values[valuesById[170]="CHINCHOU"]=170;values[valuesById[171]="LANTURN"]=171;values[valuesById[172]="PICHU"]=172;values[valuesById[173]="CLEFFA"]=173;values[valuesById[174]="IGGLYBUFF"]=174;values[valuesById[175]="TOGEPI"]=175;values[valuesById[176]="TOGETIC"]=176;values[valuesById[177]="NATU"]=177;values[valuesById[178]="XATU"]=178;values[valuesById[179]="MAREEP"]=179;values[valuesById[180]="FLAAFFY"]=180;values[valuesById[181]="AMPHAROS"]=181;values[valuesById[182]="BELLOSSOM"]=182;values[valuesById[183]="MARILL"]=183;values[valuesById[184]="AZUMARILL"]=184;values[valuesById[185]="SUDOWOODO"]=185;values[valuesById[186]="POLITOED"]=186;values[valuesById[187]="HOPPIP"]=187;values[valuesById[188]="SKIPLOOM"]=188;values[valuesById[189]="JUMPLUFF"]=189;values[valuesById[190]="AIPOM"]=190;values[valuesById[191]="SUNKERN"]=191;values[valuesById[192]="SUNFLORA"]=192;values[valuesById[193]="YANMA"]=193;values[valuesById[194]="WOOPER"]=194;values[valuesById[195]="QUAGSIRE"]=195;values[valuesById[196]="ESPEON"]=196;values[valuesById[197]="UMBREON"]=197;values[valuesById[198]="MURKROW"]=198;values[valuesById[199]="SLOWKING"]=199;values[valuesById[200]="MISDREAVUS"]=200;values[valuesById[201]="UNOWN"]=201;values[valuesById[202]="WOBBUFFET"]=202;values[valuesById[203]="GIRAFARIG"]=203;values[valuesById[204]="PINECO"]=204;values[valuesById[205]="FORRETRESS"]=205;values[valuesById[206]="DUNSPARCE"]=206;values[valuesById[207]="GLIGAR"]=207;values[valuesById[208]="STEELIX"]=208;values[valuesById[209]="SNUBBULL"]=209;values[valuesById[210]="GRANBULL"]=210;values[valuesById[211]="QWILFISH"]=211;values[valuesById[212]="SCIZOR"]=212;values[valuesById[213]="SHUCKLE"]=213;values[valuesById[214]="HERACROSS"]=214;values[valuesById[215]="SNEASEL"]=215;values[valuesById[216]="TEDDIURSA"]=216;values[valuesById[217]="URSARING"]=217;values[valuesById[218]="SLUGMA"]=218;values[valuesById[219]="MAGCARGO"]=219;values[valuesById[220]="SWINUB"]=220;values[valuesById[221]="PILOSWINE"]=221;values[valuesById[222]="CORSOLA"]=222;values[valuesById[223]="REMORAID"]=223;values[valuesById[224]="OCTILLERY"]=224;values[valuesById[225]="DELIBIRD"]=225;values[valuesById[226]="MANTINE"]=226;values[valuesById[227]="SKARMORY"]=227;values[valuesById[228]="HOUNDOUR"]=228;values[valuesById[229]="HOUNDOOM"]=229;values[valuesById[230]="KINGDRA"]=230;values[valuesById[231]="PHANPY"]=231;values[valuesById[232]="DONPHAN"]=232;values[valuesById[233]="PORYGON2"]=233;values[valuesById[234]="STANTLER"]=234;values[valuesById[235]="SMEARGLE"]=235;values[valuesById[236]="TYROGUE"]=236;values[valuesById[237]="HITMONTOP"]=237;values[valuesById[238]="SMOOCHUM"]=238;values[valuesById[239]="ELEKID"]=239;values[valuesById[240]="MAGBY"]=240;values[valuesById[241]="MILTANK"]=241;values[valuesById[242]="BLISSEY"]=242;values[valuesById[243]="RAIKOU"]=243;values[valuesById[244]="ENTEI"]=244;values[valuesById[245]="SUICUNE"]=245;values[valuesById[246]="LARVITAR"]=246;values[valuesById[247]="PUPITAR"]=247;values[valuesById[248]="TYRANITAR"]=248;values[valuesById[249]="LUGIA"]=249;values[valuesById[250]="HO_OH"]=250;values[valuesById[251]="CELEBI"]=251;values[valuesById[252]="TREECKO"]=252;values[valuesById[253]="GROVYLE"]=253;values[valuesById[254]="SCEPTILE"]=254;values[valuesById[255]="TORCHIC"]=255;values[valuesById[256]="COMBUSKEN"]=256;values[valuesById[257]="BLAZIKEN"]=257;values[valuesById[258]="MUDKIP"]=258;values[valuesById[259]="MARSHTOMP"]=259;values[valuesById[260]="SWAMPERT"]=260;values[valuesById[261]="POOCHYENA"]=261;values[valuesById[262]="MIGHTYENA"]=262;values[valuesById[263]="ZIGZAGOON"]=263;values[valuesById[264]="LINOONE"]=264;values[valuesById[265]="WURMPLE"]=265;values[valuesById[266]="SILCOON"]=266;values[valuesById[267]="BEAUTIFLY"]=267;values[valuesById[268]="CASCOON"]=268;values[valuesById[269]="DUSTOX"]=269;values[valuesById[270]="LOTAD"]=270;values[valuesById[271]="LOMBRE"]=271;values[valuesById[272]="LUDICOLO"]=272;values[valuesById[273]="SEEDOT"]=273;values[valuesById[274]="NUZLEAF"]=274;values[valuesById[275]="SHIFTRY"]=275;values[valuesById[276]="TAILLOW"]=276;values[valuesById[277]="SWELLOW"]=277;values[valuesById[278]="WINGULL"]=278;values[valuesById[279]="PELIPPER"]=279;values[valuesById[280]="RALTS"]=280;values[valuesById[281]="KIRLIA"]=281;values[valuesById[282]="GARDEVOIR"]=282;values[valuesById[283]="SURSKIT"]=283;values[valuesById[284]="MASQUERAIN"]=284;values[valuesById[285]="SHROOMISH"]=285;values[valuesById[286]="BRELOOM"]=286;values[valuesById[287]="SLAKOTH"]=287;values[valuesById[288]="VIGOROTH"]=288;values[valuesById[289]="SLAKING"]=289;values[valuesById[290]="NINCADA"]=290;values[valuesById[291]="NINJASK"]=291;values[valuesById[292]="SHEDINJA"]=292;values[valuesById[293]="WHISMUR"]=293;values[valuesById[294]="LOUDRED"]=294;values[valuesById[295]="EXPLOUD"]=295;values[valuesById[296]="MAKUHITA"]=296;values[valuesById[297]="HARIYAMA"]=297;values[valuesById[298]="AZURILL"]=298;values[valuesById[299]="NOSEPASS"]=299;values[valuesById[300]="SKITTY"]=300;values[valuesById[301]="DELCATTY"]=301;values[valuesById[302]="SABLEYE"]=302;values[valuesById[303]="MAWILE"]=303;values[valuesById[304]="ARON"]=304;values[valuesById[305]="LAIRON"]=305;values[valuesById[306]="AGGRON"]=306;values[valuesById[307]="MEDITITE"]=307;values[valuesById[308]="MEDICHAM"]=308;values[valuesById[309]="ELECTRIKE"]=309;values[valuesById[310]="MANECTRIC"]=310;values[valuesById[311]="PLUSLE"]=311;values[valuesById[312]="MINUN"]=312;values[valuesById[313]="VOLBEAT"]=313;values[valuesById[314]="ILLUMISE"]=314;values[valuesById[315]="ROSELIA"]=315;values[valuesById[316]="GULPIN"]=316;values[valuesById[317]="SWALOT"]=317;values[valuesById[318]="CARVANHA"]=318;values[valuesById[319]="SHARPEDO"]=319;values[valuesById[320]="WAILMER"]=320;values[valuesById[321]="WAILORD"]=321;values[valuesById[322]="NUMEL"]=322;values[valuesById[323]="CAMERUPT"]=323;values[valuesById[324]="TORKOAL"]=324;values[valuesById[325]="SPOINK"]=325;values[valuesById[326]="GRUMPIG"]=326;values[valuesById[327]="SPINDA"]=327;values[valuesById[328]="TRAPINCH"]=328;values[valuesById[329]="VIBRAVA"]=329;values[valuesById[330]="FLYGON"]=330;values[valuesById[331]="CACNEA"]=331;values[valuesById[332]="CACTURNE"]=332;values[valuesById[333]="SWABLU"]=333;values[valuesById[334]="ALTARIA"]=334;values[valuesById[335]="ZANGOOSE"]=335;values[valuesById[336]="SEVIPER"]=336;values[valuesById[337]="LUNATONE"]=337;values[valuesById[338]="SOLROCK"]=338;values[valuesById[339]="BARBOACH"]=339;values[valuesById[340]="WHISCASH"]=340;values[valuesById[341]="CORPHISH"]=341;values[valuesById[342]="CRAWDAUNT"]=342;values[valuesById[343]="BALTOY"]=343;values[valuesById[344]="CLAYDOL"]=344;values[valuesById[345]="LILEEP"]=345;values[valuesById[346]="CRADILY"]=346;values[valuesById[347]="ANORITH"]=347;values[valuesById[348]="ARMALDO"]=348;values[valuesById[349]="FEEBAS"]=349;values[valuesById[350]="MILOTIC"]=350;values[valuesById[351]="CASTFORM"]=351;values[valuesById[352]="KECLEON"]=352;values[valuesById[353]="SHUPPET"]=353;values[valuesById[354]="BANETTE"]=354;values[valuesById[355]="DUSKULL"]=355;values[valuesById[356]="DUSCLOPS"]=356;values[valuesById[357]="TROPIUS"]=357;values[valuesById[358]="CHIMECHO"]=358;values[valuesById[359]="ABSOL"]=359;values[valuesById[360]="WYNAUT"]=360;values[valuesById[361]="SNORUNT"]=361;values[valuesById[362]="GLALIE"]=362;values[valuesById[363]="SPHEAL"]=363;values[valuesById[364]="SEALEO"]=364;values[valuesById[365]="WALREIN"]=365;values[valuesById[366]="CLAMPERL"]=366;values[valuesById[367]="HUNTAIL"]=367;values[valuesById[368]="GOREBYSS"]=368;values[valuesById[369]="RELICANTH"]=369;values[valuesById[370]="LUVDISC"]=370;values[valuesById[371]="BAGON"]=371;values[valuesById[372]="SHELGON"]=372;values[valuesById[373]="SALAMENCE"]=373;values[valuesById[374]="BELDUM"]=374;values[valuesById[375]="METANG"]=375;values[valuesById[376]="METAGROSS"]=376;values[valuesById[377]="REGIROCK"]=377;values[valuesById[378]="REGICE"]=378;values[valuesById[379]="REGISTEEL"]=379;values[valuesById[380]="LATIAS"]=380;values[valuesById[381]="LATIOS"]=381;values[valuesById[382]="KYOGRE"]=382;values[valuesById[383]="GROUDON"]=383;values[valuesById[384]="RAYQUAZA"]=384;values[valuesById[385]="JIRACHI"]=385;values[valuesById[386]="DEOXYS"]=386;values[valuesById[387]="TURTWIG"]=387;values[valuesById[388]="GROTLE"]=388;values[valuesById[389]="TORTERRA"]=389;values[valuesById[390]="CHIMCHAR"]=390;values[valuesById[391]="MONFERNO"]=391;values[valuesById[392]="INFERNAPE"]=392;values[valuesById[393]="PIPLUP"]=393;values[valuesById[394]="PRINPLUP"]=394;values[valuesById[395]="EMPOLEON"]=395;values[valuesById[396]="STARLY"]=396;values[valuesById[397]="STARAVIA"]=397;values[valuesById[398]="STARAPTOR"]=398;values[valuesById[399]="BIDOOF"]=399;values[valuesById[400]="BIBAREL"]=400;values[valuesById[401]="KRICKETOT"]=401;values[valuesById[402]="KRICKETUNE"]=402;values[valuesById[403]="SHINX"]=403;values[valuesById[404]="LUXIO"]=404;values[valuesById[405]="LUXRAY"]=405;values[valuesById[406]="BUDEW"]=406;values[valuesById[407]="ROSERADE"]=407;values[valuesById[408]="CRANIDOS"]=408;values[valuesById[409]="RAMPARDOS"]=409;values[valuesById[410]="SHIELDON"]=410;values[valuesById[411]="BASTIODON"]=411;values[valuesById[412]="BURMY"]=412;values[valuesById[413]="WORMADAM"]=413;values[valuesById[414]="MOTHIM"]=414;values[valuesById[415]="COMBEE"]=415;values[valuesById[416]="VESPIQUEN"]=416;values[valuesById[417]="PACHIRISU"]=417;values[valuesById[418]="BUIZEL"]=418;values[valuesById[419]="FLOATZEL"]=419;values[valuesById[420]="CHERUBI"]=420;values[valuesById[421]="CHERRIM"]=421;values[valuesById[422]="SHELLOS"]=422;values[valuesById[423]="GASTRODON"]=423;values[valuesById[424]="AMBIPOM"]=424;values[valuesById[425]="DRIFLOON"]=425;values[valuesById[426]="DRIFBLIM"]=426;values[valuesById[427]="BUNEARY"]=427;values[valuesById[428]="LOPUNNY"]=428;values[valuesById[429]="MISMAGIUS"]=429;values[valuesById[430]="HONCHKROW"]=430;values[valuesById[431]="GLAMEOW"]=431;values[valuesById[432]="PURUGLY"]=432;values[valuesById[433]="CHINGLING"]=433;values[valuesById[434]="STUNKY"]=434;values[valuesById[435]="SKUNTANK"]=435;values[valuesById[436]="BRONZOR"]=436;values[valuesById[437]="BRONZONG"]=437;values[valuesById[438]="BONSLY"]=438;values[valuesById[439]="MIME_JR"]=439;values[valuesById[440]="HAPPINY"]=440;values[valuesById[441]="CHATOT"]=441;values[valuesById[442]="SPIRITOMB"]=442;values[valuesById[443]="GIBLE"]=443;values[valuesById[444]="GABITE"]=444;values[valuesById[445]="GARCHOMP"]=445;values[valuesById[446]="MUNCHLAX"]=446;values[valuesById[447]="RIOLU"]=447;values[valuesById[448]="LUCARIO"]=448;values[valuesById[449]="HIPPOPOTAS"]=449;values[valuesById[450]="HIPPOWDON"]=450;values[valuesById[451]="SKORUPI"]=451;values[valuesById[452]="DRAPION"]=452;values[valuesById[453]="CROAGUNK"]=453;values[valuesById[454]="TOXICROAK"]=454;values[valuesById[455]="CARNIVINE"]=455;values[valuesById[456]="FINNEON"]=456;values[valuesById[457]="LUMINEON"]=457;values[valuesById[458]="MANTYKE"]=458;values[valuesById[459]="SNOVER"]=459;values[valuesById[460]="ABOMASNOW"]=460;values[valuesById[461]="WEAVILE"]=461;values[valuesById[462]="MAGNEZONE"]=462;values[valuesById[463]="LICKILICKY"]=463;values[valuesById[464]="RHYPERIOR"]=464;values[valuesById[465]="TANGROWTH"]=465;values[valuesById[466]="ELECTIVIRE"]=466;values[valuesById[467]="MAGMORTAR"]=467;values[valuesById[468]="TOGEKISS"]=468;values[valuesById[469]="YANMEGA"]=469;values[valuesById[470]="LEAFEON"]=470;values[valuesById[471]="GLACEON"]=471;values[valuesById[472]="GLISCOR"]=472;values[valuesById[473]="MAMOSWINE"]=473;values[valuesById[474]="PORYGON_Z"]=474;values[valuesById[475]="GALLADE"]=475;values[valuesById[476]="PROBOPASS"]=476;values[valuesById[477]="DUSKNOIR"]=477;values[valuesById[478]="FROSLASS"]=478;values[valuesById[479]="ROTOM"]=479;values[valuesById[480]="UXIE"]=480;values[valuesById[481]="MESPRIT"]=481;values[valuesById[482]="AZELF"]=482;values[valuesById[483]="DIALGA"]=483;values[valuesById[484]="PALKIA"]=484;values[valuesById[485]="HEATRAN"]=485;values[valuesById[486]="REGIGIGAS"]=486;values[valuesById[487]="GIRATINA"]=487;values[valuesById[488]="CRESSELIA"]=488;values[valuesById[489]="PHIONE"]=489;values[valuesById[490]="MANAPHY"]=490;values[valuesById[491]="DARKRAI"]=491;values[valuesById[492]="SHAYMIN"]=492;values[valuesById[493]="ARCEUS"]=493;values[valuesById[808]="MELTAN"]=808;values[valuesById[809]="MELMETAL"]=809;return values}();Enums.PokemonMove=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="MOVE_UNSET"]=0;values[valuesById[1]="THUNDER_SHOCK"]=1;values[valuesById[2]="QUICK_ATTACK"]=2;values[valuesById[3]="SCRATCH"]=3;values[valuesById[4]="EMBER"]=4;values[valuesById[5]="VINE_WHIP"]=5;values[valuesById[6]="TACKLE"]=6;values[valuesById[7]="RAZOR_LEAF"]=7;values[valuesById[8]="TAKE_DOWN"]=8;values[valuesById[9]="WATER_GUN"]=9;values[valuesById[10]="BITE"]=10;values[valuesById[11]="POUND"]=11;values[valuesById[12]="DOUBLE_SLAP"]=12;values[valuesById[13]="WRAP"]=13;values[valuesById[14]="HYPER_BEAM"]=14;values[valuesById[15]="LICK"]=15;values[valuesById[16]="DARK_PULSE"]=16;values[valuesById[17]="SMOG"]=17;values[valuesById[18]="SLUDGE"]=18;values[valuesById[19]="METAL_CLAW"]=19;values[valuesById[20]="VICE_GRIP"]=20;values[valuesById[21]="FLAME_WHEEL"]=21;values[valuesById[22]="MEGAHORN"]=22;values[valuesById[23]="WING_ATTACK"]=23;values[valuesById[24]="FLAMETHROWER"]=24;values[valuesById[25]="SUCKER_PUNCH"]=25;values[valuesById[26]="DIG"]=26;values[valuesById[27]="LOW_KICK"]=27;values[valuesById[28]="CROSS_CHOP"]=28;values[valuesById[29]="PSYCHO_CUT"]=29;values[valuesById[30]="PSYBEAM"]=30;values[valuesById[31]="EARTHQUAKE"]=31;values[valuesById[32]="STONE_EDGE"]=32;values[valuesById[33]="ICE_PUNCH"]=33;values[valuesById[34]="HEART_STAMP"]=34;values[valuesById[35]="DISCHARGE"]=35;values[valuesById[36]="FLASH_CANNON"]=36;values[valuesById[37]="PECK"]=37;values[valuesById[38]="DRILL_PECK"]=38;values[valuesById[39]="ICE_BEAM"]=39;values[valuesById[40]="BLIZZARD"]=40;values[valuesById[41]="AIR_SLASH"]=41;values[valuesById[42]="HEAT_WAVE"]=42;values[valuesById[43]="TWINEEDLE"]=43;values[valuesById[44]="POISON_JAB"]=44;values[valuesById[45]="AERIAL_ACE"]=45;values[valuesById[46]="DRILL_RUN"]=46;values[valuesById[47]="PETAL_BLIZZARD"]=47;values[valuesById[48]="MEGA_DRAIN"]=48;values[valuesById[49]="BUG_BUZZ"]=49;values[valuesById[50]="POISON_FANG"]=50;values[valuesById[51]="NIGHT_SLASH"]=51;values[valuesById[52]="SLASH"]=52;values[valuesById[53]="BUBBLE_BEAM"]=53;values[valuesById[54]="SUBMISSION"]=54;values[valuesById[55]="KARATE_CHOP"]=55;values[valuesById[56]="LOW_SWEEP"]=56;values[valuesById[57]="AQUA_JET"]=57;values[valuesById[58]="AQUA_TAIL"]=58;values[valuesById[59]="SEED_BOMB"]=59;values[valuesById[60]="PSYSHOCK"]=60;values[valuesById[61]="ROCK_THROW"]=61;values[valuesById[62]="ANCIENT_POWER"]=62;values[valuesById[63]="ROCK_TOMB"]=63;values[valuesById[64]="ROCK_SLIDE"]=64;values[valuesById[65]="POWER_GEM"]=65;values[valuesById[66]="SHADOW_SNEAK"]=66;values[valuesById[67]="SHADOW_PUNCH"]=67;values[valuesById[68]="SHADOW_CLAW"]=68;values[valuesById[69]="OMINOUS_WIND"]=69;values[valuesById[70]="SHADOW_BALL"]=70;values[valuesById[71]="BULLET_PUNCH"]=71;values[valuesById[72]="MAGNET_BOMB"]=72;values[valuesById[73]="STEEL_WING"]=73;values[valuesById[74]="IRON_HEAD"]=74;values[valuesById[75]="PARABOLIC_CHARGE"]=75;values[valuesById[76]="SPARK"]=76;values[valuesById[77]="THUNDER_PUNCH"]=77;values[valuesById[78]="THUNDER"]=78;values[valuesById[79]="THUNDERBOLT"]=79;values[valuesById[80]="TWISTER"]=80;values[valuesById[81]="DRAGON_BREATH"]=81;values[valuesById[82]="DRAGON_PULSE"]=82;values[valuesById[83]="DRAGON_CLAW"]=83;values[valuesById[84]="DISARMING_VOICE"]=84;values[valuesById[85]="DRAINING_KISS"]=85;values[valuesById[86]="DAZZLING_GLEAM"]=86;values[valuesById[87]="MOONBLAST"]=87;values[valuesById[88]="PLAY_ROUGH"]=88;values[valuesById[89]="CROSS_POISON"]=89;values[valuesById[90]="SLUDGE_BOMB"]=90;values[valuesById[91]="SLUDGE_WAVE"]=91;values[valuesById[92]="GUNK_SHOT"]=92;values[valuesById[93]="MUD_SHOT"]=93;values[valuesById[94]="BONE_CLUB"]=94;values[valuesById[95]="BULLDOZE"]=95;values[valuesById[96]="MUD_BOMB"]=96;values[valuesById[97]="FURY_CUTTER"]=97;values[valuesById[98]="BUG_BITE"]=98;values[valuesById[99]="SIGNAL_BEAM"]=99;values[valuesById[100]="X_SCISSOR"]=100;values[valuesById[101]="FLAME_CHARGE"]=101;values[valuesById[102]="FLAME_BURST"]=102;values[valuesById[103]="FIRE_BLAST"]=103;values[valuesById[104]="BRINE"]=104;values[valuesById[105]="WATER_PULSE"]=105;values[valuesById[106]="SCALD"]=106;values[valuesById[107]="HYDRO_PUMP"]=107;values[valuesById[108]="PSYCHIC"]=108;values[valuesById[109]="PSYSTRIKE"]=109;values[valuesById[110]="ICE_SHARD"]=110;values[valuesById[111]="ICY_WIND"]=111;values[valuesById[112]="FROST_BREATH"]=112;values[valuesById[113]="ABSORB"]=113;values[valuesById[114]="GIGA_DRAIN"]=114;values[valuesById[115]="FIRE_PUNCH"]=115;values[valuesById[116]="SOLAR_BEAM"]=116;values[valuesById[117]="LEAF_BLADE"]=117;values[valuesById[118]="POWER_WHIP"]=118;values[valuesById[119]="SPLASH"]=119;values[valuesById[120]="ACID"]=120;values[valuesById[121]="AIR_CUTTER"]=121;values[valuesById[122]="HURRICANE"]=122;values[valuesById[123]="BRICK_BREAK"]=123;values[valuesById[124]="CUT"]=124;values[valuesById[125]="SWIFT"]=125;values[valuesById[126]="HORN_ATTACK"]=126;values[valuesById[127]="STOMP"]=127;values[valuesById[128]="HEADBUTT"]=128;values[valuesById[129]="HYPER_FANG"]=129;values[valuesById[130]="SLAM"]=130;values[valuesById[131]="BODY_SLAM"]=131;values[valuesById[132]="REST"]=132;values[valuesById[133]="STRUGGLE"]=133;values[valuesById[134]="SCALD_BLASTOISE"]=134;values[valuesById[135]="HYDRO_PUMP_BLASTOISE"]=135;values[valuesById[136]="WRAP_GREEN"]=136;values[valuesById[137]="WRAP_PINK"]=137;values[valuesById[200]="FURY_CUTTER_FAST"]=200;values[valuesById[201]="BUG_BITE_FAST"]=201;values[valuesById[202]="BITE_FAST"]=202;values[valuesById[203]="SUCKER_PUNCH_FAST"]=203;values[valuesById[204]="DRAGON_BREATH_FAST"]=204;values[valuesById[205]="THUNDER_SHOCK_FAST"]=205;values[valuesById[206]="SPARK_FAST"]=206;values[valuesById[207]="LOW_KICK_FAST"]=207;values[valuesById[208]="KARATE_CHOP_FAST"]=208;values[valuesById[209]="EMBER_FAST"]=209;values[valuesById[210]="WING_ATTACK_FAST"]=210;values[valuesById[211]="PECK_FAST"]=211;values[valuesById[212]="LICK_FAST"]=212;values[valuesById[213]="SHADOW_CLAW_FAST"]=213;values[valuesById[214]="VINE_WHIP_FAST"]=214;values[valuesById[215]="RAZOR_LEAF_FAST"]=215;values[valuesById[216]="MUD_SHOT_FAST"]=216;values[valuesById[217]="ICE_SHARD_FAST"]=217;values[valuesById[218]="FROST_BREATH_FAST"]=218;values[valuesById[219]="QUICK_ATTACK_FAST"]=219;values[valuesById[220]="SCRATCH_FAST"]=220;values[valuesById[221]="TACKLE_FAST"]=221;values[valuesById[222]="POUND_FAST"]=222;values[valuesById[223]="CUT_FAST"]=223;values[valuesById[224]="POISON_JAB_FAST"]=224;values[valuesById[225]="ACID_FAST"]=225;values[valuesById[226]="PSYCHO_CUT_FAST"]=226;values[valuesById[227]="ROCK_THROW_FAST"]=227;values[valuesById[228]="METAL_CLAW_FAST"]=228;values[valuesById[229]="BULLET_PUNCH_FAST"]=229;values[valuesById[230]="WATER_GUN_FAST"]=230;values[valuesById[231]="SPLASH_FAST"]=231;values[valuesById[232]="WATER_GUN_FAST_BLASTOISE"]=232;values[valuesById[233]="MUD_SLAP_FAST"]=233;values[valuesById[234]="ZEN_HEADBUTT_FAST"]=234;values[valuesById[235]="CONFUSION_FAST"]=235;values[valuesById[236]="POISON_STING_FAST"]=236;values[valuesById[237]="BUBBLE_FAST"]=237;values[valuesById[238]="FEINT_ATTACK_FAST"]=238;values[valuesById[239]="STEEL_WING_FAST"]=239;values[valuesById[240]="FIRE_FANG_FAST"]=240;values[valuesById[241]="ROCK_SMASH_FAST"]=241;values[valuesById[242]="TRANSFORM_FAST"]=242;values[valuesById[243]="COUNTER_FAST"]=243;values[valuesById[244]="POWDER_SNOW_FAST"]=244;values[valuesById[245]="CLOSE_COMBAT"]=245;values[valuesById[246]="DYNAMIC_PUNCH"]=246;values[valuesById[247]="FOCUS_BLAST"]=247;values[valuesById[248]="AURORA_BEAM"]=248;values[valuesById[249]="CHARGE_BEAM_FAST"]=249;values[valuesById[250]="VOLT_SWITCH_FAST"]=250;values[valuesById[251]="WILD_CHARGE"]=251;values[valuesById[252]="ZAP_CANNON"]=252;values[valuesById[253]="DRAGON_TAIL_FAST"]=253;values[valuesById[254]="AVALANCHE"]=254;values[valuesById[255]="AIR_SLASH_FAST"]=255;values[valuesById[256]="BRAVE_BIRD"]=256;values[valuesById[257]="SKY_ATTACK"]=257;values[valuesById[258]="SAND_TOMB"]=258;values[valuesById[259]="ROCK_BLAST"]=259;values[valuesById[260]="INFESTATION_FAST"]=260;values[valuesById[261]="STRUGGLE_BUG_FAST"]=261;values[valuesById[262]="SILVER_WIND"]=262;values[valuesById[263]="ASTONISH_FAST"]=263;values[valuesById[264]="HEX_FAST"]=264;values[valuesById[265]="NIGHT_SHADE"]=265;values[valuesById[266]="IRON_TAIL_FAST"]=266;values[valuesById[267]="GYRO_BALL"]=267;values[valuesById[268]="HEAVY_SLAM"]=268;values[valuesById[269]="FIRE_SPIN_FAST"]=269;values[valuesById[270]="OVERHEAT"]=270;values[valuesById[271]="BULLET_SEED_FAST"]=271;values[valuesById[272]="GRASS_KNOT"]=272;values[valuesById[273]="ENERGY_BALL"]=273;values[valuesById[274]="EXTRASENSORY_FAST"]=274;values[valuesById[275]="FUTURESIGHT"]=275;values[valuesById[276]="MIRROR_COAT"]=276;values[valuesById[277]="OUTRAGE"]=277;values[valuesById[278]="SNARL_FAST"]=278;values[valuesById[279]="CRUNCH"]=279;values[valuesById[280]="FOUL_PLAY"]=280;values[valuesById[281]="HIDDEN_POWER_FAST"]=281;values[valuesById[282]="TAKE_DOWN_FAST"]=282;values[valuesById[283]="WATERFALL_FAST"]=283;values[valuesById[284]="SURF"]=284;values[valuesById[285]="DRACO_METEOR"]=285;values[valuesById[286]="DOOM_DESIRE"]=286;values[valuesById[287]="YAWN_FAST"]=287;values[valuesById[288]="PSYCHO_BOOST"]=288;values[valuesById[289]="ORIGIN_PULSE"]=289;values[valuesById[290]="PRECIPICE_BLADES"]=290;values[valuesById[291]="PRESENT_FAST"]=291;values[valuesById[292]="WEATHER_BALL_FIRE"]=292;values[valuesById[293]="WEATHER_BALL_ICE"]=293;values[valuesById[294]="WEATHER_BALL_ROCK"]=294;values[valuesById[295]="WEATHER_BALL_WATER"]=295;values[valuesById[296]="FRENZY_PLANT"]=296;values[valuesById[297]="SMACK_DOWN_FAST"]=297;values[valuesById[298]="BLAST_BURN"]=298;values[valuesById[299]="HYDRO_CANNON"]=299;values[valuesById[300]="LAST_RESORT"]=300;values[valuesById[301]="METEOR_MASH"]=301;values[valuesById[302]="SKULL_BASH"]=302;values[valuesById[303]="ACID_SPRAY"]=303;values[valuesById[304]="EARTH_POWER"]=304;values[valuesById[305]="CRABHAMMER"]=305;values[valuesById[306]="LUNGE"]=306;values[valuesById[307]="CRUSH_CLAW"]=307;values[valuesById[308]="OCTAZOOKA"]=308;values[valuesById[309]="MIRROR_SHOT"]=309;values[valuesById[310]="SUPER_POWER"]=310;values[valuesById[311]="FELL_STINGER"]=311;values[valuesById[312]="LEAF_TORNADO"]=312;values[valuesById[313]="LEECH_LIFE"]=313;values[valuesById[314]="DRAIN_PUNCH"]=314;values[valuesById[315]="SHADOW_BONE"]=315;values[valuesById[316]="MUDDY_WATER"]=316;values[valuesById[317]="BLAZE_KICK"]=317;values[valuesById[318]="RAZOR_SHELL"]=318;values[valuesById[319]="POWER_UP_PUNCH"]=319;return values}();Enums.PokemonMovementType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="MOVEMENT_STATIC"]=0;values[valuesById[1]="MOVEMENT_JUMP"]=1;values[valuesById[2]="MOVEMENT_VERTICAL"]=2;values[valuesById[3]="MOVEMENT_PSYCHIC"]=3;values[valuesById[4]="MOVEMENT_ELECTRIC"]=4;values[valuesById[5]="MOVEMENT_FLYING"]=5;values[valuesById[6]="MOVEMENT_HOVERING"]=6;return values}();Enums.PokemonNature=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NATURE_UNKNOWN"]=0;values[valuesById[1]="NATURE_STOIC"]=1;values[valuesById[2]="NATURE_ASSASSIN"]=2;values[valuesById[3]="NATURE_GUARDIAN"]=3;values[valuesById[4]="NATURE_RAIDER"]=4;values[valuesById[5]="NATURE_PROTECTOR"]=5;values[valuesById[6]="NATURE_SENTRY"]=6;values[valuesById[7]="NATURE_CHAMPION"]=7;return values}();Enums.PokemonRarity=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="POKEMON_RARITY_NORMAL"]=0;values[valuesById[1]="POKEMON_RARITY_LEGENDARY"]=1;values[valuesById[2]="POKEMON_RARITY_MYTHIC"]=2;return values}();Enums.PokemonTradingType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_POKEMON_TRADING"]=0;values[valuesById[1]="REGULAR_IN_POKEDEX"]=1;values[valuesById[2]="SPECIAL_IN_POKEDEX"]=2;values[valuesById[3]="REGULAR_NON_POKEDEX"]=3;values[valuesById[4]="REGIONAL_NON_POKEDEX"]=4;values[valuesById[5]="FORM_NON_POKEDEX"]=5;values[valuesById[6]="LEGENDARY_NON_POKEDEX"]=6;values[valuesById[7]="SHINY_NON_POKEDEX"]=7;return values}();Enums.PokemonType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="POKEMON_TYPE_NONE"]=0;values[valuesById[1]="POKEMON_TYPE_NORMAL"]=1;values[valuesById[2]="POKEMON_TYPE_FIGHTING"]=2;values[valuesById[3]="POKEMON_TYPE_FLYING"]=3;values[valuesById[4]="POKEMON_TYPE_POISON"]=4;values[valuesById[5]="POKEMON_TYPE_GROUND"]=5;values[valuesById[6]="POKEMON_TYPE_ROCK"]=6;values[valuesById[7]="POKEMON_TYPE_BUG"]=7;values[valuesById[8]="POKEMON_TYPE_GHOST"]=8;values[valuesById[9]="POKEMON_TYPE_STEEL"]=9;values[valuesById[10]="POKEMON_TYPE_FIRE"]=10;values[valuesById[11]="POKEMON_TYPE_WATER"]=11;values[valuesById[12]="POKEMON_TYPE_GRASS"]=12;values[valuesById[13]="POKEMON_TYPE_ELECTRIC"]=13;values[valuesById[14]="POKEMON_TYPE_PSYCHIC"]=14;values[valuesById[15]="POKEMON_TYPE_ICE"]=15;values[valuesById[16]="POKEMON_TYPE_DRAGON"]=16;values[valuesById[17]="POKEMON_TYPE_DARK"]=17;values[valuesById[18]="POKEMON_TYPE_FAIRY"]=18;return values}();Enums.PresentationType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNKNOWN_PRESENTATION_TYPE"]=0;values[valuesById[1]="CATEGORY"]=1;values[valuesById[2]="SORT"]=2;values[valuesById[3]="SALE"]=3;return values}();Enums.QuestType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="QUEST_UNKNOWN_TYPE"]=0;values[valuesById[1]="QUEST_FIRST_CATCH_OF_THE_DAY"]=1;values[valuesById[2]="QUEST_FIRST_POKESTOP_OF_THE_DAY"]=2;values[valuesById[3]="QUEST_MULTI_PART"]=3;values[valuesById[4]="QUEST_CATCH_POKEMON"]=4;values[valuesById[5]="QUEST_SPIN_POKESTOP"]=5;values[valuesById[6]="QUEST_HATCH_EGG"]=6;values[valuesById[7]="QUEST_COMPLETE_GYM_BATTLE"]=7;values[valuesById[8]="QUEST_COMPLETE_RAID_BATTLE"]=8;values[valuesById[9]="QUEST_COMPLETE_QUEST"]=9;values[valuesById[10]="QUEST_TRANSFER_POKEMON"]=10;values[valuesById[11]="QUEST_FAVORITE_POKEMON"]=11;values[valuesById[12]="QUEST_AUTOCOMPLETE"]=12;values[valuesById[13]="QUEST_USE_BERRY_IN_ENCOUNTER"]=13;values[valuesById[14]="QUEST_UPGRADE_POKEMON"]=14;values[valuesById[15]="QUEST_EVOLVE_POKEMON"]=15;values[valuesById[16]="QUEST_LAND_THROW"]=16;values[valuesById[17]="QUEST_GET_BUDDY_CANDY"]=17;values[valuesById[18]="QUEST_BADGE_RANK"]=18;values[valuesById[19]="QUEST_PLAYER_LEVEL"]=19;values[valuesById[20]="QUEST_JOIN_RAID"]=20;values[valuesById[21]="QUEST_COMPLETE_BATTLE"]=21;values[valuesById[22]="QUEST_ADD_FRIEND"]=22;values[valuesById[23]="QUEST_TRADE_POKEMON"]=23;values[valuesById[24]="QUEST_SEND_GIFT"]=24;values[valuesById[25]="QUEST_EVOLVE_INTO_POKEMON"]=25;return values}();Enums.RaidLevel=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="RAID_LEVEL_UNSET"]=0;values[valuesById[1]="RAID_LEVEL_1"]=1;values[valuesById[2]="RAID_LEVEL_2"]=2;values[valuesById[3]="RAID_LEVEL_3"]=3;values[valuesById[4]="RAID_LEVEL_4"]=4;values[valuesById[5]="RAID_LEVEL_5"]=5;return values}();Enums.SfidaConnectState=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="DISCONNECTED"]=0;values[valuesById[1]="DISCONNECTING"]=1;values[valuesById[2]="CONNECTED"]=2;values[valuesById[3]="DISCOVERED"]=3;values[valuesById[4]="CERTIFIED"]=4;values[valuesById[5]="SOFTWARE_UPDATE"]=5;values[valuesById[6]="FAILED"]=6;values[valuesById[7]="CONNECTING"]=7;return values}();Enums.ShareExRaidPassResult=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="SHARE_EX_RAID_PASS_UNSET"]=0;values[valuesById[1]="SHARE_EX_RAID_PASS_SUCCESS"]=1;values[valuesById[2]="ERROR_FRIEND_ALREADY_INVITED_TO_SAME_RAID"]=2;values[valuesById[3]="ERROR_EX_RAID_PASS_ALREADY_SHARED"]=3;values[valuesById[4]="ERROR_FRIEND_ALREADY_HAS_SHARED_EX_PASS_IN_INVENTORY"]=4;values[valuesById[5]="ERROR_TOO_LOW_FRIENDSHIP_LEVEL"]=5;values[valuesById[6]="ERROR_FRIEND_NOT_FOUND"]=6;values[valuesById[7]="ERROR_EX_RAID_ALREADY_STARTED"]=7;values[valuesById[8]="ERROR_EX_RAID_INVALID"]=8;values[valuesById[9]="ERROR_EX_RAID_PASS_NOT_FOUND"]=9;values[valuesById[10]="ERROR_UNKNOWN"]=10;return values}();Enums.SocialAction=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNKNOWN_SOCIAL_ACTION"]=0;values[valuesById[1e4]="SEARCH_PLAYER"]=1e4;values[valuesById[10002]="SEND_FRIEND_INVITE"]=10002;values[valuesById[10003]="CANCEL_FRIEND_INVITE"]=10003;values[valuesById[10004]="ACCEPT_FRIEND_INVITE"]=10004;values[valuesById[10005]="DECLINE_FRIEND_INVITE"]=10005;values[valuesById[10006]="LIST_FRIENDS"]=10006;values[valuesById[10007]="LIST_OUTGOING_FRIEND_INVITES"]=10007;values[valuesById[10008]="LIST_INCOMING_FRIEND_INVITES"]=10008;values[valuesById[10009]="REMOVE_FRIEND"]=10009;values[valuesById[10010]="LIST_FRIEND_STATUS"]=10010;values[valuesById[10011]="SEND_FACEBOOK_FRIEND_INVITE"]=10011;values[valuesById[10012]="IS_MY_FRIEND"]=10012;values[valuesById[10013]="CREATE_INVITE_CODE"]=10013;values[valuesById[10014]="GET_FACEBOOK_FRIEND_LIST"]=10014;values[valuesById[10015]="UPDATE_FACEBOOK_STATUS"]=10015;values[valuesById[10101]="REGISTER_PUSH_NOTIFICATION_SOCIAL_ACTION"]=10101;values[valuesById[10102]="UNREGISTER_PUSH_NOTIFICATION_SOCIAL_ACTION"]=10102;values[valuesById[10103]="UPDATE_NOTIFICATION"]=10103;values[valuesById[10104]="OPT_OUT_PUSH_NOTIFICATION_CATEGORY_SOCIAL_ACTION"]=10104;values[valuesById[10105]="GET_INBOX"]=10105;return values}();Enums.SocialNotificationCategory=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_SOCIAL_NOTIFICATION"]=0;values[valuesById[1]="FRIEND_INVITE_RECEIVED_SOCIAL_NOTIFICATION"]=1;values[valuesById[2]="FRIEND_INVITE_ACCEPTED_SOCIAL_NOTIFICATION"]=2;return values}();Enums.SocialNotificationVariableName=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_SOCIAL_NOTIFICATION_VARIABLE_NAME"]=0;values[valuesById[1]="SOCIAL_CODENAME"]=1;values[valuesById[2]="SOCIAL_TEAM"]=2;values[valuesById[3]="SOCIAL_PLAYER_SUMMARY"]=3;return values}();Enums.TeamColor=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NEUTRAL"]=0;values[valuesById[1]="BLUE"]=1;values[valuesById[2]="RED"]=2;values[valuesById[3]="YELLOW"]=3;return values}();Enums.DeviceServiceTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_DEVICE_SERVICE"]=0;values[valuesById[1]="FITNESS"]=1;values[valuesById[2]="SMART_WATCH"]=2;values[valuesById[3]="SFIDA_DEVICE_SERVICE"]=3;return values}();Enums.PermissionContextTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_PERMISSION_CONTEXT"]=0;values[valuesById[1]="EGG_HATCH"]=1;values[valuesById[2]="BUDDY_CANDY_FOUND"]=2;values[valuesById[3]="PLAYER_PROFILE_CLICKED"]=3;values[valuesById[4]="SMART_WATCH_INSTALLED"]=4;values[valuesById[5]="SFIDA_SESSION_STARTED"]=5;values[valuesById[6]="SETTINGS_TOGGLE"]=6;return values}();Enums.PermissionFlowStepTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_PERMISSION_FLOW_STEP"]=0;values[valuesById[1]="INITIAL_PROMPT"]=1;values[valuesById[2]="FITNESS_PERMISSION"]=2;values[valuesById[3]="LOCATION_PERMISSION"]=3;return values}();Enums.AssetTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_ASSET_EVENT"]=0;values[valuesById[1]="DOWNLOAD_START"]=1;values[valuesById[2]="DOWNLOAD_FINISHED"]=2;values[valuesById[3]="DOWNLOAD_FAILED"]=3;values[valuesById[4]="ASSET_RETRIEVED_FROM_CACHE"]=4;values[valuesById[5]="CACHE_THRASH"]=5;return values}();Enums.ClientTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED"]=0;values[valuesById[1]="BOOT_TIME"]=1;values[valuesById[2]="FRAME_RATE"]=2;values[valuesById[3]="GENERIC_CLICK"]=3;values[valuesById[4]="MAP_EVENT"]=4;values[valuesById[5]="SPIN_POKESTOP"]=5;values[valuesById[6]="PROFILE_PAGE"]=6;values[valuesById[7]="SHOPPING_PAGE"]=7;values[valuesById[8]="ENCOUNTER_POKEMON"]=8;values[valuesById[9]="CATCH_POKEMON"]=9;values[valuesById[10]="DEPLOY_POKEMON"]=10;values[valuesById[11]="FEED_POKEMON"]=11;values[valuesById[12]="EVOLVE_POKEMON"]=12;values[valuesById[13]="RELEASE_POKEMON"]=13;values[valuesById[14]="NICKNAME_POKEMON"]=14;values[valuesById[15]="NEWS_PAGE"]=15;values[valuesById[16]="ITEM"]=16;values[valuesById[17]="BATTLE_PARTY"]=17;values[valuesById[18]="PASSCODE_REDEEM"]=18;values[valuesById[19]="LINK_LOGIN"]=19;values[valuesById[20]="RAID"]=20;values[valuesById[21]="PUSH_NOTIFICATION"]=21;values[valuesById[22]="AVATAR_CUSTOMIZATION"]=22;values[valuesById[23]="READ_POINT_OF_INTEREST_DESCRIPTION"]=23;values[valuesById[24]="WEB"]=24;values[valuesById[25]="CHANGE_AR"]=25;values[valuesById[26]="WEATHER_DETAIL_CLICK"]=26;values[valuesById[27]="USER_ISSUE_WEATHER_REPORT"]=27;values[valuesById[28]="POKEMON_INVENTORY"]=28;values[valuesById[29]="SOCIAL"]=29;values[valuesById[30]="CHECK_ENCOUNTER_TRAY_INFO"]=30;values[valuesById[31]="POKEMON_GO_PLUS"]=31;values[valuesById[32]="RPC_TIMING"]=32;values[valuesById[33]="SOCIAL_GIFT_COUNT"]=33;values[valuesById[34]="ASSET_BUNDLE_DOWNLOAD"]=34;values[valuesById[35]="ASSET_POI_DOWNLOAD"]=35;values[valuesById[36]="ASSET_STREAM_DOWNLOAD"]=36;values[valuesById[37]="ASSET_STREAM_CACHE_CULLED"]=37;values[valuesById[38]="RPC_SOCKET_TIMING"]=38;values[valuesById[39]="PERMISSIONS_FLOW"]=39;values[valuesById[40]="DEVICE_SERVICE_TOGGLE"]=40;values[valuesById[41]="BOOT_TELEMETRY"]=41;return values}();Enums.AvatarCustomizationTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_AVATAR_CUSTOMIZATION"]=0;values[valuesById[1]="EQUIP_ITEM"]=1;values[valuesById[2]="OPEN_FEATURES"]=2;values[valuesById[3]="OPEN_STORE"]=3;values[valuesById[4]="PURCHASE_ITEM"]=4;values[valuesById[5]="PURCHASE_ERROR"]=5;values[valuesById[6]="SELECT_ITEM_GROUP"]=6;values[valuesById[7]="SELECT_SLOT"]=7;values[valuesById[8]="SELECT_COLOR"]=8;values[valuesById[9]="SHOW_QUICK_SHOP"]=9;return values}();Enums.BattlePartyTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_BATTLE_PARTY_EVENT"]=0;values[valuesById[1]="ADD"]=1;values[valuesById[2]="REMOVE"]=2;values[valuesById[3]="GYM_BATTLE"]=3;values[valuesById[4]="RAID_BATTLE"]=4;values[valuesById[5]="BATTLE_POKEMON_CHANGED"]=5;return values}();Enums.GenericClickTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_GENERIC_EVENT"]=0;values[valuesById[1]="SPEED_WARNING_SHOW"]=1;values[valuesById[2]="SPEED_WARNING_PASSENGER"]=2;return values}();Enums.ItemUseTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_ITEM_EVENT"]=0;values[valuesById[1]="USE_ITEM"]=1;values[valuesById[2]="RECYCLE_ITEM"]=2;return values}();Enums.LoginActionTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_LOGIN_ACTION"]=0;values[valuesById[1]="CLICK_AGE_GATE"]=1;values[valuesById[2]="CLICK_NEW_PLAYER"]=2;values[valuesById[3]="CLICK_EXISTING_PLAYER"]=3;values[valuesById[4]="CLICK_GOOGLE"]=4;values[valuesById[5]="COMPLETE_GOOGLE"]=5;values[valuesById[6]="CANCEL_GOOGLE"]=6;values[valuesById[7]="CLICK_FACEBOOK"]=7;values[valuesById[8]="COMPLETE_FACEBOOK"]=8;values[valuesById[9]="CANCEL_FACEBOOK"]=9;values[valuesById[10]="CLICK_PTC"]=10;values[valuesById[11]="EXIT_PTC"]=11;values[valuesById[12]="CLICK_PTC_REGISTER"]=12;values[valuesById[13]="CLICK_PTC_SIGN_IN"]=13;values[valuesById[14]="CANCEL_PTC_SIGN_IN"]=14;values[valuesById[15]="COMPLETE_PTC_SIGN_IN"]=15;values[valuesById[16]="CLICK_SUPERAWESOME"]=16;values[valuesById[17]="EXIT_SUPERAWESOME"]=17;values[valuesById[18]="CLICK_SUPERAWESOME_REGISTER"]=18;values[valuesById[19]="CLICK_SUPERAWESOME_FORGOT_PASSWORD"]=19;values[valuesById[20]="CLICK_SUPERAWESOME_SIGN_IN"]=20;values[valuesById[21]="CANCEL_SUPERAWESOME_SIGN_IN"]=21;values[valuesById[22]="COMPLETE_SUPERAWESOME_SIGN_IN"]=22;values[valuesById[23]="EXIT_NEW_PLAYER"]=23;values[valuesById[24]="EXIT_EXISTING_PLAYER"]=24;values[valuesById[25]="LOGIN_STARTED"]=25;return values}();Enums.MapEventsTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_MAP_EVENT"]=0;values[valuesById[1]="ITEM_BAG"]=1;values[valuesById[2]="MAIN_MENU"]=2;values[valuesById[3]="POKEDEX"]=3;values[valuesById[4]="PROFILE"]=4;values[valuesById[5]="SETTINGS"]=5;values[valuesById[6]="SHOP_FROM_MAP"]=6;values[valuesById[7]="GYM"]=7;values[valuesById[8]="POKESTOP"]=8;values[valuesById[9]="RESEARCH"]=9;values[valuesById[10]="COMPASS"]=10;values[valuesById[11]="NEARBY"]=11;return values}();Enums.NewsPageTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_NEWS_EVENT"]=0;values[valuesById[1]="NEWS_VIEWED"]=1;values[valuesById[2]="NEWS_DISMISSED"]=2;values[valuesById[3]="NEWS_LINK_CLICKED"]=3;values[valuesById[4]="NEWS_UPDATED_APP"]=4;return values}();Enums.PokemonInventoryTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_POKEMON_INVENTORY_EVENT"]=0;values[valuesById[1]="OPEN"]=1;values[valuesById[2]="SORTING_CHANGE"]=2;values[valuesById[3]="FILTER"]=3;return values}();Enums.ProfilePageTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_PROFILE_PAGE"]=0;values[valuesById[1]="SHOP_FROM_PROFILE"]=1;values[valuesById[2]="LOG"]=2;values[valuesById[3]="SET_BUDDY"]=3;values[valuesById[4]="CUSTOMIZE_AVATAR"]=4;return values}();Enums.PushNotificationTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_PUSH_NOTIFICATION_EVENT"]=0;values[valuesById[1]="OPEN_APP"]=1;return values}();Enums.RaidTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_RAID_EVENT"]=0;values[valuesById[1]="APPROACH_ENTER"]=1;values[valuesById[2]="APPROACH_CLICK_SPINNER"]=2;values[valuesById[3]="APPROACH_JOIN"]=3;values[valuesById[4]="APPROACH_TICKET_CONFIRMATION"]=4;values[valuesById[5]="APPROACH_CLICK_TUTORIAL"]=5;values[valuesById[6]="APPROACH_CLICK_SHOP"]=6;values[valuesById[7]="APPROACH_CLICK_INSPECT"]=7;values[valuesById[8]="LOBBY_ENTER"]=8;values[valuesById[9]="LOBBY_CLICK_INVENTORY"]=9;values[valuesById[10]="LOBBY_CLICK_EXIT"]=10;values[valuesById[11]="LOBBY_TAP_AVATAR"]=11;values[valuesById[12]="LOBBY_CLICK_REJOIN_BATTLE"]=12;values[valuesById[13]="LOBBY_CLICK_LOBBY_PUBLIC"]=13;return values}();Enums.ShoppingPageTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_SHOPPING_PAGE_EVENT"]=0;values[valuesById[1]="CLICK_CUSTOMIZE_AVATAR"]=1;values[valuesById[2]="QUICK_SHOP_MORE"]=2;values[valuesById[3]="QUICK_SHOP_EXCHANGE"]=3;return values}();Enums.SocialTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_SOCIAL"]=0;values[valuesById[1]="FRIEND_TAB"]=1;values[valuesById[2]="NOTIFICATION_TAB"]=2;values[valuesById[3]="FRIEND_PROFILE"]=3;values[valuesById[4]="OPEN_FRIEND_SHIP_LEVEL_DETAIL"]=4;values[valuesById[5]="CLOSE_OPEN_GIFT_CONFIRMATION"]=5;values[valuesById[6]="FRIEND_LIST_SORT_CHANGED"]=6;values[valuesById[7]="FRIEND_LIST_CLOSED"]=7;return values}();Enums.WebTelemetryIds=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED_WEB_EVENT"]=0;values[valuesById[1]="POINT_OF_INTEREST_DESCRIPTION_WEB_CLICK"]=1;return values}();Enums.TutorialState=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="LEGAL_SCREEN"]=0;values[valuesById[1]="AVATAR_SELECTION"]=1;values[valuesById[2]="ACCOUNT_CREATION"]=2;values[valuesById[3]="POKEMON_CAPTURE"]=3;values[valuesById[4]="NAME_SELECTION"]=4;values[valuesById[5]="POKEMON_BERRY"]=5;values[valuesById[6]="USE_ITEM_TUTORIAL_STATE"]=6;values[valuesById[7]="FIRST_TIME_EXPERIENCE_COMPLETE"]=7;values[valuesById[8]="POKESTOP_TUTORIAL"]=8;values[valuesById[9]="GYM_TUTORIAL"]=9;values[valuesById[10]="CHALLENGE_QUEST_TUTORIAL"]=10;values[valuesById[11]="PRIVACY_POLICY_CONFIRMATION"]=11;values[valuesById[12]="TRADING_TUTORIAL"]=12;values[valuesById[13]="POI_SUBMISSION_TUTORIAL"]=13;values[valuesById[14]="V1_START_TUTORIAL"]=14;values[valuesById[15]="V2_START_TUTORIAL"]=15;values[valuesById[16]="V2_CUSTOMIZED_AVATAR"]=16;values[valuesById[17]="V2_CAUGHT_FIRST_WILD"]=17;values[valuesById[18]="V2_FINISHED_TUTORIAL_CATCHES"]=18;values[valuesById[19]="V2_NAME_SELECTION"]=19;values[valuesById[20]="V2_EGG_GIVEN"]=20;values[valuesById[21]="V2_START_EGG_TUTORIAL"]=21;values[valuesById[22]="V2_COMPLETED_EGG_TUTORIAL"]=22;return values}();Enums.UpdateType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ADD_UPDATE_TYPE"]=0;values[valuesById[1]="MODIFY"]=1;values[valuesById[2]="REMOVE_UPDATE_TYPE"]=2;values[valuesById[3]="PREDICTED_MODIFY"]=3;values[valuesById[4]="PREDICTED_REMOVE"]=4;values[valuesById[5]="ROLLED_BACK_MODIFY"]=5;values[valuesById[6]="ROLLED_BACK_REMOVE"]=6;return values}();Enums.VariableName=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_VARIABLE_NAME"]=0;values[valuesById[1]="CODE_NAME"]=1;values[valuesById[2]="TEAM"]=2;values[valuesById[3]="LEVEL"]=3;values[valuesById[4]="EXPERIENCE"]=4;values[valuesById[5]="POKECOIN_BALANCE"]=5;values[valuesById[6]="STARDUST_BALANCE"]=6;values[valuesById[7]="EMAIL"]=7;values[valuesById[8]="LOGIN_METHOD"]=8;values[valuesById[1e3]="GYM_ID"]=1e3;values[valuesById[1001]="GYM_NAME"]=1001;values[valuesById[1002]="POKEMON_DISPLAY"]=1002;values[valuesById[1003]="POKEDEX_ENTRY_NUMBER"]=1003;values[valuesById[1004]="POKEMON_ID"]=1004;values[valuesById[1005]="POKEMON_NICKNAME"]=1005;values[valuesById[1006]="GYM_BADGE_EARNED_POINTS"]=1006;values[valuesById[1007]="GYM_BADGE_PROGRESS"]=1007;values[valuesById[1008]="GYM_BADGE_RANK"]=1008;values[valuesById[1009]="GYM_BADGE_IMAGE_URL"]=1009;values[valuesById[1010]="GYM_BADGE_LEVEL_UP"]=1010;values[valuesById[1011]="POKECOIN_AWARDED"]=1011;values[valuesById[1012]="POKECOIN_AWARDED_TODAY"]=1012;values[valuesById[1013]="MAX_DAILY_POKECOIN"]=1013;values[valuesById[1014]="BATTLES_WON"]=1014;values[valuesById[1015]="BATTLES_LOST"]=1015;values[valuesById[1016]="DEPLOYED_MILLIS"]=1016;values[valuesById[1017]="RAID_SEED"]=1017;values[valuesById[1018]="EXCLUSIVE_RAID_CANCELLATION_INFO"]=1018;values[valuesById[1019]="GIFTBOX_DETAILS"]=1019;values[valuesById[1020]="FRIEND_AVATAR"]=1020;values[valuesById[1021]="FRIEND_TEAM"]=1021;values[valuesById[1022]="FRIEND_CODENAME"]=1022;values[valuesById[1023]="GIFT_LOOT_ITEMS"]=1023;values[valuesById[1024]="GIFT_EGG"]=1024;values[valuesById[1025]="FRIENDSHIP_MILESTONE_REWARD_DETAILS"]=1025;values[valuesById[1026]="FRIENDSHIP_LEVEL_DISPLAY"]=1026;values[valuesById[1027]="BGMODE_BUDDY_POKEMON_NICKNAME"]=1027;values[valuesById[1028]="COMBAT_CHALLENGE"]=1028;values[valuesById[1029]="COMBAT_CHALLENGER_CODENAME"]=1029;values[valuesById[1030]="BGMODE_OFF_SESSION_DISTANCE_KM"]=1030;return values}();Enums.VfxLevel=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NONE_VFX_LEVEL"]=0;values[valuesById[1]="START"]=1;values[valuesById[2]="NICE"]=2;values[valuesById[3]="GREAT"]=3;values[valuesById[4]="EXCELLENT"]=4;return values}();Enums.WeatherCondition=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NONE"]=0;values[valuesById[1]="CLEAR"]=1;values[valuesById[2]="RAINY"]=2;values[valuesById[3]="PARTLY_CLOUDY"]=3;values[valuesById[4]="OVERCAST"]=4;values[valuesById[5]="WINDY"]=5;values[valuesById[6]="SNOW"]=6;values[valuesById[7]="FOG"]=7;return values}();return Enums}();POGOProtos.Inventory=function(){var Inventory={};Inventory.AppliedItem=function(){function AppliedItem(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AppliedItem.prototype.item_id=0;AppliedItem.prototype.item_type=0;AppliedItem.prototype.expire_ms=$util.Long?$util.Long.fromBits(0,0,false):0;AppliedItem.prototype.applied_ms=$util.Long?$util.Long.fromBits(0,0,false):0;AppliedItem.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(8).int32(m.item_id);if(m.item_type!=null&&m.hasOwnProperty("item_type"))w.uint32(16).int32(m.item_type);if(m.expire_ms!=null&&m.hasOwnProperty("expire_ms"))w.uint32(24).int64(m.expire_ms);if(m.applied_ms!=null&&m.hasOwnProperty("applied_ms"))w.uint32(32).int64(m.applied_ms);return w};AppliedItem.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.AppliedItem;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.int32();break;case 2:m.item_type=r.int32();break;case 3:m.expire_ms=r.int64();break;case 4:m.applied_ms=r.int64();break;default:r.skipType(t&7);break}}return m};AppliedItem.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.AppliedItem)return d;var m=new $root.POGOProtos.Inventory.AppliedItem;switch(d.item_id){case"ITEM_UNKNOWN":case 0:m.item_id=0;break;case"ITEM_POKE_BALL":case 1:m.item_id=1;break;case"ITEM_GREAT_BALL":case 2:m.item_id=2;break;case"ITEM_ULTRA_BALL":case 3:m.item_id=3;break;case"ITEM_MASTER_BALL":case 4:m.item_id=4;break;case"ITEM_PREMIER_BALL":case 5:m.item_id=5;break;case"ITEM_POTION":case 101:m.item_id=101;break;case"ITEM_SUPER_POTION":case 102:m.item_id=102;break;case"ITEM_HYPER_POTION":case 103:m.item_id=103;break;case"ITEM_MAX_POTION":case 104:m.item_id=104;break;case"ITEM_REVIVE":case 201:m.item_id=201;break;case"ITEM_MAX_REVIVE":case 202:m.item_id=202;break;case"ITEM_LUCKY_EGG":case 301:m.item_id=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item_id=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item_id=402;break;case"ITEM_INCENSE_COOL":case 403:m.item_id=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item_id=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item_id=405;break;case"ITEM_TROY_DISK":case 501:m.item_id=501;break;case"ITEM_X_ATTACK":case 602:m.item_id=602;break;case"ITEM_X_DEFENSE":case 603:m.item_id=603;break;case"ITEM_X_MIRACLE":case 604:m.item_id=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item_id=701;break;case"ITEM_BLUK_BERRY":case 702:m.item_id=702;break;case"ITEM_NANAB_BERRY":case 703:m.item_id=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item_id=704;break;case"ITEM_PINAP_BERRY":case 705:m.item_id=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item_id=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item_id=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item_id=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item_id=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item_id=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item_id=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item_id=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item_id=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item_id=1002;break;case"ITEM_SUN_STONE":case 1101:m.item_id=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item_id=1102;break;case"ITEM_METAL_COAT":case 1103:m.item_id=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item_id=1104;break;case"ITEM_UP_GRADE":case 1105:m.item_id=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item_id=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item_id=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item_id=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item_id=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item_id=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item_id=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item_id=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item_id=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item_id=1405;break}switch(d.item_type){case"ITEM_TYPE_NONE":case 0:m.item_type=0;break;case"ITEM_TYPE_POKEBALL":case 1:m.item_type=1;break;case"ITEM_TYPE_POTION":case 2:m.item_type=2;break;case"ITEM_TYPE_REVIVE":case 3:m.item_type=3;break;case"ITEM_TYPE_MAP":case 4:m.item_type=4;break;case"ITEM_TYPE_BATTLE":case 5:m.item_type=5;break;case"ITEM_TYPE_FOOD":case 6:m.item_type=6;break;case"ITEM_TYPE_CAMERA":case 7:m.item_type=7;break;case"ITEM_TYPE_DISK":case 8:m.item_type=8;break;case"ITEM_TYPE_INCUBATOR":case 9:m.item_type=9;break;case"ITEM_TYPE_INCENSE":case 10:m.item_type=10;break;case"ITEM_TYPE_XP_BOOST":case 11:m.item_type=11;break;case"ITEM_TYPE_INVENTORY_UPGRADE":case 12:m.item_type=12;break;case"ITEM_TYPE_EVOLUTION_REQUIREMENT":case 13:m.item_type=13;break;case"ITEM_TYPE_MOVE_REROLL":case 14:m.item_type=14;break;case"ITEM_TYPE_CANDY":case 15:m.item_type=15;break;case"ITEM_TYPE_RAID_TICKET":case 16:m.item_type=16;break;case"ITEM_TYPE_STARDUST_BOOST":case 17:m.item_type=17;break;case"ITEM_TYPE_FRIEND_GIFT_BOX":case 18:m.item_type=18;break}if(d.expire_ms!=null){if($util.Long)(m.expire_ms=$util.Long.fromValue(d.expire_ms)).unsigned=false;else if(typeof d.expire_ms==="string")m.expire_ms=parseInt(d.expire_ms,10);else if(typeof d.expire_ms==="number")m.expire_ms=d.expire_ms;else if(typeof d.expire_ms==="object")m.expire_ms=new $util.LongBits(d.expire_ms.low>>>0,d.expire_ms.high>>>0).toNumber()}if(d.applied_ms!=null){if($util.Long)(m.applied_ms=$util.Long.fromValue(d.applied_ms)).unsigned=false;else if(typeof d.applied_ms==="string")m.applied_ms=parseInt(d.applied_ms,10);else if(typeof d.applied_ms==="number")m.applied_ms=d.applied_ms;else if(typeof d.applied_ms==="object")m.applied_ms=new $util.LongBits(d.applied_ms.low>>>0,d.applied_ms.high>>>0).toNumber()}return m};AppliedItem.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id=o.enums===String?"ITEM_UNKNOWN":0;d.item_type=o.enums===String?"ITEM_TYPE_NONE":0;if($util.Long){var n=new $util.Long(0,0,false);d.expire_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.expire_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.applied_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.applied_ms=o.longs===String?"0":0}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item_id]:m.item_id}if(m.item_type!=null&&m.hasOwnProperty("item_type")){d.item_type=o.enums===String?$root.POGOProtos.Inventory.Item.ItemType[m.item_type]:m.item_type}if(m.expire_ms!=null&&m.hasOwnProperty("expire_ms")){if(typeof m.expire_ms==="number")d.expire_ms=o.longs===String?String(m.expire_ms):m.expire_ms;else d.expire_ms=o.longs===String?$util.Long.prototype.toString.call(m.expire_ms):o.longs===Number?new $util.LongBits(m.expire_ms.low>>>0,m.expire_ms.high>>>0).toNumber():m.expire_ms}if(m.applied_ms!=null&&m.hasOwnProperty("applied_ms")){if(typeof m.applied_ms==="number")d.applied_ms=o.longs===String?String(m.applied_ms):m.applied_ms;else d.applied_ms=o.longs===String?$util.Long.prototype.toString.call(m.applied_ms):o.longs===Number?new $util.LongBits(m.applied_ms.low>>>0,m.applied_ms.high>>>0).toNumber():m.applied_ms}return d};AppliedItem.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AppliedItem}();Inventory.AppliedItems=function(){function AppliedItems(p){this.item=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AppliedItems.prototype.item=$util.emptyArray;AppliedItems.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item!=null&&m.item.length){for(var i=0;i<m.item.length;++i)$root.POGOProtos.Inventory.AppliedItem.encode(m.item[i],w.uint32(34).fork()).ldelim()}return w};AppliedItems.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.AppliedItems;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 4:if(!(m.item&&m.item.length))m.item=[];m.item.push($root.POGOProtos.Inventory.AppliedItem.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};AppliedItems.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.AppliedItems)return d;var m=new $root.POGOProtos.Inventory.AppliedItems;if(d.item){if(!Array.isArray(d.item))throw TypeError(".POGOProtos.Inventory.AppliedItems.item: array expected");m.item=[];for(var i=0;i<d.item.length;++i){if(typeof d.item[i]!=="object")throw TypeError(".POGOProtos.Inventory.AppliedItems.item: object expected");m.item[i]=$root.POGOProtos.Inventory.AppliedItem.fromObject(d.item[i])}}return m};AppliedItems.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.item=[]}if(m.item&&m.item.length){d.item=[];for(var j=0;j<m.item.length;++j){d.item[j]=$root.POGOProtos.Inventory.AppliedItem.toObject(m.item[j],o)}}return d};AppliedItems.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AppliedItems}();Inventory.Candy=function(){function Candy(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Candy.prototype.family_id=0;Candy.prototype.candy=0;Candy.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.family_id!=null&&m.hasOwnProperty("family_id"))w.uint32(8).int32(m.family_id);if(m.candy!=null&&m.hasOwnProperty("candy"))w.uint32(16).int32(m.candy);return w};Candy.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.Candy;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.family_id=r.int32();break;case 2:m.candy=r.int32();break;default:r.skipType(t&7);break}}return m};Candy.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.Candy)return d;var m=new $root.POGOProtos.Inventory.Candy;switch(d.family_id){case"FAMILY_UNSET":case 0:m.family_id=0;break;case"FAMILY_BULBASAUR":case 1:m.family_id=1;break;case"FAMILY_CHARMANDER":case 4:m.family_id=4;break;case"FAMILY_SQUIRTLE":case 7:m.family_id=7;break;case"FAMILY_CATERPIE":case 10:m.family_id=10;break;case"FAMILY_WEEDLE":case 13:m.family_id=13;break;case"FAMILY_PIDGEY":case 16:m.family_id=16;break;case"FAMILY_RATTATA":case 19:m.family_id=19;break;case"FAMILY_SPEAROW":case 21:m.family_id=21;break;case"FAMILY_EKANS":case 23:m.family_id=23;break;case"FAMILY_PIKACHU":case 25:m.family_id=25;break;case"FAMILY_SANDSHREW":case 27:m.family_id=27;break;case"FAMILY_NIDORAN_FEMALE":case 29:m.family_id=29;break;case"FAMILY_NIDORAN_MALE":case 32:m.family_id=32;break;case"FAMILY_CLEFAIRY":case 35:m.family_id=35;break;case"FAMILY_VULPIX":case 37:m.family_id=37;break;case"FAMILY_JIGGLYPUFF":case 39:m.family_id=39;break;case"FAMILY_ZUBAT":case 41:m.family_id=41;break;case"FAMILY_ODDISH":case 43:m.family_id=43;break;case"FAMILY_PARAS":case 46:m.family_id=46;break;case"FAMILY_VENONAT":case 48:m.family_id=48;break;case"FAMILY_DIGLETT":case 50:m.family_id=50;break;case"FAMILY_MEOWTH":case 52:m.family_id=52;break;case"FAMILY_PSYDUCK":case 54:m.family_id=54;break;case"FAMILY_MANKEY":case 56:m.family_id=56;break;case"FAMILY_GROWLITHE":case 58:m.family_id=58;break;case"FAMILY_POLIWAG":case 60:m.family_id=60;break;case"FAMILY_ABRA":case 63:m.family_id=63;break;case"FAMILY_MACHOP":case 66:m.family_id=66;break;case"FAMILY_BELLSPROUT":case 69:m.family_id=69;break;case"FAMILY_TENTACOOL":case 72:m.family_id=72;break;case"FAMILY_GEODUDE":case 74:m.family_id=74;break;case"FAMILY_PONYTA":case 77:m.family_id=77;break;case"FAMILY_SLOWPOKE":case 79:m.family_id=79;break;case"FAMILY_MAGNEMITE":case 81:m.family_id=81;break;case"FAMILY_FARFETCHD":case 83:m.family_id=83;break;case"FAMILY_DODUO":case 84:m.family_id=84;break;case"FAMILY_SEEL":case 86:m.family_id=86;break;case"FAMILY_GRIMER":case 88:m.family_id=88;break;case"FAMILY_SHELLDER":case 90:m.family_id=90;break;case"FAMILY_GASTLY":case 92:m.family_id=92;break;case"FAMILY_ONIX":case 95:m.family_id=95;break;case"FAMILY_DROWZEE":case 96:m.family_id=96;break;case"FAMILY_HYPNO":case 97:m.family_id=97;break;case"FAMILY_KRABBY":case 98:m.family_id=98;break;case"FAMILY_VOLTORB":case 100:m.family_id=100;break;case"FAMILY_EXEGGCUTE":case 102:m.family_id=102;break;case"FAMILY_CUBONE":case 104:m.family_id=104;break;case"FAMILY_HITMONLEE":case 106:m.family_id=106;break;case"FAMILY_HITMONCHAN":case 107:m.family_id=107;break;case"FAMILY_LICKITUNG":case 108:m.family_id=108;break;case"FAMILY_KOFFING":case 109:m.family_id=109;break;case"FAMILY_RHYHORN":case 111:m.family_id=111;break;case"FAMILY_CHANSEY":case 113:m.family_id=113;break;case"FAMILY_TANGELA":case 114:m.family_id=114;break;case"FAMILY_KANGASKHAN":case 115:m.family_id=115;break;case"FAMILY_HORSEA":case 116:m.family_id=116;break;case"FAMILY_GOLDEEN":case 118:m.family_id=118;break;case"FAMILY_STARYU":case 120:m.family_id=120;break;case"FAMILY_MR_MIME":case 122:m.family_id=122;break;case"FAMILY_SCYTHER":case 123:m.family_id=123;break;case"FAMILY_JYNX":case 124:m.family_id=124;break;case"FAMILY_ELECTABUZZ":case 125:m.family_id=125;break;case"FAMILY_MAGMAR":case 126:m.family_id=126;break;case"FAMILY_PINSIR":case 127:m.family_id=127;break;case"FAMILY_TAUROS":case 128:m.family_id=128;break;case"FAMILY_MAGIKARP":case 129:m.family_id=129;break;case"FAMILY_LAPRAS":case 131:m.family_id=131;break;case"FAMILY_DITTO":case 132:m.family_id=132;break;case"FAMILY_EEVEE":case 133:m.family_id=133;break;case"FAMILY_PORYGON":case 137:m.family_id=137;break;case"FAMILY_OMANYTE":case 138:m.family_id=138;break;case"FAMILY_KABUTO":case 140:m.family_id=140;break;case"FAMILY_AERODACTYL":case 142:m.family_id=142;break;case"FAMILY_SNORLAX":case 143:m.family_id=143;break;case"FAMILY_ARTICUNO":case 144:m.family_id=144;break;case"FAMILY_ZAPDOS":case 145:m.family_id=145;break;case"FAMILY_MOLTRES":case 146:m.family_id=146;break;case"FAMILY_DRATINI":case 147:m.family_id=147;break;case"FAMILY_MEWTWO":case 150:m.family_id=150;break;case"FAMILY_MEW":case 151:m.family_id=151;break;case"FAMILY_CHIKORITA":case 152:m.family_id=152;break;case"FAMILY_CYNDAQUIL":case 155:m.family_id=155;break;case"FAMILY_TOTODILE":case 158:m.family_id=158;break;case"FAMILY_SENTRET":case 161:m.family_id=161;break;case"FAMILY_HOOTHOOT":case 163:m.family_id=163;break;case"FAMILY_LEDYBA":case 165:m.family_id=165;break;case"FAMILY_SPINARAK":case 167:m.family_id=167;break;case"FAMILY_CHINCHOU":case 170:m.family_id=170;break;case"FAMILY_TOGEPI":case 175:m.family_id=175;break;case"FAMILY_NATU":case 177:m.family_id=177;break;case"FAMILY_MAREEP":case 179:m.family_id=179;break;case"FAMILY_MARILL":case 183:m.family_id=183;break;case"FAMILY_SUDOWOODO":case 185:m.family_id=185;break;case"FAMILY_HOPPIP":case 187:m.family_id=187;break;case"FAMILY_AIPOM":case 190:m.family_id=190;break;case"FAMILY_SUNKERN":case 191:m.family_id=191;break;case"FAMILY_YANMA":case 193:m.family_id=193;break;case"FAMILY_WOOPER":case 194:m.family_id=194;break;case"FAMILY_MURKROW":case 198:m.family_id=198;break;case"FAMILY_MISDREAVUS":case 200:m.family_id=200;break;case"FAMILY_UNOWN":case 201:m.family_id=201;break;case"FAMILY_WOBBUFFET":case 202:m.family_id=202;break;case"FAMILY_GIRAFARIG":case 203:m.family_id=203;break;case"FAMILY_PINECO":case 204:m.family_id=204;break;case"FAMILY_DUNSPARCE":case 206:m.family_id=206;break;case"FAMILY_GLIGAR":case 207:m.family_id=207;break;case"FAMILY_SNUBBULL":case 209:m.family_id=209;break;case"FAMILY_QWILFISH":case 211:m.family_id=211;break;case"FAMILY_SHUCKLE":case 213:m.family_id=213;break;case"FAMILY_HERACROSS":case 214:m.family_id=214;break;case"FAMILY_SNEASEL":case 215:m.family_id=215;break;case"FAMILY_TEDDIURSA":case 216:m.family_id=216;break;case"FAMILY_SLUGMA":case 218:m.family_id=218;break;case"FAMILY_SWINUB":case 220:m.family_id=220;break;case"FAMILY_CORSOLA":case 222:m.family_id=222;break;case"FAMILY_REMORAID":case 223:m.family_id=223;break;case"FAMILY_DELIBIRD":case 225:m.family_id=225;break;case"FAMILY_MANTINE":case 226:m.family_id=226;break;case"FAMILY_SKARMORY":case 227:m.family_id=227;break;case"FAMILY_HOUNDOUR":case 228:m.family_id=228;break;case"FAMILY_PHANPY":case 231:m.family_id=231;break;case"FAMILY_STANTLER":case 234:m.family_id=234;break;case"FAMILY_SMEARGLE":case 235:m.family_id=235;break;case"FAMILY_TYROGUE":case 236:m.family_id=236;break;case"FAMILY_MILTANK":case 241:m.family_id=241;break;case"FAMILY_RAIKOU":case 243:m.family_id=243;break;case"FAMILY_ENTEI":case 244:m.family_id=244;break;case"FAMILY_SUICUNE":case 245:m.family_id=245;break;case"FAMILY_LARVITAR":case 246:m.family_id=246;break;case"FAMILY_LUGIA":case 249:m.family_id=249;break;case"FAMILY_HO_OH":case 250:m.family_id=250;break;case"FAMILY_CELEBI":case 251:m.family_id=251;break;case"FAMILY_TREECKO":case 252:m.family_id=252;break;case"FAMILY_TORCHIC":case 255:m.family_id=255;break;case"FAMILY_MUDKIP":case 258:m.family_id=258;break;case"FAMILY_POOCHYENA":case 261:m.family_id=261;break;case"FAMILY_ZIGZAGOON":case 263:m.family_id=263;break;case"FAMILY_WURMPLE":case 265:m.family_id=265;break;case"FAMILY_LOTAD":case 270:m.family_id=270;break;case"FAMILY_SEEDOT":case 273:m.family_id=273;break;case"FAMILY_TAILLOW":case 276:m.family_id=276;break;case"FAMILY_WINGULL":case 278:m.family_id=278;break;case"FAMILY_RALTS":case 280:m.family_id=280;break;case"FAMILY_SURSKIT":case 283:m.family_id=283;break;case"FAMILY_SHROOMISH":case 285:m.family_id=285;break;case"FAMILY_SLAKOTH":case 287:m.family_id=287;break;case"FAMILY_NINCADA":case 290:m.family_id=290;break;case"FAMILY_WHISMUR":case 293:m.family_id=293;break;case"FAMILY_MAKUHITA":case 296:m.family_id=296;break;case"FAMILY_NOSEPASS":case 299:m.family_id=299;break;case"FAMILY_SKITTY":case 300:m.family_id=300;break;case"FAMILY_SABLEYE":case 302:m.family_id=302;break;case"FAMILY_MAWILE":case 303:m.family_id=303;break;case"FAMILY_ARON":case 304:m.family_id=304;break;case"FAMILY_MEDITITE":case 307:m.family_id=307;break;case"FAMILY_ELECTRIKE":case 309:m.family_id=309;break;case"FAMILY_PLUSLE":case 311:m.family_id=311;break;case"FAMILY_MINUN":case 312:m.family_id=312;break;case"FAMILY_VOLBEAT":case 313:m.family_id=313;break;case"FAMILY_ILLUMISE":case 314:m.family_id=314;break;case"FAMILY_ROSELIA":case 315:m.family_id=315;break;case"FAMILY_GULPIN":case 316:m.family_id=316;break;case"FAMILY_CARVANHA":case 318:m.family_id=318;break;case"FAMILY_WAILMER":case 320:m.family_id=320;break;case"FAMILY_NUMEL":case 322:m.family_id=322;break;case"FAMILY_TORKOAL":case 324:m.family_id=324;break;case"FAMILY_SPOINK":case 325:m.family_id=325;break;case"FAMILY_SPINDA":case 327:m.family_id=327;break;case"FAMILY_TRAPINCH":case 328:m.family_id=328;break;case"FAMILY_CACNEA":case 331:m.family_id=331;break;case"FAMILY_SWABLU":case 333:m.family_id=333;break;case"FAMILY_ZANGOOSE":case 335:m.family_id=335;break;case"FAMILY_SEVIPER":case 336:m.family_id=336;break;case"FAMILY_LUNATONE":case 337:m.family_id=337;break;case"FAMILY_SOLROCK":case 338:m.family_id=338;break;case"FAMILY_BARBOACH":case 339:m.family_id=339;break;case"FAMILY_CORPHISH":case 341:m.family_id=341;break;case"FAMILY_BALTOY":case 343:m.family_id=343;break;case"FAMILY_LILEEP":case 345:m.family_id=345;break;case"FAMILY_ANORITH":case 347:m.family_id=347;break;case"FAMILY_FEEBAS":case 349:m.family_id=349;break;case"FAMILY_CASTFORM":case 351:m.family_id=351;break;case"FAMILY_KECLEON":case 352:m.family_id=352;break;case"FAMILY_SHUPPET":case 353:m.family_id=353;break;case"FAMILY_DUSKULL":case 355:m.family_id=355;break;case"FAMILY_TROPIUS":case 357:m.family_id=357;break;case"FAMILY_CHIMECHO":case 358:m.family_id=358;break;case"FAMILY_ABSOL":case 359:m.family_id=359;break;case"FAMILY_SNORUNT":case 361:m.family_id=361;break;case"FAMILY_SPHEAL":case 363:m.family_id=363;break;case"FAMILY_CLAMPERL":case 366:m.family_id=366;break;case"FAMILY_RELICANTH":case 369:m.family_id=369;break;case"FAMILY_LUVDISC":case 370:m.family_id=370;break;case"FAMILY_BAGON":case 371:m.family_id=371;break;case"FAMILY_BELDUM":case 374:m.family_id=374;break;case"FAMILY_REGIROCK":case 377:m.family_id=377;break;case"FAMILY_REGICE":case 378:m.family_id=378;break;case"FAMILY_REGISTEEL":case 379:m.family_id=379;break;case"FAMILY_LATIAS":case 380:m.family_id=380;break;case"FAMILY_LATIOS":case 381:m.family_id=381;break;case"FAMILY_KYOGRE":case 382:m.family_id=382;break;case"FAMILY_GROUDON":case 383:m.family_id=383;break;case"FAMILY_RAYQUAZA":case 384:m.family_id=384;break;case"FAMILY_JIRACHI":case 385:m.family_id=385;break;case"FAMILY_DEOXYS":case 386:m.family_id=386;break;case"FAMILY_TURTWIG":case 387:m.family_id=387;break;case"FAMILY_CHIMCHAR":case 390:m.family_id=390;break;case"FAMILY_PIPLUP":case 393:m.family_id=393;break;case"FAMILY_STARLY":case 396:m.family_id=396;break;case"FAMILY_BIDOOF":case 399:m.family_id=399;break;case"FAMILY_KRICKETOT":case 401:m.family_id=401;break;case"FAMILY_SHINX":case 403:m.family_id=403;break;case"FAMILY_CRANIDOS":case 408:m.family_id=408;break;case"FAMILY_SHIELDON":case 410:m.family_id=410;break;case"FAMILY_BURMY":case 412:m.family_id=412;break;case"FAMILY_COMBEE":case 415:m.family_id=415;break;case"FAMILY_PACHIRISU":case 417:m.family_id=417;break;case"FAMILY_BUIZEL":case 418:m.family_id=418;break;case"FAMILY_CHERUBI":case 420:m.family_id=420;break;case"FAMILY_SHELLOS":case 422:m.family_id=422;break;case"FAMILY_DRIFLOON":case 425:m.family_id=425;break;case"FAMILY_BUNEARY":case 427:m.family_id=427;break;case"FAMILY_GLAMEOW":case 431:m.family_id=431;break;case"FAMILY_STUNKY":case 434:m.family_id=434;break;case"FAMILY_BRONZOR":case 436:m.family_id=436;break;case"FAMILY_CHATOT":case 441:m.family_id=441;break;case"FAMILY_SPIRITOMB":case 442:m.family_id=442;break;case"FAMILY_GIBLE":case 443:m.family_id=443;break;case"FAMILY_LUCARIO":case 448:m.family_id=448;break;case"FAMILY_HIPPOPOTAS":case 449:m.family_id=449;break;case"FAMILY_SKORUPI":case 451:m.family_id=451;break;case"FAMILY_CROAGUNK":case 453:m.family_id=453;break;case"FAMILY_CARNIVINE":case 455:m.family_id=455;break;case"FAMILY_FINNEON":case 456:m.family_id=456;break;case"FAMILY_SNOVER":case 459:m.family_id=459;break;case"FAMILY_ROTOM":case 479:m.family_id=479;break;case"FAMILY_UXIE":case 480:m.family_id=480;break;case"FAMILY_MESPRIT":case 481:m.family_id=481;break;case"FAMILY_AZELF":case 482:m.family_id=482;break;case"FAMILY_DIALGA":case 483:m.family_id=483;break;case"FAMILY_PALKIA":case 484:m.family_id=484;break;case"FAMILY_HEATRAN":case 485:m.family_id=485;break;case"FAMILY_REGIGIGAS":case 486:m.family_id=486;break;case"FAMILY_GIRATINA":case 487:m.family_id=487;break;case"FAMILY_CRESSELIA":case 488:m.family_id=488;break;case"FAMILY_PHIONE":case 489:m.family_id=489;break;case"FAMILY_MANAPHY":case 490:m.family_id=490;break;case"FAMILY_DARKRAI":case 491:m.family_id=491;break;case"FAMILY_SHAYMIN":case 492:m.family_id=492;break;case"FAMILY_ARCEUS":case 493:m.family_id=493;break;case"FAMILY_MELTAN":case 808:m.family_id=808;break}if(d.candy!=null){m.candy=d.candy|0}return m};Candy.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.family_id=o.enums===String?"FAMILY_UNSET":0;d.candy=0}if(m.family_id!=null&&m.hasOwnProperty("family_id")){d.family_id=o.enums===String?$root.POGOProtos.Enums.PokemonFamilyId[m.family_id]:m.family_id}if(m.candy!=null&&m.hasOwnProperty("candy")){d.candy=m.candy}return d};Candy.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Candy}();Inventory.EggIncubator=function(){function EggIncubator(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EggIncubator.prototype.id="";EggIncubator.prototype.item_id=0;EggIncubator.prototype.incubator_type=0;EggIncubator.prototype.uses_remaining=0;EggIncubator.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,true):0;EggIncubator.prototype.start_km_walked=0;EggIncubator.prototype.target_km_walked=0;EggIncubator.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.id!=null&&m.hasOwnProperty("id"))w.uint32(10).string(m.id);if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(16).int32(m.item_id);if(m.incubator_type!=null&&m.hasOwnProperty("incubator_type"))w.uint32(24).int32(m.incubator_type);if(m.uses_remaining!=null&&m.hasOwnProperty("uses_remaining"))w.uint32(32).int32(m.uses_remaining);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(40).uint64(m.pokemon_id);if(m.start_km_walked!=null&&m.hasOwnProperty("start_km_walked"))w.uint32(49).double(m.start_km_walked);if(m.target_km_walked!=null&&m.hasOwnProperty("target_km_walked"))w.uint32(57).double(m.target_km_walked);return w};EggIncubator.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.EggIncubator;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.id=r.string();break;case 2:m.item_id=r.int32();break;case 3:m.incubator_type=r.int32();break;case 4:m.uses_remaining=r.int32();break;case 5:m.pokemon_id=r.uint64();break;case 6:m.start_km_walked=r.double();break;case 7:m.target_km_walked=r.double();break;default:r.skipType(t&7);break}}return m};EggIncubator.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.EggIncubator)return d;var m=new $root.POGOProtos.Inventory.EggIncubator;if(d.id!=null){m.id=String(d.id)}switch(d.item_id){case"ITEM_UNKNOWN":case 0:m.item_id=0;break;case"ITEM_POKE_BALL":case 1:m.item_id=1;break;case"ITEM_GREAT_BALL":case 2:m.item_id=2;break;case"ITEM_ULTRA_BALL":case 3:m.item_id=3;break;case"ITEM_MASTER_BALL":case 4:m.item_id=4;break;case"ITEM_PREMIER_BALL":case 5:m.item_id=5;break;case"ITEM_POTION":case 101:m.item_id=101;break;case"ITEM_SUPER_POTION":case 102:m.item_id=102;break;case"ITEM_HYPER_POTION":case 103:m.item_id=103;break;case"ITEM_MAX_POTION":case 104:m.item_id=104;break;case"ITEM_REVIVE":case 201:m.item_id=201;break;case"ITEM_MAX_REVIVE":case 202:m.item_id=202;break;case"ITEM_LUCKY_EGG":case 301:m.item_id=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item_id=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item_id=402;break;case"ITEM_INCENSE_COOL":case 403:m.item_id=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item_id=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item_id=405;break;case"ITEM_TROY_DISK":case 501:m.item_id=501;break;case"ITEM_X_ATTACK":case 602:m.item_id=602;break;case"ITEM_X_DEFENSE":case 603:m.item_id=603;break;case"ITEM_X_MIRACLE":case 604:m.item_id=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item_id=701;break;case"ITEM_BLUK_BERRY":case 702:m.item_id=702;break;case"ITEM_NANAB_BERRY":case 703:m.item_id=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item_id=704;break;case"ITEM_PINAP_BERRY":case 705:m.item_id=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item_id=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item_id=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item_id=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item_id=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item_id=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item_id=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item_id=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item_id=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item_id=1002;break;case"ITEM_SUN_STONE":case 1101:m.item_id=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item_id=1102;break;case"ITEM_METAL_COAT":case 1103:m.item_id=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item_id=1104;break;case"ITEM_UP_GRADE":case 1105:m.item_id=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item_id=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item_id=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item_id=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item_id=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item_id=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item_id=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item_id=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item_id=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item_id=1405;break}switch(d.incubator_type){case"INCUBATOR_UNSET":case 0:m.incubator_type=0;break;case"INCUBATOR_DISTANCE":case 1:m.incubator_type=1;break}if(d.uses_remaining!=null){m.uses_remaining=d.uses_remaining|0}if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=true;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber(true)}if(d.start_km_walked!=null){m.start_km_walked=Number(d.start_km_walked)}if(d.target_km_walked!=null){m.target_km_walked=Number(d.target_km_walked)}return m};EggIncubator.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.id="";d.item_id=o.enums===String?"ITEM_UNKNOWN":0;d.incubator_type=o.enums===String?"INCUBATOR_UNSET":0;d.uses_remaining=0;if($util.Long){var n=new $util.Long(0,0,true);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0;d.start_km_walked=0;d.target_km_walked=0}if(m.id!=null&&m.hasOwnProperty("id")){d.id=m.id}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item_id]:m.item_id}if(m.incubator_type!=null&&m.hasOwnProperty("incubator_type")){d.incubator_type=o.enums===String?$root.POGOProtos.Inventory.EggIncubatorType[m.incubator_type]:m.incubator_type}if(m.uses_remaining!=null&&m.hasOwnProperty("uses_remaining")){d.uses_remaining=m.uses_remaining}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber(true):m.pokemon_id}if(m.start_km_walked!=null&&m.hasOwnProperty("start_km_walked")){d.start_km_walked=o.json&&!isFinite(m.start_km_walked)?String(m.start_km_walked):m.start_km_walked}if(m.target_km_walked!=null&&m.hasOwnProperty("target_km_walked")){d.target_km_walked=o.json&&!isFinite(m.target_km_walked)?String(m.target_km_walked):m.target_km_walked}return d};EggIncubator.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EggIncubator}();Inventory.EggIncubators=function(){function EggIncubators(p){this.egg_incubator=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EggIncubators.prototype.egg_incubator=$util.emptyArray;EggIncubators.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.egg_incubator!=null&&m.egg_incubator.length){for(var i=0;i<m.egg_incubator.length;++i)$root.POGOProtos.Inventory.EggIncubator.encode(m.egg_incubator[i],w.uint32(10).fork()).ldelim()}return w};EggIncubators.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.EggIncubators;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.egg_incubator&&m.egg_incubator.length))m.egg_incubator=[];m.egg_incubator.push($root.POGOProtos.Inventory.EggIncubator.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};EggIncubators.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.EggIncubators)return d;var m=new $root.POGOProtos.Inventory.EggIncubators;if(d.egg_incubator){if(!Array.isArray(d.egg_incubator))throw TypeError(".POGOProtos.Inventory.EggIncubators.egg_incubator: array expected");m.egg_incubator=[];for(var i=0;i<d.egg_incubator.length;++i){if(typeof d.egg_incubator[i]!=="object")throw TypeError(".POGOProtos.Inventory.EggIncubators.egg_incubator: object expected");m.egg_incubator[i]=$root.POGOProtos.Inventory.EggIncubator.fromObject(d.egg_incubator[i])}}return m};EggIncubators.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.egg_incubator=[]}if(m.egg_incubator&&m.egg_incubator.length){d.egg_incubator=[];for(var j=0;j<m.egg_incubator.length;++j){d.egg_incubator[j]=$root.POGOProtos.Inventory.EggIncubator.toObject(m.egg_incubator[j],o)}}return d};EggIncubators.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EggIncubators}();Inventory.EggIncubatorType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="INCUBATOR_UNSET"]=0;values[valuesById[1]="INCUBATOR_DISTANCE"]=1;return values}();Inventory.ExclusiveTicketInfo=function(){function ExclusiveTicketInfo(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ExclusiveTicketInfo.prototype.raid_seed=$util.Long?$util.Long.fromBits(0,0,false):0;ExclusiveTicketInfo.prototype.fort_id="";ExclusiveTicketInfo.prototype.start_time_ms=$util.Long?$util.Long.fromBits(0,0,false):0;ExclusiveTicketInfo.prototype.end_time_ms=$util.Long?$util.Long.fromBits(0,0,false):0;ExclusiveTicketInfo.prototype.image_url="";ExclusiveTicketInfo.prototype.latitude=0;ExclusiveTicketInfo.prototype.longitude=0;ExclusiveTicketInfo.prototype.gym_name="";ExclusiveTicketInfo.prototype.spawn_time_ms=$util.Long?$util.Long.fromBits(0,0,false):0;ExclusiveTicketInfo.prototype.is_cancelled=false;ExclusiveTicketInfo.prototype.raid_pokemon=null;ExclusiveTicketInfo.prototype.inviter=null;ExclusiveTicketInfo.prototype.invitee=null;ExclusiveTicketInfo.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed"))w.uint32(8).int64(m.raid_seed);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(18).string(m.fort_id);if(m.start_time_ms!=null&&m.hasOwnProperty("start_time_ms"))w.uint32(32).int64(m.start_time_ms);if(m.end_time_ms!=null&&m.hasOwnProperty("end_time_ms"))w.uint32(40).int64(m.end_time_ms);if(m.image_url!=null&&m.hasOwnProperty("image_url"))w.uint32(50).string(m.image_url);if(m.latitude!=null&&m.hasOwnProperty("latitude"))w.uint32(57).double(m.latitude);if(m.longitude!=null&&m.hasOwnProperty("longitude"))w.uint32(65).double(m.longitude);if(m.gym_name!=null&&m.hasOwnProperty("gym_name"))w.uint32(74).string(m.gym_name);if(m.spawn_time_ms!=null&&m.hasOwnProperty("spawn_time_ms"))w.uint32(80).int64(m.spawn_time_ms);if(m.is_cancelled!=null&&m.hasOwnProperty("is_cancelled"))w.uint32(88).bool(m.is_cancelled);if(m.raid_pokemon!=null&&m.hasOwnProperty("raid_pokemon"))$root.POGOProtos.Data.PokemonData.encode(m.raid_pokemon,w.uint32(98).fork()).ldelim();if(m.inviter!=null&&m.hasOwnProperty("inviter"))$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.encode(m.inviter,w.uint32(106).fork()).ldelim();if(m.invitee!=null&&m.hasOwnProperty("invitee"))$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.encode(m.invitee,w.uint32(114).fork()).ldelim();return w};ExclusiveTicketInfo.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.ExclusiveTicketInfo;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.raid_seed=r.int64();break;case 2:m.fort_id=r.string();break;case 4:m.start_time_ms=r.int64();break;case 5:m.end_time_ms=r.int64();break;case 6:m.image_url=r.string();break;case 7:m.latitude=r.double();break;case 8:m.longitude=r.double();break;case 9:m.gym_name=r.string();break;case 10:m.spawn_time_ms=r.int64();break;case 11:m.is_cancelled=r.bool();break;case 12:m.raid_pokemon=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 13:m.inviter=$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.decode(r,r.uint32());break;case 14:m.invitee=$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};ExclusiveTicketInfo.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.ExclusiveTicketInfo)return d;var m=new $root.POGOProtos.Inventory.ExclusiveTicketInfo;if(d.raid_seed!=null){if($util.Long)(m.raid_seed=$util.Long.fromValue(d.raid_seed)).unsigned=false;else if(typeof d.raid_seed==="string")m.raid_seed=parseInt(d.raid_seed,10);else if(typeof d.raid_seed==="number")m.raid_seed=d.raid_seed;else if(typeof d.raid_seed==="object")m.raid_seed=new $util.LongBits(d.raid_seed.low>>>0,d.raid_seed.high>>>0).toNumber()}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.start_time_ms!=null){if($util.Long)(m.start_time_ms=$util.Long.fromValue(d.start_time_ms)).unsigned=false;else if(typeof d.start_time_ms==="string")m.start_time_ms=parseInt(d.start_time_ms,10);else if(typeof d.start_time_ms==="number")m.start_time_ms=d.start_time_ms;else if(typeof d.start_time_ms==="object")m.start_time_ms=new $util.LongBits(d.start_time_ms.low>>>0,d.start_time_ms.high>>>0).toNumber()}if(d.end_time_ms!=null){if($util.Long)(m.end_time_ms=$util.Long.fromValue(d.end_time_ms)).unsigned=false;else if(typeof d.end_time_ms==="string")m.end_time_ms=parseInt(d.end_time_ms,10);else if(typeof d.end_time_ms==="number")m.end_time_ms=d.end_time_ms;else if(typeof d.end_time_ms==="object")m.end_time_ms=new $util.LongBits(d.end_time_ms.low>>>0,d.end_time_ms.high>>>0).toNumber()}if(d.image_url!=null){m.image_url=String(d.image_url)}if(d.latitude!=null){m.latitude=Number(d.latitude)}if(d.longitude!=null){m.longitude=Number(d.longitude)}if(d.gym_name!=null){m.gym_name=String(d.gym_name)}if(d.spawn_time_ms!=null){if($util.Long)(m.spawn_time_ms=$util.Long.fromValue(d.spawn_time_ms)).unsigned=false;else if(typeof d.spawn_time_ms==="string")m.spawn_time_ms=parseInt(d.spawn_time_ms,10);else if(typeof d.spawn_time_ms==="number")m.spawn_time_ms=d.spawn_time_ms;else if(typeof d.spawn_time_ms==="object")m.spawn_time_ms=new $util.LongBits(d.spawn_time_ms.low>>>0,d.spawn_time_ms.high>>>0).toNumber()}if(d.is_cancelled!=null){m.is_cancelled=Boolean(d.is_cancelled)}if(d.raid_pokemon!=null){if(typeof d.raid_pokemon!=="object")throw TypeError(".POGOProtos.Inventory.ExclusiveTicketInfo.raid_pokemon: object expected");m.raid_pokemon=$root.POGOProtos.Data.PokemonData.fromObject(d.raid_pokemon)}if(d.inviter!=null){if(typeof d.inviter!=="object")throw TypeError(".POGOProtos.Inventory.ExclusiveTicketInfo.inviter: object expected");m.inviter=$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.fromObject(d.inviter)}if(d.invitee!=null){if(typeof d.invitee!=="object")throw TypeError(".POGOProtos.Inventory.ExclusiveTicketInfo.invitee: object expected");m.invitee=$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.fromObject(d.invitee)}return m};ExclusiveTicketInfo.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.raid_seed=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_seed=o.longs===String?"0":0;d.fort_id="";if($util.Long){var n=new $util.Long(0,0,false);d.start_time_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.start_time_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.end_time_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.end_time_ms=o.longs===String?"0":0;d.image_url="";d.latitude=0;d.longitude=0;d.gym_name="";if($util.Long){var n=new $util.Long(0,0,false);d.spawn_time_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.spawn_time_ms=o.longs===String?"0":0;d.is_cancelled=false;d.raid_pokemon=null;d.inviter=null;d.invitee=null}if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed")){if(typeof m.raid_seed==="number")d.raid_seed=o.longs===String?String(m.raid_seed):m.raid_seed;else d.raid_seed=o.longs===String?$util.Long.prototype.toString.call(m.raid_seed):o.longs===Number?new $util.LongBits(m.raid_seed.low>>>0,m.raid_seed.high>>>0).toNumber():m.raid_seed}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.start_time_ms!=null&&m.hasOwnProperty("start_time_ms")){if(typeof m.start_time_ms==="number")d.start_time_ms=o.longs===String?String(m.start_time_ms):m.start_time_ms;else d.start_time_ms=o.longs===String?$util.Long.prototype.toString.call(m.start_time_ms):o.longs===Number?new $util.LongBits(m.start_time_ms.low>>>0,m.start_time_ms.high>>>0).toNumber():m.start_time_ms}if(m.end_time_ms!=null&&m.hasOwnProperty("end_time_ms")){if(typeof m.end_time_ms==="number")d.end_time_ms=o.longs===String?String(m.end_time_ms):m.end_time_ms;else d.end_time_ms=o.longs===String?$util.Long.prototype.toString.call(m.end_time_ms):o.longs===Number?new $util.LongBits(m.end_time_ms.low>>>0,m.end_time_ms.high>>>0).toNumber():m.end_time_ms}if(m.image_url!=null&&m.hasOwnProperty("image_url")){d.image_url=m.image_url}if(m.latitude!=null&&m.hasOwnProperty("latitude")){d.latitude=o.json&&!isFinite(m.latitude)?String(m.latitude):m.latitude}if(m.longitude!=null&&m.hasOwnProperty("longitude")){d.longitude=o.json&&!isFinite(m.longitude)?String(m.longitude):m.longitude}if(m.gym_name!=null&&m.hasOwnProperty("gym_name")){d.gym_name=m.gym_name}if(m.spawn_time_ms!=null&&m.hasOwnProperty("spawn_time_ms")){if(typeof m.spawn_time_ms==="number")d.spawn_time_ms=o.longs===String?String(m.spawn_time_ms):m.spawn_time_ms;else d.spawn_time_ms=o.longs===String?$util.Long.prototype.toString.call(m.spawn_time_ms):o.longs===Number?new $util.LongBits(m.spawn_time_ms.low>>>0,m.spawn_time_ms.high>>>0).toNumber():m.spawn_time_ms}if(m.is_cancelled!=null&&m.hasOwnProperty("is_cancelled")){d.is_cancelled=m.is_cancelled}if(m.raid_pokemon!=null&&m.hasOwnProperty("raid_pokemon")){d.raid_pokemon=$root.POGOProtos.Data.PokemonData.toObject(m.raid_pokemon,o)}if(m.inviter!=null&&m.hasOwnProperty("inviter")){d.inviter=$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.toObject(m.inviter,o)}if(m.invitee!=null&&m.hasOwnProperty("invitee")){d.invitee=$root.POGOProtos.Data.Raid.SharedExclusiveTicketTrainerInfo.toObject(m.invitee,o)}return d};ExclusiveTicketInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ExclusiveTicketInfo}();Inventory.InventoryDelta=function(){function InventoryDelta(p){this.inventory_items=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}InventoryDelta.prototype.original_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;InventoryDelta.prototype.new_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;InventoryDelta.prototype.inventory_items=$util.emptyArray;InventoryDelta.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.original_timestamp_ms!=null&&m.hasOwnProperty("original_timestamp_ms"))w.uint32(8).int64(m.original_timestamp_ms);if(m.new_timestamp_ms!=null&&m.hasOwnProperty("new_timestamp_ms"))w.uint32(16).int64(m.new_timestamp_ms);if(m.inventory_items!=null&&m.inventory_items.length){for(var i=0;i<m.inventory_items.length;++i)$root.POGOProtos.Inventory.InventoryItem.encode(m.inventory_items[i],w.uint32(26).fork()).ldelim()}return w};InventoryDelta.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.InventoryDelta;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.original_timestamp_ms=r.int64();break;case 2:m.new_timestamp_ms=r.int64();break;case 3:if(!(m.inventory_items&&m.inventory_items.length))m.inventory_items=[];m.inventory_items.push($root.POGOProtos.Inventory.InventoryItem.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};InventoryDelta.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.InventoryDelta)return d;var m=new $root.POGOProtos.Inventory.InventoryDelta;if(d.original_timestamp_ms!=null){if($util.Long)(m.original_timestamp_ms=$util.Long.fromValue(d.original_timestamp_ms)).unsigned=false;else if(typeof d.original_timestamp_ms==="string")m.original_timestamp_ms=parseInt(d.original_timestamp_ms,10);else if(typeof d.original_timestamp_ms==="number")m.original_timestamp_ms=d.original_timestamp_ms;else if(typeof d.original_timestamp_ms==="object")m.original_timestamp_ms=new $util.LongBits(d.original_timestamp_ms.low>>>0,d.original_timestamp_ms.high>>>0).toNumber()}if(d.new_timestamp_ms!=null){if($util.Long)(m.new_timestamp_ms=$util.Long.fromValue(d.new_timestamp_ms)).unsigned=false;else if(typeof d.new_timestamp_ms==="string")m.new_timestamp_ms=parseInt(d.new_timestamp_ms,10);else if(typeof d.new_timestamp_ms==="number")m.new_timestamp_ms=d.new_timestamp_ms;else if(typeof d.new_timestamp_ms==="object")m.new_timestamp_ms=new $util.LongBits(d.new_timestamp_ms.low>>>0,d.new_timestamp_ms.high>>>0).toNumber()}if(d.inventory_items){if(!Array.isArray(d.inventory_items))throw TypeError(".POGOProtos.Inventory.InventoryDelta.inventory_items: array expected");m.inventory_items=[];for(var i=0;i<d.inventory_items.length;++i){if(typeof d.inventory_items[i]!=="object")throw TypeError(".POGOProtos.Inventory.InventoryDelta.inventory_items: object expected");m.inventory_items[i]=$root.POGOProtos.Inventory.InventoryItem.fromObject(d.inventory_items[i])}}return m};InventoryDelta.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.inventory_items=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.original_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.original_timestamp_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.new_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.new_timestamp_ms=o.longs===String?"0":0}if(m.original_timestamp_ms!=null&&m.hasOwnProperty("original_timestamp_ms")){if(typeof m.original_timestamp_ms==="number")d.original_timestamp_ms=o.longs===String?String(m.original_timestamp_ms):m.original_timestamp_ms;else d.original_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.original_timestamp_ms):o.longs===Number?new $util.LongBits(m.original_timestamp_ms.low>>>0,m.original_timestamp_ms.high>>>0).toNumber():m.original_timestamp_ms}if(m.new_timestamp_ms!=null&&m.hasOwnProperty("new_timestamp_ms")){if(typeof m.new_timestamp_ms==="number")d.new_timestamp_ms=o.longs===String?String(m.new_timestamp_ms):m.new_timestamp_ms;else d.new_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.new_timestamp_ms):o.longs===Number?new $util.LongBits(m.new_timestamp_ms.low>>>0,m.new_timestamp_ms.high>>>0).toNumber():m.new_timestamp_ms}if(m.inventory_items&&m.inventory_items.length){d.inventory_items=[];for(var j=0;j<m.inventory_items.length;++j){d.inventory_items[j]=$root.POGOProtos.Inventory.InventoryItem.toObject(m.inventory_items[j],o)}}return d};InventoryDelta.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return InventoryDelta}();Inventory.InventoryItem=function(){function InventoryItem(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}InventoryItem.prototype.modified_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;InventoryItem.prototype.deleted_item=null;InventoryItem.prototype.inventory_item_data=null;var $oneOfFields;Object.defineProperty(InventoryItem.prototype,"InventoryItem",{get:$util.oneOfGetter($oneOfFields=["deleted_item","inventory_item_data"]),set:$util.oneOfSetter($oneOfFields)});InventoryItem.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.modified_timestamp_ms!=null&&m.hasOwnProperty("modified_timestamp_ms"))w.uint32(8).int64(m.modified_timestamp_ms);if(m.deleted_item!=null&&m.hasOwnProperty("deleted_item"))$root.POGOProtos.Inventory.InventoryItem.DeletedItem.encode(m.deleted_item,w.uint32(18).fork()).ldelim();if(m.inventory_item_data!=null&&m.hasOwnProperty("inventory_item_data"))$root.POGOProtos.Inventory.InventoryItemData.encode(m.inventory_item_data,w.uint32(26).fork()).ldelim();return w};InventoryItem.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.InventoryItem;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.modified_timestamp_ms=r.int64();break;case 2:m.deleted_item=$root.POGOProtos.Inventory.InventoryItem.DeletedItem.decode(r,r.uint32());break;case 3:m.inventory_item_data=$root.POGOProtos.Inventory.InventoryItemData.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};InventoryItem.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.InventoryItem)return d;var m=new $root.POGOProtos.Inventory.InventoryItem;if(d.modified_timestamp_ms!=null){if($util.Long)(m.modified_timestamp_ms=$util.Long.fromValue(d.modified_timestamp_ms)).unsigned=false;else if(typeof d.modified_timestamp_ms==="string")m.modified_timestamp_ms=parseInt(d.modified_timestamp_ms,10);else if(typeof d.modified_timestamp_ms==="number")m.modified_timestamp_ms=d.modified_timestamp_ms;else if(typeof d.modified_timestamp_ms==="object")m.modified_timestamp_ms=new $util.LongBits(d.modified_timestamp_ms.low>>>0,d.modified_timestamp_ms.high>>>0).toNumber()}if(d.deleted_item!=null){if(typeof d.deleted_item!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItem.deleted_item: object expected");m.deleted_item=$root.POGOProtos.Inventory.InventoryItem.DeletedItem.fromObject(d.deleted_item)}if(d.inventory_item_data!=null){if(typeof d.inventory_item_data!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItem.inventory_item_data: object expected");m.inventory_item_data=$root.POGOProtos.Inventory.InventoryItemData.fromObject(d.inventory_item_data)}return m};InventoryItem.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.modified_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.modified_timestamp_ms=o.longs===String?"0":0}if(m.modified_timestamp_ms!=null&&m.hasOwnProperty("modified_timestamp_ms")){if(typeof m.modified_timestamp_ms==="number")d.modified_timestamp_ms=o.longs===String?String(m.modified_timestamp_ms):m.modified_timestamp_ms;else d.modified_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.modified_timestamp_ms):o.longs===Number?new $util.LongBits(m.modified_timestamp_ms.low>>>0,m.modified_timestamp_ms.high>>>0).toNumber():m.modified_timestamp_ms}if(m.deleted_item!=null&&m.hasOwnProperty("deleted_item")){d.deleted_item=$root.POGOProtos.Inventory.InventoryItem.DeletedItem.toObject(m.deleted_item,o);if(o.oneofs)d.InventoryItem="deleted_item"}if(m.inventory_item_data!=null&&m.hasOwnProperty("inventory_item_data")){d.inventory_item_data=$root.POGOProtos.Inventory.InventoryItemData.toObject(m.inventory_item_data,o);if(o.oneofs)d.InventoryItem="inventory_item_data"}return d};InventoryItem.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};InventoryItem.DeletedItem=function(){function DeletedItem(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DeletedItem.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;DeletedItem.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(9).fixed64(m.pokemon_id);return w};DeletedItem.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.InventoryItem.DeletedItem;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.fixed64();break;default:r.skipType(t&7);break}}return m};DeletedItem.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.InventoryItem.DeletedItem)return d;var m=new $root.POGOProtos.Inventory.InventoryItem.DeletedItem;if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}return m};DeletedItem.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}return d};DeletedItem.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DeletedItem}();return InventoryItem}();Inventory.InventoryItemData=function(){function InventoryItemData(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}InventoryItemData.prototype.pokemon_data=null;InventoryItemData.prototype.item=null;InventoryItemData.prototype.pokedex_entry=null;InventoryItemData.prototype.player_stats=null;InventoryItemData.prototype.player_currency=null;InventoryItemData.prototype.player_camera=null;InventoryItemData.prototype.inventory_upgrades=null;InventoryItemData.prototype.applied_items=null;InventoryItemData.prototype.egg_incubators=null;InventoryItemData.prototype.candy=null;InventoryItemData.prototype.quest=null;InventoryItemData.prototype.avatar_item=null;InventoryItemData.prototype.raid_tickets=null;InventoryItemData.prototype.quests=null;InventoryItemData.prototype.gift_boxes=null;InventoryItemData.prototype.beluga_incense=null;var $oneOfFields;Object.defineProperty(InventoryItemData.prototype,"Type",{get:$util.oneOfGetter($oneOfFields=["pokemon_data","item","pokedex_entry","player_stats","player_currency","player_camera","inventory_upgrades","applied_items","egg_incubators","candy","quest","avatar_item","raid_tickets","quests","gift_boxes","beluga_incense"]),set:$util.oneOfSetter($oneOfFields)});InventoryItemData.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data"))$root.POGOProtos.Data.PokemonData.encode(m.pokemon_data,w.uint32(10).fork()).ldelim();if(m.item!=null&&m.hasOwnProperty("item"))$root.POGOProtos.Inventory.Item.ItemData.encode(m.item,w.uint32(18).fork()).ldelim();if(m.pokedex_entry!=null&&m.hasOwnProperty("pokedex_entry"))$root.POGOProtos.Data.PokedexEntry.encode(m.pokedex_entry,w.uint32(26).fork()).ldelim();if(m.player_stats!=null&&m.hasOwnProperty("player_stats"))$root.POGOProtos.Data.Player.PlayerStats.encode(m.player_stats,w.uint32(34).fork()).ldelim();if(m.player_currency!=null&&m.hasOwnProperty("player_currency"))$root.POGOProtos.Data.Player.PlayerCurrency.encode(m.player_currency,w.uint32(42).fork()).ldelim();if(m.player_camera!=null&&m.hasOwnProperty("player_camera"))$root.POGOProtos.Data.Player.PlayerCamera.encode(m.player_camera,w.uint32(50).fork()).ldelim();if(m.inventory_upgrades!=null&&m.hasOwnProperty("inventory_upgrades"))$root.POGOProtos.Inventory.InventoryUpgrades.encode(m.inventory_upgrades,w.uint32(58).fork()).ldelim();if(m.applied_items!=null&&m.hasOwnProperty("applied_items"))$root.POGOProtos.Inventory.AppliedItems.encode(m.applied_items,w.uint32(66).fork()).ldelim();if(m.egg_incubators!=null&&m.hasOwnProperty("egg_incubators"))$root.POGOProtos.Inventory.EggIncubators.encode(m.egg_incubators,w.uint32(74).fork()).ldelim();if(m.candy!=null&&m.hasOwnProperty("candy"))$root.POGOProtos.Inventory.Candy.encode(m.candy,w.uint32(82).fork()).ldelim();if(m.quest!=null&&m.hasOwnProperty("quest"))$root.POGOProtos.Data.Quests.Quest.encode(m.quest,w.uint32(90).fork()).ldelim();if(m.avatar_item!=null&&m.hasOwnProperty("avatar_item"))$root.POGOProtos.Data.Avatar.AvatarItem.encode(m.avatar_item,w.uint32(98).fork()).ldelim();if(m.raid_tickets!=null&&m.hasOwnProperty("raid_tickets"))$root.POGOProtos.Inventory.RaidTickets.encode(m.raid_tickets,w.uint32(106).fork()).ldelim();if(m.quests!=null&&m.hasOwnProperty("quests"))$root.POGOProtos.Data.Quests.Quests.encode(m.quests,w.uint32(114).fork()).ldelim();if(m.gift_boxes!=null&&m.hasOwnProperty("gift_boxes"))$root.POGOProtos.Data.Gift.GiftBoxes.encode(m.gift_boxes,w.uint32(122).fork()).ldelim();if(m.beluga_incense!=null&&m.hasOwnProperty("beluga_incense"))$root.POGOProtos.Data.Beluga.BelugaIncenseBox.encode(m.beluga_incense,w.uint32(130).fork()).ldelim();return w};InventoryItemData.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.InventoryItemData;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_data=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 2:m.item=$root.POGOProtos.Inventory.Item.ItemData.decode(r,r.uint32());break;case 3:m.pokedex_entry=$root.POGOProtos.Data.PokedexEntry.decode(r,r.uint32());break;case 4:m.player_stats=$root.POGOProtos.Data.Player.PlayerStats.decode(r,r.uint32());break;case 5:m.player_currency=$root.POGOProtos.Data.Player.PlayerCurrency.decode(r,r.uint32());break;case 6:m.player_camera=$root.POGOProtos.Data.Player.PlayerCamera.decode(r,r.uint32());break;case 7:m.inventory_upgrades=$root.POGOProtos.Inventory.InventoryUpgrades.decode(r,r.uint32());break;case 8:m.applied_items=$root.POGOProtos.Inventory.AppliedItems.decode(r,r.uint32());break;case 9:m.egg_incubators=$root.POGOProtos.Inventory.EggIncubators.decode(r,r.uint32());break;case 10:m.candy=$root.POGOProtos.Inventory.Candy.decode(r,r.uint32());break;case 11:m.quest=$root.POGOProtos.Data.Quests.Quest.decode(r,r.uint32());break;case 12:m.avatar_item=$root.POGOProtos.Data.Avatar.AvatarItem.decode(r,r.uint32());break;case 13:m.raid_tickets=$root.POGOProtos.Inventory.RaidTickets.decode(r,r.uint32());break;case 14:m.quests=$root.POGOProtos.Data.Quests.Quests.decode(r,r.uint32());break;case 15:m.gift_boxes=$root.POGOProtos.Data.Gift.GiftBoxes.decode(r,r.uint32());break;case 16:m.beluga_incense=$root.POGOProtos.Data.Beluga.BelugaIncenseBox.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};InventoryItemData.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.InventoryItemData)return d;var m=new $root.POGOProtos.Inventory.InventoryItemData;if(d.pokemon_data!=null){if(typeof d.pokemon_data!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.pokemon_data: object expected");m.pokemon_data=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon_data)}if(d.item!=null){if(typeof d.item!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.item: object expected");m.item=$root.POGOProtos.Inventory.Item.ItemData.fromObject(d.item)}if(d.pokedex_entry!=null){if(typeof d.pokedex_entry!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.pokedex_entry: object expected");m.pokedex_entry=$root.POGOProtos.Data.PokedexEntry.fromObject(d.pokedex_entry)}if(d.player_stats!=null){if(typeof d.player_stats!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.player_stats: object expected");m.player_stats=$root.POGOProtos.Data.Player.PlayerStats.fromObject(d.player_stats)}if(d.player_currency!=null){if(typeof d.player_currency!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.player_currency: object expected");m.player_currency=$root.POGOProtos.Data.Player.PlayerCurrency.fromObject(d.player_currency)}if(d.player_camera!=null){if(typeof d.player_camera!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.player_camera: object expected");m.player_camera=$root.POGOProtos.Data.Player.PlayerCamera.fromObject(d.player_camera)}if(d.inventory_upgrades!=null){if(typeof d.inventory_upgrades!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.inventory_upgrades: object expected");m.inventory_upgrades=$root.POGOProtos.Inventory.InventoryUpgrades.fromObject(d.inventory_upgrades)}if(d.applied_items!=null){if(typeof d.applied_items!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.applied_items: object expected");m.applied_items=$root.POGOProtos.Inventory.AppliedItems.fromObject(d.applied_items)}if(d.egg_incubators!=null){if(typeof d.egg_incubators!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.egg_incubators: object expected");m.egg_incubators=$root.POGOProtos.Inventory.EggIncubators.fromObject(d.egg_incubators)}if(d.candy!=null){if(typeof d.candy!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.candy: object expected");m.candy=$root.POGOProtos.Inventory.Candy.fromObject(d.candy)}if(d.quest!=null){if(typeof d.quest!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.quest: object expected");m.quest=$root.POGOProtos.Data.Quests.Quest.fromObject(d.quest)}if(d.avatar_item!=null){if(typeof d.avatar_item!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.avatar_item: object expected");m.avatar_item=$root.POGOProtos.Data.Avatar.AvatarItem.fromObject(d.avatar_item)}if(d.raid_tickets!=null){if(typeof d.raid_tickets!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.raid_tickets: object expected");m.raid_tickets=$root.POGOProtos.Inventory.RaidTickets.fromObject(d.raid_tickets)}if(d.quests!=null){if(typeof d.quests!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.quests: object expected");m.quests=$root.POGOProtos.Data.Quests.Quests.fromObject(d.quests)}if(d.gift_boxes!=null){if(typeof d.gift_boxes!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.gift_boxes: object expected");m.gift_boxes=$root.POGOProtos.Data.Gift.GiftBoxes.fromObject(d.gift_boxes)}if(d.beluga_incense!=null){if(typeof d.beluga_incense!=="object")throw TypeError(".POGOProtos.Inventory.InventoryItemData.beluga_incense: object expected");m.beluga_incense=$root.POGOProtos.Data.Beluga.BelugaIncenseBox.fromObject(d.beluga_incense)}return m};InventoryItemData.toObject=function toObject(m,o){if(!o)o={};var d={};if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data")){d.pokemon_data=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon_data,o);if(o.oneofs)d.Type="pokemon_data"}if(m.item!=null&&m.hasOwnProperty("item")){d.item=$root.POGOProtos.Inventory.Item.ItemData.toObject(m.item,o);if(o.oneofs)d.Type="item"}if(m.pokedex_entry!=null&&m.hasOwnProperty("pokedex_entry")){d.pokedex_entry=$root.POGOProtos.Data.PokedexEntry.toObject(m.pokedex_entry,o);if(o.oneofs)d.Type="pokedex_entry"}if(m.player_stats!=null&&m.hasOwnProperty("player_stats")){d.player_stats=$root.POGOProtos.Data.Player.PlayerStats.toObject(m.player_stats,o);if(o.oneofs)d.Type="player_stats"}if(m.player_currency!=null&&m.hasOwnProperty("player_currency")){d.player_currency=$root.POGOProtos.Data.Player.PlayerCurrency.toObject(m.player_currency,o);if(o.oneofs)d.Type="player_currency"}if(m.player_camera!=null&&m.hasOwnProperty("player_camera")){d.player_camera=$root.POGOProtos.Data.Player.PlayerCamera.toObject(m.player_camera,o);if(o.oneofs)d.Type="player_camera"}if(m.inventory_upgrades!=null&&m.hasOwnProperty("inventory_upgrades")){d.inventory_upgrades=$root.POGOProtos.Inventory.InventoryUpgrades.toObject(m.inventory_upgrades,o);if(o.oneofs)d.Type="inventory_upgrades"}if(m.applied_items!=null&&m.hasOwnProperty("applied_items")){d.applied_items=$root.POGOProtos.Inventory.AppliedItems.toObject(m.applied_items,o);if(o.oneofs)d.Type="applied_items"}if(m.egg_incubators!=null&&m.hasOwnProperty("egg_incubators")){d.egg_incubators=$root.POGOProtos.Inventory.EggIncubators.toObject(m.egg_incubators,o);if(o.oneofs)d.Type="egg_incubators"}if(m.candy!=null&&m.hasOwnProperty("candy")){d.candy=$root.POGOProtos.Inventory.Candy.toObject(m.candy,o);if(o.oneofs)d.Type="candy"}if(m.quest!=null&&m.hasOwnProperty("quest")){d.quest=$root.POGOProtos.Data.Quests.Quest.toObject(m.quest,o);if(o.oneofs)d.Type="quest"}if(m.avatar_item!=null&&m.hasOwnProperty("avatar_item")){d.avatar_item=$root.POGOProtos.Data.Avatar.AvatarItem.toObject(m.avatar_item,o);if(o.oneofs)d.Type="avatar_item"}if(m.raid_tickets!=null&&m.hasOwnProperty("raid_tickets")){d.raid_tickets=$root.POGOProtos.Inventory.RaidTickets.toObject(m.raid_tickets,o);if(o.oneofs)d.Type="raid_tickets"}if(m.quests!=null&&m.hasOwnProperty("quests")){d.quests=$root.POGOProtos.Data.Quests.Quests.toObject(m.quests,o);if(o.oneofs)d.Type="quests"}if(m.gift_boxes!=null&&m.hasOwnProperty("gift_boxes")){d.gift_boxes=$root.POGOProtos.Data.Gift.GiftBoxes.toObject(m.gift_boxes,o);if(o.oneofs)d.Type="gift_boxes"}if(m.beluga_incense!=null&&m.hasOwnProperty("beluga_incense")){d.beluga_incense=$root.POGOProtos.Data.Beluga.BelugaIncenseBox.toObject(m.beluga_incense,o);if(o.oneofs)d.Type="beluga_incense"}return d};InventoryItemData.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return InventoryItemData}();Inventory.InventoryKey=function(){function InventoryKey(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}InventoryKey.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;InventoryKey.prototype.item=0;InventoryKey.prototype.pokedex_entry_id=0;InventoryKey.prototype.player_stats=false;InventoryKey.prototype.player_currency=false;InventoryKey.prototype.player_camera=false;InventoryKey.prototype.inventory_upgrades=false;InventoryKey.prototype.applied_items=false;InventoryKey.prototype.egg_incubators=false;InventoryKey.prototype.pokemon_family_id=0;InventoryKey.prototype.quest_type=0;InventoryKey.prototype.avatar_template_id="";InventoryKey.prototype.raid_tickets=false;InventoryKey.prototype.quests=false;InventoryKey.prototype.gift_boxes=false;InventoryKey.prototype.beluga_incense_box=false;var $oneOfFields;Object.defineProperty(InventoryKey.prototype,"Type",{get:$util.oneOfGetter($oneOfFields=["pokemon_id","item","pokedex_entry_id","player_stats","player_currency","player_camera","inventory_upgrades","applied_items","egg_incubators","pokemon_family_id","quest_type","avatar_template_id","raid_tickets","quests","gift_boxes","beluga_incense_box"]),set:$util.oneOfSetter($oneOfFields)});InventoryKey.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(9).fixed64(m.pokemon_id);if(m.item!=null&&m.hasOwnProperty("item"))w.uint32(16).int32(m.item);if(m.pokedex_entry_id!=null&&m.hasOwnProperty("pokedex_entry_id"))w.uint32(24).int32(m.pokedex_entry_id);if(m.player_stats!=null&&m.hasOwnProperty("player_stats"))w.uint32(32).bool(m.player_stats);if(m.player_currency!=null&&m.hasOwnProperty("player_currency"))w.uint32(40).bool(m.player_currency);if(m.player_camera!=null&&m.hasOwnProperty("player_camera"))w.uint32(48).bool(m.player_camera);if(m.inventory_upgrades!=null&&m.hasOwnProperty("inventory_upgrades"))w.uint32(56).bool(m.inventory_upgrades);if(m.applied_items!=null&&m.hasOwnProperty("applied_items"))w.uint32(64).bool(m.applied_items);if(m.egg_incubators!=null&&m.hasOwnProperty("egg_incubators"))w.uint32(72).bool(m.egg_incubators);if(m.pokemon_family_id!=null&&m.hasOwnProperty("pokemon_family_id"))w.uint32(80).int32(m.pokemon_family_id);if(m.quest_type!=null&&m.hasOwnProperty("quest_type"))w.uint32(88).int32(m.quest_type);if(m.avatar_template_id!=null&&m.hasOwnProperty("avatar_template_id"))w.uint32(98).string(m.avatar_template_id);if(m.raid_tickets!=null&&m.hasOwnProperty("raid_tickets"))w.uint32(104).bool(m.raid_tickets);if(m.quests!=null&&m.hasOwnProperty("quests"))w.uint32(112).bool(m.quests);if(m.gift_boxes!=null&&m.hasOwnProperty("gift_boxes"))w.uint32(120).bool(m.gift_boxes);if(m.beluga_incense_box!=null&&m.hasOwnProperty("beluga_incense_box"))w.uint32(128).bool(m.beluga_incense_box);return w};InventoryKey.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.InventoryKey;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.fixed64();break;case 2:m.item=r.int32();break;case 3:m.pokedex_entry_id=r.int32();break;case 4:m.player_stats=r.bool();break;case 5:m.player_currency=r.bool();break;case 6:m.player_camera=r.bool();break;case 7:m.inventory_upgrades=r.bool();break;case 8:m.applied_items=r.bool();break;case 9:m.egg_incubators=r.bool();break;case 10:m.pokemon_family_id=r.int32();break;case 11:m.quest_type=r.int32();break;case 12:m.avatar_template_id=r.string();break;case 13:m.raid_tickets=r.bool();break;case 14:m.quests=r.bool();break;case 15:m.gift_boxes=r.bool();break;case 16:m.beluga_incense_box=r.bool();break;default:r.skipType(t&7);break}}return m};InventoryKey.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.InventoryKey)return d;var m=new $root.POGOProtos.Inventory.InventoryKey;if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}switch(d.item){case"ITEM_UNKNOWN":case 0:m.item=0;break;case"ITEM_POKE_BALL":case 1:m.item=1;break;case"ITEM_GREAT_BALL":case 2:m.item=2;break;case"ITEM_ULTRA_BALL":case 3:m.item=3;break;case"ITEM_MASTER_BALL":case 4:m.item=4;break;case"ITEM_PREMIER_BALL":case 5:m.item=5;break;case"ITEM_POTION":case 101:m.item=101;break;case"ITEM_SUPER_POTION":case 102:m.item=102;break;case"ITEM_HYPER_POTION":case 103:m.item=103;break;case"ITEM_MAX_POTION":case 104:m.item=104;break;case"ITEM_REVIVE":case 201:m.item=201;break;case"ITEM_MAX_REVIVE":case 202:m.item=202;break;case"ITEM_LUCKY_EGG":case 301:m.item=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item=402;break;case"ITEM_INCENSE_COOL":case 403:m.item=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item=405;break;case"ITEM_TROY_DISK":case 501:m.item=501;break;case"ITEM_X_ATTACK":case 602:m.item=602;break;case"ITEM_X_DEFENSE":case 603:m.item=603;break;case"ITEM_X_MIRACLE":case 604:m.item=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item=701;break;case"ITEM_BLUK_BERRY":case 702:m.item=702;break;case"ITEM_NANAB_BERRY":case 703:m.item=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item=704;break;case"ITEM_PINAP_BERRY":case 705:m.item=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item=1002;break;case"ITEM_SUN_STONE":case 1101:m.item=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item=1102;break;case"ITEM_METAL_COAT":case 1103:m.item=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item=1104;break;case"ITEM_UP_GRADE":case 1105:m.item=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item=1405;break}if(d.pokedex_entry_id!=null){m.pokedex_entry_id=d.pokedex_entry_id|0}if(d.player_stats!=null){m.player_stats=Boolean(d.player_stats)}if(d.player_currency!=null){m.player_currency=Boolean(d.player_currency)}if(d.player_camera!=null){m.player_camera=Boolean(d.player_camera)}if(d.inventory_upgrades!=null){m.inventory_upgrades=Boolean(d.inventory_upgrades)}if(d.applied_items!=null){m.applied_items=Boolean(d.applied_items)}if(d.egg_incubators!=null){m.egg_incubators=Boolean(d.egg_incubators)}switch(d.pokemon_family_id){case"FAMILY_UNSET":case 0:m.pokemon_family_id=0;break;case"FAMILY_BULBASAUR":case 1:m.pokemon_family_id=1;break;case"FAMILY_CHARMANDER":case 4:m.pokemon_family_id=4;break;case"FAMILY_SQUIRTLE":case 7:m.pokemon_family_id=7;break;case"FAMILY_CATERPIE":case 10:m.pokemon_family_id=10;break;case"FAMILY_WEEDLE":case 13:m.pokemon_family_id=13;break;case"FAMILY_PIDGEY":case 16:m.pokemon_family_id=16;break;case"FAMILY_RATTATA":case 19:m.pokemon_family_id=19;break;case"FAMILY_SPEAROW":case 21:m.pokemon_family_id=21;break;case"FAMILY_EKANS":case 23:m.pokemon_family_id=23;break;case"FAMILY_PIKACHU":case 25:m.pokemon_family_id=25;break;case"FAMILY_SANDSHREW":case 27:m.pokemon_family_id=27;break;case"FAMILY_NIDORAN_FEMALE":case 29:m.pokemon_family_id=29;break;case"FAMILY_NIDORAN_MALE":case 32:m.pokemon_family_id=32;break;case"FAMILY_CLEFAIRY":case 35:m.pokemon_family_id=35;break;case"FAMILY_VULPIX":case 37:m.pokemon_family_id=37;break;case"FAMILY_JIGGLYPUFF":case 39:m.pokemon_family_id=39;break;case"FAMILY_ZUBAT":case 41:m.pokemon_family_id=41;break;case"FAMILY_ODDISH":case 43:m.pokemon_family_id=43;break;case"FAMILY_PARAS":case 46:m.pokemon_family_id=46;break;case"FAMILY_VENONAT":case 48:m.pokemon_family_id=48;break;case"FAMILY_DIGLETT":case 50:m.pokemon_family_id=50;break;case"FAMILY_MEOWTH":case 52:m.pokemon_family_id=52;break;case"FAMILY_PSYDUCK":case 54:m.pokemon_family_id=54;break;case"FAMILY_MANKEY":case 56:m.pokemon_family_id=56;break;case"FAMILY_GROWLITHE":case 58:m.pokemon_family_id=58;break;case"FAMILY_POLIWAG":case 60:m.pokemon_family_id=60;break;case"FAMILY_ABRA":case 63:m.pokemon_family_id=63;break;case"FAMILY_MACHOP":case 66:m.pokemon_family_id=66;break;case"FAMILY_BELLSPROUT":case 69:m.pokemon_family_id=69;break;case"FAMILY_TENTACOOL":case 72:m.pokemon_family_id=72;break;case"FAMILY_GEODUDE":case 74:m.pokemon_family_id=74;break;case"FAMILY_PONYTA":case 77:m.pokemon_family_id=77;break;case"FAMILY_SLOWPOKE":case 79:m.pokemon_family_id=79;break;case"FAMILY_MAGNEMITE":case 81:m.pokemon_family_id=81;break;case"FAMILY_FARFETCHD":case 83:m.pokemon_family_id=83;break;case"FAMILY_DODUO":case 84:m.pokemon_family_id=84;break;case"FAMILY_SEEL":case 86:m.pokemon_family_id=86;break;case"FAMILY_GRIMER":case 88:m.pokemon_family_id=88;break;case"FAMILY_SHELLDER":case 90:m.pokemon_family_id=90;break;case"FAMILY_GASTLY":case 92:m.pokemon_family_id=92;break;case"FAMILY_ONIX":case 95:m.pokemon_family_id=95;break;case"FAMILY_DROWZEE":case 96:m.pokemon_family_id=96;break;case"FAMILY_HYPNO":case 97:m.pokemon_family_id=97;break;case"FAMILY_KRABBY":case 98:m.pokemon_family_id=98;break;case"FAMILY_VOLTORB":case 100:m.pokemon_family_id=100;break;case"FAMILY_EXEGGCUTE":case 102:m.pokemon_family_id=102;break;case"FAMILY_CUBONE":case 104:m.pokemon_family_id=104;break;case"FAMILY_HITMONLEE":case 106:m.pokemon_family_id=106;break;case"FAMILY_HITMONCHAN":case 107:m.pokemon_family_id=107;break;case"FAMILY_LICKITUNG":case 108:m.pokemon_family_id=108;break;case"FAMILY_KOFFING":case 109:m.pokemon_family_id=109;break;case"FAMILY_RHYHORN":case 111:m.pokemon_family_id=111;break;case"FAMILY_CHANSEY":case 113:m.pokemon_family_id=113;break;case"FAMILY_TANGELA":case 114:m.pokemon_family_id=114;break;case"FAMILY_KANGASKHAN":case 115:m.pokemon_family_id=115;break;case"FAMILY_HORSEA":case 116:m.pokemon_family_id=116;break;case"FAMILY_GOLDEEN":case 118:m.pokemon_family_id=118;break;case"FAMILY_STARYU":case 120:m.pokemon_family_id=120;break;case"FAMILY_MR_MIME":case 122:m.pokemon_family_id=122;break;case"FAMILY_SCYTHER":case 123:m.pokemon_family_id=123;break;case"FAMILY_JYNX":case 124:m.pokemon_family_id=124;break;case"FAMILY_ELECTABUZZ":case 125:m.pokemon_family_id=125;break;case"FAMILY_MAGMAR":case 126:m.pokemon_family_id=126;break;case"FAMILY_PINSIR":case 127:m.pokemon_family_id=127;break;case"FAMILY_TAUROS":case 128:m.pokemon_family_id=128;break;case"FAMILY_MAGIKARP":case 129:m.pokemon_family_id=129;break;case"FAMILY_LAPRAS":case 131:m.pokemon_family_id=131;break;case"FAMILY_DITTO":case 132:m.pokemon_family_id=132;break;case"FAMILY_EEVEE":case 133:m.pokemon_family_id=133;break;case"FAMILY_PORYGON":case 137:m.pokemon_family_id=137;break;case"FAMILY_OMANYTE":case 138:m.pokemon_family_id=138;break;case"FAMILY_KABUTO":case 140:m.pokemon_family_id=140;break;case"FAMILY_AERODACTYL":case 142:m.pokemon_family_id=142;break;case"FAMILY_SNORLAX":case 143:m.pokemon_family_id=143;break;case"FAMILY_ARTICUNO":case 144:m.pokemon_family_id=144;break;case"FAMILY_ZAPDOS":case 145:m.pokemon_family_id=145;break;case"FAMILY_MOLTRES":case 146:m.pokemon_family_id=146;break;case"FAMILY_DRATINI":case 147:m.pokemon_family_id=147;break;case"FAMILY_MEWTWO":case 150:m.pokemon_family_id=150;break;case"FAMILY_MEW":case 151:m.pokemon_family_id=151;break;case"FAMILY_CHIKORITA":case 152:m.pokemon_family_id=152;break;case"FAMILY_CYNDAQUIL":case 155:m.pokemon_family_id=155;break;case"FAMILY_TOTODILE":case 158:m.pokemon_family_id=158;break;case"FAMILY_SENTRET":case 161:m.pokemon_family_id=161;break;case"FAMILY_HOOTHOOT":case 163:m.pokemon_family_id=163;break;case"FAMILY_LEDYBA":case 165:m.pokemon_family_id=165;break;case"FAMILY_SPINARAK":case 167:m.pokemon_family_id=167;break;case"FAMILY_CHINCHOU":case 170:m.pokemon_family_id=170;break;case"FAMILY_TOGEPI":case 175:m.pokemon_family_id=175;break;case"FAMILY_NATU":case 177:m.pokemon_family_id=177;break;case"FAMILY_MAREEP":case 179:m.pokemon_family_id=179;break;case"FAMILY_MARILL":case 183:m.pokemon_family_id=183;break;case"FAMILY_SUDOWOODO":case 185:m.pokemon_family_id=185;break;case"FAMILY_HOPPIP":case 187:m.pokemon_family_id=187;break;case"FAMILY_AIPOM":case 190:m.pokemon_family_id=190;break;case"FAMILY_SUNKERN":case 191:m.pokemon_family_id=191;break;case"FAMILY_YANMA":case 193:m.pokemon_family_id=193;break;case"FAMILY_WOOPER":case 194:m.pokemon_family_id=194;break;case"FAMILY_MURKROW":case 198:m.pokemon_family_id=198;break;case"FAMILY_MISDREAVUS":case 200:m.pokemon_family_id=200;break;case"FAMILY_UNOWN":case 201:m.pokemon_family_id=201;break;case"FAMILY_WOBBUFFET":case 202:m.pokemon_family_id=202;break;case"FAMILY_GIRAFARIG":case 203:m.pokemon_family_id=203;break;case"FAMILY_PINECO":case 204:m.pokemon_family_id=204;break;case"FAMILY_DUNSPARCE":case 206:m.pokemon_family_id=206;break;case"FAMILY_GLIGAR":case 207:m.pokemon_family_id=207;break;case"FAMILY_SNUBBULL":case 209:m.pokemon_family_id=209;break;case"FAMILY_QWILFISH":case 211:m.pokemon_family_id=211;break;case"FAMILY_SHUCKLE":case 213:m.pokemon_family_id=213;break;case"FAMILY_HERACROSS":case 214:m.pokemon_family_id=214;break;case"FAMILY_SNEASEL":case 215:m.pokemon_family_id=215;break;case"FAMILY_TEDDIURSA":case 216:m.pokemon_family_id=216;break;case"FAMILY_SLUGMA":case 218:m.pokemon_family_id=218;break;case"FAMILY_SWINUB":case 220:m.pokemon_family_id=220;break;case"FAMILY_CORSOLA":case 222:m.pokemon_family_id=222;break;case"FAMILY_REMORAID":case 223:m.pokemon_family_id=223;break;case"FAMILY_DELIBIRD":case 225:m.pokemon_family_id=225;break;case"FAMILY_MANTINE":case 226:m.pokemon_family_id=226;break;case"FAMILY_SKARMORY":case 227:m.pokemon_family_id=227;break;case"FAMILY_HOUNDOUR":case 228:m.pokemon_family_id=228;break;case"FAMILY_PHANPY":case 231:m.pokemon_family_id=231;break;case"FAMILY_STANTLER":case 234:m.pokemon_family_id=234;break;case"FAMILY_SMEARGLE":case 235:m.pokemon_family_id=235;break;case"FAMILY_TYROGUE":case 236:m.pokemon_family_id=236;break;case"FAMILY_MILTANK":case 241:m.pokemon_family_id=241;break;case"FAMILY_RAIKOU":case 243:m.pokemon_family_id=243;break;case"FAMILY_ENTEI":case 244:m.pokemon_family_id=244;break;case"FAMILY_SUICUNE":case 245:m.pokemon_family_id=245;break;case"FAMILY_LARVITAR":case 246:m.pokemon_family_id=246;break;case"FAMILY_LUGIA":case 249:m.pokemon_family_id=249;break;case"FAMILY_HO_OH":case 250:m.pokemon_family_id=250;break;case"FAMILY_CELEBI":case 251:m.pokemon_family_id=251;break;case"FAMILY_TREECKO":case 252:m.pokemon_family_id=252;break;case"FAMILY_TORCHIC":case 255:m.pokemon_family_id=255;break;case"FAMILY_MUDKIP":case 258:m.pokemon_family_id=258;break;case"FAMILY_POOCHYENA":case 261:m.pokemon_family_id=261;break;case"FAMILY_ZIGZAGOON":case 263:m.pokemon_family_id=263;break;case"FAMILY_WURMPLE":case 265:m.pokemon_family_id=265;break;case"FAMILY_LOTAD":case 270:m.pokemon_family_id=270;break;case"FAMILY_SEEDOT":case 273:m.pokemon_family_id=273;break;case"FAMILY_TAILLOW":case 276:m.pokemon_family_id=276;break;case"FAMILY_WINGULL":case 278:m.pokemon_family_id=278;break;case"FAMILY_RALTS":case 280:m.pokemon_family_id=280;break;case"FAMILY_SURSKIT":case 283:m.pokemon_family_id=283;break;case"FAMILY_SHROOMISH":case 285:m.pokemon_family_id=285;break;case"FAMILY_SLAKOTH":case 287:m.pokemon_family_id=287;break;case"FAMILY_NINCADA":case 290:m.pokemon_family_id=290;break;case"FAMILY_WHISMUR":case 293:m.pokemon_family_id=293;break;case"FAMILY_MAKUHITA":case 296:m.pokemon_family_id=296;break;case"FAMILY_NOSEPASS":case 299:m.pokemon_family_id=299;break;case"FAMILY_SKITTY":case 300:m.pokemon_family_id=300;break;case"FAMILY_SABLEYE":case 302:m.pokemon_family_id=302;break;case"FAMILY_MAWILE":case 303:m.pokemon_family_id=303;break;case"FAMILY_ARON":case 304:m.pokemon_family_id=304;break;case"FAMILY_MEDITITE":case 307:m.pokemon_family_id=307;break;case"FAMILY_ELECTRIKE":case 309:m.pokemon_family_id=309;break;case"FAMILY_PLUSLE":case 311:m.pokemon_family_id=311;break;case"FAMILY_MINUN":case 312:m.pokemon_family_id=312;break;case"FAMILY_VOLBEAT":case 313:m.pokemon_family_id=313;break;case"FAMILY_ILLUMISE":case 314:m.pokemon_family_id=314;break;case"FAMILY_ROSELIA":case 315:m.pokemon_family_id=315;break;case"FAMILY_GULPIN":case 316:m.pokemon_family_id=316;break;case"FAMILY_CARVANHA":case 318:m.pokemon_family_id=318;break;case"FAMILY_WAILMER":case 320:m.pokemon_family_id=320;break;case"FAMILY_NUMEL":case 322:m.pokemon_family_id=322;break;case"FAMILY_TORKOAL":case 324:m.pokemon_family_id=324;break;case"FAMILY_SPOINK":case 325:m.pokemon_family_id=325;break;case"FAMILY_SPINDA":case 327:m.pokemon_family_id=327;break;case"FAMILY_TRAPINCH":case 328:m.pokemon_family_id=328;break;case"FAMILY_CACNEA":case 331:m.pokemon_family_id=331;break;case"FAMILY_SWABLU":case 333:m.pokemon_family_id=333;break;case"FAMILY_ZANGOOSE":case 335:m.pokemon_family_id=335;break;case"FAMILY_SEVIPER":case 336:m.pokemon_family_id=336;break;case"FAMILY_LUNATONE":case 337:m.pokemon_family_id=337;break;case"FAMILY_SOLROCK":case 338:m.pokemon_family_id=338;break;case"FAMILY_BARBOACH":case 339:m.pokemon_family_id=339;break;case"FAMILY_CORPHISH":case 341:m.pokemon_family_id=341;break;case"FAMILY_BALTOY":case 343:m.pokemon_family_id=343;break;case"FAMILY_LILEEP":case 345:m.pokemon_family_id=345;break;case"FAMILY_ANORITH":case 347:m.pokemon_family_id=347;break;case"FAMILY_FEEBAS":case 349:m.pokemon_family_id=349;break;case"FAMILY_CASTFORM":case 351:m.pokemon_family_id=351;break;case"FAMILY_KECLEON":case 352:m.pokemon_family_id=352;break;case"FAMILY_SHUPPET":case 353:m.pokemon_family_id=353;break;case"FAMILY_DUSKULL":case 355:m.pokemon_family_id=355;break;case"FAMILY_TROPIUS":case 357:m.pokemon_family_id=357;break;case"FAMILY_CHIMECHO":case 358:m.pokemon_family_id=358;break;case"FAMILY_ABSOL":case 359:m.pokemon_family_id=359;break;case"FAMILY_SNORUNT":case 361:m.pokemon_family_id=361;break;case"FAMILY_SPHEAL":case 363:m.pokemon_family_id=363;break;case"FAMILY_CLAMPERL":case 366:m.pokemon_family_id=366;break;case"FAMILY_RELICANTH":case 369:m.pokemon_family_id=369;break;case"FAMILY_LUVDISC":case 370:m.pokemon_family_id=370;break;case"FAMILY_BAGON":case 371:m.pokemon_family_id=371;break;case"FAMILY_BELDUM":case 374:m.pokemon_family_id=374;break;case"FAMILY_REGIROCK":case 377:m.pokemon_family_id=377;break;case"FAMILY_REGICE":case 378:m.pokemon_family_id=378;break;case"FAMILY_REGISTEEL":case 379:m.pokemon_family_id=379;break;case"FAMILY_LATIAS":case 380:m.pokemon_family_id=380;break;case"FAMILY_LATIOS":case 381:m.pokemon_family_id=381;break;case"FAMILY_KYOGRE":case 382:m.pokemon_family_id=382;break;case"FAMILY_GROUDON":case 383:m.pokemon_family_id=383;break;case"FAMILY_RAYQUAZA":case 384:m.pokemon_family_id=384;break;case"FAMILY_JIRACHI":case 385:m.pokemon_family_id=385;break;case"FAMILY_DEOXYS":case 386:m.pokemon_family_id=386;break;case"FAMILY_TURTWIG":case 387:m.pokemon_family_id=387;break;case"FAMILY_CHIMCHAR":case 390:m.pokemon_family_id=390;break;case"FAMILY_PIPLUP":case 393:m.pokemon_family_id=393;break;case"FAMILY_STARLY":case 396:m.pokemon_family_id=396;break;case"FAMILY_BIDOOF":case 399:m.pokemon_family_id=399;break;case"FAMILY_KRICKETOT":case 401:m.pokemon_family_id=401;break;case"FAMILY_SHINX":case 403:m.pokemon_family_id=403;break;case"FAMILY_CRANIDOS":case 408:m.pokemon_family_id=408;break;case"FAMILY_SHIELDON":case 410:m.pokemon_family_id=410;break;case"FAMILY_BURMY":case 412:m.pokemon_family_id=412;break;case"FAMILY_COMBEE":case 415:m.pokemon_family_id=415;break;case"FAMILY_PACHIRISU":case 417:m.pokemon_family_id=417;break;case"FAMILY_BUIZEL":case 418:m.pokemon_family_id=418;break;case"FAMILY_CHERUBI":case 420:m.pokemon_family_id=420;break;case"FAMILY_SHELLOS":case 422:m.pokemon_family_id=422;break;case"FAMILY_DRIFLOON":case 425:m.pokemon_family_id=425;break;case"FAMILY_BUNEARY":case 427:m.pokemon_family_id=427;break;case"FAMILY_GLAMEOW":case 431:m.pokemon_family_id=431;break;case"FAMILY_STUNKY":case 434:m.pokemon_family_id=434;break;case"FAMILY_BRONZOR":case 436:m.pokemon_family_id=436;break;case"FAMILY_CHATOT":case 441:m.pokemon_family_id=441;break;case"FAMILY_SPIRITOMB":case 442:m.pokemon_family_id=442;break;case"FAMILY_GIBLE":case 443:m.pokemon_family_id=443;break;case"FAMILY_LUCARIO":case 448:m.pokemon_family_id=448;break;case"FAMILY_HIPPOPOTAS":case 449:m.pokemon_family_id=449;break;case"FAMILY_SKORUPI":case 451:m.pokemon_family_id=451;break;case"FAMILY_CROAGUNK":case 453:m.pokemon_family_id=453;break;case"FAMILY_CARNIVINE":case 455:m.pokemon_family_id=455;break;case"FAMILY_FINNEON":case 456:m.pokemon_family_id=456;break;case"FAMILY_SNOVER":case 459:m.pokemon_family_id=459;break;case"FAMILY_ROTOM":case 479:m.pokemon_family_id=479;break;case"FAMILY_UXIE":case 480:m.pokemon_family_id=480;break;case"FAMILY_MESPRIT":case 481:m.pokemon_family_id=481;break;case"FAMILY_AZELF":case 482:m.pokemon_family_id=482;break;case"FAMILY_DIALGA":case 483:m.pokemon_family_id=483;break;case"FAMILY_PALKIA":case 484:m.pokemon_family_id=484;break;case"FAMILY_HEATRAN":case 485:m.pokemon_family_id=485;break;case"FAMILY_REGIGIGAS":case 486:m.pokemon_family_id=486;break;case"FAMILY_GIRATINA":case 487:m.pokemon_family_id=487;break;case"FAMILY_CRESSELIA":case 488:m.pokemon_family_id=488;break;case"FAMILY_PHIONE":case 489:m.pokemon_family_id=489;break;case"FAMILY_MANAPHY":case 490:m.pokemon_family_id=490;break;case"FAMILY_DARKRAI":case 491:m.pokemon_family_id=491;break;case"FAMILY_SHAYMIN":case 492:m.pokemon_family_id=492;break;case"FAMILY_ARCEUS":case 493:m.pokemon_family_id=493;break;case"FAMILY_MELTAN":case 808:m.pokemon_family_id=808;break}switch(d.quest_type){case"QUEST_UNKNOWN_TYPE":case 0:m.quest_type=0;break;case"QUEST_FIRST_CATCH_OF_THE_DAY":case 1:m.quest_type=1;break;case"QUEST_FIRST_POKESTOP_OF_THE_DAY":case 2:m.quest_type=2;break;case"QUEST_MULTI_PART":case 3:m.quest_type=3;break;case"QUEST_CATCH_POKEMON":case 4:m.quest_type=4;break;case"QUEST_SPIN_POKESTOP":case 5:m.quest_type=5;break;case"QUEST_HATCH_EGG":case 6:m.quest_type=6;break;case"QUEST_COMPLETE_GYM_BATTLE":case 7:m.quest_type=7;break;case"QUEST_COMPLETE_RAID_BATTLE":case 8:m.quest_type=8;break;case"QUEST_COMPLETE_QUEST":case 9:m.quest_type=9;break;case"QUEST_TRANSFER_POKEMON":case 10:m.quest_type=10;break;case"QUEST_FAVORITE_POKEMON":case 11:m.quest_type=11;break;case"QUEST_AUTOCOMPLETE":case 12:m.quest_type=12;break;case"QUEST_USE_BERRY_IN_ENCOUNTER":case 13:m.quest_type=13;break;case"QUEST_UPGRADE_POKEMON":case 14:m.quest_type=14;break;case"QUEST_EVOLVE_POKEMON":case 15:m.quest_type=15;break;case"QUEST_LAND_THROW":case 16:m.quest_type=16;break;case"QUEST_GET_BUDDY_CANDY":case 17:m.quest_type=17;break;case"QUEST_BADGE_RANK":case 18:m.quest_type=18;break;case"QUEST_PLAYER_LEVEL":case 19:m.quest_type=19;break;case"QUEST_JOIN_RAID":case 20:m.quest_type=20;break;case"QUEST_COMPLETE_BATTLE":case 21:m.quest_type=21;break;case"QUEST_ADD_FRIEND":case 22:m.quest_type=22;break;case"QUEST_TRADE_POKEMON":case 23:m.quest_type=23;break;case"QUEST_SEND_GIFT":case 24:m.quest_type=24;break;case"QUEST_EVOLVE_INTO_POKEMON":case 25:m.quest_type=25;break}if(d.avatar_template_id!=null){m.avatar_template_id=String(d.avatar_template_id)}if(d.raid_tickets!=null){m.raid_tickets=Boolean(d.raid_tickets)}if(d.quests!=null){m.quests=Boolean(d.quests)}if(d.gift_boxes!=null){m.gift_boxes=Boolean(d.gift_boxes)}if(d.beluga_incense_box!=null){m.beluga_incense_box=Boolean(d.beluga_incense_box)}return m};InventoryKey.toObject=function toObject(m,o){if(!o)o={};var d={};if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id;if(o.oneofs)d.Type="pokemon_id"}if(m.item!=null&&m.hasOwnProperty("item")){d.item=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item]:m.item;if(o.oneofs)d.Type="item"}if(m.pokedex_entry_id!=null&&m.hasOwnProperty("pokedex_entry_id")){d.pokedex_entry_id=m.pokedex_entry_id;if(o.oneofs)d.Type="pokedex_entry_id"}if(m.player_stats!=null&&m.hasOwnProperty("player_stats")){d.player_stats=m.player_stats;if(o.oneofs)d.Type="player_stats"}if(m.player_currency!=null&&m.hasOwnProperty("player_currency")){d.player_currency=m.player_currency;if(o.oneofs)d.Type="player_currency"}if(m.player_camera!=null&&m.hasOwnProperty("player_camera")){d.player_camera=m.player_camera;if(o.oneofs)d.Type="player_camera"}if(m.inventory_upgrades!=null&&m.hasOwnProperty("inventory_upgrades")){d.inventory_upgrades=m.inventory_upgrades;if(o.oneofs)d.Type="inventory_upgrades"}if(m.applied_items!=null&&m.hasOwnProperty("applied_items")){d.applied_items=m.applied_items;if(o.oneofs)d.Type="applied_items"}if(m.egg_incubators!=null&&m.hasOwnProperty("egg_incubators")){d.egg_incubators=m.egg_incubators;if(o.oneofs)d.Type="egg_incubators"}if(m.pokemon_family_id!=null&&m.hasOwnProperty("pokemon_family_id")){d.pokemon_family_id=o.enums===String?$root.POGOProtos.Enums.PokemonFamilyId[m.pokemon_family_id]:m.pokemon_family_id;if(o.oneofs)d.Type="pokemon_family_id"}if(m.quest_type!=null&&m.hasOwnProperty("quest_type")){d.quest_type=o.enums===String?$root.POGOProtos.Enums.QuestType[m.quest_type]:m.quest_type;if(o.oneofs)d.Type="quest_type"}if(m.avatar_template_id!=null&&m.hasOwnProperty("avatar_template_id")){d.avatar_template_id=m.avatar_template_id;if(o.oneofs)d.Type="avatar_template_id"}if(m.raid_tickets!=null&&m.hasOwnProperty("raid_tickets")){d.raid_tickets=m.raid_tickets;if(o.oneofs)d.Type="raid_tickets"}if(m.quests!=null&&m.hasOwnProperty("quests")){d.quests=m.quests;if(o.oneofs)d.Type="quests"}if(m.gift_boxes!=null&&m.hasOwnProperty("gift_boxes")){d.gift_boxes=m.gift_boxes;if(o.oneofs)d.Type="gift_boxes"}if(m.beluga_incense_box!=null&&m.hasOwnProperty("beluga_incense_box")){d.beluga_incense_box=m.beluga_incense_box;if(o.oneofs)d.Type="beluga_incense_box"}return d};InventoryKey.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return InventoryKey}();Inventory.InventoryUpgrade=function(){function InventoryUpgrade(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}InventoryUpgrade.prototype.item_id=0;InventoryUpgrade.prototype.upgrade_type=0;InventoryUpgrade.prototype.additional_storage=0;InventoryUpgrade.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(8).int32(m.item_id);if(m.upgrade_type!=null&&m.hasOwnProperty("upgrade_type"))w.uint32(16).int32(m.upgrade_type);if(m.additional_storage!=null&&m.hasOwnProperty("additional_storage"))w.uint32(24).int32(m.additional_storage);return w};InventoryUpgrade.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.InventoryUpgrade;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.int32();break;case 2:m.upgrade_type=r.int32();break;case 3:m.additional_storage=r.int32();break;default:r.skipType(t&7);break}}return m};InventoryUpgrade.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.InventoryUpgrade)return d;var m=new $root.POGOProtos.Inventory.InventoryUpgrade;switch(d.item_id){case"ITEM_UNKNOWN":case 0:m.item_id=0;break;case"ITEM_POKE_BALL":case 1:m.item_id=1;break;case"ITEM_GREAT_BALL":case 2:m.item_id=2;break;case"ITEM_ULTRA_BALL":case 3:m.item_id=3;break;case"ITEM_MASTER_BALL":case 4:m.item_id=4;break;case"ITEM_PREMIER_BALL":case 5:m.item_id=5;break;case"ITEM_POTION":case 101:m.item_id=101;break;case"ITEM_SUPER_POTION":case 102:m.item_id=102;break;case"ITEM_HYPER_POTION":case 103:m.item_id=103;break;case"ITEM_MAX_POTION":case 104:m.item_id=104;break;case"ITEM_REVIVE":case 201:m.item_id=201;break;case"ITEM_MAX_REVIVE":case 202:m.item_id=202;break;case"ITEM_LUCKY_EGG":case 301:m.item_id=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item_id=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item_id=402;break;case"ITEM_INCENSE_COOL":case 403:m.item_id=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item_id=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item_id=405;break;case"ITEM_TROY_DISK":case 501:m.item_id=501;break;case"ITEM_X_ATTACK":case 602:m.item_id=602;break;case"ITEM_X_DEFENSE":case 603:m.item_id=603;break;case"ITEM_X_MIRACLE":case 604:m.item_id=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item_id=701;break;case"ITEM_BLUK_BERRY":case 702:m.item_id=702;break;case"ITEM_NANAB_BERRY":case 703:m.item_id=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item_id=704;break;case"ITEM_PINAP_BERRY":case 705:m.item_id=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item_id=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item_id=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item_id=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item_id=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item_id=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item_id=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item_id=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item_id=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item_id=1002;break;case"ITEM_SUN_STONE":case 1101:m.item_id=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item_id=1102;break;case"ITEM_METAL_COAT":case 1103:m.item_id=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item_id=1104;break;case"ITEM_UP_GRADE":case 1105:m.item_id=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item_id=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item_id=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item_id=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item_id=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item_id=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item_id=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item_id=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item_id=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item_id=1405;break}switch(d.upgrade_type){case"UPGRADE_UNSET":case 0:m.upgrade_type=0;break;case"INCREASE_ITEM_STORAGE":case 1:m.upgrade_type=1;break;case"INCREASE_POKEMON_STORAGE":case 2:m.upgrade_type=2;break}if(d.additional_storage!=null){m.additional_storage=d.additional_storage|0}return m};InventoryUpgrade.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id=o.enums===String?"ITEM_UNKNOWN":0;d.upgrade_type=o.enums===String?"UPGRADE_UNSET":0;d.additional_storage=0}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item_id]:m.item_id}if(m.upgrade_type!=null&&m.hasOwnProperty("upgrade_type")){d.upgrade_type=o.enums===String?$root.POGOProtos.Inventory.InventoryUpgradeType[m.upgrade_type]:m.upgrade_type}if(m.additional_storage!=null&&m.hasOwnProperty("additional_storage")){d.additional_storage=m.additional_storage}return d};InventoryUpgrade.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return InventoryUpgrade}();Inventory.InventoryUpgrades=function(){function InventoryUpgrades(p){this.inventory_upgrades=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}InventoryUpgrades.prototype.inventory_upgrades=$util.emptyArray;InventoryUpgrades.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.inventory_upgrades!=null&&m.inventory_upgrades.length){for(var i=0;i<m.inventory_upgrades.length;++i)$root.POGOProtos.Inventory.InventoryUpgrade.encode(m.inventory_upgrades[i],w.uint32(10).fork()).ldelim()}return w};InventoryUpgrades.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.InventoryUpgrades;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.inventory_upgrades&&m.inventory_upgrades.length))m.inventory_upgrades=[];m.inventory_upgrades.push($root.POGOProtos.Inventory.InventoryUpgrade.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};InventoryUpgrades.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.InventoryUpgrades)return d;var m=new $root.POGOProtos.Inventory.InventoryUpgrades;if(d.inventory_upgrades){if(!Array.isArray(d.inventory_upgrades))throw TypeError(".POGOProtos.Inventory.InventoryUpgrades.inventory_upgrades: array expected");m.inventory_upgrades=[];for(var i=0;i<d.inventory_upgrades.length;++i){if(typeof d.inventory_upgrades[i]!=="object")throw TypeError(".POGOProtos.Inventory.InventoryUpgrades.inventory_upgrades: object expected");m.inventory_upgrades[i]=$root.POGOProtos.Inventory.InventoryUpgrade.fromObject(d.inventory_upgrades[i])}}return m};InventoryUpgrades.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.inventory_upgrades=[]}if(m.inventory_upgrades&&m.inventory_upgrades.length){d.inventory_upgrades=[];for(var j=0;j<m.inventory_upgrades.length;++j){d.inventory_upgrades[j]=$root.POGOProtos.Inventory.InventoryUpgrade.toObject(m.inventory_upgrades[j],o)}}return d};InventoryUpgrades.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return InventoryUpgrades}();Inventory.InventoryUpgradeType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UPGRADE_UNSET"]=0;values[valuesById[1]="INCREASE_ITEM_STORAGE"]=1;values[valuesById[2]="INCREASE_POKEMON_STORAGE"]=2;return values}();Inventory.Item=function(){var Item={};Item.ItemAward=function(){function ItemAward(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ItemAward.prototype.item_id=0;ItemAward.prototype.item_count=0;ItemAward.prototype.bonus_count=0;ItemAward.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(8).int32(m.item_id);if(m.item_count!=null&&m.hasOwnProperty("item_count"))w.uint32(16).int32(m.item_count);if(m.bonus_count!=null&&m.hasOwnProperty("bonus_count"))w.uint32(24).int32(m.bonus_count);return w};ItemAward.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.Item.ItemAward;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.int32();break;case 2:m.item_count=r.int32();break;case 3:m.bonus_count=r.int32();break;default:r.skipType(t&7);break}}return m};ItemAward.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.Item.ItemAward)return d;var m=new $root.POGOProtos.Inventory.Item.ItemAward;switch(d.item_id){case"ITEM_UNKNOWN":case 0:m.item_id=0;break;case"ITEM_POKE_BALL":case 1:m.item_id=1;break;case"ITEM_GREAT_BALL":case 2:m.item_id=2;break;case"ITEM_ULTRA_BALL":case 3:m.item_id=3;break;case"ITEM_MASTER_BALL":case 4:m.item_id=4;break;case"ITEM_PREMIER_BALL":case 5:m.item_id=5;break;case"ITEM_POTION":case 101:m.item_id=101;break;case"ITEM_SUPER_POTION":case 102:m.item_id=102;break;case"ITEM_HYPER_POTION":case 103:m.item_id=103;break;case"ITEM_MAX_POTION":case 104:m.item_id=104;break;case"ITEM_REVIVE":case 201:m.item_id=201;break;case"ITEM_MAX_REVIVE":case 202:m.item_id=202;break;case"ITEM_LUCKY_EGG":case 301:m.item_id=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item_id=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item_id=402;break;case"ITEM_INCENSE_COOL":case 403:m.item_id=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item_id=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item_id=405;break;case"ITEM_TROY_DISK":case 501:m.item_id=501;break;case"ITEM_X_ATTACK":case 602:m.item_id=602;break;case"ITEM_X_DEFENSE":case 603:m.item_id=603;break;case"ITEM_X_MIRACLE":case 604:m.item_id=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item_id=701;break;case"ITEM_BLUK_BERRY":case 702:m.item_id=702;break;case"ITEM_NANAB_BERRY":case 703:m.item_id=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item_id=704;break;case"ITEM_PINAP_BERRY":case 705:m.item_id=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item_id=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item_id=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item_id=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item_id=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item_id=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item_id=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item_id=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item_id=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item_id=1002;break;case"ITEM_SUN_STONE":case 1101:m.item_id=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item_id=1102;break;case"ITEM_METAL_COAT":case 1103:m.item_id=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item_id=1104;break;case"ITEM_UP_GRADE":case 1105:m.item_id=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item_id=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item_id=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item_id=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item_id=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item_id=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item_id=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item_id=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item_id=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item_id=1405;break}if(d.item_count!=null){m.item_count=d.item_count|0}if(d.bonus_count!=null){m.bonus_count=d.bonus_count|0}return m};ItemAward.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id=o.enums===String?"ITEM_UNKNOWN":0;d.item_count=0;d.bonus_count=0}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item_id]:m.item_id}if(m.item_count!=null&&m.hasOwnProperty("item_count")){d.item_count=m.item_count}if(m.bonus_count!=null&&m.hasOwnProperty("bonus_count")){d.bonus_count=m.bonus_count}return d};ItemAward.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ItemAward}();Item.ItemData=function(){function ItemData(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ItemData.prototype.item_id=0;ItemData.prototype.count=0;ItemData.prototype.unseen=false;ItemData.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(8).int32(m.item_id);if(m.count!=null&&m.hasOwnProperty("count"))w.uint32(16).int32(m.count);if(m.unseen!=null&&m.hasOwnProperty("unseen"))w.uint32(24).bool(m.unseen);return w};ItemData.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.Item.ItemData;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.int32();break;case 2:m.count=r.int32();break;case 3:m.unseen=r.bool();break;default:r.skipType(t&7);break}}return m};ItemData.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.Item.ItemData)return d;var m=new $root.POGOProtos.Inventory.Item.ItemData;switch(d.item_id){case"ITEM_UNKNOWN":case 0:m.item_id=0;break;case"ITEM_POKE_BALL":case 1:m.item_id=1;break;case"ITEM_GREAT_BALL":case 2:m.item_id=2;break;case"ITEM_ULTRA_BALL":case 3:m.item_id=3;break;case"ITEM_MASTER_BALL":case 4:m.item_id=4;break;case"ITEM_PREMIER_BALL":case 5:m.item_id=5;break;case"ITEM_POTION":case 101:m.item_id=101;break;case"ITEM_SUPER_POTION":case 102:m.item_id=102;break;case"ITEM_HYPER_POTION":case 103:m.item_id=103;break;case"ITEM_MAX_POTION":case 104:m.item_id=104;break;case"ITEM_REVIVE":case 201:m.item_id=201;break;case"ITEM_MAX_REVIVE":case 202:m.item_id=202;break;case"ITEM_LUCKY_EGG":case 301:m.item_id=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item_id=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item_id=402;break;case"ITEM_INCENSE_COOL":case 403:m.item_id=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item_id=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item_id=405;break;case"ITEM_TROY_DISK":case 501:m.item_id=501;break;case"ITEM_X_ATTACK":case 602:m.item_id=602;break;case"ITEM_X_DEFENSE":case 603:m.item_id=603;break;case"ITEM_X_MIRACLE":case 604:m.item_id=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item_id=701;break;case"ITEM_BLUK_BERRY":case 702:m.item_id=702;break;case"ITEM_NANAB_BERRY":case 703:m.item_id=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item_id=704;break;case"ITEM_PINAP_BERRY":case 705:m.item_id=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item_id=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item_id=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item_id=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item_id=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item_id=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item_id=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item_id=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item_id=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item_id=1002;break;case"ITEM_SUN_STONE":case 1101:m.item_id=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item_id=1102;break;case"ITEM_METAL_COAT":case 1103:m.item_id=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item_id=1104;break;case"ITEM_UP_GRADE":case 1105:m.item_id=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item_id=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item_id=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item_id=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item_id=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item_id=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item_id=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item_id=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item_id=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item_id=1405;break}if(d.count!=null){m.count=d.count|0}if(d.unseen!=null){m.unseen=Boolean(d.unseen)}return m};ItemData.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id=o.enums===String?"ITEM_UNKNOWN":0;d.count=0;d.unseen=false}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item_id]:m.item_id}if(m.count!=null&&m.hasOwnProperty("count")){d.count=m.count}if(m.unseen!=null&&m.hasOwnProperty("unseen")){d.unseen=m.unseen}return d};ItemData.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ItemData}();Item.ItemId=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ITEM_UNKNOWN"]=0;values[valuesById[1]="ITEM_POKE_BALL"]=1;values[valuesById[2]="ITEM_GREAT_BALL"]=2;values[valuesById[3]="ITEM_ULTRA_BALL"]=3;values[valuesById[4]="ITEM_MASTER_BALL"]=4;values[valuesById[5]="ITEM_PREMIER_BALL"]=5;values[valuesById[101]="ITEM_POTION"]=101;values[valuesById[102]="ITEM_SUPER_POTION"]=102;values[valuesById[103]="ITEM_HYPER_POTION"]=103;values[valuesById[104]="ITEM_MAX_POTION"]=104;values[valuesById[201]="ITEM_REVIVE"]=201;values[valuesById[202]="ITEM_MAX_REVIVE"]=202;values[valuesById[301]="ITEM_LUCKY_EGG"]=301;values[valuesById[401]="ITEM_INCENSE_ORDINARY"]=401;values[valuesById[402]="ITEM_INCENSE_SPICY"]=402;values[valuesById[403]="ITEM_INCENSE_COOL"]=403;values[valuesById[404]="ITEM_INCENSE_FLORAL"]=404;values[valuesById[405]="ITEM_INCENSE_BELUGA_BOX"]=405;values[valuesById[501]="ITEM_TROY_DISK"]=501;values[valuesById[602]="ITEM_X_ATTACK"]=602;values[valuesById[603]="ITEM_X_DEFENSE"]=603;values[valuesById[604]="ITEM_X_MIRACLE"]=604;values[valuesById[701]="ITEM_RAZZ_BERRY"]=701;values[valuesById[702]="ITEM_BLUK_BERRY"]=702;values[valuesById[703]="ITEM_NANAB_BERRY"]=703;values[valuesById[704]="ITEM_WEPAR_BERRY"]=704;values[valuesById[705]="ITEM_PINAP_BERRY"]=705;values[valuesById[706]="ITEM_GOLDEN_RAZZ_BERRY"]=706;values[valuesById[707]="ITEM_GOLDEN_NANAB_BERRY"]=707;values[valuesById[708]="ITEM_GOLDEN_PINAP_BERRY"]=708;values[valuesById[801]="ITEM_SPECIAL_CAMERA"]=801;values[valuesById[901]="ITEM_INCUBATOR_BASIC_UNLIMITED"]=901;values[valuesById[902]="ITEM_INCUBATOR_BASIC"]=902;values[valuesById[903]="ITEM_INCUBATOR_SUPER"]=903;values[valuesById[1001]="ITEM_POKEMON_STORAGE_UPGRADE"]=1001;values[valuesById[1002]="ITEM_ITEM_STORAGE_UPGRADE"]=1002;values[valuesById[1101]="ITEM_SUN_STONE"]=1101;values[valuesById[1102]="ITEM_KINGS_ROCK"]=1102;values[valuesById[1103]="ITEM_METAL_COAT"]=1103;values[valuesById[1104]="ITEM_DRAGON_SCALE"]=1104;values[valuesById[1105]="ITEM_UP_GRADE"]=1105;values[valuesById[1106]="ITEM_GEN4_EVOLUTION_STONE"]=1106;values[valuesById[1201]="ITEM_MOVE_REROLL_FAST_ATTACK"]=1201;values[valuesById[1202]="ITEM_MOVE_REROLL_SPECIAL_ATTACK"]=1202;values[valuesById[1301]="ITEM_RARE_CANDY"]=1301;values[valuesById[1401]="ITEM_FREE_RAID_TICKET"]=1401;values[valuesById[1402]="ITEM_PAID_RAID_TICKET"]=1402;values[valuesById[1403]="ITEM_LEGENDARY_RAID_TICKET"]=1403;values[valuesById[1404]="ITEM_STAR_PIECE"]=1404;values[valuesById[1405]="ITEM_FRIEND_GIFT_BOX"]=1405;return values}();Item.ItemType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ITEM_TYPE_NONE"]=0;values[valuesById[1]="ITEM_TYPE_POKEBALL"]=1;values[valuesById[2]="ITEM_TYPE_POTION"]=2;values[valuesById[3]="ITEM_TYPE_REVIVE"]=3;values[valuesById[4]="ITEM_TYPE_MAP"]=4;values[valuesById[5]="ITEM_TYPE_BATTLE"]=5;values[valuesById[6]="ITEM_TYPE_FOOD"]=6;values[valuesById[7]="ITEM_TYPE_CAMERA"]=7;values[valuesById[8]="ITEM_TYPE_DISK"]=8;values[valuesById[9]="ITEM_TYPE_INCUBATOR"]=9;values[valuesById[10]="ITEM_TYPE_INCENSE"]=10;values[valuesById[11]="ITEM_TYPE_XP_BOOST"]=11;values[valuesById[12]="ITEM_TYPE_INVENTORY_UPGRADE"]=12;values[valuesById[13]="ITEM_TYPE_EVOLUTION_REQUIREMENT"]=13;values[valuesById[14]="ITEM_TYPE_MOVE_REROLL"]=14;values[valuesById[15]="ITEM_TYPE_CANDY"]=15;values[valuesById[16]="ITEM_TYPE_RAID_TICKET"]=16;values[valuesById[17]="ITEM_TYPE_STARDUST_BOOST"]=17;values[valuesById[18]="ITEM_TYPE_FRIEND_GIFT_BOX"]=18;return values}();return Item}();Inventory.Loot=function(){function Loot(p){this.loot_item=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Loot.prototype.loot_item=$util.emptyArray;Loot.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.loot_item!=null&&m.loot_item.length){for(var i=0;i<m.loot_item.length;++i)$root.POGOProtos.Inventory.LootItem.encode(m.loot_item[i],w.uint32(10).fork()).ldelim()}return w};Loot.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.Loot;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.loot_item&&m.loot_item.length))m.loot_item=[];m.loot_item.push($root.POGOProtos.Inventory.LootItem.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};Loot.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.Loot)return d;var m=new $root.POGOProtos.Inventory.Loot;if(d.loot_item){if(!Array.isArray(d.loot_item))throw TypeError(".POGOProtos.Inventory.Loot.loot_item: array expected");m.loot_item=[];for(var i=0;i<d.loot_item.length;++i){if(typeof d.loot_item[i]!=="object")throw TypeError(".POGOProtos.Inventory.Loot.loot_item: object expected");m.loot_item[i]=$root.POGOProtos.Inventory.LootItem.fromObject(d.loot_item[i])}}return m};Loot.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.loot_item=[]}if(m.loot_item&&m.loot_item.length){d.loot_item=[];for(var j=0;j<m.loot_item.length;++j){d.loot_item[j]=$root.POGOProtos.Inventory.LootItem.toObject(m.loot_item[j],o)}}return d};Loot.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Loot}();Inventory.LootItem=function(){function LootItem(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LootItem.prototype.item=0;LootItem.prototype.stardust=false;LootItem.prototype.pokecoin=false;LootItem.prototype.pokemon_candy=0;LootItem.prototype.count=0;LootItem.prototype.experience=false;LootItem.prototype.pokemon_egg=null;var $oneOfFields;Object.defineProperty(LootItem.prototype,"Type",{get:$util.oneOfGetter($oneOfFields=["item","stardust","pokecoin","pokemon_candy","count","experience","pokemon_egg"]),set:$util.oneOfSetter($oneOfFields)});LootItem.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item!=null&&m.hasOwnProperty("item"))w.uint32(8).int32(m.item);if(m.stardust!=null&&m.hasOwnProperty("stardust"))w.uint32(16).bool(m.stardust);if(m.pokecoin!=null&&m.hasOwnProperty("pokecoin"))w.uint32(24).bool(m.pokecoin);if(m.pokemon_candy!=null&&m.hasOwnProperty("pokemon_candy"))w.uint32(32).int32(m.pokemon_candy);if(m.count!=null&&m.hasOwnProperty("count"))w.uint32(40).int32(m.count);if(m.experience!=null&&m.hasOwnProperty("experience"))w.uint32(48).bool(m.experience);if(m.pokemon_egg!=null&&m.hasOwnProperty("pokemon_egg"))$root.POGOProtos.Data.PokemonData.encode(m.pokemon_egg,w.uint32(58).fork()).ldelim();return w};LootItem.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.LootItem;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item=r.int32();break;case 2:m.stardust=r.bool();break;case 3:m.pokecoin=r.bool();break;case 4:m.pokemon_candy=r.int32();break;case 5:m.count=r.int32();break;case 6:m.experience=r.bool();break;case 7:m.pokemon_egg=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};LootItem.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.LootItem)return d;var m=new $root.POGOProtos.Inventory.LootItem;switch(d.item){case"ITEM_UNKNOWN":case 0:m.item=0;break;case"ITEM_POKE_BALL":case 1:m.item=1;break;case"ITEM_GREAT_BALL":case 2:m.item=2;break;case"ITEM_ULTRA_BALL":case 3:m.item=3;break;case"ITEM_MASTER_BALL":case 4:m.item=4;break;case"ITEM_PREMIER_BALL":case 5:m.item=5;break;case"ITEM_POTION":case 101:m.item=101;break;case"ITEM_SUPER_POTION":case 102:m.item=102;break;case"ITEM_HYPER_POTION":case 103:m.item=103;break;case"ITEM_MAX_POTION":case 104:m.item=104;break;case"ITEM_REVIVE":case 201:m.item=201;break;case"ITEM_MAX_REVIVE":case 202:m.item=202;break;case"ITEM_LUCKY_EGG":case 301:m.item=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item=402;break;case"ITEM_INCENSE_COOL":case 403:m.item=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item=405;break;case"ITEM_TROY_DISK":case 501:m.item=501;break;case"ITEM_X_ATTACK":case 602:m.item=602;break;case"ITEM_X_DEFENSE":case 603:m.item=603;break;case"ITEM_X_MIRACLE":case 604:m.item=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item=701;break;case"ITEM_BLUK_BERRY":case 702:m.item=702;break;case"ITEM_NANAB_BERRY":case 703:m.item=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item=704;break;case"ITEM_PINAP_BERRY":case 705:m.item=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item=1002;break;case"ITEM_SUN_STONE":case 1101:m.item=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item=1102;break;case"ITEM_METAL_COAT":case 1103:m.item=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item=1104;break;case"ITEM_UP_GRADE":case 1105:m.item=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item=1405;break}if(d.stardust!=null){m.stardust=Boolean(d.stardust)}if(d.pokecoin!=null){m.pokecoin=Boolean(d.pokecoin)}switch(d.pokemon_candy){case"MISSINGNO":case 0:m.pokemon_candy=0;break;case"BULBASAUR":case 1:m.pokemon_candy=1;break;case"IVYSAUR":case 2:m.pokemon_candy=2;break;case"VENUSAUR":case 3:m.pokemon_candy=3;break;case"CHARMANDER":case 4:m.pokemon_candy=4;break;case"CHARMELEON":case 5:m.pokemon_candy=5;break;case"CHARIZARD":case 6:m.pokemon_candy=6;break;case"SQUIRTLE":case 7:m.pokemon_candy=7;break;case"WARTORTLE":case 8:m.pokemon_candy=8;break;case"BLASTOISE":case 9:m.pokemon_candy=9;break;case"CATERPIE":case 10:m.pokemon_candy=10;break;case"METAPOD":case 11:m.pokemon_candy=11;break;case"BUTTERFREE":case 12:m.pokemon_candy=12;break;case"WEEDLE":case 13:m.pokemon_candy=13;break;case"KAKUNA":case 14:m.pokemon_candy=14;break;case"BEEDRILL":case 15:m.pokemon_candy=15;break;case"PIDGEY":case 16:m.pokemon_candy=16;break;case"PIDGEOTTO":case 17:m.pokemon_candy=17;break;case"PIDGEOT":case 18:m.pokemon_candy=18;break;case"RATTATA":case 19:m.pokemon_candy=19;break;case"RATICATE":case 20:m.pokemon_candy=20;break;case"SPEAROW":case 21:m.pokemon_candy=21;break;case"FEAROW":case 22:m.pokemon_candy=22;break;case"EKANS":case 23:m.pokemon_candy=23;break;case"ARBOK":case 24:m.pokemon_candy=24;break;case"PIKACHU":case 25:m.pokemon_candy=25;break;case"RAICHU":case 26:m.pokemon_candy=26;break;case"SANDSHREW":case 27:m.pokemon_candy=27;break;case"SANDSLASH":case 28:m.pokemon_candy=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_candy=29;break;case"NIDORINA":case 30:m.pokemon_candy=30;break;case"NIDOQUEEN":case 31:m.pokemon_candy=31;break;case"NIDORAN_MALE":case 32:m.pokemon_candy=32;break;case"NIDORINO":case 33:m.pokemon_candy=33;break;case"NIDOKING":case 34:m.pokemon_candy=34;break;case"CLEFAIRY":case 35:m.pokemon_candy=35;break;case"CLEFABLE":case 36:m.pokemon_candy=36;break;case"VULPIX":case 37:m.pokemon_candy=37;break;case"NINETALES":case 38:m.pokemon_candy=38;break;case"JIGGLYPUFF":case 39:m.pokemon_candy=39;break;case"WIGGLYTUFF":case 40:m.pokemon_candy=40;break;case"ZUBAT":case 41:m.pokemon_candy=41;break;case"GOLBAT":case 42:m.pokemon_candy=42;break;case"ODDISH":case 43:m.pokemon_candy=43;break;case"GLOOM":case 44:m.pokemon_candy=44;break;case"VILEPLUME":case 45:m.pokemon_candy=45;break;case"PARAS":case 46:m.pokemon_candy=46;break;case"PARASECT":case 47:m.pokemon_candy=47;break;case"VENONAT":case 48:m.pokemon_candy=48;break;case"VENOMOTH":case 49:m.pokemon_candy=49;break;case"DIGLETT":case 50:m.pokemon_candy=50;break;case"DUGTRIO":case 51:m.pokemon_candy=51;break;case"MEOWTH":case 52:m.pokemon_candy=52;break;case"PERSIAN":case 53:m.pokemon_candy=53;break;case"PSYDUCK":case 54:m.pokemon_candy=54;break;case"GOLDUCK":case 55:m.pokemon_candy=55;break;case"MANKEY":case 56:m.pokemon_candy=56;break;case"PRIMEAPE":case 57:m.pokemon_candy=57;break;case"GROWLITHE":case 58:m.pokemon_candy=58;break;case"ARCANINE":case 59:m.pokemon_candy=59;break;case"POLIWAG":case 60:m.pokemon_candy=60;break;case"POLIWHIRL":case 61:m.pokemon_candy=61;break;case"POLIWRATH":case 62:m.pokemon_candy=62;break;case"ABRA":case 63:m.pokemon_candy=63;break;case"KADABRA":case 64:m.pokemon_candy=64;break;case"ALAKAZAM":case 65:m.pokemon_candy=65;break;case"MACHOP":case 66:m.pokemon_candy=66;break;case"MACHOKE":case 67:m.pokemon_candy=67;break;case"MACHAMP":case 68:m.pokemon_candy=68;break;case"BELLSPROUT":case 69:m.pokemon_candy=69;break;case"WEEPINBELL":case 70:m.pokemon_candy=70;break;case"VICTREEBEL":case 71:m.pokemon_candy=71;break;case"TENTACOOL":case 72:m.pokemon_candy=72;break;case"TENTACRUEL":case 73:m.pokemon_candy=73;break;case"GEODUDE":case 74:m.pokemon_candy=74;break;case"GRAVELER":case 75:m.pokemon_candy=75;break;case"GOLEM":case 76:m.pokemon_candy=76;break;case"PONYTA":case 77:m.pokemon_candy=77;break;case"RAPIDASH":case 78:m.pokemon_candy=78;break;case"SLOWPOKE":case 79:m.pokemon_candy=79;break;case"SLOWBRO":case 80:m.pokemon_candy=80;break;case"MAGNEMITE":case 81:m.pokemon_candy=81;break;case"MAGNETON":case 82:m.pokemon_candy=82;break;case"FARFETCHD":case 83:m.pokemon_candy=83;break;case"DODUO":case 84:m.pokemon_candy=84;break;case"DODRIO":case 85:m.pokemon_candy=85;break;case"SEEL":case 86:m.pokemon_candy=86;break;case"DEWGONG":case 87:m.pokemon_candy=87;break;case"GRIMER":case 88:m.pokemon_candy=88;break;case"MUK":case 89:m.pokemon_candy=89;break;case"SHELLDER":case 90:m.pokemon_candy=90;break;case"CLOYSTER":case 91:m.pokemon_candy=91;break;case"GASTLY":case 92:m.pokemon_candy=92;break;case"HAUNTER":case 93:m.pokemon_candy=93;break;case"GENGAR":case 94:m.pokemon_candy=94;break;case"ONIX":case 95:m.pokemon_candy=95;break;case"DROWZEE":case 96:m.pokemon_candy=96;break;case"HYPNO":case 97:m.pokemon_candy=97;break;case"KRABBY":case 98:m.pokemon_candy=98;break;case"KINGLER":case 99:m.pokemon_candy=99;break;case"VOLTORB":case 100:m.pokemon_candy=100;break;case"ELECTRODE":case 101:m.pokemon_candy=101;break;case"EXEGGCUTE":case 102:m.pokemon_candy=102;break;case"EXEGGUTOR":case 103:m.pokemon_candy=103;break;case"CUBONE":case 104:m.pokemon_candy=104;break;case"MAROWAK":case 105:m.pokemon_candy=105;break;case"HITMONLEE":case 106:m.pokemon_candy=106;break;case"HITMONCHAN":case 107:m.pokemon_candy=107;break;case"LICKITUNG":case 108:m.pokemon_candy=108;break;case"KOFFING":case 109:m.pokemon_candy=109;break;case"WEEZING":case 110:m.pokemon_candy=110;break;case"RHYHORN":case 111:m.pokemon_candy=111;break;case"RHYDON":case 112:m.pokemon_candy=112;break;case"CHANSEY":case 113:m.pokemon_candy=113;break;case"TANGELA":case 114:m.pokemon_candy=114;break;case"KANGASKHAN":case 115:m.pokemon_candy=115;break;case"HORSEA":case 116:m.pokemon_candy=116;break;case"SEADRA":case 117:m.pokemon_candy=117;break;case"GOLDEEN":case 118:m.pokemon_candy=118;break;case"SEAKING":case 119:m.pokemon_candy=119;break;case"STARYU":case 120:m.pokemon_candy=120;break;case"STARMIE":case 121:m.pokemon_candy=121;break;case"MR_MIME":case 122:m.pokemon_candy=122;break;case"SCYTHER":case 123:m.pokemon_candy=123;break;case"JYNX":case 124:m.pokemon_candy=124;break;case"ELECTABUZZ":case 125:m.pokemon_candy=125;break;case"MAGMAR":case 126:m.pokemon_candy=126;break;case"PINSIR":case 127:m.pokemon_candy=127;break;case"TAUROS":case 128:m.pokemon_candy=128;break;case"MAGIKARP":case 129:m.pokemon_candy=129;break;case"GYARADOS":case 130:m.pokemon_candy=130;break;case"LAPRAS":case 131:m.pokemon_candy=131;break;case"DITTO":case 132:m.pokemon_candy=132;break;case"EEVEE":case 133:m.pokemon_candy=133;break;case"VAPOREON":case 134:m.pokemon_candy=134;break;case"JOLTEON":case 135:m.pokemon_candy=135;break;case"FLAREON":case 136:m.pokemon_candy=136;break;case"PORYGON":case 137:m.pokemon_candy=137;break;case"OMANYTE":case 138:m.pokemon_candy=138;break;case"OMASTAR":case 139:m.pokemon_candy=139;break;case"KABUTO":case 140:m.pokemon_candy=140;break;case"KABUTOPS":case 141:m.pokemon_candy=141;break;case"AERODACTYL":case 142:m.pokemon_candy=142;break;case"SNORLAX":case 143:m.pokemon_candy=143;break;case"ARTICUNO":case 144:m.pokemon_candy=144;break;case"ZAPDOS":case 145:m.pokemon_candy=145;break;case"MOLTRES":case 146:m.pokemon_candy=146;break;case"DRATINI":case 147:m.pokemon_candy=147;break;case"DRAGONAIR":case 148:m.pokemon_candy=148;break;case"DRAGONITE":case 149:m.pokemon_candy=149;break;case"MEWTWO":case 150:m.pokemon_candy=150;break;case"MEW":case 151:m.pokemon_candy=151;break;case"CHIKORITA":case 152:m.pokemon_candy=152;break;case"BAYLEEF":case 153:m.pokemon_candy=153;break;case"MEGANIUM":case 154:m.pokemon_candy=154;break;case"CYNDAQUIL":case 155:m.pokemon_candy=155;break;case"QUILAVA":case 156:m.pokemon_candy=156;break;case"TYPHLOSION":case 157:m.pokemon_candy=157;break;case"TOTODILE":case 158:m.pokemon_candy=158;break;case"CROCONAW":case 159:m.pokemon_candy=159;break;case"FERALIGATR":case 160:m.pokemon_candy=160;break;case"SENTRET":case 161:m.pokemon_candy=161;break;case"FURRET":case 162:m.pokemon_candy=162;break;case"HOOTHOOT":case 163:m.pokemon_candy=163;break;case"NOCTOWL":case 164:m.pokemon_candy=164;break;case"LEDYBA":case 165:m.pokemon_candy=165;break;case"LEDIAN":case 166:m.pokemon_candy=166;break;case"SPINARAK":case 167:m.pokemon_candy=167;break;case"ARIADOS":case 168:m.pokemon_candy=168;break;case"CROBAT":case 169:m.pokemon_candy=169;break;case"CHINCHOU":case 170:m.pokemon_candy=170;break;case"LANTURN":case 171:m.pokemon_candy=171;break;case"PICHU":case 172:m.pokemon_candy=172;break;case"CLEFFA":case 173:m.pokemon_candy=173;break;case"IGGLYBUFF":case 174:m.pokemon_candy=174;break;case"TOGEPI":case 175:m.pokemon_candy=175;break;case"TOGETIC":case 176:m.pokemon_candy=176;break;case"NATU":case 177:m.pokemon_candy=177;break;case"XATU":case 178:m.pokemon_candy=178;break;case"MAREEP":case 179:m.pokemon_candy=179;break;case"FLAAFFY":case 180:m.pokemon_candy=180;break;case"AMPHAROS":case 181:m.pokemon_candy=181;break;case"BELLOSSOM":case 182:m.pokemon_candy=182;break;case"MARILL":case 183:m.pokemon_candy=183;break;case"AZUMARILL":case 184:m.pokemon_candy=184;break;case"SUDOWOODO":case 185:m.pokemon_candy=185;break;case"POLITOED":case 186:m.pokemon_candy=186;break;case"HOPPIP":case 187:m.pokemon_candy=187;break;case"SKIPLOOM":case 188:m.pokemon_candy=188;break;case"JUMPLUFF":case 189:m.pokemon_candy=189;break;case"AIPOM":case 190:m.pokemon_candy=190;break;case"SUNKERN":case 191:m.pokemon_candy=191;break;case"SUNFLORA":case 192:m.pokemon_candy=192;break;case"YANMA":case 193:m.pokemon_candy=193;break;case"WOOPER":case 194:m.pokemon_candy=194;break;case"QUAGSIRE":case 195:m.pokemon_candy=195;break;case"ESPEON":case 196:m.pokemon_candy=196;break;case"UMBREON":case 197:m.pokemon_candy=197;break;case"MURKROW":case 198:m.pokemon_candy=198;break;case"SLOWKING":case 199:m.pokemon_candy=199;break;case"MISDREAVUS":case 200:m.pokemon_candy=200;break;case"UNOWN":case 201:m.pokemon_candy=201;break;case"WOBBUFFET":case 202:m.pokemon_candy=202;break;case"GIRAFARIG":case 203:m.pokemon_candy=203;break;case"PINECO":case 204:m.pokemon_candy=204;break;case"FORRETRESS":case 205:m.pokemon_candy=205;break;case"DUNSPARCE":case 206:m.pokemon_candy=206;break;case"GLIGAR":case 207:m.pokemon_candy=207;break;case"STEELIX":case 208:m.pokemon_candy=208;break;case"SNUBBULL":case 209:m.pokemon_candy=209;break;case"GRANBULL":case 210:m.pokemon_candy=210;break;case"QWILFISH":case 211:m.pokemon_candy=211;break;case"SCIZOR":case 212:m.pokemon_candy=212;break;case"SHUCKLE":case 213:m.pokemon_candy=213;break;case"HERACROSS":case 214:m.pokemon_candy=214;break;case"SNEASEL":case 215:m.pokemon_candy=215;break;case"TEDDIURSA":case 216:m.pokemon_candy=216;break;case"URSARING":case 217:m.pokemon_candy=217;break;case"SLUGMA":case 218:m.pokemon_candy=218;break;case"MAGCARGO":case 219:m.pokemon_candy=219;break;case"SWINUB":case 220:m.pokemon_candy=220;break;case"PILOSWINE":case 221:m.pokemon_candy=221;break;case"CORSOLA":case 222:m.pokemon_candy=222;break;case"REMORAID":case 223:m.pokemon_candy=223;break;case"OCTILLERY":case 224:m.pokemon_candy=224;break;case"DELIBIRD":case 225:m.pokemon_candy=225;break;case"MANTINE":case 226:m.pokemon_candy=226;break;case"SKARMORY":case 227:m.pokemon_candy=227;break;case"HOUNDOUR":case 228:m.pokemon_candy=228;break;case"HOUNDOOM":case 229:m.pokemon_candy=229;break;case"KINGDRA":case 230:m.pokemon_candy=230;break;case"PHANPY":case 231:m.pokemon_candy=231;break;case"DONPHAN":case 232:m.pokemon_candy=232;break;case"PORYGON2":case 233:m.pokemon_candy=233;break;case"STANTLER":case 234:m.pokemon_candy=234;break;case"SMEARGLE":case 235:m.pokemon_candy=235;break;case"TYROGUE":case 236:m.pokemon_candy=236;break;case"HITMONTOP":case 237:m.pokemon_candy=237;break;case"SMOOCHUM":case 238:m.pokemon_candy=238;break;case"ELEKID":case 239:m.pokemon_candy=239;break;case"MAGBY":case 240:m.pokemon_candy=240;break;case"MILTANK":case 241:m.pokemon_candy=241;break;case"BLISSEY":case 242:m.pokemon_candy=242;break;case"RAIKOU":case 243:m.pokemon_candy=243;break;case"ENTEI":case 244:m.pokemon_candy=244;break;case"SUICUNE":case 245:m.pokemon_candy=245;break;case"LARVITAR":case 246:m.pokemon_candy=246;break;case"PUPITAR":case 247:m.pokemon_candy=247;break;case"TYRANITAR":case 248:m.pokemon_candy=248;break;case"LUGIA":case 249:m.pokemon_candy=249;break;case"HO_OH":case 250:m.pokemon_candy=250;break;case"CELEBI":case 251:m.pokemon_candy=251;break;case"TREECKO":case 252:m.pokemon_candy=252;break;case"GROVYLE":case 253:m.pokemon_candy=253;break;case"SCEPTILE":case 254:m.pokemon_candy=254;break;case"TORCHIC":case 255:m.pokemon_candy=255;break;case"COMBUSKEN":case 256:m.pokemon_candy=256;break;case"BLAZIKEN":case 257:m.pokemon_candy=257;break;case"MUDKIP":case 258:m.pokemon_candy=258;break;case"MARSHTOMP":case 259:m.pokemon_candy=259;break;case"SWAMPERT":case 260:m.pokemon_candy=260;break;case"POOCHYENA":case 261:m.pokemon_candy=261;break;case"MIGHTYENA":case 262:m.pokemon_candy=262;break;case"ZIGZAGOON":case 263:m.pokemon_candy=263;break;case"LINOONE":case 264:m.pokemon_candy=264;break;case"WURMPLE":case 265:m.pokemon_candy=265;break;case"SILCOON":case 266:m.pokemon_candy=266;break;case"BEAUTIFLY":case 267:m.pokemon_candy=267;break;case"CASCOON":case 268:m.pokemon_candy=268;break;case"DUSTOX":case 269:m.pokemon_candy=269;break;case"LOTAD":case 270:m.pokemon_candy=270;break;case"LOMBRE":case 271:m.pokemon_candy=271;break;case"LUDICOLO":case 272:m.pokemon_candy=272;break;case"SEEDOT":case 273:m.pokemon_candy=273;break;case"NUZLEAF":case 274:m.pokemon_candy=274;break;case"SHIFTRY":case 275:m.pokemon_candy=275;break;case"TAILLOW":case 276:m.pokemon_candy=276;break;case"SWELLOW":case 277:m.pokemon_candy=277;break;case"WINGULL":case 278:m.pokemon_candy=278;break;case"PELIPPER":case 279:m.pokemon_candy=279;break;case"RALTS":case 280:m.pokemon_candy=280;break;case"KIRLIA":case 281:m.pokemon_candy=281;break;case"GARDEVOIR":case 282:m.pokemon_candy=282;break;case"SURSKIT":case 283:m.pokemon_candy=283;break;case"MASQUERAIN":case 284:m.pokemon_candy=284;break;case"SHROOMISH":case 285:m.pokemon_candy=285;break;case"BRELOOM":case 286:m.pokemon_candy=286;break;case"SLAKOTH":case 287:m.pokemon_candy=287;break;case"VIGOROTH":case 288:m.pokemon_candy=288;break;case"SLAKING":case 289:m.pokemon_candy=289;break;case"NINCADA":case 290:m.pokemon_candy=290;break;case"NINJASK":case 291:m.pokemon_candy=291;break;case"SHEDINJA":case 292:m.pokemon_candy=292;break;case"WHISMUR":case 293:m.pokemon_candy=293;break;case"LOUDRED":case 294:m.pokemon_candy=294;break;case"EXPLOUD":case 295:m.pokemon_candy=295;break;case"MAKUHITA":case 296:m.pokemon_candy=296;break;case"HARIYAMA":case 297:m.pokemon_candy=297;break;case"AZURILL":case 298:m.pokemon_candy=298;break;case"NOSEPASS":case 299:m.pokemon_candy=299;break;case"SKITTY":case 300:m.pokemon_candy=300;break;case"DELCATTY":case 301:m.pokemon_candy=301;break;case"SABLEYE":case 302:m.pokemon_candy=302;break;case"MAWILE":case 303:m.pokemon_candy=303;break;case"ARON":case 304:m.pokemon_candy=304;break;case"LAIRON":case 305:m.pokemon_candy=305;break;case"AGGRON":case 306:m.pokemon_candy=306;break;case"MEDITITE":case 307:m.pokemon_candy=307;break;case"MEDICHAM":case 308:m.pokemon_candy=308;break;case"ELECTRIKE":case 309:m.pokemon_candy=309;break;case"MANECTRIC":case 310:m.pokemon_candy=310;break;case"PLUSLE":case 311:m.pokemon_candy=311;break;case"MINUN":case 312:m.pokemon_candy=312;break;case"VOLBEAT":case 313:m.pokemon_candy=313;break;case"ILLUMISE":case 314:m.pokemon_candy=314;break;case"ROSELIA":case 315:m.pokemon_candy=315;break;case"GULPIN":case 316:m.pokemon_candy=316;break;case"SWALOT":case 317:m.pokemon_candy=317;break;case"CARVANHA":case 318:m.pokemon_candy=318;break;case"SHARPEDO":case 319:m.pokemon_candy=319;break;case"WAILMER":case 320:m.pokemon_candy=320;break;case"WAILORD":case 321:m.pokemon_candy=321;break;case"NUMEL":case 322:m.pokemon_candy=322;break;case"CAMERUPT":case 323:m.pokemon_candy=323;break;case"TORKOAL":case 324:m.pokemon_candy=324;break;case"SPOINK":case 325:m.pokemon_candy=325;break;case"GRUMPIG":case 326:m.pokemon_candy=326;break;case"SPINDA":case 327:m.pokemon_candy=327;break;case"TRAPINCH":case 328:m.pokemon_candy=328;break;case"VIBRAVA":case 329:m.pokemon_candy=329;break;case"FLYGON":case 330:m.pokemon_candy=330;break;case"CACNEA":case 331:m.pokemon_candy=331;break;case"CACTURNE":case 332:m.pokemon_candy=332;break;case"SWABLU":case 333:m.pokemon_candy=333;break;case"ALTARIA":case 334:m.pokemon_candy=334;break;case"ZANGOOSE":case 335:m.pokemon_candy=335;break;case"SEVIPER":case 336:m.pokemon_candy=336;break;case"LUNATONE":case 337:m.pokemon_candy=337;break;case"SOLROCK":case 338:m.pokemon_candy=338;break;case"BARBOACH":case 339:m.pokemon_candy=339;break;case"WHISCASH":case 340:m.pokemon_candy=340;break;case"CORPHISH":case 341:m.pokemon_candy=341;break;case"CRAWDAUNT":case 342:m.pokemon_candy=342;break;case"BALTOY":case 343:m.pokemon_candy=343;break;case"CLAYDOL":case 344:m.pokemon_candy=344;break;case"LILEEP":case 345:m.pokemon_candy=345;break;case"CRADILY":case 346:m.pokemon_candy=346;break;case"ANORITH":case 347:m.pokemon_candy=347;break;case"ARMALDO":case 348:m.pokemon_candy=348;break;case"FEEBAS":case 349:m.pokemon_candy=349;break;case"MILOTIC":case 350:m.pokemon_candy=350;break;case"CASTFORM":case 351:m.pokemon_candy=351;break;case"KECLEON":case 352:m.pokemon_candy=352;break;case"SHUPPET":case 353:m.pokemon_candy=353;break;case"BANETTE":case 354:m.pokemon_candy=354;break;case"DUSKULL":case 355:m.pokemon_candy=355;break;case"DUSCLOPS":case 356:m.pokemon_candy=356;break;case"TROPIUS":case 357:m.pokemon_candy=357;break;case"CHIMECHO":case 358:m.pokemon_candy=358;break;case"ABSOL":case 359:m.pokemon_candy=359;break;case"WYNAUT":case 360:m.pokemon_candy=360;break;case"SNORUNT":case 361:m.pokemon_candy=361;break;case"GLALIE":case 362:m.pokemon_candy=362;break;case"SPHEAL":case 363:m.pokemon_candy=363;break;case"SEALEO":case 364:m.pokemon_candy=364;break;case"WALREIN":case 365:m.pokemon_candy=365;break;case"CLAMPERL":case 366:m.pokemon_candy=366;break;case"HUNTAIL":case 367:m.pokemon_candy=367;break;case"GOREBYSS":case 368:m.pokemon_candy=368;break;case"RELICANTH":case 369:m.pokemon_candy=369;break;case"LUVDISC":case 370:m.pokemon_candy=370;break;case"BAGON":case 371:m.pokemon_candy=371;break;case"SHELGON":case 372:m.pokemon_candy=372;break;case"SALAMENCE":case 373:m.pokemon_candy=373;break;case"BELDUM":case 374:m.pokemon_candy=374;break;case"METANG":case 375:m.pokemon_candy=375;break;case"METAGROSS":case 376:m.pokemon_candy=376;break;case"REGIROCK":case 377:m.pokemon_candy=377;break;case"REGICE":case 378:m.pokemon_candy=378;break;case"REGISTEEL":case 379:m.pokemon_candy=379;break;case"LATIAS":case 380:m.pokemon_candy=380;break;case"LATIOS":case 381:m.pokemon_candy=381;break;case"KYOGRE":case 382:m.pokemon_candy=382;break;case"GROUDON":case 383:m.pokemon_candy=383;break;case"RAYQUAZA":case 384:m.pokemon_candy=384;break;case"JIRACHI":case 385:m.pokemon_candy=385;break;case"DEOXYS":case 386:m.pokemon_candy=386;break;case"TURTWIG":case 387:m.pokemon_candy=387;break;case"GROTLE":case 388:m.pokemon_candy=388;break;case"TORTERRA":case 389:m.pokemon_candy=389;break;case"CHIMCHAR":case 390:m.pokemon_candy=390;break;case"MONFERNO":case 391:m.pokemon_candy=391;break;case"INFERNAPE":case 392:m.pokemon_candy=392;break;case"PIPLUP":case 393:m.pokemon_candy=393;break;case"PRINPLUP":case 394:m.pokemon_candy=394;break;case"EMPOLEON":case 395:m.pokemon_candy=395;break;case"STARLY":case 396:m.pokemon_candy=396;break;case"STARAVIA":case 397:m.pokemon_candy=397;break;case"STARAPTOR":case 398:m.pokemon_candy=398;break;case"BIDOOF":case 399:m.pokemon_candy=399;break;case"BIBAREL":case 400:m.pokemon_candy=400;break;case"KRICKETOT":case 401:m.pokemon_candy=401;break;case"KRICKETUNE":case 402:m.pokemon_candy=402;break;case"SHINX":case 403:m.pokemon_candy=403;break;case"LUXIO":case 404:m.pokemon_candy=404;break;case"LUXRAY":case 405:m.pokemon_candy=405;break;case"BUDEW":case 406:m.pokemon_candy=406;break;case"ROSERADE":case 407:m.pokemon_candy=407;break;case"CRANIDOS":case 408:m.pokemon_candy=408;break;case"RAMPARDOS":case 409:m.pokemon_candy=409;break;case"SHIELDON":case 410:m.pokemon_candy=410;break;case"BASTIODON":case 411:m.pokemon_candy=411;break;case"BURMY":case 412:m.pokemon_candy=412;break;case"WORMADAM":case 413:m.pokemon_candy=413;break;case"MOTHIM":case 414:m.pokemon_candy=414;break;case"COMBEE":case 415:m.pokemon_candy=415;break;case"VESPIQUEN":case 416:m.pokemon_candy=416;break;case"PACHIRISU":case 417:m.pokemon_candy=417;break;case"BUIZEL":case 418:m.pokemon_candy=418;break;case"FLOATZEL":case 419:m.pokemon_candy=419;break;case"CHERUBI":case 420:m.pokemon_candy=420;break;case"CHERRIM":case 421:m.pokemon_candy=421;break;case"SHELLOS":case 422:m.pokemon_candy=422;break;case"GASTRODON":case 423:m.pokemon_candy=423;break;case"AMBIPOM":case 424:m.pokemon_candy=424;break;case"DRIFLOON":case 425:m.pokemon_candy=425;break;case"DRIFBLIM":case 426:m.pokemon_candy=426;break;case"BUNEARY":case 427:m.pokemon_candy=427;break;case"LOPUNNY":case 428:m.pokemon_candy=428;break;case"MISMAGIUS":case 429:m.pokemon_candy=429;break;case"HONCHKROW":case 430:m.pokemon_candy=430;break;case"GLAMEOW":case 431:m.pokemon_candy=431;break;case"PURUGLY":case 432:m.pokemon_candy=432;break;case"CHINGLING":case 433:m.pokemon_candy=433;break;case"STUNKY":case 434:m.pokemon_candy=434;break;case"SKUNTANK":case 435:m.pokemon_candy=435;break;case"BRONZOR":case 436:m.pokemon_candy=436;break;case"BRONZONG":case 437:m.pokemon_candy=437;break;case"BONSLY":case 438:m.pokemon_candy=438;break;case"MIME_JR":case 439:m.pokemon_candy=439;break;case"HAPPINY":case 440:m.pokemon_candy=440;break;case"CHATOT":case 441:m.pokemon_candy=441;break;case"SPIRITOMB":case 442:m.pokemon_candy=442;break;case"GIBLE":case 443:m.pokemon_candy=443;break;case"GABITE":case 444:m.pokemon_candy=444;break;case"GARCHOMP":case 445:m.pokemon_candy=445;break;case"MUNCHLAX":case 446:m.pokemon_candy=446;break;case"RIOLU":case 447:m.pokemon_candy=447;break;case"LUCARIO":case 448:m.pokemon_candy=448;break;case"HIPPOPOTAS":case 449:m.pokemon_candy=449;break;case"HIPPOWDON":case 450:m.pokemon_candy=450;break;case"SKORUPI":case 451:m.pokemon_candy=451;break;case"DRAPION":case 452:m.pokemon_candy=452;break;case"CROAGUNK":case 453:m.pokemon_candy=453;break;case"TOXICROAK":case 454:m.pokemon_candy=454;break;case"CARNIVINE":case 455:m.pokemon_candy=455;break;case"FINNEON":case 456:m.pokemon_candy=456;break;case"LUMINEON":case 457:m.pokemon_candy=457;break;case"MANTYKE":case 458:m.pokemon_candy=458;break;case"SNOVER":case 459:m.pokemon_candy=459;break;case"ABOMASNOW":case 460:m.pokemon_candy=460;break;case"WEAVILE":case 461:m.pokemon_candy=461;break;case"MAGNEZONE":case 462:m.pokemon_candy=462;break;case"LICKILICKY":case 463:m.pokemon_candy=463;break;case"RHYPERIOR":case 464:m.pokemon_candy=464;break;case"TANGROWTH":case 465:m.pokemon_candy=465;break;case"ELECTIVIRE":case 466:m.pokemon_candy=466;break;case"MAGMORTAR":case 467:m.pokemon_candy=467;break;case"TOGEKISS":case 468:m.pokemon_candy=468;break;case"YANMEGA":case 469:m.pokemon_candy=469;break;case"LEAFEON":case 470:m.pokemon_candy=470;break;case"GLACEON":case 471:m.pokemon_candy=471;break;case"GLISCOR":case 472:m.pokemon_candy=472;break;case"MAMOSWINE":case 473:m.pokemon_candy=473;break;case"PORYGON_Z":case 474:m.pokemon_candy=474;break;case"GALLADE":case 475:m.pokemon_candy=475;break;case"PROBOPASS":case 476:m.pokemon_candy=476;break;case"DUSKNOIR":case 477:m.pokemon_candy=477;break;case"FROSLASS":case 478:m.pokemon_candy=478;break;case"ROTOM":case 479:m.pokemon_candy=479;break;case"UXIE":case 480:m.pokemon_candy=480;break;case"MESPRIT":case 481:m.pokemon_candy=481;break;case"AZELF":case 482:m.pokemon_candy=482;break;case"DIALGA":case 483:m.pokemon_candy=483;break;case"PALKIA":case 484:m.pokemon_candy=484;break;case"HEATRAN":case 485:m.pokemon_candy=485;break;case"REGIGIGAS":case 486:m.pokemon_candy=486;break;case"GIRATINA":case 487:m.pokemon_candy=487;break;case"CRESSELIA":case 488:m.pokemon_candy=488;break;case"PHIONE":case 489:m.pokemon_candy=489;break;case"MANAPHY":case 490:m.pokemon_candy=490;break;case"DARKRAI":case 491:m.pokemon_candy=491;break;case"SHAYMIN":case 492:m.pokemon_candy=492;break;case"ARCEUS":case 493:m.pokemon_candy=493;break;case"MELTAN":case 808:m.pokemon_candy=808;break;case"MELMETAL":case 809:m.pokemon_candy=809;break}if(d.count!=null){m.count=d.count|0}if(d.experience!=null){m.experience=Boolean(d.experience)}if(d.pokemon_egg!=null){if(typeof d.pokemon_egg!=="object")throw TypeError(".POGOProtos.Inventory.LootItem.pokemon_egg: object expected");m.pokemon_egg=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon_egg)}return m};LootItem.toObject=function toObject(m,o){if(!o)o={};var d={};if(m.item!=null&&m.hasOwnProperty("item")){d.item=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item]:m.item;if(o.oneofs)d.Type="item"}if(m.stardust!=null&&m.hasOwnProperty("stardust")){d.stardust=m.stardust;if(o.oneofs)d.Type="stardust"}if(m.pokecoin!=null&&m.hasOwnProperty("pokecoin")){d.pokecoin=m.pokecoin;if(o.oneofs)d.Type="pokecoin"}if(m.pokemon_candy!=null&&m.hasOwnProperty("pokemon_candy")){d.pokemon_candy=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_candy]:m.pokemon_candy;if(o.oneofs)d.Type="pokemon_candy"}if(m.count!=null&&m.hasOwnProperty("count")){d.count=m.count;if(o.oneofs)d.Type="count"}if(m.experience!=null&&m.hasOwnProperty("experience")){d.experience=m.experience;if(o.oneofs)d.Type="experience"}if(m.pokemon_egg!=null&&m.hasOwnProperty("pokemon_egg")){d.pokemon_egg=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon_egg,o);if(o.oneofs)d.Type="pokemon_egg"}return d};LootItem.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return LootItem}();Inventory.RaidTicket=function(){function RaidTicket(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RaidTicket.prototype.ticket_id="";RaidTicket.prototype.item=0;RaidTicket.prototype.exclusive_info=null;RaidTicket.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.ticket_id!=null&&m.hasOwnProperty("ticket_id"))w.uint32(10).string(m.ticket_id);if(m.item!=null&&m.hasOwnProperty("item"))w.uint32(16).int32(m.item);if(m.exclusive_info!=null&&m.hasOwnProperty("exclusive_info"))$root.POGOProtos.Inventory.ExclusiveTicketInfo.encode(m.exclusive_info,w.uint32(34).fork()).ldelim();return w};RaidTicket.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.RaidTicket;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.ticket_id=r.string();break;case 2:m.item=r.int32();break;case 4:m.exclusive_info=$root.POGOProtos.Inventory.ExclusiveTicketInfo.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};RaidTicket.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.RaidTicket)return d;var m=new $root.POGOProtos.Inventory.RaidTicket;if(d.ticket_id!=null){m.ticket_id=String(d.ticket_id)}switch(d.item){case"ITEM_UNKNOWN":case 0:m.item=0;break;case"ITEM_POKE_BALL":case 1:m.item=1;break;case"ITEM_GREAT_BALL":case 2:m.item=2;break;case"ITEM_ULTRA_BALL":case 3:m.item=3;break;case"ITEM_MASTER_BALL":case 4:m.item=4;break;case"ITEM_PREMIER_BALL":case 5:m.item=5;break;case"ITEM_POTION":case 101:m.item=101;break;case"ITEM_SUPER_POTION":case 102:m.item=102;break;case"ITEM_HYPER_POTION":case 103:m.item=103;break;case"ITEM_MAX_POTION":case 104:m.item=104;break;case"ITEM_REVIVE":case 201:m.item=201;break;case"ITEM_MAX_REVIVE":case 202:m.item=202;break;case"ITEM_LUCKY_EGG":case 301:m.item=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item=402;break;case"ITEM_INCENSE_COOL":case 403:m.item=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item=405;break;case"ITEM_TROY_DISK":case 501:m.item=501;break;case"ITEM_X_ATTACK":case 602:m.item=602;break;case"ITEM_X_DEFENSE":case 603:m.item=603;break;case"ITEM_X_MIRACLE":case 604:m.item=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item=701;break;case"ITEM_BLUK_BERRY":case 702:m.item=702;break;case"ITEM_NANAB_BERRY":case 703:m.item=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item=704;break;case"ITEM_PINAP_BERRY":case 705:m.item=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item=1002;break;case"ITEM_SUN_STONE":case 1101:m.item=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item=1102;break;case"ITEM_METAL_COAT":case 1103:m.item=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item=1104;break;case"ITEM_UP_GRADE":case 1105:m.item=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item=1405;break}if(d.exclusive_info!=null){if(typeof d.exclusive_info!=="object")throw TypeError(".POGOProtos.Inventory.RaidTicket.exclusive_info: object expected");m.exclusive_info=$root.POGOProtos.Inventory.ExclusiveTicketInfo.fromObject(d.exclusive_info)}return m};RaidTicket.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.ticket_id="";d.item=o.enums===String?"ITEM_UNKNOWN":0;d.exclusive_info=null}if(m.ticket_id!=null&&m.hasOwnProperty("ticket_id")){d.ticket_id=m.ticket_id}if(m.item!=null&&m.hasOwnProperty("item")){d.item=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item]:m.item}if(m.exclusive_info!=null&&m.hasOwnProperty("exclusive_info")){d.exclusive_info=$root.POGOProtos.Inventory.ExclusiveTicketInfo.toObject(m.exclusive_info,o)}return d};RaidTicket.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RaidTicket}();Inventory.RaidTickets=function(){function RaidTickets(p){this.raid_ticket=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RaidTickets.prototype.raid_ticket=$util.emptyArray;RaidTickets.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.raid_ticket!=null&&m.raid_ticket.length){for(var i=0;i<m.raid_ticket.length;++i)$root.POGOProtos.Inventory.RaidTicket.encode(m.raid_ticket[i],w.uint32(10).fork()).ldelim()}return w};RaidTickets.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Inventory.RaidTickets;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.raid_ticket&&m.raid_ticket.length))m.raid_ticket=[];m.raid_ticket.push($root.POGOProtos.Inventory.RaidTicket.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};RaidTickets.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Inventory.RaidTickets)return d;var m=new $root.POGOProtos.Inventory.RaidTickets;if(d.raid_ticket){if(!Array.isArray(d.raid_ticket))throw TypeError(".POGOProtos.Inventory.RaidTickets.raid_ticket: array expected");m.raid_ticket=[];for(var i=0;i<d.raid_ticket.length;++i){if(typeof d.raid_ticket[i]!=="object")throw TypeError(".POGOProtos.Inventory.RaidTickets.raid_ticket: object expected");m.raid_ticket[i]=$root.POGOProtos.Inventory.RaidTicket.fromObject(d.raid_ticket[i])}}return m};RaidTickets.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.raid_ticket=[]}if(m.raid_ticket&&m.raid_ticket.length){d.raid_ticket=[];for(var j=0;j<m.raid_ticket.length;++j){d.raid_ticket[j]=$root.POGOProtos.Inventory.RaidTicket.toObject(m.raid_ticket[j],o)}}return d};RaidTickets.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RaidTickets}();return Inventory}();POGOProtos.Map=function(){var Map={};Map.Fort=function(){var Fort={};Fort.FortData=function(){function FortData(p){this.active_fort_modifier=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FortData.prototype.id="";FortData.prototype.last_modified_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;FortData.prototype.latitude=0;FortData.prototype.longitude=0;FortData.prototype.owned_by_team=0;FortData.prototype.guard_pokemon_id=0;FortData.prototype.guard_pokemon_cp=0;FortData.prototype.enabled=false;FortData.prototype.type=0;FortData.prototype.gym_points=$util.Long?$util.Long.fromBits(0,0,false):0;FortData.prototype.is_in_battle=false;FortData.prototype.active_fort_modifier=$util.emptyArray;FortData.prototype.lure_info=null;FortData.prototype.cooldown_complete_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;FortData.prototype.sponsor=0;FortData.prototype.rendering_type=0;FortData.prototype.deploy_lockout_end_ms=$util.Long?$util.Long.fromBits(0,0,false):0;FortData.prototype.guard_pokemon_display=null;FortData.prototype.closed=false;FortData.prototype.raid_info=null;FortData.prototype.gym_display=null;FortData.prototype.visited=false;FortData.prototype.same_team_deploy_lockout_end_ms=$util.Long?$util.Long.fromBits(0,0,false):0;FortData.prototype.allow_checkin=false;FortData.prototype.image_url="";FortData.prototype.in_event=false;FortData.prototype.banner_url="";FortData.prototype.partner_id="";FortData.prototype.challenge_quest_completed=false;FortData.prototype.is_ex_raid_eligible=false;FortData.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.id!=null&&m.hasOwnProperty("id"))w.uint32(10).string(m.id);if(m.last_modified_timestamp_ms!=null&&m.hasOwnProperty("last_modified_timestamp_ms"))w.uint32(16).int64(m.last_modified_timestamp_ms);if(m.latitude!=null&&m.hasOwnProperty("latitude"))w.uint32(25).double(m.latitude);if(m.longitude!=null&&m.hasOwnProperty("longitude"))w.uint32(33).double(m.longitude);if(m.owned_by_team!=null&&m.hasOwnProperty("owned_by_team"))w.uint32(40).int32(m.owned_by_team);if(m.guard_pokemon_id!=null&&m.hasOwnProperty("guard_pokemon_id"))w.uint32(48).int32(m.guard_pokemon_id);if(m.guard_pokemon_cp!=null&&m.hasOwnProperty("guard_pokemon_cp"))w.uint32(56).int32(m.guard_pokemon_cp);if(m.enabled!=null&&m.hasOwnProperty("enabled"))w.uint32(64).bool(m.enabled);if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(72).int32(m.type);if(m.gym_points!=null&&m.hasOwnProperty("gym_points"))w.uint32(80).int64(m.gym_points);if(m.is_in_battle!=null&&m.hasOwnProperty("is_in_battle"))w.uint32(88).bool(m.is_in_battle);if(m.active_fort_modifier!=null&&m.active_fort_modifier.length){w.uint32(98).fork();for(var i=0;i<m.active_fort_modifier.length;++i)w.int32(m.active_fort_modifier[i]);w.ldelim()}if(m.lure_info!=null&&m.hasOwnProperty("lure_info"))$root.POGOProtos.Map.Fort.FortLureInfo.encode(m.lure_info,w.uint32(106).fork()).ldelim();if(m.cooldown_complete_timestamp_ms!=null&&m.hasOwnProperty("cooldown_complete_timestamp_ms"))w.uint32(112).int64(m.cooldown_complete_timestamp_ms);if(m.sponsor!=null&&m.hasOwnProperty("sponsor"))w.uint32(120).int32(m.sponsor);if(m.rendering_type!=null&&m.hasOwnProperty("rendering_type"))w.uint32(128).int32(m.rendering_type);if(m.deploy_lockout_end_ms!=null&&m.hasOwnProperty("deploy_lockout_end_ms"))w.uint32(136).int64(m.deploy_lockout_end_ms);if(m.guard_pokemon_display!=null&&m.hasOwnProperty("guard_pokemon_display"))$root.POGOProtos.Data.PokemonDisplay.encode(m.guard_pokemon_display,w.uint32(146).fork()).ldelim();if(m.closed!=null&&m.hasOwnProperty("closed"))w.uint32(152).bool(m.closed);if(m.raid_info!=null&&m.hasOwnProperty("raid_info"))$root.POGOProtos.Data.Raid.RaidInfo.encode(m.raid_info,w.uint32(162).fork()).ldelim();if(m.gym_display!=null&&m.hasOwnProperty("gym_display"))$root.POGOProtos.Map.Fort.GymDisplay.encode(m.gym_display,w.uint32(170).fork()).ldelim();if(m.visited!=null&&m.hasOwnProperty("visited"))w.uint32(176).bool(m.visited);if(m.same_team_deploy_lockout_end_ms!=null&&m.hasOwnProperty("same_team_deploy_lockout_end_ms"))w.uint32(184).int64(m.same_team_deploy_lockout_end_ms);if(m.allow_checkin!=null&&m.hasOwnProperty("allow_checkin"))w.uint32(192).bool(m.allow_checkin);if(m.image_url!=null&&m.hasOwnProperty("image_url"))w.uint32(202).string(m.image_url);if(m.in_event!=null&&m.hasOwnProperty("in_event"))w.uint32(208).bool(m.in_event);if(m.banner_url!=null&&m.hasOwnProperty("banner_url"))w.uint32(218).string(m.banner_url);if(m.partner_id!=null&&m.hasOwnProperty("partner_id"))w.uint32(226).string(m.partner_id);if(m.challenge_quest_completed!=null&&m.hasOwnProperty("challenge_quest_completed"))w.uint32(240).bool(m.challenge_quest_completed);if(m.is_ex_raid_eligible!=null&&m.hasOwnProperty("is_ex_raid_eligible"))w.uint32(248).bool(m.is_ex_raid_eligible);return w};FortData.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.Fort.FortData;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.id=r.string();break;case 2:m.last_modified_timestamp_ms=r.int64();break;case 3:m.latitude=r.double();break;case 4:m.longitude=r.double();break;case 5:m.owned_by_team=r.int32();break;case 6:m.guard_pokemon_id=r.int32();break;case 7:m.guard_pokemon_cp=r.int32();break;case 8:m.enabled=r.bool();break;case 9:m.type=r.int32();break;case 10:m.gym_points=r.int64();break;case 11:m.is_in_battle=r.bool();break;case 12:if(!(m.active_fort_modifier&&m.active_fort_modifier.length))m.active_fort_modifier=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.active_fort_modifier.push(r.int32())}else m.active_fort_modifier.push(r.int32());break;case 13:m.lure_info=$root.POGOProtos.Map.Fort.FortLureInfo.decode(r,r.uint32());break;case 14:m.cooldown_complete_timestamp_ms=r.int64();break;case 15:m.sponsor=r.int32();break;case 16:m.rendering_type=r.int32();break;case 17:m.deploy_lockout_end_ms=r.int64();break;case 18:m.guard_pokemon_display=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;case 19:m.closed=r.bool();break;case 20:m.raid_info=$root.POGOProtos.Data.Raid.RaidInfo.decode(r,r.uint32());break;case 21:m.gym_display=$root.POGOProtos.Map.Fort.GymDisplay.decode(r,r.uint32());break;case 22:m.visited=r.bool();break;case 23:m.same_team_deploy_lockout_end_ms=r.int64();break;case 24:m.allow_checkin=r.bool();break;case 25:m.image_url=r.string();break;case 26:m.in_event=r.bool();break;case 27:m.banner_url=r.string();break;case 28:m.partner_id=r.string();break;case 30:m.challenge_quest_completed=r.bool();break;case 31:m.is_ex_raid_eligible=r.bool();break;default:r.skipType(t&7);break}}return m};FortData.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.Fort.FortData)return d;var m=new $root.POGOProtos.Map.Fort.FortData;if(d.id!=null){m.id=String(d.id)}if(d.last_modified_timestamp_ms!=null){if($util.Long)(m.last_modified_timestamp_ms=$util.Long.fromValue(d.last_modified_timestamp_ms)).unsigned=false;else if(typeof d.last_modified_timestamp_ms==="string")m.last_modified_timestamp_ms=parseInt(d.last_modified_timestamp_ms,10);else if(typeof d.last_modified_timestamp_ms==="number")m.last_modified_timestamp_ms=d.last_modified_timestamp_ms;else if(typeof d.last_modified_timestamp_ms==="object")m.last_modified_timestamp_ms=new $util.LongBits(d.last_modified_timestamp_ms.low>>>0,d.last_modified_timestamp_ms.high>>>0).toNumber()}if(d.latitude!=null){m.latitude=Number(d.latitude)}if(d.longitude!=null){m.longitude=Number(d.longitude)}switch(d.owned_by_team){case"NEUTRAL":case 0:m.owned_by_team=0;break;case"BLUE":case 1:m.owned_by_team=1;break;case"RED":case 2:m.owned_by_team=2;break;case"YELLOW":case 3:m.owned_by_team=3;break}switch(d.guard_pokemon_id){case"MISSINGNO":case 0:m.guard_pokemon_id=0;break;case"BULBASAUR":case 1:m.guard_pokemon_id=1;break;case"IVYSAUR":case 2:m.guard_pokemon_id=2;break;case"VENUSAUR":case 3:m.guard_pokemon_id=3;break;case"CHARMANDER":case 4:m.guard_pokemon_id=4;break;case"CHARMELEON":case 5:m.guard_pokemon_id=5;break;case"CHARIZARD":case 6:m.guard_pokemon_id=6;break;case"SQUIRTLE":case 7:m.guard_pokemon_id=7;break;case"WARTORTLE":case 8:m.guard_pokemon_id=8;break;case"BLASTOISE":case 9:m.guard_pokemon_id=9;break;case"CATERPIE":case 10:m.guard_pokemon_id=10;break;case"METAPOD":case 11:m.guard_pokemon_id=11;break;case"BUTTERFREE":case 12:m.guard_pokemon_id=12;break;case"WEEDLE":case 13:m.guard_pokemon_id=13;break;case"KAKUNA":case 14:m.guard_pokemon_id=14;break;case"BEEDRILL":case 15:m.guard_pokemon_id=15;break;case"PIDGEY":case 16:m.guard_pokemon_id=16;break;case"PIDGEOTTO":case 17:m.guard_pokemon_id=17;break;case"PIDGEOT":case 18:m.guard_pokemon_id=18;break;case"RATTATA":case 19:m.guard_pokemon_id=19;break;case"RATICATE":case 20:m.guard_pokemon_id=20;break;case"SPEAROW":case 21:m.guard_pokemon_id=21;break;case"FEAROW":case 22:m.guard_pokemon_id=22;break;case"EKANS":case 23:m.guard_pokemon_id=23;break;case"ARBOK":case 24:m.guard_pokemon_id=24;break;case"PIKACHU":case 25:m.guard_pokemon_id=25;break;case"RAICHU":case 26:m.guard_pokemon_id=26;break;case"SANDSHREW":case 27:m.guard_pokemon_id=27;break;case"SANDSLASH":case 28:m.guard_pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.guard_pokemon_id=29;break;case"NIDORINA":case 30:m.guard_pokemon_id=30;break;case"NIDOQUEEN":case 31:m.guard_pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.guard_pokemon_id=32;break;case"NIDORINO":case 33:m.guard_pokemon_id=33;break;case"NIDOKING":case 34:m.guard_pokemon_id=34;break;case"CLEFAIRY":case 35:m.guard_pokemon_id=35;break;case"CLEFABLE":case 36:m.guard_pokemon_id=36;break;case"VULPIX":case 37:m.guard_pokemon_id=37;break;case"NINETALES":case 38:m.guard_pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.guard_pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.guard_pokemon_id=40;break;case"ZUBAT":case 41:m.guard_pokemon_id=41;break;case"GOLBAT":case 42:m.guard_pokemon_id=42;break;case"ODDISH":case 43:m.guard_pokemon_id=43;break;case"GLOOM":case 44:m.guard_pokemon_id=44;break;case"VILEPLUME":case 45:m.guard_pokemon_id=45;break;case"PARAS":case 46:m.guard_pokemon_id=46;break;case"PARASECT":case 47:m.guard_pokemon_id=47;break;case"VENONAT":case 48:m.guard_pokemon_id=48;break;case"VENOMOTH":case 49:m.guard_pokemon_id=49;break;case"DIGLETT":case 50:m.guard_pokemon_id=50;break;case"DUGTRIO":case 51:m.guard_pokemon_id=51;break;case"MEOWTH":case 52:m.guard_pokemon_id=52;break;case"PERSIAN":case 53:m.guard_pokemon_id=53;break;case"PSYDUCK":case 54:m.guard_pokemon_id=54;break;case"GOLDUCK":case 55:m.guard_pokemon_id=55;break;case"MANKEY":case 56:m.guard_pokemon_id=56;break;case"PRIMEAPE":case 57:m.guard_pokemon_id=57;break;case"GROWLITHE":case 58:m.guard_pokemon_id=58;break;case"ARCANINE":case 59:m.guard_pokemon_id=59;break;case"POLIWAG":case 60:m.guard_pokemon_id=60;break;case"POLIWHIRL":case 61:m.guard_pokemon_id=61;break;case"POLIWRATH":case 62:m.guard_pokemon_id=62;break;case"ABRA":case 63:m.guard_pokemon_id=63;break;case"KADABRA":case 64:m.guard_pokemon_id=64;break;case"ALAKAZAM":case 65:m.guard_pokemon_id=65;break;case"MACHOP":case 66:m.guard_pokemon_id=66;break;case"MACHOKE":case 67:m.guard_pokemon_id=67;break;case"MACHAMP":case 68:m.guard_pokemon_id=68;break;case"BELLSPROUT":case 69:m.guard_pokemon_id=69;break;case"WEEPINBELL":case 70:m.guard_pokemon_id=70;break;case"VICTREEBEL":case 71:m.guard_pokemon_id=71;break;case"TENTACOOL":case 72:m.guard_pokemon_id=72;break;case"TENTACRUEL":case 73:m.guard_pokemon_id=73;break;case"GEODUDE":case 74:m.guard_pokemon_id=74;break;case"GRAVELER":case 75:m.guard_pokemon_id=75;break;case"GOLEM":case 76:m.guard_pokemon_id=76;break;case"PONYTA":case 77:m.guard_pokemon_id=77;break;case"RAPIDASH":case 78:m.guard_pokemon_id=78;break;case"SLOWPOKE":case 79:m.guard_pokemon_id=79;break;case"SLOWBRO":case 80:m.guard_pokemon_id=80;break;case"MAGNEMITE":case 81:m.guard_pokemon_id=81;break;case"MAGNETON":case 82:m.guard_pokemon_id=82;break;case"FARFETCHD":case 83:m.guard_pokemon_id=83;break;case"DODUO":case 84:m.guard_pokemon_id=84;break;case"DODRIO":case 85:m.guard_pokemon_id=85;break;case"SEEL":case 86:m.guard_pokemon_id=86;break;case"DEWGONG":case 87:m.guard_pokemon_id=87;break;case"GRIMER":case 88:m.guard_pokemon_id=88;break;case"MUK":case 89:m.guard_pokemon_id=89;break;case"SHELLDER":case 90:m.guard_pokemon_id=90;break;case"CLOYSTER":case 91:m.guard_pokemon_id=91;break;case"GASTLY":case 92:m.guard_pokemon_id=92;break;case"HAUNTER":case 93:m.guard_pokemon_id=93;break;case"GENGAR":case 94:m.guard_pokemon_id=94;break;case"ONIX":case 95:m.guard_pokemon_id=95;break;case"DROWZEE":case 96:m.guard_pokemon_id=96;break;case"HYPNO":case 97:m.guard_pokemon_id=97;break;case"KRABBY":case 98:m.guard_pokemon_id=98;break;case"KINGLER":case 99:m.guard_pokemon_id=99;break;case"VOLTORB":case 100:m.guard_pokemon_id=100;break;case"ELECTRODE":case 101:m.guard_pokemon_id=101;break;case"EXEGGCUTE":case 102:m.guard_pokemon_id=102;break;case"EXEGGUTOR":case 103:m.guard_pokemon_id=103;break;case"CUBONE":case 104:m.guard_pokemon_id=104;break;case"MAROWAK":case 105:m.guard_pokemon_id=105;break;case"HITMONLEE":case 106:m.guard_pokemon_id=106;break;case"HITMONCHAN":case 107:m.guard_pokemon_id=107;break;case"LICKITUNG":case 108:m.guard_pokemon_id=108;break;case"KOFFING":case 109:m.guard_pokemon_id=109;break;case"WEEZING":case 110:m.guard_pokemon_id=110;break;case"RHYHORN":case 111:m.guard_pokemon_id=111;break;case"RHYDON":case 112:m.guard_pokemon_id=112;break;case"CHANSEY":case 113:m.guard_pokemon_id=113;break;case"TANGELA":case 114:m.guard_pokemon_id=114;break;case"KANGASKHAN":case 115:m.guard_pokemon_id=115;break;case"HORSEA":case 116:m.guard_pokemon_id=116;break;case"SEADRA":case 117:m.guard_pokemon_id=117;break;case"GOLDEEN":case 118:m.guard_pokemon_id=118;break;case"SEAKING":case 119:m.guard_pokemon_id=119;break;case"STARYU":case 120:m.guard_pokemon_id=120;break;case"STARMIE":case 121:m.guard_pokemon_id=121;break;case"MR_MIME":case 122:m.guard_pokemon_id=122;break;case"SCYTHER":case 123:m.guard_pokemon_id=123;break;case"JYNX":case 124:m.guard_pokemon_id=124;break;case"ELECTABUZZ":case 125:m.guard_pokemon_id=125;break;case"MAGMAR":case 126:m.guard_pokemon_id=126;break;case"PINSIR":case 127:m.guard_pokemon_id=127;break;case"TAUROS":case 128:m.guard_pokemon_id=128;break;case"MAGIKARP":case 129:m.guard_pokemon_id=129;break;case"GYARADOS":case 130:m.guard_pokemon_id=130;break;case"LAPRAS":case 131:m.guard_pokemon_id=131;break;case"DITTO":case 132:m.guard_pokemon_id=132;break;case"EEVEE":case 133:m.guard_pokemon_id=133;break;case"VAPOREON":case 134:m.guard_pokemon_id=134;break;case"JOLTEON":case 135:m.guard_pokemon_id=135;break;case"FLAREON":case 136:m.guard_pokemon_id=136;break;case"PORYGON":case 137:m.guard_pokemon_id=137;break;case"OMANYTE":case 138:m.guard_pokemon_id=138;break;case"OMASTAR":case 139:m.guard_pokemon_id=139;break;case"KABUTO":case 140:m.guard_pokemon_id=140;break;case"KABUTOPS":case 141:m.guard_pokemon_id=141;break;case"AERODACTYL":case 142:m.guard_pokemon_id=142;break;case"SNORLAX":case 143:m.guard_pokemon_id=143;break;case"ARTICUNO":case 144:m.guard_pokemon_id=144;break;case"ZAPDOS":case 145:m.guard_pokemon_id=145;break;case"MOLTRES":case 146:m.guard_pokemon_id=146;break;case"DRATINI":case 147:m.guard_pokemon_id=147;break;case"DRAGONAIR":case 148:m.guard_pokemon_id=148;break;case"DRAGONITE":case 149:m.guard_pokemon_id=149;break;case"MEWTWO":case 150:m.guard_pokemon_id=150;break;case"MEW":case 151:m.guard_pokemon_id=151;break;case"CHIKORITA":case 152:m.guard_pokemon_id=152;break;case"BAYLEEF":case 153:m.guard_pokemon_id=153;break;case"MEGANIUM":case 154:m.guard_pokemon_id=154;break;case"CYNDAQUIL":case 155:m.guard_pokemon_id=155;break;case"QUILAVA":case 156:m.guard_pokemon_id=156;break;case"TYPHLOSION":case 157:m.guard_pokemon_id=157;break;case"TOTODILE":case 158:m.guard_pokemon_id=158;break;case"CROCONAW":case 159:m.guard_pokemon_id=159;break;case"FERALIGATR":case 160:m.guard_pokemon_id=160;break;case"SENTRET":case 161:m.guard_pokemon_id=161;break;case"FURRET":case 162:m.guard_pokemon_id=162;break;case"HOOTHOOT":case 163:m.guard_pokemon_id=163;break;case"NOCTOWL":case 164:m.guard_pokemon_id=164;break;case"LEDYBA":case 165:m.guard_pokemon_id=165;break;case"LEDIAN":case 166:m.guard_pokemon_id=166;break;case"SPINARAK":case 167:m.guard_pokemon_id=167;break;case"ARIADOS":case 168:m.guard_pokemon_id=168;break;case"CROBAT":case 169:m.guard_pokemon_id=169;break;case"CHINCHOU":case 170:m.guard_pokemon_id=170;break;case"LANTURN":case 171:m.guard_pokemon_id=171;break;case"PICHU":case 172:m.guard_pokemon_id=172;break;case"CLEFFA":case 173:m.guard_pokemon_id=173;break;case"IGGLYBUFF":case 174:m.guard_pokemon_id=174;break;case"TOGEPI":case 175:m.guard_pokemon_id=175;break;case"TOGETIC":case 176:m.guard_pokemon_id=176;break;case"NATU":case 177:m.guard_pokemon_id=177;break;case"XATU":case 178:m.guard_pokemon_id=178;break;case"MAREEP":case 179:m.guard_pokemon_id=179;break;case"FLAAFFY":case 180:m.guard_pokemon_id=180;break;case"AMPHAROS":case 181:m.guard_pokemon_id=181;break;case"BELLOSSOM":case 182:m.guard_pokemon_id=182;break;case"MARILL":case 183:m.guard_pokemon_id=183;break;case"AZUMARILL":case 184:m.guard_pokemon_id=184;break;case"SUDOWOODO":case 185:m.guard_pokemon_id=185;break;case"POLITOED":case 186:m.guard_pokemon_id=186;break;case"HOPPIP":case 187:m.guard_pokemon_id=187;break;case"SKIPLOOM":case 188:m.guard_pokemon_id=188;break;case"JUMPLUFF":case 189:m.guard_pokemon_id=189;break;case"AIPOM":case 190:m.guard_pokemon_id=190;break;case"SUNKERN":case 191:m.guard_pokemon_id=191;break;case"SUNFLORA":case 192:m.guard_pokemon_id=192;break;case"YANMA":case 193:m.guard_pokemon_id=193;break;case"WOOPER":case 194:m.guard_pokemon_id=194;break;case"QUAGSIRE":case 195:m.guard_pokemon_id=195;break;case"ESPEON":case 196:m.guard_pokemon_id=196;break;case"UMBREON":case 197:m.guard_pokemon_id=197;break;case"MURKROW":case 198:m.guard_pokemon_id=198;break;case"SLOWKING":case 199:m.guard_pokemon_id=199;break;case"MISDREAVUS":case 200:m.guard_pokemon_id=200;break;case"UNOWN":case 201:m.guard_pokemon_id=201;break;case"WOBBUFFET":case 202:m.guard_pokemon_id=202;break;case"GIRAFARIG":case 203:m.guard_pokemon_id=203;break;case"PINECO":case 204:m.guard_pokemon_id=204;break;case"FORRETRESS":case 205:m.guard_pokemon_id=205;break;case"DUNSPARCE":case 206:m.guard_pokemon_id=206;break;case"GLIGAR":case 207:m.guard_pokemon_id=207;break;case"STEELIX":case 208:m.guard_pokemon_id=208;break;case"SNUBBULL":case 209:m.guard_pokemon_id=209;break;case"GRANBULL":case 210:m.guard_pokemon_id=210;break;case"QWILFISH":case 211:m.guard_pokemon_id=211;break;case"SCIZOR":case 212:m.guard_pokemon_id=212;break;case"SHUCKLE":case 213:m.guard_pokemon_id=213;break;case"HERACROSS":case 214:m.guard_pokemon_id=214;break;case"SNEASEL":case 215:m.guard_pokemon_id=215;break;case"TEDDIURSA":case 216:m.guard_pokemon_id=216;break;case"URSARING":case 217:m.guard_pokemon_id=217;break;case"SLUGMA":case 218:m.guard_pokemon_id=218;break;case"MAGCARGO":case 219:m.guard_pokemon_id=219;break;case"SWINUB":case 220:m.guard_pokemon_id=220;break;case"PILOSWINE":case 221:m.guard_pokemon_id=221;break;case"CORSOLA":case 222:m.guard_pokemon_id=222;break;case"REMORAID":case 223:m.guard_pokemon_id=223;break;case"OCTILLERY":case 224:m.guard_pokemon_id=224;break;case"DELIBIRD":case 225:m.guard_pokemon_id=225;break;case"MANTINE":case 226:m.guard_pokemon_id=226;break;case"SKARMORY":case 227:m.guard_pokemon_id=227;break;case"HOUNDOUR":case 228:m.guard_pokemon_id=228;break;case"HOUNDOOM":case 229:m.guard_pokemon_id=229;break;case"KINGDRA":case 230:m.guard_pokemon_id=230;break;case"PHANPY":case 231:m.guard_pokemon_id=231;break;case"DONPHAN":case 232:m.guard_pokemon_id=232;break;case"PORYGON2":case 233:m.guard_pokemon_id=233;break;case"STANTLER":case 234:m.guard_pokemon_id=234;break;case"SMEARGLE":case 235:m.guard_pokemon_id=235;break;case"TYROGUE":case 236:m.guard_pokemon_id=236;break;case"HITMONTOP":case 237:m.guard_pokemon_id=237;break;case"SMOOCHUM":case 238:m.guard_pokemon_id=238;break;case"ELEKID":case 239:m.guard_pokemon_id=239;break;case"MAGBY":case 240:m.guard_pokemon_id=240;break;case"MILTANK":case 241:m.guard_pokemon_id=241;break;case"BLISSEY":case 242:m.guard_pokemon_id=242;break;case"RAIKOU":case 243:m.guard_pokemon_id=243;break;case"ENTEI":case 244:m.guard_pokemon_id=244;break;case"SUICUNE":case 245:m.guard_pokemon_id=245;break;case"LARVITAR":case 246:m.guard_pokemon_id=246;break;case"PUPITAR":case 247:m.guard_pokemon_id=247;break;case"TYRANITAR":case 248:m.guard_pokemon_id=248;break;case"LUGIA":case 249:m.guard_pokemon_id=249;break;case"HO_OH":case 250:m.guard_pokemon_id=250;break;case"CELEBI":case 251:m.guard_pokemon_id=251;break;case"TREECKO":case 252:m.guard_pokemon_id=252;break;case"GROVYLE":case 253:m.guard_pokemon_id=253;break;case"SCEPTILE":case 254:m.guard_pokemon_id=254;break;case"TORCHIC":case 255:m.guard_pokemon_id=255;break;case"COMBUSKEN":case 256:m.guard_pokemon_id=256;break;case"BLAZIKEN":case 257:m.guard_pokemon_id=257;break;case"MUDKIP":case 258:m.guard_pokemon_id=258;break;case"MARSHTOMP":case 259:m.guard_pokemon_id=259;break;case"SWAMPERT":case 260:m.guard_pokemon_id=260;break;case"POOCHYENA":case 261:m.guard_pokemon_id=261;break;case"MIGHTYENA":case 262:m.guard_pokemon_id=262;break;case"ZIGZAGOON":case 263:m.guard_pokemon_id=263;break;case"LINOONE":case 264:m.guard_pokemon_id=264;break;case"WURMPLE":case 265:m.guard_pokemon_id=265;break;case"SILCOON":case 266:m.guard_pokemon_id=266;break;case"BEAUTIFLY":case 267:m.guard_pokemon_id=267;break;case"CASCOON":case 268:m.guard_pokemon_id=268;break;case"DUSTOX":case 269:m.guard_pokemon_id=269;break;case"LOTAD":case 270:m.guard_pokemon_id=270;break;case"LOMBRE":case 271:m.guard_pokemon_id=271;break;case"LUDICOLO":case 272:m.guard_pokemon_id=272;break;case"SEEDOT":case 273:m.guard_pokemon_id=273;break;case"NUZLEAF":case 274:m.guard_pokemon_id=274;break;case"SHIFTRY":case 275:m.guard_pokemon_id=275;break;case"TAILLOW":case 276:m.guard_pokemon_id=276;break;case"SWELLOW":case 277:m.guard_pokemon_id=277;break;case"WINGULL":case 278:m.guard_pokemon_id=278;break;case"PELIPPER":case 279:m.guard_pokemon_id=279;break;case"RALTS":case 280:m.guard_pokemon_id=280;break;case"KIRLIA":case 281:m.guard_pokemon_id=281;break;case"GARDEVOIR":case 282:m.guard_pokemon_id=282;break;case"SURSKIT":case 283:m.guard_pokemon_id=283;break;case"MASQUERAIN":case 284:m.guard_pokemon_id=284;break;case"SHROOMISH":case 285:m.guard_pokemon_id=285;break;case"BRELOOM":case 286:m.guard_pokemon_id=286;break;case"SLAKOTH":case 287:m.guard_pokemon_id=287;break;case"VIGOROTH":case 288:m.guard_pokemon_id=288;break;case"SLAKING":case 289:m.guard_pokemon_id=289;break;case"NINCADA":case 290:m.guard_pokemon_id=290;break;case"NINJASK":case 291:m.guard_pokemon_id=291;break;case"SHEDINJA":case 292:m.guard_pokemon_id=292;break;case"WHISMUR":case 293:m.guard_pokemon_id=293;break;case"LOUDRED":case 294:m.guard_pokemon_id=294;break;case"EXPLOUD":case 295:m.guard_pokemon_id=295;break;case"MAKUHITA":case 296:m.guard_pokemon_id=296;break;case"HARIYAMA":case 297:m.guard_pokemon_id=297;break;case"AZURILL":case 298:m.guard_pokemon_id=298;break;case"NOSEPASS":case 299:m.guard_pokemon_id=299;break;case"SKITTY":case 300:m.guard_pokemon_id=300;break;case"DELCATTY":case 301:m.guard_pokemon_id=301;break;case"SABLEYE":case 302:m.guard_pokemon_id=302;break;case"MAWILE":case 303:m.guard_pokemon_id=303;break;case"ARON":case 304:m.guard_pokemon_id=304;break;case"LAIRON":case 305:m.guard_pokemon_id=305;break;case"AGGRON":case 306:m.guard_pokemon_id=306;break;case"MEDITITE":case 307:m.guard_pokemon_id=307;break;case"MEDICHAM":case 308:m.guard_pokemon_id=308;break;case"ELECTRIKE":case 309:m.guard_pokemon_id=309;break;case"MANECTRIC":case 310:m.guard_pokemon_id=310;break;case"PLUSLE":case 311:m.guard_pokemon_id=311;break;case"MINUN":case 312:m.guard_pokemon_id=312;break;case"VOLBEAT":case 313:m.guard_pokemon_id=313;break;case"ILLUMISE":case 314:m.guard_pokemon_id=314;break;case"ROSELIA":case 315:m.guard_pokemon_id=315;break;case"GULPIN":case 316:m.guard_pokemon_id=316;break;case"SWALOT":case 317:m.guard_pokemon_id=317;break;case"CARVANHA":case 318:m.guard_pokemon_id=318;break;case"SHARPEDO":case 319:m.guard_pokemon_id=319;break;case"WAILMER":case 320:m.guard_pokemon_id=320;break;case"WAILORD":case 321:m.guard_pokemon_id=321;break;case"NUMEL":case 322:m.guard_pokemon_id=322;break;case"CAMERUPT":case 323:m.guard_pokemon_id=323;break;case"TORKOAL":case 324:m.guard_pokemon_id=324;break;case"SPOINK":case 325:m.guard_pokemon_id=325;break;case"GRUMPIG":case 326:m.guard_pokemon_id=326;break;case"SPINDA":case 327:m.guard_pokemon_id=327;break;case"TRAPINCH":case 328:m.guard_pokemon_id=328;break;case"VIBRAVA":case 329:m.guard_pokemon_id=329;break;case"FLYGON":case 330:m.guard_pokemon_id=330;break;case"CACNEA":case 331:m.guard_pokemon_id=331;break;case"CACTURNE":case 332:m.guard_pokemon_id=332;break;case"SWABLU":case 333:m.guard_pokemon_id=333;break;case"ALTARIA":case 334:m.guard_pokemon_id=334;break;case"ZANGOOSE":case 335:m.guard_pokemon_id=335;break;case"SEVIPER":case 336:m.guard_pokemon_id=336;break;case"LUNATONE":case 337:m.guard_pokemon_id=337;break;case"SOLROCK":case 338:m.guard_pokemon_id=338;break;case"BARBOACH":case 339:m.guard_pokemon_id=339;break;case"WHISCASH":case 340:m.guard_pokemon_id=340;break;case"CORPHISH":case 341:m.guard_pokemon_id=341;break;case"CRAWDAUNT":case 342:m.guard_pokemon_id=342;break;case"BALTOY":case 343:m.guard_pokemon_id=343;break;case"CLAYDOL":case 344:m.guard_pokemon_id=344;break;case"LILEEP":case 345:m.guard_pokemon_id=345;break;case"CRADILY":case 346:m.guard_pokemon_id=346;break;case"ANORITH":case 347:m.guard_pokemon_id=347;break;case"ARMALDO":case 348:m.guard_pokemon_id=348;break;case"FEEBAS":case 349:m.guard_pokemon_id=349;break;case"MILOTIC":case 350:m.guard_pokemon_id=350;break;case"CASTFORM":case 351:m.guard_pokemon_id=351;break;case"KECLEON":case 352:m.guard_pokemon_id=352;break;case"SHUPPET":case 353:m.guard_pokemon_id=353;break;case"BANETTE":case 354:m.guard_pokemon_id=354;break;case"DUSKULL":case 355:m.guard_pokemon_id=355;break;case"DUSCLOPS":case 356:m.guard_pokemon_id=356;break;case"TROPIUS":case 357:m.guard_pokemon_id=357;break;case"CHIMECHO":case 358:m.guard_pokemon_id=358;break;case"ABSOL":case 359:m.guard_pokemon_id=359;break;case"WYNAUT":case 360:m.guard_pokemon_id=360;break;case"SNORUNT":case 361:m.guard_pokemon_id=361;break;case"GLALIE":case 362:m.guard_pokemon_id=362;break;case"SPHEAL":case 363:m.guard_pokemon_id=363;break;case"SEALEO":case 364:m.guard_pokemon_id=364;break;case"WALREIN":case 365:m.guard_pokemon_id=365;break;case"CLAMPERL":case 366:m.guard_pokemon_id=366;break;case"HUNTAIL":case 367:m.guard_pokemon_id=367;break;case"GOREBYSS":case 368:m.guard_pokemon_id=368;break;case"RELICANTH":case 369:m.guard_pokemon_id=369;break;case"LUVDISC":case 370:m.guard_pokemon_id=370;break;case"BAGON":case 371:m.guard_pokemon_id=371;break;case"SHELGON":case 372:m.guard_pokemon_id=372;break;case"SALAMENCE":case 373:m.guard_pokemon_id=373;break;case"BELDUM":case 374:m.guard_pokemon_id=374;break;case"METANG":case 375:m.guard_pokemon_id=375;break;case"METAGROSS":case 376:m.guard_pokemon_id=376;break;case"REGIROCK":case 377:m.guard_pokemon_id=377;break;case"REGICE":case 378:m.guard_pokemon_id=378;break;case"REGISTEEL":case 379:m.guard_pokemon_id=379;break;case"LATIAS":case 380:m.guard_pokemon_id=380;break;case"LATIOS":case 381:m.guard_pokemon_id=381;break;case"KYOGRE":case 382:m.guard_pokemon_id=382;break;case"GROUDON":case 383:m.guard_pokemon_id=383;break;case"RAYQUAZA":case 384:m.guard_pokemon_id=384;break;case"JIRACHI":case 385:m.guard_pokemon_id=385;break;case"DEOXYS":case 386:m.guard_pokemon_id=386;break;case"TURTWIG":case 387:m.guard_pokemon_id=387;break;case"GROTLE":case 388:m.guard_pokemon_id=388;break;case"TORTERRA":case 389:m.guard_pokemon_id=389;break;case"CHIMCHAR":case 390:m.guard_pokemon_id=390;break;case"MONFERNO":case 391:m.guard_pokemon_id=391;break;case"INFERNAPE":case 392:m.guard_pokemon_id=392;break;case"PIPLUP":case 393:m.guard_pokemon_id=393;break;case"PRINPLUP":case 394:m.guard_pokemon_id=394;break;case"EMPOLEON":case 395:m.guard_pokemon_id=395;break;case"STARLY":case 396:m.guard_pokemon_id=396;break;case"STARAVIA":case 397:m.guard_pokemon_id=397;break;case"STARAPTOR":case 398:m.guard_pokemon_id=398;break;case"BIDOOF":case 399:m.guard_pokemon_id=399;break;case"BIBAREL":case 400:m.guard_pokemon_id=400;break;case"KRICKETOT":case 401:m.guard_pokemon_id=401;break;case"KRICKETUNE":case 402:m.guard_pokemon_id=402;break;case"SHINX":case 403:m.guard_pokemon_id=403;break;case"LUXIO":case 404:m.guard_pokemon_id=404;break;case"LUXRAY":case 405:m.guard_pokemon_id=405;break;case"BUDEW":case 406:m.guard_pokemon_id=406;break;case"ROSERADE":case 407:m.guard_pokemon_id=407;break;case"CRANIDOS":case 408:m.guard_pokemon_id=408;break;case"RAMPARDOS":case 409:m.guard_pokemon_id=409;break;case"SHIELDON":case 410:m.guard_pokemon_id=410;break;case"BASTIODON":case 411:m.guard_pokemon_id=411;break;case"BURMY":case 412:m.guard_pokemon_id=412;break;case"WORMADAM":case 413:m.guard_pokemon_id=413;break;case"MOTHIM":case 414:m.guard_pokemon_id=414;break;case"COMBEE":case 415:m.guard_pokemon_id=415;break;case"VESPIQUEN":case 416:m.guard_pokemon_id=416;break;case"PACHIRISU":case 417:m.guard_pokemon_id=417;break;case"BUIZEL":case 418:m.guard_pokemon_id=418;break;case"FLOATZEL":case 419:m.guard_pokemon_id=419;break;case"CHERUBI":case 420:m.guard_pokemon_id=420;break;case"CHERRIM":case 421:m.guard_pokemon_id=421;break;case"SHELLOS":case 422:m.guard_pokemon_id=422;break;case"GASTRODON":case 423:m.guard_pokemon_id=423;break;case"AMBIPOM":case 424:m.guard_pokemon_id=424;break;case"DRIFLOON":case 425:m.guard_pokemon_id=425;break;case"DRIFBLIM":case 426:m.guard_pokemon_id=426;break;case"BUNEARY":case 427:m.guard_pokemon_id=427;break;case"LOPUNNY":case 428:m.guard_pokemon_id=428;break;case"MISMAGIUS":case 429:m.guard_pokemon_id=429;break;case"HONCHKROW":case 430:m.guard_pokemon_id=430;break;case"GLAMEOW":case 431:m.guard_pokemon_id=431;break;case"PURUGLY":case 432:m.guard_pokemon_id=432;break;case"CHINGLING":case 433:m.guard_pokemon_id=433;break;case"STUNKY":case 434:m.guard_pokemon_id=434;break;case"SKUNTANK":case 435:m.guard_pokemon_id=435;break;case"BRONZOR":case 436:m.guard_pokemon_id=436;break;case"BRONZONG":case 437:m.guard_pokemon_id=437;break;case"BONSLY":case 438:m.guard_pokemon_id=438;break;case"MIME_JR":case 439:m.guard_pokemon_id=439;break;case"HAPPINY":case 440:m.guard_pokemon_id=440;break;case"CHATOT":case 441:m.guard_pokemon_id=441;break;case"SPIRITOMB":case 442:m.guard_pokemon_id=442;break;case"GIBLE":case 443:m.guard_pokemon_id=443;break;case"GABITE":case 444:m.guard_pokemon_id=444;break;case"GARCHOMP":case 445:m.guard_pokemon_id=445;break;case"MUNCHLAX":case 446:m.guard_pokemon_id=446;break;case"RIOLU":case 447:m.guard_pokemon_id=447;break;case"LUCARIO":case 448:m.guard_pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.guard_pokemon_id=449;break;case"HIPPOWDON":case 450:m.guard_pokemon_id=450;break;case"SKORUPI":case 451:m.guard_pokemon_id=451;break;case"DRAPION":case 452:m.guard_pokemon_id=452;break;case"CROAGUNK":case 453:m.guard_pokemon_id=453;break;case"TOXICROAK":case 454:m.guard_pokemon_id=454;break;case"CARNIVINE":case 455:m.guard_pokemon_id=455;break;case"FINNEON":case 456:m.guard_pokemon_id=456;break;case"LUMINEON":case 457:m.guard_pokemon_id=457;break;case"MANTYKE":case 458:m.guard_pokemon_id=458;break;case"SNOVER":case 459:m.guard_pokemon_id=459;break;case"ABOMASNOW":case 460:m.guard_pokemon_id=460;break;case"WEAVILE":case 461:m.guard_pokemon_id=461;break;case"MAGNEZONE":case 462:m.guard_pokemon_id=462;break;case"LICKILICKY":case 463:m.guard_pokemon_id=463;break;case"RHYPERIOR":case 464:m.guard_pokemon_id=464;break;case"TANGROWTH":case 465:m.guard_pokemon_id=465;break;case"ELECTIVIRE":case 466:m.guard_pokemon_id=466;break;case"MAGMORTAR":case 467:m.guard_pokemon_id=467;break;case"TOGEKISS":case 468:m.guard_pokemon_id=468;break;case"YANMEGA":case 469:m.guard_pokemon_id=469;break;case"LEAFEON":case 470:m.guard_pokemon_id=470;break;case"GLACEON":case 471:m.guard_pokemon_id=471;break;case"GLISCOR":case 472:m.guard_pokemon_id=472;break;case"MAMOSWINE":case 473:m.guard_pokemon_id=473;break;case"PORYGON_Z":case 474:m.guard_pokemon_id=474;break;case"GALLADE":case 475:m.guard_pokemon_id=475;break;case"PROBOPASS":case 476:m.guard_pokemon_id=476;break;case"DUSKNOIR":case 477:m.guard_pokemon_id=477;break;case"FROSLASS":case 478:m.guard_pokemon_id=478;break;case"ROTOM":case 479:m.guard_pokemon_id=479;break;case"UXIE":case 480:m.guard_pokemon_id=480;break;case"MESPRIT":case 481:m.guard_pokemon_id=481;break;case"AZELF":case 482:m.guard_pokemon_id=482;break;case"DIALGA":case 483:m.guard_pokemon_id=483;break;case"PALKIA":case 484:m.guard_pokemon_id=484;break;case"HEATRAN":case 485:m.guard_pokemon_id=485;break;case"REGIGIGAS":case 486:m.guard_pokemon_id=486;break;case"GIRATINA":case 487:m.guard_pokemon_id=487;break;case"CRESSELIA":case 488:m.guard_pokemon_id=488;break;case"PHIONE":case 489:m.guard_pokemon_id=489;break;case"MANAPHY":case 490:m.guard_pokemon_id=490;break;case"DARKRAI":case 491:m.guard_pokemon_id=491;break;case"SHAYMIN":case 492:m.guard_pokemon_id=492;break;case"ARCEUS":case 493:m.guard_pokemon_id=493;break;case"MELTAN":case 808:m.guard_pokemon_id=808;break;case"MELMETAL":case 809:m.guard_pokemon_id=809;break}if(d.guard_pokemon_cp!=null){m.guard_pokemon_cp=d.guard_pokemon_cp|0}if(d.enabled!=null){m.enabled=Boolean(d.enabled)}switch(d.type){case"GYM":case 0:m.type=0;break;case"CHECKPOINT":case 1:m.type=1;break}if(d.gym_points!=null){if($util.Long)(m.gym_points=$util.Long.fromValue(d.gym_points)).unsigned=false;else if(typeof d.gym_points==="string")m.gym_points=parseInt(d.gym_points,10);else if(typeof d.gym_points==="number")m.gym_points=d.gym_points;else if(typeof d.gym_points==="object")m.gym_points=new $util.LongBits(d.gym_points.low>>>0,d.gym_points.high>>>0).toNumber()}if(d.is_in_battle!=null){m.is_in_battle=Boolean(d.is_in_battle)}if(d.active_fort_modifier){if(!Array.isArray(d.active_fort_modifier))throw TypeError(".POGOProtos.Map.Fort.FortData.active_fort_modifier: array expected");m.active_fort_modifier=[];for(var i=0;i<d.active_fort_modifier.length;++i){switch(d.active_fort_modifier[i]){default:case"ITEM_UNKNOWN":case 0:m.active_fort_modifier[i]=0;break;case"ITEM_POKE_BALL":case 1:m.active_fort_modifier[i]=1;break;case"ITEM_GREAT_BALL":case 2:m.active_fort_modifier[i]=2;break;case"ITEM_ULTRA_BALL":case 3:m.active_fort_modifier[i]=3;break;case"ITEM_MASTER_BALL":case 4:m.active_fort_modifier[i]=4;break;case"ITEM_PREMIER_BALL":case 5:m.active_fort_modifier[i]=5;break;case"ITEM_POTION":case 101:m.active_fort_modifier[i]=101;break;case"ITEM_SUPER_POTION":case 102:m.active_fort_modifier[i]=102;break;case"ITEM_HYPER_POTION":case 103:m.active_fort_modifier[i]=103;break;case"ITEM_MAX_POTION":case 104:m.active_fort_modifier[i]=104;break;case"ITEM_REVIVE":case 201:m.active_fort_modifier[i]=201;break;case"ITEM_MAX_REVIVE":case 202:m.active_fort_modifier[i]=202;break;case"ITEM_LUCKY_EGG":case 301:m.active_fort_modifier[i]=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.active_fort_modifier[i]=401;break;case"ITEM_INCENSE_SPICY":case 402:m.active_fort_modifier[i]=402;break;case"ITEM_INCENSE_COOL":case 403:m.active_fort_modifier[i]=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.active_fort_modifier[i]=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.active_fort_modifier[i]=405;break;case"ITEM_TROY_DISK":case 501:m.active_fort_modifier[i]=501;break;case"ITEM_X_ATTACK":case 602:m.active_fort_modifier[i]=602;break;case"ITEM_X_DEFENSE":case 603:m.active_fort_modifier[i]=603;break;case"ITEM_X_MIRACLE":case 604:m.active_fort_modifier[i]=604;break;case"ITEM_RAZZ_BERRY":case 701:m.active_fort_modifier[i]=701;break;case"ITEM_BLUK_BERRY":case 702:m.active_fort_modifier[i]=702;break;case"ITEM_NANAB_BERRY":case 703:m.active_fort_modifier[i]=703;break;case"ITEM_WEPAR_BERRY":case 704:m.active_fort_modifier[i]=704;break;case"ITEM_PINAP_BERRY":case 705:m.active_fort_modifier[i]=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.active_fort_modifier[i]=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.active_fort_modifier[i]=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.active_fort_modifier[i]=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.active_fort_modifier[i]=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.active_fort_modifier[i]=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.active_fort_modifier[i]=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.active_fort_modifier[i]=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.active_fort_modifier[i]=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.active_fort_modifier[i]=1002;break;case"ITEM_SUN_STONE":case 1101:m.active_fort_modifier[i]=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.active_fort_modifier[i]=1102;break;case"ITEM_METAL_COAT":case 1103:m.active_fort_modifier[i]=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.active_fort_modifier[i]=1104;break;case"ITEM_UP_GRADE":case 1105:m.active_fort_modifier[i]=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.active_fort_modifier[i]=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.active_fort_modifier[i]=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.active_fort_modifier[i]=1202;break;case"ITEM_RARE_CANDY":case 1301:m.active_fort_modifier[i]=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.active_fort_modifier[i]=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.active_fort_modifier[i]=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.active_fort_modifier[i]=1403;break;case"ITEM_STAR_PIECE":case 1404:m.active_fort_modifier[i]=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.active_fort_modifier[i]=1405;break}}}if(d.lure_info!=null){if(typeof d.lure_info!=="object")throw TypeError(".POGOProtos.Map.Fort.FortData.lure_info: object expected");m.lure_info=$root.POGOProtos.Map.Fort.FortLureInfo.fromObject(d.lure_info)}if(d.cooldown_complete_timestamp_ms!=null){if($util.Long)(m.cooldown_complete_timestamp_ms=$util.Long.fromValue(d.cooldown_complete_timestamp_ms)).unsigned=false;else if(typeof d.cooldown_complete_timestamp_ms==="string")m.cooldown_complete_timestamp_ms=parseInt(d.cooldown_complete_timestamp_ms,10);else if(typeof d.cooldown_complete_timestamp_ms==="number")m.cooldown_complete_timestamp_ms=d.cooldown_complete_timestamp_ms;else if(typeof d.cooldown_complete_timestamp_ms==="object")m.cooldown_complete_timestamp_ms=new $util.LongBits(d.cooldown_complete_timestamp_ms.low>>>0,d.cooldown_complete_timestamp_ms.high>>>0).toNumber()}switch(d.sponsor){case"UNSET_SPONSOR":case 0:m.sponsor=0;break;case"MCDONALDS":case 1:m.sponsor=1;break;case"POKEMON_STORE":case 2:m.sponsor=2;break;case"TOHO":case 3:m.sponsor=3;break;case"SOFTBANK":case 4:m.sponsor=4;break;case"GLOBE":case 5:m.sponsor=5;break;case"SPATULA":case 6:m.sponsor=6;break;case"THERMOMETER":case 7:m.sponsor=7;break;case"KNIFE":case 8:m.sponsor=8;break;case"GRILL":case 9:m.sponsor=9;break;case"SMOKER":case 10:m.sponsor=10;break;case"PAN":case 11:m.sponsor=11;break;case"BBQ":case 12:m.sponsor=12;break;case"FRYER":case 13:m.sponsor=13;break;case"STEAMER":case 14:m.sponsor=14;break;case"HOOD":case 15:m.sponsor=15;break;case"SLOWCOOKER":case 16:m.sponsor=16;break;case"MIXER":case 17:m.sponsor=17;break;case"SCOOPER":case 18:m.sponsor=18;break;case"MUFFINTIN":case 19:m.sponsor=19;break;case"SALAMANDER":case 20:m.sponsor=20;break;case"PLANCHA":case 21:m.sponsor=21;break;case"NIA_OPS":case 22:m.sponsor=22;break;case"WHISK":case 23:m.sponsor=23;break}switch(d.rendering_type){case"DEFAULT":case 0:m.rendering_type=0;break;case"INTERNAL_TEST":case 1:m.rendering_type=1;break}if(d.deploy_lockout_end_ms!=null){if($util.Long)(m.deploy_lockout_end_ms=$util.Long.fromValue(d.deploy_lockout_end_ms)).unsigned=false;else if(typeof d.deploy_lockout_end_ms==="string")m.deploy_lockout_end_ms=parseInt(d.deploy_lockout_end_ms,10);else if(typeof d.deploy_lockout_end_ms==="number")m.deploy_lockout_end_ms=d.deploy_lockout_end_ms;else if(typeof d.deploy_lockout_end_ms==="object")m.deploy_lockout_end_ms=new $util.LongBits(d.deploy_lockout_end_ms.low>>>0,d.deploy_lockout_end_ms.high>>>0).toNumber()}if(d.guard_pokemon_display!=null){if(typeof d.guard_pokemon_display!=="object")throw TypeError(".POGOProtos.Map.Fort.FortData.guard_pokemon_display: object expected");m.guard_pokemon_display=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.guard_pokemon_display)}if(d.closed!=null){m.closed=Boolean(d.closed)}if(d.raid_info!=null){if(typeof d.raid_info!=="object")throw TypeError(".POGOProtos.Map.Fort.FortData.raid_info: object expected");m.raid_info=$root.POGOProtos.Data.Raid.RaidInfo.fromObject(d.raid_info)}if(d.gym_display!=null){if(typeof d.gym_display!=="object")throw TypeError(".POGOProtos.Map.Fort.FortData.gym_display: object expected");m.gym_display=$root.POGOProtos.Map.Fort.GymDisplay.fromObject(d.gym_display)}if(d.visited!=null){m.visited=Boolean(d.visited)}if(d.same_team_deploy_lockout_end_ms!=null){if($util.Long)(m.same_team_deploy_lockout_end_ms=$util.Long.fromValue(d.same_team_deploy_lockout_end_ms)).unsigned=false;else if(typeof d.same_team_deploy_lockout_end_ms==="string")m.same_team_deploy_lockout_end_ms=parseInt(d.same_team_deploy_lockout_end_ms,10);else if(typeof d.same_team_deploy_lockout_end_ms==="number")m.same_team_deploy_lockout_end_ms=d.same_team_deploy_lockout_end_ms;else if(typeof d.same_team_deploy_lockout_end_ms==="object")m.same_team_deploy_lockout_end_ms=new $util.LongBits(d.same_team_deploy_lockout_end_ms.low>>>0,d.same_team_deploy_lockout_end_ms.high>>>0).toNumber()}if(d.allow_checkin!=null){m.allow_checkin=Boolean(d.allow_checkin)}if(d.image_url!=null){m.image_url=String(d.image_url)}if(d.in_event!=null){m.in_event=Boolean(d.in_event)}if(d.banner_url!=null){m.banner_url=String(d.banner_url)}if(d.partner_id!=null){m.partner_id=String(d.partner_id)}if(d.challenge_quest_completed!=null){m.challenge_quest_completed=Boolean(d.challenge_quest_completed)}if(d.is_ex_raid_eligible!=null){m.is_ex_raid_eligible=Boolean(d.is_ex_raid_eligible)}return m};FortData.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.active_fort_modifier=[]}if(o.defaults){d.id="";if($util.Long){var n=new $util.Long(0,0,false);d.last_modified_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.last_modified_timestamp_ms=o.longs===String?"0":0;d.latitude=0;d.longitude=0;d.owned_by_team=o.enums===String?"NEUTRAL":0;d.guard_pokemon_id=o.enums===String?"MISSINGNO":0;d.guard_pokemon_cp=0;d.enabled=false;d.type=o.enums===String?"GYM":0;if($util.Long){var n=new $util.Long(0,0,false);d.gym_points=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.gym_points=o.longs===String?"0":0;d.is_in_battle=false;d.lure_info=null;if($util.Long){var n=new $util.Long(0,0,false);d.cooldown_complete_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.cooldown_complete_timestamp_ms=o.longs===String?"0":0;d.sponsor=o.enums===String?"UNSET_SPONSOR":0;d.rendering_type=o.enums===String?"DEFAULT":0;if($util.Long){var n=new $util.Long(0,0,false);d.deploy_lockout_end_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.deploy_lockout_end_ms=o.longs===String?"0":0;d.guard_pokemon_display=null;d.closed=false;d.raid_info=null;d.gym_display=null;d.visited=false;if($util.Long){var n=new $util.Long(0,0,false);d.same_team_deploy_lockout_end_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.same_team_deploy_lockout_end_ms=o.longs===String?"0":0;d.allow_checkin=false;d.image_url="";d.in_event=false;d.banner_url="";d.partner_id="";d.challenge_quest_completed=false;d.is_ex_raid_eligible=false}if(m.id!=null&&m.hasOwnProperty("id")){d.id=m.id}if(m.last_modified_timestamp_ms!=null&&m.hasOwnProperty("last_modified_timestamp_ms")){if(typeof m.last_modified_timestamp_ms==="number")d.last_modified_timestamp_ms=o.longs===String?String(m.last_modified_timestamp_ms):m.last_modified_timestamp_ms;else d.last_modified_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.last_modified_timestamp_ms):o.longs===Number?new $util.LongBits(m.last_modified_timestamp_ms.low>>>0,m.last_modified_timestamp_ms.high>>>0).toNumber():m.last_modified_timestamp_ms}if(m.latitude!=null&&m.hasOwnProperty("latitude")){d.latitude=o.json&&!isFinite(m.latitude)?String(m.latitude):m.latitude}if(m.longitude!=null&&m.hasOwnProperty("longitude")){d.longitude=o.json&&!isFinite(m.longitude)?String(m.longitude):m.longitude}if(m.owned_by_team!=null&&m.hasOwnProperty("owned_by_team")){d.owned_by_team=o.enums===String?$root.POGOProtos.Enums.TeamColor[m.owned_by_team]:m.owned_by_team}if(m.guard_pokemon_id!=null&&m.hasOwnProperty("guard_pokemon_id")){d.guard_pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.guard_pokemon_id]:m.guard_pokemon_id}if(m.guard_pokemon_cp!=null&&m.hasOwnProperty("guard_pokemon_cp")){d.guard_pokemon_cp=m.guard_pokemon_cp}if(m.enabled!=null&&m.hasOwnProperty("enabled")){d.enabled=m.enabled}if(m.type!=null&&m.hasOwnProperty("type")){d.type=o.enums===String?$root.POGOProtos.Map.Fort.FortType[m.type]:m.type}if(m.gym_points!=null&&m.hasOwnProperty("gym_points")){if(typeof m.gym_points==="number")d.gym_points=o.longs===String?String(m.gym_points):m.gym_points;else d.gym_points=o.longs===String?$util.Long.prototype.toString.call(m.gym_points):o.longs===Number?new $util.LongBits(m.gym_points.low>>>0,m.gym_points.high>>>0).toNumber():m.gym_points}if(m.is_in_battle!=null&&m.hasOwnProperty("is_in_battle")){d.is_in_battle=m.is_in_battle}if(m.active_fort_modifier&&m.active_fort_modifier.length){d.active_fort_modifier=[];for(var j=0;j<m.active_fort_modifier.length;++j){d.active_fort_modifier[j]=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.active_fort_modifier[j]]:m.active_fort_modifier[j]}}if(m.lure_info!=null&&m.hasOwnProperty("lure_info")){d.lure_info=$root.POGOProtos.Map.Fort.FortLureInfo.toObject(m.lure_info,o)}if(m.cooldown_complete_timestamp_ms!=null&&m.hasOwnProperty("cooldown_complete_timestamp_ms")){if(typeof m.cooldown_complete_timestamp_ms==="number")d.cooldown_complete_timestamp_ms=o.longs===String?String(m.cooldown_complete_timestamp_ms):m.cooldown_complete_timestamp_ms;else d.cooldown_complete_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.cooldown_complete_timestamp_ms):o.longs===Number?new $util.LongBits(m.cooldown_complete_timestamp_ms.low>>>0,m.cooldown_complete_timestamp_ms.high>>>0).toNumber():m.cooldown_complete_timestamp_ms}if(m.sponsor!=null&&m.hasOwnProperty("sponsor")){d.sponsor=o.enums===String?$root.POGOProtos.Map.Fort.FortSponsor[m.sponsor]:m.sponsor}if(m.rendering_type!=null&&m.hasOwnProperty("rendering_type")){d.rendering_type=o.enums===String?$root.POGOProtos.Map.Fort.FortRenderingType[m.rendering_type]:m.rendering_type}if(m.deploy_lockout_end_ms!=null&&m.hasOwnProperty("deploy_lockout_end_ms")){if(typeof m.deploy_lockout_end_ms==="number")d.deploy_lockout_end_ms=o.longs===String?String(m.deploy_lockout_end_ms):m.deploy_lockout_end_ms;else d.deploy_lockout_end_ms=o.longs===String?$util.Long.prototype.toString.call(m.deploy_lockout_end_ms):o.longs===Number?new $util.LongBits(m.deploy_lockout_end_ms.low>>>0,m.deploy_lockout_end_ms.high>>>0).toNumber():m.deploy_lockout_end_ms}if(m.guard_pokemon_display!=null&&m.hasOwnProperty("guard_pokemon_display")){d.guard_pokemon_display=$root.POGOProtos.Data.PokemonDisplay.toObject(m.guard_pokemon_display,o)}if(m.closed!=null&&m.hasOwnProperty("closed")){d.closed=m.closed}if(m.raid_info!=null&&m.hasOwnProperty("raid_info")){d.raid_info=$root.POGOProtos.Data.Raid.RaidInfo.toObject(m.raid_info,o)}if(m.gym_display!=null&&m.hasOwnProperty("gym_display")){d.gym_display=$root.POGOProtos.Map.Fort.GymDisplay.toObject(m.gym_display,o)}if(m.visited!=null&&m.hasOwnProperty("visited")){d.visited=m.visited}if(m.same_team_deploy_lockout_end_ms!=null&&m.hasOwnProperty("same_team_deploy_lockout_end_ms")){if(typeof m.same_team_deploy_lockout_end_ms==="number")d.same_team_deploy_lockout_end_ms=o.longs===String?String(m.same_team_deploy_lockout_end_ms):m.same_team_deploy_lockout_end_ms;else d.same_team_deploy_lockout_end_ms=o.longs===String?$util.Long.prototype.toString.call(m.same_team_deploy_lockout_end_ms):o.longs===Number?new $util.LongBits(m.same_team_deploy_lockout_end_ms.low>>>0,m.same_team_deploy_lockout_end_ms.high>>>0).toNumber():m.same_team_deploy_lockout_end_ms}if(m.allow_checkin!=null&&m.hasOwnProperty("allow_checkin")){d.allow_checkin=m.allow_checkin}if(m.image_url!=null&&m.hasOwnProperty("image_url")){d.image_url=m.image_url}if(m.in_event!=null&&m.hasOwnProperty("in_event")){d.in_event=m.in_event}if(m.banner_url!=null&&m.hasOwnProperty("banner_url")){d.banner_url=m.banner_url}if(m.partner_id!=null&&m.hasOwnProperty("partner_id")){d.partner_id=m.partner_id}if(m.challenge_quest_completed!=null&&m.hasOwnProperty("challenge_quest_completed")){d.challenge_quest_completed=m.challenge_quest_completed}if(m.is_ex_raid_eligible!=null&&m.hasOwnProperty("is_ex_raid_eligible")){d.is_ex_raid_eligible=m.is_ex_raid_eligible}return d};FortData.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FortData}();Fort.FortLureInfo=function(){function FortLureInfo(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FortLureInfo.prototype.fort_id="";FortLureInfo.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,false):0;FortLureInfo.prototype.active_pokemon_id=0;FortLureInfo.prototype.lure_expires_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;FortLureInfo.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(10).string(m.fort_id);if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(17).fixed64(m.encounter_id);if(m.active_pokemon_id!=null&&m.hasOwnProperty("active_pokemon_id"))w.uint32(24).int32(m.active_pokemon_id);if(m.lure_expires_timestamp_ms!=null&&m.hasOwnProperty("lure_expires_timestamp_ms"))w.uint32(32).int64(m.lure_expires_timestamp_ms);return w};FortLureInfo.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.Fort.FortLureInfo;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fort_id=r.string();break;case 2:m.encounter_id=r.fixed64();break;case 3:m.active_pokemon_id=r.int32();break;case 4:m.lure_expires_timestamp_ms=r.int64();break;default:r.skipType(t&7);break}}return m};FortLureInfo.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.Fort.FortLureInfo)return d;var m=new $root.POGOProtos.Map.Fort.FortLureInfo;if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=false;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber()}switch(d.active_pokemon_id){case"MISSINGNO":case 0:m.active_pokemon_id=0;break;case"BULBASAUR":case 1:m.active_pokemon_id=1;break;case"IVYSAUR":case 2:m.active_pokemon_id=2;break;case"VENUSAUR":case 3:m.active_pokemon_id=3;break;case"CHARMANDER":case 4:m.active_pokemon_id=4;break;case"CHARMELEON":case 5:m.active_pokemon_id=5;break;case"CHARIZARD":case 6:m.active_pokemon_id=6;break;case"SQUIRTLE":case 7:m.active_pokemon_id=7;break;case"WARTORTLE":case 8:m.active_pokemon_id=8;break;case"BLASTOISE":case 9:m.active_pokemon_id=9;break;case"CATERPIE":case 10:m.active_pokemon_id=10;break;case"METAPOD":case 11:m.active_pokemon_id=11;break;case"BUTTERFREE":case 12:m.active_pokemon_id=12;break;case"WEEDLE":case 13:m.active_pokemon_id=13;break;case"KAKUNA":case 14:m.active_pokemon_id=14;break;case"BEEDRILL":case 15:m.active_pokemon_id=15;break;case"PIDGEY":case 16:m.active_pokemon_id=16;break;case"PIDGEOTTO":case 17:m.active_pokemon_id=17;break;case"PIDGEOT":case 18:m.active_pokemon_id=18;break;case"RATTATA":case 19:m.active_pokemon_id=19;break;case"RATICATE":case 20:m.active_pokemon_id=20;break;case"SPEAROW":case 21:m.active_pokemon_id=21;break;case"FEAROW":case 22:m.active_pokemon_id=22;break;case"EKANS":case 23:m.active_pokemon_id=23;break;case"ARBOK":case 24:m.active_pokemon_id=24;break;case"PIKACHU":case 25:m.active_pokemon_id=25;break;case"RAICHU":case 26:m.active_pokemon_id=26;break;case"SANDSHREW":case 27:m.active_pokemon_id=27;break;case"SANDSLASH":case 28:m.active_pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.active_pokemon_id=29;break;case"NIDORINA":case 30:m.active_pokemon_id=30;break;case"NIDOQUEEN":case 31:m.active_pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.active_pokemon_id=32;break;case"NIDORINO":case 33:m.active_pokemon_id=33;break;case"NIDOKING":case 34:m.active_pokemon_id=34;break;case"CLEFAIRY":case 35:m.active_pokemon_id=35;break;case"CLEFABLE":case 36:m.active_pokemon_id=36;break;case"VULPIX":case 37:m.active_pokemon_id=37;break;case"NINETALES":case 38:m.active_pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.active_pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.active_pokemon_id=40;break;case"ZUBAT":case 41:m.active_pokemon_id=41;break;case"GOLBAT":case 42:m.active_pokemon_id=42;break;case"ODDISH":case 43:m.active_pokemon_id=43;break;case"GLOOM":case 44:m.active_pokemon_id=44;break;case"VILEPLUME":case 45:m.active_pokemon_id=45;break;case"PARAS":case 46:m.active_pokemon_id=46;break;case"PARASECT":case 47:m.active_pokemon_id=47;break;case"VENONAT":case 48:m.active_pokemon_id=48;break;case"VENOMOTH":case 49:m.active_pokemon_id=49;break;case"DIGLETT":case 50:m.active_pokemon_id=50;break;case"DUGTRIO":case 51:m.active_pokemon_id=51;break;case"MEOWTH":case 52:m.active_pokemon_id=52;break;case"PERSIAN":case 53:m.active_pokemon_id=53;break;case"PSYDUCK":case 54:m.active_pokemon_id=54;break;case"GOLDUCK":case 55:m.active_pokemon_id=55;break;case"MANKEY":case 56:m.active_pokemon_id=56;break;case"PRIMEAPE":case 57:m.active_pokemon_id=57;break;case"GROWLITHE":case 58:m.active_pokemon_id=58;break;case"ARCANINE":case 59:m.active_pokemon_id=59;break;case"POLIWAG":case 60:m.active_pokemon_id=60;break;case"POLIWHIRL":case 61:m.active_pokemon_id=61;break;case"POLIWRATH":case 62:m.active_pokemon_id=62;break;case"ABRA":case 63:m.active_pokemon_id=63;break;case"KADABRA":case 64:m.active_pokemon_id=64;break;case"ALAKAZAM":case 65:m.active_pokemon_id=65;break;case"MACHOP":case 66:m.active_pokemon_id=66;break;case"MACHOKE":case 67:m.active_pokemon_id=67;break;case"MACHAMP":case 68:m.active_pokemon_id=68;break;case"BELLSPROUT":case 69:m.active_pokemon_id=69;break;case"WEEPINBELL":case 70:m.active_pokemon_id=70;break;case"VICTREEBEL":case 71:m.active_pokemon_id=71;break;case"TENTACOOL":case 72:m.active_pokemon_id=72;break;case"TENTACRUEL":case 73:m.active_pokemon_id=73;break;case"GEODUDE":case 74:m.active_pokemon_id=74;break;case"GRAVELER":case 75:m.active_pokemon_id=75;break;case"GOLEM":case 76:m.active_pokemon_id=76;break;case"PONYTA":case 77:m.active_pokemon_id=77;break;case"RAPIDASH":case 78:m.active_pokemon_id=78;break;case"SLOWPOKE":case 79:m.active_pokemon_id=79;break;case"SLOWBRO":case 80:m.active_pokemon_id=80;break;case"MAGNEMITE":case 81:m.active_pokemon_id=81;break;case"MAGNETON":case 82:m.active_pokemon_id=82;break;case"FARFETCHD":case 83:m.active_pokemon_id=83;break;case"DODUO":case 84:m.active_pokemon_id=84;break;case"DODRIO":case 85:m.active_pokemon_id=85;break;case"SEEL":case 86:m.active_pokemon_id=86;break;case"DEWGONG":case 87:m.active_pokemon_id=87;break;case"GRIMER":case 88:m.active_pokemon_id=88;break;case"MUK":case 89:m.active_pokemon_id=89;break;case"SHELLDER":case 90:m.active_pokemon_id=90;break;case"CLOYSTER":case 91:m.active_pokemon_id=91;break;case"GASTLY":case 92:m.active_pokemon_id=92;break;case"HAUNTER":case 93:m.active_pokemon_id=93;break;case"GENGAR":case 94:m.active_pokemon_id=94;break;case"ONIX":case 95:m.active_pokemon_id=95;break;case"DROWZEE":case 96:m.active_pokemon_id=96;break;case"HYPNO":case 97:m.active_pokemon_id=97;break;case"KRABBY":case 98:m.active_pokemon_id=98;break;case"KINGLER":case 99:m.active_pokemon_id=99;break;case"VOLTORB":case 100:m.active_pokemon_id=100;break;case"ELECTRODE":case 101:m.active_pokemon_id=101;break;case"EXEGGCUTE":case 102:m.active_pokemon_id=102;break;case"EXEGGUTOR":case 103:m.active_pokemon_id=103;break;case"CUBONE":case 104:m.active_pokemon_id=104;break;case"MAROWAK":case 105:m.active_pokemon_id=105;break;case"HITMONLEE":case 106:m.active_pokemon_id=106;break;case"HITMONCHAN":case 107:m.active_pokemon_id=107;break;case"LICKITUNG":case 108:m.active_pokemon_id=108;break;case"KOFFING":case 109:m.active_pokemon_id=109;break;case"WEEZING":case 110:m.active_pokemon_id=110;break;case"RHYHORN":case 111:m.active_pokemon_id=111;break;case"RHYDON":case 112:m.active_pokemon_id=112;break;case"CHANSEY":case 113:m.active_pokemon_id=113;break;case"TANGELA":case 114:m.active_pokemon_id=114;break;case"KANGASKHAN":case 115:m.active_pokemon_id=115;break;case"HORSEA":case 116:m.active_pokemon_id=116;break;case"SEADRA":case 117:m.active_pokemon_id=117;break;case"GOLDEEN":case 118:m.active_pokemon_id=118;break;case"SEAKING":case 119:m.active_pokemon_id=119;break;case"STARYU":case 120:m.active_pokemon_id=120;break;case"STARMIE":case 121:m.active_pokemon_id=121;break;case"MR_MIME":case 122:m.active_pokemon_id=122;break;case"SCYTHER":case 123:m.active_pokemon_id=123;break;case"JYNX":case 124:m.active_pokemon_id=124;break;case"ELECTABUZZ":case 125:m.active_pokemon_id=125;break;case"MAGMAR":case 126:m.active_pokemon_id=126;break;case"PINSIR":case 127:m.active_pokemon_id=127;break;case"TAUROS":case 128:m.active_pokemon_id=128;break;case"MAGIKARP":case 129:m.active_pokemon_id=129;break;case"GYARADOS":case 130:m.active_pokemon_id=130;break;case"LAPRAS":case 131:m.active_pokemon_id=131;break;case"DITTO":case 132:m.active_pokemon_id=132;break;case"EEVEE":case 133:m.active_pokemon_id=133;break;case"VAPOREON":case 134:m.active_pokemon_id=134;break;case"JOLTEON":case 135:m.active_pokemon_id=135;break;case"FLAREON":case 136:m.active_pokemon_id=136;break;case"PORYGON":case 137:m.active_pokemon_id=137;break;case"OMANYTE":case 138:m.active_pokemon_id=138;break;case"OMASTAR":case 139:m.active_pokemon_id=139;break;case"KABUTO":case 140:m.active_pokemon_id=140;break;case"KABUTOPS":case 141:m.active_pokemon_id=141;break;case"AERODACTYL":case 142:m.active_pokemon_id=142;break;case"SNORLAX":case 143:m.active_pokemon_id=143;break;case"ARTICUNO":case 144:m.active_pokemon_id=144;break;case"ZAPDOS":case 145:m.active_pokemon_id=145;break;case"MOLTRES":case 146:m.active_pokemon_id=146;break;case"DRATINI":case 147:m.active_pokemon_id=147;break;case"DRAGONAIR":case 148:m.active_pokemon_id=148;break;case"DRAGONITE":case 149:m.active_pokemon_id=149;break;case"MEWTWO":case 150:m.active_pokemon_id=150;break;case"MEW":case 151:m.active_pokemon_id=151;break;case"CHIKORITA":case 152:m.active_pokemon_id=152;break;case"BAYLEEF":case 153:m.active_pokemon_id=153;break;case"MEGANIUM":case 154:m.active_pokemon_id=154;break;case"CYNDAQUIL":case 155:m.active_pokemon_id=155;break;case"QUILAVA":case 156:m.active_pokemon_id=156;break;case"TYPHLOSION":case 157:m.active_pokemon_id=157;break;case"TOTODILE":case 158:m.active_pokemon_id=158;break;case"CROCONAW":case 159:m.active_pokemon_id=159;break;case"FERALIGATR":case 160:m.active_pokemon_id=160;break;case"SENTRET":case 161:m.active_pokemon_id=161;break;case"FURRET":case 162:m.active_pokemon_id=162;break;case"HOOTHOOT":case 163:m.active_pokemon_id=163;break;case"NOCTOWL":case 164:m.active_pokemon_id=164;break;case"LEDYBA":case 165:m.active_pokemon_id=165;break;case"LEDIAN":case 166:m.active_pokemon_id=166;break;case"SPINARAK":case 167:m.active_pokemon_id=167;break;case"ARIADOS":case 168:m.active_pokemon_id=168;break;case"CROBAT":case 169:m.active_pokemon_id=169;break;case"CHINCHOU":case 170:m.active_pokemon_id=170;break;case"LANTURN":case 171:m.active_pokemon_id=171;break;case"PICHU":case 172:m.active_pokemon_id=172;break;case"CLEFFA":case 173:m.active_pokemon_id=173;break;case"IGGLYBUFF":case 174:m.active_pokemon_id=174;break;case"TOGEPI":case 175:m.active_pokemon_id=175;break;case"TOGETIC":case 176:m.active_pokemon_id=176;break;case"NATU":case 177:m.active_pokemon_id=177;break;case"XATU":case 178:m.active_pokemon_id=178;break;case"MAREEP":case 179:m.active_pokemon_id=179;break;case"FLAAFFY":case 180:m.active_pokemon_id=180;break;case"AMPHAROS":case 181:m.active_pokemon_id=181;break;case"BELLOSSOM":case 182:m.active_pokemon_id=182;break;case"MARILL":case 183:m.active_pokemon_id=183;break;case"AZUMARILL":case 184:m.active_pokemon_id=184;break;case"SUDOWOODO":case 185:m.active_pokemon_id=185;break;case"POLITOED":case 186:m.active_pokemon_id=186;break;case"HOPPIP":case 187:m.active_pokemon_id=187;break;case"SKIPLOOM":case 188:m.active_pokemon_id=188;break;case"JUMPLUFF":case 189:m.active_pokemon_id=189;break;case"AIPOM":case 190:m.active_pokemon_id=190;break;case"SUNKERN":case 191:m.active_pokemon_id=191;break;case"SUNFLORA":case 192:m.active_pokemon_id=192;break;case"YANMA":case 193:m.active_pokemon_id=193;break;case"WOOPER":case 194:m.active_pokemon_id=194;break;case"QUAGSIRE":case 195:m.active_pokemon_id=195;break;case"ESPEON":case 196:m.active_pokemon_id=196;break;case"UMBREON":case 197:m.active_pokemon_id=197;break;case"MURKROW":case 198:m.active_pokemon_id=198;break;case"SLOWKING":case 199:m.active_pokemon_id=199;break;case"MISDREAVUS":case 200:m.active_pokemon_id=200;break;case"UNOWN":case 201:m.active_pokemon_id=201;break;case"WOBBUFFET":case 202:m.active_pokemon_id=202;break;case"GIRAFARIG":case 203:m.active_pokemon_id=203;break;case"PINECO":case 204:m.active_pokemon_id=204;break;case"FORRETRESS":case 205:m.active_pokemon_id=205;break;case"DUNSPARCE":case 206:m.active_pokemon_id=206;break;case"GLIGAR":case 207:m.active_pokemon_id=207;break;case"STEELIX":case 208:m.active_pokemon_id=208;break;case"SNUBBULL":case 209:m.active_pokemon_id=209;break;case"GRANBULL":case 210:m.active_pokemon_id=210;break;case"QWILFISH":case 211:m.active_pokemon_id=211;break;case"SCIZOR":case 212:m.active_pokemon_id=212;break;case"SHUCKLE":case 213:m.active_pokemon_id=213;break;case"HERACROSS":case 214:m.active_pokemon_id=214;break;case"SNEASEL":case 215:m.active_pokemon_id=215;break;case"TEDDIURSA":case 216:m.active_pokemon_id=216;break;case"URSARING":case 217:m.active_pokemon_id=217;break;case"SLUGMA":case 218:m.active_pokemon_id=218;break;case"MAGCARGO":case 219:m.active_pokemon_id=219;break;case"SWINUB":case 220:m.active_pokemon_id=220;break;case"PILOSWINE":case 221:m.active_pokemon_id=221;break;case"CORSOLA":case 222:m.active_pokemon_id=222;break;case"REMORAID":case 223:m.active_pokemon_id=223;break;case"OCTILLERY":case 224:m.active_pokemon_id=224;break;case"DELIBIRD":case 225:m.active_pokemon_id=225;break;case"MANTINE":case 226:m.active_pokemon_id=226;break;case"SKARMORY":case 227:m.active_pokemon_id=227;break;case"HOUNDOUR":case 228:m.active_pokemon_id=228;break;case"HOUNDOOM":case 229:m.active_pokemon_id=229;break;case"KINGDRA":case 230:m.active_pokemon_id=230;break;case"PHANPY":case 231:m.active_pokemon_id=231;break;case"DONPHAN":case 232:m.active_pokemon_id=232;break;case"PORYGON2":case 233:m.active_pokemon_id=233;break;case"STANTLER":case 234:m.active_pokemon_id=234;break;case"SMEARGLE":case 235:m.active_pokemon_id=235;break;case"TYROGUE":case 236:m.active_pokemon_id=236;break;case"HITMONTOP":case 237:m.active_pokemon_id=237;break;case"SMOOCHUM":case 238:m.active_pokemon_id=238;break;case"ELEKID":case 239:m.active_pokemon_id=239;break;case"MAGBY":case 240:m.active_pokemon_id=240;break;case"MILTANK":case 241:m.active_pokemon_id=241;break;case"BLISSEY":case 242:m.active_pokemon_id=242;break;case"RAIKOU":case 243:m.active_pokemon_id=243;break;case"ENTEI":case 244:m.active_pokemon_id=244;break;case"SUICUNE":case 245:m.active_pokemon_id=245;break;case"LARVITAR":case 246:m.active_pokemon_id=246;break;case"PUPITAR":case 247:m.active_pokemon_id=247;break;case"TYRANITAR":case 248:m.active_pokemon_id=248;break;case"LUGIA":case 249:m.active_pokemon_id=249;break;case"HO_OH":case 250:m.active_pokemon_id=250;break;case"CELEBI":case 251:m.active_pokemon_id=251;break;case"TREECKO":case 252:m.active_pokemon_id=252;break;case"GROVYLE":case 253:m.active_pokemon_id=253;break;case"SCEPTILE":case 254:m.active_pokemon_id=254;break;case"TORCHIC":case 255:m.active_pokemon_id=255;break;case"COMBUSKEN":case 256:m.active_pokemon_id=256;break;case"BLAZIKEN":case 257:m.active_pokemon_id=257;break;case"MUDKIP":case 258:m.active_pokemon_id=258;break;case"MARSHTOMP":case 259:m.active_pokemon_id=259;break;case"SWAMPERT":case 260:m.active_pokemon_id=260;break;case"POOCHYENA":case 261:m.active_pokemon_id=261;break;case"MIGHTYENA":case 262:m.active_pokemon_id=262;break;case"ZIGZAGOON":case 263:m.active_pokemon_id=263;break;case"LINOONE":case 264:m.active_pokemon_id=264;break;case"WURMPLE":case 265:m.active_pokemon_id=265;break;case"SILCOON":case 266:m.active_pokemon_id=266;break;case"BEAUTIFLY":case 267:m.active_pokemon_id=267;break;case"CASCOON":case 268:m.active_pokemon_id=268;break;case"DUSTOX":case 269:m.active_pokemon_id=269;break;case"LOTAD":case 270:m.active_pokemon_id=270;break;case"LOMBRE":case 271:m.active_pokemon_id=271;break;case"LUDICOLO":case 272:m.active_pokemon_id=272;break;case"SEEDOT":case 273:m.active_pokemon_id=273;break;case"NUZLEAF":case 274:m.active_pokemon_id=274;break;case"SHIFTRY":case 275:m.active_pokemon_id=275;break;case"TAILLOW":case 276:m.active_pokemon_id=276;break;case"SWELLOW":case 277:m.active_pokemon_id=277;break;case"WINGULL":case 278:m.active_pokemon_id=278;break;case"PELIPPER":case 279:m.active_pokemon_id=279;break;case"RALTS":case 280:m.active_pokemon_id=280;break;case"KIRLIA":case 281:m.active_pokemon_id=281;break;case"GARDEVOIR":case 282:m.active_pokemon_id=282;break;case"SURSKIT":case 283:m.active_pokemon_id=283;break;case"MASQUERAIN":case 284:m.active_pokemon_id=284;break;case"SHROOMISH":case 285:m.active_pokemon_id=285;break;case"BRELOOM":case 286:m.active_pokemon_id=286;break;case"SLAKOTH":case 287:m.active_pokemon_id=287;break;case"VIGOROTH":case 288:m.active_pokemon_id=288;break;case"SLAKING":case 289:m.active_pokemon_id=289;break;case"NINCADA":case 290:m.active_pokemon_id=290;break;case"NINJASK":case 291:m.active_pokemon_id=291;break;case"SHEDINJA":case 292:m.active_pokemon_id=292;break;case"WHISMUR":case 293:m.active_pokemon_id=293;break;case"LOUDRED":case 294:m.active_pokemon_id=294;break;case"EXPLOUD":case 295:m.active_pokemon_id=295;break;case"MAKUHITA":case 296:m.active_pokemon_id=296;break;case"HARIYAMA":case 297:m.active_pokemon_id=297;break;case"AZURILL":case 298:m.active_pokemon_id=298;break;case"NOSEPASS":case 299:m.active_pokemon_id=299;break;case"SKITTY":case 300:m.active_pokemon_id=300;break;case"DELCATTY":case 301:m.active_pokemon_id=301;break;case"SABLEYE":case 302:m.active_pokemon_id=302;break;case"MAWILE":case 303:m.active_pokemon_id=303;break;case"ARON":case 304:m.active_pokemon_id=304;break;case"LAIRON":case 305:m.active_pokemon_id=305;break;case"AGGRON":case 306:m.active_pokemon_id=306;break;case"MEDITITE":case 307:m.active_pokemon_id=307;break;case"MEDICHAM":case 308:m.active_pokemon_id=308;break;case"ELECTRIKE":case 309:m.active_pokemon_id=309;break;case"MANECTRIC":case 310:m.active_pokemon_id=310;break;case"PLUSLE":case 311:m.active_pokemon_id=311;break;case"MINUN":case 312:m.active_pokemon_id=312;break;case"VOLBEAT":case 313:m.active_pokemon_id=313;break;case"ILLUMISE":case 314:m.active_pokemon_id=314;break;case"ROSELIA":case 315:m.active_pokemon_id=315;break;case"GULPIN":case 316:m.active_pokemon_id=316;break;case"SWALOT":case 317:m.active_pokemon_id=317;break;case"CARVANHA":case 318:m.active_pokemon_id=318;break;case"SHARPEDO":case 319:m.active_pokemon_id=319;break;case"WAILMER":case 320:m.active_pokemon_id=320;break;case"WAILORD":case 321:m.active_pokemon_id=321;break;case"NUMEL":case 322:m.active_pokemon_id=322;break;case"CAMERUPT":case 323:m.active_pokemon_id=323;break;case"TORKOAL":case 324:m.active_pokemon_id=324;break;case"SPOINK":case 325:m.active_pokemon_id=325;break;case"GRUMPIG":case 326:m.active_pokemon_id=326;break;case"SPINDA":case 327:m.active_pokemon_id=327;break;case"TRAPINCH":case 328:m.active_pokemon_id=328;break;case"VIBRAVA":case 329:m.active_pokemon_id=329;break;case"FLYGON":case 330:m.active_pokemon_id=330;break;case"CACNEA":case 331:m.active_pokemon_id=331;break;case"CACTURNE":case 332:m.active_pokemon_id=332;break;case"SWABLU":case 333:m.active_pokemon_id=333;break;case"ALTARIA":case 334:m.active_pokemon_id=334;break;case"ZANGOOSE":case 335:m.active_pokemon_id=335;break;case"SEVIPER":case 336:m.active_pokemon_id=336;break;case"LUNATONE":case 337:m.active_pokemon_id=337;break;case"SOLROCK":case 338:m.active_pokemon_id=338;break;case"BARBOACH":case 339:m.active_pokemon_id=339;break;case"WHISCASH":case 340:m.active_pokemon_id=340;break;case"CORPHISH":case 341:m.active_pokemon_id=341;break;case"CRAWDAUNT":case 342:m.active_pokemon_id=342;break;case"BALTOY":case 343:m.active_pokemon_id=343;break;case"CLAYDOL":case 344:m.active_pokemon_id=344;break;case"LILEEP":case 345:m.active_pokemon_id=345;break;case"CRADILY":case 346:m.active_pokemon_id=346;break;case"ANORITH":case 347:m.active_pokemon_id=347;break;case"ARMALDO":case 348:m.active_pokemon_id=348;break;case"FEEBAS":case 349:m.active_pokemon_id=349;break;case"MILOTIC":case 350:m.active_pokemon_id=350;break;case"CASTFORM":case 351:m.active_pokemon_id=351;break;case"KECLEON":case 352:m.active_pokemon_id=352;break;case"SHUPPET":case 353:m.active_pokemon_id=353;break;case"BANETTE":case 354:m.active_pokemon_id=354;break;case"DUSKULL":case 355:m.active_pokemon_id=355;break;case"DUSCLOPS":case 356:m.active_pokemon_id=356;break;case"TROPIUS":case 357:m.active_pokemon_id=357;break;case"CHIMECHO":case 358:m.active_pokemon_id=358;break;case"ABSOL":case 359:m.active_pokemon_id=359;break;case"WYNAUT":case 360:m.active_pokemon_id=360;break;case"SNORUNT":case 361:m.active_pokemon_id=361;break;case"GLALIE":case 362:m.active_pokemon_id=362;break;case"SPHEAL":case 363:m.active_pokemon_id=363;break;case"SEALEO":case 364:m.active_pokemon_id=364;break;case"WALREIN":case 365:m.active_pokemon_id=365;break;case"CLAMPERL":case 366:m.active_pokemon_id=366;break;case"HUNTAIL":case 367:m.active_pokemon_id=367;break;case"GOREBYSS":case 368:m.active_pokemon_id=368;break;case"RELICANTH":case 369:m.active_pokemon_id=369;break;case"LUVDISC":case 370:m.active_pokemon_id=370;break;case"BAGON":case 371:m.active_pokemon_id=371;break;case"SHELGON":case 372:m.active_pokemon_id=372;break;case"SALAMENCE":case 373:m.active_pokemon_id=373;break;case"BELDUM":case 374:m.active_pokemon_id=374;break;case"METANG":case 375:m.active_pokemon_id=375;break;case"METAGROSS":case 376:m.active_pokemon_id=376;break;case"REGIROCK":case 377:m.active_pokemon_id=377;break;case"REGICE":case 378:m.active_pokemon_id=378;break;case"REGISTEEL":case 379:m.active_pokemon_id=379;break;case"LATIAS":case 380:m.active_pokemon_id=380;break;case"LATIOS":case 381:m.active_pokemon_id=381;break;case"KYOGRE":case 382:m.active_pokemon_id=382;break;case"GROUDON":case 383:m.active_pokemon_id=383;break;case"RAYQUAZA":case 384:m.active_pokemon_id=384;break;case"JIRACHI":case 385:m.active_pokemon_id=385;break;case"DEOXYS":case 386:m.active_pokemon_id=386;break;case"TURTWIG":case 387:m.active_pokemon_id=387;break;case"GROTLE":case 388:m.active_pokemon_id=388;break;case"TORTERRA":case 389:m.active_pokemon_id=389;break;case"CHIMCHAR":case 390:m.active_pokemon_id=390;break;case"MONFERNO":case 391:m.active_pokemon_id=391;break;case"INFERNAPE":case 392:m.active_pokemon_id=392;break;case"PIPLUP":case 393:m.active_pokemon_id=393;break;case"PRINPLUP":case 394:m.active_pokemon_id=394;break;case"EMPOLEON":case 395:m.active_pokemon_id=395;break;case"STARLY":case 396:m.active_pokemon_id=396;break;case"STARAVIA":case 397:m.active_pokemon_id=397;break;case"STARAPTOR":case 398:m.active_pokemon_id=398;break;case"BIDOOF":case 399:m.active_pokemon_id=399;break;case"BIBAREL":case 400:m.active_pokemon_id=400;break;case"KRICKETOT":case 401:m.active_pokemon_id=401;break;case"KRICKETUNE":case 402:m.active_pokemon_id=402;break;case"SHINX":case 403:m.active_pokemon_id=403;break;case"LUXIO":case 404:m.active_pokemon_id=404;break;case"LUXRAY":case 405:m.active_pokemon_id=405;break;case"BUDEW":case 406:m.active_pokemon_id=406;break;case"ROSERADE":case 407:m.active_pokemon_id=407;break;case"CRANIDOS":case 408:m.active_pokemon_id=408;break;case"RAMPARDOS":case 409:m.active_pokemon_id=409;break;case"SHIELDON":case 410:m.active_pokemon_id=410;break;case"BASTIODON":case 411:m.active_pokemon_id=411;break;case"BURMY":case 412:m.active_pokemon_id=412;break;case"WORMADAM":case 413:m.active_pokemon_id=413;break;case"MOTHIM":case 414:m.active_pokemon_id=414;break;case"COMBEE":case 415:m.active_pokemon_id=415;break;case"VESPIQUEN":case 416:m.active_pokemon_id=416;break;case"PACHIRISU":case 417:m.active_pokemon_id=417;break;case"BUIZEL":case 418:m.active_pokemon_id=418;break;case"FLOATZEL":case 419:m.active_pokemon_id=419;break;case"CHERUBI":case 420:m.active_pokemon_id=420;break;case"CHERRIM":case 421:m.active_pokemon_id=421;break;case"SHELLOS":case 422:m.active_pokemon_id=422;break;case"GASTRODON":case 423:m.active_pokemon_id=423;break;case"AMBIPOM":case 424:m.active_pokemon_id=424;break;case"DRIFLOON":case 425:m.active_pokemon_id=425;break;case"DRIFBLIM":case 426:m.active_pokemon_id=426;break;case"BUNEARY":case 427:m.active_pokemon_id=427;break;case"LOPUNNY":case 428:m.active_pokemon_id=428;break;case"MISMAGIUS":case 429:m.active_pokemon_id=429;break;case"HONCHKROW":case 430:m.active_pokemon_id=430;break;case"GLAMEOW":case 431:m.active_pokemon_id=431;break;case"PURUGLY":case 432:m.active_pokemon_id=432;break;case"CHINGLING":case 433:m.active_pokemon_id=433;break;case"STUNKY":case 434:m.active_pokemon_id=434;break;case"SKUNTANK":case 435:m.active_pokemon_id=435;break;case"BRONZOR":case 436:m.active_pokemon_id=436;break;case"BRONZONG":case 437:m.active_pokemon_id=437;break;case"BONSLY":case 438:m.active_pokemon_id=438;break;case"MIME_JR":case 439:m.active_pokemon_id=439;break;case"HAPPINY":case 440:m.active_pokemon_id=440;break;case"CHATOT":case 441:m.active_pokemon_id=441;break;case"SPIRITOMB":case 442:m.active_pokemon_id=442;break;case"GIBLE":case 443:m.active_pokemon_id=443;break;case"GABITE":case 444:m.active_pokemon_id=444;break;case"GARCHOMP":case 445:m.active_pokemon_id=445;break;case"MUNCHLAX":case 446:m.active_pokemon_id=446;break;case"RIOLU":case 447:m.active_pokemon_id=447;break;case"LUCARIO":case 448:m.active_pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.active_pokemon_id=449;break;case"HIPPOWDON":case 450:m.active_pokemon_id=450;break;case"SKORUPI":case 451:m.active_pokemon_id=451;break;case"DRAPION":case 452:m.active_pokemon_id=452;break;case"CROAGUNK":case 453:m.active_pokemon_id=453;break;case"TOXICROAK":case 454:m.active_pokemon_id=454;break;case"CARNIVINE":case 455:m.active_pokemon_id=455;break;case"FINNEON":case 456:m.active_pokemon_id=456;break;case"LUMINEON":case 457:m.active_pokemon_id=457;break;case"MANTYKE":case 458:m.active_pokemon_id=458;break;case"SNOVER":case 459:m.active_pokemon_id=459;break;case"ABOMASNOW":case 460:m.active_pokemon_id=460;break;case"WEAVILE":case 461:m.active_pokemon_id=461;break;case"MAGNEZONE":case 462:m.active_pokemon_id=462;break;case"LICKILICKY":case 463:m.active_pokemon_id=463;break;case"RHYPERIOR":case 464:m.active_pokemon_id=464;break;case"TANGROWTH":case 465:m.active_pokemon_id=465;break;case"ELECTIVIRE":case 466:m.active_pokemon_id=466;break;case"MAGMORTAR":case 467:m.active_pokemon_id=467;break;case"TOGEKISS":case 468:m.active_pokemon_id=468;break;case"YANMEGA":case 469:m.active_pokemon_id=469;break;case"LEAFEON":case 470:m.active_pokemon_id=470;break;case"GLACEON":case 471:m.active_pokemon_id=471;break;case"GLISCOR":case 472:m.active_pokemon_id=472;break;case"MAMOSWINE":case 473:m.active_pokemon_id=473;break;case"PORYGON_Z":case 474:m.active_pokemon_id=474;break;case"GALLADE":case 475:m.active_pokemon_id=475;break;case"PROBOPASS":case 476:m.active_pokemon_id=476;break;case"DUSKNOIR":case 477:m.active_pokemon_id=477;break;case"FROSLASS":case 478:m.active_pokemon_id=478;break;case"ROTOM":case 479:m.active_pokemon_id=479;break;case"UXIE":case 480:m.active_pokemon_id=480;break;case"MESPRIT":case 481:m.active_pokemon_id=481;break;case"AZELF":case 482:m.active_pokemon_id=482;break;case"DIALGA":case 483:m.active_pokemon_id=483;break;case"PALKIA":case 484:m.active_pokemon_id=484;break;case"HEATRAN":case 485:m.active_pokemon_id=485;break;case"REGIGIGAS":case 486:m.active_pokemon_id=486;break;case"GIRATINA":case 487:m.active_pokemon_id=487;break;case"CRESSELIA":case 488:m.active_pokemon_id=488;break;case"PHIONE":case 489:m.active_pokemon_id=489;break;case"MANAPHY":case 490:m.active_pokemon_id=490;break;case"DARKRAI":case 491:m.active_pokemon_id=491;break;case"SHAYMIN":case 492:m.active_pokemon_id=492;break;case"ARCEUS":case 493:m.active_pokemon_id=493;break;case"MELTAN":case 808:m.active_pokemon_id=808;break;case"MELMETAL":case 809:m.active_pokemon_id=809;break}if(d.lure_expires_timestamp_ms!=null){if($util.Long)(m.lure_expires_timestamp_ms=$util.Long.fromValue(d.lure_expires_timestamp_ms)).unsigned=false;else if(typeof d.lure_expires_timestamp_ms==="string")m.lure_expires_timestamp_ms=parseInt(d.lure_expires_timestamp_ms,10);else if(typeof d.lure_expires_timestamp_ms==="number")m.lure_expires_timestamp_ms=d.lure_expires_timestamp_ms;else if(typeof d.lure_expires_timestamp_ms==="object")m.lure_expires_timestamp_ms=new $util.LongBits(d.lure_expires_timestamp_ms.low>>>0,d.lure_expires_timestamp_ms.high>>>0).toNumber()}return m};FortLureInfo.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.fort_id="";if($util.Long){var n=new $util.Long(0,0,false);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0;d.active_pokemon_id=o.enums===String?"MISSINGNO":0;if($util.Long){var n=new $util.Long(0,0,false);d.lure_expires_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.lure_expires_timestamp_ms=o.longs===String?"0":0}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber():m.encounter_id}if(m.active_pokemon_id!=null&&m.hasOwnProperty("active_pokemon_id")){d.active_pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.active_pokemon_id]:m.active_pokemon_id}if(m.lure_expires_timestamp_ms!=null&&m.hasOwnProperty("lure_expires_timestamp_ms")){if(typeof m.lure_expires_timestamp_ms==="number")d.lure_expires_timestamp_ms=o.longs===String?String(m.lure_expires_timestamp_ms):m.lure_expires_timestamp_ms;else d.lure_expires_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.lure_expires_timestamp_ms):o.longs===Number?new $util.LongBits(m.lure_expires_timestamp_ms.low>>>0,m.lure_expires_timestamp_ms.high>>>0).toNumber():m.lure_expires_timestamp_ms}return d};FortLureInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FortLureInfo}();Fort.FortModifier=function(){function FortModifier(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FortModifier.prototype.item_id=0;FortModifier.prototype.expiration_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;FortModifier.prototype.deployer_player_codename="";FortModifier.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(8).int32(m.item_id);if(m.expiration_timestamp_ms!=null&&m.hasOwnProperty("expiration_timestamp_ms"))w.uint32(16).int64(m.expiration_timestamp_ms);if(m.deployer_player_codename!=null&&m.hasOwnProperty("deployer_player_codename"))w.uint32(26).string(m.deployer_player_codename);return w};FortModifier.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.Fort.FortModifier;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.int32();break;case 2:m.expiration_timestamp_ms=r.int64();break;case 3:m.deployer_player_codename=r.string();break;default:r.skipType(t&7);break}}return m};FortModifier.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.Fort.FortModifier)return d;var m=new $root.POGOProtos.Map.Fort.FortModifier;switch(d.item_id){case"ITEM_UNKNOWN":case 0:m.item_id=0;break;case"ITEM_POKE_BALL":case 1:m.item_id=1;break;case"ITEM_GREAT_BALL":case 2:m.item_id=2;break;case"ITEM_ULTRA_BALL":case 3:m.item_id=3;break;case"ITEM_MASTER_BALL":case 4:m.item_id=4;break;case"ITEM_PREMIER_BALL":case 5:m.item_id=5;break;case"ITEM_POTION":case 101:m.item_id=101;break;case"ITEM_SUPER_POTION":case 102:m.item_id=102;break;case"ITEM_HYPER_POTION":case 103:m.item_id=103;break;case"ITEM_MAX_POTION":case 104:m.item_id=104;break;case"ITEM_REVIVE":case 201:m.item_id=201;break;case"ITEM_MAX_REVIVE":case 202:m.item_id=202;break;case"ITEM_LUCKY_EGG":case 301:m.item_id=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item_id=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item_id=402;break;case"ITEM_INCENSE_COOL":case 403:m.item_id=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item_id=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item_id=405;break;case"ITEM_TROY_DISK":case 501:m.item_id=501;break;case"ITEM_X_ATTACK":case 602:m.item_id=602;break;case"ITEM_X_DEFENSE":case 603:m.item_id=603;break;case"ITEM_X_MIRACLE":case 604:m.item_id=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item_id=701;break;case"ITEM_BLUK_BERRY":case 702:m.item_id=702;break;case"ITEM_NANAB_BERRY":case 703:m.item_id=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item_id=704;break;case"ITEM_PINAP_BERRY":case 705:m.item_id=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item_id=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item_id=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item_id=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item_id=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item_id=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item_id=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item_id=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item_id=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item_id=1002;break;case"ITEM_SUN_STONE":case 1101:m.item_id=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item_id=1102;break;case"ITEM_METAL_COAT":case 1103:m.item_id=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item_id=1104;break;case"ITEM_UP_GRADE":case 1105:m.item_id=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item_id=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item_id=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item_id=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item_id=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item_id=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item_id=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item_id=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item_id=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item_id=1405;break}if(d.expiration_timestamp_ms!=null){if($util.Long)(m.expiration_timestamp_ms=$util.Long.fromValue(d.expiration_timestamp_ms)).unsigned=false;else if(typeof d.expiration_timestamp_ms==="string")m.expiration_timestamp_ms=parseInt(d.expiration_timestamp_ms,10);else if(typeof d.expiration_timestamp_ms==="number")m.expiration_timestamp_ms=d.expiration_timestamp_ms;else if(typeof d.expiration_timestamp_ms==="object")m.expiration_timestamp_ms=new $util.LongBits(d.expiration_timestamp_ms.low>>>0,d.expiration_timestamp_ms.high>>>0).toNumber()}if(d.deployer_player_codename!=null){m.deployer_player_codename=String(d.deployer_player_codename)}return m};FortModifier.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id=o.enums===String?"ITEM_UNKNOWN":0;if($util.Long){var n=new $util.Long(0,0,false);d.expiration_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.expiration_timestamp_ms=o.longs===String?"0":0;d.deployer_player_codename=""}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item_id]:m.item_id}if(m.expiration_timestamp_ms!=null&&m.hasOwnProperty("expiration_timestamp_ms")){if(typeof m.expiration_timestamp_ms==="number")d.expiration_timestamp_ms=o.longs===String?String(m.expiration_timestamp_ms):m.expiration_timestamp_ms;else d.expiration_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.expiration_timestamp_ms):o.longs===Number?new $util.LongBits(m.expiration_timestamp_ms.low>>>0,m.expiration_timestamp_ms.high>>>0).toNumber():m.expiration_timestamp_ms}if(m.deployer_player_codename!=null&&m.hasOwnProperty("deployer_player_codename")){d.deployer_player_codename=m.deployer_player_codename}return d};FortModifier.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FortModifier}();Fort.FortRenderingType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="DEFAULT"]=0;values[valuesById[1]="INTERNAL_TEST"]=1;return values}();Fort.FortSponsor=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_SPONSOR"]=0;values[valuesById[1]="MCDONALDS"]=1;values[valuesById[2]="POKEMON_STORE"]=2;values[valuesById[3]="TOHO"]=3;values[valuesById[4]="SOFTBANK"]=4;values[valuesById[5]="GLOBE"]=5;values[valuesById[6]="SPATULA"]=6;values[valuesById[7]="THERMOMETER"]=7;values[valuesById[8]="KNIFE"]=8;values[valuesById[9]="GRILL"]=9;values[valuesById[10]="SMOKER"]=10;values[valuesById[11]="PAN"]=11;values[valuesById[12]="BBQ"]=12;values[valuesById[13]="FRYER"]=13;values[valuesById[14]="STEAMER"]=14;values[valuesById[15]="HOOD"]=15;values[valuesById[16]="SLOWCOOKER"]=16;values[valuesById[17]="MIXER"]=17;values[valuesById[18]="SCOOPER"]=18;values[valuesById[19]="MUFFINTIN"]=19;values[valuesById[20]="SALAMANDER"]=20;values[valuesById[21]="PLANCHA"]=21;values[valuesById[22]="NIA_OPS"]=22;values[valuesById[23]="WHISK"]=23;return values}();Fort.FortSummary=function(){function FortSummary(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FortSummary.prototype.fort_summary_id="";FortSummary.prototype.last_modified_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;FortSummary.prototype.latitude=0;FortSummary.prototype.longitude=0;FortSummary.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fort_summary_id!=null&&m.hasOwnProperty("fort_summary_id"))w.uint32(10).string(m.fort_summary_id);if(m.last_modified_timestamp_ms!=null&&m.hasOwnProperty("last_modified_timestamp_ms"))w.uint32(16).int64(m.last_modified_timestamp_ms);if(m.latitude!=null&&m.hasOwnProperty("latitude"))w.uint32(25).double(m.latitude);if(m.longitude!=null&&m.hasOwnProperty("longitude"))w.uint32(33).double(m.longitude);return w};FortSummary.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.Fort.FortSummary;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fort_summary_id=r.string();break;case 2:m.last_modified_timestamp_ms=r.int64();break;case 3:m.latitude=r.double();break;case 4:m.longitude=r.double();break;default:r.skipType(t&7);break}}return m};FortSummary.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.Fort.FortSummary)return d;var m=new $root.POGOProtos.Map.Fort.FortSummary;if(d.fort_summary_id!=null){m.fort_summary_id=String(d.fort_summary_id)}if(d.last_modified_timestamp_ms!=null){if($util.Long)(m.last_modified_timestamp_ms=$util.Long.fromValue(d.last_modified_timestamp_ms)).unsigned=false;else if(typeof d.last_modified_timestamp_ms==="string")m.last_modified_timestamp_ms=parseInt(d.last_modified_timestamp_ms,10);else if(typeof d.last_modified_timestamp_ms==="number")m.last_modified_timestamp_ms=d.last_modified_timestamp_ms;else if(typeof d.last_modified_timestamp_ms==="object")m.last_modified_timestamp_ms=new $util.LongBits(d.last_modified_timestamp_ms.low>>>0,d.last_modified_timestamp_ms.high>>>0).toNumber()}if(d.latitude!=null){m.latitude=Number(d.latitude)}if(d.longitude!=null){m.longitude=Number(d.longitude)}return m};FortSummary.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.fort_summary_id="";if($util.Long){var n=new $util.Long(0,0,false);d.last_modified_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.last_modified_timestamp_ms=o.longs===String?"0":0;d.latitude=0;d.longitude=0}if(m.fort_summary_id!=null&&m.hasOwnProperty("fort_summary_id")){d.fort_summary_id=m.fort_summary_id}if(m.last_modified_timestamp_ms!=null&&m.hasOwnProperty("last_modified_timestamp_ms")){if(typeof m.last_modified_timestamp_ms==="number")d.last_modified_timestamp_ms=o.longs===String?String(m.last_modified_timestamp_ms):m.last_modified_timestamp_ms;else d.last_modified_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.last_modified_timestamp_ms):o.longs===Number?new $util.LongBits(m.last_modified_timestamp_ms.low>>>0,m.last_modified_timestamp_ms.high>>>0).toNumber():m.last_modified_timestamp_ms}if(m.latitude!=null&&m.hasOwnProperty("latitude")){d.latitude=o.json&&!isFinite(m.latitude)?String(m.latitude):m.latitude}if(m.longitude!=null&&m.hasOwnProperty("longitude")){d.longitude=o.json&&!isFinite(m.longitude)?String(m.longitude):m.longitude}return d};FortSummary.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FortSummary}();Fort.FortType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="GYM"]=0;values[valuesById[1]="CHECKPOINT"]=1;return values}();Fort.GymDisplay=function(){function GymDisplay(p){this.gym_event=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymDisplay.prototype.gym_event=$util.emptyArray;GymDisplay.prototype.total_gym_cp=0;GymDisplay.prototype.lowest_pokemon_motivation=0;GymDisplay.prototype.slots_available=0;GymDisplay.prototype.occupied_millis=$util.Long?$util.Long.fromBits(0,0,false):0;GymDisplay.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_event!=null&&m.gym_event.length){for(var i=0;i<m.gym_event.length;++i)$root.POGOProtos.Map.Fort.GymEvent.encode(m.gym_event[i],w.uint32(10).fork()).ldelim()}if(m.total_gym_cp!=null&&m.hasOwnProperty("total_gym_cp"))w.uint32(16).int32(m.total_gym_cp);if(m.lowest_pokemon_motivation!=null&&m.hasOwnProperty("lowest_pokemon_motivation"))w.uint32(25).double(m.lowest_pokemon_motivation);if(m.slots_available!=null&&m.hasOwnProperty("slots_available"))w.uint32(32).int32(m.slots_available);if(m.occupied_millis!=null&&m.hasOwnProperty("occupied_millis"))w.uint32(40).int64(m.occupied_millis);return w};GymDisplay.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.Fort.GymDisplay;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.gym_event&&m.gym_event.length))m.gym_event=[];m.gym_event.push($root.POGOProtos.Map.Fort.GymEvent.decode(r,r.uint32()));break;case 2:m.total_gym_cp=r.int32();break;case 3:m.lowest_pokemon_motivation=r.double();break;case 4:m.slots_available=r.int32();break;case 5:m.occupied_millis=r.int64();break;default:r.skipType(t&7);break}}return m};GymDisplay.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.Fort.GymDisplay)return d;var m=new $root.POGOProtos.Map.Fort.GymDisplay;if(d.gym_event){if(!Array.isArray(d.gym_event))throw TypeError(".POGOProtos.Map.Fort.GymDisplay.gym_event: array expected");m.gym_event=[];for(var i=0;i<d.gym_event.length;++i){if(typeof d.gym_event[i]!=="object")throw TypeError(".POGOProtos.Map.Fort.GymDisplay.gym_event: object expected");m.gym_event[i]=$root.POGOProtos.Map.Fort.GymEvent.fromObject(d.gym_event[i])}}if(d.total_gym_cp!=null){m.total_gym_cp=d.total_gym_cp|0}if(d.lowest_pokemon_motivation!=null){m.lowest_pokemon_motivation=Number(d.lowest_pokemon_motivation)}if(d.slots_available!=null){m.slots_available=d.slots_available|0}if(d.occupied_millis!=null){if($util.Long)(m.occupied_millis=$util.Long.fromValue(d.occupied_millis)).unsigned=false;else if(typeof d.occupied_millis==="string")m.occupied_millis=parseInt(d.occupied_millis,10);else if(typeof d.occupied_millis==="number")m.occupied_millis=d.occupied_millis;else if(typeof d.occupied_millis==="object")m.occupied_millis=new $util.LongBits(d.occupied_millis.low>>>0,d.occupied_millis.high>>>0).toNumber()}return m};GymDisplay.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.gym_event=[]}if(o.defaults){d.total_gym_cp=0;d.lowest_pokemon_motivation=0;d.slots_available=0;if($util.Long){var n=new $util.Long(0,0,false);d.occupied_millis=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.occupied_millis=o.longs===String?"0":0}if(m.gym_event&&m.gym_event.length){d.gym_event=[];for(var j=0;j<m.gym_event.length;++j){d.gym_event[j]=$root.POGOProtos.Map.Fort.GymEvent.toObject(m.gym_event[j],o)}}if(m.total_gym_cp!=null&&m.hasOwnProperty("total_gym_cp")){d.total_gym_cp=m.total_gym_cp}if(m.lowest_pokemon_motivation!=null&&m.hasOwnProperty("lowest_pokemon_motivation")){d.lowest_pokemon_motivation=o.json&&!isFinite(m.lowest_pokemon_motivation)?String(m.lowest_pokemon_motivation):m.lowest_pokemon_motivation}if(m.slots_available!=null&&m.hasOwnProperty("slots_available")){d.slots_available=m.slots_available}if(m.occupied_millis!=null&&m.hasOwnProperty("occupied_millis")){if(typeof m.occupied_millis==="number")d.occupied_millis=o.longs===String?String(m.occupied_millis):m.occupied_millis;else d.occupied_millis=o.longs===String?$util.Long.prototype.toString.call(m.occupied_millis):o.longs===Number?new $util.LongBits(m.occupied_millis.low>>>0,m.occupied_millis.high>>>0).toNumber():m.occupied_millis}return d};GymDisplay.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GymDisplay}();Fort.GymEvent=function(){function GymEvent(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymEvent.prototype.trainer="";GymEvent.prototype.timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;GymEvent.prototype.event=0;GymEvent.prototype.pokedex_id=0;GymEvent.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;GymEvent.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.trainer!=null&&m.hasOwnProperty("trainer"))w.uint32(10).string(m.trainer);if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms"))w.uint32(16).int64(m.timestamp_ms);if(m.event!=null&&m.hasOwnProperty("event"))w.uint32(24).int32(m.event);if(m.pokedex_id!=null&&m.hasOwnProperty("pokedex_id"))w.uint32(32).int32(m.pokedex_id);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(41).fixed64(m.pokemon_id);return w};GymEvent.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.Fort.GymEvent;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.trainer=r.string();break;case 2:m.timestamp_ms=r.int64();break;case 3:m.event=r.int32();break;case 4:m.pokedex_id=r.int32();break;case 5:m.pokemon_id=r.fixed64();break;default:r.skipType(t&7);break}}return m};GymEvent.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.Fort.GymEvent)return d;var m=new $root.POGOProtos.Map.Fort.GymEvent;if(d.trainer!=null){m.trainer=String(d.trainer)}if(d.timestamp_ms!=null){if($util.Long)(m.timestamp_ms=$util.Long.fromValue(d.timestamp_ms)).unsigned=false;else if(typeof d.timestamp_ms==="string")m.timestamp_ms=parseInt(d.timestamp_ms,10);else if(typeof d.timestamp_ms==="number")m.timestamp_ms=d.timestamp_ms;else if(typeof d.timestamp_ms==="object")m.timestamp_ms=new $util.LongBits(d.timestamp_ms.low>>>0,d.timestamp_ms.high>>>0).toNumber()}switch(d.event){case"UNKNOWN":case 0:m.event=0;break;case"POKEMON_FED":case 1:m.event=1;break;case"POKEMON_DEPLOYED":case 2:m.event=2;break;case"POKEMON_RETURNED":case 3:m.event=3;break;case"BATTLE_WON":case 4:m.event=4;break;case"BATTLE_LOSS":case 5:m.event=5;break;case"RAID_STARTED":case 6:m.event=6;break;case"RAID_ENDED":case 7:m.event=7;break;case"GYM_NEUTRALIZED":case 8:m.event=8;break}if(d.pokedex_id!=null){m.pokedex_id=d.pokedex_id|0}if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}return m};GymEvent.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.trainer="";if($util.Long){var n=new $util.Long(0,0,false);d.timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.timestamp_ms=o.longs===String?"0":0;d.event=o.enums===String?"UNKNOWN":0;d.pokedex_id=0;if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0}if(m.trainer!=null&&m.hasOwnProperty("trainer")){d.trainer=m.trainer}if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms")){if(typeof m.timestamp_ms==="number")d.timestamp_ms=o.longs===String?String(m.timestamp_ms):m.timestamp_ms;else d.timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.timestamp_ms):o.longs===Number?new $util.LongBits(m.timestamp_ms.low>>>0,m.timestamp_ms.high>>>0).toNumber():m.timestamp_ms}if(m.event!=null&&m.hasOwnProperty("event")){d.event=o.enums===String?$root.POGOProtos.Map.Fort.GymEvent.Event[m.event]:m.event}if(m.pokedex_id!=null&&m.hasOwnProperty("pokedex_id")){d.pokedex_id=m.pokedex_id}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}return d};GymEvent.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GymEvent.Event=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNKNOWN"]=0;values[valuesById[1]="POKEMON_FED"]=1;values[valuesById[2]="POKEMON_DEPLOYED"]=2;values[valuesById[3]="POKEMON_RETURNED"]=3;values[valuesById[4]="BATTLE_WON"]=4;values[valuesById[5]="BATTLE_LOSS"]=5;values[valuesById[6]="RAID_STARTED"]=6;values[valuesById[7]="RAID_ENDED"]=7;values[valuesById[8]="GYM_NEUTRALIZED"]=8;return values}();return GymEvent}();return Fort}();Map.MapCell=function(){function MapCell(p){this.forts=[];this.spawn_points=[];this.deleted_objects=[];this.fort_summaries=[];this.decimated_spawn_points=[];this.wild_pokemons=[];this.catchable_pokemons=[];this.nearby_pokemons=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}MapCell.prototype.s2_cell_id=$util.Long?$util.Long.fromBits(0,0,true):0;MapCell.prototype.current_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;MapCell.prototype.forts=$util.emptyArray;MapCell.prototype.spawn_points=$util.emptyArray;MapCell.prototype.deleted_objects=$util.emptyArray;MapCell.prototype.is_truncated_list=false;MapCell.prototype.fort_summaries=$util.emptyArray;MapCell.prototype.decimated_spawn_points=$util.emptyArray;MapCell.prototype.wild_pokemons=$util.emptyArray;MapCell.prototype.catchable_pokemons=$util.emptyArray;MapCell.prototype.nearby_pokemons=$util.emptyArray;MapCell.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.s2_cell_id!=null&&m.hasOwnProperty("s2_cell_id"))w.uint32(8).uint64(m.s2_cell_id);if(m.current_timestamp_ms!=null&&m.hasOwnProperty("current_timestamp_ms"))w.uint32(16).int64(m.current_timestamp_ms);if(m.forts!=null&&m.forts.length){for(var i=0;i<m.forts.length;++i)$root.POGOProtos.Map.Fort.FortData.encode(m.forts[i],w.uint32(26).fork()).ldelim()}if(m.spawn_points!=null&&m.spawn_points.length){for(var i=0;i<m.spawn_points.length;++i)$root.POGOProtos.Map.SpawnPoint.encode(m.spawn_points[i],w.uint32(34).fork()).ldelim()}if(m.wild_pokemons!=null&&m.wild_pokemons.length){for(var i=0;i<m.wild_pokemons.length;++i)$root.POGOProtos.Map.Pokemon.WildPokemon.encode(m.wild_pokemons[i],w.uint32(42).fork()).ldelim()}if(m.deleted_objects!=null&&m.deleted_objects.length){for(var i=0;i<m.deleted_objects.length;++i)w.uint32(50).string(m.deleted_objects[i])}if(m.is_truncated_list!=null&&m.hasOwnProperty("is_truncated_list"))w.uint32(56).bool(m.is_truncated_list);if(m.fort_summaries!=null&&m.fort_summaries.length){for(var i=0;i<m.fort_summaries.length;++i)$root.POGOProtos.Map.Fort.FortSummary.encode(m.fort_summaries[i],w.uint32(66).fork()).ldelim()}if(m.decimated_spawn_points!=null&&m.decimated_spawn_points.length){for(var i=0;i<m.decimated_spawn_points.length;++i)$root.POGOProtos.Map.SpawnPoint.encode(m.decimated_spawn_points[i],w.uint32(74).fork()).ldelim()}if(m.catchable_pokemons!=null&&m.catchable_pokemons.length){for(var i=0;i<m.catchable_pokemons.length;++i)$root.POGOProtos.Map.Pokemon.MapPokemon.encode(m.catchable_pokemons[i],w.uint32(82).fork()).ldelim()}if(m.nearby_pokemons!=null&&m.nearby_pokemons.length){for(var i=0;i<m.nearby_pokemons.length;++i)$root.POGOProtos.Map.Pokemon.NearbyPokemon.encode(m.nearby_pokemons[i],w.uint32(90).fork()).ldelim()}return w};MapCell.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.MapCell;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.s2_cell_id=r.uint64();break;case 2:m.current_timestamp_ms=r.int64();break;case 3:if(!(m.forts&&m.forts.length))m.forts=[];m.forts.push($root.POGOProtos.Map.Fort.FortData.decode(r,r.uint32()));break;case 4:if(!(m.spawn_points&&m.spawn_points.length))m.spawn_points=[];m.spawn_points.push($root.POGOProtos.Map.SpawnPoint.decode(r,r.uint32()));break;case 6:if(!(m.deleted_objects&&m.deleted_objects.length))m.deleted_objects=[];m.deleted_objects.push(r.string());break;case 7:m.is_truncated_list=r.bool();break;case 8:if(!(m.fort_summaries&&m.fort_summaries.length))m.fort_summaries=[];m.fort_summaries.push($root.POGOProtos.Map.Fort.FortSummary.decode(r,r.uint32()));break;case 9:if(!(m.decimated_spawn_points&&m.decimated_spawn_points.length))m.decimated_spawn_points=[];m.decimated_spawn_points.push($root.POGOProtos.Map.SpawnPoint.decode(r,r.uint32()));break;case 5:if(!(m.wild_pokemons&&m.wild_pokemons.length))m.wild_pokemons=[];m.wild_pokemons.push($root.POGOProtos.Map.Pokemon.WildPokemon.decode(r,r.uint32()));break;case 10:if(!(m.catchable_pokemons&&m.catchable_pokemons.length))m.catchable_pokemons=[];m.catchable_pokemons.push($root.POGOProtos.Map.Pokemon.MapPokemon.decode(r,r.uint32()));break;case 11:if(!(m.nearby_pokemons&&m.nearby_pokemons.length))m.nearby_pokemons=[];m.nearby_pokemons.push($root.POGOProtos.Map.Pokemon.NearbyPokemon.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};MapCell.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.MapCell)return d;var m=new $root.POGOProtos.Map.MapCell;if(d.s2_cell_id!=null){if($util.Long)(m.s2_cell_id=$util.Long.fromValue(d.s2_cell_id)).unsigned=true;else if(typeof d.s2_cell_id==="string")m.s2_cell_id=parseInt(d.s2_cell_id,10);else if(typeof d.s2_cell_id==="number")m.s2_cell_id=d.s2_cell_id;else if(typeof d.s2_cell_id==="object")m.s2_cell_id=new $util.LongBits(d.s2_cell_id.low>>>0,d.s2_cell_id.high>>>0).toNumber(true)}if(d.current_timestamp_ms!=null){if($util.Long)(m.current_timestamp_ms=$util.Long.fromValue(d.current_timestamp_ms)).unsigned=false;else if(typeof d.current_timestamp_ms==="string")m.current_timestamp_ms=parseInt(d.current_timestamp_ms,10);else if(typeof d.current_timestamp_ms==="number")m.current_timestamp_ms=d.current_timestamp_ms;else if(typeof d.current_timestamp_ms==="object")m.current_timestamp_ms=new $util.LongBits(d.current_timestamp_ms.low>>>0,d.current_timestamp_ms.high>>>0).toNumber()}if(d.forts){if(!Array.isArray(d.forts))throw TypeError(".POGOProtos.Map.MapCell.forts: array expected");m.forts=[];for(var i=0;i<d.forts.length;++i){if(typeof d.forts[i]!=="object")throw TypeError(".POGOProtos.Map.MapCell.forts: object expected");m.forts[i]=$root.POGOProtos.Map.Fort.FortData.fromObject(d.forts[i])}}if(d.spawn_points){if(!Array.isArray(d.spawn_points))throw TypeError(".POGOProtos.Map.MapCell.spawn_points: array expected");m.spawn_points=[];for(var i=0;i<d.spawn_points.length;++i){if(typeof d.spawn_points[i]!=="object")throw TypeError(".POGOProtos.Map.MapCell.spawn_points: object expected");m.spawn_points[i]=$root.POGOProtos.Map.SpawnPoint.fromObject(d.spawn_points[i])}}if(d.deleted_objects){if(!Array.isArray(d.deleted_objects))throw TypeError(".POGOProtos.Map.MapCell.deleted_objects: array expected");m.deleted_objects=[];for(var i=0;i<d.deleted_objects.length;++i){m.deleted_objects[i]=String(d.deleted_objects[i])}}if(d.is_truncated_list!=null){m.is_truncated_list=Boolean(d.is_truncated_list)}if(d.fort_summaries){if(!Array.isArray(d.fort_summaries))throw TypeError(".POGOProtos.Map.MapCell.fort_summaries: array expected");m.fort_summaries=[];for(var i=0;i<d.fort_summaries.length;++i){if(typeof d.fort_summaries[i]!=="object")throw TypeError(".POGOProtos.Map.MapCell.fort_summaries: object expected");m.fort_summaries[i]=$root.POGOProtos.Map.Fort.FortSummary.fromObject(d.fort_summaries[i])}}if(d.decimated_spawn_points){if(!Array.isArray(d.decimated_spawn_points))throw TypeError(".POGOProtos.Map.MapCell.decimated_spawn_points: array expected");m.decimated_spawn_points=[];for(var i=0;i<d.decimated_spawn_points.length;++i){if(typeof d.decimated_spawn_points[i]!=="object")throw TypeError(".POGOProtos.Map.MapCell.decimated_spawn_points: object expected");m.decimated_spawn_points[i]=$root.POGOProtos.Map.SpawnPoint.fromObject(d.decimated_spawn_points[i])}}if(d.wild_pokemons){if(!Array.isArray(d.wild_pokemons))throw TypeError(".POGOProtos.Map.MapCell.wild_pokemons: array expected");m.wild_pokemons=[];for(var i=0;i<d.wild_pokemons.length;++i){if(typeof d.wild_pokemons[i]!=="object")throw TypeError(".POGOProtos.Map.MapCell.wild_pokemons: object expected");m.wild_pokemons[i]=$root.POGOProtos.Map.Pokemon.WildPokemon.fromObject(d.wild_pokemons[i])}}if(d.catchable_pokemons){if(!Array.isArray(d.catchable_pokemons))throw TypeError(".POGOProtos.Map.MapCell.catchable_pokemons: array expected");m.catchable_pokemons=[];for(var i=0;i<d.catchable_pokemons.length;++i){if(typeof d.catchable_pokemons[i]!=="object")throw TypeError(".POGOProtos.Map.MapCell.catchable_pokemons: object expected");m.catchable_pokemons[i]=$root.POGOProtos.Map.Pokemon.MapPokemon.fromObject(d.catchable_pokemons[i])}}if(d.nearby_pokemons){if(!Array.isArray(d.nearby_pokemons))throw TypeError(".POGOProtos.Map.MapCell.nearby_pokemons: array expected");m.nearby_pokemons=[];for(var i=0;i<d.nearby_pokemons.length;++i){if(typeof d.nearby_pokemons[i]!=="object")throw TypeError(".POGOProtos.Map.MapCell.nearby_pokemons: object expected");m.nearby_pokemons[i]=$root.POGOProtos.Map.Pokemon.NearbyPokemon.fromObject(d.nearby_pokemons[i])}}return m};MapCell.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.forts=[];d.spawn_points=[];d.wild_pokemons=[];d.deleted_objects=[];d.fort_summaries=[];d.decimated_spawn_points=[];d.catchable_pokemons=[];d.nearby_pokemons=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,true);d.s2_cell_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.s2_cell_id=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.current_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.current_timestamp_ms=o.longs===String?"0":0;d.is_truncated_list=false}if(m.s2_cell_id!=null&&m.hasOwnProperty("s2_cell_id")){if(typeof m.s2_cell_id==="number")d.s2_cell_id=o.longs===String?String(m.s2_cell_id):m.s2_cell_id;else d.s2_cell_id=o.longs===String?$util.Long.prototype.toString.call(m.s2_cell_id):o.longs===Number?new $util.LongBits(m.s2_cell_id.low>>>0,m.s2_cell_id.high>>>0).toNumber(true):m.s2_cell_id}if(m.current_timestamp_ms!=null&&m.hasOwnProperty("current_timestamp_ms")){if(typeof m.current_timestamp_ms==="number")d.current_timestamp_ms=o.longs===String?String(m.current_timestamp_ms):m.current_timestamp_ms;else d.current_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.current_timestamp_ms):o.longs===Number?new $util.LongBits(m.current_timestamp_ms.low>>>0,m.current_timestamp_ms.high>>>0).toNumber():m.current_timestamp_ms}if(m.forts&&m.forts.length){d.forts=[];for(var j=0;j<m.forts.length;++j){d.forts[j]=$root.POGOProtos.Map.Fort.FortData.toObject(m.forts[j],o)}}if(m.spawn_points&&m.spawn_points.length){d.spawn_points=[];for(var j=0;j<m.spawn_points.length;++j){d.spawn_points[j]=$root.POGOProtos.Map.SpawnPoint.toObject(m.spawn_points[j],o)}}if(m.wild_pokemons&&m.wild_pokemons.length){d.wild_pokemons=[];for(var j=0;j<m.wild_pokemons.length;++j){d.wild_pokemons[j]=$root.POGOProtos.Map.Pokemon.WildPokemon.toObject(m.wild_pokemons[j],o)}}if(m.deleted_objects&&m.deleted_objects.length){d.deleted_objects=[];for(var j=0;j<m.deleted_objects.length;++j){d.deleted_objects[j]=m.deleted_objects[j]}}if(m.is_truncated_list!=null&&m.hasOwnProperty("is_truncated_list")){d.is_truncated_list=m.is_truncated_list}if(m.fort_summaries&&m.fort_summaries.length){d.fort_summaries=[];for(var j=0;j<m.fort_summaries.length;++j){d.fort_summaries[j]=$root.POGOProtos.Map.Fort.FortSummary.toObject(m.fort_summaries[j],o)}}if(m.decimated_spawn_points&&m.decimated_spawn_points.length){d.decimated_spawn_points=[];for(var j=0;j<m.decimated_spawn_points.length;++j){d.decimated_spawn_points[j]=$root.POGOProtos.Map.SpawnPoint.toObject(m.decimated_spawn_points[j],o)}}if(m.catchable_pokemons&&m.catchable_pokemons.length){d.catchable_pokemons=[];for(var j=0;j<m.catchable_pokemons.length;++j){d.catchable_pokemons[j]=$root.POGOProtos.Map.Pokemon.MapPokemon.toObject(m.catchable_pokemons[j],o)}}if(m.nearby_pokemons&&m.nearby_pokemons.length){d.nearby_pokemons=[];for(var j=0;j<m.nearby_pokemons.length;++j){d.nearby_pokemons[j]=$root.POGOProtos.Map.Pokemon.NearbyPokemon.toObject(m.nearby_pokemons[j],o)}}return d};MapCell.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return MapCell}();Map.MapObjectsStatus=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET_STATUS"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="LOCATION_UNSET"]=2;return values}();Map.Pokemon=function(){var Pokemon={};Pokemon.LobbyPokemon=function(){function LobbyPokemon(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LobbyPokemon.prototype.id=$util.Long?$util.Long.fromBits(0,0,false):0;LobbyPokemon.prototype.pokedex_id=0;LobbyPokemon.prototype.cp=0;LobbyPokemon.prototype.percent_health=0;LobbyPokemon.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.id!=null&&m.hasOwnProperty("id"))w.uint32(8).int64(m.id);if(m.pokedex_id!=null&&m.hasOwnProperty("pokedex_id"))w.uint32(16).int32(m.pokedex_id);if(m.cp!=null&&m.hasOwnProperty("cp"))w.uint32(24).int32(m.cp);if(m.percent_health!=null&&m.hasOwnProperty("percent_health"))w.uint32(37).float(m.percent_health);return w};LobbyPokemon.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.Pokemon.LobbyPokemon;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.id=r.int64();break;case 2:m.pokedex_id=r.int32();break;case 3:m.cp=r.int32();break;case 4:m.percent_health=r.float();break;default:r.skipType(t&7);break}}return m};LobbyPokemon.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.Pokemon.LobbyPokemon)return d;var m=new $root.POGOProtos.Map.Pokemon.LobbyPokemon;if(d.id!=null){if($util.Long)(m.id=$util.Long.fromValue(d.id)).unsigned=false;else if(typeof d.id==="string")m.id=parseInt(d.id,10);else if(typeof d.id==="number")m.id=d.id;else if(typeof d.id==="object")m.id=new $util.LongBits(d.id.low>>>0,d.id.high>>>0).toNumber()}switch(d.pokedex_id){case"MISSINGNO":case 0:m.pokedex_id=0;break;case"BULBASAUR":case 1:m.pokedex_id=1;break;case"IVYSAUR":case 2:m.pokedex_id=2;break;case"VENUSAUR":case 3:m.pokedex_id=3;break;case"CHARMANDER":case 4:m.pokedex_id=4;break;case"CHARMELEON":case 5:m.pokedex_id=5;break;case"CHARIZARD":case 6:m.pokedex_id=6;break;case"SQUIRTLE":case 7:m.pokedex_id=7;break;case"WARTORTLE":case 8:m.pokedex_id=8;break;case"BLASTOISE":case 9:m.pokedex_id=9;break;case"CATERPIE":case 10:m.pokedex_id=10;break;case"METAPOD":case 11:m.pokedex_id=11;break;case"BUTTERFREE":case 12:m.pokedex_id=12;break;case"WEEDLE":case 13:m.pokedex_id=13;break;case"KAKUNA":case 14:m.pokedex_id=14;break;case"BEEDRILL":case 15:m.pokedex_id=15;break;case"PIDGEY":case 16:m.pokedex_id=16;break;case"PIDGEOTTO":case 17:m.pokedex_id=17;break;case"PIDGEOT":case 18:m.pokedex_id=18;break;case"RATTATA":case 19:m.pokedex_id=19;break;case"RATICATE":case 20:m.pokedex_id=20;break;case"SPEAROW":case 21:m.pokedex_id=21;break;case"FEAROW":case 22:m.pokedex_id=22;break;case"EKANS":case 23:m.pokedex_id=23;break;case"ARBOK":case 24:m.pokedex_id=24;break;case"PIKACHU":case 25:m.pokedex_id=25;break;case"RAICHU":case 26:m.pokedex_id=26;break;case"SANDSHREW":case 27:m.pokedex_id=27;break;case"SANDSLASH":case 28:m.pokedex_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokedex_id=29;break;case"NIDORINA":case 30:m.pokedex_id=30;break;case"NIDOQUEEN":case 31:m.pokedex_id=31;break;case"NIDORAN_MALE":case 32:m.pokedex_id=32;break;case"NIDORINO":case 33:m.pokedex_id=33;break;case"NIDOKING":case 34:m.pokedex_id=34;break;case"CLEFAIRY":case 35:m.pokedex_id=35;break;case"CLEFABLE":case 36:m.pokedex_id=36;break;case"VULPIX":case 37:m.pokedex_id=37;break;case"NINETALES":case 38:m.pokedex_id=38;break;case"JIGGLYPUFF":case 39:m.pokedex_id=39;break;case"WIGGLYTUFF":case 40:m.pokedex_id=40;break;case"ZUBAT":case 41:m.pokedex_id=41;break;case"GOLBAT":case 42:m.pokedex_id=42;break;case"ODDISH":case 43:m.pokedex_id=43;break;case"GLOOM":case 44:m.pokedex_id=44;break;case"VILEPLUME":case 45:m.pokedex_id=45;break;case"PARAS":case 46:m.pokedex_id=46;break;case"PARASECT":case 47:m.pokedex_id=47;break;case"VENONAT":case 48:m.pokedex_id=48;break;case"VENOMOTH":case 49:m.pokedex_id=49;break;case"DIGLETT":case 50:m.pokedex_id=50;break;case"DUGTRIO":case 51:m.pokedex_id=51;break;case"MEOWTH":case 52:m.pokedex_id=52;break;case"PERSIAN":case 53:m.pokedex_id=53;break;case"PSYDUCK":case 54:m.pokedex_id=54;break;case"GOLDUCK":case 55:m.pokedex_id=55;break;case"MANKEY":case 56:m.pokedex_id=56;break;case"PRIMEAPE":case 57:m.pokedex_id=57;break;case"GROWLITHE":case 58:m.pokedex_id=58;break;case"ARCANINE":case 59:m.pokedex_id=59;break;case"POLIWAG":case 60:m.pokedex_id=60;break;case"POLIWHIRL":case 61:m.pokedex_id=61;break;case"POLIWRATH":case 62:m.pokedex_id=62;break;case"ABRA":case 63:m.pokedex_id=63;break;case"KADABRA":case 64:m.pokedex_id=64;break;case"ALAKAZAM":case 65:m.pokedex_id=65;break;case"MACHOP":case 66:m.pokedex_id=66;break;case"MACHOKE":case 67:m.pokedex_id=67;break;case"MACHAMP":case 68:m.pokedex_id=68;break;case"BELLSPROUT":case 69:m.pokedex_id=69;break;case"WEEPINBELL":case 70:m.pokedex_id=70;break;case"VICTREEBEL":case 71:m.pokedex_id=71;break;case"TENTACOOL":case 72:m.pokedex_id=72;break;case"TENTACRUEL":case 73:m.pokedex_id=73;break;case"GEODUDE":case 74:m.pokedex_id=74;break;case"GRAVELER":case 75:m.pokedex_id=75;break;case"GOLEM":case 76:m.pokedex_id=76;break;case"PONYTA":case 77:m.pokedex_id=77;break;case"RAPIDASH":case 78:m.pokedex_id=78;break;case"SLOWPOKE":case 79:m.pokedex_id=79;break;case"SLOWBRO":case 80:m.pokedex_id=80;break;case"MAGNEMITE":case 81:m.pokedex_id=81;break;case"MAGNETON":case 82:m.pokedex_id=82;break;case"FARFETCHD":case 83:m.pokedex_id=83;break;case"DODUO":case 84:m.pokedex_id=84;break;case"DODRIO":case 85:m.pokedex_id=85;break;case"SEEL":case 86:m.pokedex_id=86;break;case"DEWGONG":case 87:m.pokedex_id=87;break;case"GRIMER":case 88:m.pokedex_id=88;break;case"MUK":case 89:m.pokedex_id=89;break;case"SHELLDER":case 90:m.pokedex_id=90;break;case"CLOYSTER":case 91:m.pokedex_id=91;break;case"GASTLY":case 92:m.pokedex_id=92;break;case"HAUNTER":case 93:m.pokedex_id=93;break;case"GENGAR":case 94:m.pokedex_id=94;break;case"ONIX":case 95:m.pokedex_id=95;break;case"DROWZEE":case 96:m.pokedex_id=96;break;case"HYPNO":case 97:m.pokedex_id=97;break;case"KRABBY":case 98:m.pokedex_id=98;break;case"KINGLER":case 99:m.pokedex_id=99;break;case"VOLTORB":case 100:m.pokedex_id=100;break;case"ELECTRODE":case 101:m.pokedex_id=101;break;case"EXEGGCUTE":case 102:m.pokedex_id=102;break;case"EXEGGUTOR":case 103:m.pokedex_id=103;break;case"CUBONE":case 104:m.pokedex_id=104;break;case"MAROWAK":case 105:m.pokedex_id=105;break;case"HITMONLEE":case 106:m.pokedex_id=106;break;case"HITMONCHAN":case 107:m.pokedex_id=107;break;case"LICKITUNG":case 108:m.pokedex_id=108;break;case"KOFFING":case 109:m.pokedex_id=109;break;case"WEEZING":case 110:m.pokedex_id=110;break;case"RHYHORN":case 111:m.pokedex_id=111;break;case"RHYDON":case 112:m.pokedex_id=112;break;case"CHANSEY":case 113:m.pokedex_id=113;break;case"TANGELA":case 114:m.pokedex_id=114;break;case"KANGASKHAN":case 115:m.pokedex_id=115;break;case"HORSEA":case 116:m.pokedex_id=116;break;case"SEADRA":case 117:m.pokedex_id=117;break;case"GOLDEEN":case 118:m.pokedex_id=118;break;case"SEAKING":case 119:m.pokedex_id=119;break;case"STARYU":case 120:m.pokedex_id=120;break;case"STARMIE":case 121:m.pokedex_id=121;break;case"MR_MIME":case 122:m.pokedex_id=122;break;case"SCYTHER":case 123:m.pokedex_id=123;break;case"JYNX":case 124:m.pokedex_id=124;break;case"ELECTABUZZ":case 125:m.pokedex_id=125;break;case"MAGMAR":case 126:m.pokedex_id=126;break;case"PINSIR":case 127:m.pokedex_id=127;break;case"TAUROS":case 128:m.pokedex_id=128;break;case"MAGIKARP":case 129:m.pokedex_id=129;break;case"GYARADOS":case 130:m.pokedex_id=130;break;case"LAPRAS":case 131:m.pokedex_id=131;break;case"DITTO":case 132:m.pokedex_id=132;break;case"EEVEE":case 133:m.pokedex_id=133;break;case"VAPOREON":case 134:m.pokedex_id=134;break;case"JOLTEON":case 135:m.pokedex_id=135;break;case"FLAREON":case 136:m.pokedex_id=136;break;case"PORYGON":case 137:m.pokedex_id=137;break;case"OMANYTE":case 138:m.pokedex_id=138;break;case"OMASTAR":case 139:m.pokedex_id=139;break;case"KABUTO":case 140:m.pokedex_id=140;break;case"KABUTOPS":case 141:m.pokedex_id=141;break;case"AERODACTYL":case 142:m.pokedex_id=142;break;case"SNORLAX":case 143:m.pokedex_id=143;break;case"ARTICUNO":case 144:m.pokedex_id=144;break;case"ZAPDOS":case 145:m.pokedex_id=145;break;case"MOLTRES":case 146:m.pokedex_id=146;break;case"DRATINI":case 147:m.pokedex_id=147;break;case"DRAGONAIR":case 148:m.pokedex_id=148;break;case"DRAGONITE":case 149:m.pokedex_id=149;break;case"MEWTWO":case 150:m.pokedex_id=150;break;case"MEW":case 151:m.pokedex_id=151;break;case"CHIKORITA":case 152:m.pokedex_id=152;break;case"BAYLEEF":case 153:m.pokedex_id=153;break;case"MEGANIUM":case 154:m.pokedex_id=154;break;case"CYNDAQUIL":case 155:m.pokedex_id=155;break;case"QUILAVA":case 156:m.pokedex_id=156;break;case"TYPHLOSION":case 157:m.pokedex_id=157;break;case"TOTODILE":case 158:m.pokedex_id=158;break;case"CROCONAW":case 159:m.pokedex_id=159;break;case"FERALIGATR":case 160:m.pokedex_id=160;break;case"SENTRET":case 161:m.pokedex_id=161;break;case"FURRET":case 162:m.pokedex_id=162;break;case"HOOTHOOT":case 163:m.pokedex_id=163;break;case"NOCTOWL":case 164:m.pokedex_id=164;break;case"LEDYBA":case 165:m.pokedex_id=165;break;case"LEDIAN":case 166:m.pokedex_id=166;break;case"SPINARAK":case 167:m.pokedex_id=167;break;case"ARIADOS":case 168:m.pokedex_id=168;break;case"CROBAT":case 169:m.pokedex_id=169;break;case"CHINCHOU":case 170:m.pokedex_id=170;break;case"LANTURN":case 171:m.pokedex_id=171;break;case"PICHU":case 172:m.pokedex_id=172;break;case"CLEFFA":case 173:m.pokedex_id=173;break;case"IGGLYBUFF":case 174:m.pokedex_id=174;break;case"TOGEPI":case 175:m.pokedex_id=175;break;case"TOGETIC":case 176:m.pokedex_id=176;break;case"NATU":case 177:m.pokedex_id=177;break;case"XATU":case 178:m.pokedex_id=178;break;case"MAREEP":case 179:m.pokedex_id=179;break;case"FLAAFFY":case 180:m.pokedex_id=180;break;case"AMPHAROS":case 181:m.pokedex_id=181;break;case"BELLOSSOM":case 182:m.pokedex_id=182;break;case"MARILL":case 183:m.pokedex_id=183;break;case"AZUMARILL":case 184:m.pokedex_id=184;break;case"SUDOWOODO":case 185:m.pokedex_id=185;break;case"POLITOED":case 186:m.pokedex_id=186;break;case"HOPPIP":case 187:m.pokedex_id=187;break;case"SKIPLOOM":case 188:m.pokedex_id=188;break;case"JUMPLUFF":case 189:m.pokedex_id=189;break;case"AIPOM":case 190:m.pokedex_id=190;break;case"SUNKERN":case 191:m.pokedex_id=191;break;case"SUNFLORA":case 192:m.pokedex_id=192;break;case"YANMA":case 193:m.pokedex_id=193;break;case"WOOPER":case 194:m.pokedex_id=194;break;case"QUAGSIRE":case 195:m.pokedex_id=195;break;case"ESPEON":case 196:m.pokedex_id=196;break;case"UMBREON":case 197:m.pokedex_id=197;break;case"MURKROW":case 198:m.pokedex_id=198;break;case"SLOWKING":case 199:m.pokedex_id=199;break;case"MISDREAVUS":case 200:m.pokedex_id=200;break;case"UNOWN":case 201:m.pokedex_id=201;break;case"WOBBUFFET":case 202:m.pokedex_id=202;break;case"GIRAFARIG":case 203:m.pokedex_id=203;break;case"PINECO":case 204:m.pokedex_id=204;break;case"FORRETRESS":case 205:m.pokedex_id=205;break;case"DUNSPARCE":case 206:m.pokedex_id=206;break;case"GLIGAR":case 207:m.pokedex_id=207;break;case"STEELIX":case 208:m.pokedex_id=208;break;case"SNUBBULL":case 209:m.pokedex_id=209;break;case"GRANBULL":case 210:m.pokedex_id=210;break;case"QWILFISH":case 211:m.pokedex_id=211;break;case"SCIZOR":case 212:m.pokedex_id=212;break;case"SHUCKLE":case 213:m.pokedex_id=213;break;case"HERACROSS":case 214:m.pokedex_id=214;break;case"SNEASEL":case 215:m.pokedex_id=215;break;case"TEDDIURSA":case 216:m.pokedex_id=216;break;case"URSARING":case 217:m.pokedex_id=217;break;case"SLUGMA":case 218:m.pokedex_id=218;break;case"MAGCARGO":case 219:m.pokedex_id=219;break;case"SWINUB":case 220:m.pokedex_id=220;break;case"PILOSWINE":case 221:m.pokedex_id=221;break;case"CORSOLA":case 222:m.pokedex_id=222;break;case"REMORAID":case 223:m.pokedex_id=223;break;case"OCTILLERY":case 224:m.pokedex_id=224;break;case"DELIBIRD":case 225:m.pokedex_id=225;break;case"MANTINE":case 226:m.pokedex_id=226;break;case"SKARMORY":case 227:m.pokedex_id=227;break;case"HOUNDOUR":case 228:m.pokedex_id=228;break;case"HOUNDOOM":case 229:m.pokedex_id=229;break;case"KINGDRA":case 230:m.pokedex_id=230;break;case"PHANPY":case 231:m.pokedex_id=231;break;case"DONPHAN":case 232:m.pokedex_id=232;break;case"PORYGON2":case 233:m.pokedex_id=233;break;case"STANTLER":case 234:m.pokedex_id=234;break;case"SMEARGLE":case 235:m.pokedex_id=235;break;case"TYROGUE":case 236:m.pokedex_id=236;break;case"HITMONTOP":case 237:m.pokedex_id=237;break;case"SMOOCHUM":case 238:m.pokedex_id=238;break;case"ELEKID":case 239:m.pokedex_id=239;break;case"MAGBY":case 240:m.pokedex_id=240;break;case"MILTANK":case 241:m.pokedex_id=241;break;case"BLISSEY":case 242:m.pokedex_id=242;break;case"RAIKOU":case 243:m.pokedex_id=243;break;case"ENTEI":case 244:m.pokedex_id=244;break;case"SUICUNE":case 245:m.pokedex_id=245;break;case"LARVITAR":case 246:m.pokedex_id=246;break;case"PUPITAR":case 247:m.pokedex_id=247;break;case"TYRANITAR":case 248:m.pokedex_id=248;break;case"LUGIA":case 249:m.pokedex_id=249;break;case"HO_OH":case 250:m.pokedex_id=250;break;case"CELEBI":case 251:m.pokedex_id=251;break;case"TREECKO":case 252:m.pokedex_id=252;break;case"GROVYLE":case 253:m.pokedex_id=253;break;case"SCEPTILE":case 254:m.pokedex_id=254;break;case"TORCHIC":case 255:m.pokedex_id=255;break;case"COMBUSKEN":case 256:m.pokedex_id=256;break;case"BLAZIKEN":case 257:m.pokedex_id=257;break;case"MUDKIP":case 258:m.pokedex_id=258;break;case"MARSHTOMP":case 259:m.pokedex_id=259;break;case"SWAMPERT":case 260:m.pokedex_id=260;break;case"POOCHYENA":case 261:m.pokedex_id=261;break;case"MIGHTYENA":case 262:m.pokedex_id=262;break;case"ZIGZAGOON":case 263:m.pokedex_id=263;break;case"LINOONE":case 264:m.pokedex_id=264;break;case"WURMPLE":case 265:m.pokedex_id=265;break;case"SILCOON":case 266:m.pokedex_id=266;break;case"BEAUTIFLY":case 267:m.pokedex_id=267;break;case"CASCOON":case 268:m.pokedex_id=268;break;case"DUSTOX":case 269:m.pokedex_id=269;break;case"LOTAD":case 270:m.pokedex_id=270;break;case"LOMBRE":case 271:m.pokedex_id=271;break;case"LUDICOLO":case 272:m.pokedex_id=272;break;case"SEEDOT":case 273:m.pokedex_id=273;break;case"NUZLEAF":case 274:m.pokedex_id=274;break;case"SHIFTRY":case 275:m.pokedex_id=275;break;case"TAILLOW":case 276:m.pokedex_id=276;break;case"SWELLOW":case 277:m.pokedex_id=277;break;case"WINGULL":case 278:m.pokedex_id=278;break;case"PELIPPER":case 279:m.pokedex_id=279;break;case"RALTS":case 280:m.pokedex_id=280;break;case"KIRLIA":case 281:m.pokedex_id=281;break;case"GARDEVOIR":case 282:m.pokedex_id=282;break;case"SURSKIT":case 283:m.pokedex_id=283;break;case"MASQUERAIN":case 284:m.pokedex_id=284;break;case"SHROOMISH":case 285:m.pokedex_id=285;break;case"BRELOOM":case 286:m.pokedex_id=286;break;case"SLAKOTH":case 287:m.pokedex_id=287;break;case"VIGOROTH":case 288:m.pokedex_id=288;break;case"SLAKING":case 289:m.pokedex_id=289;break;case"NINCADA":case 290:m.pokedex_id=290;break;case"NINJASK":case 291:m.pokedex_id=291;break;case"SHEDINJA":case 292:m.pokedex_id=292;break;case"WHISMUR":case 293:m.pokedex_id=293;break;case"LOUDRED":case 294:m.pokedex_id=294;break;case"EXPLOUD":case 295:m.pokedex_id=295;break;case"MAKUHITA":case 296:m.pokedex_id=296;break;case"HARIYAMA":case 297:m.pokedex_id=297;break;case"AZURILL":case 298:m.pokedex_id=298;break;case"NOSEPASS":case 299:m.pokedex_id=299;break;case"SKITTY":case 300:m.pokedex_id=300;break;case"DELCATTY":case 301:m.pokedex_id=301;break;case"SABLEYE":case 302:m.pokedex_id=302;break;case"MAWILE":case 303:m.pokedex_id=303;break;case"ARON":case 304:m.pokedex_id=304;break;case"LAIRON":case 305:m.pokedex_id=305;break;case"AGGRON":case 306:m.pokedex_id=306;break;case"MEDITITE":case 307:m.pokedex_id=307;break;case"MEDICHAM":case 308:m.pokedex_id=308;break;case"ELECTRIKE":case 309:m.pokedex_id=309;break;case"MANECTRIC":case 310:m.pokedex_id=310;break;case"PLUSLE":case 311:m.pokedex_id=311;break;case"MINUN":case 312:m.pokedex_id=312;break;case"VOLBEAT":case 313:m.pokedex_id=313;break;case"ILLUMISE":case 314:m.pokedex_id=314;break;case"ROSELIA":case 315:m.pokedex_id=315;break;case"GULPIN":case 316:m.pokedex_id=316;break;case"SWALOT":case 317:m.pokedex_id=317;break;case"CARVANHA":case 318:m.pokedex_id=318;break;case"SHARPEDO":case 319:m.pokedex_id=319;break;case"WAILMER":case 320:m.pokedex_id=320;break;case"WAILORD":case 321:m.pokedex_id=321;break;case"NUMEL":case 322:m.pokedex_id=322;break;case"CAMERUPT":case 323:m.pokedex_id=323;break;case"TORKOAL":case 324:m.pokedex_id=324;break;case"SPOINK":case 325:m.pokedex_id=325;break;case"GRUMPIG":case 326:m.pokedex_id=326;break;case"SPINDA":case 327:m.pokedex_id=327;break;case"TRAPINCH":case 328:m.pokedex_id=328;break;case"VIBRAVA":case 329:m.pokedex_id=329;break;case"FLYGON":case 330:m.pokedex_id=330;break;case"CACNEA":case 331:m.pokedex_id=331;break;case"CACTURNE":case 332:m.pokedex_id=332;break;case"SWABLU":case 333:m.pokedex_id=333;break;case"ALTARIA":case 334:m.pokedex_id=334;break;case"ZANGOOSE":case 335:m.pokedex_id=335;break;case"SEVIPER":case 336:m.pokedex_id=336;break;case"LUNATONE":case 337:m.pokedex_id=337;break;case"SOLROCK":case 338:m.pokedex_id=338;break;case"BARBOACH":case 339:m.pokedex_id=339;break;case"WHISCASH":case 340:m.pokedex_id=340;break;case"CORPHISH":case 341:m.pokedex_id=341;break;case"CRAWDAUNT":case 342:m.pokedex_id=342;break;case"BALTOY":case 343:m.pokedex_id=343;break;case"CLAYDOL":case 344:m.pokedex_id=344;break;case"LILEEP":case 345:m.pokedex_id=345;break;case"CRADILY":case 346:m.pokedex_id=346;break;case"ANORITH":case 347:m.pokedex_id=347;break;case"ARMALDO":case 348:m.pokedex_id=348;break;case"FEEBAS":case 349:m.pokedex_id=349;break;case"MILOTIC":case 350:m.pokedex_id=350;break;case"CASTFORM":case 351:m.pokedex_id=351;break;case"KECLEON":case 352:m.pokedex_id=352;break;case"SHUPPET":case 353:m.pokedex_id=353;break;case"BANETTE":case 354:m.pokedex_id=354;break;case"DUSKULL":case 355:m.pokedex_id=355;break;case"DUSCLOPS":case 356:m.pokedex_id=356;break;case"TROPIUS":case 357:m.pokedex_id=357;break;case"CHIMECHO":case 358:m.pokedex_id=358;break;case"ABSOL":case 359:m.pokedex_id=359;break;case"WYNAUT":case 360:m.pokedex_id=360;break;case"SNORUNT":case 361:m.pokedex_id=361;break;case"GLALIE":case 362:m.pokedex_id=362;break;case"SPHEAL":case 363:m.pokedex_id=363;break;case"SEALEO":case 364:m.pokedex_id=364;break;case"WALREIN":case 365:m.pokedex_id=365;break;case"CLAMPERL":case 366:m.pokedex_id=366;break;case"HUNTAIL":case 367:m.pokedex_id=367;break;case"GOREBYSS":case 368:m.pokedex_id=368;break;case"RELICANTH":case 369:m.pokedex_id=369;break;case"LUVDISC":case 370:m.pokedex_id=370;break;case"BAGON":case 371:m.pokedex_id=371;break;case"SHELGON":case 372:m.pokedex_id=372;break;case"SALAMENCE":case 373:m.pokedex_id=373;break;case"BELDUM":case 374:m.pokedex_id=374;break;case"METANG":case 375:m.pokedex_id=375;break;case"METAGROSS":case 376:m.pokedex_id=376;break;case"REGIROCK":case 377:m.pokedex_id=377;break;case"REGICE":case 378:m.pokedex_id=378;break;case"REGISTEEL":case 379:m.pokedex_id=379;break;case"LATIAS":case 380:m.pokedex_id=380;break;case"LATIOS":case 381:m.pokedex_id=381;break;case"KYOGRE":case 382:m.pokedex_id=382;break;case"GROUDON":case 383:m.pokedex_id=383;break;case"RAYQUAZA":case 384:m.pokedex_id=384;break;case"JIRACHI":case 385:m.pokedex_id=385;break;case"DEOXYS":case 386:m.pokedex_id=386;break;case"TURTWIG":case 387:m.pokedex_id=387;break;case"GROTLE":case 388:m.pokedex_id=388;break;case"TORTERRA":case 389:m.pokedex_id=389;break;case"CHIMCHAR":case 390:m.pokedex_id=390;break;case"MONFERNO":case 391:m.pokedex_id=391;break;case"INFERNAPE":case 392:m.pokedex_id=392;break;case"PIPLUP":case 393:m.pokedex_id=393;break;case"PRINPLUP":case 394:m.pokedex_id=394;break;case"EMPOLEON":case 395:m.pokedex_id=395;break;case"STARLY":case 396:m.pokedex_id=396;break;case"STARAVIA":case 397:m.pokedex_id=397;break;case"STARAPTOR":case 398:m.pokedex_id=398;break;case"BIDOOF":case 399:m.pokedex_id=399;break;case"BIBAREL":case 400:m.pokedex_id=400;break;case"KRICKETOT":case 401:m.pokedex_id=401;break;case"KRICKETUNE":case 402:m.pokedex_id=402;break;case"SHINX":case 403:m.pokedex_id=403;break;case"LUXIO":case 404:m.pokedex_id=404;break;case"LUXRAY":case 405:m.pokedex_id=405;break;case"BUDEW":case 406:m.pokedex_id=406;break;case"ROSERADE":case 407:m.pokedex_id=407;break;case"CRANIDOS":case 408:m.pokedex_id=408;break;case"RAMPARDOS":case 409:m.pokedex_id=409;break;case"SHIELDON":case 410:m.pokedex_id=410;break;case"BASTIODON":case 411:m.pokedex_id=411;break;case"BURMY":case 412:m.pokedex_id=412;break;case"WORMADAM":case 413:m.pokedex_id=413;break;case"MOTHIM":case 414:m.pokedex_id=414;break;case"COMBEE":case 415:m.pokedex_id=415;break;case"VESPIQUEN":case 416:m.pokedex_id=416;break;case"PACHIRISU":case 417:m.pokedex_id=417;break;case"BUIZEL":case 418:m.pokedex_id=418;break;case"FLOATZEL":case 419:m.pokedex_id=419;break;case"CHERUBI":case 420:m.pokedex_id=420;break;case"CHERRIM":case 421:m.pokedex_id=421;break;case"SHELLOS":case 422:m.pokedex_id=422;break;case"GASTRODON":case 423:m.pokedex_id=423;break;case"AMBIPOM":case 424:m.pokedex_id=424;break;case"DRIFLOON":case 425:m.pokedex_id=425;break;case"DRIFBLIM":case 426:m.pokedex_id=426;break;case"BUNEARY":case 427:m.pokedex_id=427;break;case"LOPUNNY":case 428:m.pokedex_id=428;break;case"MISMAGIUS":case 429:m.pokedex_id=429;break;case"HONCHKROW":case 430:m.pokedex_id=430;break;case"GLAMEOW":case 431:m.pokedex_id=431;break;case"PURUGLY":case 432:m.pokedex_id=432;break;case"CHINGLING":case 433:m.pokedex_id=433;break;case"STUNKY":case 434:m.pokedex_id=434;break;case"SKUNTANK":case 435:m.pokedex_id=435;break;case"BRONZOR":case 436:m.pokedex_id=436;break;case"BRONZONG":case 437:m.pokedex_id=437;break;case"BONSLY":case 438:m.pokedex_id=438;break;case"MIME_JR":case 439:m.pokedex_id=439;break;case"HAPPINY":case 440:m.pokedex_id=440;break;case"CHATOT":case 441:m.pokedex_id=441;break;case"SPIRITOMB":case 442:m.pokedex_id=442;break;case"GIBLE":case 443:m.pokedex_id=443;break;case"GABITE":case 444:m.pokedex_id=444;break;case"GARCHOMP":case 445:m.pokedex_id=445;break;case"MUNCHLAX":case 446:m.pokedex_id=446;break;case"RIOLU":case 447:m.pokedex_id=447;break;case"LUCARIO":case 448:m.pokedex_id=448;break;case"HIPPOPOTAS":case 449:m.pokedex_id=449;break;case"HIPPOWDON":case 450:m.pokedex_id=450;break;case"SKORUPI":case 451:m.pokedex_id=451;break;case"DRAPION":case 452:m.pokedex_id=452;break;case"CROAGUNK":case 453:m.pokedex_id=453;break;case"TOXICROAK":case 454:m.pokedex_id=454;break;case"CARNIVINE":case 455:m.pokedex_id=455;break;case"FINNEON":case 456:m.pokedex_id=456;break;case"LUMINEON":case 457:m.pokedex_id=457;break;case"MANTYKE":case 458:m.pokedex_id=458;break;case"SNOVER":case 459:m.pokedex_id=459;break;case"ABOMASNOW":case 460:m.pokedex_id=460;break;case"WEAVILE":case 461:m.pokedex_id=461;break;case"MAGNEZONE":case 462:m.pokedex_id=462;break;case"LICKILICKY":case 463:m.pokedex_id=463;break;case"RHYPERIOR":case 464:m.pokedex_id=464;break;case"TANGROWTH":case 465:m.pokedex_id=465;break;case"ELECTIVIRE":case 466:m.pokedex_id=466;break;case"MAGMORTAR":case 467:m.pokedex_id=467;break;case"TOGEKISS":case 468:m.pokedex_id=468;break;case"YANMEGA":case 469:m.pokedex_id=469;break;case"LEAFEON":case 470:m.pokedex_id=470;break;case"GLACEON":case 471:m.pokedex_id=471;break;case"GLISCOR":case 472:m.pokedex_id=472;break;case"MAMOSWINE":case 473:m.pokedex_id=473;break;case"PORYGON_Z":case 474:m.pokedex_id=474;break;case"GALLADE":case 475:m.pokedex_id=475;break;case"PROBOPASS":case 476:m.pokedex_id=476;break;case"DUSKNOIR":case 477:m.pokedex_id=477;break;case"FROSLASS":case 478:m.pokedex_id=478;break;case"ROTOM":case 479:m.pokedex_id=479;break;case"UXIE":case 480:m.pokedex_id=480;break;case"MESPRIT":case 481:m.pokedex_id=481;break;case"AZELF":case 482:m.pokedex_id=482;break;case"DIALGA":case 483:m.pokedex_id=483;break;case"PALKIA":case 484:m.pokedex_id=484;break;case"HEATRAN":case 485:m.pokedex_id=485;break;case"REGIGIGAS":case 486:m.pokedex_id=486;break;case"GIRATINA":case 487:m.pokedex_id=487;break;case"CRESSELIA":case 488:m.pokedex_id=488;break;case"PHIONE":case 489:m.pokedex_id=489;break;case"MANAPHY":case 490:m.pokedex_id=490;break;case"DARKRAI":case 491:m.pokedex_id=491;break;case"SHAYMIN":case 492:m.pokedex_id=492;break;case"ARCEUS":case 493:m.pokedex_id=493;break;case"MELTAN":case 808:m.pokedex_id=808;break;case"MELMETAL":case 809:m.pokedex_id=809;break}if(d.cp!=null){m.cp=d.cp|0}if(d.percent_health!=null){m.percent_health=Number(d.percent_health)}return m};LobbyPokemon.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.id=o.longs===String?"0":0;d.pokedex_id=o.enums===String?"MISSINGNO":0;d.cp=0;d.percent_health=0}if(m.id!=null&&m.hasOwnProperty("id")){if(typeof m.id==="number")d.id=o.longs===String?String(m.id):m.id;else d.id=o.longs===String?$util.Long.prototype.toString.call(m.id):o.longs===Number?new $util.LongBits(m.id.low>>>0,m.id.high>>>0).toNumber():m.id}if(m.pokedex_id!=null&&m.hasOwnProperty("pokedex_id")){d.pokedex_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokedex_id]:m.pokedex_id}if(m.cp!=null&&m.hasOwnProperty("cp")){d.cp=m.cp}if(m.percent_health!=null&&m.hasOwnProperty("percent_health")){d.percent_health=o.json&&!isFinite(m.percent_health)?String(m.percent_health):m.percent_health}return d};LobbyPokemon.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return LobbyPokemon}();Pokemon.MapPokemon=function(){function MapPokemon(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}MapPokemon.prototype.spawn_point_id="";MapPokemon.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,false):0;MapPokemon.prototype.pokemon_id=0;MapPokemon.prototype.expiration_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;MapPokemon.prototype.latitude=0;MapPokemon.prototype.longitude=0;MapPokemon.prototype.pokemon_display=null;MapPokemon.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.spawn_point_id!=null&&m.hasOwnProperty("spawn_point_id"))w.uint32(10).string(m.spawn_point_id);if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(17).fixed64(m.encounter_id);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(24).int32(m.pokemon_id);if(m.expiration_timestamp_ms!=null&&m.hasOwnProperty("expiration_timestamp_ms"))w.uint32(32).int64(m.expiration_timestamp_ms);if(m.latitude!=null&&m.hasOwnProperty("latitude"))w.uint32(41).double(m.latitude);if(m.longitude!=null&&m.hasOwnProperty("longitude"))w.uint32(49).double(m.longitude);if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display"))$root.POGOProtos.Data.PokemonDisplay.encode(m.pokemon_display,w.uint32(58).fork()).ldelim();return w};MapPokemon.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.Pokemon.MapPokemon;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.spawn_point_id=r.string();break;case 2:m.encounter_id=r.fixed64();break;case 3:m.pokemon_id=r.int32();break;case 4:m.expiration_timestamp_ms=r.int64();break;case 5:m.latitude=r.double();break;case 6:m.longitude=r.double();break;case 7:m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};MapPokemon.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.Pokemon.MapPokemon)return d;var m=new $root.POGOProtos.Map.Pokemon.MapPokemon;if(d.spawn_point_id!=null){m.spawn_point_id=String(d.spawn_point_id)}if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=false;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber()}switch(d.pokemon_id){case"MISSINGNO":case 0:m.pokemon_id=0;break;case"BULBASAUR":case 1:m.pokemon_id=1;break;case"IVYSAUR":case 2:m.pokemon_id=2;break;case"VENUSAUR":case 3:m.pokemon_id=3;break;case"CHARMANDER":case 4:m.pokemon_id=4;break;case"CHARMELEON":case 5:m.pokemon_id=5;break;case"CHARIZARD":case 6:m.pokemon_id=6;break;case"SQUIRTLE":case 7:m.pokemon_id=7;break;case"WARTORTLE":case 8:m.pokemon_id=8;break;case"BLASTOISE":case 9:m.pokemon_id=9;break;case"CATERPIE":case 10:m.pokemon_id=10;break;case"METAPOD":case 11:m.pokemon_id=11;break;case"BUTTERFREE":case 12:m.pokemon_id=12;break;case"WEEDLE":case 13:m.pokemon_id=13;break;case"KAKUNA":case 14:m.pokemon_id=14;break;case"BEEDRILL":case 15:m.pokemon_id=15;break;case"PIDGEY":case 16:m.pokemon_id=16;break;case"PIDGEOTTO":case 17:m.pokemon_id=17;break;case"PIDGEOT":case 18:m.pokemon_id=18;break;case"RATTATA":case 19:m.pokemon_id=19;break;case"RATICATE":case 20:m.pokemon_id=20;break;case"SPEAROW":case 21:m.pokemon_id=21;break;case"FEAROW":case 22:m.pokemon_id=22;break;case"EKANS":case 23:m.pokemon_id=23;break;case"ARBOK":case 24:m.pokemon_id=24;break;case"PIKACHU":case 25:m.pokemon_id=25;break;case"RAICHU":case 26:m.pokemon_id=26;break;case"SANDSHREW":case 27:m.pokemon_id=27;break;case"SANDSLASH":case 28:m.pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_id=29;break;case"NIDORINA":case 30:m.pokemon_id=30;break;case"NIDOQUEEN":case 31:m.pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.pokemon_id=32;break;case"NIDORINO":case 33:m.pokemon_id=33;break;case"NIDOKING":case 34:m.pokemon_id=34;break;case"CLEFAIRY":case 35:m.pokemon_id=35;break;case"CLEFABLE":case 36:m.pokemon_id=36;break;case"VULPIX":case 37:m.pokemon_id=37;break;case"NINETALES":case 38:m.pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.pokemon_id=40;break;case"ZUBAT":case 41:m.pokemon_id=41;break;case"GOLBAT":case 42:m.pokemon_id=42;break;case"ODDISH":case 43:m.pokemon_id=43;break;case"GLOOM":case 44:m.pokemon_id=44;break;case"VILEPLUME":case 45:m.pokemon_id=45;break;case"PARAS":case 46:m.pokemon_id=46;break;case"PARASECT":case 47:m.pokemon_id=47;break;case"VENONAT":case 48:m.pokemon_id=48;break;case"VENOMOTH":case 49:m.pokemon_id=49;break;case"DIGLETT":case 50:m.pokemon_id=50;break;case"DUGTRIO":case 51:m.pokemon_id=51;break;case"MEOWTH":case 52:m.pokemon_id=52;break;case"PERSIAN":case 53:m.pokemon_id=53;break;case"PSYDUCK":case 54:m.pokemon_id=54;break;case"GOLDUCK":case 55:m.pokemon_id=55;break;case"MANKEY":case 56:m.pokemon_id=56;break;case"PRIMEAPE":case 57:m.pokemon_id=57;break;case"GROWLITHE":case 58:m.pokemon_id=58;break;case"ARCANINE":case 59:m.pokemon_id=59;break;case"POLIWAG":case 60:m.pokemon_id=60;break;case"POLIWHIRL":case 61:m.pokemon_id=61;break;case"POLIWRATH":case 62:m.pokemon_id=62;break;case"ABRA":case 63:m.pokemon_id=63;break;case"KADABRA":case 64:m.pokemon_id=64;break;case"ALAKAZAM":case 65:m.pokemon_id=65;break;case"MACHOP":case 66:m.pokemon_id=66;break;case"MACHOKE":case 67:m.pokemon_id=67;break;case"MACHAMP":case 68:m.pokemon_id=68;break;case"BELLSPROUT":case 69:m.pokemon_id=69;break;case"WEEPINBELL":case 70:m.pokemon_id=70;break;case"VICTREEBEL":case 71:m.pokemon_id=71;break;case"TENTACOOL":case 72:m.pokemon_id=72;break;case"TENTACRUEL":case 73:m.pokemon_id=73;break;case"GEODUDE":case 74:m.pokemon_id=74;break;case"GRAVELER":case 75:m.pokemon_id=75;break;case"GOLEM":case 76:m.pokemon_id=76;break;case"PONYTA":case 77:m.pokemon_id=77;break;case"RAPIDASH":case 78:m.pokemon_id=78;break;case"SLOWPOKE":case 79:m.pokemon_id=79;break;case"SLOWBRO":case 80:m.pokemon_id=80;break;case"MAGNEMITE":case 81:m.pokemon_id=81;break;case"MAGNETON":case 82:m.pokemon_id=82;break;case"FARFETCHD":case 83:m.pokemon_id=83;break;case"DODUO":case 84:m.pokemon_id=84;break;case"DODRIO":case 85:m.pokemon_id=85;break;case"SEEL":case 86:m.pokemon_id=86;break;case"DEWGONG":case 87:m.pokemon_id=87;break;case"GRIMER":case 88:m.pokemon_id=88;break;case"MUK":case 89:m.pokemon_id=89;break;case"SHELLDER":case 90:m.pokemon_id=90;break;case"CLOYSTER":case 91:m.pokemon_id=91;break;case"GASTLY":case 92:m.pokemon_id=92;break;case"HAUNTER":case 93:m.pokemon_id=93;break;case"GENGAR":case 94:m.pokemon_id=94;break;case"ONIX":case 95:m.pokemon_id=95;break;case"DROWZEE":case 96:m.pokemon_id=96;break;case"HYPNO":case 97:m.pokemon_id=97;break;case"KRABBY":case 98:m.pokemon_id=98;break;case"KINGLER":case 99:m.pokemon_id=99;break;case"VOLTORB":case 100:m.pokemon_id=100;break;case"ELECTRODE":case 101:m.pokemon_id=101;break;case"EXEGGCUTE":case 102:m.pokemon_id=102;break;case"EXEGGUTOR":case 103:m.pokemon_id=103;break;case"CUBONE":case 104:m.pokemon_id=104;break;case"MAROWAK":case 105:m.pokemon_id=105;break;case"HITMONLEE":case 106:m.pokemon_id=106;break;case"HITMONCHAN":case 107:m.pokemon_id=107;break;case"LICKITUNG":case 108:m.pokemon_id=108;break;case"KOFFING":case 109:m.pokemon_id=109;break;case"WEEZING":case 110:m.pokemon_id=110;break;case"RHYHORN":case 111:m.pokemon_id=111;break;case"RHYDON":case 112:m.pokemon_id=112;break;case"CHANSEY":case 113:m.pokemon_id=113;break;case"TANGELA":case 114:m.pokemon_id=114;break;case"KANGASKHAN":case 115:m.pokemon_id=115;break;case"HORSEA":case 116:m.pokemon_id=116;break;case"SEADRA":case 117:m.pokemon_id=117;break;case"GOLDEEN":case 118:m.pokemon_id=118;break;case"SEAKING":case 119:m.pokemon_id=119;break;case"STARYU":case 120:m.pokemon_id=120;break;case"STARMIE":case 121:m.pokemon_id=121;break;case"MR_MIME":case 122:m.pokemon_id=122;break;case"SCYTHER":case 123:m.pokemon_id=123;break;case"JYNX":case 124:m.pokemon_id=124;break;case"ELECTABUZZ":case 125:m.pokemon_id=125;break;case"MAGMAR":case 126:m.pokemon_id=126;break;case"PINSIR":case 127:m.pokemon_id=127;break;case"TAUROS":case 128:m.pokemon_id=128;break;case"MAGIKARP":case 129:m.pokemon_id=129;break;case"GYARADOS":case 130:m.pokemon_id=130;break;case"LAPRAS":case 131:m.pokemon_id=131;break;case"DITTO":case 132:m.pokemon_id=132;break;case"EEVEE":case 133:m.pokemon_id=133;break;case"VAPOREON":case 134:m.pokemon_id=134;break;case"JOLTEON":case 135:m.pokemon_id=135;break;case"FLAREON":case 136:m.pokemon_id=136;break;case"PORYGON":case 137:m.pokemon_id=137;break;case"OMANYTE":case 138:m.pokemon_id=138;break;case"OMASTAR":case 139:m.pokemon_id=139;break;case"KABUTO":case 140:m.pokemon_id=140;break;case"KABUTOPS":case 141:m.pokemon_id=141;break;case"AERODACTYL":case 142:m.pokemon_id=142;break;case"SNORLAX":case 143:m.pokemon_id=143;break;case"ARTICUNO":case 144:m.pokemon_id=144;break;case"ZAPDOS":case 145:m.pokemon_id=145;break;case"MOLTRES":case 146:m.pokemon_id=146;break;case"DRATINI":case 147:m.pokemon_id=147;break;case"DRAGONAIR":case 148:m.pokemon_id=148;break;case"DRAGONITE":case 149:m.pokemon_id=149;break;case"MEWTWO":case 150:m.pokemon_id=150;break;case"MEW":case 151:m.pokemon_id=151;break;case"CHIKORITA":case 152:m.pokemon_id=152;break;case"BAYLEEF":case 153:m.pokemon_id=153;break;case"MEGANIUM":case 154:m.pokemon_id=154;break;case"CYNDAQUIL":case 155:m.pokemon_id=155;break;case"QUILAVA":case 156:m.pokemon_id=156;break;case"TYPHLOSION":case 157:m.pokemon_id=157;break;case"TOTODILE":case 158:m.pokemon_id=158;break;case"CROCONAW":case 159:m.pokemon_id=159;break;case"FERALIGATR":case 160:m.pokemon_id=160;break;case"SENTRET":case 161:m.pokemon_id=161;break;case"FURRET":case 162:m.pokemon_id=162;break;case"HOOTHOOT":case 163:m.pokemon_id=163;break;case"NOCTOWL":case 164:m.pokemon_id=164;break;case"LEDYBA":case 165:m.pokemon_id=165;break;case"LEDIAN":case 166:m.pokemon_id=166;break;case"SPINARAK":case 167:m.pokemon_id=167;break;case"ARIADOS":case 168:m.pokemon_id=168;break;case"CROBAT":case 169:m.pokemon_id=169;break;case"CHINCHOU":case 170:m.pokemon_id=170;break;case"LANTURN":case 171:m.pokemon_id=171;break;case"PICHU":case 172:m.pokemon_id=172;break;case"CLEFFA":case 173:m.pokemon_id=173;break;case"IGGLYBUFF":case 174:m.pokemon_id=174;break;case"TOGEPI":case 175:m.pokemon_id=175;break;case"TOGETIC":case 176:m.pokemon_id=176;break;case"NATU":case 177:m.pokemon_id=177;break;case"XATU":case 178:m.pokemon_id=178;break;case"MAREEP":case 179:m.pokemon_id=179;break;case"FLAAFFY":case 180:m.pokemon_id=180;break;case"AMPHAROS":case 181:m.pokemon_id=181;break;case"BELLOSSOM":case 182:m.pokemon_id=182;break;case"MARILL":case 183:m.pokemon_id=183;break;case"AZUMARILL":case 184:m.pokemon_id=184;break;case"SUDOWOODO":case 185:m.pokemon_id=185;break;case"POLITOED":case 186:m.pokemon_id=186;break;case"HOPPIP":case 187:m.pokemon_id=187;break;case"SKIPLOOM":case 188:m.pokemon_id=188;break;case"JUMPLUFF":case 189:m.pokemon_id=189;break;case"AIPOM":case 190:m.pokemon_id=190;break;case"SUNKERN":case 191:m.pokemon_id=191;break;case"SUNFLORA":case 192:m.pokemon_id=192;break;case"YANMA":case 193:m.pokemon_id=193;break;case"WOOPER":case 194:m.pokemon_id=194;break;case"QUAGSIRE":case 195:m.pokemon_id=195;break;case"ESPEON":case 196:m.pokemon_id=196;break;case"UMBREON":case 197:m.pokemon_id=197;break;case"MURKROW":case 198:m.pokemon_id=198;break;case"SLOWKING":case 199:m.pokemon_id=199;break;case"MISDREAVUS":case 200:m.pokemon_id=200;break;case"UNOWN":case 201:m.pokemon_id=201;break;case"WOBBUFFET":case 202:m.pokemon_id=202;break;case"GIRAFARIG":case 203:m.pokemon_id=203;break;case"PINECO":case 204:m.pokemon_id=204;break;case"FORRETRESS":case 205:m.pokemon_id=205;break;case"DUNSPARCE":case 206:m.pokemon_id=206;break;case"GLIGAR":case 207:m.pokemon_id=207;break;case"STEELIX":case 208:m.pokemon_id=208;break;case"SNUBBULL":case 209:m.pokemon_id=209;break;case"GRANBULL":case 210:m.pokemon_id=210;break;case"QWILFISH":case 211:m.pokemon_id=211;break;case"SCIZOR":case 212:m.pokemon_id=212;break;case"SHUCKLE":case 213:m.pokemon_id=213;break;case"HERACROSS":case 214:m.pokemon_id=214;break;case"SNEASEL":case 215:m.pokemon_id=215;break;case"TEDDIURSA":case 216:m.pokemon_id=216;break;case"URSARING":case 217:m.pokemon_id=217;break;case"SLUGMA":case 218:m.pokemon_id=218;break;case"MAGCARGO":case 219:m.pokemon_id=219;break;case"SWINUB":case 220:m.pokemon_id=220;break;case"PILOSWINE":case 221:m.pokemon_id=221;break;case"CORSOLA":case 222:m.pokemon_id=222;break;case"REMORAID":case 223:m.pokemon_id=223;break;case"OCTILLERY":case 224:m.pokemon_id=224;break;case"DELIBIRD":case 225:m.pokemon_id=225;break;case"MANTINE":case 226:m.pokemon_id=226;break;case"SKARMORY":case 227:m.pokemon_id=227;break;case"HOUNDOUR":case 228:m.pokemon_id=228;break;case"HOUNDOOM":case 229:m.pokemon_id=229;break;case"KINGDRA":case 230:m.pokemon_id=230;break;case"PHANPY":case 231:m.pokemon_id=231;break;case"DONPHAN":case 232:m.pokemon_id=232;break;case"PORYGON2":case 233:m.pokemon_id=233;break;case"STANTLER":case 234:m.pokemon_id=234;break;case"SMEARGLE":case 235:m.pokemon_id=235;break;case"TYROGUE":case 236:m.pokemon_id=236;break;case"HITMONTOP":case 237:m.pokemon_id=237;break;case"SMOOCHUM":case 238:m.pokemon_id=238;break;case"ELEKID":case 239:m.pokemon_id=239;break;case"MAGBY":case 240:m.pokemon_id=240;break;case"MILTANK":case 241:m.pokemon_id=241;break;case"BLISSEY":case 242:m.pokemon_id=242;break;case"RAIKOU":case 243:m.pokemon_id=243;break;case"ENTEI":case 244:m.pokemon_id=244;break;case"SUICUNE":case 245:m.pokemon_id=245;break;case"LARVITAR":case 246:m.pokemon_id=246;break;case"PUPITAR":case 247:m.pokemon_id=247;break;case"TYRANITAR":case 248:m.pokemon_id=248;break;case"LUGIA":case 249:m.pokemon_id=249;break;case"HO_OH":case 250:m.pokemon_id=250;break;case"CELEBI":case 251:m.pokemon_id=251;break;case"TREECKO":case 252:m.pokemon_id=252;break;case"GROVYLE":case 253:m.pokemon_id=253;break;case"SCEPTILE":case 254:m.pokemon_id=254;break;case"TORCHIC":case 255:m.pokemon_id=255;break;case"COMBUSKEN":case 256:m.pokemon_id=256;break;case"BLAZIKEN":case 257:m.pokemon_id=257;break;case"MUDKIP":case 258:m.pokemon_id=258;break;case"MARSHTOMP":case 259:m.pokemon_id=259;break;case"SWAMPERT":case 260:m.pokemon_id=260;break;case"POOCHYENA":case 261:m.pokemon_id=261;break;case"MIGHTYENA":case 262:m.pokemon_id=262;break;case"ZIGZAGOON":case 263:m.pokemon_id=263;break;case"LINOONE":case 264:m.pokemon_id=264;break;case"WURMPLE":case 265:m.pokemon_id=265;break;case"SILCOON":case 266:m.pokemon_id=266;break;case"BEAUTIFLY":case 267:m.pokemon_id=267;break;case"CASCOON":case 268:m.pokemon_id=268;break;case"DUSTOX":case 269:m.pokemon_id=269;break;case"LOTAD":case 270:m.pokemon_id=270;break;case"LOMBRE":case 271:m.pokemon_id=271;break;case"LUDICOLO":case 272:m.pokemon_id=272;break;case"SEEDOT":case 273:m.pokemon_id=273;break;case"NUZLEAF":case 274:m.pokemon_id=274;break;case"SHIFTRY":case 275:m.pokemon_id=275;break;case"TAILLOW":case 276:m.pokemon_id=276;break;case"SWELLOW":case 277:m.pokemon_id=277;break;case"WINGULL":case 278:m.pokemon_id=278;break;case"PELIPPER":case 279:m.pokemon_id=279;break;case"RALTS":case 280:m.pokemon_id=280;break;case"KIRLIA":case 281:m.pokemon_id=281;break;case"GARDEVOIR":case 282:m.pokemon_id=282;break;case"SURSKIT":case 283:m.pokemon_id=283;break;case"MASQUERAIN":case 284:m.pokemon_id=284;break;case"SHROOMISH":case 285:m.pokemon_id=285;break;case"BRELOOM":case 286:m.pokemon_id=286;break;case"SLAKOTH":case 287:m.pokemon_id=287;break;case"VIGOROTH":case 288:m.pokemon_id=288;break;case"SLAKING":case 289:m.pokemon_id=289;break;case"NINCADA":case 290:m.pokemon_id=290;break;case"NINJASK":case 291:m.pokemon_id=291;break;case"SHEDINJA":case 292:m.pokemon_id=292;break;case"WHISMUR":case 293:m.pokemon_id=293;break;case"LOUDRED":case 294:m.pokemon_id=294;break;case"EXPLOUD":case 295:m.pokemon_id=295;break;case"MAKUHITA":case 296:m.pokemon_id=296;break;case"HARIYAMA":case 297:m.pokemon_id=297;break;case"AZURILL":case 298:m.pokemon_id=298;break;case"NOSEPASS":case 299:m.pokemon_id=299;break;case"SKITTY":case 300:m.pokemon_id=300;break;case"DELCATTY":case 301:m.pokemon_id=301;break;case"SABLEYE":case 302:m.pokemon_id=302;break;case"MAWILE":case 303:m.pokemon_id=303;break;case"ARON":case 304:m.pokemon_id=304;break;case"LAIRON":case 305:m.pokemon_id=305;break;case"AGGRON":case 306:m.pokemon_id=306;break;case"MEDITITE":case 307:m.pokemon_id=307;break;case"MEDICHAM":case 308:m.pokemon_id=308;break;case"ELECTRIKE":case 309:m.pokemon_id=309;break;case"MANECTRIC":case 310:m.pokemon_id=310;break;case"PLUSLE":case 311:m.pokemon_id=311;break;case"MINUN":case 312:m.pokemon_id=312;break;case"VOLBEAT":case 313:m.pokemon_id=313;break;case"ILLUMISE":case 314:m.pokemon_id=314;break;case"ROSELIA":case 315:m.pokemon_id=315;break;case"GULPIN":case 316:m.pokemon_id=316;break;case"SWALOT":case 317:m.pokemon_id=317;break;case"CARVANHA":case 318:m.pokemon_id=318;break;case"SHARPEDO":case 319:m.pokemon_id=319;break;case"WAILMER":case 320:m.pokemon_id=320;break;case"WAILORD":case 321:m.pokemon_id=321;break;case"NUMEL":case 322:m.pokemon_id=322;break;case"CAMERUPT":case 323:m.pokemon_id=323;break;case"TORKOAL":case 324:m.pokemon_id=324;break;case"SPOINK":case 325:m.pokemon_id=325;break;case"GRUMPIG":case 326:m.pokemon_id=326;break;case"SPINDA":case 327:m.pokemon_id=327;break;case"TRAPINCH":case 328:m.pokemon_id=328;break;case"VIBRAVA":case 329:m.pokemon_id=329;break;case"FLYGON":case 330:m.pokemon_id=330;break;case"CACNEA":case 331:m.pokemon_id=331;break;case"CACTURNE":case 332:m.pokemon_id=332;break;case"SWABLU":case 333:m.pokemon_id=333;break;case"ALTARIA":case 334:m.pokemon_id=334;break;case"ZANGOOSE":case 335:m.pokemon_id=335;break;case"SEVIPER":case 336:m.pokemon_id=336;break;case"LUNATONE":case 337:m.pokemon_id=337;break;case"SOLROCK":case 338:m.pokemon_id=338;break;case"BARBOACH":case 339:m.pokemon_id=339;break;case"WHISCASH":case 340:m.pokemon_id=340;break;case"CORPHISH":case 341:m.pokemon_id=341;break;case"CRAWDAUNT":case 342:m.pokemon_id=342;break;case"BALTOY":case 343:m.pokemon_id=343;break;case"CLAYDOL":case 344:m.pokemon_id=344;break;case"LILEEP":case 345:m.pokemon_id=345;break;case"CRADILY":case 346:m.pokemon_id=346;break;case"ANORITH":case 347:m.pokemon_id=347;break;case"ARMALDO":case 348:m.pokemon_id=348;break;case"FEEBAS":case 349:m.pokemon_id=349;break;case"MILOTIC":case 350:m.pokemon_id=350;break;case"CASTFORM":case 351:m.pokemon_id=351;break;case"KECLEON":case 352:m.pokemon_id=352;break;case"SHUPPET":case 353:m.pokemon_id=353;break;case"BANETTE":case 354:m.pokemon_id=354;break;case"DUSKULL":case 355:m.pokemon_id=355;break;case"DUSCLOPS":case 356:m.pokemon_id=356;break;case"TROPIUS":case 357:m.pokemon_id=357;break;case"CHIMECHO":case 358:m.pokemon_id=358;break;case"ABSOL":case 359:m.pokemon_id=359;break;case"WYNAUT":case 360:m.pokemon_id=360;break;case"SNORUNT":case 361:m.pokemon_id=361;break;case"GLALIE":case 362:m.pokemon_id=362;break;case"SPHEAL":case 363:m.pokemon_id=363;break;case"SEALEO":case 364:m.pokemon_id=364;break;case"WALREIN":case 365:m.pokemon_id=365;break;case"CLAMPERL":case 366:m.pokemon_id=366;break;case"HUNTAIL":case 367:m.pokemon_id=367;break;case"GOREBYSS":case 368:m.pokemon_id=368;break;case"RELICANTH":case 369:m.pokemon_id=369;break;case"LUVDISC":case 370:m.pokemon_id=370;break;case"BAGON":case 371:m.pokemon_id=371;break;case"SHELGON":case 372:m.pokemon_id=372;break;case"SALAMENCE":case 373:m.pokemon_id=373;break;case"BELDUM":case 374:m.pokemon_id=374;break;case"METANG":case 375:m.pokemon_id=375;break;case"METAGROSS":case 376:m.pokemon_id=376;break;case"REGIROCK":case 377:m.pokemon_id=377;break;case"REGICE":case 378:m.pokemon_id=378;break;case"REGISTEEL":case 379:m.pokemon_id=379;break;case"LATIAS":case 380:m.pokemon_id=380;break;case"LATIOS":case 381:m.pokemon_id=381;break;case"KYOGRE":case 382:m.pokemon_id=382;break;case"GROUDON":case 383:m.pokemon_id=383;break;case"RAYQUAZA":case 384:m.pokemon_id=384;break;case"JIRACHI":case 385:m.pokemon_id=385;break;case"DEOXYS":case 386:m.pokemon_id=386;break;case"TURTWIG":case 387:m.pokemon_id=387;break;case"GROTLE":case 388:m.pokemon_id=388;break;case"TORTERRA":case 389:m.pokemon_id=389;break;case"CHIMCHAR":case 390:m.pokemon_id=390;break;case"MONFERNO":case 391:m.pokemon_id=391;break;case"INFERNAPE":case 392:m.pokemon_id=392;break;case"PIPLUP":case 393:m.pokemon_id=393;break;case"PRINPLUP":case 394:m.pokemon_id=394;break;case"EMPOLEON":case 395:m.pokemon_id=395;break;case"STARLY":case 396:m.pokemon_id=396;break;case"STARAVIA":case 397:m.pokemon_id=397;break;case"STARAPTOR":case 398:m.pokemon_id=398;break;case"BIDOOF":case 399:m.pokemon_id=399;break;case"BIBAREL":case 400:m.pokemon_id=400;break;case"KRICKETOT":case 401:m.pokemon_id=401;break;case"KRICKETUNE":case 402:m.pokemon_id=402;break;case"SHINX":case 403:m.pokemon_id=403;break;case"LUXIO":case 404:m.pokemon_id=404;break;case"LUXRAY":case 405:m.pokemon_id=405;break;case"BUDEW":case 406:m.pokemon_id=406;break;case"ROSERADE":case 407:m.pokemon_id=407;break;case"CRANIDOS":case 408:m.pokemon_id=408;break;case"RAMPARDOS":case 409:m.pokemon_id=409;break;case"SHIELDON":case 410:m.pokemon_id=410;break;case"BASTIODON":case 411:m.pokemon_id=411;break;case"BURMY":case 412:m.pokemon_id=412;break;case"WORMADAM":case 413:m.pokemon_id=413;break;case"MOTHIM":case 414:m.pokemon_id=414;break;case"COMBEE":case 415:m.pokemon_id=415;break;case"VESPIQUEN":case 416:m.pokemon_id=416;break;case"PACHIRISU":case 417:m.pokemon_id=417;break;case"BUIZEL":case 418:m.pokemon_id=418;break;case"FLOATZEL":case 419:m.pokemon_id=419;break;case"CHERUBI":case 420:m.pokemon_id=420;break;case"CHERRIM":case 421:m.pokemon_id=421;break;case"SHELLOS":case 422:m.pokemon_id=422;break;case"GASTRODON":case 423:m.pokemon_id=423;break;case"AMBIPOM":case 424:m.pokemon_id=424;break;case"DRIFLOON":case 425:m.pokemon_id=425;break;case"DRIFBLIM":case 426:m.pokemon_id=426;break;case"BUNEARY":case 427:m.pokemon_id=427;break;case"LOPUNNY":case 428:m.pokemon_id=428;break;case"MISMAGIUS":case 429:m.pokemon_id=429;break;case"HONCHKROW":case 430:m.pokemon_id=430;break;case"GLAMEOW":case 431:m.pokemon_id=431;break;case"PURUGLY":case 432:m.pokemon_id=432;break;case"CHINGLING":case 433:m.pokemon_id=433;break;case"STUNKY":case 434:m.pokemon_id=434;break;case"SKUNTANK":case 435:m.pokemon_id=435;break;case"BRONZOR":case 436:m.pokemon_id=436;break;case"BRONZONG":case 437:m.pokemon_id=437;break;case"BONSLY":case 438:m.pokemon_id=438;break;case"MIME_JR":case 439:m.pokemon_id=439;break;case"HAPPINY":case 440:m.pokemon_id=440;break;case"CHATOT":case 441:m.pokemon_id=441;break;case"SPIRITOMB":case 442:m.pokemon_id=442;break;case"GIBLE":case 443:m.pokemon_id=443;break;case"GABITE":case 444:m.pokemon_id=444;break;case"GARCHOMP":case 445:m.pokemon_id=445;break;case"MUNCHLAX":case 446:m.pokemon_id=446;break;case"RIOLU":case 447:m.pokemon_id=447;break;case"LUCARIO":case 448:m.pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.pokemon_id=449;break;case"HIPPOWDON":case 450:m.pokemon_id=450;break;case"SKORUPI":case 451:m.pokemon_id=451;break;case"DRAPION":case 452:m.pokemon_id=452;break;case"CROAGUNK":case 453:m.pokemon_id=453;break;case"TOXICROAK":case 454:m.pokemon_id=454;break;case"CARNIVINE":case 455:m.pokemon_id=455;break;case"FINNEON":case 456:m.pokemon_id=456;break;case"LUMINEON":case 457:m.pokemon_id=457;break;case"MANTYKE":case 458:m.pokemon_id=458;break;case"SNOVER":case 459:m.pokemon_id=459;break;case"ABOMASNOW":case 460:m.pokemon_id=460;break;case"WEAVILE":case 461:m.pokemon_id=461;break;case"MAGNEZONE":case 462:m.pokemon_id=462;break;case"LICKILICKY":case 463:m.pokemon_id=463;break;case"RHYPERIOR":case 464:m.pokemon_id=464;break;case"TANGROWTH":case 465:m.pokemon_id=465;break;case"ELECTIVIRE":case 466:m.pokemon_id=466;break;case"MAGMORTAR":case 467:m.pokemon_id=467;break;case"TOGEKISS":case 468:m.pokemon_id=468;break;case"YANMEGA":case 469:m.pokemon_id=469;break;case"LEAFEON":case 470:m.pokemon_id=470;break;case"GLACEON":case 471:m.pokemon_id=471;break;case"GLISCOR":case 472:m.pokemon_id=472;break;case"MAMOSWINE":case 473:m.pokemon_id=473;break;case"PORYGON_Z":case 474:m.pokemon_id=474;break;case"GALLADE":case 475:m.pokemon_id=475;break;case"PROBOPASS":case 476:m.pokemon_id=476;break;case"DUSKNOIR":case 477:m.pokemon_id=477;break;case"FROSLASS":case 478:m.pokemon_id=478;break;case"ROTOM":case 479:m.pokemon_id=479;break;case"UXIE":case 480:m.pokemon_id=480;break;case"MESPRIT":case 481:m.pokemon_id=481;break;case"AZELF":case 482:m.pokemon_id=482;break;case"DIALGA":case 483:m.pokemon_id=483;break;case"PALKIA":case 484:m.pokemon_id=484;break;case"HEATRAN":case 485:m.pokemon_id=485;break;case"REGIGIGAS":case 486:m.pokemon_id=486;break;case"GIRATINA":case 487:m.pokemon_id=487;break;case"CRESSELIA":case 488:m.pokemon_id=488;break;case"PHIONE":case 489:m.pokemon_id=489;break;case"MANAPHY":case 490:m.pokemon_id=490;break;case"DARKRAI":case 491:m.pokemon_id=491;break;case"SHAYMIN":case 492:m.pokemon_id=492;break;case"ARCEUS":case 493:m.pokemon_id=493;break;case"MELTAN":case 808:m.pokemon_id=808;break;case"MELMETAL":case 809:m.pokemon_id=809;break}if(d.expiration_timestamp_ms!=null){if($util.Long)(m.expiration_timestamp_ms=$util.Long.fromValue(d.expiration_timestamp_ms)).unsigned=false;else if(typeof d.expiration_timestamp_ms==="string")m.expiration_timestamp_ms=parseInt(d.expiration_timestamp_ms,10);else if(typeof d.expiration_timestamp_ms==="number")m.expiration_timestamp_ms=d.expiration_timestamp_ms;else if(typeof d.expiration_timestamp_ms==="object")m.expiration_timestamp_ms=new $util.LongBits(d.expiration_timestamp_ms.low>>>0,d.expiration_timestamp_ms.high>>>0).toNumber()}if(d.latitude!=null){m.latitude=Number(d.latitude)}if(d.longitude!=null){m.longitude=Number(d.longitude)}if(d.pokemon_display!=null){if(typeof d.pokemon_display!=="object")throw TypeError(".POGOProtos.Map.Pokemon.MapPokemon.pokemon_display: object expected");m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.pokemon_display)}return m};MapPokemon.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.spawn_point_id="";if($util.Long){var n=new $util.Long(0,0,false);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0;d.pokemon_id=o.enums===String?"MISSINGNO":0;if($util.Long){var n=new $util.Long(0,0,false);d.expiration_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.expiration_timestamp_ms=o.longs===String?"0":0;d.latitude=0;d.longitude=0;d.pokemon_display=null}if(m.spawn_point_id!=null&&m.hasOwnProperty("spawn_point_id")){d.spawn_point_id=m.spawn_point_id}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber():m.encounter_id}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){d.pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_id]:m.pokemon_id}if(m.expiration_timestamp_ms!=null&&m.hasOwnProperty("expiration_timestamp_ms")){if(typeof m.expiration_timestamp_ms==="number")d.expiration_timestamp_ms=o.longs===String?String(m.expiration_timestamp_ms):m.expiration_timestamp_ms;else d.expiration_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.expiration_timestamp_ms):o.longs===Number?new $util.LongBits(m.expiration_timestamp_ms.low>>>0,m.expiration_timestamp_ms.high>>>0).toNumber():m.expiration_timestamp_ms}if(m.latitude!=null&&m.hasOwnProperty("latitude")){d.latitude=o.json&&!isFinite(m.latitude)?String(m.latitude):m.latitude}if(m.longitude!=null&&m.hasOwnProperty("longitude")){d.longitude=o.json&&!isFinite(m.longitude)?String(m.longitude):m.longitude}if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display")){d.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.toObject(m.pokemon_display,o)}return d};MapPokemon.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return MapPokemon}();Pokemon.MotivatedPokemon=function(){function MotivatedPokemon(p){this.food_value=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}MotivatedPokemon.prototype.pokemon=null;MotivatedPokemon.prototype.deploy_ms=$util.Long?$util.Long.fromBits(0,0,false):0;MotivatedPokemon.prototype.cp_when_deployed=0;MotivatedPokemon.prototype.motivation_now=0;MotivatedPokemon.prototype.cp_now=0;MotivatedPokemon.prototype.berry_value=0;MotivatedPokemon.prototype.feed_cooldown_duration_millis=$util.Long?$util.Long.fromBits(0,0,false):0;MotivatedPokemon.prototype.food_value=$util.emptyArray;MotivatedPokemon.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon!=null&&m.hasOwnProperty("pokemon"))$root.POGOProtos.Data.PokemonData.encode(m.pokemon,w.uint32(10).fork()).ldelim();if(m.deploy_ms!=null&&m.hasOwnProperty("deploy_ms"))w.uint32(16).int64(m.deploy_ms);if(m.cp_when_deployed!=null&&m.hasOwnProperty("cp_when_deployed"))w.uint32(24).int32(m.cp_when_deployed);if(m.motivation_now!=null&&m.hasOwnProperty("motivation_now"))w.uint32(33).double(m.motivation_now);if(m.cp_now!=null&&m.hasOwnProperty("cp_now"))w.uint32(40).int32(m.cp_now);if(m.berry_value!=null&&m.hasOwnProperty("berry_value"))w.uint32(53).float(m.berry_value);if(m.feed_cooldown_duration_millis!=null&&m.hasOwnProperty("feed_cooldown_duration_millis"))w.uint32(56).int64(m.feed_cooldown_duration_millis);if(m.food_value!=null&&m.food_value.length){for(var i=0;i<m.food_value.length;++i)$root.POGOProtos.Data.FoodValue.encode(m.food_value[i],w.uint32(66).fork()).ldelim()}return w};MotivatedPokemon.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.Pokemon.MotivatedPokemon;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 2:m.deploy_ms=r.int64();break;case 3:m.cp_when_deployed=r.int32();break;case 4:m.motivation_now=r.double();break;case 5:m.cp_now=r.int32();break;case 6:m.berry_value=r.float();break;case 7:m.feed_cooldown_duration_millis=r.int64();break;case 8:if(!(m.food_value&&m.food_value.length))m.food_value=[];m.food_value.push($root.POGOProtos.Data.FoodValue.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};MotivatedPokemon.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.Pokemon.MotivatedPokemon)return d;var m=new $root.POGOProtos.Map.Pokemon.MotivatedPokemon;if(d.pokemon!=null){if(typeof d.pokemon!=="object")throw TypeError(".POGOProtos.Map.Pokemon.MotivatedPokemon.pokemon: object expected");m.pokemon=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon)}if(d.deploy_ms!=null){if($util.Long)(m.deploy_ms=$util.Long.fromValue(d.deploy_ms)).unsigned=false;else if(typeof d.deploy_ms==="string")m.deploy_ms=parseInt(d.deploy_ms,10);else if(typeof d.deploy_ms==="number")m.deploy_ms=d.deploy_ms;else if(typeof d.deploy_ms==="object")m.deploy_ms=new $util.LongBits(d.deploy_ms.low>>>0,d.deploy_ms.high>>>0).toNumber()}if(d.cp_when_deployed!=null){m.cp_when_deployed=d.cp_when_deployed|0}if(d.motivation_now!=null){m.motivation_now=Number(d.motivation_now)}if(d.cp_now!=null){m.cp_now=d.cp_now|0}if(d.berry_value!=null){m.berry_value=Number(d.berry_value)}if(d.feed_cooldown_duration_millis!=null){if($util.Long)(m.feed_cooldown_duration_millis=$util.Long.fromValue(d.feed_cooldown_duration_millis)).unsigned=false;else if(typeof d.feed_cooldown_duration_millis==="string")m.feed_cooldown_duration_millis=parseInt(d.feed_cooldown_duration_millis,10);else if(typeof d.feed_cooldown_duration_millis==="number")m.feed_cooldown_duration_millis=d.feed_cooldown_duration_millis;else if(typeof d.feed_cooldown_duration_millis==="object")m.feed_cooldown_duration_millis=new $util.LongBits(d.feed_cooldown_duration_millis.low>>>0,d.feed_cooldown_duration_millis.high>>>0).toNumber()}if(d.food_value){if(!Array.isArray(d.food_value))throw TypeError(".POGOProtos.Map.Pokemon.MotivatedPokemon.food_value: array expected");m.food_value=[];for(var i=0;i<d.food_value.length;++i){if(typeof d.food_value[i]!=="object")throw TypeError(".POGOProtos.Map.Pokemon.MotivatedPokemon.food_value: object expected");m.food_value[i]=$root.POGOProtos.Data.FoodValue.fromObject(d.food_value[i])}}return m};MotivatedPokemon.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.food_value=[]}if(o.defaults){d.pokemon=null;if($util.Long){var n=new $util.Long(0,0,false);d.deploy_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.deploy_ms=o.longs===String?"0":0;d.cp_when_deployed=0;d.motivation_now=0;d.cp_now=0;d.berry_value=0;if($util.Long){var n=new $util.Long(0,0,false);d.feed_cooldown_duration_millis=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.feed_cooldown_duration_millis=o.longs===String?"0":0}if(m.pokemon!=null&&m.hasOwnProperty("pokemon")){d.pokemon=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon,o)}if(m.deploy_ms!=null&&m.hasOwnProperty("deploy_ms")){if(typeof m.deploy_ms==="number")d.deploy_ms=o.longs===String?String(m.deploy_ms):m.deploy_ms;else d.deploy_ms=o.longs===String?$util.Long.prototype.toString.call(m.deploy_ms):o.longs===Number?new $util.LongBits(m.deploy_ms.low>>>0,m.deploy_ms.high>>>0).toNumber():m.deploy_ms}if(m.cp_when_deployed!=null&&m.hasOwnProperty("cp_when_deployed")){d.cp_when_deployed=m.cp_when_deployed}if(m.motivation_now!=null&&m.hasOwnProperty("motivation_now")){d.motivation_now=o.json&&!isFinite(m.motivation_now)?String(m.motivation_now):m.motivation_now}if(m.cp_now!=null&&m.hasOwnProperty("cp_now")){d.cp_now=m.cp_now}if(m.berry_value!=null&&m.hasOwnProperty("berry_value")){d.berry_value=o.json&&!isFinite(m.berry_value)?String(m.berry_value):m.berry_value}if(m.feed_cooldown_duration_millis!=null&&m.hasOwnProperty("feed_cooldown_duration_millis")){if(typeof m.feed_cooldown_duration_millis==="number")d.feed_cooldown_duration_millis=o.longs===String?String(m.feed_cooldown_duration_millis):m.feed_cooldown_duration_millis;else d.feed_cooldown_duration_millis=o.longs===String?$util.Long.prototype.toString.call(m.feed_cooldown_duration_millis):o.longs===Number?new $util.LongBits(m.feed_cooldown_duration_millis.low>>>0,m.feed_cooldown_duration_millis.high>>>0).toNumber():m.feed_cooldown_duration_millis}if(m.food_value&&m.food_value.length){d.food_value=[];for(var j=0;j<m.food_value.length;++j){d.food_value[j]=$root.POGOProtos.Data.FoodValue.toObject(m.food_value[j],o)}}return d};MotivatedPokemon.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return MotivatedPokemon}();Pokemon.NearbyPokemon=function(){function NearbyPokemon(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}NearbyPokemon.prototype.pokemon_id=0;NearbyPokemon.prototype.distance_in_meters=0;NearbyPokemon.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,false):0;NearbyPokemon.prototype.fort_id="";NearbyPokemon.prototype.fort_image_url="";NearbyPokemon.prototype.pokemon_display=null;NearbyPokemon.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(8).int32(m.pokemon_id);if(m.distance_in_meters!=null&&m.hasOwnProperty("distance_in_meters"))w.uint32(21).float(m.distance_in_meters);if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(25).fixed64(m.encounter_id);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(34).string(m.fort_id);if(m.fort_image_url!=null&&m.hasOwnProperty("fort_image_url"))w.uint32(42).string(m.fort_image_url);if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display"))$root.POGOProtos.Data.PokemonDisplay.encode(m.pokemon_display,w.uint32(50).fork()).ldelim();return w};NearbyPokemon.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.Pokemon.NearbyPokemon;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.int32();break;case 2:m.distance_in_meters=r.float();break;case 3:m.encounter_id=r.fixed64();break;case 4:m.fort_id=r.string();break;case 5:m.fort_image_url=r.string();break;case 6:m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};NearbyPokemon.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.Pokemon.NearbyPokemon)return d;var m=new $root.POGOProtos.Map.Pokemon.NearbyPokemon;switch(d.pokemon_id){case"MISSINGNO":case 0:m.pokemon_id=0;break;case"BULBASAUR":case 1:m.pokemon_id=1;break;case"IVYSAUR":case 2:m.pokemon_id=2;break;case"VENUSAUR":case 3:m.pokemon_id=3;break;case"CHARMANDER":case 4:m.pokemon_id=4;break;case"CHARMELEON":case 5:m.pokemon_id=5;break;case"CHARIZARD":case 6:m.pokemon_id=6;break;case"SQUIRTLE":case 7:m.pokemon_id=7;break;case"WARTORTLE":case 8:m.pokemon_id=8;break;case"BLASTOISE":case 9:m.pokemon_id=9;break;case"CATERPIE":case 10:m.pokemon_id=10;break;case"METAPOD":case 11:m.pokemon_id=11;break;case"BUTTERFREE":case 12:m.pokemon_id=12;break;case"WEEDLE":case 13:m.pokemon_id=13;break;case"KAKUNA":case 14:m.pokemon_id=14;break;case"BEEDRILL":case 15:m.pokemon_id=15;break;case"PIDGEY":case 16:m.pokemon_id=16;break;case"PIDGEOTTO":case 17:m.pokemon_id=17;break;case"PIDGEOT":case 18:m.pokemon_id=18;break;case"RATTATA":case 19:m.pokemon_id=19;break;case"RATICATE":case 20:m.pokemon_id=20;break;case"SPEAROW":case 21:m.pokemon_id=21;break;case"FEAROW":case 22:m.pokemon_id=22;break;case"EKANS":case 23:m.pokemon_id=23;break;case"ARBOK":case 24:m.pokemon_id=24;break;case"PIKACHU":case 25:m.pokemon_id=25;break;case"RAICHU":case 26:m.pokemon_id=26;break;case"SANDSHREW":case 27:m.pokemon_id=27;break;case"SANDSLASH":case 28:m.pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_id=29;break;case"NIDORINA":case 30:m.pokemon_id=30;break;case"NIDOQUEEN":case 31:m.pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.pokemon_id=32;break;case"NIDORINO":case 33:m.pokemon_id=33;break;case"NIDOKING":case 34:m.pokemon_id=34;break;case"CLEFAIRY":case 35:m.pokemon_id=35;break;case"CLEFABLE":case 36:m.pokemon_id=36;break;case"VULPIX":case 37:m.pokemon_id=37;break;case"NINETALES":case 38:m.pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.pokemon_id=40;break;case"ZUBAT":case 41:m.pokemon_id=41;break;case"GOLBAT":case 42:m.pokemon_id=42;break;case"ODDISH":case 43:m.pokemon_id=43;break;case"GLOOM":case 44:m.pokemon_id=44;break;case"VILEPLUME":case 45:m.pokemon_id=45;break;case"PARAS":case 46:m.pokemon_id=46;break;case"PARASECT":case 47:m.pokemon_id=47;break;case"VENONAT":case 48:m.pokemon_id=48;break;case"VENOMOTH":case 49:m.pokemon_id=49;break;case"DIGLETT":case 50:m.pokemon_id=50;break;case"DUGTRIO":case 51:m.pokemon_id=51;break;case"MEOWTH":case 52:m.pokemon_id=52;break;case"PERSIAN":case 53:m.pokemon_id=53;break;case"PSYDUCK":case 54:m.pokemon_id=54;break;case"GOLDUCK":case 55:m.pokemon_id=55;break;case"MANKEY":case 56:m.pokemon_id=56;break;case"PRIMEAPE":case 57:m.pokemon_id=57;break;case"GROWLITHE":case 58:m.pokemon_id=58;break;case"ARCANINE":case 59:m.pokemon_id=59;break;case"POLIWAG":case 60:m.pokemon_id=60;break;case"POLIWHIRL":case 61:m.pokemon_id=61;break;case"POLIWRATH":case 62:m.pokemon_id=62;break;case"ABRA":case 63:m.pokemon_id=63;break;case"KADABRA":case 64:m.pokemon_id=64;break;case"ALAKAZAM":case 65:m.pokemon_id=65;break;case"MACHOP":case 66:m.pokemon_id=66;break;case"MACHOKE":case 67:m.pokemon_id=67;break;case"MACHAMP":case 68:m.pokemon_id=68;break;case"BELLSPROUT":case 69:m.pokemon_id=69;break;case"WEEPINBELL":case 70:m.pokemon_id=70;break;case"VICTREEBEL":case 71:m.pokemon_id=71;break;case"TENTACOOL":case 72:m.pokemon_id=72;break;case"TENTACRUEL":case 73:m.pokemon_id=73;break;case"GEODUDE":case 74:m.pokemon_id=74;break;case"GRAVELER":case 75:m.pokemon_id=75;break;case"GOLEM":case 76:m.pokemon_id=76;break;case"PONYTA":case 77:m.pokemon_id=77;break;case"RAPIDASH":case 78:m.pokemon_id=78;break;case"SLOWPOKE":case 79:m.pokemon_id=79;break;case"SLOWBRO":case 80:m.pokemon_id=80;break;case"MAGNEMITE":case 81:m.pokemon_id=81;break;case"MAGNETON":case 82:m.pokemon_id=82;break;case"FARFETCHD":case 83:m.pokemon_id=83;break;case"DODUO":case 84:m.pokemon_id=84;break;case"DODRIO":case 85:m.pokemon_id=85;break;case"SEEL":case 86:m.pokemon_id=86;break;case"DEWGONG":case 87:m.pokemon_id=87;break;case"GRIMER":case 88:m.pokemon_id=88;break;case"MUK":case 89:m.pokemon_id=89;break;case"SHELLDER":case 90:m.pokemon_id=90;break;case"CLOYSTER":case 91:m.pokemon_id=91;break;case"GASTLY":case 92:m.pokemon_id=92;break;case"HAUNTER":case 93:m.pokemon_id=93;break;case"GENGAR":case 94:m.pokemon_id=94;break;case"ONIX":case 95:m.pokemon_id=95;break;case"DROWZEE":case 96:m.pokemon_id=96;break;case"HYPNO":case 97:m.pokemon_id=97;break;case"KRABBY":case 98:m.pokemon_id=98;break;case"KINGLER":case 99:m.pokemon_id=99;break;case"VOLTORB":case 100:m.pokemon_id=100;break;case"ELECTRODE":case 101:m.pokemon_id=101;break;case"EXEGGCUTE":case 102:m.pokemon_id=102;break;case"EXEGGUTOR":case 103:m.pokemon_id=103;break;case"CUBONE":case 104:m.pokemon_id=104;break;case"MAROWAK":case 105:m.pokemon_id=105;break;case"HITMONLEE":case 106:m.pokemon_id=106;break;case"HITMONCHAN":case 107:m.pokemon_id=107;break;case"LICKITUNG":case 108:m.pokemon_id=108;break;case"KOFFING":case 109:m.pokemon_id=109;break;case"WEEZING":case 110:m.pokemon_id=110;break;case"RHYHORN":case 111:m.pokemon_id=111;break;case"RHYDON":case 112:m.pokemon_id=112;break;case"CHANSEY":case 113:m.pokemon_id=113;break;case"TANGELA":case 114:m.pokemon_id=114;break;case"KANGASKHAN":case 115:m.pokemon_id=115;break;case"HORSEA":case 116:m.pokemon_id=116;break;case"SEADRA":case 117:m.pokemon_id=117;break;case"GOLDEEN":case 118:m.pokemon_id=118;break;case"SEAKING":case 119:m.pokemon_id=119;break;case"STARYU":case 120:m.pokemon_id=120;break;case"STARMIE":case 121:m.pokemon_id=121;break;case"MR_MIME":case 122:m.pokemon_id=122;break;case"SCYTHER":case 123:m.pokemon_id=123;break;case"JYNX":case 124:m.pokemon_id=124;break;case"ELECTABUZZ":case 125:m.pokemon_id=125;break;case"MAGMAR":case 126:m.pokemon_id=126;break;case"PINSIR":case 127:m.pokemon_id=127;break;case"TAUROS":case 128:m.pokemon_id=128;break;case"MAGIKARP":case 129:m.pokemon_id=129;break;case"GYARADOS":case 130:m.pokemon_id=130;break;case"LAPRAS":case 131:m.pokemon_id=131;break;case"DITTO":case 132:m.pokemon_id=132;break;case"EEVEE":case 133:m.pokemon_id=133;break;case"VAPOREON":case 134:m.pokemon_id=134;break;case"JOLTEON":case 135:m.pokemon_id=135;break;case"FLAREON":case 136:m.pokemon_id=136;break;case"PORYGON":case 137:m.pokemon_id=137;break;case"OMANYTE":case 138:m.pokemon_id=138;break;case"OMASTAR":case 139:m.pokemon_id=139;break;case"KABUTO":case 140:m.pokemon_id=140;break;case"KABUTOPS":case 141:m.pokemon_id=141;break;case"AERODACTYL":case 142:m.pokemon_id=142;break;case"SNORLAX":case 143:m.pokemon_id=143;break;case"ARTICUNO":case 144:m.pokemon_id=144;break;case"ZAPDOS":case 145:m.pokemon_id=145;break;case"MOLTRES":case 146:m.pokemon_id=146;break;case"DRATINI":case 147:m.pokemon_id=147;break;case"DRAGONAIR":case 148:m.pokemon_id=148;break;case"DRAGONITE":case 149:m.pokemon_id=149;break;case"MEWTWO":case 150:m.pokemon_id=150;break;case"MEW":case 151:m.pokemon_id=151;break;case"CHIKORITA":case 152:m.pokemon_id=152;break;case"BAYLEEF":case 153:m.pokemon_id=153;break;case"MEGANIUM":case 154:m.pokemon_id=154;break;case"CYNDAQUIL":case 155:m.pokemon_id=155;break;case"QUILAVA":case 156:m.pokemon_id=156;break;case"TYPHLOSION":case 157:m.pokemon_id=157;break;case"TOTODILE":case 158:m.pokemon_id=158;break;case"CROCONAW":case 159:m.pokemon_id=159;break;case"FERALIGATR":case 160:m.pokemon_id=160;break;case"SENTRET":case 161:m.pokemon_id=161;break;case"FURRET":case 162:m.pokemon_id=162;break;case"HOOTHOOT":case 163:m.pokemon_id=163;break;case"NOCTOWL":case 164:m.pokemon_id=164;break;case"LEDYBA":case 165:m.pokemon_id=165;break;case"LEDIAN":case 166:m.pokemon_id=166;break;case"SPINARAK":case 167:m.pokemon_id=167;break;case"ARIADOS":case 168:m.pokemon_id=168;break;case"CROBAT":case 169:m.pokemon_id=169;break;case"CHINCHOU":case 170:m.pokemon_id=170;break;case"LANTURN":case 171:m.pokemon_id=171;break;case"PICHU":case 172:m.pokemon_id=172;break;case"CLEFFA":case 173:m.pokemon_id=173;break;case"IGGLYBUFF":case 174:m.pokemon_id=174;break;case"TOGEPI":case 175:m.pokemon_id=175;break;case"TOGETIC":case 176:m.pokemon_id=176;break;case"NATU":case 177:m.pokemon_id=177;break;case"XATU":case 178:m.pokemon_id=178;break;case"MAREEP":case 179:m.pokemon_id=179;break;case"FLAAFFY":case 180:m.pokemon_id=180;break;case"AMPHAROS":case 181:m.pokemon_id=181;break;case"BELLOSSOM":case 182:m.pokemon_id=182;break;case"MARILL":case 183:m.pokemon_id=183;break;case"AZUMARILL":case 184:m.pokemon_id=184;break;case"SUDOWOODO":case 185:m.pokemon_id=185;break;case"POLITOED":case 186:m.pokemon_id=186;break;case"HOPPIP":case 187:m.pokemon_id=187;break;case"SKIPLOOM":case 188:m.pokemon_id=188;break;case"JUMPLUFF":case 189:m.pokemon_id=189;break;case"AIPOM":case 190:m.pokemon_id=190;break;case"SUNKERN":case 191:m.pokemon_id=191;break;case"SUNFLORA":case 192:m.pokemon_id=192;break;case"YANMA":case 193:m.pokemon_id=193;break;case"WOOPER":case 194:m.pokemon_id=194;break;case"QUAGSIRE":case 195:m.pokemon_id=195;break;case"ESPEON":case 196:m.pokemon_id=196;break;case"UMBREON":case 197:m.pokemon_id=197;break;case"MURKROW":case 198:m.pokemon_id=198;break;case"SLOWKING":case 199:m.pokemon_id=199;break;case"MISDREAVUS":case 200:m.pokemon_id=200;break;case"UNOWN":case 201:m.pokemon_id=201;break;case"WOBBUFFET":case 202:m.pokemon_id=202;break;case"GIRAFARIG":case 203:m.pokemon_id=203;break;case"PINECO":case 204:m.pokemon_id=204;break;case"FORRETRESS":case 205:m.pokemon_id=205;break;case"DUNSPARCE":case 206:m.pokemon_id=206;break;case"GLIGAR":case 207:m.pokemon_id=207;break;case"STEELIX":case 208:m.pokemon_id=208;break;case"SNUBBULL":case 209:m.pokemon_id=209;break;case"GRANBULL":case 210:m.pokemon_id=210;break;case"QWILFISH":case 211:m.pokemon_id=211;break;case"SCIZOR":case 212:m.pokemon_id=212;break;case"SHUCKLE":case 213:m.pokemon_id=213;break;case"HERACROSS":case 214:m.pokemon_id=214;break;case"SNEASEL":case 215:m.pokemon_id=215;break;case"TEDDIURSA":case 216:m.pokemon_id=216;break;case"URSARING":case 217:m.pokemon_id=217;break;case"SLUGMA":case 218:m.pokemon_id=218;break;case"MAGCARGO":case 219:m.pokemon_id=219;break;case"SWINUB":case 220:m.pokemon_id=220;break;case"PILOSWINE":case 221:m.pokemon_id=221;break;case"CORSOLA":case 222:m.pokemon_id=222;break;case"REMORAID":case 223:m.pokemon_id=223;break;case"OCTILLERY":case 224:m.pokemon_id=224;break;case"DELIBIRD":case 225:m.pokemon_id=225;break;case"MANTINE":case 226:m.pokemon_id=226;break;case"SKARMORY":case 227:m.pokemon_id=227;break;case"HOUNDOUR":case 228:m.pokemon_id=228;break;case"HOUNDOOM":case 229:m.pokemon_id=229;break;case"KINGDRA":case 230:m.pokemon_id=230;break;case"PHANPY":case 231:m.pokemon_id=231;break;case"DONPHAN":case 232:m.pokemon_id=232;break;case"PORYGON2":case 233:m.pokemon_id=233;break;case"STANTLER":case 234:m.pokemon_id=234;break;case"SMEARGLE":case 235:m.pokemon_id=235;break;case"TYROGUE":case 236:m.pokemon_id=236;break;case"HITMONTOP":case 237:m.pokemon_id=237;break;case"SMOOCHUM":case 238:m.pokemon_id=238;break;case"ELEKID":case 239:m.pokemon_id=239;break;case"MAGBY":case 240:m.pokemon_id=240;break;case"MILTANK":case 241:m.pokemon_id=241;break;case"BLISSEY":case 242:m.pokemon_id=242;break;case"RAIKOU":case 243:m.pokemon_id=243;break;case"ENTEI":case 244:m.pokemon_id=244;break;case"SUICUNE":case 245:m.pokemon_id=245;break;case"LARVITAR":case 246:m.pokemon_id=246;break;case"PUPITAR":case 247:m.pokemon_id=247;break;case"TYRANITAR":case 248:m.pokemon_id=248;break;case"LUGIA":case 249:m.pokemon_id=249;break;case"HO_OH":case 250:m.pokemon_id=250;break;case"CELEBI":case 251:m.pokemon_id=251;break;case"TREECKO":case 252:m.pokemon_id=252;break;case"GROVYLE":case 253:m.pokemon_id=253;break;case"SCEPTILE":case 254:m.pokemon_id=254;break;case"TORCHIC":case 255:m.pokemon_id=255;break;case"COMBUSKEN":case 256:m.pokemon_id=256;break;case"BLAZIKEN":case 257:m.pokemon_id=257;break;case"MUDKIP":case 258:m.pokemon_id=258;break;case"MARSHTOMP":case 259:m.pokemon_id=259;break;case"SWAMPERT":case 260:m.pokemon_id=260;break;case"POOCHYENA":case 261:m.pokemon_id=261;break;case"MIGHTYENA":case 262:m.pokemon_id=262;break;case"ZIGZAGOON":case 263:m.pokemon_id=263;break;case"LINOONE":case 264:m.pokemon_id=264;break;case"WURMPLE":case 265:m.pokemon_id=265;break;case"SILCOON":case 266:m.pokemon_id=266;break;case"BEAUTIFLY":case 267:m.pokemon_id=267;break;case"CASCOON":case 268:m.pokemon_id=268;break;case"DUSTOX":case 269:m.pokemon_id=269;break;case"LOTAD":case 270:m.pokemon_id=270;break;case"LOMBRE":case 271:m.pokemon_id=271;break;case"LUDICOLO":case 272:m.pokemon_id=272;break;case"SEEDOT":case 273:m.pokemon_id=273;break;case"NUZLEAF":case 274:m.pokemon_id=274;break;case"SHIFTRY":case 275:m.pokemon_id=275;break;case"TAILLOW":case 276:m.pokemon_id=276;break;case"SWELLOW":case 277:m.pokemon_id=277;break;case"WINGULL":case 278:m.pokemon_id=278;break;case"PELIPPER":case 279:m.pokemon_id=279;break;case"RALTS":case 280:m.pokemon_id=280;break;case"KIRLIA":case 281:m.pokemon_id=281;break;case"GARDEVOIR":case 282:m.pokemon_id=282;break;case"SURSKIT":case 283:m.pokemon_id=283;break;case"MASQUERAIN":case 284:m.pokemon_id=284;break;case"SHROOMISH":case 285:m.pokemon_id=285;break;case"BRELOOM":case 286:m.pokemon_id=286;break;case"SLAKOTH":case 287:m.pokemon_id=287;break;case"VIGOROTH":case 288:m.pokemon_id=288;break;case"SLAKING":case 289:m.pokemon_id=289;break;case"NINCADA":case 290:m.pokemon_id=290;break;case"NINJASK":case 291:m.pokemon_id=291;break;case"SHEDINJA":case 292:m.pokemon_id=292;break;case"WHISMUR":case 293:m.pokemon_id=293;break;case"LOUDRED":case 294:m.pokemon_id=294;break;case"EXPLOUD":case 295:m.pokemon_id=295;break;case"MAKUHITA":case 296:m.pokemon_id=296;break;case"HARIYAMA":case 297:m.pokemon_id=297;break;case"AZURILL":case 298:m.pokemon_id=298;break;case"NOSEPASS":case 299:m.pokemon_id=299;break;case"SKITTY":case 300:m.pokemon_id=300;break;case"DELCATTY":case 301:m.pokemon_id=301;break;case"SABLEYE":case 302:m.pokemon_id=302;break;case"MAWILE":case 303:m.pokemon_id=303;break;case"ARON":case 304:m.pokemon_id=304;break;case"LAIRON":case 305:m.pokemon_id=305;break;case"AGGRON":case 306:m.pokemon_id=306;break;case"MEDITITE":case 307:m.pokemon_id=307;break;case"MEDICHAM":case 308:m.pokemon_id=308;break;case"ELECTRIKE":case 309:m.pokemon_id=309;break;case"MANECTRIC":case 310:m.pokemon_id=310;break;case"PLUSLE":case 311:m.pokemon_id=311;break;case"MINUN":case 312:m.pokemon_id=312;break;case"VOLBEAT":case 313:m.pokemon_id=313;break;case"ILLUMISE":case 314:m.pokemon_id=314;break;case"ROSELIA":case 315:m.pokemon_id=315;break;case"GULPIN":case 316:m.pokemon_id=316;break;case"SWALOT":case 317:m.pokemon_id=317;break;case"CARVANHA":case 318:m.pokemon_id=318;break;case"SHARPEDO":case 319:m.pokemon_id=319;break;case"WAILMER":case 320:m.pokemon_id=320;break;case"WAILORD":case 321:m.pokemon_id=321;break;case"NUMEL":case 322:m.pokemon_id=322;break;case"CAMERUPT":case 323:m.pokemon_id=323;break;case"TORKOAL":case 324:m.pokemon_id=324;break;case"SPOINK":case 325:m.pokemon_id=325;break;case"GRUMPIG":case 326:m.pokemon_id=326;break;case"SPINDA":case 327:m.pokemon_id=327;break;case"TRAPINCH":case 328:m.pokemon_id=328;break;case"VIBRAVA":case 329:m.pokemon_id=329;break;case"FLYGON":case 330:m.pokemon_id=330;break;case"CACNEA":case 331:m.pokemon_id=331;break;case"CACTURNE":case 332:m.pokemon_id=332;break;case"SWABLU":case 333:m.pokemon_id=333;break;case"ALTARIA":case 334:m.pokemon_id=334;break;case"ZANGOOSE":case 335:m.pokemon_id=335;break;case"SEVIPER":case 336:m.pokemon_id=336;break;case"LUNATONE":case 337:m.pokemon_id=337;break;case"SOLROCK":case 338:m.pokemon_id=338;break;case"BARBOACH":case 339:m.pokemon_id=339;break;case"WHISCASH":case 340:m.pokemon_id=340;break;case"CORPHISH":case 341:m.pokemon_id=341;break;case"CRAWDAUNT":case 342:m.pokemon_id=342;break;case"BALTOY":case 343:m.pokemon_id=343;break;case"CLAYDOL":case 344:m.pokemon_id=344;break;case"LILEEP":case 345:m.pokemon_id=345;break;case"CRADILY":case 346:m.pokemon_id=346;break;case"ANORITH":case 347:m.pokemon_id=347;break;case"ARMALDO":case 348:m.pokemon_id=348;break;case"FEEBAS":case 349:m.pokemon_id=349;break;case"MILOTIC":case 350:m.pokemon_id=350;break;case"CASTFORM":case 351:m.pokemon_id=351;break;case"KECLEON":case 352:m.pokemon_id=352;break;case"SHUPPET":case 353:m.pokemon_id=353;break;case"BANETTE":case 354:m.pokemon_id=354;break;case"DUSKULL":case 355:m.pokemon_id=355;break;case"DUSCLOPS":case 356:m.pokemon_id=356;break;case"TROPIUS":case 357:m.pokemon_id=357;break;case"CHIMECHO":case 358:m.pokemon_id=358;break;case"ABSOL":case 359:m.pokemon_id=359;break;case"WYNAUT":case 360:m.pokemon_id=360;break;case"SNORUNT":case 361:m.pokemon_id=361;break;case"GLALIE":case 362:m.pokemon_id=362;break;case"SPHEAL":case 363:m.pokemon_id=363;break;case"SEALEO":case 364:m.pokemon_id=364;break;case"WALREIN":case 365:m.pokemon_id=365;break;case"CLAMPERL":case 366:m.pokemon_id=366;break;case"HUNTAIL":case 367:m.pokemon_id=367;break;case"GOREBYSS":case 368:m.pokemon_id=368;break;case"RELICANTH":case 369:m.pokemon_id=369;break;case"LUVDISC":case 370:m.pokemon_id=370;break;case"BAGON":case 371:m.pokemon_id=371;break;case"SHELGON":case 372:m.pokemon_id=372;break;case"SALAMENCE":case 373:m.pokemon_id=373;break;case"BELDUM":case 374:m.pokemon_id=374;break;case"METANG":case 375:m.pokemon_id=375;break;case"METAGROSS":case 376:m.pokemon_id=376;break;case"REGIROCK":case 377:m.pokemon_id=377;break;case"REGICE":case 378:m.pokemon_id=378;break;case"REGISTEEL":case 379:m.pokemon_id=379;break;case"LATIAS":case 380:m.pokemon_id=380;break;case"LATIOS":case 381:m.pokemon_id=381;break;case"KYOGRE":case 382:m.pokemon_id=382;break;case"GROUDON":case 383:m.pokemon_id=383;break;case"RAYQUAZA":case 384:m.pokemon_id=384;break;case"JIRACHI":case 385:m.pokemon_id=385;break;case"DEOXYS":case 386:m.pokemon_id=386;break;case"TURTWIG":case 387:m.pokemon_id=387;break;case"GROTLE":case 388:m.pokemon_id=388;break;case"TORTERRA":case 389:m.pokemon_id=389;break;case"CHIMCHAR":case 390:m.pokemon_id=390;break;case"MONFERNO":case 391:m.pokemon_id=391;break;case"INFERNAPE":case 392:m.pokemon_id=392;break;case"PIPLUP":case 393:m.pokemon_id=393;break;case"PRINPLUP":case 394:m.pokemon_id=394;break;case"EMPOLEON":case 395:m.pokemon_id=395;break;case"STARLY":case 396:m.pokemon_id=396;break;case"STARAVIA":case 397:m.pokemon_id=397;break;case"STARAPTOR":case 398:m.pokemon_id=398;break;case"BIDOOF":case 399:m.pokemon_id=399;break;case"BIBAREL":case 400:m.pokemon_id=400;break;case"KRICKETOT":case 401:m.pokemon_id=401;break;case"KRICKETUNE":case 402:m.pokemon_id=402;break;case"SHINX":case 403:m.pokemon_id=403;break;case"LUXIO":case 404:m.pokemon_id=404;break;case"LUXRAY":case 405:m.pokemon_id=405;break;case"BUDEW":case 406:m.pokemon_id=406;break;case"ROSERADE":case 407:m.pokemon_id=407;break;case"CRANIDOS":case 408:m.pokemon_id=408;break;case"RAMPARDOS":case 409:m.pokemon_id=409;break;case"SHIELDON":case 410:m.pokemon_id=410;break;case"BASTIODON":case 411:m.pokemon_id=411;break;case"BURMY":case 412:m.pokemon_id=412;break;case"WORMADAM":case 413:m.pokemon_id=413;break;case"MOTHIM":case 414:m.pokemon_id=414;break;case"COMBEE":case 415:m.pokemon_id=415;break;case"VESPIQUEN":case 416:m.pokemon_id=416;break;case"PACHIRISU":case 417:m.pokemon_id=417;break;case"BUIZEL":case 418:m.pokemon_id=418;break;case"FLOATZEL":case 419:m.pokemon_id=419;break;case"CHERUBI":case 420:m.pokemon_id=420;break;case"CHERRIM":case 421:m.pokemon_id=421;break;case"SHELLOS":case 422:m.pokemon_id=422;break;case"GASTRODON":case 423:m.pokemon_id=423;break;case"AMBIPOM":case 424:m.pokemon_id=424;break;case"DRIFLOON":case 425:m.pokemon_id=425;break;case"DRIFBLIM":case 426:m.pokemon_id=426;break;case"BUNEARY":case 427:m.pokemon_id=427;break;case"LOPUNNY":case 428:m.pokemon_id=428;break;case"MISMAGIUS":case 429:m.pokemon_id=429;break;case"HONCHKROW":case 430:m.pokemon_id=430;break;case"GLAMEOW":case 431:m.pokemon_id=431;break;case"PURUGLY":case 432:m.pokemon_id=432;break;case"CHINGLING":case 433:m.pokemon_id=433;break;case"STUNKY":case 434:m.pokemon_id=434;break;case"SKUNTANK":case 435:m.pokemon_id=435;break;case"BRONZOR":case 436:m.pokemon_id=436;break;case"BRONZONG":case 437:m.pokemon_id=437;break;case"BONSLY":case 438:m.pokemon_id=438;break;case"MIME_JR":case 439:m.pokemon_id=439;break;case"HAPPINY":case 440:m.pokemon_id=440;break;case"CHATOT":case 441:m.pokemon_id=441;break;case"SPIRITOMB":case 442:m.pokemon_id=442;break;case"GIBLE":case 443:m.pokemon_id=443;break;case"GABITE":case 444:m.pokemon_id=444;break;case"GARCHOMP":case 445:m.pokemon_id=445;break;case"MUNCHLAX":case 446:m.pokemon_id=446;break;case"RIOLU":case 447:m.pokemon_id=447;break;case"LUCARIO":case 448:m.pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.pokemon_id=449;break;case"HIPPOWDON":case 450:m.pokemon_id=450;break;case"SKORUPI":case 451:m.pokemon_id=451;break;case"DRAPION":case 452:m.pokemon_id=452;break;case"CROAGUNK":case 453:m.pokemon_id=453;break;case"TOXICROAK":case 454:m.pokemon_id=454;break;case"CARNIVINE":case 455:m.pokemon_id=455;break;case"FINNEON":case 456:m.pokemon_id=456;break;case"LUMINEON":case 457:m.pokemon_id=457;break;case"MANTYKE":case 458:m.pokemon_id=458;break;case"SNOVER":case 459:m.pokemon_id=459;break;case"ABOMASNOW":case 460:m.pokemon_id=460;break;case"WEAVILE":case 461:m.pokemon_id=461;break;case"MAGNEZONE":case 462:m.pokemon_id=462;break;case"LICKILICKY":case 463:m.pokemon_id=463;break;case"RHYPERIOR":case 464:m.pokemon_id=464;break;case"TANGROWTH":case 465:m.pokemon_id=465;break;case"ELECTIVIRE":case 466:m.pokemon_id=466;break;case"MAGMORTAR":case 467:m.pokemon_id=467;break;case"TOGEKISS":case 468:m.pokemon_id=468;break;case"YANMEGA":case 469:m.pokemon_id=469;break;case"LEAFEON":case 470:m.pokemon_id=470;break;case"GLACEON":case 471:m.pokemon_id=471;break;case"GLISCOR":case 472:m.pokemon_id=472;break;case"MAMOSWINE":case 473:m.pokemon_id=473;break;case"PORYGON_Z":case 474:m.pokemon_id=474;break;case"GALLADE":case 475:m.pokemon_id=475;break;case"PROBOPASS":case 476:m.pokemon_id=476;break;case"DUSKNOIR":case 477:m.pokemon_id=477;break;case"FROSLASS":case 478:m.pokemon_id=478;break;case"ROTOM":case 479:m.pokemon_id=479;break;case"UXIE":case 480:m.pokemon_id=480;break;case"MESPRIT":case 481:m.pokemon_id=481;break;case"AZELF":case 482:m.pokemon_id=482;break;case"DIALGA":case 483:m.pokemon_id=483;break;case"PALKIA":case 484:m.pokemon_id=484;break;case"HEATRAN":case 485:m.pokemon_id=485;break;case"REGIGIGAS":case 486:m.pokemon_id=486;break;case"GIRATINA":case 487:m.pokemon_id=487;break;case"CRESSELIA":case 488:m.pokemon_id=488;break;case"PHIONE":case 489:m.pokemon_id=489;break;case"MANAPHY":case 490:m.pokemon_id=490;break;case"DARKRAI":case 491:m.pokemon_id=491;break;case"SHAYMIN":case 492:m.pokemon_id=492;break;case"ARCEUS":case 493:m.pokemon_id=493;break;case"MELTAN":case 808:m.pokemon_id=808;break;case"MELMETAL":case 809:m.pokemon_id=809;break}if(d.distance_in_meters!=null){m.distance_in_meters=Number(d.distance_in_meters)}if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=false;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber()}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.fort_image_url!=null){m.fort_image_url=String(d.fort_image_url)}if(d.pokemon_display!=null){if(typeof d.pokemon_display!=="object")throw TypeError(".POGOProtos.Map.Pokemon.NearbyPokemon.pokemon_display: object expected");m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.pokemon_display)}return m};NearbyPokemon.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon_id=o.enums===String?"MISSINGNO":0;d.distance_in_meters=0;if($util.Long){var n=new $util.Long(0,0,false);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0;d.fort_id="";d.fort_image_url="";d.pokemon_display=null}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){d.pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_id]:m.pokemon_id}if(m.distance_in_meters!=null&&m.hasOwnProperty("distance_in_meters")){d.distance_in_meters=o.json&&!isFinite(m.distance_in_meters)?String(m.distance_in_meters):m.distance_in_meters}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber():m.encounter_id}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.fort_image_url!=null&&m.hasOwnProperty("fort_image_url")){d.fort_image_url=m.fort_image_url}if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display")){d.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.toObject(m.pokemon_display,o)}return d};NearbyPokemon.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return NearbyPokemon}();Pokemon.WildPokemon=function(){function WildPokemon(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WildPokemon.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,false):0;WildPokemon.prototype.last_modified_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;WildPokemon.prototype.latitude=0;WildPokemon.prototype.longitude=0;WildPokemon.prototype.spawn_point_id="";WildPokemon.prototype.pokemon_data=null;WildPokemon.prototype.time_till_hidden_ms=0;WildPokemon.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(9).fixed64(m.encounter_id);if(m.last_modified_timestamp_ms!=null&&m.hasOwnProperty("last_modified_timestamp_ms"))w.uint32(16).int64(m.last_modified_timestamp_ms);if(m.latitude!=null&&m.hasOwnProperty("latitude"))w.uint32(25).double(m.latitude);if(m.longitude!=null&&m.hasOwnProperty("longitude"))w.uint32(33).double(m.longitude);if(m.spawn_point_id!=null&&m.hasOwnProperty("spawn_point_id"))w.uint32(42).string(m.spawn_point_id);if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data"))$root.POGOProtos.Data.PokemonData.encode(m.pokemon_data,w.uint32(58).fork()).ldelim();if(m.time_till_hidden_ms!=null&&m.hasOwnProperty("time_till_hidden_ms"))w.uint32(88).int32(m.time_till_hidden_ms);return w};WildPokemon.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.Pokemon.WildPokemon;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.encounter_id=r.fixed64();break;case 2:m.last_modified_timestamp_ms=r.int64();break;case 3:m.latitude=r.double();break;case 4:m.longitude=r.double();break;case 5:m.spawn_point_id=r.string();break;case 7:m.pokemon_data=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 11:m.time_till_hidden_ms=r.int32();break;default:r.skipType(t&7);break}}return m};WildPokemon.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.Pokemon.WildPokemon)return d;var m=new $root.POGOProtos.Map.Pokemon.WildPokemon;if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=false;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber()}if(d.last_modified_timestamp_ms!=null){if($util.Long)(m.last_modified_timestamp_ms=$util.Long.fromValue(d.last_modified_timestamp_ms)).unsigned=false;else if(typeof d.last_modified_timestamp_ms==="string")m.last_modified_timestamp_ms=parseInt(d.last_modified_timestamp_ms,10);else if(typeof d.last_modified_timestamp_ms==="number")m.last_modified_timestamp_ms=d.last_modified_timestamp_ms;else if(typeof d.last_modified_timestamp_ms==="object")m.last_modified_timestamp_ms=new $util.LongBits(d.last_modified_timestamp_ms.low>>>0,d.last_modified_timestamp_ms.high>>>0).toNumber()}if(d.latitude!=null){m.latitude=Number(d.latitude)}if(d.longitude!=null){m.longitude=Number(d.longitude)}if(d.spawn_point_id!=null){m.spawn_point_id=String(d.spawn_point_id)}if(d.pokemon_data!=null){if(typeof d.pokemon_data!=="object")throw TypeError(".POGOProtos.Map.Pokemon.WildPokemon.pokemon_data: object expected");m.pokemon_data=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon_data)}if(d.time_till_hidden_ms!=null){m.time_till_hidden_ms=d.time_till_hidden_ms|0}return m};WildPokemon.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.last_modified_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.last_modified_timestamp_ms=o.longs===String?"0":0;d.latitude=0;d.longitude=0;d.spawn_point_id="";d.pokemon_data=null;d.time_till_hidden_ms=0}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber():m.encounter_id}if(m.last_modified_timestamp_ms!=null&&m.hasOwnProperty("last_modified_timestamp_ms")){if(typeof m.last_modified_timestamp_ms==="number")d.last_modified_timestamp_ms=o.longs===String?String(m.last_modified_timestamp_ms):m.last_modified_timestamp_ms;else d.last_modified_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.last_modified_timestamp_ms):o.longs===Number?new $util.LongBits(m.last_modified_timestamp_ms.low>>>0,m.last_modified_timestamp_ms.high>>>0).toNumber():m.last_modified_timestamp_ms}if(m.latitude!=null&&m.hasOwnProperty("latitude")){d.latitude=o.json&&!isFinite(m.latitude)?String(m.latitude):m.latitude}if(m.longitude!=null&&m.hasOwnProperty("longitude")){d.longitude=o.json&&!isFinite(m.longitude)?String(m.longitude):m.longitude}if(m.spawn_point_id!=null&&m.hasOwnProperty("spawn_point_id")){d.spawn_point_id=m.spawn_point_id}if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data")){d.pokemon_data=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon_data,o)}if(m.time_till_hidden_ms!=null&&m.hasOwnProperty("time_till_hidden_ms")){d.time_till_hidden_ms=m.time_till_hidden_ms}return d};WildPokemon.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WildPokemon}();return Pokemon}();Map.SpawnPoint=function(){function SpawnPoint(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SpawnPoint.prototype.latitude=0;SpawnPoint.prototype.longitude=0;SpawnPoint.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.latitude!=null&&m.hasOwnProperty("latitude"))w.uint32(17).double(m.latitude);if(m.longitude!=null&&m.hasOwnProperty("longitude"))w.uint32(25).double(m.longitude);return w};SpawnPoint.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.SpawnPoint;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 2:m.latitude=r.double();break;case 3:m.longitude=r.double();break;default:r.skipType(t&7);break}}return m};SpawnPoint.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.SpawnPoint)return d;var m=new $root.POGOProtos.Map.SpawnPoint;if(d.latitude!=null){m.latitude=Number(d.latitude)}if(d.longitude!=null){m.longitude=Number(d.longitude)}return m};SpawnPoint.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.latitude=0;d.longitude=0}if(m.latitude!=null&&m.hasOwnProperty("latitude")){d.latitude=o.json&&!isFinite(m.latitude)?String(m.latitude):m.latitude}if(m.longitude!=null&&m.hasOwnProperty("longitude")){d.longitude=o.json&&!isFinite(m.longitude)?String(m.longitude):m.longitude}return d};SpawnPoint.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SpawnPoint}();Map.Weather=function(){var Weather={};Weather.ClientWeather=function(){function ClientWeather(p){this.alerts=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ClientWeather.prototype.s2_cell_id=$util.Long?$util.Long.fromBits(0,0,false):0;ClientWeather.prototype.display_weather=null;ClientWeather.prototype.gameplay_weather=null;ClientWeather.prototype.alerts=$util.emptyArray;ClientWeather.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.s2_cell_id!=null&&m.hasOwnProperty("s2_cell_id"))w.uint32(8).int64(m.s2_cell_id);if(m.display_weather!=null&&m.hasOwnProperty("display_weather"))$root.POGOProtos.Map.Weather.DisplayWeather.encode(m.display_weather,w.uint32(18).fork()).ldelim();if(m.gameplay_weather!=null&&m.hasOwnProperty("gameplay_weather"))$root.POGOProtos.Map.Weather.GameplayWeather.encode(m.gameplay_weather,w.uint32(26).fork()).ldelim();if(m.alerts!=null&&m.alerts.length){for(var i=0;i<m.alerts.length;++i)$root.POGOProtos.Map.Weather.WeatherAlert.encode(m.alerts[i],w.uint32(34).fork()).ldelim()}return w};ClientWeather.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.Weather.ClientWeather;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.s2_cell_id=r.int64();break;case 2:m.display_weather=$root.POGOProtos.Map.Weather.DisplayWeather.decode(r,r.uint32());break;case 3:m.gameplay_weather=$root.POGOProtos.Map.Weather.GameplayWeather.decode(r,r.uint32());break;case 4:if(!(m.alerts&&m.alerts.length))m.alerts=[];m.alerts.push($root.POGOProtos.Map.Weather.WeatherAlert.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};ClientWeather.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.Weather.ClientWeather)return d;var m=new $root.POGOProtos.Map.Weather.ClientWeather;if(d.s2_cell_id!=null){if($util.Long)(m.s2_cell_id=$util.Long.fromValue(d.s2_cell_id)).unsigned=false;else if(typeof d.s2_cell_id==="string")m.s2_cell_id=parseInt(d.s2_cell_id,10);else if(typeof d.s2_cell_id==="number")m.s2_cell_id=d.s2_cell_id;else if(typeof d.s2_cell_id==="object")m.s2_cell_id=new $util.LongBits(d.s2_cell_id.low>>>0,d.s2_cell_id.high>>>0).toNumber()}if(d.display_weather!=null){if(typeof d.display_weather!=="object")throw TypeError(".POGOProtos.Map.Weather.ClientWeather.display_weather: object expected");m.display_weather=$root.POGOProtos.Map.Weather.DisplayWeather.fromObject(d.display_weather)}if(d.gameplay_weather!=null){if(typeof d.gameplay_weather!=="object")throw TypeError(".POGOProtos.Map.Weather.ClientWeather.gameplay_weather: object expected");m.gameplay_weather=$root.POGOProtos.Map.Weather.GameplayWeather.fromObject(d.gameplay_weather)}if(d.alerts){if(!Array.isArray(d.alerts))throw TypeError(".POGOProtos.Map.Weather.ClientWeather.alerts: array expected");m.alerts=[];for(var i=0;i<d.alerts.length;++i){if(typeof d.alerts[i]!=="object")throw TypeError(".POGOProtos.Map.Weather.ClientWeather.alerts: object expected");m.alerts[i]=$root.POGOProtos.Map.Weather.WeatherAlert.fromObject(d.alerts[i])}}return m};ClientWeather.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.alerts=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.s2_cell_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.s2_cell_id=o.longs===String?"0":0;d.display_weather=null;d.gameplay_weather=null}if(m.s2_cell_id!=null&&m.hasOwnProperty("s2_cell_id")){if(typeof m.s2_cell_id==="number")d.s2_cell_id=o.longs===String?String(m.s2_cell_id):m.s2_cell_id;else d.s2_cell_id=o.longs===String?$util.Long.prototype.toString.call(m.s2_cell_id):o.longs===Number?new $util.LongBits(m.s2_cell_id.low>>>0,m.s2_cell_id.high>>>0).toNumber():m.s2_cell_id}if(m.display_weather!=null&&m.hasOwnProperty("display_weather")){d.display_weather=$root.POGOProtos.Map.Weather.DisplayWeather.toObject(m.display_weather,o)}if(m.gameplay_weather!=null&&m.hasOwnProperty("gameplay_weather")){d.gameplay_weather=$root.POGOProtos.Map.Weather.GameplayWeather.toObject(m.gameplay_weather,o)}if(m.alerts&&m.alerts.length){d.alerts=[];for(var j=0;j<m.alerts.length;++j){d.alerts[j]=$root.POGOProtos.Map.Weather.WeatherAlert.toObject(m.alerts[j],o)}}return d};ClientWeather.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ClientWeather}();Weather.DisplayWeather=function(){function DisplayWeather(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DisplayWeather.prototype.cloud_level=0;DisplayWeather.prototype.rain_level=0;DisplayWeather.prototype.wind_level=0;DisplayWeather.prototype.snow_level=0;DisplayWeather.prototype.fog_level=0;DisplayWeather.prototype.wind_direction=0;DisplayWeather.prototype.special_effect_level=0;DisplayWeather.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.cloud_level!=null&&m.hasOwnProperty("cloud_level"))w.uint32(8).int32(m.cloud_level);if(m.rain_level!=null&&m.hasOwnProperty("rain_level"))w.uint32(16).int32(m.rain_level);if(m.wind_level!=null&&m.hasOwnProperty("wind_level"))w.uint32(24).int32(m.wind_level);if(m.snow_level!=null&&m.hasOwnProperty("snow_level"))w.uint32(32).int32(m.snow_level);if(m.fog_level!=null&&m.hasOwnProperty("fog_level"))w.uint32(40).int32(m.fog_level);if(m.wind_direction!=null&&m.hasOwnProperty("wind_direction"))w.uint32(48).int32(m.wind_direction);if(m.special_effect_level!=null&&m.hasOwnProperty("special_effect_level"))w.uint32(56).int32(m.special_effect_level);return w};DisplayWeather.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.Weather.DisplayWeather;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.cloud_level=r.int32();break;case 2:m.rain_level=r.int32();break;case 3:m.wind_level=r.int32();break;case 4:m.snow_level=r.int32();break;case 5:m.fog_level=r.int32();break;case 6:m.wind_direction=r.int32();break;case 7:m.special_effect_level=r.int32();break;default:r.skipType(t&7);break}}return m};DisplayWeather.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.Weather.DisplayWeather)return d;var m=new $root.POGOProtos.Map.Weather.DisplayWeather;switch(d.cloud_level){case"LEVEL_0":case 0:m.cloud_level=0;break;case"LEVEL_1":case 1:m.cloud_level=1;break;case"LEVEL_2":case 2:m.cloud_level=2;break;case"LEVEL_3":case 3:m.cloud_level=3;break}switch(d.rain_level){case"LEVEL_0":case 0:m.rain_level=0;break;case"LEVEL_1":case 1:m.rain_level=1;break;case"LEVEL_2":case 2:m.rain_level=2;break;case"LEVEL_3":case 3:m.rain_level=3;break}switch(d.wind_level){case"LEVEL_0":case 0:m.wind_level=0;break;case"LEVEL_1":case 1:m.wind_level=1;break;case"LEVEL_2":case 2:m.wind_level=2;break;case"LEVEL_3":case 3:m.wind_level=3;break}switch(d.snow_level){case"LEVEL_0":case 0:m.snow_level=0;break;case"LEVEL_1":case 1:m.snow_level=1;break;case"LEVEL_2":case 2:m.snow_level=2;break;case"LEVEL_3":case 3:m.snow_level=3;break}switch(d.fog_level){case"LEVEL_0":case 0:m.fog_level=0;break;case"LEVEL_1":case 1:m.fog_level=1;break;case"LEVEL_2":case 2:m.fog_level=2;break;case"LEVEL_3":case 3:m.fog_level=3;break}if(d.wind_direction!=null){m.wind_direction=d.wind_direction|0}switch(d.special_effect_level){case"LEVEL_0":case 0:m.special_effect_level=0;break;case"LEVEL_1":case 1:m.special_effect_level=1;break;case"LEVEL_2":case 2:m.special_effect_level=2;break;case"LEVEL_3":case 3:m.special_effect_level=3;break}return m};DisplayWeather.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.cloud_level=o.enums===String?"LEVEL_0":0;d.rain_level=o.enums===String?"LEVEL_0":0;d.wind_level=o.enums===String?"LEVEL_0":0;d.snow_level=o.enums===String?"LEVEL_0":0;d.fog_level=o.enums===String?"LEVEL_0":0;d.wind_direction=0;d.special_effect_level=o.enums===String?"LEVEL_0":0}if(m.cloud_level!=null&&m.hasOwnProperty("cloud_level")){d.cloud_level=o.enums===String?$root.POGOProtos.Map.Weather.DisplayWeather.DisplayLevel[m.cloud_level]:m.cloud_level}if(m.rain_level!=null&&m.hasOwnProperty("rain_level")){d.rain_level=o.enums===String?$root.POGOProtos.Map.Weather.DisplayWeather.DisplayLevel[m.rain_level]:m.rain_level}if(m.wind_level!=null&&m.hasOwnProperty("wind_level")){d.wind_level=o.enums===String?$root.POGOProtos.Map.Weather.DisplayWeather.DisplayLevel[m.wind_level]:m.wind_level}if(m.snow_level!=null&&m.hasOwnProperty("snow_level")){d.snow_level=o.enums===String?$root.POGOProtos.Map.Weather.DisplayWeather.DisplayLevel[m.snow_level]:m.snow_level}if(m.fog_level!=null&&m.hasOwnProperty("fog_level")){d.fog_level=o.enums===String?$root.POGOProtos.Map.Weather.DisplayWeather.DisplayLevel[m.fog_level]:m.fog_level}if(m.wind_direction!=null&&m.hasOwnProperty("wind_direction")){d.wind_direction=m.wind_direction}if(m.special_effect_level!=null&&m.hasOwnProperty("special_effect_level")){d.special_effect_level=o.enums===String?$root.POGOProtos.Map.Weather.DisplayWeather.DisplayLevel[m.special_effect_level]:m.special_effect_level}return d};DisplayWeather.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DisplayWeather.DisplayLevel=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="LEVEL_0"]=0;values[valuesById[1]="LEVEL_1"]=1;values[valuesById[2]="LEVEL_2"]=2;values[valuesById[3]="LEVEL_3"]=3;return values}();return DisplayWeather}();Weather.GameplayWeather=function(){function GameplayWeather(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GameplayWeather.prototype.gameplay_condition=0;GameplayWeather.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gameplay_condition!=null&&m.hasOwnProperty("gameplay_condition"))w.uint32(8).int32(m.gameplay_condition);return w};GameplayWeather.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.Weather.GameplayWeather;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gameplay_condition=r.int32();break;default:r.skipType(t&7);break}}return m};GameplayWeather.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.Weather.GameplayWeather)return d;var m=new $root.POGOProtos.Map.Weather.GameplayWeather;switch(d.gameplay_condition){case"NONE":case 0:m.gameplay_condition=0;break;case"CLEAR":case 1:m.gameplay_condition=1;break;case"RAINY":case 2:m.gameplay_condition=2;break;case"PARTLY_CLOUDY":case 3:m.gameplay_condition=3;break;case"OVERCAST":case 4:m.gameplay_condition=4;break;case"WINDY":case 5:m.gameplay_condition=5;break;case"SNOW":case 6:m.gameplay_condition=6;break;case"FOG":case 7:m.gameplay_condition=7;break}return m};GameplayWeather.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.gameplay_condition=o.enums===String?"NONE":0}if(m.gameplay_condition!=null&&m.hasOwnProperty("gameplay_condition")){d.gameplay_condition=o.enums===String?$root.POGOProtos.Map.Weather.GameplayWeather.WeatherCondition[m.gameplay_condition]:m.gameplay_condition}return d};GameplayWeather.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GameplayWeather.WeatherCondition=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NONE"]=0;values[valuesById[1]="CLEAR"]=1;values[valuesById[2]="RAINY"]=2;values[valuesById[3]="PARTLY_CLOUDY"]=3;values[valuesById[4]="OVERCAST"]=4;values[valuesById[5]="WINDY"]=5;values[valuesById[6]="SNOW"]=6;values[valuesById[7]="FOG"]=7;return values}();return GameplayWeather}();Weather.WeatherAlert=function(){function WeatherAlert(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WeatherAlert.prototype.severity=0;WeatherAlert.prototype.warn_weather=false;WeatherAlert.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.severity!=null&&m.hasOwnProperty("severity"))w.uint32(8).int32(m.severity);if(m.warn_weather!=null&&m.hasOwnProperty("warn_weather"))w.uint32(16).bool(m.warn_weather);return w};WeatherAlert.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Map.Weather.WeatherAlert;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.severity=r.int32();break;case 2:m.warn_weather=r.bool();break;default:r.skipType(t&7);break}}return m};WeatherAlert.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Map.Weather.WeatherAlert)return d;var m=new $root.POGOProtos.Map.Weather.WeatherAlert;switch(d.severity){case"NONE":case 0:m.severity=0;break;case"MODERATE":case 1:m.severity=1;break;case"EXTREME":case 2:m.severity=2;break}if(d.warn_weather!=null){m.warn_weather=Boolean(d.warn_weather)}return m};WeatherAlert.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.severity=o.enums===String?"NONE":0;d.warn_weather=false}if(m.severity!=null&&m.hasOwnProperty("severity")){d.severity=o.enums===String?$root.POGOProtos.Map.Weather.WeatherAlert.Severity[m.severity]:m.severity}if(m.warn_weather!=null&&m.hasOwnProperty("warn_weather")){d.warn_weather=m.warn_weather}return d};WeatherAlert.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};WeatherAlert.Severity=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NONE"]=0;values[valuesById[1]="MODERATE"]=1;values[valuesById[2]="EXTREME"]=2;return values}();return WeatherAlert}();return Weather}();return Map}();POGOProtos.Networking=function(){var Networking={};Networking.Envelopes=function(){var Envelopes={};Envelopes.AuthInfo=function(){function AuthInfo(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AuthInfo.prototype.provider="";AuthInfo.prototype.token=null;AuthInfo.prototype.options=null;AuthInfo.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.provider!=null&&m.hasOwnProperty("provider"))w.uint32(10).string(m.provider);if(m.token!=null&&m.hasOwnProperty("token"))$root.POGOProtos.Networking.Envelopes.AuthInfo.JWT.encode(m.token,w.uint32(18).fork()).ldelim();if(m.options!=null&&m.hasOwnProperty("options"))$root.POGOProtos.Networking.Envelopes.AuthInfo.AuthOptions.encode(m.options,w.uint32(26).fork()).ldelim();return w};AuthInfo.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Envelopes.AuthInfo;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.provider=r.string();break;case 2:m.token=$root.POGOProtos.Networking.Envelopes.AuthInfo.JWT.decode(r,r.uint32());break;case 3:m.options=$root.POGOProtos.Networking.Envelopes.AuthInfo.AuthOptions.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};AuthInfo.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Envelopes.AuthInfo)return d;var m=new $root.POGOProtos.Networking.Envelopes.AuthInfo;if(d.provider!=null){m.provider=String(d.provider)}if(d.token!=null){if(typeof d.token!=="object")throw TypeError(".POGOProtos.Networking.Envelopes.AuthInfo.token: object expected");m.token=$root.POGOProtos.Networking.Envelopes.AuthInfo.JWT.fromObject(d.token)}if(d.options!=null){if(typeof d.options!=="object")throw TypeError(".POGOProtos.Networking.Envelopes.AuthInfo.options: object expected");m.options=$root.POGOProtos.Networking.Envelopes.AuthInfo.AuthOptions.fromObject(d.options)}return m};AuthInfo.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.provider="";d.token=null;d.options=null}if(m.provider!=null&&m.hasOwnProperty("provider")){d.provider=m.provider}if(m.token!=null&&m.hasOwnProperty("token")){d.token=$root.POGOProtos.Networking.Envelopes.AuthInfo.JWT.toObject(m.token,o)}if(m.options!=null&&m.hasOwnProperty("options")){d.options=$root.POGOProtos.Networking.Envelopes.AuthInfo.AuthOptions.toObject(m.options,o)}return d};AuthInfo.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AuthInfo.JWT=function(){function JWT(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}JWT.prototype.contents="";JWT.prototype.unknown2=0;JWT.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.contents!=null&&m.hasOwnProperty("contents"))w.uint32(10).string(m.contents);if(m.unknown2!=null&&m.hasOwnProperty("unknown2"))w.uint32(16).int32(m.unknown2);return w};JWT.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Envelopes.AuthInfo.JWT;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.contents=r.string();break;case 2:m.unknown2=r.int32();break;default:r.skipType(t&7);break}}return m};JWT.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Envelopes.AuthInfo.JWT)return d;var m=new $root.POGOProtos.Networking.Envelopes.AuthInfo.JWT;if(d.contents!=null){m.contents=String(d.contents)}if(d.unknown2!=null){m.unknown2=d.unknown2|0}return m};JWT.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.contents="";d.unknown2=0}if(m.contents!=null&&m.hasOwnProperty("contents")){d.contents=m.contents}if(m.unknown2!=null&&m.hasOwnProperty("unknown2")){d.unknown2=m.unknown2}return d};JWT.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return JWT}();AuthInfo.AuthOptions=function(){function AuthOptions(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AuthOptions.prototype.prevent_account_creation=false;AuthOptions.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.prevent_account_creation!=null&&m.hasOwnProperty("prevent_account_creation"))w.uint32(8).bool(m.prevent_account_creation);return w};AuthOptions.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Envelopes.AuthInfo.AuthOptions;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.prevent_account_creation=r.bool();break;default:r.skipType(t&7);break}}return m};AuthOptions.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Envelopes.AuthInfo.AuthOptions)return d;var m=new $root.POGOProtos.Networking.Envelopes.AuthInfo.AuthOptions;if(d.prevent_account_creation!=null){m.prevent_account_creation=Boolean(d.prevent_account_creation)}return m};AuthOptions.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.prevent_account_creation=false}if(m.prevent_account_creation!=null&&m.hasOwnProperty("prevent_account_creation")){d.prevent_account_creation=m.prevent_account_creation}return d};AuthOptions.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AuthOptions}();return AuthInfo}();Envelopes.AuthTicket=function(){function AuthTicket(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AuthTicket.prototype.start=$util.newBuffer([]);AuthTicket.prototype.expire_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,true):0;AuthTicket.prototype.end=$util.newBuffer([]);AuthTicket.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.start!=null&&m.hasOwnProperty("start"))w.uint32(10).bytes(m.start);if(m.expire_timestamp_ms!=null&&m.hasOwnProperty("expire_timestamp_ms"))w.uint32(16).uint64(m.expire_timestamp_ms);if(m.end!=null&&m.hasOwnProperty("end"))w.uint32(26).bytes(m.end);return w};AuthTicket.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Envelopes.AuthTicket;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.start=r.bytes();break;case 2:m.expire_timestamp_ms=r.uint64();break;case 3:m.end=r.bytes();break;default:r.skipType(t&7);break}}return m};AuthTicket.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Envelopes.AuthTicket)return d;var m=new $root.POGOProtos.Networking.Envelopes.AuthTicket;if(d.start!=null){if(typeof d.start==="string")$util.base64.decode(d.start,m.start=$util.newBuffer($util.base64.length(d.start)),0);else if(d.start.length)m.start=d.start}if(d.expire_timestamp_ms!=null){if($util.Long)(m.expire_timestamp_ms=$util.Long.fromValue(d.expire_timestamp_ms)).unsigned=true;else if(typeof d.expire_timestamp_ms==="string")m.expire_timestamp_ms=parseInt(d.expire_timestamp_ms,10);else if(typeof d.expire_timestamp_ms==="number")m.expire_timestamp_ms=d.expire_timestamp_ms;else if(typeof d.expire_timestamp_ms==="object")m.expire_timestamp_ms=new $util.LongBits(d.expire_timestamp_ms.low>>>0,d.expire_timestamp_ms.high>>>0).toNumber(true)}if(d.end!=null){if(typeof d.end==="string")$util.base64.decode(d.end,m.end=$util.newBuffer($util.base64.length(d.end)),0);else if(d.end.length)m.end=d.end}return m};AuthTicket.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if(o.bytes===String)d.start="";else{d.start=[];if(o.bytes!==Array)d.start=$util.newBuffer(d.start)}if($util.Long){var n=new $util.Long(0,0,true);d.expire_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.expire_timestamp_ms=o.longs===String?"0":0;if(o.bytes===String)d.end="";else{d.end=[];if(o.bytes!==Array)d.end=$util.newBuffer(d.end)}}if(m.start!=null&&m.hasOwnProperty("start")){d.start=o.bytes===String?$util.base64.encode(m.start,0,m.start.length):o.bytes===Array?Array.prototype.slice.call(m.start):m.start}if(m.expire_timestamp_ms!=null&&m.hasOwnProperty("expire_timestamp_ms")){if(typeof m.expire_timestamp_ms==="number")d.expire_timestamp_ms=o.longs===String?String(m.expire_timestamp_ms):m.expire_timestamp_ms;else d.expire_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.expire_timestamp_ms):o.longs===Number?new $util.LongBits(m.expire_timestamp_ms.low>>>0,m.expire_timestamp_ms.high>>>0).toNumber(true):m.expire_timestamp_ms}if(m.end!=null&&m.hasOwnProperty("end")){d.end=o.bytes===String?$util.base64.encode(m.end,0,m.end.length):o.bytes===Array?Array.prototype.slice.call(m.end):m.end}return d};AuthTicket.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AuthTicket}();return Envelopes}();Networking.Platform=function(){var Platform={};Platform.InternalAuth=function(){function InternalAuth(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}InternalAuth.prototype.email="";InternalAuth.prototype.player_id="";InternalAuth.prototype.app_id="";InternalAuth.prototype.key="";InternalAuth.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.email!=null&&m.hasOwnProperty("email"))w.uint32(10).string(m.email);if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(18).string(m.player_id);if(m.app_id!=null&&m.hasOwnProperty("app_id"))w.uint32(26).string(m.app_id);if(m.key!=null&&m.hasOwnProperty("key"))w.uint32(34).string(m.key);return w};InternalAuth.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.InternalAuth;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.email=r.string();break;case 2:m.player_id=r.string();break;case 3:m.app_id=r.string();break;case 4:m.key=r.string();break;default:r.skipType(t&7);break}}return m};InternalAuth.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.InternalAuth)return d;var m=new $root.POGOProtos.Networking.Platform.InternalAuth;if(d.email!=null){m.email=String(d.email)}if(d.player_id!=null){m.player_id=String(d.player_id)}if(d.app_id!=null){m.app_id=String(d.app_id)}if(d.key!=null){m.key=String(d.key)}return m};InternalAuth.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.email="";d.player_id="";d.app_id="";d.key=""}if(m.email!=null&&m.hasOwnProperty("email")){d.email=m.email}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}if(m.app_id!=null&&m.hasOwnProperty("app_id")){d.app_id=m.app_id}if(m.key!=null&&m.hasOwnProperty("key")){d.key=m.key}return d};InternalAuth.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return InternalAuth}();Platform.PlatformRequestType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNKNOWN"]=0;values[valuesById[1]="MAP_QUERY_REQUEST"]=1;values[valuesById[2]="PURCHASE_SKU"]=2;values[valuesById[3]="REDEEM_GOOGLE_RECEIPT"]=3;values[valuesById[4]="REDEEM_APPLE_RECEIPT"]=4;values[valuesById[5]="GET_AVAILABLE_SKUS_AND_BALANCES"]=5;values[valuesById[6]="SEND_ENCRYPTED_SIGNATURE"]=6;values[valuesById[7]="REDEEM_DESKTOP_RECEIPT"]=7;values[valuesById[8]="DOWNLOAD_PLATFORM_CLIENT_SETTINGS"]=8;values[valuesById[9]="REDEEM_PASSCODE"]=9;values[valuesById[10]="REGISTER_PUSH_NOTIFICATION"]=10;values[valuesById[11]="UNREGISTER_PUSH_NOTIFICATION"]=11;values[valuesById[12]="UPDATE_NOTIFICATION_STATUS"]=12;values[valuesById[13]="ADD_NEW_POI"]=13;values[valuesById[14]="ADD_LOGIN_ACTION"]=14;values[valuesById[15]="REMOVE_LOGIN_ACTION"]=15;values[valuesById[16]="LIST_LOGIN_ACTION"]=16;values[valuesById[17]="COLLECT_CLIENT_TELEMETRY"]=17;values[valuesById[18]="GET_SIGNED_URL_FOR_PHOTO_UPLOAD"]=18;values[valuesById[19]="REPLACE_LOGIN_ACTION"]=19;values[valuesById[20]="CHALLENGE"]=20;values[valuesById[21]="SAFETY_NET_CHALLENGE"]=21;values[valuesById[22]="UPDATE_FITNESS_METRICS"]=22;values[valuesById[23]="GET_FITNESS_REPORT"]=23;values[valuesById[24]="SET_IN_GAME_CURRENCY_EXCHANGE_RATE"]=24;values[valuesById[30]="REGISTER_DOWNSTREAM_SERVER_ACTIONS"]=30;values[valuesById[31]="DOWNSTREAM_SERVER_ACTIONS"]=31;values[valuesById[101]="TEMP_TEST_RESULT"]=101;return values}();Platform.Requests=function(){var Requests={};Requests.AddLoginActionMessage=function(){function AddLoginActionMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AddLoginActionMessage.prototype.identity_provider=0;AddLoginActionMessage.prototype.inner_message=$util.newBuffer([]);AddLoginActionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.identity_provider!=null&&m.hasOwnProperty("identity_provider"))w.uint32(8).int32(m.identity_provider);if(m.inner_message!=null&&m.hasOwnProperty("inner_message"))w.uint32(18).bytes(m.inner_message);return w};AddLoginActionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.AddLoginActionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.identity_provider=r.int32();break;case 2:m.inner_message=r.bytes();break;default:r.skipType(t&7);break}}return m};AddLoginActionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.AddLoginActionMessage)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.AddLoginActionMessage;switch(d.identity_provider){case"UNSET_IDENTITY_PROVIDER":case 0:m.identity_provider=0;break;case"GOOGLE":case 1:m.identity_provider=1;break;case"PTC":case 2:m.identity_provider=2;break;case"FACEBOOK":case 3:m.identity_provider=3;break;case"BACKGROUND":case 4:m.identity_provider=4;break;case"INTERNAL":case 5:m.identity_provider=5;break;case"SFIDA":case 6:m.identity_provider=6;break;case"SUPER_AWESOME":case 7:m.identity_provider=7;break}if(d.inner_message!=null){if(typeof d.inner_message==="string")$util.base64.decode(d.inner_message,m.inner_message=$util.newBuffer($util.base64.length(d.inner_message)),0);else if(d.inner_message.length)m.inner_message=d.inner_message}return m};AddLoginActionMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.identity_provider=o.enums===String?"UNSET_IDENTITY_PROVIDER":0;if(o.bytes===String)d.inner_message="";else{d.inner_message=[];if(o.bytes!==Array)d.inner_message=$util.newBuffer(d.inner_message)}}if(m.identity_provider!=null&&m.hasOwnProperty("identity_provider")){d.identity_provider=o.enums===String?$root.POGOProtos.Enums.IdentityProvider[m.identity_provider]:m.identity_provider}if(m.inner_message!=null&&m.hasOwnProperty("inner_message")){d.inner_message=o.bytes===String?$util.base64.encode(m.inner_message,0,m.inner_message.length):o.bytes===Array?Array.prototype.slice.call(m.inner_message):m.inner_message}return d};AddLoginActionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AddLoginActionMessage}();Requests.AddNewPoiMessage=function(){function AddNewPoiMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AddNewPoiMessage.prototype.title="";AddNewPoiMessage.prototype.long_description="";AddNewPoiMessage.prototype.image_gs_file_path="";AddNewPoiMessage.prototype.lat_e6=0;AddNewPoiMessage.prototype.lng_e6=0;AddNewPoiMessage.prototype.image_serving_url="";AddNewPoiMessage.prototype.user_id="";AddNewPoiMessage.prototype.player_language="";AddNewPoiMessage.prototype.game_unique_id="";AddNewPoiMessage.prototype.app_id="";AddNewPoiMessage.prototype.player_reputation=null;AddNewPoiMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.title!=null&&m.hasOwnProperty("title"))w.uint32(10).string(m.title);if(m.long_description!=null&&m.hasOwnProperty("long_description"))w.uint32(18).string(m.long_description);if(m.image_gs_file_path!=null&&m.hasOwnProperty("image_gs_file_path"))w.uint32(26).string(m.image_gs_file_path);if(m.lat_e6!=null&&m.hasOwnProperty("lat_e6"))w.uint32(32).int32(m.lat_e6);if(m.lng_e6!=null&&m.hasOwnProperty("lng_e6"))w.uint32(40).int32(m.lng_e6);if(m.image_serving_url!=null&&m.hasOwnProperty("image_serving_url"))w.uint32(50).string(m.image_serving_url);if(m.user_id!=null&&m.hasOwnProperty("user_id"))w.uint32(58).string(m.user_id);if(m.player_language!=null&&m.hasOwnProperty("player_language"))w.uint32(66).string(m.player_language);if(m.game_unique_id!=null&&m.hasOwnProperty("game_unique_id"))w.uint32(74).string(m.game_unique_id);if(m.app_id!=null&&m.hasOwnProperty("app_id"))w.uint32(82).string(m.app_id);if(m.player_reputation!=null&&m.hasOwnProperty("player_reputation"))$root.POGOProtos.Data.Player.PlayerReputation.encode(m.player_reputation,w.uint32(90).fork()).ldelim();return w};AddNewPoiMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.AddNewPoiMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.title=r.string();break;case 2:m.long_description=r.string();break;case 3:m.image_gs_file_path=r.string();break;case 4:m.lat_e6=r.int32();break;case 5:m.lng_e6=r.int32();break;case 6:m.image_serving_url=r.string();break;case 7:m.user_id=r.string();break;case 8:m.player_language=r.string();break;case 9:m.game_unique_id=r.string();break;case 10:m.app_id=r.string();break;case 11:m.player_reputation=$root.POGOProtos.Data.Player.PlayerReputation.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};AddNewPoiMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.AddNewPoiMessage)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.AddNewPoiMessage;if(d.title!=null){m.title=String(d.title)}if(d.long_description!=null){m.long_description=String(d.long_description)}if(d.image_gs_file_path!=null){m.image_gs_file_path=String(d.image_gs_file_path)}if(d.lat_e6!=null){m.lat_e6=d.lat_e6|0}if(d.lng_e6!=null){m.lng_e6=d.lng_e6|0}if(d.image_serving_url!=null){m.image_serving_url=String(d.image_serving_url)}if(d.user_id!=null){m.user_id=String(d.user_id)}if(d.player_language!=null){m.player_language=String(d.player_language)}if(d.game_unique_id!=null){m.game_unique_id=String(d.game_unique_id)}if(d.app_id!=null){m.app_id=String(d.app_id)}if(d.player_reputation!=null){if(typeof d.player_reputation!=="object")throw TypeError(".POGOProtos.Networking.Platform.Requests.AddNewPoiMessage.player_reputation: object expected");m.player_reputation=$root.POGOProtos.Data.Player.PlayerReputation.fromObject(d.player_reputation)}return m};AddNewPoiMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.title="";d.long_description="";d.image_gs_file_path="";d.lat_e6=0;d.lng_e6=0;d.image_serving_url="";d.user_id="";d.player_language="";d.game_unique_id="";d.app_id="";d.player_reputation=null}if(m.title!=null&&m.hasOwnProperty("title")){d.title=m.title}if(m.long_description!=null&&m.hasOwnProperty("long_description")){d.long_description=m.long_description}if(m.image_gs_file_path!=null&&m.hasOwnProperty("image_gs_file_path")){d.image_gs_file_path=m.image_gs_file_path}if(m.lat_e6!=null&&m.hasOwnProperty("lat_e6")){d.lat_e6=m.lat_e6}if(m.lng_e6!=null&&m.hasOwnProperty("lng_e6")){d.lng_e6=m.lng_e6}if(m.image_serving_url!=null&&m.hasOwnProperty("image_serving_url")){d.image_serving_url=m.image_serving_url}if(m.user_id!=null&&m.hasOwnProperty("user_id")){d.user_id=m.user_id}if(m.player_language!=null&&m.hasOwnProperty("player_language")){d.player_language=m.player_language}if(m.game_unique_id!=null&&m.hasOwnProperty("game_unique_id")){d.game_unique_id=m.game_unique_id}if(m.app_id!=null&&m.hasOwnProperty("app_id")){d.app_id=m.app_id}if(m.player_reputation!=null&&m.hasOwnProperty("player_reputation")){d.player_reputation=$root.POGOProtos.Data.Player.PlayerReputation.toObject(m.player_reputation,o)}return d};AddNewPoiMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AddNewPoiMessage}();Requests.DownloadPlatformClientSettingsRequest=function(){function DownloadPlatformClientSettingsRequest(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DownloadPlatformClientSettingsRequest.prototype.message="";DownloadPlatformClientSettingsRequest.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.message!=null&&m.hasOwnProperty("message"))w.uint32(10).string(m.message);return w};DownloadPlatformClientSettingsRequest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.DownloadPlatformClientSettingsRequest;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.message=r.string();break;default:r.skipType(t&7);break}}return m};DownloadPlatformClientSettingsRequest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.DownloadPlatformClientSettingsRequest)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.DownloadPlatformClientSettingsRequest;if(d.message!=null){m.message=String(d.message)}return m};DownloadPlatformClientSettingsRequest.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.message=""}if(m.message!=null&&m.hasOwnProperty("message")){d.message=m.message}return d};DownloadPlatformClientSettingsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DownloadPlatformClientSettingsRequest}();Requests.GetAvailableSkusAndBalancesRequest=function(){function GetAvailableSkusAndBalancesRequest(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetAvailableSkusAndBalancesRequest.encode=function encode(m,w){if(!w)w=$Writer.create();return w};GetAvailableSkusAndBalancesRequest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.GetAvailableSkusAndBalancesRequest;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};GetAvailableSkusAndBalancesRequest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.GetAvailableSkusAndBalancesRequest)return d;return new $root.POGOProtos.Networking.Platform.Requests.GetAvailableSkusAndBalancesRequest};GetAvailableSkusAndBalancesRequest.toObject=function toObject(){return{}};GetAvailableSkusAndBalancesRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetAvailableSkusAndBalancesRequest}();Requests.GetFitnessReportMessage=function(){function GetFitnessReportMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetFitnessReportMessage.prototype.num_of_days=0;GetFitnessReportMessage.prototype.num_of_weeks=0;GetFitnessReportMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.num_of_days!=null&&m.hasOwnProperty("num_of_days"))w.uint32(8).int32(m.num_of_days);if(m.num_of_weeks!=null&&m.hasOwnProperty("num_of_weeks"))w.uint32(16).int32(m.num_of_weeks);return w};GetFitnessReportMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.GetFitnessReportMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.num_of_days=r.int32();break;case 2:m.num_of_weeks=r.int32();break;default:r.skipType(t&7);break}}return m};GetFitnessReportMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.GetFitnessReportMessage)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.GetFitnessReportMessage;if(d.num_of_days!=null){m.num_of_days=d.num_of_days|0}if(d.num_of_weeks!=null){m.num_of_weeks=d.num_of_weeks|0}return m};GetFitnessReportMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.num_of_days=0;d.num_of_weeks=0}if(m.num_of_days!=null&&m.hasOwnProperty("num_of_days")){d.num_of_days=m.num_of_days}if(m.num_of_weeks!=null&&m.hasOwnProperty("num_of_weeks")){d.num_of_weeks=m.num_of_weeks}return d};GetFitnessReportMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetFitnessReportMessage}();Requests.ListLoginActionMessage=function(){function ListLoginActionMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListLoginActionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};ListLoginActionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.ListLoginActionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};ListLoginActionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.ListLoginActionMessage)return d;return new $root.POGOProtos.Networking.Platform.Requests.ListLoginActionMessage};ListLoginActionMessage.toObject=function toObject(){return{}};ListLoginActionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ListLoginActionMessage}();Requests.PurchaseSkuRequest=function(){function PurchaseSkuRequest(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PurchaseSkuRequest.prototype.sku_id="";PurchaseSkuRequest.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.sku_id!=null&&m.hasOwnProperty("sku_id"))w.uint32(10).string(m.sku_id);return w};PurchaseSkuRequest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.PurchaseSkuRequest;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.sku_id=r.string();break;default:r.skipType(t&7);break}}return m};PurchaseSkuRequest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.PurchaseSkuRequest)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.PurchaseSkuRequest;if(d.sku_id!=null){m.sku_id=String(d.sku_id)}return m};PurchaseSkuRequest.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.sku_id=""}if(m.sku_id!=null&&m.hasOwnProperty("sku_id")){d.sku_id=m.sku_id}return d};PurchaseSkuRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PurchaseSkuRequest}();Requests.RedeemGoogleReceiptRequest=function(){function RedeemGoogleReceiptRequest(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RedeemGoogleReceiptRequest.prototype.receipt="";RedeemGoogleReceiptRequest.prototype.receipt_signature="";RedeemGoogleReceiptRequest.prototype.purchase_currency="";RedeemGoogleReceiptRequest.prototype.price_paid_e6=0;RedeemGoogleReceiptRequest.prototype.price_paid_e6_long=$util.Long?$util.Long.fromBits(0,0,false):0;RedeemGoogleReceiptRequest.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.receipt!=null&&m.hasOwnProperty("receipt"))w.uint32(10).string(m.receipt);if(m.receipt_signature!=null&&m.hasOwnProperty("receipt_signature"))w.uint32(18).string(m.receipt_signature);if(m.purchase_currency!=null&&m.hasOwnProperty("purchase_currency"))w.uint32(26).string(m.purchase_currency);if(m.price_paid_e6!=null&&m.hasOwnProperty("price_paid_e6"))w.uint32(32).int32(m.price_paid_e6);if(m.price_paid_e6_long!=null&&m.hasOwnProperty("price_paid_e6_long"))w.uint32(40).int64(m.price_paid_e6_long);return w};RedeemGoogleReceiptRequest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.RedeemGoogleReceiptRequest;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.receipt=r.string();break;case 2:m.receipt_signature=r.string();break;case 3:m.purchase_currency=r.string();break;case 4:m.price_paid_e6=r.int32();break;case 5:m.price_paid_e6_long=r.int64();break;default:r.skipType(t&7);break}}return m};RedeemGoogleReceiptRequest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.RedeemGoogleReceiptRequest)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.RedeemGoogleReceiptRequest;if(d.receipt!=null){m.receipt=String(d.receipt)}if(d.receipt_signature!=null){m.receipt_signature=String(d.receipt_signature)}if(d.purchase_currency!=null){m.purchase_currency=String(d.purchase_currency)}if(d.price_paid_e6!=null){m.price_paid_e6=d.price_paid_e6|0}if(d.price_paid_e6_long!=null){if($util.Long)(m.price_paid_e6_long=$util.Long.fromValue(d.price_paid_e6_long)).unsigned=false;else if(typeof d.price_paid_e6_long==="string")m.price_paid_e6_long=parseInt(d.price_paid_e6_long,10);else if(typeof d.price_paid_e6_long==="number")m.price_paid_e6_long=d.price_paid_e6_long;else if(typeof d.price_paid_e6_long==="object")m.price_paid_e6_long=new $util.LongBits(d.price_paid_e6_long.low>>>0,d.price_paid_e6_long.high>>>0).toNumber()}return m};RedeemGoogleReceiptRequest.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.receipt="";d.receipt_signature="";d.purchase_currency="";d.price_paid_e6=0;if($util.Long){var n=new $util.Long(0,0,false);d.price_paid_e6_long=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.price_paid_e6_long=o.longs===String?"0":0}if(m.receipt!=null&&m.hasOwnProperty("receipt")){d.receipt=m.receipt}if(m.receipt_signature!=null&&m.hasOwnProperty("receipt_signature")){d.receipt_signature=m.receipt_signature}if(m.purchase_currency!=null&&m.hasOwnProperty("purchase_currency")){d.purchase_currency=m.purchase_currency}if(m.price_paid_e6!=null&&m.hasOwnProperty("price_paid_e6")){d.price_paid_e6=m.price_paid_e6}if(m.price_paid_e6_long!=null&&m.hasOwnProperty("price_paid_e6_long")){if(typeof m.price_paid_e6_long==="number")d.price_paid_e6_long=o.longs===String?String(m.price_paid_e6_long):m.price_paid_e6_long;else d.price_paid_e6_long=o.longs===String?$util.Long.prototype.toString.call(m.price_paid_e6_long):o.longs===Number?new $util.LongBits(m.price_paid_e6_long.low>>>0,m.price_paid_e6_long.high>>>0).toNumber():m.price_paid_e6_long}return d};RedeemGoogleReceiptRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RedeemGoogleReceiptRequest}();Requests.RedeemPasscodeRequest=function(){function RedeemPasscodeRequest(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RedeemPasscodeRequest.prototype.qrcode="";RedeemPasscodeRequest.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.qrcode!=null&&m.hasOwnProperty("qrcode"))w.uint32(10).string(m.qrcode);return w};RedeemPasscodeRequest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.RedeemPasscodeRequest;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.qrcode=r.string();break;default:r.skipType(t&7);break}}return m};RedeemPasscodeRequest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.RedeemPasscodeRequest)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.RedeemPasscodeRequest;if(d.qrcode!=null){m.qrcode=String(d.qrcode)}return m};RedeemPasscodeRequest.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.qrcode=""}if(m.qrcode!=null&&m.hasOwnProperty("qrcode")){d.qrcode=m.qrcode}return d};RedeemPasscodeRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RedeemPasscodeRequest}();Requests.RegisterDownstreamServerActionsRequest=function(){function RegisterDownstreamServerActionsRequest(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RegisterDownstreamServerActionsRequest.encode=function encode(m,w){if(!w)w=$Writer.create();return w};RegisterDownstreamServerActionsRequest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.RegisterDownstreamServerActionsRequest;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};RegisterDownstreamServerActionsRequest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.RegisterDownstreamServerActionsRequest)return d;return new $root.POGOProtos.Networking.Platform.Requests.RegisterDownstreamServerActionsRequest};RegisterDownstreamServerActionsRequest.toObject=function toObject(){return{}};RegisterDownstreamServerActionsRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RegisterDownstreamServerActionsRequest}();Requests.RegisterPushNotificationMessage=function(){function RegisterPushNotificationMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RegisterPushNotificationMessage.prototype.apn_token=null;RegisterPushNotificationMessage.prototype.gcm_token=null;RegisterPushNotificationMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.apn_token!=null&&m.hasOwnProperty("apn_token"))$root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.ApnToken.encode(m.apn_token,w.uint32(10).fork()).ldelim();if(m.gcm_token!=null&&m.hasOwnProperty("gcm_token"))$root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.GcmToken.encode(m.gcm_token,w.uint32(18).fork()).ldelim();return w};RegisterPushNotificationMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.apn_token=$root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.ApnToken.decode(r,r.uint32());break;case 2:m.gcm_token=$root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.GcmToken.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};RegisterPushNotificationMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage;if(d.apn_token!=null){if(typeof d.apn_token!=="object")throw TypeError(".POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.apn_token: object expected");m.apn_token=$root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.ApnToken.fromObject(d.apn_token)}if(d.gcm_token!=null){if(typeof d.gcm_token!=="object")throw TypeError(".POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.gcm_token: object expected");m.gcm_token=$root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.GcmToken.fromObject(d.gcm_token)}return m};RegisterPushNotificationMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.apn_token=null;d.gcm_token=null}if(m.apn_token!=null&&m.hasOwnProperty("apn_token")){d.apn_token=$root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.ApnToken.toObject(m.apn_token,o)}if(m.gcm_token!=null&&m.hasOwnProperty("gcm_token")){d.gcm_token=$root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.GcmToken.toObject(m.gcm_token,o)}return d};RegisterPushNotificationMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RegisterPushNotificationMessage.ApnToken=function(){function ApnToken(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ApnToken.prototype.registration_id="";ApnToken.prototype.bundle_identifier="";ApnToken.prototype.payload_byte_size=0;ApnToken.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.registration_id!=null&&m.hasOwnProperty("registration_id"))w.uint32(10).string(m.registration_id);if(m.bundle_identifier!=null&&m.hasOwnProperty("bundle_identifier"))w.uint32(18).string(m.bundle_identifier);if(m.payload_byte_size!=null&&m.hasOwnProperty("payload_byte_size"))w.uint32(24).int32(m.payload_byte_size);return w};ApnToken.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.ApnToken;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.registration_id=r.string();break;case 2:m.bundle_identifier=r.string();break;case 3:m.payload_byte_size=r.int32();break;default:r.skipType(t&7);break}}return m};ApnToken.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.ApnToken)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.ApnToken;if(d.registration_id!=null){m.registration_id=String(d.registration_id)}if(d.bundle_identifier!=null){m.bundle_identifier=String(d.bundle_identifier)}if(d.payload_byte_size!=null){m.payload_byte_size=d.payload_byte_size|0}return m};ApnToken.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.registration_id="";d.bundle_identifier="";d.payload_byte_size=0}if(m.registration_id!=null&&m.hasOwnProperty("registration_id")){d.registration_id=m.registration_id}if(m.bundle_identifier!=null&&m.hasOwnProperty("bundle_identifier")){d.bundle_identifier=m.bundle_identifier}if(m.payload_byte_size!=null&&m.hasOwnProperty("payload_byte_size")){d.payload_byte_size=m.payload_byte_size}return d};ApnToken.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ApnToken}();RegisterPushNotificationMessage.GcmToken=function(){function GcmToken(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GcmToken.prototype.registration_id="";GcmToken.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.registration_id!=null&&m.hasOwnProperty("registration_id"))w.uint32(10).string(m.registration_id);return w};GcmToken.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.GcmToken;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.registration_id=r.string();break;default:r.skipType(t&7);break}}return m};GcmToken.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.GcmToken)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.RegisterPushNotificationMessage.GcmToken;if(d.registration_id!=null){m.registration_id=String(d.registration_id)}return m};GcmToken.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.registration_id=""}if(m.registration_id!=null&&m.hasOwnProperty("registration_id")){d.registration_id=m.registration_id}return d};GcmToken.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GcmToken}();return RegisterPushNotificationMessage}();Requests.RemoveLoginActionMessage=function(){function RemoveLoginActionMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RemoveLoginActionMessage.prototype.identity_provider=0;RemoveLoginActionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.identity_provider!=null&&m.hasOwnProperty("identity_provider"))w.uint32(8).int32(m.identity_provider);return w};RemoveLoginActionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.RemoveLoginActionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.identity_provider=r.int32();break;default:r.skipType(t&7);break}}return m};RemoveLoginActionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.RemoveLoginActionMessage)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.RemoveLoginActionMessage;switch(d.identity_provider){case"UNSET_IDENTITY_PROVIDER":case 0:m.identity_provider=0;break;case"GOOGLE":case 1:m.identity_provider=1;break;case"PTC":case 2:m.identity_provider=2;break;case"FACEBOOK":case 3:m.identity_provider=3;break;case"BACKGROUND":case 4:m.identity_provider=4;break;case"INTERNAL":case 5:m.identity_provider=5;break;case"SFIDA":case 6:m.identity_provider=6;break;case"SUPER_AWESOME":case 7:m.identity_provider=7;break}return m};RemoveLoginActionMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.identity_provider=o.enums===String?"UNSET_IDENTITY_PROVIDER":0}if(m.identity_provider!=null&&m.hasOwnProperty("identity_provider")){d.identity_provider=o.enums===String?$root.POGOProtos.Enums.IdentityProvider[m.identity_provider]:m.identity_provider}return d};RemoveLoginActionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RemoveLoginActionMessage}();Requests.ReplaceLoginActionMessage=function(){function ReplaceLoginActionMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ReplaceLoginActionMessage.prototype.existing_identity_provider=0;ReplaceLoginActionMessage.prototype.new_login=null;ReplaceLoginActionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.existing_identity_provider!=null&&m.hasOwnProperty("existing_identity_provider"))w.uint32(8).int32(m.existing_identity_provider);if(m.new_login!=null&&m.hasOwnProperty("new_login"))$root.POGOProtos.Networking.Platform.Requests.AddLoginActionMessage.encode(m.new_login,w.uint32(18).fork()).ldelim();return w};ReplaceLoginActionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.ReplaceLoginActionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.existing_identity_provider=r.int32();break;case 2:m.new_login=$root.POGOProtos.Networking.Platform.Requests.AddLoginActionMessage.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};ReplaceLoginActionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.ReplaceLoginActionMessage)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.ReplaceLoginActionMessage;switch(d.existing_identity_provider){case"UNSET_IDENTITY_PROVIDER":case 0:m.existing_identity_provider=0;break;case"GOOGLE":case 1:m.existing_identity_provider=1;break;case"PTC":case 2:m.existing_identity_provider=2;break;case"FACEBOOK":case 3:m.existing_identity_provider=3;break;case"BACKGROUND":case 4:m.existing_identity_provider=4;break;case"INTERNAL":case 5:m.existing_identity_provider=5;break;case"SFIDA":case 6:m.existing_identity_provider=6;break;case"SUPER_AWESOME":case 7:m.existing_identity_provider=7;break}if(d.new_login!=null){if(typeof d.new_login!=="object")throw TypeError(".POGOProtos.Networking.Platform.Requests.ReplaceLoginActionMessage.new_login: object expected");m.new_login=$root.POGOProtos.Networking.Platform.Requests.AddLoginActionMessage.fromObject(d.new_login)}return m};ReplaceLoginActionMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.existing_identity_provider=o.enums===String?"UNSET_IDENTITY_PROVIDER":0;d.new_login=null}if(m.existing_identity_provider!=null&&m.hasOwnProperty("existing_identity_provider")){d.existing_identity_provider=o.enums===String?$root.POGOProtos.Enums.IdentityProvider[m.existing_identity_provider]:m.existing_identity_provider}if(m.new_login!=null&&m.hasOwnProperty("new_login")){d.new_login=$root.POGOProtos.Networking.Platform.Requests.AddLoginActionMessage.toObject(m.new_login,o)}return d};ReplaceLoginActionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ReplaceLoginActionMessage}();Requests.SendEncryptedSignatureRequest=function(){function SendEncryptedSignatureRequest(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SendEncryptedSignatureRequest.prototype.encrypted_signature=$util.newBuffer([]);SendEncryptedSignatureRequest.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.encrypted_signature!=null&&m.hasOwnProperty("encrypted_signature"))w.uint32(10).bytes(m.encrypted_signature);return w};SendEncryptedSignatureRequest.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.SendEncryptedSignatureRequest;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.encrypted_signature=r.bytes();break;default:r.skipType(t&7);break}}return m};SendEncryptedSignatureRequest.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.SendEncryptedSignatureRequest)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.SendEncryptedSignatureRequest;if(d.encrypted_signature!=null){if(typeof d.encrypted_signature==="string")$util.base64.decode(d.encrypted_signature,m.encrypted_signature=$util.newBuffer($util.base64.length(d.encrypted_signature)),0);else if(d.encrypted_signature.length)m.encrypted_signature=d.encrypted_signature}return m};SendEncryptedSignatureRequest.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if(o.bytes===String)d.encrypted_signature="";else{d.encrypted_signature=[];if(o.bytes!==Array)d.encrypted_signature=$util.newBuffer(d.encrypted_signature)}}if(m.encrypted_signature!=null&&m.hasOwnProperty("encrypted_signature")){d.encrypted_signature=o.bytes===String?$util.base64.encode(m.encrypted_signature,0,m.encrypted_signature.length):o.bytes===Array?Array.prototype.slice.call(m.encrypted_signature):m.encrypted_signature}return d};SendEncryptedSignatureRequest.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SendEncryptedSignatureRequest}();Requests.SetInGameCurrencyExchangeRateMessage=function(){function SetInGameCurrencyExchangeRateMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetInGameCurrencyExchangeRateMessage.prototype.in_game_currency="";SetInGameCurrencyExchangeRateMessage.prototype.fiat_currency="";SetInGameCurrencyExchangeRateMessage.prototype.fiat_currency_cost_e6_per_in_game_unit=$util.Long?$util.Long.fromBits(0,0,false):0;SetInGameCurrencyExchangeRateMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.in_game_currency!=null&&m.hasOwnProperty("in_game_currency"))w.uint32(10).string(m.in_game_currency);if(m.fiat_currency!=null&&m.hasOwnProperty("fiat_currency"))w.uint32(18).string(m.fiat_currency);if(m.fiat_currency_cost_e6_per_in_game_unit!=null&&m.hasOwnProperty("fiat_currency_cost_e6_per_in_game_unit"))w.uint32(24).int64(m.fiat_currency_cost_e6_per_in_game_unit);return w};SetInGameCurrencyExchangeRateMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.SetInGameCurrencyExchangeRateMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.in_game_currency=r.string();break;case 2:m.fiat_currency=r.string();break;case 3:m.fiat_currency_cost_e6_per_in_game_unit=r.int64();break;default:r.skipType(t&7);break}}return m};SetInGameCurrencyExchangeRateMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.SetInGameCurrencyExchangeRateMessage)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.SetInGameCurrencyExchangeRateMessage;if(d.in_game_currency!=null){m.in_game_currency=String(d.in_game_currency)}if(d.fiat_currency!=null){m.fiat_currency=String(d.fiat_currency)}if(d.fiat_currency_cost_e6_per_in_game_unit!=null){if($util.Long)(m.fiat_currency_cost_e6_per_in_game_unit=$util.Long.fromValue(d.fiat_currency_cost_e6_per_in_game_unit)).unsigned=false;else if(typeof d.fiat_currency_cost_e6_per_in_game_unit==="string")m.fiat_currency_cost_e6_per_in_game_unit=parseInt(d.fiat_currency_cost_e6_per_in_game_unit,10);else if(typeof d.fiat_currency_cost_e6_per_in_game_unit==="number")m.fiat_currency_cost_e6_per_in_game_unit=d.fiat_currency_cost_e6_per_in_game_unit;else if(typeof d.fiat_currency_cost_e6_per_in_game_unit==="object")m.fiat_currency_cost_e6_per_in_game_unit=new $util.LongBits(d.fiat_currency_cost_e6_per_in_game_unit.low>>>0,d.fiat_currency_cost_e6_per_in_game_unit.high>>>0).toNumber()}return m};SetInGameCurrencyExchangeRateMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.in_game_currency="";d.fiat_currency="";if($util.Long){var n=new $util.Long(0,0,false);d.fiat_currency_cost_e6_per_in_game_unit=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.fiat_currency_cost_e6_per_in_game_unit=o.longs===String?"0":0}if(m.in_game_currency!=null&&m.hasOwnProperty("in_game_currency")){d.in_game_currency=m.in_game_currency}if(m.fiat_currency!=null&&m.hasOwnProperty("fiat_currency")){d.fiat_currency=m.fiat_currency}if(m.fiat_currency_cost_e6_per_in_game_unit!=null&&m.hasOwnProperty("fiat_currency_cost_e6_per_in_game_unit")){if(typeof m.fiat_currency_cost_e6_per_in_game_unit==="number")d.fiat_currency_cost_e6_per_in_game_unit=o.longs===String?String(m.fiat_currency_cost_e6_per_in_game_unit):m.fiat_currency_cost_e6_per_in_game_unit;else d.fiat_currency_cost_e6_per_in_game_unit=o.longs===String?$util.Long.prototype.toString.call(m.fiat_currency_cost_e6_per_in_game_unit):o.longs===Number?new $util.LongBits(m.fiat_currency_cost_e6_per_in_game_unit.low>>>0,m.fiat_currency_cost_e6_per_in_game_unit.high>>>0).toNumber():m.fiat_currency_cost_e6_per_in_game_unit}return d};SetInGameCurrencyExchangeRateMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SetInGameCurrencyExchangeRateMessage}();Requests.UpdateFitnessMetricsMessage=function(){function UpdateFitnessMetricsMessage(p){this.fitness_samples=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateFitnessMetricsMessage.prototype.fitness_samples=$util.emptyArray;UpdateFitnessMetricsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fitness_samples!=null&&m.fitness_samples.length){for(var i=0;i<m.fitness_samples.length;++i)$root.POGOProtos.Data.Fitness.FitnessSample.encode(m.fitness_samples[i],w.uint32(10).fork()).ldelim()}return w};UpdateFitnessMetricsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.UpdateFitnessMetricsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.fitness_samples&&m.fitness_samples.length))m.fitness_samples=[];m.fitness_samples.push($root.POGOProtos.Data.Fitness.FitnessSample.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};UpdateFitnessMetricsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.UpdateFitnessMetricsMessage)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.UpdateFitnessMetricsMessage;if(d.fitness_samples){if(!Array.isArray(d.fitness_samples))throw TypeError(".POGOProtos.Networking.Platform.Requests.UpdateFitnessMetricsMessage.fitness_samples: array expected");m.fitness_samples=[];for(var i=0;i<d.fitness_samples.length;++i){if(typeof d.fitness_samples[i]!=="object")throw TypeError(".POGOProtos.Networking.Platform.Requests.UpdateFitnessMetricsMessage.fitness_samples: object expected");m.fitness_samples[i]=$root.POGOProtos.Data.Fitness.FitnessSample.fromObject(d.fitness_samples[i])}}return m};UpdateFitnessMetricsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.fitness_samples=[]}if(m.fitness_samples&&m.fitness_samples.length){d.fitness_samples=[];for(var j=0;j<m.fitness_samples.length;++j){d.fitness_samples[j]=$root.POGOProtos.Data.Fitness.FitnessSample.toObject(m.fitness_samples[j],o)}}return d};UpdateFitnessMetricsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UpdateFitnessMetricsMessage}();Requests.UpdateNotificationStatusMessage=function(){function UpdateNotificationStatusMessage(p){this.notification_ids=[];this.create_timestamp_ms=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateNotificationStatusMessage.prototype.notification_ids=$util.emptyArray;UpdateNotificationStatusMessage.prototype.create_timestamp_ms=$util.emptyArray;UpdateNotificationStatusMessage.prototype.state=0;UpdateNotificationStatusMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.notification_ids!=null&&m.notification_ids.length){for(var i=0;i<m.notification_ids.length;++i)w.uint32(10).string(m.notification_ids[i])}if(m.create_timestamp_ms!=null&&m.create_timestamp_ms.length){w.uint32(18).fork();for(var i=0;i<m.create_timestamp_ms.length;++i)w.int64(m.create_timestamp_ms[i]);w.ldelim()}if(m.state!=null&&m.hasOwnProperty("state"))w.uint32(24).int32(m.state);return w};UpdateNotificationStatusMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Requests.UpdateNotificationStatusMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.notification_ids&&m.notification_ids.length))m.notification_ids=[];m.notification_ids.push(r.string());break;case 2:if(!(m.create_timestamp_ms&&m.create_timestamp_ms.length))m.create_timestamp_ms=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.create_timestamp_ms.push(r.int64())}else m.create_timestamp_ms.push(r.int64());break;case 3:m.state=r.int32();break;default:r.skipType(t&7);break}}return m};UpdateNotificationStatusMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Requests.UpdateNotificationStatusMessage)return d;var m=new $root.POGOProtos.Networking.Platform.Requests.UpdateNotificationStatusMessage;if(d.notification_ids){if(!Array.isArray(d.notification_ids))throw TypeError(".POGOProtos.Networking.Platform.Requests.UpdateNotificationStatusMessage.notification_ids: array expected");m.notification_ids=[];for(var i=0;i<d.notification_ids.length;++i){m.notification_ids[i]=String(d.notification_ids[i])}}if(d.create_timestamp_ms){if(!Array.isArray(d.create_timestamp_ms))throw TypeError(".POGOProtos.Networking.Platform.Requests.UpdateNotificationStatusMessage.create_timestamp_ms: array expected");m.create_timestamp_ms=[];for(var i=0;i<d.create_timestamp_ms.length;++i){if($util.Long)(m.create_timestamp_ms[i]=$util.Long.fromValue(d.create_timestamp_ms[i])).unsigned=false;else if(typeof d.create_timestamp_ms[i]==="string")m.create_timestamp_ms[i]=parseInt(d.create_timestamp_ms[i],10);else if(typeof d.create_timestamp_ms[i]==="number")m.create_timestamp_ms[i]=d.create_timestamp_ms[i];else if(typeof d.create_timestamp_ms[i]==="object")m.create_timestamp_ms[i]=new $util.LongBits(d.create_timestamp_ms[i].low>>>0,d.create_timestamp_ms[i].high>>>0).toNumber()}}switch(d.state){case"UNSET_STATE":case 0:m.state=0;break;case"VIEWED":case 1:m.state=1;break}return m};UpdateNotificationStatusMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.notification_ids=[];d.create_timestamp_ms=[]}if(o.defaults){d.state=o.enums===String?"UNSET_STATE":0}if(m.notification_ids&&m.notification_ids.length){d.notification_ids=[];for(var j=0;j<m.notification_ids.length;++j){d.notification_ids[j]=m.notification_ids[j]}}if(m.create_timestamp_ms&&m.create_timestamp_ms.length){d.create_timestamp_ms=[];for(var j=0;j<m.create_timestamp_ms.length;++j){if(typeof m.create_timestamp_ms[j]==="number")d.create_timestamp_ms[j]=o.longs===String?String(m.create_timestamp_ms[j]):m.create_timestamp_ms[j];else d.create_timestamp_ms[j]=o.longs===String?$util.Long.prototype.toString.call(m.create_timestamp_ms[j]):o.longs===Number?new $util.LongBits(m.create_timestamp_ms[j].low>>>0,m.create_timestamp_ms[j].high>>>0).toNumber():m.create_timestamp_ms[j]}}if(m.state!=null&&m.hasOwnProperty("state")){d.state=o.enums===String?$root.POGOProtos.Enums.NotificationState[m.state]:m.state}return d};UpdateNotificationStatusMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UpdateNotificationStatusMessage}();return Requests}();Platform.Responses=function(){var Responses={};Responses.AddLoginActionResponse=function(){function AddLoginActionResponse(p){this.login_detail=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AddLoginActionResponse.prototype.success=false;AddLoginActionResponse.prototype.login_detail=$util.emptyArray;AddLoginActionResponse.prototype.status=0;AddLoginActionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.login_detail!=null&&m.login_detail.length){for(var i=0;i<m.login_detail.length;++i)$root.POGOProtos.Data.Login.LoginDetail.encode(m.login_detail[i],w.uint32(18).fork()).ldelim()}if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(24).int32(m.status);return w};AddLoginActionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.AddLoginActionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:if(!(m.login_detail&&m.login_detail.length))m.login_detail=[];m.login_detail.push($root.POGOProtos.Data.Login.LoginDetail.decode(r,r.uint32()));break;case 3:m.status=r.int32();break;default:r.skipType(t&7);break}}return m};AddLoginActionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.AddLoginActionResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.AddLoginActionResponse;if(d.success!=null){m.success=Boolean(d.success)}if(d.login_detail){if(!Array.isArray(d.login_detail))throw TypeError(".POGOProtos.Networking.Platform.Responses.AddLoginActionResponse.login_detail: array expected");m.login_detail=[];for(var i=0;i<d.login_detail.length;++i){if(typeof d.login_detail[i]!=="object")throw TypeError(".POGOProtos.Networking.Platform.Responses.AddLoginActionResponse.login_detail: object expected");m.login_detail[i]=$root.POGOProtos.Data.Login.LoginDetail.fromObject(d.login_detail[i])}}switch(d.status){case"UNSET":case 0:m.status=0;break;case"AUTH_FAILURE":case 1:m.status=1;break;case"LOGIN_TAKEN":case 2:m.status=2;break}return m};AddLoginActionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.login_detail=[]}if(o.defaults){d.success=false;d.status=o.enums===String?"UNSET":0}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.login_detail&&m.login_detail.length){d.login_detail=[];for(var j=0;j<m.login_detail.length;++j){d.login_detail[j]=$root.POGOProtos.Data.Login.LoginDetail.toObject(m.login_detail[j],o)}}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Platform.Responses.AddLoginActionResponse.Status[m.status]:m.status}return d};AddLoginActionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AddLoginActionResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="AUTH_FAILURE"]=1;values[valuesById[2]="LOGIN_TAKEN"]=2;return values}();return AddLoginActionResponse}();Responses.AddNewPoiResponse=function(){function AddNewPoiResponse(p){this.message=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AddNewPoiResponse.prototype.status=0;AddNewPoiResponse.prototype.message=$util.emptyArray;AddNewPoiResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.message!=null&&m.message.length){for(var i=0;i<m.message.length;++i)w.uint32(18).string(m.message[i])}return w};AddNewPoiResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.AddNewPoiResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:if(!(m.message&&m.message.length))m.message=[];m.message.push(r.string());break;default:r.skipType(t&7);break}}return m};AddNewPoiResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.AddNewPoiResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.AddNewPoiResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"FAILURE":case 2:m.status=2;break;case"INTERNAL_ERROR":case 3:m.status=3;break;case"TOO_MANY_RECENT_SUBMISSIONS":case 4:m.status=4;break;case"INVALID_INPUT":case 5:m.status=5;break}if(d.message){if(!Array.isArray(d.message))throw TypeError(".POGOProtos.Networking.Platform.Responses.AddNewPoiResponse.message: array expected");m.message=[];for(var i=0;i<d.message.length;++i){m.message[i]=String(d.message[i])}}return m};AddNewPoiResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.message=[]}if(o.defaults){d.status=o.enums===String?"UNSET":0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Platform.Responses.AddNewPoiResponse.Status[m.status]:m.status}if(m.message&&m.message.length){d.message=[];for(var j=0;j<m.message.length;++j){d.message[j]=m.message[j]}}return d};AddNewPoiResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AddNewPoiResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;values[valuesById[3]="INTERNAL_ERROR"]=3;values[valuesById[4]="TOO_MANY_RECENT_SUBMISSIONS"]=4;values[valuesById[5]="INVALID_INPUT"]=5;return values}();return AddNewPoiResponse}();Responses.DownloadPlatformClientSettingsResponse=function(){function DownloadPlatformClientSettingsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DownloadPlatformClientSettingsResponse.prototype.message="";DownloadPlatformClientSettingsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.message!=null&&m.hasOwnProperty("message"))w.uint32(18).string(m.message);return w};DownloadPlatformClientSettingsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.DownloadPlatformClientSettingsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 2:m.message=r.string();break;default:r.skipType(t&7);break}}return m};DownloadPlatformClientSettingsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.DownloadPlatformClientSettingsResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.DownloadPlatformClientSettingsResponse;if(d.message!=null){m.message=String(d.message)}return m};DownloadPlatformClientSettingsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.message=""}if(m.message!=null&&m.hasOwnProperty("message")){d.message=m.message}return d};DownloadPlatformClientSettingsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DownloadPlatformClientSettingsResponse}();Responses.GetAvailableSkusAndBalancesResponse=function(){function GetAvailableSkusAndBalancesResponse(p){this.available_sku=[];this.player_currencies=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetAvailableSkusAndBalancesResponse.prototype.status=0;GetAvailableSkusAndBalancesResponse.prototype.available_sku=$util.emptyArray;GetAvailableSkusAndBalancesResponse.prototype.player_currencies=$util.emptyArray;GetAvailableSkusAndBalancesResponse.prototype.player_token="";GetAvailableSkusAndBalancesResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.available_sku!=null&&m.available_sku.length){for(var i=0;i<m.available_sku.length;++i)$root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.encode(m.available_sku[i],w.uint32(18).fork()).ldelim()}if(m.player_currencies!=null&&m.player_currencies.length){for(var i=0;i<m.player_currencies.length;++i)$root.POGOProtos.Data.Store.CurrencyQuantity.encode(m.player_currencies[i],w.uint32(26).fork()).ldelim()}if(m.player_token!=null&&m.hasOwnProperty("player_token"))w.uint32(34).string(m.player_token);return w};GetAvailableSkusAndBalancesResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:if(!(m.available_sku&&m.available_sku.length))m.available_sku=[];m.available_sku.push($root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.decode(r,r.uint32()));break;case 3:if(!(m.player_currencies&&m.player_currencies.length))m.player_currencies=[];m.player_currencies.push($root.POGOProtos.Data.Store.CurrencyQuantity.decode(r,r.uint32()));break;case 4:m.player_token=r.string();break;default:r.skipType(t&7);break}}return m};GetAvailableSkusAndBalancesResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"FAILURE":case 2:m.status=2;break}if(d.available_sku){if(!Array.isArray(d.available_sku))throw TypeError(".POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.available_sku: array expected");m.available_sku=[];for(var i=0;i<d.available_sku.length;++i){if(typeof d.available_sku[i]!=="object")throw TypeError(".POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.available_sku: object expected");m.available_sku[i]=$root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.fromObject(d.available_sku[i])}}if(d.player_currencies){if(!Array.isArray(d.player_currencies))throw TypeError(".POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.player_currencies: array expected");m.player_currencies=[];for(var i=0;i<d.player_currencies.length;++i){if(typeof d.player_currencies[i]!=="object")throw TypeError(".POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.player_currencies: object expected");m.player_currencies[i]=$root.POGOProtos.Data.Store.CurrencyQuantity.fromObject(d.player_currencies[i])}}if(d.player_token!=null){m.player_token=String(d.player_token)}return m};GetAvailableSkusAndBalancesResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.available_sku=[];d.player_currencies=[]}if(o.defaults){d.status=o.enums===String?"UNSET":0;d.player_token=""}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.Status[m.status]:m.status}if(m.available_sku&&m.available_sku.length){d.available_sku=[];for(var j=0;j<m.available_sku.length;++j){d.available_sku[j]=$root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.toObject(m.available_sku[j],o)}}if(m.player_currencies&&m.player_currencies.length){d.player_currencies=[];for(var j=0;j<m.player_currencies.length;++j){d.player_currencies[j]=$root.POGOProtos.Data.Store.CurrencyQuantity.toObject(m.player_currencies[j],o)}}if(m.player_token!=null&&m.hasOwnProperty("player_token")){d.player_token=m.player_token}return d};GetAvailableSkusAndBalancesResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetAvailableSkusAndBalancesResponse.AvailableSku=function(){function AvailableSku(p){this.game_item_content=[];this.presentation_data=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AvailableSku.prototype.id="";AvailableSku.prototype.is_third_party_vendor_item=false;AvailableSku.prototype.price=null;AvailableSku.prototype.currency_granted=null;AvailableSku.prototype.game_item_content=$util.emptyArray;AvailableSku.prototype.presentation_data=$util.emptyArray;AvailableSku.prototype.can_be_purchased=false;AvailableSku.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.id!=null&&m.hasOwnProperty("id"))w.uint32(10).string(m.id);if(m.is_third_party_vendor_item!=null&&m.hasOwnProperty("is_third_party_vendor_item"))w.uint32(16).bool(m.is_third_party_vendor_item);if(m.price!=null&&m.hasOwnProperty("price"))$root.POGOProtos.Data.Store.CurrencyQuantity.encode(m.price,w.uint32(26).fork()).ldelim();if(m.currency_granted!=null&&m.hasOwnProperty("currency_granted"))$root.POGOProtos.Data.Store.CurrencyQuantity.encode(m.currency_granted,w.uint32(34).fork()).ldelim();if(m.game_item_content!=null&&m.game_item_content.length){for(var i=0;i<m.game_item_content.length;++i)$root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.GameItemContent.encode(m.game_item_content[i],w.uint32(42).fork()).ldelim()}if(m.presentation_data!=null&&m.presentation_data.length){for(var i=0;i<m.presentation_data.length;++i)$root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.SkuPresentation.encode(m.presentation_data[i],w.uint32(50).fork()).ldelim()}if(m.can_be_purchased!=null&&m.hasOwnProperty("can_be_purchased"))w.uint32(56).bool(m.can_be_purchased);return w};AvailableSku.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.id=r.string();break;case 2:m.is_third_party_vendor_item=r.bool();break;case 3:m.price=$root.POGOProtos.Data.Store.CurrencyQuantity.decode(r,r.uint32());break;case 4:m.currency_granted=$root.POGOProtos.Data.Store.CurrencyQuantity.decode(r,r.uint32());break;case 5:if(!(m.game_item_content&&m.game_item_content.length))m.game_item_content=[];m.game_item_content.push($root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.GameItemContent.decode(r,r.uint32()));break;case 6:if(!(m.presentation_data&&m.presentation_data.length))m.presentation_data=[];m.presentation_data.push($root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.SkuPresentation.decode(r,r.uint32()));break;case 7:m.can_be_purchased=r.bool();break;default:r.skipType(t&7);break}}return m};AvailableSku.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku;if(d.id!=null){m.id=String(d.id)}if(d.is_third_party_vendor_item!=null){m.is_third_party_vendor_item=Boolean(d.is_third_party_vendor_item)}if(d.price!=null){if(typeof d.price!=="object")throw TypeError(".POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.price: object expected");m.price=$root.POGOProtos.Data.Store.CurrencyQuantity.fromObject(d.price)}if(d.currency_granted!=null){if(typeof d.currency_granted!=="object")throw TypeError(".POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.currency_granted: object expected");m.currency_granted=$root.POGOProtos.Data.Store.CurrencyQuantity.fromObject(d.currency_granted)}if(d.game_item_content){if(!Array.isArray(d.game_item_content))throw TypeError(".POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.game_item_content: array expected");m.game_item_content=[];for(var i=0;i<d.game_item_content.length;++i){if(typeof d.game_item_content[i]!=="object")throw TypeError(".POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.game_item_content: object expected");m.game_item_content[i]=$root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.GameItemContent.fromObject(d.game_item_content[i])}}if(d.presentation_data){if(!Array.isArray(d.presentation_data))throw TypeError(".POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.presentation_data: array expected");m.presentation_data=[];for(var i=0;i<d.presentation_data.length;++i){if(typeof d.presentation_data[i]!=="object")throw TypeError(".POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.presentation_data: object expected");m.presentation_data[i]=$root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.SkuPresentation.fromObject(d.presentation_data[i])}}if(d.can_be_purchased!=null){m.can_be_purchased=Boolean(d.can_be_purchased)}return m};AvailableSku.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.game_item_content=[];d.presentation_data=[]}if(o.defaults){d.id="";d.is_third_party_vendor_item=false;d.price=null;d.currency_granted=null;d.can_be_purchased=false}if(m.id!=null&&m.hasOwnProperty("id")){d.id=m.id}if(m.is_third_party_vendor_item!=null&&m.hasOwnProperty("is_third_party_vendor_item")){d.is_third_party_vendor_item=m.is_third_party_vendor_item}if(m.price!=null&&m.hasOwnProperty("price")){d.price=$root.POGOProtos.Data.Store.CurrencyQuantity.toObject(m.price,o)}if(m.currency_granted!=null&&m.hasOwnProperty("currency_granted")){d.currency_granted=$root.POGOProtos.Data.Store.CurrencyQuantity.toObject(m.currency_granted,o)}if(m.game_item_content&&m.game_item_content.length){d.game_item_content=[];for(var j=0;j<m.game_item_content.length;++j){d.game_item_content[j]=$root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.GameItemContent.toObject(m.game_item_content[j],o)}}if(m.presentation_data&&m.presentation_data.length){d.presentation_data=[];for(var j=0;j<m.presentation_data.length;++j){d.presentation_data[j]=$root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.SkuPresentation.toObject(m.presentation_data[j],o)}}if(m.can_be_purchased!=null&&m.hasOwnProperty("can_be_purchased")){d.can_be_purchased=m.can_be_purchased}return d};AvailableSku.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AvailableSku}();GetAvailableSkusAndBalancesResponse.GameItemContent=function(){function GameItemContent(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GameItemContent.prototype.type="";GameItemContent.prototype.quantity=0;GameItemContent.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(10).string(m.type);if(m.quantity!=null&&m.hasOwnProperty("quantity"))w.uint32(16).int32(m.quantity);return w};GameItemContent.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.GameItemContent;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.type=r.string();break;case 2:m.quantity=r.int32();break;default:r.skipType(t&7);break}}return m};GameItemContent.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.GameItemContent)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.GameItemContent;if(d.type!=null){m.type=String(d.type)}if(d.quantity!=null){m.quantity=d.quantity|0}return m};GameItemContent.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.type="";d.quantity=0}if(m.type!=null&&m.hasOwnProperty("type")){d.type=m.type}if(m.quantity!=null&&m.hasOwnProperty("quantity")){d.quantity=m.quantity}return d};GameItemContent.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GameItemContent}();GetAvailableSkusAndBalancesResponse.SkuPresentation=function(){function SkuPresentation(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SkuPresentation.prototype.key="";SkuPresentation.prototype.value="";SkuPresentation.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.key!=null&&m.hasOwnProperty("key"))w.uint32(10).string(m.key);if(m.value!=null&&m.hasOwnProperty("value"))w.uint32(18).string(m.value);return w};SkuPresentation.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.SkuPresentation;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.key=r.string();break;case 2:m.value=r.string();break;default:r.skipType(t&7);break}}return m};SkuPresentation.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.SkuPresentation)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.GetAvailableSkusAndBalancesResponse.SkuPresentation;if(d.key!=null){m.key=String(d.key)}if(d.value!=null){m.value=String(d.value)}return m};SkuPresentation.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.key="";d.value=""}if(m.key!=null&&m.hasOwnProperty("key")){d.key=m.key}if(m.value!=null&&m.hasOwnProperty("value")){d.value=m.value}return d};SkuPresentation.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SkuPresentation}();GetAvailableSkusAndBalancesResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;return values}();return GetAvailableSkusAndBalancesResponse}();Responses.GetFitnessReportResponse=function(){function GetFitnessReportResponse(p){this.daily_reports=[];this.weekly_reports=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetFitnessReportResponse.prototype.status=0;GetFitnessReportResponse.prototype.daily_reports=$util.emptyArray;GetFitnessReportResponse.prototype.weekly_reports=$util.emptyArray;GetFitnessReportResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.daily_reports!=null&&m.daily_reports.length){for(var i=0;i<m.daily_reports.length;++i)$root.POGOProtos.Data.Fitness.FitnessReport.encode(m.daily_reports[i],w.uint32(18).fork()).ldelim()}if(m.weekly_reports!=null&&m.weekly_reports.length){for(var i=0;i<m.weekly_reports.length;++i)$root.POGOProtos.Data.Fitness.FitnessReport.encode(m.weekly_reports[i],w.uint32(26).fork()).ldelim()}return w};GetFitnessReportResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.GetFitnessReportResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:if(!(m.daily_reports&&m.daily_reports.length))m.daily_reports=[];m.daily_reports.push($root.POGOProtos.Data.Fitness.FitnessReport.decode(r,r.uint32()));break;case 3:if(!(m.weekly_reports&&m.weekly_reports.length))m.weekly_reports=[];m.weekly_reports.push($root.POGOProtos.Data.Fitness.FitnessReport.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};GetFitnessReportResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.GetFitnessReportResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.GetFitnessReportResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"ERROR_PLAYER_NOT_FOUND":case 2:m.status=2;break;case"ERROR_RECORDS_NOT_FOUND":case 3:m.status=3;break;case"ERROR_INVALID_WINDOW":case 4:m.status=4;break;case"ERROR_UNKNOWN":case 5:m.status=5;break}if(d.daily_reports){if(!Array.isArray(d.daily_reports))throw TypeError(".POGOProtos.Networking.Platform.Responses.GetFitnessReportResponse.daily_reports: array expected");m.daily_reports=[];for(var i=0;i<d.daily_reports.length;++i){if(typeof d.daily_reports[i]!=="object")throw TypeError(".POGOProtos.Networking.Platform.Responses.GetFitnessReportResponse.daily_reports: object expected");m.daily_reports[i]=$root.POGOProtos.Data.Fitness.FitnessReport.fromObject(d.daily_reports[i])}}if(d.weekly_reports){if(!Array.isArray(d.weekly_reports))throw TypeError(".POGOProtos.Networking.Platform.Responses.GetFitnessReportResponse.weekly_reports: array expected");m.weekly_reports=[];for(var i=0;i<d.weekly_reports.length;++i){if(typeof d.weekly_reports[i]!=="object")throw TypeError(".POGOProtos.Networking.Platform.Responses.GetFitnessReportResponse.weekly_reports: object expected");m.weekly_reports[i]=$root.POGOProtos.Data.Fitness.FitnessReport.fromObject(d.weekly_reports[i])}}return m};GetFitnessReportResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.daily_reports=[];d.weekly_reports=[]}if(o.defaults){d.status=o.enums===String?"UNSET":0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Platform.Responses.GetFitnessReportResponse.Status[m.status]:m.status}if(m.daily_reports&&m.daily_reports.length){d.daily_reports=[];for(var j=0;j<m.daily_reports.length;++j){d.daily_reports[j]=$root.POGOProtos.Data.Fitness.FitnessReport.toObject(m.daily_reports[j],o)}}if(m.weekly_reports&&m.weekly_reports.length){d.weekly_reports=[];for(var j=0;j<m.weekly_reports.length;++j){d.weekly_reports[j]=$root.POGOProtos.Data.Fitness.FitnessReport.toObject(m.weekly_reports[j],o)}}return d};GetFitnessReportResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetFitnessReportResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_PLAYER_NOT_FOUND"]=2;values[valuesById[3]="ERROR_RECORDS_NOT_FOUND"]=3;values[valuesById[4]="ERROR_INVALID_WINDOW"]=4;values[valuesById[5]="ERROR_UNKNOWN"]=5;return values}();return GetFitnessReportResponse}();Responses.ListLoginActionResponse=function(){function ListLoginActionResponse(p){this.login_detail=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListLoginActionResponse.prototype.success=false;ListLoginActionResponse.prototype.login_detail=$util.emptyArray;ListLoginActionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.login_detail!=null&&m.login_detail.length){for(var i=0;i<m.login_detail.length;++i)$root.POGOProtos.Data.Login.LoginDetail.encode(m.login_detail[i],w.uint32(18).fork()).ldelim()}return w};ListLoginActionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.ListLoginActionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:if(!(m.login_detail&&m.login_detail.length))m.login_detail=[];m.login_detail.push($root.POGOProtos.Data.Login.LoginDetail.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};ListLoginActionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.ListLoginActionResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.ListLoginActionResponse;if(d.success!=null){m.success=Boolean(d.success)}if(d.login_detail){if(!Array.isArray(d.login_detail))throw TypeError(".POGOProtos.Networking.Platform.Responses.ListLoginActionResponse.login_detail: array expected");m.login_detail=[];for(var i=0;i<d.login_detail.length;++i){if(typeof d.login_detail[i]!=="object")throw TypeError(".POGOProtos.Networking.Platform.Responses.ListLoginActionResponse.login_detail: object expected");m.login_detail[i]=$root.POGOProtos.Data.Login.LoginDetail.fromObject(d.login_detail[i])}}return m};ListLoginActionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.login_detail=[]}if(o.defaults){d.success=false}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.login_detail&&m.login_detail.length){d.login_detail=[];for(var j=0;j<m.login_detail.length;++j){d.login_detail[j]=$root.POGOProtos.Data.Login.LoginDetail.toObject(m.login_detail[j],o)}}return d};ListLoginActionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ListLoginActionResponse}();Responses.PurchaseSkuResponse=function(){function PurchaseSkuResponse(p){this.added_inventory_item=[];this.currency_update=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PurchaseSkuResponse.prototype.result=0;PurchaseSkuResponse.prototype.added_inventory_item=$util.emptyArray;PurchaseSkuResponse.prototype.currency_update=$util.emptyArray;PurchaseSkuResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.added_inventory_item!=null&&m.added_inventory_item.length){for(var i=0;i<m.added_inventory_item.length;++i)w.uint32(18).bytes(m.added_inventory_item[i])}if(m.currency_update!=null&&m.currency_update.length){for(var i=0;i<m.currency_update.length;++i)$root.POGOProtos.Data.Store.CurrencyUpdate.encode(m.currency_update[i],w.uint32(26).fork()).ldelim()}return w};PurchaseSkuResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.PurchaseSkuResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.added_inventory_item&&m.added_inventory_item.length))m.added_inventory_item=[];m.added_inventory_item.push(r.bytes());break;case 3:if(!(m.currency_update&&m.currency_update.length))m.currency_update=[];m.currency_update.push($root.POGOProtos.Data.Store.CurrencyUpdate.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};PurchaseSkuResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.PurchaseSkuResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.PurchaseSkuResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"FAILURE":case 2:m.result=2;break;case"BALANCE_TOO_LOW":case 3:m.result=3;break;case"SKU_NOT_AVAILABLE":case 4:m.result=4;break;case"OVER_INVENTORY_LIMIT":case 5:m.result=5;break}if(d.added_inventory_item){if(!Array.isArray(d.added_inventory_item))throw TypeError(".POGOProtos.Networking.Platform.Responses.PurchaseSkuResponse.added_inventory_item: array expected");m.added_inventory_item=[];for(var i=0;i<d.added_inventory_item.length;++i){if(typeof d.added_inventory_item[i]==="string")$util.base64.decode(d.added_inventory_item[i],m.added_inventory_item[i]=$util.newBuffer($util.base64.length(d.added_inventory_item[i])),0);else if(d.added_inventory_item[i].length)m.added_inventory_item[i]=d.added_inventory_item[i]}}if(d.currency_update){if(!Array.isArray(d.currency_update))throw TypeError(".POGOProtos.Networking.Platform.Responses.PurchaseSkuResponse.currency_update: array expected");m.currency_update=[];for(var i=0;i<d.currency_update.length;++i){if(typeof d.currency_update[i]!=="object")throw TypeError(".POGOProtos.Networking.Platform.Responses.PurchaseSkuResponse.currency_update: object expected");m.currency_update[i]=$root.POGOProtos.Data.Store.CurrencyUpdate.fromObject(d.currency_update[i])}}return m};PurchaseSkuResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.added_inventory_item=[];d.currency_update=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Platform.Responses.PurchaseSkuResponse.Status[m.result]:m.result}if(m.added_inventory_item&&m.added_inventory_item.length){d.added_inventory_item=[];for(var j=0;j<m.added_inventory_item.length;++j){d.added_inventory_item[j]=o.bytes===String?$util.base64.encode(m.added_inventory_item[j],0,m.added_inventory_item[j].length):o.bytes===Array?Array.prototype.slice.call(m.added_inventory_item[j]):m.added_inventory_item[j]}}if(m.currency_update&&m.currency_update.length){d.currency_update=[];for(var j=0;j<m.currency_update.length;++j){d.currency_update[j]=$root.POGOProtos.Data.Store.CurrencyUpdate.toObject(m.currency_update[j],o)}}return d};PurchaseSkuResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PurchaseSkuResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;values[valuesById[3]="BALANCE_TOO_LOW"]=3;values[valuesById[4]="SKU_NOT_AVAILABLE"]=4;values[valuesById[5]="OVER_INVENTORY_LIMIT"]=5;return values}();return PurchaseSkuResponse}();Responses.RedeemGoogleReceiptResponse=function(){function RedeemGoogleReceiptResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RedeemGoogleReceiptResponse.prototype.result=0;RedeemGoogleReceiptResponse.prototype.transaction_token="";RedeemGoogleReceiptResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.transaction_token!=null&&m.hasOwnProperty("transaction_token"))w.uint32(18).string(m.transaction_token);return w};RedeemGoogleReceiptResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.RedeemGoogleReceiptResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.transaction_token=r.string();break;default:r.skipType(t&7);break}}return m};RedeemGoogleReceiptResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.RedeemGoogleReceiptResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.RedeemGoogleReceiptResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"FAILURE":case 2:m.result=2;break}if(d.transaction_token!=null){m.transaction_token=String(d.transaction_token)}return m};RedeemGoogleReceiptResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.transaction_token=""}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Platform.Responses.RedeemGoogleReceiptResponse.Status[m.result]:m.result}if(m.transaction_token!=null&&m.hasOwnProperty("transaction_token")){d.transaction_token=m.transaction_token}return d};RedeemGoogleReceiptResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RedeemGoogleReceiptResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;return values}();return RedeemGoogleReceiptResponse}();Responses.RedeemPasscodeResponse=function(){function RedeemPasscodeResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RedeemPasscodeResponse.prototype.status=0;RedeemPasscodeResponse.prototype.qrcode="";RedeemPasscodeResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.qrcode!=null&&m.hasOwnProperty("qrcode"))w.uint32(34).string(m.qrcode);return w};RedeemPasscodeResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.RedeemPasscodeResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 4:m.qrcode=r.string();break;default:r.skipType(t&7);break}}return m};RedeemPasscodeResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.RedeemPasscodeResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.RedeemPasscodeResponse;switch(d.status){case"UNDEFINED":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"INVALID":case 2:m.status=2;break}if(d.qrcode!=null){m.qrcode=String(d.qrcode)}return m};RedeemPasscodeResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNDEFINED":0;d.qrcode=""}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Platform.Responses.RedeemPasscodeResponse.Status[m.status]:m.status}if(m.qrcode!=null&&m.hasOwnProperty("qrcode")){d.qrcode=m.qrcode}return d};RedeemPasscodeResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RedeemPasscodeResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNDEFINED"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="INVALID"]=2;return values}();return RedeemPasscodeResponse}();Responses.RegisterDownstreamServerActionsResponse=function(){function RegisterDownstreamServerActionsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RegisterDownstreamServerActionsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();return w};RegisterDownstreamServerActionsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.RegisterDownstreamServerActionsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};RegisterDownstreamServerActionsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.RegisterDownstreamServerActionsResponse)return d;return new $root.POGOProtos.Networking.Platform.Responses.RegisterDownstreamServerActionsResponse};RegisterDownstreamServerActionsResponse.toObject=function toObject(){return{}};RegisterDownstreamServerActionsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RegisterDownstreamServerActionsResponse}();Responses.RegisterPushNotificationResponse=function(){function RegisterPushNotificationResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RegisterPushNotificationResponse.prototype.result=0;RegisterPushNotificationResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};RegisterPushNotificationResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.RegisterPushNotificationResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};RegisterPushNotificationResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.RegisterPushNotificationResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.RegisterPushNotificationResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"NO_CHANGE":case 2:m.result=2;break}return m};RegisterPushNotificationResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Platform.Responses.RegisterPushNotificationResponse.Result[m.result]:m.result}return d};RegisterPushNotificationResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RegisterPushNotificationResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="NO_CHANGE"]=2;return values}();return RegisterPushNotificationResponse}();Responses.RemoveLoginActionResponse=function(){function RemoveLoginActionResponse(p){this.login_detail=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RemoveLoginActionResponse.prototype.success=false;RemoveLoginActionResponse.prototype.login_detail=$util.emptyArray;RemoveLoginActionResponse.prototype.status=0;RemoveLoginActionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.login_detail!=null&&m.login_detail.length){for(var i=0;i<m.login_detail.length;++i)$root.POGOProtos.Data.Login.LoginDetail.encode(m.login_detail[i],w.uint32(18).fork()).ldelim()}if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(24).int32(m.status);return w};RemoveLoginActionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.RemoveLoginActionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:if(!(m.login_detail&&m.login_detail.length))m.login_detail=[];m.login_detail.push($root.POGOProtos.Data.Login.LoginDetail.decode(r,r.uint32()));break;case 3:m.status=r.int32();break;default:r.skipType(t&7);break}}return m};RemoveLoginActionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.RemoveLoginActionResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.RemoveLoginActionResponse;if(d.success!=null){m.success=Boolean(d.success)}if(d.login_detail){if(!Array.isArray(d.login_detail))throw TypeError(".POGOProtos.Networking.Platform.Responses.RemoveLoginActionResponse.login_detail: array expected");m.login_detail=[];for(var i=0;i<d.login_detail.length;++i){if(typeof d.login_detail[i]!=="object")throw TypeError(".POGOProtos.Networking.Platform.Responses.RemoveLoginActionResponse.login_detail: object expected");m.login_detail[i]=$root.POGOProtos.Data.Login.LoginDetail.fromObject(d.login_detail[i])}}switch(d.status){case"UNSET":case 0:m.status=0;break;case"LOGIN_NOT_REMOVABLE":case 1:m.status=1;break}return m};RemoveLoginActionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.login_detail=[]}if(o.defaults){d.success=false;d.status=o.enums===String?"UNSET":0}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.login_detail&&m.login_detail.length){d.login_detail=[];for(var j=0;j<m.login_detail.length;++j){d.login_detail[j]=$root.POGOProtos.Data.Login.LoginDetail.toObject(m.login_detail[j],o)}}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Platform.Responses.RemoveLoginActionResponse.Status[m.status]:m.status}return d};RemoveLoginActionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RemoveLoginActionResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="LOGIN_NOT_REMOVABLE"]=1;return values}();return RemoveLoginActionResponse}();Responses.ReplaceLoginActionResponse=function(){function ReplaceLoginActionResponse(p){this.login_detail=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ReplaceLoginActionResponse.prototype.success=false;ReplaceLoginActionResponse.prototype.login_detail=$util.emptyArray;ReplaceLoginActionResponse.prototype.status=0;ReplaceLoginActionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.login_detail!=null&&m.login_detail.length){for(var i=0;i<m.login_detail.length;++i)$root.POGOProtos.Data.Login.LoginDetail.encode(m.login_detail[i],w.uint32(18).fork()).ldelim()}if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(24).int32(m.status);return w};ReplaceLoginActionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.ReplaceLoginActionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:if(!(m.login_detail&&m.login_detail.length))m.login_detail=[];m.login_detail.push($root.POGOProtos.Data.Login.LoginDetail.decode(r,r.uint32()));break;case 3:m.status=r.int32();break;default:r.skipType(t&7);break}}return m};ReplaceLoginActionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.ReplaceLoginActionResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.ReplaceLoginActionResponse;if(d.success!=null){m.success=Boolean(d.success)}if(d.login_detail){if(!Array.isArray(d.login_detail))throw TypeError(".POGOProtos.Networking.Platform.Responses.ReplaceLoginActionResponse.login_detail: array expected");m.login_detail=[];for(var i=0;i<d.login_detail.length;++i){if(typeof d.login_detail[i]!=="object")throw TypeError(".POGOProtos.Networking.Platform.Responses.ReplaceLoginActionResponse.login_detail: object expected");m.login_detail[i]=$root.POGOProtos.Data.Login.LoginDetail.fromObject(d.login_detail[i])}}switch(d.status){case"UNSET":case 0:m.status=0;break;case"AUTH_FAILURE":case 1:m.status=1;break;case"LOGIN_TAKEN":case 2:m.status=2;break;case"LOGIN_ALREADY_HAVE":case 3:m.status=3;break;case"LOGIN_NOT_REPLACEABLE":case 4:m.status=4;break}return m};ReplaceLoginActionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.login_detail=[]}if(o.defaults){d.success=false;d.status=o.enums===String?"UNSET":0}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.login_detail&&m.login_detail.length){d.login_detail=[];for(var j=0;j<m.login_detail.length;++j){d.login_detail[j]=$root.POGOProtos.Data.Login.LoginDetail.toObject(m.login_detail[j],o)}}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Platform.Responses.ReplaceLoginActionResponse.Status[m.status]:m.status}return d};ReplaceLoginActionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ReplaceLoginActionResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="AUTH_FAILURE"]=1;values[valuesById[2]="LOGIN_TAKEN"]=2;values[valuesById[3]="LOGIN_ALREADY_HAVE"]=3;values[valuesById[4]="LOGIN_NOT_REPLACEABLE"]=4;return values}();return ReplaceLoginActionResponse}();Responses.SendEncryptedSignatureResponse=function(){function SendEncryptedSignatureResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SendEncryptedSignatureResponse.prototype.received=false;SendEncryptedSignatureResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.received!=null&&m.hasOwnProperty("received"))w.uint32(8).bool(m.received);return w};SendEncryptedSignatureResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.SendEncryptedSignatureResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.received=r.bool();break;default:r.skipType(t&7);break}}return m};SendEncryptedSignatureResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.SendEncryptedSignatureResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.SendEncryptedSignatureResponse;if(d.received!=null){m.received=Boolean(d.received)}return m};SendEncryptedSignatureResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.received=false}if(m.received!=null&&m.hasOwnProperty("received")){d.received=m.received}return d};SendEncryptedSignatureResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SendEncryptedSignatureResponse}();Responses.SetInGameCurrencyExchangeRateResponse=function(){function SetInGameCurrencyExchangeRateResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetInGameCurrencyExchangeRateResponse.prototype.status=0;SetInGameCurrencyExchangeRateResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);return w};SetInGameCurrencyExchangeRateResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.SetInGameCurrencyExchangeRateResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;default:r.skipType(t&7);break}}return m};SetInGameCurrencyExchangeRateResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.SetInGameCurrencyExchangeRateResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.SetInGameCurrencyExchangeRateResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"FAILURE":case 2:m.status=2;break}return m};SetInGameCurrencyExchangeRateResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Platform.Responses.SetInGameCurrencyExchangeRateResponse.Status[m.status]:m.status}return d};SetInGameCurrencyExchangeRateResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SetInGameCurrencyExchangeRateResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;return values}();return SetInGameCurrencyExchangeRateResponse}();Responses.UpdateFitnessMetricsResponse=function(){function UpdateFitnessMetricsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateFitnessMetricsResponse.prototype.status=0;UpdateFitnessMetricsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);return w};UpdateFitnessMetricsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.UpdateFitnessMetricsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;default:r.skipType(t&7);break}}return m};UpdateFitnessMetricsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.UpdateFitnessMetricsResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.UpdateFitnessMetricsResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"ERROR_UNKNOWN":case 2:m.status=2;break}return m};UpdateFitnessMetricsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Platform.Responses.UpdateFitnessMetricsResponse.Status[m.status]:m.status}return d};UpdateFitnessMetricsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateFitnessMetricsResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;return values}();return UpdateFitnessMetricsResponse}();Responses.UpdateNotificationStatusResponse=function(){function UpdateNotificationStatusResponse(p){this.notification_ids=[];this.create_timestamp_ms=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateNotificationStatusResponse.prototype.notification_ids=$util.emptyArray;UpdateNotificationStatusResponse.prototype.create_timestamp_ms=$util.emptyArray;UpdateNotificationStatusResponse.prototype.state=0;UpdateNotificationStatusResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.notification_ids!=null&&m.notification_ids.length){for(var i=0;i<m.notification_ids.length;++i)w.uint32(10).string(m.notification_ids[i])}if(m.create_timestamp_ms!=null&&m.create_timestamp_ms.length){w.uint32(18).fork();for(var i=0;i<m.create_timestamp_ms.length;++i)w.int64(m.create_timestamp_ms[i]);w.ldelim()}if(m.state!=null&&m.hasOwnProperty("state"))w.uint32(24).int32(m.state);return w};UpdateNotificationStatusResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Platform.Responses.UpdateNotificationStatusResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.notification_ids&&m.notification_ids.length))m.notification_ids=[];m.notification_ids.push(r.string());break;case 2:if(!(m.create_timestamp_ms&&m.create_timestamp_ms.length))m.create_timestamp_ms=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.create_timestamp_ms.push(r.int64())}else m.create_timestamp_ms.push(r.int64());break;case 3:m.state=r.int32();break;default:r.skipType(t&7);break}}return m};UpdateNotificationStatusResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Platform.Responses.UpdateNotificationStatusResponse)return d;var m=new $root.POGOProtos.Networking.Platform.Responses.UpdateNotificationStatusResponse;if(d.notification_ids){if(!Array.isArray(d.notification_ids))throw TypeError(".POGOProtos.Networking.Platform.Responses.UpdateNotificationStatusResponse.notification_ids: array expected");m.notification_ids=[];for(var i=0;i<d.notification_ids.length;++i){m.notification_ids[i]=String(d.notification_ids[i])}}if(d.create_timestamp_ms){if(!Array.isArray(d.create_timestamp_ms))throw TypeError(".POGOProtos.Networking.Platform.Responses.UpdateNotificationStatusResponse.create_timestamp_ms: array expected");m.create_timestamp_ms=[];for(var i=0;i<d.create_timestamp_ms.length;++i){if($util.Long)(m.create_timestamp_ms[i]=$util.Long.fromValue(d.create_timestamp_ms[i])).unsigned=false;else if(typeof d.create_timestamp_ms[i]==="string")m.create_timestamp_ms[i]=parseInt(d.create_timestamp_ms[i],10);else if(typeof d.create_timestamp_ms[i]==="number")m.create_timestamp_ms[i]=d.create_timestamp_ms[i];else if(typeof d.create_timestamp_ms[i]==="object")m.create_timestamp_ms[i]=new $util.LongBits(d.create_timestamp_ms[i].low>>>0,d.create_timestamp_ms[i].high>>>0).toNumber()}}switch(d.state){case"UNSET_STATE":case 0:m.state=0;break;case"VIEWED":case 1:m.state=1;break}return m};UpdateNotificationStatusResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.notification_ids=[];d.create_timestamp_ms=[]}if(o.defaults){d.state=o.enums===String?"UNSET_STATE":0}if(m.notification_ids&&m.notification_ids.length){d.notification_ids=[];for(var j=0;j<m.notification_ids.length;++j){d.notification_ids[j]=m.notification_ids[j]}}if(m.create_timestamp_ms&&m.create_timestamp_ms.length){d.create_timestamp_ms=[];for(var j=0;j<m.create_timestamp_ms.length;++j){if(typeof m.create_timestamp_ms[j]==="number")d.create_timestamp_ms[j]=o.longs===String?String(m.create_timestamp_ms[j]):m.create_timestamp_ms[j];else d.create_timestamp_ms[j]=o.longs===String?$util.Long.prototype.toString.call(m.create_timestamp_ms[j]):o.longs===Number?new $util.LongBits(m.create_timestamp_ms[j].low>>>0,m.create_timestamp_ms[j].high>>>0).toNumber():m.create_timestamp_ms[j]}}if(m.state!=null&&m.hasOwnProperty("state")){d.state=o.enums===String?$root.POGOProtos.Enums.NotificationState[m.state]:m.state}return d};UpdateNotificationStatusResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UpdateNotificationStatusResponse}();return Responses}();return Platform}();Networking.Requests=function(){var Requests={};Requests.Messages=function(){var Messages={};Messages.AcceptCombatChallengeMessage=function(){function AcceptCombatChallengeMessage(p){this.attacking_pokemon_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AcceptCombatChallengeMessage.prototype.challenge_id="";AcceptCombatChallengeMessage.prototype.attacking_pokemon_id=$util.emptyArray;AcceptCombatChallengeMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id"))w.uint32(10).string(m.challenge_id);if(m.attacking_pokemon_id!=null&&m.attacking_pokemon_id.length){w.uint32(50).fork();for(var i=0;i<m.attacking_pokemon_id.length;++i)w.fixed64(m.attacking_pokemon_id[i]);w.ldelim()}return w};AcceptCombatChallengeMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.AcceptCombatChallengeMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.challenge_id=r.string();break;case 6:if(!(m.attacking_pokemon_id&&m.attacking_pokemon_id.length))m.attacking_pokemon_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.attacking_pokemon_id.push(r.fixed64())}else m.attacking_pokemon_id.push(r.fixed64());break;default:r.skipType(t&7);break}}return m};AcceptCombatChallengeMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.AcceptCombatChallengeMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.AcceptCombatChallengeMessage;if(d.challenge_id!=null){m.challenge_id=String(d.challenge_id)}if(d.attacking_pokemon_id){if(!Array.isArray(d.attacking_pokemon_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.AcceptCombatChallengeMessage.attacking_pokemon_id: array expected");m.attacking_pokemon_id=[];for(var i=0;i<d.attacking_pokemon_id.length;++i){if($util.Long)(m.attacking_pokemon_id[i]=$util.Long.fromValue(d.attacking_pokemon_id[i])).unsigned=false;else if(typeof d.attacking_pokemon_id[i]==="string")m.attacking_pokemon_id[i]=parseInt(d.attacking_pokemon_id[i],10);else if(typeof d.attacking_pokemon_id[i]==="number")m.attacking_pokemon_id[i]=d.attacking_pokemon_id[i];else if(typeof d.attacking_pokemon_id[i]==="object")m.attacking_pokemon_id[i]=new $util.LongBits(d.attacking_pokemon_id[i].low>>>0,d.attacking_pokemon_id[i].high>>>0).toNumber()}}return m};AcceptCombatChallengeMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.attacking_pokemon_id=[]}if(o.defaults){d.challenge_id=""}if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id")){d.challenge_id=m.challenge_id}if(m.attacking_pokemon_id&&m.attacking_pokemon_id.length){d.attacking_pokemon_id=[];for(var j=0;j<m.attacking_pokemon_id.length;++j){if(typeof m.attacking_pokemon_id[j]==="number")d.attacking_pokemon_id[j]=o.longs===String?String(m.attacking_pokemon_id[j]):m.attacking_pokemon_id[j];else d.attacking_pokemon_id[j]=o.longs===String?$util.Long.prototype.toString.call(m.attacking_pokemon_id[j]):o.longs===Number?new $util.LongBits(m.attacking_pokemon_id[j].low>>>0,m.attacking_pokemon_id[j].high>>>0).toNumber():m.attacking_pokemon_id[j]}}return d};AcceptCombatChallengeMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AcceptCombatChallengeMessage}();Messages.AcknowledgePunishmentMessage=function(){function AcknowledgePunishmentMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AcknowledgePunishmentMessage.prototype.is_warn=false;AcknowledgePunishmentMessage.prototype.is_suspended=false;AcknowledgePunishmentMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.is_warn!=null&&m.hasOwnProperty("is_warn"))w.uint32(8).bool(m.is_warn);if(m.is_suspended!=null&&m.hasOwnProperty("is_suspended"))w.uint32(16).bool(m.is_suspended);return w};AcknowledgePunishmentMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.AcknowledgePunishmentMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.is_warn=r.bool();break;case 2:m.is_suspended=r.bool();break;default:r.skipType(t&7);break}}return m};AcknowledgePunishmentMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.AcknowledgePunishmentMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.AcknowledgePunishmentMessage;if(d.is_warn!=null){m.is_warn=Boolean(d.is_warn)}if(d.is_suspended!=null){m.is_suspended=Boolean(d.is_suspended)}return m};AcknowledgePunishmentMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.is_warn=false;d.is_suspended=false}if(m.is_warn!=null&&m.hasOwnProperty("is_warn")){d.is_warn=m.is_warn}if(m.is_suspended!=null&&m.hasOwnProperty("is_suspended")){d.is_suspended=m.is_suspended}return d};AcknowledgePunishmentMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AcknowledgePunishmentMessage}();Messages.AddFortModifierMessage=function(){function AddFortModifierMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AddFortModifierMessage.prototype.modifier_type=0;AddFortModifierMessage.prototype.fort_id="";AddFortModifierMessage.prototype.player_latitude=0;AddFortModifierMessage.prototype.player_longitude=0;AddFortModifierMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.modifier_type!=null&&m.hasOwnProperty("modifier_type"))w.uint32(8).int32(m.modifier_type);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(18).string(m.fort_id);if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude"))w.uint32(25).double(m.player_latitude);if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude"))w.uint32(33).double(m.player_longitude);return w};AddFortModifierMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.AddFortModifierMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.modifier_type=r.int32();break;case 2:m.fort_id=r.string();break;case 3:m.player_latitude=r.double();break;case 4:m.player_longitude=r.double();break;default:r.skipType(t&7);break}}return m};AddFortModifierMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.AddFortModifierMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.AddFortModifierMessage;switch(d.modifier_type){case"ITEM_UNKNOWN":case 0:m.modifier_type=0;break;case"ITEM_POKE_BALL":case 1:m.modifier_type=1;break;case"ITEM_GREAT_BALL":case 2:m.modifier_type=2;break;case"ITEM_ULTRA_BALL":case 3:m.modifier_type=3;break;case"ITEM_MASTER_BALL":case 4:m.modifier_type=4;break;case"ITEM_PREMIER_BALL":case 5:m.modifier_type=5;break;case"ITEM_POTION":case 101:m.modifier_type=101;break;case"ITEM_SUPER_POTION":case 102:m.modifier_type=102;break;case"ITEM_HYPER_POTION":case 103:m.modifier_type=103;break;case"ITEM_MAX_POTION":case 104:m.modifier_type=104;break;case"ITEM_REVIVE":case 201:m.modifier_type=201;break;case"ITEM_MAX_REVIVE":case 202:m.modifier_type=202;break;case"ITEM_LUCKY_EGG":case 301:m.modifier_type=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.modifier_type=401;break;case"ITEM_INCENSE_SPICY":case 402:m.modifier_type=402;break;case"ITEM_INCENSE_COOL":case 403:m.modifier_type=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.modifier_type=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.modifier_type=405;break;case"ITEM_TROY_DISK":case 501:m.modifier_type=501;break;case"ITEM_X_ATTACK":case 602:m.modifier_type=602;break;case"ITEM_X_DEFENSE":case 603:m.modifier_type=603;break;case"ITEM_X_MIRACLE":case 604:m.modifier_type=604;break;case"ITEM_RAZZ_BERRY":case 701:m.modifier_type=701;break;case"ITEM_BLUK_BERRY":case 702:m.modifier_type=702;break;case"ITEM_NANAB_BERRY":case 703:m.modifier_type=703;break;case"ITEM_WEPAR_BERRY":case 704:m.modifier_type=704;break;case"ITEM_PINAP_BERRY":case 705:m.modifier_type=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.modifier_type=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.modifier_type=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.modifier_type=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.modifier_type=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.modifier_type=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.modifier_type=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.modifier_type=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.modifier_type=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.modifier_type=1002;break;case"ITEM_SUN_STONE":case 1101:m.modifier_type=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.modifier_type=1102;break;case"ITEM_METAL_COAT":case 1103:m.modifier_type=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.modifier_type=1104;break;case"ITEM_UP_GRADE":case 1105:m.modifier_type=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.modifier_type=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.modifier_type=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.modifier_type=1202;break;case"ITEM_RARE_CANDY":case 1301:m.modifier_type=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.modifier_type=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.modifier_type=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.modifier_type=1403;break;case"ITEM_STAR_PIECE":case 1404:m.modifier_type=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.modifier_type=1405;break}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.player_latitude!=null){m.player_latitude=Number(d.player_latitude)}if(d.player_longitude!=null){m.player_longitude=Number(d.player_longitude)}return m};AddFortModifierMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.modifier_type=o.enums===String?"ITEM_UNKNOWN":0;d.fort_id="";d.player_latitude=0;d.player_longitude=0}if(m.modifier_type!=null&&m.hasOwnProperty("modifier_type")){d.modifier_type=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.modifier_type]:m.modifier_type}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude")){d.player_latitude=o.json&&!isFinite(m.player_latitude)?String(m.player_latitude):m.player_latitude}if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude")){d.player_longitude=o.json&&!isFinite(m.player_longitude)?String(m.player_longitude):m.player_longitude}return d};AddFortModifierMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AddFortModifierMessage}();Messages.AttackGymMessage=function(){function AttackGymMessage(p){this.attack_actions=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AttackGymMessage.prototype.gym_id="";AttackGymMessage.prototype.battle_id="";AttackGymMessage.prototype.attack_actions=$util.emptyArray;AttackGymMessage.prototype.last_retrieved_action=null;AttackGymMessage.prototype.player_latitude=0;AttackGymMessage.prototype.player_longitude=0;AttackGymMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(10).string(m.gym_id);if(m.battle_id!=null&&m.hasOwnProperty("battle_id"))w.uint32(18).string(m.battle_id);if(m.attack_actions!=null&&m.attack_actions.length){for(var i=0;i<m.attack_actions.length;++i)$root.POGOProtos.Data.Battle.BattleAction.encode(m.attack_actions[i],w.uint32(26).fork()).ldelim()}if(m.last_retrieved_action!=null&&m.hasOwnProperty("last_retrieved_action"))$root.POGOProtos.Data.Battle.BattleAction.encode(m.last_retrieved_action,w.uint32(34).fork()).ldelim();if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude"))w.uint32(41).double(m.player_latitude);if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude"))w.uint32(49).double(m.player_longitude);return w};AttackGymMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.AttackGymMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gym_id=r.string();break;case 2:m.battle_id=r.string();break;case 3:if(!(m.attack_actions&&m.attack_actions.length))m.attack_actions=[];m.attack_actions.push($root.POGOProtos.Data.Battle.BattleAction.decode(r,r.uint32()));break;case 4:m.last_retrieved_action=$root.POGOProtos.Data.Battle.BattleAction.decode(r,r.uint32());break;case 5:m.player_latitude=r.double();break;case 6:m.player_longitude=r.double();break;default:r.skipType(t&7);break}}return m};AttackGymMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.AttackGymMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.AttackGymMessage;if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.battle_id!=null){m.battle_id=String(d.battle_id)}if(d.attack_actions){if(!Array.isArray(d.attack_actions))throw TypeError(".POGOProtos.Networking.Requests.Messages.AttackGymMessage.attack_actions: array expected");m.attack_actions=[];for(var i=0;i<d.attack_actions.length;++i){if(typeof d.attack_actions[i]!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.AttackGymMessage.attack_actions: object expected");m.attack_actions[i]=$root.POGOProtos.Data.Battle.BattleAction.fromObject(d.attack_actions[i])}}if(d.last_retrieved_action!=null){if(typeof d.last_retrieved_action!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.AttackGymMessage.last_retrieved_action: object expected");m.last_retrieved_action=$root.POGOProtos.Data.Battle.BattleAction.fromObject(d.last_retrieved_action)}if(d.player_latitude!=null){m.player_latitude=Number(d.player_latitude)}if(d.player_longitude!=null){m.player_longitude=Number(d.player_longitude)}return m};AttackGymMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.attack_actions=[]}if(o.defaults){d.gym_id="";d.battle_id="";d.last_retrieved_action=null;d.player_latitude=0;d.player_longitude=0}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.battle_id!=null&&m.hasOwnProperty("battle_id")){d.battle_id=m.battle_id}if(m.attack_actions&&m.attack_actions.length){d.attack_actions=[];for(var j=0;j<m.attack_actions.length;++j){d.attack_actions[j]=$root.POGOProtos.Data.Battle.BattleAction.toObject(m.attack_actions[j],o)}}if(m.last_retrieved_action!=null&&m.hasOwnProperty("last_retrieved_action")){d.last_retrieved_action=$root.POGOProtos.Data.Battle.BattleAction.toObject(m.last_retrieved_action,o)}if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude")){d.player_latitude=o.json&&!isFinite(m.player_latitude)?String(m.player_latitude):m.player_latitude}if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude")){d.player_longitude=o.json&&!isFinite(m.player_longitude)?String(m.player_longitude):m.player_longitude}return d};AttackGymMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AttackGymMessage}();Messages.AttackRaidBattleMessage=function(){function AttackRaidBattleMessage(p){this.attacker_actions=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AttackRaidBattleMessage.prototype.gym_id="";AttackRaidBattleMessage.prototype.battle_id="";AttackRaidBattleMessage.prototype.attacker_actions=$util.emptyArray;AttackRaidBattleMessage.prototype.last_retrieved_action=null;AttackRaidBattleMessage.prototype.timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;AttackRaidBattleMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(10).string(m.gym_id);if(m.battle_id!=null&&m.hasOwnProperty("battle_id"))w.uint32(18).string(m.battle_id);if(m.attacker_actions!=null&&m.attacker_actions.length){for(var i=0;i<m.attacker_actions.length;++i)$root.POGOProtos.Data.Battle.BattleAction.encode(m.attacker_actions[i],w.uint32(26).fork()).ldelim()}if(m.last_retrieved_action!=null&&m.hasOwnProperty("last_retrieved_action"))$root.POGOProtos.Data.Battle.BattleAction.encode(m.last_retrieved_action,w.uint32(34).fork()).ldelim();if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms"))w.uint32(40).int64(m.timestamp_ms);return w};AttackRaidBattleMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.AttackRaidBattleMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gym_id=r.string();break;case 2:m.battle_id=r.string();break;case 3:if(!(m.attacker_actions&&m.attacker_actions.length))m.attacker_actions=[];m.attacker_actions.push($root.POGOProtos.Data.Battle.BattleAction.decode(r,r.uint32()));break;case 4:m.last_retrieved_action=$root.POGOProtos.Data.Battle.BattleAction.decode(r,r.uint32());break;case 5:m.timestamp_ms=r.int64();break;default:r.skipType(t&7);break}}return m};AttackRaidBattleMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.AttackRaidBattleMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.AttackRaidBattleMessage;if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.battle_id!=null){m.battle_id=String(d.battle_id)}if(d.attacker_actions){if(!Array.isArray(d.attacker_actions))throw TypeError(".POGOProtos.Networking.Requests.Messages.AttackRaidBattleMessage.attacker_actions: array expected");m.attacker_actions=[];for(var i=0;i<d.attacker_actions.length;++i){if(typeof d.attacker_actions[i]!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.AttackRaidBattleMessage.attacker_actions: object expected");m.attacker_actions[i]=$root.POGOProtos.Data.Battle.BattleAction.fromObject(d.attacker_actions[i])}}if(d.last_retrieved_action!=null){if(typeof d.last_retrieved_action!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.AttackRaidBattleMessage.last_retrieved_action: object expected");m.last_retrieved_action=$root.POGOProtos.Data.Battle.BattleAction.fromObject(d.last_retrieved_action)}if(d.timestamp_ms!=null){if($util.Long)(m.timestamp_ms=$util.Long.fromValue(d.timestamp_ms)).unsigned=false;else if(typeof d.timestamp_ms==="string")m.timestamp_ms=parseInt(d.timestamp_ms,10);else if(typeof d.timestamp_ms==="number")m.timestamp_ms=d.timestamp_ms;else if(typeof d.timestamp_ms==="object")m.timestamp_ms=new $util.LongBits(d.timestamp_ms.low>>>0,d.timestamp_ms.high>>>0).toNumber()}return m};AttackRaidBattleMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.attacker_actions=[]}if(o.defaults){d.gym_id="";d.battle_id="";d.last_retrieved_action=null;if($util.Long){var n=new $util.Long(0,0,false);d.timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.timestamp_ms=o.longs===String?"0":0}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.battle_id!=null&&m.hasOwnProperty("battle_id")){d.battle_id=m.battle_id}if(m.attacker_actions&&m.attacker_actions.length){d.attacker_actions=[];for(var j=0;j<m.attacker_actions.length;++j){d.attacker_actions[j]=$root.POGOProtos.Data.Battle.BattleAction.toObject(m.attacker_actions[j],o)}}if(m.last_retrieved_action!=null&&m.hasOwnProperty("last_retrieved_action")){d.last_retrieved_action=$root.POGOProtos.Data.Battle.BattleAction.toObject(m.last_retrieved_action,o)}if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms")){if(typeof m.timestamp_ms==="number")d.timestamp_ms=o.longs===String?String(m.timestamp_ms):m.timestamp_ms;else d.timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.timestamp_ms):o.longs===Number?new $util.LongBits(m.timestamp_ms.low>>>0,m.timestamp_ms.high>>>0).toNumber():m.timestamp_ms}return d};AttackRaidBattleMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AttackRaidBattleMessage}();Messages.AwardFreeRaidTicketMessage=function(){function AwardFreeRaidTicketMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AwardFreeRaidTicketMessage.prototype.gym_id="";AwardFreeRaidTicketMessage.prototype.player_lat_degrees=0;AwardFreeRaidTicketMessage.prototype.player_lng_degrees=0;AwardFreeRaidTicketMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(10).string(m.gym_id);if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees"))w.uint32(17).double(m.player_lat_degrees);if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees"))w.uint32(25).double(m.player_lng_degrees);return w};AwardFreeRaidTicketMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.AwardFreeRaidTicketMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gym_id=r.string();break;case 2:m.player_lat_degrees=r.double();break;case 3:m.player_lng_degrees=r.double();break;default:r.skipType(t&7);break}}return m};AwardFreeRaidTicketMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.AwardFreeRaidTicketMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.AwardFreeRaidTicketMessage;if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.player_lat_degrees!=null){m.player_lat_degrees=Number(d.player_lat_degrees)}if(d.player_lng_degrees!=null){m.player_lng_degrees=Number(d.player_lng_degrees)}return m};AwardFreeRaidTicketMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.gym_id="";d.player_lat_degrees=0;d.player_lng_degrees=0}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees")){d.player_lat_degrees=o.json&&!isFinite(m.player_lat_degrees)?String(m.player_lat_degrees):m.player_lat_degrees}if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees")){d.player_lng_degrees=o.json&&!isFinite(m.player_lng_degrees)?String(m.player_lng_degrees):m.player_lng_degrees}return d};AwardFreeRaidTicketMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AwardFreeRaidTicketMessage}();Messages.BelugaTransactionCompleteMessage=function(){function BelugaTransactionCompleteMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BelugaTransactionCompleteMessage.prototype.beluga_transfer=null;BelugaTransactionCompleteMessage.prototype.app_signature=$util.newBuffer([]);BelugaTransactionCompleteMessage.prototype.firmware_signature=$util.newBuffer([]);BelugaTransactionCompleteMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.beluga_transfer!=null&&m.hasOwnProperty("beluga_transfer"))$root.POGOProtos.Data.Beluga.BelugaBleCompleteTransferRequest.encode(m.beluga_transfer,w.uint32(10).fork()).ldelim();if(m.app_signature!=null&&m.hasOwnProperty("app_signature"))w.uint32(18).bytes(m.app_signature);if(m.firmware_signature!=null&&m.hasOwnProperty("firmware_signature"))w.uint32(26).bytes(m.firmware_signature);return w};BelugaTransactionCompleteMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.BelugaTransactionCompleteMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.beluga_transfer=$root.POGOProtos.Data.Beluga.BelugaBleCompleteTransferRequest.decode(r,r.uint32());break;case 2:m.app_signature=r.bytes();break;case 3:m.firmware_signature=r.bytes();break;default:r.skipType(t&7);break}}return m};BelugaTransactionCompleteMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.BelugaTransactionCompleteMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.BelugaTransactionCompleteMessage;if(d.beluga_transfer!=null){if(typeof d.beluga_transfer!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.BelugaTransactionCompleteMessage.beluga_transfer: object expected");m.beluga_transfer=$root.POGOProtos.Data.Beluga.BelugaBleCompleteTransferRequest.fromObject(d.beluga_transfer)}if(d.app_signature!=null){if(typeof d.app_signature==="string")$util.base64.decode(d.app_signature,m.app_signature=$util.newBuffer($util.base64.length(d.app_signature)),0);else if(d.app_signature.length)m.app_signature=d.app_signature}if(d.firmware_signature!=null){if(typeof d.firmware_signature==="string")$util.base64.decode(d.firmware_signature,m.firmware_signature=$util.newBuffer($util.base64.length(d.firmware_signature)),0);else if(d.firmware_signature.length)m.firmware_signature=d.firmware_signature}return m};BelugaTransactionCompleteMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.beluga_transfer=null;if(o.bytes===String)d.app_signature="";else{d.app_signature=[];if(o.bytes!==Array)d.app_signature=$util.newBuffer(d.app_signature)}if(o.bytes===String)d.firmware_signature="";else{d.firmware_signature=[];if(o.bytes!==Array)d.firmware_signature=$util.newBuffer(d.firmware_signature)}}if(m.beluga_transfer!=null&&m.hasOwnProperty("beluga_transfer")){d.beluga_transfer=$root.POGOProtos.Data.Beluga.BelugaBleCompleteTransferRequest.toObject(m.beluga_transfer,o)}if(m.app_signature!=null&&m.hasOwnProperty("app_signature")){d.app_signature=o.bytes===String?$util.base64.encode(m.app_signature,0,m.app_signature.length):o.bytes===Array?Array.prototype.slice.call(m.app_signature):m.app_signature}if(m.firmware_signature!=null&&m.hasOwnProperty("firmware_signature")){d.firmware_signature=o.bytes===String?$util.base64.encode(m.firmware_signature,0,m.firmware_signature.length):o.bytes===Array?Array.prototype.slice.call(m.firmware_signature):m.firmware_signature}return d};BelugaTransactionCompleteMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BelugaTransactionCompleteMessage}();Messages.BelugaTransactionStartMessage=function(){function BelugaTransactionStartMessage(p){this.pokemon_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BelugaTransactionStartMessage.prototype.pokemon_id=$util.emptyArray;BelugaTransactionStartMessage.prototype.nonce="";BelugaTransactionStartMessage.prototype.beluga_id="";BelugaTransactionStartMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.pokemon_id.length){w.uint32(10).fork();for(var i=0;i<m.pokemon_id.length;++i)w.int64(m.pokemon_id[i]);w.ldelim()}if(m.nonce!=null&&m.hasOwnProperty("nonce"))w.uint32(18).string(m.nonce);if(m.beluga_id!=null&&m.hasOwnProperty("beluga_id"))w.uint32(26).string(m.beluga_id);return w};BelugaTransactionStartMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.BelugaTransactionStartMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.pokemon_id&&m.pokemon_id.length))m.pokemon_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.pokemon_id.push(r.int64())}else m.pokemon_id.push(r.int64());break;case 2:m.nonce=r.string();break;case 3:m.beluga_id=r.string();break;default:r.skipType(t&7);break}}return m};BelugaTransactionStartMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.BelugaTransactionStartMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.BelugaTransactionStartMessage;if(d.pokemon_id){if(!Array.isArray(d.pokemon_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.BelugaTransactionStartMessage.pokemon_id: array expected");m.pokemon_id=[];for(var i=0;i<d.pokemon_id.length;++i){if($util.Long)(m.pokemon_id[i]=$util.Long.fromValue(d.pokemon_id[i])).unsigned=false;else if(typeof d.pokemon_id[i]==="string")m.pokemon_id[i]=parseInt(d.pokemon_id[i],10);else if(typeof d.pokemon_id[i]==="number")m.pokemon_id[i]=d.pokemon_id[i];else if(typeof d.pokemon_id[i]==="object")m.pokemon_id[i]=new $util.LongBits(d.pokemon_id[i].low>>>0,d.pokemon_id[i].high>>>0).toNumber()}}if(d.nonce!=null){m.nonce=String(d.nonce)}if(d.beluga_id!=null){m.beluga_id=String(d.beluga_id)}return m};BelugaTransactionStartMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.pokemon_id=[]}if(o.defaults){d.nonce="";d.beluga_id=""}if(m.pokemon_id&&m.pokemon_id.length){d.pokemon_id=[];for(var j=0;j<m.pokemon_id.length;++j){if(typeof m.pokemon_id[j]==="number")d.pokemon_id[j]=o.longs===String?String(m.pokemon_id[j]):m.pokemon_id[j];else d.pokemon_id[j]=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id[j]):o.longs===Number?new $util.LongBits(m.pokemon_id[j].low>>>0,m.pokemon_id[j].high>>>0).toNumber():m.pokemon_id[j]}}if(m.nonce!=null&&m.hasOwnProperty("nonce")){d.nonce=m.nonce}if(m.beluga_id!=null&&m.hasOwnProperty("beluga_id")){d.beluga_id=m.beluga_id}return d};BelugaTransactionStartMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BelugaTransactionStartMessage}();Messages.CancelCombatChallengeMessage=function(){function CancelCombatChallengeMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CancelCombatChallengeMessage.prototype.challenge_id="";CancelCombatChallengeMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id"))w.uint32(10).string(m.challenge_id);return w};CancelCombatChallengeMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.CancelCombatChallengeMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.challenge_id=r.string();break;default:r.skipType(t&7);break}}return m};CancelCombatChallengeMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.CancelCombatChallengeMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.CancelCombatChallengeMessage;if(d.challenge_id!=null){m.challenge_id=String(d.challenge_id)}return m};CancelCombatChallengeMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.challenge_id=""}if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id")){d.challenge_id=m.challenge_id}return d};CancelCombatChallengeMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CancelCombatChallengeMessage}();Messages.CancelTradingMessage=function(){function CancelTradingMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CancelTradingMessage.prototype.player_id="";CancelTradingMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);return w};CancelTradingMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.CancelTradingMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;default:r.skipType(t&7);break}}return m};CancelTradingMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.CancelTradingMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.CancelTradingMessage;if(d.player_id!=null){m.player_id=String(d.player_id)}return m};CancelTradingMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id=""}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}return d};CancelTradingMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CancelTradingMessage}();Messages.CatchPokemonMessage=function(){function CatchPokemonMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CatchPokemonMessage.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,false):0;CatchPokemonMessage.prototype.pokeball=0;CatchPokemonMessage.prototype.normalized_reticle_size=0;CatchPokemonMessage.prototype.spawn_point_id="";CatchPokemonMessage.prototype.hit_pokemon=false;CatchPokemonMessage.prototype.spin_modifier=0;CatchPokemonMessage.prototype.normalized_hit_position=0;CatchPokemonMessage.prototype.ar_plus_values=null;CatchPokemonMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(9).fixed64(m.encounter_id);if(m.pokeball!=null&&m.hasOwnProperty("pokeball"))w.uint32(16).int32(m.pokeball);if(m.normalized_reticle_size!=null&&m.hasOwnProperty("normalized_reticle_size"))w.uint32(25).double(m.normalized_reticle_size);if(m.spawn_point_id!=null&&m.hasOwnProperty("spawn_point_id"))w.uint32(34).string(m.spawn_point_id);if(m.hit_pokemon!=null&&m.hasOwnProperty("hit_pokemon"))w.uint32(40).bool(m.hit_pokemon);if(m.spin_modifier!=null&&m.hasOwnProperty("spin_modifier"))w.uint32(49).double(m.spin_modifier);if(m.normalized_hit_position!=null&&m.hasOwnProperty("normalized_hit_position"))w.uint32(57).double(m.normalized_hit_position);if(m.ar_plus_values!=null&&m.hasOwnProperty("ar_plus_values"))$root.POGOProtos.Data.ARPlusEncounterValues.encode(m.ar_plus_values,w.uint32(66).fork()).ldelim();return w};CatchPokemonMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.CatchPokemonMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.encounter_id=r.fixed64();break;case 2:m.pokeball=r.int32();break;case 3:m.normalized_reticle_size=r.double();break;case 4:m.spawn_point_id=r.string();break;case 5:m.hit_pokemon=r.bool();break;case 6:m.spin_modifier=r.double();break;case 7:m.normalized_hit_position=r.double();break;case 8:m.ar_plus_values=$root.POGOProtos.Data.ARPlusEncounterValues.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};CatchPokemonMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.CatchPokemonMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.CatchPokemonMessage;if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=false;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber()}switch(d.pokeball){case"ITEM_UNKNOWN":case 0:m.pokeball=0;break;case"ITEM_POKE_BALL":case 1:m.pokeball=1;break;case"ITEM_GREAT_BALL":case 2:m.pokeball=2;break;case"ITEM_ULTRA_BALL":case 3:m.pokeball=3;break;case"ITEM_MASTER_BALL":case 4:m.pokeball=4;break;case"ITEM_PREMIER_BALL":case 5:m.pokeball=5;break;case"ITEM_POTION":case 101:m.pokeball=101;break;case"ITEM_SUPER_POTION":case 102:m.pokeball=102;break;case"ITEM_HYPER_POTION":case 103:m.pokeball=103;break;case"ITEM_MAX_POTION":case 104:m.pokeball=104;break;case"ITEM_REVIVE":case 201:m.pokeball=201;break;case"ITEM_MAX_REVIVE":case 202:m.pokeball=202;break;case"ITEM_LUCKY_EGG":case 301:m.pokeball=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.pokeball=401;break;case"ITEM_INCENSE_SPICY":case 402:m.pokeball=402;break;case"ITEM_INCENSE_COOL":case 403:m.pokeball=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.pokeball=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.pokeball=405;break;case"ITEM_TROY_DISK":case 501:m.pokeball=501;break;case"ITEM_X_ATTACK":case 602:m.pokeball=602;break;case"ITEM_X_DEFENSE":case 603:m.pokeball=603;break;case"ITEM_X_MIRACLE":case 604:m.pokeball=604;break;case"ITEM_RAZZ_BERRY":case 701:m.pokeball=701;break;case"ITEM_BLUK_BERRY":case 702:m.pokeball=702;break;case"ITEM_NANAB_BERRY":case 703:m.pokeball=703;break;case"ITEM_WEPAR_BERRY":case 704:m.pokeball=704;break;case"ITEM_PINAP_BERRY":case 705:m.pokeball=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.pokeball=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.pokeball=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.pokeball=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.pokeball=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.pokeball=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.pokeball=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.pokeball=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.pokeball=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.pokeball=1002;break;case"ITEM_SUN_STONE":case 1101:m.pokeball=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.pokeball=1102;break;case"ITEM_METAL_COAT":case 1103:m.pokeball=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.pokeball=1104;break;case"ITEM_UP_GRADE":case 1105:m.pokeball=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.pokeball=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.pokeball=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.pokeball=1202;break;case"ITEM_RARE_CANDY":case 1301:m.pokeball=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.pokeball=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.pokeball=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.pokeball=1403;break;case"ITEM_STAR_PIECE":case 1404:m.pokeball=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.pokeball=1405;break}if(d.normalized_reticle_size!=null){m.normalized_reticle_size=Number(d.normalized_reticle_size)}if(d.spawn_point_id!=null){m.spawn_point_id=String(d.spawn_point_id)}if(d.hit_pokemon!=null){m.hit_pokemon=Boolean(d.hit_pokemon)}if(d.spin_modifier!=null){m.spin_modifier=Number(d.spin_modifier)}if(d.normalized_hit_position!=null){m.normalized_hit_position=Number(d.normalized_hit_position)}if(d.ar_plus_values!=null){if(typeof d.ar_plus_values!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.CatchPokemonMessage.ar_plus_values: object expected");m.ar_plus_values=$root.POGOProtos.Data.ARPlusEncounterValues.fromObject(d.ar_plus_values)}return m};CatchPokemonMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0;d.pokeball=o.enums===String?"ITEM_UNKNOWN":0;d.normalized_reticle_size=0;d.spawn_point_id="";d.hit_pokemon=false;d.spin_modifier=0;d.normalized_hit_position=0;d.ar_plus_values=null}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber():m.encounter_id}if(m.pokeball!=null&&m.hasOwnProperty("pokeball")){d.pokeball=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.pokeball]:m.pokeball}if(m.normalized_reticle_size!=null&&m.hasOwnProperty("normalized_reticle_size")){d.normalized_reticle_size=o.json&&!isFinite(m.normalized_reticle_size)?String(m.normalized_reticle_size):m.normalized_reticle_size}if(m.spawn_point_id!=null&&m.hasOwnProperty("spawn_point_id")){d.spawn_point_id=m.spawn_point_id}if(m.hit_pokemon!=null&&m.hasOwnProperty("hit_pokemon")){d.hit_pokemon=m.hit_pokemon}if(m.spin_modifier!=null&&m.hasOwnProperty("spin_modifier")){d.spin_modifier=o.json&&!isFinite(m.spin_modifier)?String(m.spin_modifier):m.spin_modifier}if(m.normalized_hit_position!=null&&m.hasOwnProperty("normalized_hit_position")){d.normalized_hit_position=o.json&&!isFinite(m.normalized_hit_position)?String(m.normalized_hit_position):m.normalized_hit_position}if(m.ar_plus_values!=null&&m.hasOwnProperty("ar_plus_values")){d.ar_plus_values=$root.POGOProtos.Data.ARPlusEncounterValues.toObject(m.ar_plus_values,o)}return d};CatchPokemonMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CatchPokemonMessage}();Messages.CheckAwardedBadgesMessage=function(){function CheckAwardedBadgesMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CheckAwardedBadgesMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};CheckAwardedBadgesMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.CheckAwardedBadgesMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};CheckAwardedBadgesMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.CheckAwardedBadgesMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.CheckAwardedBadgesMessage};CheckAwardedBadgesMessage.toObject=function toObject(){return{}};CheckAwardedBadgesMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CheckAwardedBadgesMessage}();Messages.CheckChallengeMessage=function(){function CheckChallengeMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CheckChallengeMessage.prototype.debug_request=false;CheckChallengeMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.debug_request!=null&&m.hasOwnProperty("debug_request"))w.uint32(8).bool(m.debug_request);return w};CheckChallengeMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.CheckChallengeMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.debug_request=r.bool();break;default:r.skipType(t&7);break}}return m};CheckChallengeMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.CheckChallengeMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.CheckChallengeMessage;if(d.debug_request!=null){m.debug_request=Boolean(d.debug_request)}return m};CheckChallengeMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.debug_request=false}if(m.debug_request!=null&&m.hasOwnProperty("debug_request")){d.debug_request=m.debug_request}return d};CheckChallengeMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CheckChallengeMessage}();Messages.CheckSendGiftMessage=function(){function CheckSendGiftMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CheckSendGiftMessage.prototype.player_id="";CheckSendGiftMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);return w};CheckSendGiftMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.CheckSendGiftMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;default:r.skipType(t&7);break}}return m};CheckSendGiftMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.CheckSendGiftMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.CheckSendGiftMessage;if(d.player_id!=null){m.player_id=String(d.player_id)}return m};CheckSendGiftMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id=""}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}return d};CheckSendGiftMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CheckSendGiftMessage}();Messages.CheckShareExRaidPassMessage=function(){function CheckShareExRaidPassMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CheckShareExRaidPassMessage.prototype.friend_id="";CheckShareExRaidPassMessage.prototype.fort_id="";CheckShareExRaidPassMessage.prototype.raid_seed=$util.Long?$util.Long.fromBits(0,0,false):0;CheckShareExRaidPassMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.friend_id!=null&&m.hasOwnProperty("friend_id"))w.uint32(10).string(m.friend_id);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(18).string(m.fort_id);if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed"))w.uint32(24).int64(m.raid_seed);return w};CheckShareExRaidPassMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.CheckShareExRaidPassMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.friend_id=r.string();break;case 2:m.fort_id=r.string();break;case 3:m.raid_seed=r.int64();break;default:r.skipType(t&7);break}}return m};CheckShareExRaidPassMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.CheckShareExRaidPassMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.CheckShareExRaidPassMessage;if(d.friend_id!=null){m.friend_id=String(d.friend_id)}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.raid_seed!=null){if($util.Long)(m.raid_seed=$util.Long.fromValue(d.raid_seed)).unsigned=false;else if(typeof d.raid_seed==="string")m.raid_seed=parseInt(d.raid_seed,10);else if(typeof d.raid_seed==="number")m.raid_seed=d.raid_seed;else if(typeof d.raid_seed==="object")m.raid_seed=new $util.LongBits(d.raid_seed.low>>>0,d.raid_seed.high>>>0).toNumber()}return m};CheckShareExRaidPassMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.friend_id="";d.fort_id="";if($util.Long){var n=new $util.Long(0,0,false);d.raid_seed=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_seed=o.longs===String?"0":0}if(m.friend_id!=null&&m.hasOwnProperty("friend_id")){d.friend_id=m.friend_id}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed")){if(typeof m.raid_seed==="number")d.raid_seed=o.longs===String?String(m.raid_seed):m.raid_seed;else d.raid_seed=o.longs===String?$util.Long.prototype.toString.call(m.raid_seed):o.longs===Number?new $util.LongBits(m.raid_seed.low>>>0,m.raid_seed.high>>>0).toNumber():m.raid_seed}return d};CheckShareExRaidPassMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CheckShareExRaidPassMessage}();Messages.ClaimCodenameMessage=function(){function ClaimCodenameMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ClaimCodenameMessage.prototype.codename="";ClaimCodenameMessage.prototype.force=false;ClaimCodenameMessage.prototype.generate_suggested_codenames=false;ClaimCodenameMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.codename!=null&&m.hasOwnProperty("codename"))w.uint32(10).string(m.codename);if(m.force!=null&&m.hasOwnProperty("force"))w.uint32(16).bool(m.force);if(m.generate_suggested_codenames!=null&&m.hasOwnProperty("generate_suggested_codenames"))w.uint32(24).bool(m.generate_suggested_codenames);return w};ClaimCodenameMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.ClaimCodenameMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.codename=r.string();break;case 2:m.force=r.bool();break;case 3:m.generate_suggested_codenames=r.bool();break;default:r.skipType(t&7);break}}return m};ClaimCodenameMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.ClaimCodenameMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.ClaimCodenameMessage;if(d.codename!=null){m.codename=String(d.codename)}if(d.force!=null){m.force=Boolean(d.force)}if(d.generate_suggested_codenames!=null){m.generate_suggested_codenames=Boolean(d.generate_suggested_codenames)}return m};ClaimCodenameMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.codename="";d.force=false;d.generate_suggested_codenames=false}if(m.codename!=null&&m.hasOwnProperty("codename")){d.codename=m.codename}if(m.force!=null&&m.hasOwnProperty("force")){d.force=m.force}if(m.generate_suggested_codenames!=null&&m.hasOwnProperty("generate_suggested_codenames")){d.generate_suggested_codenames=m.generate_suggested_codenames}return d};ClaimCodenameMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ClaimCodenameMessage}();Messages.CollectDailyBonusMessage=function(){function CollectDailyBonusMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CollectDailyBonusMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};CollectDailyBonusMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.CollectDailyBonusMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};CollectDailyBonusMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.CollectDailyBonusMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.CollectDailyBonusMessage};CollectDailyBonusMessage.toObject=function toObject(){return{}};CollectDailyBonusMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CollectDailyBonusMessage}();Messages.CollectDailyDefenderBonusMessage=function(){function CollectDailyDefenderBonusMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CollectDailyDefenderBonusMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};CollectDailyDefenderBonusMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.CollectDailyDefenderBonusMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};CollectDailyDefenderBonusMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.CollectDailyDefenderBonusMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.CollectDailyDefenderBonusMessage};CollectDailyDefenderBonusMessage.toObject=function toObject(){return{}};CollectDailyDefenderBonusMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CollectDailyDefenderBonusMessage}();Messages.CombatFriendRequestMessage=function(){function CombatFriendRequestMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatFriendRequestMessage.prototype.combat_id="";CombatFriendRequestMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.combat_id!=null&&m.hasOwnProperty("combat_id"))w.uint32(10).string(m.combat_id);return w};CombatFriendRequestMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.CombatFriendRequestMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.combat_id=r.string();break;default:r.skipType(t&7);break}}return m};CombatFriendRequestMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.CombatFriendRequestMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.CombatFriendRequestMessage;if(d.combat_id!=null){m.combat_id=String(d.combat_id)}return m};CombatFriendRequestMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.combat_id=""}if(m.combat_id!=null&&m.hasOwnProperty("combat_id")){d.combat_id=m.combat_id}return d};CombatFriendRequestMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatFriendRequestMessage}();Messages.CompleteQuestMessage=function(){function CompleteQuestMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CompleteQuestMessage.prototype.quest_id="";CompleteQuestMessage.prototype.sub_quest_id="";CompleteQuestMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.quest_id!=null&&m.hasOwnProperty("quest_id"))w.uint32(10).string(m.quest_id);if(m.sub_quest_id!=null&&m.hasOwnProperty("sub_quest_id"))w.uint32(18).string(m.sub_quest_id);return w};CompleteQuestMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.CompleteQuestMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.quest_id=r.string();break;case 2:m.sub_quest_id=r.string();break;default:r.skipType(t&7);break}}return m};CompleteQuestMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.CompleteQuestMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.CompleteQuestMessage;if(d.quest_id!=null){m.quest_id=String(d.quest_id)}if(d.sub_quest_id!=null){m.sub_quest_id=String(d.sub_quest_id)}return m};CompleteQuestMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.quest_id="";d.sub_quest_id=""}if(m.quest_id!=null&&m.hasOwnProperty("quest_id")){d.quest_id=m.quest_id}if(m.sub_quest_id!=null&&m.hasOwnProperty("sub_quest_id")){d.sub_quest_id=m.sub_quest_id}return d};CompleteQuestMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CompleteQuestMessage}();Messages.CompleteQuestStampCardMessage=function(){function CompleteQuestStampCardMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CompleteQuestStampCardMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};CompleteQuestStampCardMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.CompleteQuestStampCardMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};CompleteQuestStampCardMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.CompleteQuestStampCardMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.CompleteQuestStampCardMessage};CompleteQuestStampCardMessage.toObject=function toObject(){return{}};CompleteQuestStampCardMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CompleteQuestStampCardMessage}();Messages.ConfirmTradingMessage=function(){function ConfirmTradingMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ConfirmTradingMessage.prototype.player_id="";ConfirmTradingMessage.prototype.transaction_log="";ConfirmTradingMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);if(m.transaction_log!=null&&m.hasOwnProperty("transaction_log"))w.uint32(18).string(m.transaction_log);return w};ConfirmTradingMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.ConfirmTradingMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;case 2:m.transaction_log=r.string();break;default:r.skipType(t&7);break}}return m};ConfirmTradingMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.ConfirmTradingMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.ConfirmTradingMessage;if(d.player_id!=null){m.player_id=String(d.player_id)}if(d.transaction_log!=null){m.transaction_log=String(d.transaction_log)}return m};ConfirmTradingMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id="";d.transaction_log=""}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}if(m.transaction_log!=null&&m.hasOwnProperty("transaction_log")){d.transaction_log=m.transaction_log}return d};ConfirmTradingMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ConfirmTradingMessage}();Messages.CreateCombatChallengeMessage=function(){function CreateCombatChallengeMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CreateCombatChallengeMessage.prototype.challenge_id="";CreateCombatChallengeMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id"))w.uint32(10).string(m.challenge_id);return w};CreateCombatChallengeMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.CreateCombatChallengeMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.challenge_id=r.string();break;default:r.skipType(t&7);break}}return m};CreateCombatChallengeMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.CreateCombatChallengeMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.CreateCombatChallengeMessage;if(d.challenge_id!=null){m.challenge_id=String(d.challenge_id)}return m};CreateCombatChallengeMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.challenge_id=""}if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id")){d.challenge_id=m.challenge_id}return d};CreateCombatChallengeMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CreateCombatChallengeMessage}();Messages.DeclineCombatChallengeMessage=function(){function DeclineCombatChallengeMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DeclineCombatChallengeMessage.prototype.challenge_id="";DeclineCombatChallengeMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id"))w.uint32(10).string(m.challenge_id);return w};DeclineCombatChallengeMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.DeclineCombatChallengeMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.challenge_id=r.string();break;default:r.skipType(t&7);break}}return m};DeclineCombatChallengeMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.DeclineCombatChallengeMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.DeclineCombatChallengeMessage;if(d.challenge_id!=null){m.challenge_id=String(d.challenge_id)}return m};DeclineCombatChallengeMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.challenge_id=""}if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id")){d.challenge_id=m.challenge_id}return d};DeclineCombatChallengeMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DeclineCombatChallengeMessage}();Messages.DeclineSharedExRaidPassMessage=function(){function DeclineSharedExRaidPassMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DeclineSharedExRaidPassMessage.prototype.fort_id="";DeclineSharedExRaidPassMessage.prototype.raid_seed=$util.Long?$util.Long.fromBits(0,0,false):0;DeclineSharedExRaidPassMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(10).string(m.fort_id);if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed"))w.uint32(16).int64(m.raid_seed);return w};DeclineSharedExRaidPassMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.DeclineSharedExRaidPassMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fort_id=r.string();break;case 2:m.raid_seed=r.int64();break;default:r.skipType(t&7);break}}return m};DeclineSharedExRaidPassMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.DeclineSharedExRaidPassMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.DeclineSharedExRaidPassMessage;if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.raid_seed!=null){if($util.Long)(m.raid_seed=$util.Long.fromValue(d.raid_seed)).unsigned=false;else if(typeof d.raid_seed==="string")m.raid_seed=parseInt(d.raid_seed,10);else if(typeof d.raid_seed==="number")m.raid_seed=d.raid_seed;else if(typeof d.raid_seed==="object")m.raid_seed=new $util.LongBits(d.raid_seed.low>>>0,d.raid_seed.high>>>0).toNumber()}return m};DeclineSharedExRaidPassMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.fort_id="";if($util.Long){var n=new $util.Long(0,0,false);d.raid_seed=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_seed=o.longs===String?"0":0}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed")){if(typeof m.raid_seed==="number")d.raid_seed=o.longs===String?String(m.raid_seed):m.raid_seed;else d.raid_seed=o.longs===String?$util.Long.prototype.toString.call(m.raid_seed):o.longs===Number?new $util.LongBits(m.raid_seed.low>>>0,m.raid_seed.high>>>0).toNumber():m.raid_seed}return d};DeclineSharedExRaidPassMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DeclineSharedExRaidPassMessage}();Messages.DeleteGiftFromInventoryMessage=function(){function DeleteGiftFromInventoryMessage(p){this.giftbox_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DeleteGiftFromInventoryMessage.prototype.giftbox_id=$util.emptyArray;DeleteGiftFromInventoryMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.giftbox_id!=null&&m.giftbox_id.length){w.uint32(10).fork();for(var i=0;i<m.giftbox_id.length;++i)w.uint64(m.giftbox_id[i]);w.ldelim()}return w};DeleteGiftFromInventoryMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.DeleteGiftFromInventoryMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.giftbox_id&&m.giftbox_id.length))m.giftbox_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.giftbox_id.push(r.uint64())}else m.giftbox_id.push(r.uint64());break;default:r.skipType(t&7);break}}return m};DeleteGiftFromInventoryMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.DeleteGiftFromInventoryMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.DeleteGiftFromInventoryMessage;if(d.giftbox_id){if(!Array.isArray(d.giftbox_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.DeleteGiftFromInventoryMessage.giftbox_id: array expected");m.giftbox_id=[];for(var i=0;i<d.giftbox_id.length;++i){if($util.Long)(m.giftbox_id[i]=$util.Long.fromValue(d.giftbox_id[i])).unsigned=true;else if(typeof d.giftbox_id[i]==="string")m.giftbox_id[i]=parseInt(d.giftbox_id[i],10);else if(typeof d.giftbox_id[i]==="number")m.giftbox_id[i]=d.giftbox_id[i];else if(typeof d.giftbox_id[i]==="object")m.giftbox_id[i]=new $util.LongBits(d.giftbox_id[i].low>>>0,d.giftbox_id[i].high>>>0).toNumber(true)}}return m};DeleteGiftFromInventoryMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.giftbox_id=[]}if(m.giftbox_id&&m.giftbox_id.length){d.giftbox_id=[];for(var j=0;j<m.giftbox_id.length;++j){if(typeof m.giftbox_id[j]==="number")d.giftbox_id[j]=o.longs===String?String(m.giftbox_id[j]):m.giftbox_id[j];else d.giftbox_id[j]=o.longs===String?$util.Long.prototype.toString.call(m.giftbox_id[j]):o.longs===Number?new $util.LongBits(m.giftbox_id[j].low>>>0,m.giftbox_id[j].high>>>0).toNumber(true):m.giftbox_id[j]}}return d};DeleteGiftFromInventoryMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DeleteGiftFromInventoryMessage}();Messages.DeleteGiftMessage=function(){function DeleteGiftMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DeleteGiftMessage.prototype.player_id="";DeleteGiftMessage.prototype.giftbox_id=$util.Long?$util.Long.fromBits(0,0,false):0;DeleteGiftMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);if(m.giftbox_id!=null&&m.hasOwnProperty("giftbox_id"))w.uint32(17).fixed64(m.giftbox_id);return w};DeleteGiftMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.DeleteGiftMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;case 2:m.giftbox_id=r.fixed64();break;default:r.skipType(t&7);break}}return m};DeleteGiftMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.DeleteGiftMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.DeleteGiftMessage;if(d.player_id!=null){m.player_id=String(d.player_id)}if(d.giftbox_id!=null){if($util.Long)(m.giftbox_id=$util.Long.fromValue(d.giftbox_id)).unsigned=false;else if(typeof d.giftbox_id==="string")m.giftbox_id=parseInt(d.giftbox_id,10);else if(typeof d.giftbox_id==="number")m.giftbox_id=d.giftbox_id;else if(typeof d.giftbox_id==="object")m.giftbox_id=new $util.LongBits(d.giftbox_id.low>>>0,d.giftbox_id.high>>>0).toNumber()}return m};DeleteGiftMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id="";if($util.Long){var n=new $util.Long(0,0,false);d.giftbox_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.giftbox_id=o.longs===String?"0":0}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}if(m.giftbox_id!=null&&m.hasOwnProperty("giftbox_id")){if(typeof m.giftbox_id==="number")d.giftbox_id=o.longs===String?String(m.giftbox_id):m.giftbox_id;else d.giftbox_id=o.longs===String?$util.Long.prototype.toString.call(m.giftbox_id):o.longs===Number?new $util.LongBits(m.giftbox_id.low>>>0,m.giftbox_id.high>>>0).toNumber():m.giftbox_id}return d};DeleteGiftMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DeleteGiftMessage}();Messages.DiskEncounterMessage=function(){function DiskEncounterMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DiskEncounterMessage.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,true):0;DiskEncounterMessage.prototype.fort_id="";DiskEncounterMessage.prototype.player_latitude=0;DiskEncounterMessage.prototype.player_longitude=0;DiskEncounterMessage.prototype.gym_lat_degrees=0;DiskEncounterMessage.prototype.gym_lng_degrees=0;DiskEncounterMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(8).uint64(m.encounter_id);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(18).string(m.fort_id);if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude"))w.uint32(25).double(m.player_latitude);if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude"))w.uint32(33).double(m.player_longitude);if(m.gym_lat_degrees!=null&&m.hasOwnProperty("gym_lat_degrees"))w.uint32(41).double(m.gym_lat_degrees);if(m.gym_lng_degrees!=null&&m.hasOwnProperty("gym_lng_degrees"))w.uint32(49).double(m.gym_lng_degrees);return w};DiskEncounterMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.DiskEncounterMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.encounter_id=r.uint64();break;case 2:m.fort_id=r.string();break;case 3:m.player_latitude=r.double();break;case 4:m.player_longitude=r.double();break;case 5:m.gym_lat_degrees=r.double();break;case 6:m.gym_lng_degrees=r.double();break;default:r.skipType(t&7);break}}return m};DiskEncounterMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.DiskEncounterMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.DiskEncounterMessage;if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=true;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber(true)}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.player_latitude!=null){m.player_latitude=Number(d.player_latitude)}if(d.player_longitude!=null){m.player_longitude=Number(d.player_longitude)}if(d.gym_lat_degrees!=null){m.gym_lat_degrees=Number(d.gym_lat_degrees)}if(d.gym_lng_degrees!=null){m.gym_lng_degrees=Number(d.gym_lng_degrees)}return m};DiskEncounterMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,true);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0;d.fort_id="";d.player_latitude=0;d.player_longitude=0;d.gym_lat_degrees=0;d.gym_lng_degrees=0}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber(true):m.encounter_id}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude")){d.player_latitude=o.json&&!isFinite(m.player_latitude)?String(m.player_latitude):m.player_latitude}if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude")){d.player_longitude=o.json&&!isFinite(m.player_longitude)?String(m.player_longitude):m.player_longitude}if(m.gym_lat_degrees!=null&&m.hasOwnProperty("gym_lat_degrees")){d.gym_lat_degrees=o.json&&!isFinite(m.gym_lat_degrees)?String(m.gym_lat_degrees):m.gym_lat_degrees}if(m.gym_lng_degrees!=null&&m.hasOwnProperty("gym_lng_degrees")){d.gym_lng_degrees=o.json&&!isFinite(m.gym_lng_degrees)?String(m.gym_lng_degrees):m.gym_lng_degrees}return d};DiskEncounterMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DiskEncounterMessage}();Messages.DownloadGmTemplatesMessage=function(){function DownloadGmTemplatesMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DownloadGmTemplatesMessage.prototype.basis_batch_id=$util.Long?$util.Long.fromBits(0,0,false):0;DownloadGmTemplatesMessage.prototype.batch_id=$util.Long?$util.Long.fromBits(0,0,false):0;DownloadGmTemplatesMessage.prototype.page_offset=0;DownloadGmTemplatesMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.basis_batch_id!=null&&m.hasOwnProperty("basis_batch_id"))w.uint32(8).int64(m.basis_batch_id);if(m.batch_id!=null&&m.hasOwnProperty("batch_id"))w.uint32(16).int64(m.batch_id);if(m.page_offset!=null&&m.hasOwnProperty("page_offset"))w.uint32(24).int32(m.page_offset);return w};DownloadGmTemplatesMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.DownloadGmTemplatesMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.basis_batch_id=r.int64();break;case 2:m.batch_id=r.int64();break;case 3:m.page_offset=r.int32();break;default:r.skipType(t&7);break}}return m};DownloadGmTemplatesMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.DownloadGmTemplatesMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.DownloadGmTemplatesMessage;if(d.basis_batch_id!=null){if($util.Long)(m.basis_batch_id=$util.Long.fromValue(d.basis_batch_id)).unsigned=false;else if(typeof d.basis_batch_id==="string")m.basis_batch_id=parseInt(d.basis_batch_id,10);else if(typeof d.basis_batch_id==="number")m.basis_batch_id=d.basis_batch_id;else if(typeof d.basis_batch_id==="object")m.basis_batch_id=new $util.LongBits(d.basis_batch_id.low>>>0,d.basis_batch_id.high>>>0).toNumber()}if(d.batch_id!=null){if($util.Long)(m.batch_id=$util.Long.fromValue(d.batch_id)).unsigned=false;else if(typeof d.batch_id==="string")m.batch_id=parseInt(d.batch_id,10);else if(typeof d.batch_id==="number")m.batch_id=d.batch_id;else if(typeof d.batch_id==="object")m.batch_id=new $util.LongBits(d.batch_id.low>>>0,d.batch_id.high>>>0).toNumber()}if(d.page_offset!=null){m.page_offset=d.page_offset|0}return m};DownloadGmTemplatesMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.basis_batch_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.basis_batch_id=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.batch_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.batch_id=o.longs===String?"0":0;d.page_offset=0}if(m.basis_batch_id!=null&&m.hasOwnProperty("basis_batch_id")){if(typeof m.basis_batch_id==="number")d.basis_batch_id=o.longs===String?String(m.basis_batch_id):m.basis_batch_id;else d.basis_batch_id=o.longs===String?$util.Long.prototype.toString.call(m.basis_batch_id):o.longs===Number?new $util.LongBits(m.basis_batch_id.low>>>0,m.basis_batch_id.high>>>0).toNumber():m.basis_batch_id}if(m.batch_id!=null&&m.hasOwnProperty("batch_id")){if(typeof m.batch_id==="number")d.batch_id=o.longs===String?String(m.batch_id):m.batch_id;else d.batch_id=o.longs===String?$util.Long.prototype.toString.call(m.batch_id):o.longs===Number?new $util.LongBits(m.batch_id.low>>>0,m.batch_id.high>>>0).toNumber():m.batch_id}if(m.page_offset!=null&&m.hasOwnProperty("page_offset")){d.page_offset=m.page_offset}return d};DownloadGmTemplatesMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DownloadGmTemplatesMessage}();Messages.DownloadItemTemplatesMessage=function(){function DownloadItemTemplatesMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DownloadItemTemplatesMessage.prototype.paginate=false;DownloadItemTemplatesMessage.prototype.page_offset=0;DownloadItemTemplatesMessage.prototype.page_timestamp=$util.Long?$util.Long.fromBits(0,0,true):0;DownloadItemTemplatesMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.paginate!=null&&m.hasOwnProperty("paginate"))w.uint32(8).bool(m.paginate);if(m.page_offset!=null&&m.hasOwnProperty("page_offset"))w.uint32(16).int32(m.page_offset);if(m.page_timestamp!=null&&m.hasOwnProperty("page_timestamp"))w.uint32(24).uint64(m.page_timestamp);return w};DownloadItemTemplatesMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.DownloadItemTemplatesMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.paginate=r.bool();break;case 2:m.page_offset=r.int32();break;case 3:m.page_timestamp=r.uint64();break;default:r.skipType(t&7);break}}return m};DownloadItemTemplatesMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.DownloadItemTemplatesMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.DownloadItemTemplatesMessage;if(d.paginate!=null){m.paginate=Boolean(d.paginate)}if(d.page_offset!=null){m.page_offset=d.page_offset|0}if(d.page_timestamp!=null){if($util.Long)(m.page_timestamp=$util.Long.fromValue(d.page_timestamp)).unsigned=true;else if(typeof d.page_timestamp==="string")m.page_timestamp=parseInt(d.page_timestamp,10);else if(typeof d.page_timestamp==="number")m.page_timestamp=d.page_timestamp;else if(typeof d.page_timestamp==="object")m.page_timestamp=new $util.LongBits(d.page_timestamp.low>>>0,d.page_timestamp.high>>>0).toNumber(true)}return m};DownloadItemTemplatesMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.paginate=false;d.page_offset=0;if($util.Long){var n=new $util.Long(0,0,true);d.page_timestamp=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.page_timestamp=o.longs===String?"0":0}if(m.paginate!=null&&m.hasOwnProperty("paginate")){d.paginate=m.paginate}if(m.page_offset!=null&&m.hasOwnProperty("page_offset")){d.page_offset=m.page_offset}if(m.page_timestamp!=null&&m.hasOwnProperty("page_timestamp")){if(typeof m.page_timestamp==="number")d.page_timestamp=o.longs===String?String(m.page_timestamp):m.page_timestamp;else d.page_timestamp=o.longs===String?$util.Long.prototype.toString.call(m.page_timestamp):o.longs===Number?new $util.LongBits(m.page_timestamp.low>>>0,m.page_timestamp.high>>>0).toNumber(true):m.page_timestamp}return d};DownloadItemTemplatesMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DownloadItemTemplatesMessage}();Messages.DownloadRemoteConfigVersionMessage=function(){function DownloadRemoteConfigVersionMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DownloadRemoteConfigVersionMessage.prototype.platform=0;DownloadRemoteConfigVersionMessage.prototype.device_manufacturer="";DownloadRemoteConfigVersionMessage.prototype.device_model="";DownloadRemoteConfigVersionMessage.prototype.locale="";DownloadRemoteConfigVersionMessage.prototype.app_version=0;DownloadRemoteConfigVersionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.platform!=null&&m.hasOwnProperty("platform"))w.uint32(8).int32(m.platform);if(m.device_manufacturer!=null&&m.hasOwnProperty("device_manufacturer"))w.uint32(18).string(m.device_manufacturer);if(m.device_model!=null&&m.hasOwnProperty("device_model"))w.uint32(26).string(m.device_model);if(m.locale!=null&&m.hasOwnProperty("locale"))w.uint32(34).string(m.locale);if(m.app_version!=null&&m.hasOwnProperty("app_version"))w.uint32(40).uint32(m.app_version);return w};DownloadRemoteConfigVersionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.DownloadRemoteConfigVersionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.platform=r.int32();break;case 2:m.device_manufacturer=r.string();break;case 3:m.device_model=r.string();break;case 4:m.locale=r.string();break;case 5:m.app_version=r.uint32();break;default:r.skipType(t&7);break}}return m};DownloadRemoteConfigVersionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.DownloadRemoteConfigVersionMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.DownloadRemoteConfigVersionMessage;switch(d.platform){case"UNSET":case 0:m.platform=0;break;case"IOS":case 1:m.platform=1;break;case"ANDROID":case 2:m.platform=2;break;case"OSX":case 3:m.platform=3;break;case"WINDOWS":case 4:m.platform=4;break;case"APPLE_WATCH":case 5:m.platform=5;break}if(d.device_manufacturer!=null){m.device_manufacturer=String(d.device_manufacturer)}if(d.device_model!=null){m.device_model=String(d.device_model)}if(d.locale!=null){m.locale=String(d.locale)}if(d.app_version!=null){m.app_version=d.app_version>>>0}return m};DownloadRemoteConfigVersionMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.platform=o.enums===String?"UNSET":0;d.device_manufacturer="";d.device_model="";d.locale="";d.app_version=0}if(m.platform!=null&&m.hasOwnProperty("platform")){d.platform=o.enums===String?$root.POGOProtos.Enums.Platform[m.platform]:m.platform}if(m.device_manufacturer!=null&&m.hasOwnProperty("device_manufacturer")){d.device_manufacturer=m.device_manufacturer}if(m.device_model!=null&&m.hasOwnProperty("device_model")){d.device_model=m.device_model}if(m.locale!=null&&m.hasOwnProperty("locale")){d.locale=m.locale}if(m.app_version!=null&&m.hasOwnProperty("app_version")){d.app_version=m.app_version}return d};DownloadRemoteConfigVersionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DownloadRemoteConfigVersionMessage}();Messages.DownloadSettingsMessage=function(){function DownloadSettingsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DownloadSettingsMessage.prototype.hash="";DownloadSettingsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.hash!=null&&m.hasOwnProperty("hash"))w.uint32(10).string(m.hash);return w};DownloadSettingsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.DownloadSettingsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.hash=r.string();break;default:r.skipType(t&7);break}}return m};DownloadSettingsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.DownloadSettingsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.DownloadSettingsMessage;if(d.hash!=null){m.hash=String(d.hash)}return m};DownloadSettingsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.hash=""}if(m.hash!=null&&m.hasOwnProperty("hash")){d.hash=m.hash}return d};DownloadSettingsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DownloadSettingsMessage}();Messages.EchoMessage=function(){function EchoMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EchoMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};EchoMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.EchoMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};EchoMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.EchoMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.EchoMessage};EchoMessage.toObject=function toObject(){return{}};EchoMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EchoMessage}();Messages.EncounterMessage=function(){function EncounterMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EncounterMessage.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,false):0;EncounterMessage.prototype.spawn_point_id="";EncounterMessage.prototype.player_latitude=0;EncounterMessage.prototype.player_longitude=0;EncounterMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(9).fixed64(m.encounter_id);if(m.spawn_point_id!=null&&m.hasOwnProperty("spawn_point_id"))w.uint32(18).string(m.spawn_point_id);if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude"))w.uint32(25).double(m.player_latitude);if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude"))w.uint32(33).double(m.player_longitude);return w};EncounterMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.EncounterMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.encounter_id=r.fixed64();break;case 2:m.spawn_point_id=r.string();break;case 3:m.player_latitude=r.double();break;case 4:m.player_longitude=r.double();break;default:r.skipType(t&7);break}}return m};EncounterMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.EncounterMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.EncounterMessage;if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=false;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber()}if(d.spawn_point_id!=null){m.spawn_point_id=String(d.spawn_point_id)}if(d.player_latitude!=null){m.player_latitude=Number(d.player_latitude)}if(d.player_longitude!=null){m.player_longitude=Number(d.player_longitude)}return m};EncounterMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0;d.spawn_point_id="";d.player_latitude=0;d.player_longitude=0}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber():m.encounter_id}if(m.spawn_point_id!=null&&m.hasOwnProperty("spawn_point_id")){d.spawn_point_id=m.spawn_point_id}if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude")){d.player_latitude=o.json&&!isFinite(m.player_latitude)?String(m.player_latitude):m.player_latitude}if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude")){d.player_longitude=o.json&&!isFinite(m.player_longitude)?String(m.player_longitude):m.player_longitude}return d};EncounterMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EncounterMessage}();Messages.EncounterTutorialCompleteMessage=function(){function EncounterTutorialCompleteMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EncounterTutorialCompleteMessage.prototype.pokemon_id=0;EncounterTutorialCompleteMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(8).int32(m.pokemon_id);return w};EncounterTutorialCompleteMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.EncounterTutorialCompleteMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.int32();break;default:r.skipType(t&7);break}}return m};EncounterTutorialCompleteMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.EncounterTutorialCompleteMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.EncounterTutorialCompleteMessage;switch(d.pokemon_id){case"MISSINGNO":case 0:m.pokemon_id=0;break;case"BULBASAUR":case 1:m.pokemon_id=1;break;case"IVYSAUR":case 2:m.pokemon_id=2;break;case"VENUSAUR":case 3:m.pokemon_id=3;break;case"CHARMANDER":case 4:m.pokemon_id=4;break;case"CHARMELEON":case 5:m.pokemon_id=5;break;case"CHARIZARD":case 6:m.pokemon_id=6;break;case"SQUIRTLE":case 7:m.pokemon_id=7;break;case"WARTORTLE":case 8:m.pokemon_id=8;break;case"BLASTOISE":case 9:m.pokemon_id=9;break;case"CATERPIE":case 10:m.pokemon_id=10;break;case"METAPOD":case 11:m.pokemon_id=11;break;case"BUTTERFREE":case 12:m.pokemon_id=12;break;case"WEEDLE":case 13:m.pokemon_id=13;break;case"KAKUNA":case 14:m.pokemon_id=14;break;case"BEEDRILL":case 15:m.pokemon_id=15;break;case"PIDGEY":case 16:m.pokemon_id=16;break;case"PIDGEOTTO":case 17:m.pokemon_id=17;break;case"PIDGEOT":case 18:m.pokemon_id=18;break;case"RATTATA":case 19:m.pokemon_id=19;break;case"RATICATE":case 20:m.pokemon_id=20;break;case"SPEAROW":case 21:m.pokemon_id=21;break;case"FEAROW":case 22:m.pokemon_id=22;break;case"EKANS":case 23:m.pokemon_id=23;break;case"ARBOK":case 24:m.pokemon_id=24;break;case"PIKACHU":case 25:m.pokemon_id=25;break;case"RAICHU":case 26:m.pokemon_id=26;break;case"SANDSHREW":case 27:m.pokemon_id=27;break;case"SANDSLASH":case 28:m.pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_id=29;break;case"NIDORINA":case 30:m.pokemon_id=30;break;case"NIDOQUEEN":case 31:m.pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.pokemon_id=32;break;case"NIDORINO":case 33:m.pokemon_id=33;break;case"NIDOKING":case 34:m.pokemon_id=34;break;case"CLEFAIRY":case 35:m.pokemon_id=35;break;case"CLEFABLE":case 36:m.pokemon_id=36;break;case"VULPIX":case 37:m.pokemon_id=37;break;case"NINETALES":case 38:m.pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.pokemon_id=40;break;case"ZUBAT":case 41:m.pokemon_id=41;break;case"GOLBAT":case 42:m.pokemon_id=42;break;case"ODDISH":case 43:m.pokemon_id=43;break;case"GLOOM":case 44:m.pokemon_id=44;break;case"VILEPLUME":case 45:m.pokemon_id=45;break;case"PARAS":case 46:m.pokemon_id=46;break;case"PARASECT":case 47:m.pokemon_id=47;break;case"VENONAT":case 48:m.pokemon_id=48;break;case"VENOMOTH":case 49:m.pokemon_id=49;break;case"DIGLETT":case 50:m.pokemon_id=50;break;case"DUGTRIO":case 51:m.pokemon_id=51;break;case"MEOWTH":case 52:m.pokemon_id=52;break;case"PERSIAN":case 53:m.pokemon_id=53;break;case"PSYDUCK":case 54:m.pokemon_id=54;break;case"GOLDUCK":case 55:m.pokemon_id=55;break;case"MANKEY":case 56:m.pokemon_id=56;break;case"PRIMEAPE":case 57:m.pokemon_id=57;break;case"GROWLITHE":case 58:m.pokemon_id=58;break;case"ARCANINE":case 59:m.pokemon_id=59;break;case"POLIWAG":case 60:m.pokemon_id=60;break;case"POLIWHIRL":case 61:m.pokemon_id=61;break;case"POLIWRATH":case 62:m.pokemon_id=62;break;case"ABRA":case 63:m.pokemon_id=63;break;case"KADABRA":case 64:m.pokemon_id=64;break;case"ALAKAZAM":case 65:m.pokemon_id=65;break;case"MACHOP":case 66:m.pokemon_id=66;break;case"MACHOKE":case 67:m.pokemon_id=67;break;case"MACHAMP":case 68:m.pokemon_id=68;break;case"BELLSPROUT":case 69:m.pokemon_id=69;break;case"WEEPINBELL":case 70:m.pokemon_id=70;break;case"VICTREEBEL":case 71:m.pokemon_id=71;break;case"TENTACOOL":case 72:m.pokemon_id=72;break;case"TENTACRUEL":case 73:m.pokemon_id=73;break;case"GEODUDE":case 74:m.pokemon_id=74;break;case"GRAVELER":case 75:m.pokemon_id=75;break;case"GOLEM":case 76:m.pokemon_id=76;break;case"PONYTA":case 77:m.pokemon_id=77;break;case"RAPIDASH":case 78:m.pokemon_id=78;break;case"SLOWPOKE":case 79:m.pokemon_id=79;break;case"SLOWBRO":case 80:m.pokemon_id=80;break;case"MAGNEMITE":case 81:m.pokemon_id=81;break;case"MAGNETON":case 82:m.pokemon_id=82;break;case"FARFETCHD":case 83:m.pokemon_id=83;break;case"DODUO":case 84:m.pokemon_id=84;break;case"DODRIO":case 85:m.pokemon_id=85;break;case"SEEL":case 86:m.pokemon_id=86;break;case"DEWGONG":case 87:m.pokemon_id=87;break;case"GRIMER":case 88:m.pokemon_id=88;break;case"MUK":case 89:m.pokemon_id=89;break;case"SHELLDER":case 90:m.pokemon_id=90;break;case"CLOYSTER":case 91:m.pokemon_id=91;break;case"GASTLY":case 92:m.pokemon_id=92;break;case"HAUNTER":case 93:m.pokemon_id=93;break;case"GENGAR":case 94:m.pokemon_id=94;break;case"ONIX":case 95:m.pokemon_id=95;break;case"DROWZEE":case 96:m.pokemon_id=96;break;case"HYPNO":case 97:m.pokemon_id=97;break;case"KRABBY":case 98:m.pokemon_id=98;break;case"KINGLER":case 99:m.pokemon_id=99;break;case"VOLTORB":case 100:m.pokemon_id=100;break;case"ELECTRODE":case 101:m.pokemon_id=101;break;case"EXEGGCUTE":case 102:m.pokemon_id=102;break;case"EXEGGUTOR":case 103:m.pokemon_id=103;break;case"CUBONE":case 104:m.pokemon_id=104;break;case"MAROWAK":case 105:m.pokemon_id=105;break;case"HITMONLEE":case 106:m.pokemon_id=106;break;case"HITMONCHAN":case 107:m.pokemon_id=107;break;case"LICKITUNG":case 108:m.pokemon_id=108;break;case"KOFFING":case 109:m.pokemon_id=109;break;case"WEEZING":case 110:m.pokemon_id=110;break;case"RHYHORN":case 111:m.pokemon_id=111;break;case"RHYDON":case 112:m.pokemon_id=112;break;case"CHANSEY":case 113:m.pokemon_id=113;break;case"TANGELA":case 114:m.pokemon_id=114;break;case"KANGASKHAN":case 115:m.pokemon_id=115;break;case"HORSEA":case 116:m.pokemon_id=116;break;case"SEADRA":case 117:m.pokemon_id=117;break;case"GOLDEEN":case 118:m.pokemon_id=118;break;case"SEAKING":case 119:m.pokemon_id=119;break;case"STARYU":case 120:m.pokemon_id=120;break;case"STARMIE":case 121:m.pokemon_id=121;break;case"MR_MIME":case 122:m.pokemon_id=122;break;case"SCYTHER":case 123:m.pokemon_id=123;break;case"JYNX":case 124:m.pokemon_id=124;break;case"ELECTABUZZ":case 125:m.pokemon_id=125;break;case"MAGMAR":case 126:m.pokemon_id=126;break;case"PINSIR":case 127:m.pokemon_id=127;break;case"TAUROS":case 128:m.pokemon_id=128;break;case"MAGIKARP":case 129:m.pokemon_id=129;break;case"GYARADOS":case 130:m.pokemon_id=130;break;case"LAPRAS":case 131:m.pokemon_id=131;break;case"DITTO":case 132:m.pokemon_id=132;break;case"EEVEE":case 133:m.pokemon_id=133;break;case"VAPOREON":case 134:m.pokemon_id=134;break;case"JOLTEON":case 135:m.pokemon_id=135;break;case"FLAREON":case 136:m.pokemon_id=136;break;case"PORYGON":case 137:m.pokemon_id=137;break;case"OMANYTE":case 138:m.pokemon_id=138;break;case"OMASTAR":case 139:m.pokemon_id=139;break;case"KABUTO":case 140:m.pokemon_id=140;break;case"KABUTOPS":case 141:m.pokemon_id=141;break;case"AERODACTYL":case 142:m.pokemon_id=142;break;case"SNORLAX":case 143:m.pokemon_id=143;break;case"ARTICUNO":case 144:m.pokemon_id=144;break;case"ZAPDOS":case 145:m.pokemon_id=145;break;case"MOLTRES":case 146:m.pokemon_id=146;break;case"DRATINI":case 147:m.pokemon_id=147;break;case"DRAGONAIR":case 148:m.pokemon_id=148;break;case"DRAGONITE":case 149:m.pokemon_id=149;break;case"MEWTWO":case 150:m.pokemon_id=150;break;case"MEW":case 151:m.pokemon_id=151;break;case"CHIKORITA":case 152:m.pokemon_id=152;break;case"BAYLEEF":case 153:m.pokemon_id=153;break;case"MEGANIUM":case 154:m.pokemon_id=154;break;case"CYNDAQUIL":case 155:m.pokemon_id=155;break;case"QUILAVA":case 156:m.pokemon_id=156;break;case"TYPHLOSION":case 157:m.pokemon_id=157;break;case"TOTODILE":case 158:m.pokemon_id=158;break;case"CROCONAW":case 159:m.pokemon_id=159;break;case"FERALIGATR":case 160:m.pokemon_id=160;break;case"SENTRET":case 161:m.pokemon_id=161;break;case"FURRET":case 162:m.pokemon_id=162;break;case"HOOTHOOT":case 163:m.pokemon_id=163;break;case"NOCTOWL":case 164:m.pokemon_id=164;break;case"LEDYBA":case 165:m.pokemon_id=165;break;case"LEDIAN":case 166:m.pokemon_id=166;break;case"SPINARAK":case 167:m.pokemon_id=167;break;case"ARIADOS":case 168:m.pokemon_id=168;break;case"CROBAT":case 169:m.pokemon_id=169;break;case"CHINCHOU":case 170:m.pokemon_id=170;break;case"LANTURN":case 171:m.pokemon_id=171;break;case"PICHU":case 172:m.pokemon_id=172;break;case"CLEFFA":case 173:m.pokemon_id=173;break;case"IGGLYBUFF":case 174:m.pokemon_id=174;break;case"TOGEPI":case 175:m.pokemon_id=175;break;case"TOGETIC":case 176:m.pokemon_id=176;break;case"NATU":case 177:m.pokemon_id=177;break;case"XATU":case 178:m.pokemon_id=178;break;case"MAREEP":case 179:m.pokemon_id=179;break;case"FLAAFFY":case 180:m.pokemon_id=180;break;case"AMPHAROS":case 181:m.pokemon_id=181;break;case"BELLOSSOM":case 182:m.pokemon_id=182;break;case"MARILL":case 183:m.pokemon_id=183;break;case"AZUMARILL":case 184:m.pokemon_id=184;break;case"SUDOWOODO":case 185:m.pokemon_id=185;break;case"POLITOED":case 186:m.pokemon_id=186;break;case"HOPPIP":case 187:m.pokemon_id=187;break;case"SKIPLOOM":case 188:m.pokemon_id=188;break;case"JUMPLUFF":case 189:m.pokemon_id=189;break;case"AIPOM":case 190:m.pokemon_id=190;break;case"SUNKERN":case 191:m.pokemon_id=191;break;case"SUNFLORA":case 192:m.pokemon_id=192;break;case"YANMA":case 193:m.pokemon_id=193;break;case"WOOPER":case 194:m.pokemon_id=194;break;case"QUAGSIRE":case 195:m.pokemon_id=195;break;case"ESPEON":case 196:m.pokemon_id=196;break;case"UMBREON":case 197:m.pokemon_id=197;break;case"MURKROW":case 198:m.pokemon_id=198;break;case"SLOWKING":case 199:m.pokemon_id=199;break;case"MISDREAVUS":case 200:m.pokemon_id=200;break;case"UNOWN":case 201:m.pokemon_id=201;break;case"WOBBUFFET":case 202:m.pokemon_id=202;break;case"GIRAFARIG":case 203:m.pokemon_id=203;break;case"PINECO":case 204:m.pokemon_id=204;break;case"FORRETRESS":case 205:m.pokemon_id=205;break;case"DUNSPARCE":case 206:m.pokemon_id=206;break;case"GLIGAR":case 207:m.pokemon_id=207;break;case"STEELIX":case 208:m.pokemon_id=208;break;case"SNUBBULL":case 209:m.pokemon_id=209;break;case"GRANBULL":case 210:m.pokemon_id=210;break;case"QWILFISH":case 211:m.pokemon_id=211;break;case"SCIZOR":case 212:m.pokemon_id=212;break;case"SHUCKLE":case 213:m.pokemon_id=213;break;case"HERACROSS":case 214:m.pokemon_id=214;break;case"SNEASEL":case 215:m.pokemon_id=215;break;case"TEDDIURSA":case 216:m.pokemon_id=216;break;case"URSARING":case 217:m.pokemon_id=217;break;case"SLUGMA":case 218:m.pokemon_id=218;break;case"MAGCARGO":case 219:m.pokemon_id=219;break;case"SWINUB":case 220:m.pokemon_id=220;break;case"PILOSWINE":case 221:m.pokemon_id=221;break;case"CORSOLA":case 222:m.pokemon_id=222;break;case"REMORAID":case 223:m.pokemon_id=223;break;case"OCTILLERY":case 224:m.pokemon_id=224;break;case"DELIBIRD":case 225:m.pokemon_id=225;break;case"MANTINE":case 226:m.pokemon_id=226;break;case"SKARMORY":case 227:m.pokemon_id=227;break;case"HOUNDOUR":case 228:m.pokemon_id=228;break;case"HOUNDOOM":case 229:m.pokemon_id=229;break;case"KINGDRA":case 230:m.pokemon_id=230;break;case"PHANPY":case 231:m.pokemon_id=231;break;case"DONPHAN":case 232:m.pokemon_id=232;break;case"PORYGON2":case 233:m.pokemon_id=233;break;case"STANTLER":case 234:m.pokemon_id=234;break;case"SMEARGLE":case 235:m.pokemon_id=235;break;case"TYROGUE":case 236:m.pokemon_id=236;break;case"HITMONTOP":case 237:m.pokemon_id=237;break;case"SMOOCHUM":case 238:m.pokemon_id=238;break;case"ELEKID":case 239:m.pokemon_id=239;break;case"MAGBY":case 240:m.pokemon_id=240;break;case"MILTANK":case 241:m.pokemon_id=241;break;case"BLISSEY":case 242:m.pokemon_id=242;break;case"RAIKOU":case 243:m.pokemon_id=243;break;case"ENTEI":case 244:m.pokemon_id=244;break;case"SUICUNE":case 245:m.pokemon_id=245;break;case"LARVITAR":case 246:m.pokemon_id=246;break;case"PUPITAR":case 247:m.pokemon_id=247;break;case"TYRANITAR":case 248:m.pokemon_id=248;break;case"LUGIA":case 249:m.pokemon_id=249;break;case"HO_OH":case 250:m.pokemon_id=250;break;case"CELEBI":case 251:m.pokemon_id=251;break;case"TREECKO":case 252:m.pokemon_id=252;break;case"GROVYLE":case 253:m.pokemon_id=253;break;case"SCEPTILE":case 254:m.pokemon_id=254;break;case"TORCHIC":case 255:m.pokemon_id=255;break;case"COMBUSKEN":case 256:m.pokemon_id=256;break;case"BLAZIKEN":case 257:m.pokemon_id=257;break;case"MUDKIP":case 258:m.pokemon_id=258;break;case"MARSHTOMP":case 259:m.pokemon_id=259;break;case"SWAMPERT":case 260:m.pokemon_id=260;break;case"POOCHYENA":case 261:m.pokemon_id=261;break;case"MIGHTYENA":case 262:m.pokemon_id=262;break;case"ZIGZAGOON":case 263:m.pokemon_id=263;break;case"LINOONE":case 264:m.pokemon_id=264;break;case"WURMPLE":case 265:m.pokemon_id=265;break;case"SILCOON":case 266:m.pokemon_id=266;break;case"BEAUTIFLY":case 267:m.pokemon_id=267;break;case"CASCOON":case 268:m.pokemon_id=268;break;case"DUSTOX":case 269:m.pokemon_id=269;break;case"LOTAD":case 270:m.pokemon_id=270;break;case"LOMBRE":case 271:m.pokemon_id=271;break;case"LUDICOLO":case 272:m.pokemon_id=272;break;case"SEEDOT":case 273:m.pokemon_id=273;break;case"NUZLEAF":case 274:m.pokemon_id=274;break;case"SHIFTRY":case 275:m.pokemon_id=275;break;case"TAILLOW":case 276:m.pokemon_id=276;break;case"SWELLOW":case 277:m.pokemon_id=277;break;case"WINGULL":case 278:m.pokemon_id=278;break;case"PELIPPER":case 279:m.pokemon_id=279;break;case"RALTS":case 280:m.pokemon_id=280;break;case"KIRLIA":case 281:m.pokemon_id=281;break;case"GARDEVOIR":case 282:m.pokemon_id=282;break;case"SURSKIT":case 283:m.pokemon_id=283;break;case"MASQUERAIN":case 284:m.pokemon_id=284;break;case"SHROOMISH":case 285:m.pokemon_id=285;break;case"BRELOOM":case 286:m.pokemon_id=286;break;case"SLAKOTH":case 287:m.pokemon_id=287;break;case"VIGOROTH":case 288:m.pokemon_id=288;break;case"SLAKING":case 289:m.pokemon_id=289;break;case"NINCADA":case 290:m.pokemon_id=290;break;case"NINJASK":case 291:m.pokemon_id=291;break;case"SHEDINJA":case 292:m.pokemon_id=292;break;case"WHISMUR":case 293:m.pokemon_id=293;break;case"LOUDRED":case 294:m.pokemon_id=294;break;case"EXPLOUD":case 295:m.pokemon_id=295;break;case"MAKUHITA":case 296:m.pokemon_id=296;break;case"HARIYAMA":case 297:m.pokemon_id=297;break;case"AZURILL":case 298:m.pokemon_id=298;break;case"NOSEPASS":case 299:m.pokemon_id=299;break;case"SKITTY":case 300:m.pokemon_id=300;break;case"DELCATTY":case 301:m.pokemon_id=301;break;case"SABLEYE":case 302:m.pokemon_id=302;break;case"MAWILE":case 303:m.pokemon_id=303;break;case"ARON":case 304:m.pokemon_id=304;break;case"LAIRON":case 305:m.pokemon_id=305;break;case"AGGRON":case 306:m.pokemon_id=306;break;case"MEDITITE":case 307:m.pokemon_id=307;break;case"MEDICHAM":case 308:m.pokemon_id=308;break;case"ELECTRIKE":case 309:m.pokemon_id=309;break;case"MANECTRIC":case 310:m.pokemon_id=310;break;case"PLUSLE":case 311:m.pokemon_id=311;break;case"MINUN":case 312:m.pokemon_id=312;break;case"VOLBEAT":case 313:m.pokemon_id=313;break;case"ILLUMISE":case 314:m.pokemon_id=314;break;case"ROSELIA":case 315:m.pokemon_id=315;break;case"GULPIN":case 316:m.pokemon_id=316;break;case"SWALOT":case 317:m.pokemon_id=317;break;case"CARVANHA":case 318:m.pokemon_id=318;break;case"SHARPEDO":case 319:m.pokemon_id=319;break;case"WAILMER":case 320:m.pokemon_id=320;break;case"WAILORD":case 321:m.pokemon_id=321;break;case"NUMEL":case 322:m.pokemon_id=322;break;case"CAMERUPT":case 323:m.pokemon_id=323;break;case"TORKOAL":case 324:m.pokemon_id=324;break;case"SPOINK":case 325:m.pokemon_id=325;break;case"GRUMPIG":case 326:m.pokemon_id=326;break;case"SPINDA":case 327:m.pokemon_id=327;break;case"TRAPINCH":case 328:m.pokemon_id=328;break;case"VIBRAVA":case 329:m.pokemon_id=329;break;case"FLYGON":case 330:m.pokemon_id=330;break;case"CACNEA":case 331:m.pokemon_id=331;break;case"CACTURNE":case 332:m.pokemon_id=332;break;case"SWABLU":case 333:m.pokemon_id=333;break;case"ALTARIA":case 334:m.pokemon_id=334;break;case"ZANGOOSE":case 335:m.pokemon_id=335;break;case"SEVIPER":case 336:m.pokemon_id=336;break;case"LUNATONE":case 337:m.pokemon_id=337;break;case"SOLROCK":case 338:m.pokemon_id=338;break;case"BARBOACH":case 339:m.pokemon_id=339;break;case"WHISCASH":case 340:m.pokemon_id=340;break;case"CORPHISH":case 341:m.pokemon_id=341;break;case"CRAWDAUNT":case 342:m.pokemon_id=342;break;case"BALTOY":case 343:m.pokemon_id=343;break;case"CLAYDOL":case 344:m.pokemon_id=344;break;case"LILEEP":case 345:m.pokemon_id=345;break;case"CRADILY":case 346:m.pokemon_id=346;break;case"ANORITH":case 347:m.pokemon_id=347;break;case"ARMALDO":case 348:m.pokemon_id=348;break;case"FEEBAS":case 349:m.pokemon_id=349;break;case"MILOTIC":case 350:m.pokemon_id=350;break;case"CASTFORM":case 351:m.pokemon_id=351;break;case"KECLEON":case 352:m.pokemon_id=352;break;case"SHUPPET":case 353:m.pokemon_id=353;break;case"BANETTE":case 354:m.pokemon_id=354;break;case"DUSKULL":case 355:m.pokemon_id=355;break;case"DUSCLOPS":case 356:m.pokemon_id=356;break;case"TROPIUS":case 357:m.pokemon_id=357;break;case"CHIMECHO":case 358:m.pokemon_id=358;break;case"ABSOL":case 359:m.pokemon_id=359;break;case"WYNAUT":case 360:m.pokemon_id=360;break;case"SNORUNT":case 361:m.pokemon_id=361;break;case"GLALIE":case 362:m.pokemon_id=362;break;case"SPHEAL":case 363:m.pokemon_id=363;break;case"SEALEO":case 364:m.pokemon_id=364;break;case"WALREIN":case 365:m.pokemon_id=365;break;case"CLAMPERL":case 366:m.pokemon_id=366;break;case"HUNTAIL":case 367:m.pokemon_id=367;break;case"GOREBYSS":case 368:m.pokemon_id=368;break;case"RELICANTH":case 369:m.pokemon_id=369;break;case"LUVDISC":case 370:m.pokemon_id=370;break;case"BAGON":case 371:m.pokemon_id=371;break;case"SHELGON":case 372:m.pokemon_id=372;break;case"SALAMENCE":case 373:m.pokemon_id=373;break;case"BELDUM":case 374:m.pokemon_id=374;break;case"METANG":case 375:m.pokemon_id=375;break;case"METAGROSS":case 376:m.pokemon_id=376;break;case"REGIROCK":case 377:m.pokemon_id=377;break;case"REGICE":case 378:m.pokemon_id=378;break;case"REGISTEEL":case 379:m.pokemon_id=379;break;case"LATIAS":case 380:m.pokemon_id=380;break;case"LATIOS":case 381:m.pokemon_id=381;break;case"KYOGRE":case 382:m.pokemon_id=382;break;case"GROUDON":case 383:m.pokemon_id=383;break;case"RAYQUAZA":case 384:m.pokemon_id=384;break;case"JIRACHI":case 385:m.pokemon_id=385;break;case"DEOXYS":case 386:m.pokemon_id=386;break;case"TURTWIG":case 387:m.pokemon_id=387;break;case"GROTLE":case 388:m.pokemon_id=388;break;case"TORTERRA":case 389:m.pokemon_id=389;break;case"CHIMCHAR":case 390:m.pokemon_id=390;break;case"MONFERNO":case 391:m.pokemon_id=391;break;case"INFERNAPE":case 392:m.pokemon_id=392;break;case"PIPLUP":case 393:m.pokemon_id=393;break;case"PRINPLUP":case 394:m.pokemon_id=394;break;case"EMPOLEON":case 395:m.pokemon_id=395;break;case"STARLY":case 396:m.pokemon_id=396;break;case"STARAVIA":case 397:m.pokemon_id=397;break;case"STARAPTOR":case 398:m.pokemon_id=398;break;case"BIDOOF":case 399:m.pokemon_id=399;break;case"BIBAREL":case 400:m.pokemon_id=400;break;case"KRICKETOT":case 401:m.pokemon_id=401;break;case"KRICKETUNE":case 402:m.pokemon_id=402;break;case"SHINX":case 403:m.pokemon_id=403;break;case"LUXIO":case 404:m.pokemon_id=404;break;case"LUXRAY":case 405:m.pokemon_id=405;break;case"BUDEW":case 406:m.pokemon_id=406;break;case"ROSERADE":case 407:m.pokemon_id=407;break;case"CRANIDOS":case 408:m.pokemon_id=408;break;case"RAMPARDOS":case 409:m.pokemon_id=409;break;case"SHIELDON":case 410:m.pokemon_id=410;break;case"BASTIODON":case 411:m.pokemon_id=411;break;case"BURMY":case 412:m.pokemon_id=412;break;case"WORMADAM":case 413:m.pokemon_id=413;break;case"MOTHIM":case 414:m.pokemon_id=414;break;case"COMBEE":case 415:m.pokemon_id=415;break;case"VESPIQUEN":case 416:m.pokemon_id=416;break;case"PACHIRISU":case 417:m.pokemon_id=417;break;case"BUIZEL":case 418:m.pokemon_id=418;break;case"FLOATZEL":case 419:m.pokemon_id=419;break;case"CHERUBI":case 420:m.pokemon_id=420;break;case"CHERRIM":case 421:m.pokemon_id=421;break;case"SHELLOS":case 422:m.pokemon_id=422;break;case"GASTRODON":case 423:m.pokemon_id=423;break;case"AMBIPOM":case 424:m.pokemon_id=424;break;case"DRIFLOON":case 425:m.pokemon_id=425;break;case"DRIFBLIM":case 426:m.pokemon_id=426;break;case"BUNEARY":case 427:m.pokemon_id=427;break;case"LOPUNNY":case 428:m.pokemon_id=428;break;case"MISMAGIUS":case 429:m.pokemon_id=429;break;case"HONCHKROW":case 430:m.pokemon_id=430;break;case"GLAMEOW":case 431:m.pokemon_id=431;break;case"PURUGLY":case 432:m.pokemon_id=432;break;case"CHINGLING":case 433:m.pokemon_id=433;break;case"STUNKY":case 434:m.pokemon_id=434;break;case"SKUNTANK":case 435:m.pokemon_id=435;break;case"BRONZOR":case 436:m.pokemon_id=436;break;case"BRONZONG":case 437:m.pokemon_id=437;break;case"BONSLY":case 438:m.pokemon_id=438;break;case"MIME_JR":case 439:m.pokemon_id=439;break;case"HAPPINY":case 440:m.pokemon_id=440;break;case"CHATOT":case 441:m.pokemon_id=441;break;case"SPIRITOMB":case 442:m.pokemon_id=442;break;case"GIBLE":case 443:m.pokemon_id=443;break;case"GABITE":case 444:m.pokemon_id=444;break;case"GARCHOMP":case 445:m.pokemon_id=445;break;case"MUNCHLAX":case 446:m.pokemon_id=446;break;case"RIOLU":case 447:m.pokemon_id=447;break;case"LUCARIO":case 448:m.pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.pokemon_id=449;break;case"HIPPOWDON":case 450:m.pokemon_id=450;break;case"SKORUPI":case 451:m.pokemon_id=451;break;case"DRAPION":case 452:m.pokemon_id=452;break;case"CROAGUNK":case 453:m.pokemon_id=453;break;case"TOXICROAK":case 454:m.pokemon_id=454;break;case"CARNIVINE":case 455:m.pokemon_id=455;break;case"FINNEON":case 456:m.pokemon_id=456;break;case"LUMINEON":case 457:m.pokemon_id=457;break;case"MANTYKE":case 458:m.pokemon_id=458;break;case"SNOVER":case 459:m.pokemon_id=459;break;case"ABOMASNOW":case 460:m.pokemon_id=460;break;case"WEAVILE":case 461:m.pokemon_id=461;break;case"MAGNEZONE":case 462:m.pokemon_id=462;break;case"LICKILICKY":case 463:m.pokemon_id=463;break;case"RHYPERIOR":case 464:m.pokemon_id=464;break;case"TANGROWTH":case 465:m.pokemon_id=465;break;case"ELECTIVIRE":case 466:m.pokemon_id=466;break;case"MAGMORTAR":case 467:m.pokemon_id=467;break;case"TOGEKISS":case 468:m.pokemon_id=468;break;case"YANMEGA":case 469:m.pokemon_id=469;break;case"LEAFEON":case 470:m.pokemon_id=470;break;case"GLACEON":case 471:m.pokemon_id=471;break;case"GLISCOR":case 472:m.pokemon_id=472;break;case"MAMOSWINE":case 473:m.pokemon_id=473;break;case"PORYGON_Z":case 474:m.pokemon_id=474;break;case"GALLADE":case 475:m.pokemon_id=475;break;case"PROBOPASS":case 476:m.pokemon_id=476;break;case"DUSKNOIR":case 477:m.pokemon_id=477;break;case"FROSLASS":case 478:m.pokemon_id=478;break;case"ROTOM":case 479:m.pokemon_id=479;break;case"UXIE":case 480:m.pokemon_id=480;break;case"MESPRIT":case 481:m.pokemon_id=481;break;case"AZELF":case 482:m.pokemon_id=482;break;case"DIALGA":case 483:m.pokemon_id=483;break;case"PALKIA":case 484:m.pokemon_id=484;break;case"HEATRAN":case 485:m.pokemon_id=485;break;case"REGIGIGAS":case 486:m.pokemon_id=486;break;case"GIRATINA":case 487:m.pokemon_id=487;break;case"CRESSELIA":case 488:m.pokemon_id=488;break;case"PHIONE":case 489:m.pokemon_id=489;break;case"MANAPHY":case 490:m.pokemon_id=490;break;case"DARKRAI":case 491:m.pokemon_id=491;break;case"SHAYMIN":case 492:m.pokemon_id=492;break;case"ARCEUS":case 493:m.pokemon_id=493;break;case"MELTAN":case 808:m.pokemon_id=808;break;case"MELMETAL":case 809:m.pokemon_id=809;break}return m};EncounterTutorialCompleteMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon_id=o.enums===String?"MISSINGNO":0}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){d.pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_id]:m.pokemon_id}return d};EncounterTutorialCompleteMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EncounterTutorialCompleteMessage}();Messages.EquipBadgeMessage=function(){function EquipBadgeMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EquipBadgeMessage.prototype.badge_type=0;EquipBadgeMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.badge_type!=null&&m.hasOwnProperty("badge_type"))w.uint32(8).int32(m.badge_type);return w};EquipBadgeMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.EquipBadgeMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.badge_type=r.int32();break;default:r.skipType(t&7);break}}return m};EquipBadgeMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.EquipBadgeMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.EquipBadgeMessage;switch(d.badge_type){case"BADGE_UNSET":case 0:m.badge_type=0;break;case"BADGE_TRAVEL_KM":case 1:m.badge_type=1;break;case"BADGE_POKEDEX_ENTRIES":case 2:m.badge_type=2;break;case"BADGE_CAPTURE_TOTAL":case 3:m.badge_type=3;break;case"BADGE_DEFEATED_FORT":case 4:m.badge_type=4;break;case"BADGE_EVOLVED_TOTAL":case 5:m.badge_type=5;break;case"BADGE_HATCHED_TOTAL":case 6:m.badge_type=6;break;case"BADGE_ENCOUNTERED_TOTAL":case 7:m.badge_type=7;break;case"BADGE_POKESTOPS_VISITED":case 8:m.badge_type=8;break;case"BADGE_UNIQUE_POKESTOPS":case 9:m.badge_type=9;break;case"BADGE_POKEBALL_THROWN":case 10:m.badge_type=10;break;case"BADGE_BIG_MAGIKARP":case 11:m.badge_type=11;break;case"BADGE_DEPLOYED_TOTAL":case 12:m.badge_type=12;break;case"BADGE_BATTLE_ATTACK_WON":case 13:m.badge_type=13;break;case"BADGE_BATTLE_TRAINING_WON":case 14:m.badge_type=14;break;case"BADGE_BATTLE_DEFEND_WON":case 15:m.badge_type=15;break;case"BADGE_PRESTIGE_RAISED":case 16:m.badge_type=16;break;case"BADGE_PRESTIGE_DROPPED":case 17:m.badge_type=17;break;case"BADGE_TYPE_NORMAL":case 18:m.badge_type=18;break;case"BADGE_TYPE_FIGHTING":case 19:m.badge_type=19;break;case"BADGE_TYPE_FLYING":case 20:m.badge_type=20;break;case"BADGE_TYPE_POISON":case 21:m.badge_type=21;break;case"BADGE_TYPE_GROUND":case 22:m.badge_type=22;break;case"BADGE_TYPE_ROCK":case 23:m.badge_type=23;break;case"BADGE_TYPE_BUG":case 24:m.badge_type=24;break;case"BADGE_TYPE_GHOST":case 25:m.badge_type=25;break;case"BADGE_TYPE_STEEL":case 26:m.badge_type=26;break;case"BADGE_TYPE_FIRE":case 27:m.badge_type=27;break;case"BADGE_TYPE_WATER":case 28:m.badge_type=28;break;case"BADGE_TYPE_GRASS":case 29:m.badge_type=29;break;case"BADGE_TYPE_ELECTRIC":case 30:m.badge_type=30;break;case"BADGE_TYPE_PSYCHIC":case 31:m.badge_type=31;break;case"BADGE_TYPE_ICE":case 32:m.badge_type=32;break;case"BADGE_TYPE_DRAGON":case 33:m.badge_type=33;break;case"BADGE_TYPE_DARK":case 34:m.badge_type=34;break;case"BADGE_TYPE_FAIRY":case 35:m.badge_type=35;break;case"BADGE_SMALL_RATTATA":case 36:m.badge_type=36;break;case"BADGE_PIKACHU":case 37:m.badge_type=37;break;case"BADGE_UNOWN":case 38:m.badge_type=38;break;case"BADGE_POKEDEX_ENTRIES_GEN2":case 39:m.badge_type=39;break;case"BADGE_RAID_BATTLE_WON":case 40:m.badge_type=40;break;case"BADGE_LEGENDARY_BATTLE_WON":case 41:m.badge_type=41;break;case"BADGE_BERRIES_FED":case 42:m.badge_type=42;break;case"BADGE_HOURS_DEFENDED":case 43:m.badge_type=43;break;case"BADGE_PLACE_HOLDER":case 44:m.badge_type=44;break;case"BADGE_POKEDEX_ENTRIES_GEN3":case 45:m.badge_type=45;break;case"BADGE_CHALLENGE_QUESTS":case 46:m.badge_type=46;break;case"BADGE_MEW_ENCOUNTER":case 47:m.badge_type=47;break;case"BADGE_MAX_LEVEL_FRIENDS":case 48:m.badge_type=48;break;case"BADGE_TRADING":case 49:m.badge_type=49;break;case"BADGE_TRADING_DISTANCE":case 50:m.badge_type=50;break;case"BADGE_POKEDEX_ENTRIES_GEN4":case 51:m.badge_type=51;break;case"BADGE_GREAT_LEAGUE":case 52:m.badge_type=52;break;case"BADGE_ULTRA_LEAGUE":case 53:m.badge_type=53;break;case"BADGE_MASTER_LEAGUE":case 54:m.badge_type=54;break;case"BADGE_EVENT_MIN":case 2e3:m.badge_type=2e3;break;case"BADGE_CHICAGO_FEST_JULY_2017":case 2001:m.badge_type=2001;break;case"BADGE_PIKACHU_OUTBREAK_YOKOHAMA_2017":case 2002:m.badge_type=2002;break;case"BADGE_SAFARI_ZONE_EUROPE_2017":case 2003:m.badge_type=2003;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_07":case 2004:m.badge_type=2004;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_14":case 2005:m.badge_type=2005;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_NORTH":case 2006:m.badge_type=2006;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_SOUTH":case 2007:m.badge_type=2007;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_NORTH":case 2008:m.badge_type=2008;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_SOUTH":case 2009:m.badge_type=2009;break;case"BADGE_APAC_PARTNER_JULY_2018_0":case 2010:m.badge_type=2010;break;case"BADGE_APAC_PARTNER_JULY_2018_1":case 2011:m.badge_type=2011;break;case"BADGE_APAC_PARTNER_JULY_2018_2":case 2012:m.badge_type=2012;break;case"BADGE_APAC_PARTNER_JULY_2018_3":case 2013:m.badge_type=2013;break;case"BADGE_APAC_PARTNER_JULY_2018_4":case 2014:m.badge_type=2014;break;case"BADGE_APAC_PARTNER_JULY_2018_5":case 2015:m.badge_type=2015;break;case"BADGE_APAC_PARTNER_JULY_2018_6":case 2016:m.badge_type=2016;break;case"BADGE_APAC_PARTNER_JULY_2018_7":case 2017:m.badge_type=2017;break;case"BADGE_APAC_PARTNER_JULY_2018_8":case 2018:m.badge_type=2018;break;case"BADGE_APAC_PARTNER_JULY_2018_9":case 2019:m.badge_type=2019;break;case"BADGE_YOKOSUKA_29_AUG_2018_MIKASA":case 2020:m.badge_type=2020;break;case"BADGE_YOKOSUKA_29_AUG_2018_VERNY":case 2021:m.badge_type=2021;break;case"BADGE_YOKOSUKA_29_AUG_2018_KURIHAMA":case 2022:m.badge_type=2022;break;case"BADGE_YOKOSUKA_30_AUG_2018_MIKASA":case 2023:m.badge_type=2023;break;case"BADGE_YOKOSUKA_30_AUG_2018_VERNY":case 2024:m.badge_type=2024;break;case"BADGE_YOKOSUKA_30_AUG_2018_KURIHAMA":case 2025:m.badge_type=2025;break;case"BADGE_YOKOSUKA_31_AUG_2018_MIKASA":case 2026:m.badge_type=2026;break;case"BADGE_YOKOSUKA_31_AUG_2018_VERNY":case 2027:m.badge_type=2027;break;case"BADGE_YOKOSUKA_31_AUG_2018_KURIHAMA":case 2028:m.badge_type=2028;break;case"BADGE_YOKOSUKA_1_SEP_2018_MIKASA":case 2029:m.badge_type=2029;break;case"BADGE_YOKOSUKA_1_SEP_2018_VERNY":case 2030:m.badge_type=2030;break;case"BADGE_YOKOSUKA_1_SEP_2018_KURIHAMA":case 2031:m.badge_type=2031;break;case"BADGE_YOKOSUKA_2_SEP_2018_MIKASA":case 2032:m.badge_type=2032;break;case"BADGE_YOKOSUKA_2_SEP_2018_VERNY":case 2033:m.badge_type=2033;break;case"BADGE_YOKOSUKA_2_SEP_2018_KURIHAMA":case 2034:m.badge_type=2034;break;case"BADGE_TOP_BANANA_1":case 2035:m.badge_type=2035;break;case"BADGE_TOP_BANANA_2":case 2036:m.badge_type=2036;break;case"BADGE_TOP_BANANA_3":case 2037:m.badge_type=2037;break}return m};EquipBadgeMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.badge_type=o.enums===String?"BADGE_UNSET":0}if(m.badge_type!=null&&m.hasOwnProperty("badge_type")){d.badge_type=o.enums===String?$root.POGOProtos.Enums.BadgeType[m.badge_type]:m.badge_type}return d};EquipBadgeMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EquipBadgeMessage}();Messages.EvolvePokemonMessage=function(){function EvolvePokemonMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EvolvePokemonMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;EvolvePokemonMessage.prototype.evolution_item_requirement=0;EvolvePokemonMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(9).fixed64(m.pokemon_id);if(m.evolution_item_requirement!=null&&m.hasOwnProperty("evolution_item_requirement"))w.uint32(16).int32(m.evolution_item_requirement);return w};EvolvePokemonMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.EvolvePokemonMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.fixed64();break;case 2:m.evolution_item_requirement=r.int32();break;default:r.skipType(t&7);break}}return m};EvolvePokemonMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.EvolvePokemonMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.EvolvePokemonMessage;if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}switch(d.evolution_item_requirement){case"ITEM_UNKNOWN":case 0:m.evolution_item_requirement=0;break;case"ITEM_POKE_BALL":case 1:m.evolution_item_requirement=1;break;case"ITEM_GREAT_BALL":case 2:m.evolution_item_requirement=2;break;case"ITEM_ULTRA_BALL":case 3:m.evolution_item_requirement=3;break;case"ITEM_MASTER_BALL":case 4:m.evolution_item_requirement=4;break;case"ITEM_PREMIER_BALL":case 5:m.evolution_item_requirement=5;break;case"ITEM_POTION":case 101:m.evolution_item_requirement=101;break;case"ITEM_SUPER_POTION":case 102:m.evolution_item_requirement=102;break;case"ITEM_HYPER_POTION":case 103:m.evolution_item_requirement=103;break;case"ITEM_MAX_POTION":case 104:m.evolution_item_requirement=104;break;case"ITEM_REVIVE":case 201:m.evolution_item_requirement=201;break;case"ITEM_MAX_REVIVE":case 202:m.evolution_item_requirement=202;break;case"ITEM_LUCKY_EGG":case 301:m.evolution_item_requirement=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.evolution_item_requirement=401;break;case"ITEM_INCENSE_SPICY":case 402:m.evolution_item_requirement=402;break;case"ITEM_INCENSE_COOL":case 403:m.evolution_item_requirement=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.evolution_item_requirement=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.evolution_item_requirement=405;break;case"ITEM_TROY_DISK":case 501:m.evolution_item_requirement=501;break;case"ITEM_X_ATTACK":case 602:m.evolution_item_requirement=602;break;case"ITEM_X_DEFENSE":case 603:m.evolution_item_requirement=603;break;case"ITEM_X_MIRACLE":case 604:m.evolution_item_requirement=604;break;case"ITEM_RAZZ_BERRY":case 701:m.evolution_item_requirement=701;break;case"ITEM_BLUK_BERRY":case 702:m.evolution_item_requirement=702;break;case"ITEM_NANAB_BERRY":case 703:m.evolution_item_requirement=703;break;case"ITEM_WEPAR_BERRY":case 704:m.evolution_item_requirement=704;break;case"ITEM_PINAP_BERRY":case 705:m.evolution_item_requirement=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.evolution_item_requirement=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.evolution_item_requirement=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.evolution_item_requirement=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.evolution_item_requirement=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.evolution_item_requirement=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.evolution_item_requirement=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.evolution_item_requirement=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.evolution_item_requirement=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.evolution_item_requirement=1002;break;case"ITEM_SUN_STONE":case 1101:m.evolution_item_requirement=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.evolution_item_requirement=1102;break;case"ITEM_METAL_COAT":case 1103:m.evolution_item_requirement=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.evolution_item_requirement=1104;break;case"ITEM_UP_GRADE":case 1105:m.evolution_item_requirement=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.evolution_item_requirement=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.evolution_item_requirement=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.evolution_item_requirement=1202;break;case"ITEM_RARE_CANDY":case 1301:m.evolution_item_requirement=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.evolution_item_requirement=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.evolution_item_requirement=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.evolution_item_requirement=1403;break;case"ITEM_STAR_PIECE":case 1404:m.evolution_item_requirement=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.evolution_item_requirement=1405;break}return m};EvolvePokemonMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0;d.evolution_item_requirement=o.enums===String?"ITEM_UNKNOWN":0}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}if(m.evolution_item_requirement!=null&&m.hasOwnProperty("evolution_item_requirement")){d.evolution_item_requirement=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.evolution_item_requirement]:m.evolution_item_requirement}return d};EvolvePokemonMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EvolvePokemonMessage}();Messages.FetchAllNewsMessage=function(){function FetchAllNewsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FetchAllNewsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};FetchAllNewsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.FetchAllNewsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};FetchAllNewsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.FetchAllNewsMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.FetchAllNewsMessage};FetchAllNewsMessage.toObject=function toObject(){return{}};FetchAllNewsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FetchAllNewsMessage}();Messages.FortDeployPokemonMessage=function(){function FortDeployPokemonMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FortDeployPokemonMessage.prototype.fort_id="";FortDeployPokemonMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;FortDeployPokemonMessage.prototype.player_latitude=0;FortDeployPokemonMessage.prototype.player_longitude=0;FortDeployPokemonMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(10).string(m.fort_id);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(17).fixed64(m.pokemon_id);if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude"))w.uint32(25).double(m.player_latitude);if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude"))w.uint32(33).double(m.player_longitude);return w};FortDeployPokemonMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.FortDeployPokemonMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fort_id=r.string();break;case 2:m.pokemon_id=r.fixed64();break;case 3:m.player_latitude=r.double();break;case 4:m.player_longitude=r.double();break;default:r.skipType(t&7);break}}return m};FortDeployPokemonMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.FortDeployPokemonMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.FortDeployPokemonMessage;if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}if(d.player_latitude!=null){m.player_latitude=Number(d.player_latitude)}if(d.player_longitude!=null){m.player_longitude=Number(d.player_longitude)}return m};FortDeployPokemonMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.fort_id="";if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0;d.player_latitude=0;d.player_longitude=0}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude")){d.player_latitude=o.json&&!isFinite(m.player_latitude)?String(m.player_latitude):m.player_latitude}if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude")){d.player_longitude=o.json&&!isFinite(m.player_longitude)?String(m.player_longitude):m.player_longitude}return d};FortDeployPokemonMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FortDeployPokemonMessage}();Messages.FortDetailsMessage=function(){function FortDetailsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FortDetailsMessage.prototype.fort_id="";FortDetailsMessage.prototype.latitude=0;FortDetailsMessage.prototype.longitude=0;FortDetailsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(10).string(m.fort_id);if(m.latitude!=null&&m.hasOwnProperty("latitude"))w.uint32(17).double(m.latitude);if(m.longitude!=null&&m.hasOwnProperty("longitude"))w.uint32(25).double(m.longitude);return w};FortDetailsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.FortDetailsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fort_id=r.string();break;case 2:m.latitude=r.double();break;case 3:m.longitude=r.double();break;default:r.skipType(t&7);break}}return m};FortDetailsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.FortDetailsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.FortDetailsMessage;if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.latitude!=null){m.latitude=Number(d.latitude)}if(d.longitude!=null){m.longitude=Number(d.longitude)}return m};FortDetailsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.fort_id="";d.latitude=0;d.longitude=0}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.latitude!=null&&m.hasOwnProperty("latitude")){d.latitude=o.json&&!isFinite(m.latitude)?String(m.latitude):m.latitude}if(m.longitude!=null&&m.hasOwnProperty("longitude")){d.longitude=o.json&&!isFinite(m.longitude)?String(m.longitude):m.longitude}return d};FortDetailsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FortDetailsMessage}();Messages.FortRecallPokemonMessage=function(){function FortRecallPokemonMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FortRecallPokemonMessage.prototype.fort_id="";FortRecallPokemonMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;FortRecallPokemonMessage.prototype.player_latitude=0;FortRecallPokemonMessage.prototype.player_longitude=0;FortRecallPokemonMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(10).string(m.fort_id);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(17).fixed64(m.pokemon_id);if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude"))w.uint32(25).double(m.player_latitude);if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude"))w.uint32(33).double(m.player_longitude);return w};FortRecallPokemonMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.FortRecallPokemonMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fort_id=r.string();break;case 2:m.pokemon_id=r.fixed64();break;case 3:m.player_latitude=r.double();break;case 4:m.player_longitude=r.double();break;default:r.skipType(t&7);break}}return m};FortRecallPokemonMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.FortRecallPokemonMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.FortRecallPokemonMessage;if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}if(d.player_latitude!=null){m.player_latitude=Number(d.player_latitude)}if(d.player_longitude!=null){m.player_longitude=Number(d.player_longitude)}return m};FortRecallPokemonMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.fort_id="";if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0;d.player_latitude=0;d.player_longitude=0}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude")){d.player_latitude=o.json&&!isFinite(m.player_latitude)?String(m.player_latitude):m.player_latitude}if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude")){d.player_longitude=o.json&&!isFinite(m.player_longitude)?String(m.player_longitude):m.player_longitude}return d};FortRecallPokemonMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FortRecallPokemonMessage}();Messages.FortSearchMessage=function(){function FortSearchMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FortSearchMessage.prototype.fort_id="";FortSearchMessage.prototype.player_latitude=0;FortSearchMessage.prototype.player_longitude=0;FortSearchMessage.prototype.fort_latitude=0;FortSearchMessage.prototype.fort_longitude=0;FortSearchMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(10).string(m.fort_id);if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude"))w.uint32(17).double(m.player_latitude);if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude"))w.uint32(25).double(m.player_longitude);if(m.fort_latitude!=null&&m.hasOwnProperty("fort_latitude"))w.uint32(33).double(m.fort_latitude);if(m.fort_longitude!=null&&m.hasOwnProperty("fort_longitude"))w.uint32(41).double(m.fort_longitude);return w};FortSearchMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.FortSearchMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fort_id=r.string();break;case 2:m.player_latitude=r.double();break;case 3:m.player_longitude=r.double();break;case 4:m.fort_latitude=r.double();break;case 5:m.fort_longitude=r.double();break;default:r.skipType(t&7);break}}return m};FortSearchMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.FortSearchMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.FortSearchMessage;if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.player_latitude!=null){m.player_latitude=Number(d.player_latitude)}if(d.player_longitude!=null){m.player_longitude=Number(d.player_longitude)}if(d.fort_latitude!=null){m.fort_latitude=Number(d.fort_latitude)}if(d.fort_longitude!=null){m.fort_longitude=Number(d.fort_longitude)}return m};FortSearchMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.fort_id="";d.player_latitude=0;d.player_longitude=0;d.fort_latitude=0;d.fort_longitude=0}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude")){d.player_latitude=o.json&&!isFinite(m.player_latitude)?String(m.player_latitude):m.player_latitude}if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude")){d.player_longitude=o.json&&!isFinite(m.player_longitude)?String(m.player_longitude):m.player_longitude}if(m.fort_latitude!=null&&m.hasOwnProperty("fort_latitude")){d.fort_latitude=o.json&&!isFinite(m.fort_latitude)?String(m.fort_latitude):m.fort_latitude}if(m.fort_longitude!=null&&m.hasOwnProperty("fort_longitude")){d.fort_longitude=o.json&&!isFinite(m.fort_longitude)?String(m.fort_longitude):m.fort_longitude}return d};FortSearchMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FortSearchMessage}();Messages.GenerateCombatChallengeIdMessage=function(){function GenerateCombatChallengeIdMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GenerateCombatChallengeIdMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};GenerateCombatChallengeIdMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GenerateCombatChallengeIdMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};GenerateCombatChallengeIdMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GenerateCombatChallengeIdMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.GenerateCombatChallengeIdMessage};GenerateCombatChallengeIdMessage.toObject=function toObject(){return{}};GenerateCombatChallengeIdMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GenerateCombatChallengeIdMessage}();Messages.GetAssetDigestMessage=function(){function GetAssetDigestMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetAssetDigestMessage.prototype.platform=0;GetAssetDigestMessage.prototype.device_manufacturer="";GetAssetDigestMessage.prototype.device_model="";GetAssetDigestMessage.prototype.locale="";GetAssetDigestMessage.prototype.app_version=0;GetAssetDigestMessage.prototype.paginate=false;GetAssetDigestMessage.prototype.page_offset=0;GetAssetDigestMessage.prototype.page_timestamp=$util.Long?$util.Long.fromBits(0,0,true):0;GetAssetDigestMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.platform!=null&&m.hasOwnProperty("platform"))w.uint32(8).int32(m.platform);if(m.device_manufacturer!=null&&m.hasOwnProperty("device_manufacturer"))w.uint32(18).string(m.device_manufacturer);if(m.device_model!=null&&m.hasOwnProperty("device_model"))w.uint32(26).string(m.device_model);if(m.locale!=null&&m.hasOwnProperty("locale"))w.uint32(34).string(m.locale);if(m.app_version!=null&&m.hasOwnProperty("app_version"))w.uint32(40).uint32(m.app_version);if(m.paginate!=null&&m.hasOwnProperty("paginate"))w.uint32(48).bool(m.paginate);if(m.page_offset!=null&&m.hasOwnProperty("page_offset"))w.uint32(56).int32(m.page_offset);if(m.page_timestamp!=null&&m.hasOwnProperty("page_timestamp"))w.uint32(64).uint64(m.page_timestamp);return w};GetAssetDigestMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetAssetDigestMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.platform=r.int32();break;case 2:m.device_manufacturer=r.string();break;case 3:m.device_model=r.string();break;case 4:m.locale=r.string();break;case 5:m.app_version=r.uint32();break;case 6:m.paginate=r.bool();break;case 7:m.page_offset=r.int32();break;case 8:m.page_timestamp=r.uint64();break;default:r.skipType(t&7);break}}return m};GetAssetDigestMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetAssetDigestMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetAssetDigestMessage;switch(d.platform){case"UNSET":case 0:m.platform=0;break;case"IOS":case 1:m.platform=1;break;case"ANDROID":case 2:m.platform=2;break;case"OSX":case 3:m.platform=3;break;case"WINDOWS":case 4:m.platform=4;break;case"APPLE_WATCH":case 5:m.platform=5;break}if(d.device_manufacturer!=null){m.device_manufacturer=String(d.device_manufacturer)}if(d.device_model!=null){m.device_model=String(d.device_model)}if(d.locale!=null){m.locale=String(d.locale)}if(d.app_version!=null){m.app_version=d.app_version>>>0}if(d.paginate!=null){m.paginate=Boolean(d.paginate)}if(d.page_offset!=null){m.page_offset=d.page_offset|0}if(d.page_timestamp!=null){if($util.Long)(m.page_timestamp=$util.Long.fromValue(d.page_timestamp)).unsigned=true;else if(typeof d.page_timestamp==="string")m.page_timestamp=parseInt(d.page_timestamp,10);else if(typeof d.page_timestamp==="number")m.page_timestamp=d.page_timestamp;else if(typeof d.page_timestamp==="object")m.page_timestamp=new $util.LongBits(d.page_timestamp.low>>>0,d.page_timestamp.high>>>0).toNumber(true)}return m};GetAssetDigestMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.platform=o.enums===String?"UNSET":0;d.device_manufacturer="";d.device_model="";d.locale="";d.app_version=0;d.paginate=false;d.page_offset=0;if($util.Long){var n=new $util.Long(0,0,true);d.page_timestamp=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.page_timestamp=o.longs===String?"0":0}if(m.platform!=null&&m.hasOwnProperty("platform")){d.platform=o.enums===String?$root.POGOProtos.Enums.Platform[m.platform]:m.platform}if(m.device_manufacturer!=null&&m.hasOwnProperty("device_manufacturer")){d.device_manufacturer=m.device_manufacturer}if(m.device_model!=null&&m.hasOwnProperty("device_model")){d.device_model=m.device_model}if(m.locale!=null&&m.hasOwnProperty("locale")){d.locale=m.locale}if(m.app_version!=null&&m.hasOwnProperty("app_version")){d.app_version=m.app_version}if(m.paginate!=null&&m.hasOwnProperty("paginate")){d.paginate=m.paginate}if(m.page_offset!=null&&m.hasOwnProperty("page_offset")){d.page_offset=m.page_offset}if(m.page_timestamp!=null&&m.hasOwnProperty("page_timestamp")){if(typeof m.page_timestamp==="number")d.page_timestamp=o.longs===String?String(m.page_timestamp):m.page_timestamp;else d.page_timestamp=o.longs===String?$util.Long.prototype.toString.call(m.page_timestamp):o.longs===Number?new $util.LongBits(m.page_timestamp.low>>>0,m.page_timestamp.high>>>0).toNumber(true):m.page_timestamp}return d};GetAssetDigestMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetAssetDigestMessage}();Messages.GetAvailableSkusAndBalancesMessage=function(){function GetAvailableSkusAndBalancesMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetAvailableSkusAndBalancesMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};GetAvailableSkusAndBalancesMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetAvailableSkusAndBalancesMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};GetAvailableSkusAndBalancesMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetAvailableSkusAndBalancesMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.GetAvailableSkusAndBalancesMessage};GetAvailableSkusAndBalancesMessage.toObject=function toObject(){return{}};GetAvailableSkusAndBalancesMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetAvailableSkusAndBalancesMessage}();Messages.GetBuddyWalkedMessage=function(){function GetBuddyWalkedMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetBuddyWalkedMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};GetBuddyWalkedMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetBuddyWalkedMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};GetBuddyWalkedMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetBuddyWalkedMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.GetBuddyWalkedMessage};GetBuddyWalkedMessage.toObject=function toObject(){return{}};GetBuddyWalkedMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetBuddyWalkedMessage}();Messages.GetClientBgmodeSettingsMessage=function(){function GetClientBgmodeSettingsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetClientBgmodeSettingsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};GetClientBgmodeSettingsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetClientBgmodeSettingsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};GetClientBgmodeSettingsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetClientBgmodeSettingsMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.GetClientBgmodeSettingsMessage};GetClientBgmodeSettingsMessage.toObject=function toObject(){return{}};GetClientBgmodeSettingsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetClientBgmodeSettingsMessage}();Messages.GetClientTelemetrySettingsMessage=function(){function GetClientTelemetrySettingsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetClientTelemetrySettingsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};GetClientTelemetrySettingsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetClientTelemetrySettingsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};GetClientTelemetrySettingsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetClientTelemetrySettingsMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.GetClientTelemetrySettingsMessage};GetClientTelemetrySettingsMessage.toObject=function toObject(){return{}};GetClientTelemetrySettingsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetClientTelemetrySettingsMessage}();Messages.GetCombatChallengeMessage=function(){function GetCombatChallengeMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetCombatChallengeMessage.prototype.challenge_id="";GetCombatChallengeMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id"))w.uint32(10).string(m.challenge_id);return w};GetCombatChallengeMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetCombatChallengeMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.challenge_id=r.string();break;default:r.skipType(t&7);break}}return m};GetCombatChallengeMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetCombatChallengeMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetCombatChallengeMessage;if(d.challenge_id!=null){m.challenge_id=String(d.challenge_id)}return m};GetCombatChallengeMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.challenge_id=""}if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id")){d.challenge_id=m.challenge_id}return d};GetCombatChallengeMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetCombatChallengeMessage}();Messages.GetCombatPlayerProfileMessage=function(){function GetCombatPlayerProfileMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetCombatPlayerProfileMessage.prototype.player_id="";GetCombatPlayerProfileMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);return w};GetCombatPlayerProfileMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetCombatPlayerProfileMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;default:r.skipType(t&7);break}}return m};GetCombatPlayerProfileMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetCombatPlayerProfileMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetCombatPlayerProfileMessage;if(d.player_id!=null){m.player_id=String(d.player_id)}return m};GetCombatPlayerProfileMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id=""}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}return d};GetCombatPlayerProfileMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetCombatPlayerProfileMessage}();Messages.GetCombatResultsMessage=function(){function GetCombatResultsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetCombatResultsMessage.prototype.combat_id="";GetCombatResultsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.combat_id!=null&&m.hasOwnProperty("combat_id"))w.uint32(10).string(m.combat_id);return w};GetCombatResultsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetCombatResultsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.combat_id=r.string();break;default:r.skipType(t&7);break}}return m};GetCombatResultsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetCombatResultsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetCombatResultsMessage;if(d.combat_id!=null){m.combat_id=String(d.combat_id)}return m};GetCombatResultsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.combat_id=""}if(m.combat_id!=null&&m.hasOwnProperty("combat_id")){d.combat_id=m.combat_id}return d};GetCombatResultsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetCombatResultsMessage}();Messages.GetDownloadUrlsMessage=function(){function GetDownloadUrlsMessage(p){this.asset_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetDownloadUrlsMessage.prototype.asset_id=$util.emptyArray;GetDownloadUrlsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.asset_id!=null&&m.asset_id.length){for(var i=0;i<m.asset_id.length;++i)w.uint32(10).string(m.asset_id[i])}return w};GetDownloadUrlsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetDownloadUrlsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.asset_id&&m.asset_id.length))m.asset_id=[];m.asset_id.push(r.string());break;default:r.skipType(t&7);break}}return m};GetDownloadUrlsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetDownloadUrlsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetDownloadUrlsMessage;if(d.asset_id){if(!Array.isArray(d.asset_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.GetDownloadUrlsMessage.asset_id: array expected");m.asset_id=[];for(var i=0;i<d.asset_id.length;++i){m.asset_id[i]=String(d.asset_id[i])}}return m};GetDownloadUrlsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.asset_id=[]}if(m.asset_id&&m.asset_id.length){d.asset_id=[];for(var j=0;j<m.asset_id.length;++j){d.asset_id[j]=m.asset_id[j]}}return d};GetDownloadUrlsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetDownloadUrlsMessage}();Messages.GetFitnessReportMessage=function(){function GetFitnessReportMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetFitnessReportMessage.prototype.num_of_days=0;GetFitnessReportMessage.prototype.num_of_weeks=0;GetFitnessReportMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.num_of_days!=null&&m.hasOwnProperty("num_of_days"))w.uint32(8).int32(m.num_of_days);if(m.num_of_weeks!=null&&m.hasOwnProperty("num_of_weeks"))w.uint32(16).int32(m.num_of_weeks);return w};GetFitnessReportMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetFitnessReportMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.num_of_days=r.int32();break;case 2:m.num_of_weeks=r.int32();break;default:r.skipType(t&7);break}}return m};GetFitnessReportMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetFitnessReportMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetFitnessReportMessage;if(d.num_of_days!=null){m.num_of_days=d.num_of_days|0}if(d.num_of_weeks!=null){m.num_of_weeks=d.num_of_weeks|0}return m};GetFitnessReportMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.num_of_days=0;d.num_of_weeks=0}if(m.num_of_days!=null&&m.hasOwnProperty("num_of_days")){d.num_of_days=m.num_of_days}if(m.num_of_weeks!=null&&m.hasOwnProperty("num_of_weeks")){d.num_of_weeks=m.num_of_weeks}return d};GetFitnessReportMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetFitnessReportMessage}();Messages.GetFitnessRewardsMessage=function(){function GetFitnessRewardsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetFitnessRewardsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};GetFitnessRewardsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetFitnessRewardsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};GetFitnessRewardsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetFitnessRewardsMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.GetFitnessRewardsMessage};GetFitnessRewardsMessage.toObject=function toObject(){return{}};GetFitnessRewardsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetFitnessRewardsMessage}();Messages.GetFriendshipMilestoneRewardsMessage=function(){function GetFriendshipMilestoneRewardsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetFriendshipMilestoneRewardsMessage.prototype.friend_id="";GetFriendshipMilestoneRewardsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.friend_id!=null&&m.hasOwnProperty("friend_id"))w.uint32(10).string(m.friend_id);return w};GetFriendshipMilestoneRewardsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetFriendshipMilestoneRewardsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.friend_id=r.string();break;default:r.skipType(t&7);break}}return m};GetFriendshipMilestoneRewardsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetFriendshipMilestoneRewardsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetFriendshipMilestoneRewardsMessage;if(d.friend_id!=null){m.friend_id=String(d.friend_id)}return m};GetFriendshipMilestoneRewardsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.friend_id=""}if(m.friend_id!=null&&m.hasOwnProperty("friend_id")){d.friend_id=m.friend_id}return d};GetFriendshipMilestoneRewardsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetFriendshipMilestoneRewardsMessage}();Messages.GetFriendshipRewardsMessage=function(){function GetFriendshipRewardsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetFriendshipRewardsMessage.prototype.friend_id="";GetFriendshipRewardsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.friend_id!=null&&m.hasOwnProperty("friend_id"))w.uint32(10).string(m.friend_id);return w};GetFriendshipRewardsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetFriendshipRewardsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.friend_id=r.string();break;default:r.skipType(t&7);break}}return m};GetFriendshipRewardsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetFriendshipRewardsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetFriendshipRewardsMessage;if(d.friend_id!=null){m.friend_id=String(d.friend_id)}return m};GetFriendshipRewardsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.friend_id=""}if(m.friend_id!=null&&m.hasOwnProperty("friend_id")){d.friend_id=m.friend_id}return d};GetFriendshipRewardsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetFriendshipRewardsMessage}();Messages.GetGymBadgeDetailsMessage=function(){function GetGymBadgeDetailsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetGymBadgeDetailsMessage.prototype.fort_id="";GetGymBadgeDetailsMessage.prototype.latitude=0;GetGymBadgeDetailsMessage.prototype.longitude=0;GetGymBadgeDetailsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(10).string(m.fort_id);if(m.latitude!=null&&m.hasOwnProperty("latitude"))w.uint32(17).double(m.latitude);if(m.longitude!=null&&m.hasOwnProperty("longitude"))w.uint32(25).double(m.longitude);return w};GetGymBadgeDetailsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetGymBadgeDetailsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fort_id=r.string();break;case 2:m.latitude=r.double();break;case 3:m.longitude=r.double();break;default:r.skipType(t&7);break}}return m};GetGymBadgeDetailsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetGymBadgeDetailsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetGymBadgeDetailsMessage;if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.latitude!=null){m.latitude=Number(d.latitude)}if(d.longitude!=null){m.longitude=Number(d.longitude)}return m};GetGymBadgeDetailsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.fort_id="";d.latitude=0;d.longitude=0}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.latitude!=null&&m.hasOwnProperty("latitude")){d.latitude=o.json&&!isFinite(m.latitude)?String(m.latitude):m.latitude}if(m.longitude!=null&&m.hasOwnProperty("longitude")){d.longitude=o.json&&!isFinite(m.longitude)?String(m.longitude):m.longitude}return d};GetGymBadgeDetailsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetGymBadgeDetailsMessage}();Messages.GetGymDetailsMessage=function(){function GetGymDetailsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetGymDetailsMessage.prototype.gym_id="";GetGymDetailsMessage.prototype.player_latitude=0;GetGymDetailsMessage.prototype.player_longitude=0;GetGymDetailsMessage.prototype.gym_latitude=0;GetGymDetailsMessage.prototype.gym_longitude=0;GetGymDetailsMessage.prototype.client_version="";GetGymDetailsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(10).string(m.gym_id);if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude"))w.uint32(17).double(m.player_latitude);if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude"))w.uint32(25).double(m.player_longitude);if(m.gym_latitude!=null&&m.hasOwnProperty("gym_latitude"))w.uint32(33).double(m.gym_latitude);if(m.gym_longitude!=null&&m.hasOwnProperty("gym_longitude"))w.uint32(41).double(m.gym_longitude);if(m.client_version!=null&&m.hasOwnProperty("client_version"))w.uint32(50).string(m.client_version);return w};GetGymDetailsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetGymDetailsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gym_id=r.string();break;case 2:m.player_latitude=r.double();break;case 3:m.player_longitude=r.double();break;case 4:m.gym_latitude=r.double();break;case 5:m.gym_longitude=r.double();break;case 6:m.client_version=r.string();break;default:r.skipType(t&7);break}}return m};GetGymDetailsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetGymDetailsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetGymDetailsMessage;if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.player_latitude!=null){m.player_latitude=Number(d.player_latitude)}if(d.player_longitude!=null){m.player_longitude=Number(d.player_longitude)}if(d.gym_latitude!=null){m.gym_latitude=Number(d.gym_latitude)}if(d.gym_longitude!=null){m.gym_longitude=Number(d.gym_longitude)}if(d.client_version!=null){m.client_version=String(d.client_version)}return m};GetGymDetailsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.gym_id="";d.player_latitude=0;d.player_longitude=0;d.gym_latitude=0;d.gym_longitude=0;d.client_version=""}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude")){d.player_latitude=o.json&&!isFinite(m.player_latitude)?String(m.player_latitude):m.player_latitude}if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude")){d.player_longitude=o.json&&!isFinite(m.player_longitude)?String(m.player_longitude):m.player_longitude}if(m.gym_latitude!=null&&m.hasOwnProperty("gym_latitude")){d.gym_latitude=o.json&&!isFinite(m.gym_latitude)?String(m.gym_latitude):m.gym_latitude}if(m.gym_longitude!=null&&m.hasOwnProperty("gym_longitude")){d.gym_longitude=o.json&&!isFinite(m.gym_longitude)?String(m.gym_longitude):m.gym_longitude}if(m.client_version!=null&&m.hasOwnProperty("client_version")){d.client_version=m.client_version}return d};GetGymDetailsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetGymDetailsMessage}();Messages.GetHatchedEggsMessage=function(){function GetHatchedEggsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetHatchedEggsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};GetHatchedEggsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetHatchedEggsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};GetHatchedEggsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetHatchedEggsMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.GetHatchedEggsMessage};GetHatchedEggsMessage.toObject=function toObject(){return{}};GetHatchedEggsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetHatchedEggsMessage}();Messages.GetHoloInventoryMessage=function(){function GetHoloInventoryMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetHoloInventoryMessage.prototype.last_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;GetHoloInventoryMessage.prototype.item_been_seen=0;GetHoloInventoryMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.last_timestamp_ms!=null&&m.hasOwnProperty("last_timestamp_ms"))w.uint32(8).int64(m.last_timestamp_ms);if(m.item_been_seen!=null&&m.hasOwnProperty("item_been_seen"))w.uint32(16).int32(m.item_been_seen);return w};GetHoloInventoryMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetHoloInventoryMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.last_timestamp_ms=r.int64();break;case 2:m.item_been_seen=r.int32();break;default:r.skipType(t&7);break}}return m};GetHoloInventoryMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetHoloInventoryMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetHoloInventoryMessage;if(d.last_timestamp_ms!=null){if($util.Long)(m.last_timestamp_ms=$util.Long.fromValue(d.last_timestamp_ms)).unsigned=false;else if(typeof d.last_timestamp_ms==="string")m.last_timestamp_ms=parseInt(d.last_timestamp_ms,10);else if(typeof d.last_timestamp_ms==="number")m.last_timestamp_ms=d.last_timestamp_ms;else if(typeof d.last_timestamp_ms==="object")m.last_timestamp_ms=new $util.LongBits(d.last_timestamp_ms.low>>>0,d.last_timestamp_ms.high>>>0).toNumber()}if(d.item_been_seen!=null){m.item_been_seen=d.item_been_seen|0}return m};GetHoloInventoryMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.last_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.last_timestamp_ms=o.longs===String?"0":0;d.item_been_seen=0}if(m.last_timestamp_ms!=null&&m.hasOwnProperty("last_timestamp_ms")){if(typeof m.last_timestamp_ms==="number")d.last_timestamp_ms=o.longs===String?String(m.last_timestamp_ms):m.last_timestamp_ms;else d.last_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.last_timestamp_ms):o.longs===Number?new $util.LongBits(m.last_timestamp_ms.low>>>0,m.last_timestamp_ms.high>>>0).toNumber():m.last_timestamp_ms}if(m.item_been_seen!=null&&m.hasOwnProperty("item_been_seen")){d.item_been_seen=m.item_been_seen}return d};GetHoloInventoryMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetHoloInventoryMessage}();Messages.GetInboxMessage=function(){function GetInboxMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetInboxMessage.prototype.is_history=false;GetInboxMessage.prototype.is_reverse=false;GetInboxMessage.prototype.not_before_ms=$util.Long?$util.Long.fromBits(0,0,false):0;GetInboxMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.is_history!=null&&m.hasOwnProperty("is_history"))w.uint32(8).bool(m.is_history);if(m.is_reverse!=null&&m.hasOwnProperty("is_reverse"))w.uint32(16).bool(m.is_reverse);if(m.not_before_ms!=null&&m.hasOwnProperty("not_before_ms"))w.uint32(24).int64(m.not_before_ms);return w};GetInboxMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetInboxMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.is_history=r.bool();break;case 2:m.is_reverse=r.bool();break;case 3:m.not_before_ms=r.int64();break;default:r.skipType(t&7);break}}return m};GetInboxMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetInboxMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetInboxMessage;if(d.is_history!=null){m.is_history=Boolean(d.is_history)}if(d.is_reverse!=null){m.is_reverse=Boolean(d.is_reverse)}if(d.not_before_ms!=null){if($util.Long)(m.not_before_ms=$util.Long.fromValue(d.not_before_ms)).unsigned=false;else if(typeof d.not_before_ms==="string")m.not_before_ms=parseInt(d.not_before_ms,10);else if(typeof d.not_before_ms==="number")m.not_before_ms=d.not_before_ms;else if(typeof d.not_before_ms==="object")m.not_before_ms=new $util.LongBits(d.not_before_ms.low>>>0,d.not_before_ms.high>>>0).toNumber()}return m};GetInboxMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.is_history=false;d.is_reverse=false;if($util.Long){var n=new $util.Long(0,0,false);d.not_before_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.not_before_ms=o.longs===String?"0":0}if(m.is_history!=null&&m.hasOwnProperty("is_history")){d.is_history=m.is_history}if(m.is_reverse!=null&&m.hasOwnProperty("is_reverse")){d.is_reverse=m.is_reverse}if(m.not_before_ms!=null&&m.hasOwnProperty("not_before_ms")){if(typeof m.not_before_ms==="number")d.not_before_ms=o.longs===String?String(m.not_before_ms):m.not_before_ms;else d.not_before_ms=o.longs===String?$util.Long.prototype.toString.call(m.not_before_ms):o.longs===Number?new $util.LongBits(m.not_before_ms.low>>>0,m.not_before_ms.high>>>0).toNumber():m.not_before_ms}return d};GetInboxMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetInboxMessage}();Messages.GetIncensePokemonMessage=function(){function GetIncensePokemonMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetIncensePokemonMessage.prototype.player_latitude=0;GetIncensePokemonMessage.prototype.player_longitude=0;GetIncensePokemonMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude"))w.uint32(9).double(m.player_latitude);if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude"))w.uint32(17).double(m.player_longitude);return w};GetIncensePokemonMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetIncensePokemonMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_latitude=r.double();break;case 2:m.player_longitude=r.double();break;default:r.skipType(t&7);break}}return m};GetIncensePokemonMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetIncensePokemonMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetIncensePokemonMessage;if(d.player_latitude!=null){m.player_latitude=Number(d.player_latitude)}if(d.player_longitude!=null){m.player_longitude=Number(d.player_longitude)}return m};GetIncensePokemonMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_latitude=0;d.player_longitude=0}if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude")){d.player_latitude=o.json&&!isFinite(m.player_latitude)?String(m.player_latitude):m.player_latitude}if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude")){d.player_longitude=o.json&&!isFinite(m.player_longitude)?String(m.player_longitude):m.player_longitude}return d};GetIncensePokemonMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetIncensePokemonMessage}();Messages.GetInventoryMessage=function(){function GetInventoryMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetInventoryMessage.prototype.last_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;GetInventoryMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.last_timestamp_ms!=null&&m.hasOwnProperty("last_timestamp_ms"))w.uint32(8).int64(m.last_timestamp_ms);return w};GetInventoryMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetInventoryMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.last_timestamp_ms=r.int64();break;default:r.skipType(t&7);break}}return m};GetInventoryMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetInventoryMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetInventoryMessage;if(d.last_timestamp_ms!=null){if($util.Long)(m.last_timestamp_ms=$util.Long.fromValue(d.last_timestamp_ms)).unsigned=false;else if(typeof d.last_timestamp_ms==="string")m.last_timestamp_ms=parseInt(d.last_timestamp_ms,10);else if(typeof d.last_timestamp_ms==="number")m.last_timestamp_ms=d.last_timestamp_ms;else if(typeof d.last_timestamp_ms==="object")m.last_timestamp_ms=new $util.LongBits(d.last_timestamp_ms.low>>>0,d.last_timestamp_ms.high>>>0).toNumber()}return m};GetInventoryMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.last_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.last_timestamp_ms=o.longs===String?"0":0}if(m.last_timestamp_ms!=null&&m.hasOwnProperty("last_timestamp_ms")){if(typeof m.last_timestamp_ms==="number")d.last_timestamp_ms=o.longs===String?String(m.last_timestamp_ms):m.last_timestamp_ms;else d.last_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.last_timestamp_ms):o.longs===Number?new $util.LongBits(m.last_timestamp_ms.low>>>0,m.last_timestamp_ms.high>>>0).toNumber():m.last_timestamp_ms}return d};GetInventoryMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetInventoryMessage}();Messages.GetMapObjectsMessage=function(){function GetMapObjectsMessage(p){this.cell_id=[];this.since_timestamp_ms=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetMapObjectsMessage.prototype.cell_id=$util.emptyArray;GetMapObjectsMessage.prototype.since_timestamp_ms=$util.emptyArray;GetMapObjectsMessage.prototype.latitude=0;GetMapObjectsMessage.prototype.longitude=0;GetMapObjectsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.cell_id!=null&&m.cell_id.length){w.uint32(10).fork();for(var i=0;i<m.cell_id.length;++i)w.uint64(m.cell_id[i]);w.ldelim()}if(m.since_timestamp_ms!=null&&m.since_timestamp_ms.length){w.uint32(18).fork();for(var i=0;i<m.since_timestamp_ms.length;++i)w.int64(m.since_timestamp_ms[i]);w.ldelim()}if(m.latitude!=null&&m.hasOwnProperty("latitude"))w.uint32(25).double(m.latitude);if(m.longitude!=null&&m.hasOwnProperty("longitude"))w.uint32(33).double(m.longitude);return w};GetMapObjectsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetMapObjectsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.cell_id&&m.cell_id.length))m.cell_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.cell_id.push(r.uint64())}else m.cell_id.push(r.uint64());break;case 2:if(!(m.since_timestamp_ms&&m.since_timestamp_ms.length))m.since_timestamp_ms=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.since_timestamp_ms.push(r.int64())}else m.since_timestamp_ms.push(r.int64());break;case 3:m.latitude=r.double();break;case 4:m.longitude=r.double();break;default:r.skipType(t&7);break}}return m};GetMapObjectsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetMapObjectsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetMapObjectsMessage;if(d.cell_id){if(!Array.isArray(d.cell_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.GetMapObjectsMessage.cell_id: array expected");m.cell_id=[];for(var i=0;i<d.cell_id.length;++i){if($util.Long)(m.cell_id[i]=$util.Long.fromValue(d.cell_id[i])).unsigned=true;else if(typeof d.cell_id[i]==="string")m.cell_id[i]=parseInt(d.cell_id[i],10);else if(typeof d.cell_id[i]==="number")m.cell_id[i]=d.cell_id[i];else if(typeof d.cell_id[i]==="object")m.cell_id[i]=new $util.LongBits(d.cell_id[i].low>>>0,d.cell_id[i].high>>>0).toNumber(true)}}if(d.since_timestamp_ms){if(!Array.isArray(d.since_timestamp_ms))throw TypeError(".POGOProtos.Networking.Requests.Messages.GetMapObjectsMessage.since_timestamp_ms: array expected");m.since_timestamp_ms=[];for(var i=0;i<d.since_timestamp_ms.length;++i){if($util.Long)(m.since_timestamp_ms[i]=$util.Long.fromValue(d.since_timestamp_ms[i])).unsigned=false;else if(typeof d.since_timestamp_ms[i]==="string")m.since_timestamp_ms[i]=parseInt(d.since_timestamp_ms[i],10);else if(typeof d.since_timestamp_ms[i]==="number")m.since_timestamp_ms[i]=d.since_timestamp_ms[i];else if(typeof d.since_timestamp_ms[i]==="object")m.since_timestamp_ms[i]=new $util.LongBits(d.since_timestamp_ms[i].low>>>0,d.since_timestamp_ms[i].high>>>0).toNumber()}}if(d.latitude!=null){m.latitude=Number(d.latitude)}if(d.longitude!=null){m.longitude=Number(d.longitude)}return m};GetMapObjectsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.cell_id=[];d.since_timestamp_ms=[]}if(o.defaults){d.latitude=0;d.longitude=0}if(m.cell_id&&m.cell_id.length){d.cell_id=[];for(var j=0;j<m.cell_id.length;++j){if(typeof m.cell_id[j]==="number")d.cell_id[j]=o.longs===String?String(m.cell_id[j]):m.cell_id[j];else d.cell_id[j]=o.longs===String?$util.Long.prototype.toString.call(m.cell_id[j]):o.longs===Number?new $util.LongBits(m.cell_id[j].low>>>0,m.cell_id[j].high>>>0).toNumber(true):m.cell_id[j]}}if(m.since_timestamp_ms&&m.since_timestamp_ms.length){d.since_timestamp_ms=[];for(var j=0;j<m.since_timestamp_ms.length;++j){if(typeof m.since_timestamp_ms[j]==="number")d.since_timestamp_ms[j]=o.longs===String?String(m.since_timestamp_ms[j]):m.since_timestamp_ms[j];else d.since_timestamp_ms[j]=o.longs===String?$util.Long.prototype.toString.call(m.since_timestamp_ms[j]):o.longs===Number?new $util.LongBits(m.since_timestamp_ms[j].low>>>0,m.since_timestamp_ms[j].high>>>0).toNumber():m.since_timestamp_ms[j]}}if(m.latitude!=null&&m.hasOwnProperty("latitude")){d.latitude=o.json&&!isFinite(m.latitude)?String(m.latitude):m.latitude}if(m.longitude!=null&&m.hasOwnProperty("longitude")){d.longitude=o.json&&!isFinite(m.longitude)?String(m.longitude):m.longitude}return d};GetMapObjectsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetMapObjectsMessage}();Messages.GetNewQuestsMessage=function(){function GetNewQuestsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetNewQuestsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};GetNewQuestsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetNewQuestsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};GetNewQuestsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetNewQuestsMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.GetNewQuestsMessage};GetNewQuestsMessage.toObject=function toObject(){return{}};GetNewQuestsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetNewQuestsMessage}();Messages.GetNpcCombatRewardsMessage=function(){function GetNpcCombatRewardsMessage(p){this.attacking_pokemon_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetNpcCombatRewardsMessage.prototype.combat_npc_trainer_template_id="";GetNpcCombatRewardsMessage.prototype.finish_state=0;GetNpcCombatRewardsMessage.prototype.attacking_pokemon_id=$util.emptyArray;GetNpcCombatRewardsMessage.prototype.combat_id="";GetNpcCombatRewardsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.combat_npc_trainer_template_id!=null&&m.hasOwnProperty("combat_npc_trainer_template_id"))w.uint32(10).string(m.combat_npc_trainer_template_id);if(m.finish_state!=null&&m.hasOwnProperty("finish_state"))w.uint32(16).int32(m.finish_state);if(m.attacking_pokemon_id!=null&&m.attacking_pokemon_id.length){w.uint32(26).fork();for(var i=0;i<m.attacking_pokemon_id.length;++i)w.fixed64(m.attacking_pokemon_id[i]);w.ldelim()}if(m.combat_id!=null&&m.hasOwnProperty("combat_id"))w.uint32(34).string(m.combat_id);return w};GetNpcCombatRewardsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetNpcCombatRewardsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.combat_npc_trainer_template_id=r.string();break;case 2:m.finish_state=r.int32();break;case 3:if(!(m.attacking_pokemon_id&&m.attacking_pokemon_id.length))m.attacking_pokemon_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.attacking_pokemon_id.push(r.fixed64())}else m.attacking_pokemon_id.push(r.fixed64());break;case 4:m.combat_id=r.string();break;default:r.skipType(t&7);break}}return m};GetNpcCombatRewardsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetNpcCombatRewardsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetNpcCombatRewardsMessage;if(d.combat_npc_trainer_template_id!=null){m.combat_npc_trainer_template_id=String(d.combat_npc_trainer_template_id)}switch(d.finish_state){case"WINNER":case 0:m.finish_state=0;break;case"LOSER":case 1:m.finish_state=1;break;case"DRAW":case 2:m.finish_state=2;break}if(d.attacking_pokemon_id){if(!Array.isArray(d.attacking_pokemon_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.GetNpcCombatRewardsMessage.attacking_pokemon_id: array expected");m.attacking_pokemon_id=[];for(var i=0;i<d.attacking_pokemon_id.length;++i){if($util.Long)(m.attacking_pokemon_id[i]=$util.Long.fromValue(d.attacking_pokemon_id[i])).unsigned=false;else if(typeof d.attacking_pokemon_id[i]==="string")m.attacking_pokemon_id[i]=parseInt(d.attacking_pokemon_id[i],10);else if(typeof d.attacking_pokemon_id[i]==="number")m.attacking_pokemon_id[i]=d.attacking_pokemon_id[i];else if(typeof d.attacking_pokemon_id[i]==="object")m.attacking_pokemon_id[i]=new $util.LongBits(d.attacking_pokemon_id[i].low>>>0,d.attacking_pokemon_id[i].high>>>0).toNumber()}}if(d.combat_id!=null){m.combat_id=String(d.combat_id)}return m};GetNpcCombatRewardsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.attacking_pokemon_id=[]}if(o.defaults){d.combat_npc_trainer_template_id="";d.finish_state=o.enums===String?"WINNER":0;d.combat_id=""}if(m.combat_npc_trainer_template_id!=null&&m.hasOwnProperty("combat_npc_trainer_template_id")){d.combat_npc_trainer_template_id=m.combat_npc_trainer_template_id}if(m.finish_state!=null&&m.hasOwnProperty("finish_state")){d.finish_state=o.enums===String?$root.POGOProtos.Enums.CombatPlayerFinishState[m.finish_state]:m.finish_state}if(m.attacking_pokemon_id&&m.attacking_pokemon_id.length){d.attacking_pokemon_id=[];for(var j=0;j<m.attacking_pokemon_id.length;++j){if(typeof m.attacking_pokemon_id[j]==="number")d.attacking_pokemon_id[j]=o.longs===String?String(m.attacking_pokemon_id[j]):m.attacking_pokemon_id[j];else d.attacking_pokemon_id[j]=o.longs===String?$util.Long.prototype.toString.call(m.attacking_pokemon_id[j]):o.longs===Number?new $util.LongBits(m.attacking_pokemon_id[j].low>>>0,m.attacking_pokemon_id[j].high>>>0).toNumber():m.attacking_pokemon_id[j]}}if(m.combat_id!=null&&m.hasOwnProperty("combat_id")){d.combat_id=m.combat_id}return d};GetNpcCombatRewardsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetNpcCombatRewardsMessage}();Messages.GetPlayerDayMessage=function(){function GetPlayerDayMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetPlayerDayMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};GetPlayerDayMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetPlayerDayMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};GetPlayerDayMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetPlayerDayMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.GetPlayerDayMessage};GetPlayerDayMessage.toObject=function toObject(){return{}};GetPlayerDayMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetPlayerDayMessage}();Messages.GetPlayerMessage=function(){function GetPlayerMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetPlayerMessage.prototype.player_locale=null;GetPlayerMessage.prototype.prevent_creation=false;GetPlayerMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_locale!=null&&m.hasOwnProperty("player_locale"))$root.POGOProtos.Networking.Requests.Messages.GetPlayerMessage.PlayerLocale.encode(m.player_locale,w.uint32(10).fork()).ldelim();if(m.prevent_creation!=null&&m.hasOwnProperty("prevent_creation"))w.uint32(16).bool(m.prevent_creation);return w};GetPlayerMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetPlayerMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_locale=$root.POGOProtos.Networking.Requests.Messages.GetPlayerMessage.PlayerLocale.decode(r,r.uint32());break;case 2:m.prevent_creation=r.bool();break;default:r.skipType(t&7);break}}return m};GetPlayerMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetPlayerMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetPlayerMessage;if(d.player_locale!=null){if(typeof d.player_locale!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.GetPlayerMessage.player_locale: object expected");m.player_locale=$root.POGOProtos.Networking.Requests.Messages.GetPlayerMessage.PlayerLocale.fromObject(d.player_locale)}if(d.prevent_creation!=null){m.prevent_creation=Boolean(d.prevent_creation)}return m};GetPlayerMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_locale=null;d.prevent_creation=false}if(m.player_locale!=null&&m.hasOwnProperty("player_locale")){d.player_locale=$root.POGOProtos.Networking.Requests.Messages.GetPlayerMessage.PlayerLocale.toObject(m.player_locale,o)}if(m.prevent_creation!=null&&m.hasOwnProperty("prevent_creation")){d.prevent_creation=m.prevent_creation}return d};GetPlayerMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetPlayerMessage.PlayerLocale=function(){function PlayerLocale(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerLocale.prototype.country="";PlayerLocale.prototype.language="";PlayerLocale.prototype.timezone="";PlayerLocale.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.country!=null&&m.hasOwnProperty("country"))w.uint32(10).string(m.country);if(m.language!=null&&m.hasOwnProperty("language"))w.uint32(18).string(m.language);if(m.timezone!=null&&m.hasOwnProperty("timezone"))w.uint32(26).string(m.timezone);return w};PlayerLocale.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetPlayerMessage.PlayerLocale;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.country=r.string();break;case 2:m.language=r.string();break;case 3:m.timezone=r.string();break;default:r.skipType(t&7);break}}return m};PlayerLocale.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetPlayerMessage.PlayerLocale)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetPlayerMessage.PlayerLocale;if(d.country!=null){m.country=String(d.country)}if(d.language!=null){m.language=String(d.language)}if(d.timezone!=null){m.timezone=String(d.timezone)}return m};PlayerLocale.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.country="";d.language="";d.timezone=""}if(m.country!=null&&m.hasOwnProperty("country")){d.country=m.country}if(m.language!=null&&m.hasOwnProperty("language")){d.language=m.language}if(m.timezone!=null&&m.hasOwnProperty("timezone")){d.timezone=m.timezone}return d};PlayerLocale.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlayerLocale}();return GetPlayerMessage}();Messages.GetPlayerProfileMessage=function(){function GetPlayerProfileMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetPlayerProfileMessage.prototype.player_name="";GetPlayerProfileMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_name!=null&&m.hasOwnProperty("player_name"))w.uint32(10).string(m.player_name);return w};GetPlayerProfileMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetPlayerProfileMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_name=r.string();break;default:r.skipType(t&7);break}}return m};GetPlayerProfileMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetPlayerProfileMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetPlayerProfileMessage;if(d.player_name!=null){m.player_name=String(d.player_name)}return m};GetPlayerProfileMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_name=""}if(m.player_name!=null&&m.hasOwnProperty("player_name")){d.player_name=m.player_name}return d};GetPlayerProfileMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetPlayerProfileMessage}();Messages.GetQuestDetailsMessage=function(){function GetQuestDetailsMessage(p){this.quest_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetQuestDetailsMessage.prototype.quest_id=$util.emptyArray;GetQuestDetailsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.quest_id!=null&&m.quest_id.length){for(var i=0;i<m.quest_id.length;++i)w.uint32(10).string(m.quest_id[i])}return w};GetQuestDetailsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetQuestDetailsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.quest_id&&m.quest_id.length))m.quest_id=[];m.quest_id.push(r.string());break;default:r.skipType(t&7);break}}return m};GetQuestDetailsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetQuestDetailsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetQuestDetailsMessage;if(d.quest_id){if(!Array.isArray(d.quest_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.GetQuestDetailsMessage.quest_id: array expected");m.quest_id=[];for(var i=0;i<d.quest_id.length;++i){m.quest_id[i]=String(d.quest_id[i])}}return m};GetQuestDetailsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.quest_id=[]}if(m.quest_id&&m.quest_id.length){d.quest_id=[];for(var j=0;j<m.quest_id.length;++j){d.quest_id[j]=m.quest_id[j]}}return d};GetQuestDetailsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetQuestDetailsMessage}();Messages.GetRaidDetailsMessage=function(){function GetRaidDetailsMessage(p){this.lobby_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetRaidDetailsMessage.prototype.raid_seed=$util.Long?$util.Long.fromBits(0,0,false):0;GetRaidDetailsMessage.prototype.gym_id="";GetRaidDetailsMessage.prototype.lobby_id=$util.emptyArray;GetRaidDetailsMessage.prototype.player_lat_degrees=0;GetRaidDetailsMessage.prototype.player_lng_degrees=0;GetRaidDetailsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed"))w.uint32(8).int64(m.raid_seed);if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(18).string(m.gym_id);if(m.lobby_id!=null&&m.lobby_id.length){w.uint32(26).fork();for(var i=0;i<m.lobby_id.length;++i)w.int32(m.lobby_id[i]);w.ldelim()}if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees"))w.uint32(33).double(m.player_lat_degrees);if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees"))w.uint32(41).double(m.player_lng_degrees);return w};GetRaidDetailsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetRaidDetailsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.raid_seed=r.int64();break;case 2:m.gym_id=r.string();break;case 3:if(!(m.lobby_id&&m.lobby_id.length))m.lobby_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.lobby_id.push(r.int32())}else m.lobby_id.push(r.int32());break;case 4:m.player_lat_degrees=r.double();break;case 5:m.player_lng_degrees=r.double();break;default:r.skipType(t&7);break}}return m};GetRaidDetailsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetRaidDetailsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetRaidDetailsMessage;if(d.raid_seed!=null){if($util.Long)(m.raid_seed=$util.Long.fromValue(d.raid_seed)).unsigned=false;else if(typeof d.raid_seed==="string")m.raid_seed=parseInt(d.raid_seed,10);else if(typeof d.raid_seed==="number")m.raid_seed=d.raid_seed;else if(typeof d.raid_seed==="object")m.raid_seed=new $util.LongBits(d.raid_seed.low>>>0,d.raid_seed.high>>>0).toNumber()}if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.lobby_id){if(!Array.isArray(d.lobby_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.GetRaidDetailsMessage.lobby_id: array expected");m.lobby_id=[];for(var i=0;i<d.lobby_id.length;++i){m.lobby_id[i]=d.lobby_id[i]|0}}if(d.player_lat_degrees!=null){m.player_lat_degrees=Number(d.player_lat_degrees)}if(d.player_lng_degrees!=null){m.player_lng_degrees=Number(d.player_lng_degrees)}return m};GetRaidDetailsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.lobby_id=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.raid_seed=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_seed=o.longs===String?"0":0;d.gym_id="";d.player_lat_degrees=0;d.player_lng_degrees=0}if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed")){if(typeof m.raid_seed==="number")d.raid_seed=o.longs===String?String(m.raid_seed):m.raid_seed;else d.raid_seed=o.longs===String?$util.Long.prototype.toString.call(m.raid_seed):o.longs===Number?new $util.LongBits(m.raid_seed.low>>>0,m.raid_seed.high>>>0).toNumber():m.raid_seed}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.lobby_id&&m.lobby_id.length){d.lobby_id=[];for(var j=0;j<m.lobby_id.length;++j){d.lobby_id[j]=m.lobby_id[j]}}if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees")){d.player_lat_degrees=o.json&&!isFinite(m.player_lat_degrees)?String(m.player_lat_degrees):m.player_lat_degrees}if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees")){d.player_lng_degrees=o.json&&!isFinite(m.player_lng_degrees)?String(m.player_lng_degrees):m.player_lng_degrees}return d};GetRaidDetailsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetRaidDetailsMessage}();Messages.GetSignedGmapUrlMessage=function(){function GetSignedGmapUrlMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetSignedGmapUrlMessage.prototype.latitude=0;GetSignedGmapUrlMessage.prototype.longitude=0;GetSignedGmapUrlMessage.prototype.width=0;GetSignedGmapUrlMessage.prototype.height=0;GetSignedGmapUrlMessage.prototype.zoom=0;GetSignedGmapUrlMessage.prototype.language_code="";GetSignedGmapUrlMessage.prototype.country_code="";GetSignedGmapUrlMessage.prototype.map_style="";GetSignedGmapUrlMessage.prototype.map_type="";GetSignedGmapUrlMessage.prototype.icon_params="";GetSignedGmapUrlMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.latitude!=null&&m.hasOwnProperty("latitude"))w.uint32(9).double(m.latitude);if(m.longitude!=null&&m.hasOwnProperty("longitude"))w.uint32(17).double(m.longitude);if(m.width!=null&&m.hasOwnProperty("width"))w.uint32(24).int32(m.width);if(m.height!=null&&m.hasOwnProperty("height"))w.uint32(32).int32(m.height);if(m.zoom!=null&&m.hasOwnProperty("zoom"))w.uint32(40).int32(m.zoom);if(m.language_code!=null&&m.hasOwnProperty("language_code"))w.uint32(50).string(m.language_code);if(m.country_code!=null&&m.hasOwnProperty("country_code"))w.uint32(58).string(m.country_code);if(m.map_style!=null&&m.hasOwnProperty("map_style"))w.uint32(66).string(m.map_style);if(m.map_type!=null&&m.hasOwnProperty("map_type"))w.uint32(74).string(m.map_type);if(m.icon_params!=null&&m.hasOwnProperty("icon_params"))w.uint32(82).string(m.icon_params);return w};GetSignedGmapUrlMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetSignedGmapUrlMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.latitude=r.double();break;case 2:m.longitude=r.double();break;case 3:m.width=r.int32();break;case 4:m.height=r.int32();break;case 5:m.zoom=r.int32();break;case 6:m.language_code=r.string();break;case 7:m.country_code=r.string();break;case 8:m.map_style=r.string();break;case 9:m.map_type=r.string();break;case 10:m.icon_params=r.string();break;default:r.skipType(t&7);break}}return m};GetSignedGmapUrlMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetSignedGmapUrlMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetSignedGmapUrlMessage;if(d.latitude!=null){m.latitude=Number(d.latitude)}if(d.longitude!=null){m.longitude=Number(d.longitude)}if(d.width!=null){m.width=d.width|0}if(d.height!=null){m.height=d.height|0}if(d.zoom!=null){m.zoom=d.zoom|0}if(d.language_code!=null){m.language_code=String(d.language_code)}if(d.country_code!=null){m.country_code=String(d.country_code)}if(d.map_style!=null){m.map_style=String(d.map_style)}if(d.map_type!=null){m.map_type=String(d.map_type)}if(d.icon_params!=null){m.icon_params=String(d.icon_params)}return m};GetSignedGmapUrlMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.latitude=0;d.longitude=0;d.width=0;d.height=0;d.zoom=0;d.language_code="";d.country_code="";d.map_style="";d.map_type="";d.icon_params=""}if(m.latitude!=null&&m.hasOwnProperty("latitude")){d.latitude=o.json&&!isFinite(m.latitude)?String(m.latitude):m.latitude}if(m.longitude!=null&&m.hasOwnProperty("longitude")){d.longitude=o.json&&!isFinite(m.longitude)?String(m.longitude):m.longitude}if(m.width!=null&&m.hasOwnProperty("width")){d.width=m.width}if(m.height!=null&&m.hasOwnProperty("height")){d.height=m.height}if(m.zoom!=null&&m.hasOwnProperty("zoom")){d.zoom=m.zoom}if(m.language_code!=null&&m.hasOwnProperty("language_code")){d.language_code=m.language_code}if(m.country_code!=null&&m.hasOwnProperty("country_code")){d.country_code=m.country_code}if(m.map_style!=null&&m.hasOwnProperty("map_style")){d.map_style=m.map_style}if(m.map_type!=null&&m.hasOwnProperty("map_type")){d.map_type=m.map_type}if(m.icon_params!=null&&m.hasOwnProperty("icon_params")){d.icon_params=m.icon_params}return d};GetSignedGmapUrlMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetSignedGmapUrlMessage}();Messages.GetTradingMessage=function(){function GetTradingMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetTradingMessage.prototype.player_id="";GetTradingMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);return w};GetTradingMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetTradingMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;default:r.skipType(t&7);break}}return m};GetTradingMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetTradingMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetTradingMessage;if(d.player_id!=null){m.player_id=String(d.player_id)}return m};GetTradingMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id=""}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}return d};GetTradingMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetTradingMessage}();Messages.GetTutorialEggActionMessage=function(){function GetTutorialEggActionMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetTutorialEggActionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};GetTutorialEggActionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetTutorialEggActionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};GetTutorialEggActionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetTutorialEggActionMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.GetTutorialEggActionMessage};GetTutorialEggActionMessage.toObject=function toObject(){return{}};GetTutorialEggActionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetTutorialEggActionMessage}();Messages.GetUploadUrlMessage=function(){function GetUploadUrlMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetUploadUrlMessage.prototype.user_id="";GetUploadUrlMessage.prototype.game_unique_id="";GetUploadUrlMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.user_id!=null&&m.hasOwnProperty("user_id"))w.uint32(10).string(m.user_id);if(m.game_unique_id!=null&&m.hasOwnProperty("game_unique_id"))w.uint32(18).string(m.game_unique_id);return w};GetUploadUrlMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetUploadUrlMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.user_id=r.string();break;case 2:m.game_unique_id=r.string();break;default:r.skipType(t&7);break}}return m};GetUploadUrlMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetUploadUrlMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GetUploadUrlMessage;if(d.user_id!=null){m.user_id=String(d.user_id)}if(d.game_unique_id!=null){m.game_unique_id=String(d.game_unique_id)}return m};GetUploadUrlMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.user_id="";d.game_unique_id=""}if(m.user_id!=null&&m.hasOwnProperty("user_id")){d.user_id=m.user_id}if(m.game_unique_id!=null&&m.hasOwnProperty("game_unique_id")){d.game_unique_id=m.game_unique_id}return d};GetUploadUrlMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetUploadUrlMessage}();Messages.GiftDetailsMessage=function(){function GiftDetailsMessage(p){this.giftbox_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GiftDetailsMessage.prototype.giftbox_id=$util.emptyArray;GiftDetailsMessage.prototype.player_id="";GiftDetailsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.giftbox_id!=null&&m.giftbox_id.length){w.uint32(10).fork();for(var i=0;i<m.giftbox_id.length;++i)w.fixed64(m.giftbox_id[i]);w.ldelim()}if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(18).string(m.player_id);return w};GiftDetailsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GiftDetailsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.giftbox_id&&m.giftbox_id.length))m.giftbox_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.giftbox_id.push(r.fixed64())}else m.giftbox_id.push(r.fixed64());break;case 2:m.player_id=r.string();break;default:r.skipType(t&7);break}}return m};GiftDetailsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GiftDetailsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GiftDetailsMessage;if(d.giftbox_id){if(!Array.isArray(d.giftbox_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.GiftDetailsMessage.giftbox_id: array expected");m.giftbox_id=[];for(var i=0;i<d.giftbox_id.length;++i){if($util.Long)(m.giftbox_id[i]=$util.Long.fromValue(d.giftbox_id[i])).unsigned=false;else if(typeof d.giftbox_id[i]==="string")m.giftbox_id[i]=parseInt(d.giftbox_id[i],10);else if(typeof d.giftbox_id[i]==="number")m.giftbox_id[i]=d.giftbox_id[i];else if(typeof d.giftbox_id[i]==="object")m.giftbox_id[i]=new $util.LongBits(d.giftbox_id[i].low>>>0,d.giftbox_id[i].high>>>0).toNumber()}}if(d.player_id!=null){m.player_id=String(d.player_id)}return m};GiftDetailsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.giftbox_id=[]}if(o.defaults){d.player_id=""}if(m.giftbox_id&&m.giftbox_id.length){d.giftbox_id=[];for(var j=0;j<m.giftbox_id.length;++j){if(typeof m.giftbox_id[j]==="number")d.giftbox_id[j]=o.longs===String?String(m.giftbox_id[j]):m.giftbox_id[j];else d.giftbox_id[j]=o.longs===String?$util.Long.prototype.toString.call(m.giftbox_id[j]):o.longs===Number?new $util.LongBits(m.giftbox_id[j].low>>>0,m.giftbox_id[j].high>>>0).toNumber():m.giftbox_id[j]}}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}return d};GiftDetailsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GiftDetailsMessage}();Messages.GymBattleAttackMessage=function(){function GymBattleAttackMessage(p){this.attacker_actions=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymBattleAttackMessage.prototype.gym_id="";GymBattleAttackMessage.prototype.battle_id="";GymBattleAttackMessage.prototype.attacker_actions=$util.emptyArray;GymBattleAttackMessage.prototype.last_retrieved_action=null;GymBattleAttackMessage.prototype.player_lat_degrees=0;GymBattleAttackMessage.prototype.player_lng_degrees=0;GymBattleAttackMessage.prototype.timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;GymBattleAttackMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(10).string(m.gym_id);if(m.battle_id!=null&&m.hasOwnProperty("battle_id"))w.uint32(18).string(m.battle_id);if(m.attacker_actions!=null&&m.attacker_actions.length){for(var i=0;i<m.attacker_actions.length;++i)$root.POGOProtos.Data.Battle.BattleAction.encode(m.attacker_actions[i],w.uint32(26).fork()).ldelim()}if(m.last_retrieved_action!=null&&m.hasOwnProperty("last_retrieved_action"))$root.POGOProtos.Data.Battle.BattleAction.encode(m.last_retrieved_action,w.uint32(34).fork()).ldelim();if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees"))w.uint32(41).double(m.player_lat_degrees);if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees"))w.uint32(49).double(m.player_lng_degrees);if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms"))w.uint32(56).int64(m.timestamp_ms);return w};GymBattleAttackMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GymBattleAttackMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gym_id=r.string();break;case 2:m.battle_id=r.string();break;case 3:if(!(m.attacker_actions&&m.attacker_actions.length))m.attacker_actions=[];m.attacker_actions.push($root.POGOProtos.Data.Battle.BattleAction.decode(r,r.uint32()));break;case 4:m.last_retrieved_action=$root.POGOProtos.Data.Battle.BattleAction.decode(r,r.uint32());break;case 5:m.player_lat_degrees=r.double();break;case 6:m.player_lng_degrees=r.double();break;case 7:m.timestamp_ms=r.int64();break;default:r.skipType(t&7);break}}return m};GymBattleAttackMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GymBattleAttackMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GymBattleAttackMessage;if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.battle_id!=null){m.battle_id=String(d.battle_id)}if(d.attacker_actions){if(!Array.isArray(d.attacker_actions))throw TypeError(".POGOProtos.Networking.Requests.Messages.GymBattleAttackMessage.attacker_actions: array expected");m.attacker_actions=[];for(var i=0;i<d.attacker_actions.length;++i){if(typeof d.attacker_actions[i]!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.GymBattleAttackMessage.attacker_actions: object expected");m.attacker_actions[i]=$root.POGOProtos.Data.Battle.BattleAction.fromObject(d.attacker_actions[i])}}if(d.last_retrieved_action!=null){if(typeof d.last_retrieved_action!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.GymBattleAttackMessage.last_retrieved_action: object expected");m.last_retrieved_action=$root.POGOProtos.Data.Battle.BattleAction.fromObject(d.last_retrieved_action)}if(d.player_lat_degrees!=null){m.player_lat_degrees=Number(d.player_lat_degrees)}if(d.player_lng_degrees!=null){m.player_lng_degrees=Number(d.player_lng_degrees)}if(d.timestamp_ms!=null){if($util.Long)(m.timestamp_ms=$util.Long.fromValue(d.timestamp_ms)).unsigned=false;else if(typeof d.timestamp_ms==="string")m.timestamp_ms=parseInt(d.timestamp_ms,10);else if(typeof d.timestamp_ms==="number")m.timestamp_ms=d.timestamp_ms;else if(typeof d.timestamp_ms==="object")m.timestamp_ms=new $util.LongBits(d.timestamp_ms.low>>>0,d.timestamp_ms.high>>>0).toNumber()}return m};GymBattleAttackMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.attacker_actions=[]}if(o.defaults){d.gym_id="";d.battle_id="";d.last_retrieved_action=null;d.player_lat_degrees=0;d.player_lng_degrees=0;if($util.Long){var n=new $util.Long(0,0,false);d.timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.timestamp_ms=o.longs===String?"0":0}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.battle_id!=null&&m.hasOwnProperty("battle_id")){d.battle_id=m.battle_id}if(m.attacker_actions&&m.attacker_actions.length){d.attacker_actions=[];for(var j=0;j<m.attacker_actions.length;++j){d.attacker_actions[j]=$root.POGOProtos.Data.Battle.BattleAction.toObject(m.attacker_actions[j],o)}}if(m.last_retrieved_action!=null&&m.hasOwnProperty("last_retrieved_action")){d.last_retrieved_action=$root.POGOProtos.Data.Battle.BattleAction.toObject(m.last_retrieved_action,o)}if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees")){d.player_lat_degrees=o.json&&!isFinite(m.player_lat_degrees)?String(m.player_lat_degrees):m.player_lat_degrees}if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees")){d.player_lng_degrees=o.json&&!isFinite(m.player_lng_degrees)?String(m.player_lng_degrees):m.player_lng_degrees}if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms")){if(typeof m.timestamp_ms==="number")d.timestamp_ms=o.longs===String?String(m.timestamp_ms):m.timestamp_ms;else d.timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.timestamp_ms):o.longs===Number?new $util.LongBits(m.timestamp_ms.low>>>0,m.timestamp_ms.high>>>0).toNumber():m.timestamp_ms}return d};GymBattleAttackMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GymBattleAttackMessage}();Messages.GymDeployMessage=function(){function GymDeployMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymDeployMessage.prototype.fort_id="";GymDeployMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;GymDeployMessage.prototype.player_latitude=0;GymDeployMessage.prototype.player_longitude=0;GymDeployMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(10).string(m.fort_id);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(17).fixed64(m.pokemon_id);if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude"))w.uint32(25).double(m.player_latitude);if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude"))w.uint32(33).double(m.player_longitude);return w};GymDeployMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GymDeployMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fort_id=r.string();break;case 2:m.pokemon_id=r.fixed64();break;case 3:m.player_latitude=r.double();break;case 4:m.player_longitude=r.double();break;default:r.skipType(t&7);break}}return m};GymDeployMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GymDeployMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GymDeployMessage;if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}if(d.player_latitude!=null){m.player_latitude=Number(d.player_latitude)}if(d.player_longitude!=null){m.player_longitude=Number(d.player_longitude)}return m};GymDeployMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.fort_id="";if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0;d.player_latitude=0;d.player_longitude=0}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude")){d.player_latitude=o.json&&!isFinite(m.player_latitude)?String(m.player_latitude):m.player_latitude}if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude")){d.player_longitude=o.json&&!isFinite(m.player_longitude)?String(m.player_longitude):m.player_longitude}return d};GymDeployMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GymDeployMessage}();Messages.GymFeedPokemonMessage=function(){function GymFeedPokemonMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymFeedPokemonMessage.prototype.item=0;GymFeedPokemonMessage.prototype.starting_quantity=0;GymFeedPokemonMessage.prototype.gym_id="";GymFeedPokemonMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;GymFeedPokemonMessage.prototype.player_lat_degrees=0;GymFeedPokemonMessage.prototype.player_lng_degrees=0;GymFeedPokemonMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item!=null&&m.hasOwnProperty("item"))w.uint32(8).int32(m.item);if(m.starting_quantity!=null&&m.hasOwnProperty("starting_quantity"))w.uint32(16).int32(m.starting_quantity);if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(26).string(m.gym_id);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(33).fixed64(m.pokemon_id);if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees"))w.uint32(41).double(m.player_lat_degrees);if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees"))w.uint32(49).double(m.player_lng_degrees);return w};GymFeedPokemonMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GymFeedPokemonMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item=r.int32();break;case 2:m.starting_quantity=r.int32();break;case 3:m.gym_id=r.string();break;case 4:m.pokemon_id=r.fixed64();break;case 5:m.player_lat_degrees=r.double();break;case 6:m.player_lng_degrees=r.double();break;default:r.skipType(t&7);break}}return m};GymFeedPokemonMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GymFeedPokemonMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GymFeedPokemonMessage;switch(d.item){case"ITEM_UNKNOWN":case 0:m.item=0;break;case"ITEM_POKE_BALL":case 1:m.item=1;break;case"ITEM_GREAT_BALL":case 2:m.item=2;break;case"ITEM_ULTRA_BALL":case 3:m.item=3;break;case"ITEM_MASTER_BALL":case 4:m.item=4;break;case"ITEM_PREMIER_BALL":case 5:m.item=5;break;case"ITEM_POTION":case 101:m.item=101;break;case"ITEM_SUPER_POTION":case 102:m.item=102;break;case"ITEM_HYPER_POTION":case 103:m.item=103;break;case"ITEM_MAX_POTION":case 104:m.item=104;break;case"ITEM_REVIVE":case 201:m.item=201;break;case"ITEM_MAX_REVIVE":case 202:m.item=202;break;case"ITEM_LUCKY_EGG":case 301:m.item=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item=402;break;case"ITEM_INCENSE_COOL":case 403:m.item=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item=405;break;case"ITEM_TROY_DISK":case 501:m.item=501;break;case"ITEM_X_ATTACK":case 602:m.item=602;break;case"ITEM_X_DEFENSE":case 603:m.item=603;break;case"ITEM_X_MIRACLE":case 604:m.item=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item=701;break;case"ITEM_BLUK_BERRY":case 702:m.item=702;break;case"ITEM_NANAB_BERRY":case 703:m.item=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item=704;break;case"ITEM_PINAP_BERRY":case 705:m.item=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item=1002;break;case"ITEM_SUN_STONE":case 1101:m.item=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item=1102;break;case"ITEM_METAL_COAT":case 1103:m.item=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item=1104;break;case"ITEM_UP_GRADE":case 1105:m.item=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item=1405;break}if(d.starting_quantity!=null){m.starting_quantity=d.starting_quantity|0}if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}if(d.player_lat_degrees!=null){m.player_lat_degrees=Number(d.player_lat_degrees)}if(d.player_lng_degrees!=null){m.player_lng_degrees=Number(d.player_lng_degrees)}return m};GymFeedPokemonMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item=o.enums===String?"ITEM_UNKNOWN":0;d.starting_quantity=0;d.gym_id="";if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0;d.player_lat_degrees=0;d.player_lng_degrees=0}if(m.item!=null&&m.hasOwnProperty("item")){d.item=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item]:m.item}if(m.starting_quantity!=null&&m.hasOwnProperty("starting_quantity")){d.starting_quantity=m.starting_quantity}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees")){d.player_lat_degrees=o.json&&!isFinite(m.player_lat_degrees)?String(m.player_lat_degrees):m.player_lat_degrees}if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees")){d.player_lng_degrees=o.json&&!isFinite(m.player_lng_degrees)?String(m.player_lng_degrees):m.player_lng_degrees}return d};GymFeedPokemonMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GymFeedPokemonMessage}();Messages.GymGetInfoMessage=function(){function GymGetInfoMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymGetInfoMessage.prototype.gym_id="";GymGetInfoMessage.prototype.player_lat_degrees=0;GymGetInfoMessage.prototype.player_lng_degrees=0;GymGetInfoMessage.prototype.gym_lat_degrees=0;GymGetInfoMessage.prototype.gym_lng_degrees=0;GymGetInfoMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(10).string(m.gym_id);if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees"))w.uint32(17).double(m.player_lat_degrees);if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees"))w.uint32(25).double(m.player_lng_degrees);if(m.gym_lat_degrees!=null&&m.hasOwnProperty("gym_lat_degrees"))w.uint32(33).double(m.gym_lat_degrees);if(m.gym_lng_degrees!=null&&m.hasOwnProperty("gym_lng_degrees"))w.uint32(41).double(m.gym_lng_degrees);return w};GymGetInfoMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GymGetInfoMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gym_id=r.string();break;case 2:m.player_lat_degrees=r.double();break;case 3:m.player_lng_degrees=r.double();break;case 4:m.gym_lat_degrees=r.double();break;case 5:m.gym_lng_degrees=r.double();break;default:r.skipType(t&7);break}}return m};GymGetInfoMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GymGetInfoMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GymGetInfoMessage;if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.player_lat_degrees!=null){m.player_lat_degrees=Number(d.player_lat_degrees)}if(d.player_lng_degrees!=null){m.player_lng_degrees=Number(d.player_lng_degrees)}if(d.gym_lat_degrees!=null){m.gym_lat_degrees=Number(d.gym_lat_degrees)}if(d.gym_lng_degrees!=null){m.gym_lng_degrees=Number(d.gym_lng_degrees)}return m};GymGetInfoMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.gym_id="";d.player_lat_degrees=0;d.player_lng_degrees=0;d.gym_lat_degrees=0;d.gym_lng_degrees=0}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees")){d.player_lat_degrees=o.json&&!isFinite(m.player_lat_degrees)?String(m.player_lat_degrees):m.player_lat_degrees}if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees")){d.player_lng_degrees=o.json&&!isFinite(m.player_lng_degrees)?String(m.player_lng_degrees):m.player_lng_degrees}if(m.gym_lat_degrees!=null&&m.hasOwnProperty("gym_lat_degrees")){d.gym_lat_degrees=o.json&&!isFinite(m.gym_lat_degrees)?String(m.gym_lat_degrees):m.gym_lat_degrees}if(m.gym_lng_degrees!=null&&m.hasOwnProperty("gym_lng_degrees")){d.gym_lng_degrees=o.json&&!isFinite(m.gym_lng_degrees)?String(m.gym_lng_degrees):m.gym_lng_degrees}return d};GymGetInfoMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GymGetInfoMessage}();Messages.GymStartSessionMessage=function(){function GymStartSessionMessage(p){this.attacking_pokemon_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymStartSessionMessage.prototype.gym_id="";GymStartSessionMessage.prototype.attacking_pokemon_id=$util.emptyArray;GymStartSessionMessage.prototype.defending_pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;GymStartSessionMessage.prototype.player_lat_degrees=0;GymStartSessionMessage.prototype.player_lng_degrees=0;GymStartSessionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(10).string(m.gym_id);if(m.attacking_pokemon_id!=null&&m.attacking_pokemon_id.length){w.uint32(18).fork();for(var i=0;i<m.attacking_pokemon_id.length;++i)w.fixed64(m.attacking_pokemon_id[i]);w.ldelim()}if(m.defending_pokemon_id!=null&&m.hasOwnProperty("defending_pokemon_id"))w.uint32(25).fixed64(m.defending_pokemon_id);if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees"))w.uint32(33).double(m.player_lat_degrees);if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees"))w.uint32(41).double(m.player_lng_degrees);return w};GymStartSessionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GymStartSessionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gym_id=r.string();break;case 2:if(!(m.attacking_pokemon_id&&m.attacking_pokemon_id.length))m.attacking_pokemon_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.attacking_pokemon_id.push(r.fixed64())}else m.attacking_pokemon_id.push(r.fixed64());break;case 3:m.defending_pokemon_id=r.fixed64();break;case 4:m.player_lat_degrees=r.double();break;case 5:m.player_lng_degrees=r.double();break;default:r.skipType(t&7);break}}return m};GymStartSessionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GymStartSessionMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.GymStartSessionMessage;if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.attacking_pokemon_id){if(!Array.isArray(d.attacking_pokemon_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.GymStartSessionMessage.attacking_pokemon_id: array expected");m.attacking_pokemon_id=[];for(var i=0;i<d.attacking_pokemon_id.length;++i){if($util.Long)(m.attacking_pokemon_id[i]=$util.Long.fromValue(d.attacking_pokemon_id[i])).unsigned=false;else if(typeof d.attacking_pokemon_id[i]==="string")m.attacking_pokemon_id[i]=parseInt(d.attacking_pokemon_id[i],10);else if(typeof d.attacking_pokemon_id[i]==="number")m.attacking_pokemon_id[i]=d.attacking_pokemon_id[i];else if(typeof d.attacking_pokemon_id[i]==="object")m.attacking_pokemon_id[i]=new $util.LongBits(d.attacking_pokemon_id[i].low>>>0,d.attacking_pokemon_id[i].high>>>0).toNumber()}}if(d.defending_pokemon_id!=null){if($util.Long)(m.defending_pokemon_id=$util.Long.fromValue(d.defending_pokemon_id)).unsigned=false;else if(typeof d.defending_pokemon_id==="string")m.defending_pokemon_id=parseInt(d.defending_pokemon_id,10);else if(typeof d.defending_pokemon_id==="number")m.defending_pokemon_id=d.defending_pokemon_id;else if(typeof d.defending_pokemon_id==="object")m.defending_pokemon_id=new $util.LongBits(d.defending_pokemon_id.low>>>0,d.defending_pokemon_id.high>>>0).toNumber()}if(d.player_lat_degrees!=null){m.player_lat_degrees=Number(d.player_lat_degrees)}if(d.player_lng_degrees!=null){m.player_lng_degrees=Number(d.player_lng_degrees)}return m};GymStartSessionMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.attacking_pokemon_id=[]}if(o.defaults){d.gym_id="";if($util.Long){var n=new $util.Long(0,0,false);d.defending_pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.defending_pokemon_id=o.longs===String?"0":0;d.player_lat_degrees=0;d.player_lng_degrees=0}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.attacking_pokemon_id&&m.attacking_pokemon_id.length){d.attacking_pokemon_id=[];for(var j=0;j<m.attacking_pokemon_id.length;++j){if(typeof m.attacking_pokemon_id[j]==="number")d.attacking_pokemon_id[j]=o.longs===String?String(m.attacking_pokemon_id[j]):m.attacking_pokemon_id[j];else d.attacking_pokemon_id[j]=o.longs===String?$util.Long.prototype.toString.call(m.attacking_pokemon_id[j]):o.longs===Number?new $util.LongBits(m.attacking_pokemon_id[j].low>>>0,m.attacking_pokemon_id[j].high>>>0).toNumber():m.attacking_pokemon_id[j]}}if(m.defending_pokemon_id!=null&&m.hasOwnProperty("defending_pokemon_id")){if(typeof m.defending_pokemon_id==="number")d.defending_pokemon_id=o.longs===String?String(m.defending_pokemon_id):m.defending_pokemon_id;else d.defending_pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.defending_pokemon_id):o.longs===Number?new $util.LongBits(m.defending_pokemon_id.low>>>0,m.defending_pokemon_id.high>>>0).toNumber():m.defending_pokemon_id}if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees")){d.player_lat_degrees=o.json&&!isFinite(m.player_lat_degrees)?String(m.player_lat_degrees):m.player_lat_degrees}if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees")){d.player_lng_degrees=o.json&&!isFinite(m.player_lng_degrees)?String(m.player_lng_degrees):m.player_lng_degrees}return d};GymStartSessionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GymStartSessionMessage}();Messages.IncenseEncounterMessage=function(){function IncenseEncounterMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}IncenseEncounterMessage.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,true):0;IncenseEncounterMessage.prototype.encounter_location="";IncenseEncounterMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(8).uint64(m.encounter_id);if(m.encounter_location!=null&&m.hasOwnProperty("encounter_location"))w.uint32(18).string(m.encounter_location);return w};IncenseEncounterMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.IncenseEncounterMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.encounter_id=r.uint64();break;case 2:m.encounter_location=r.string();break;default:r.skipType(t&7);break}}return m};IncenseEncounterMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.IncenseEncounterMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.IncenseEncounterMessage;if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=true;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber(true)}if(d.encounter_location!=null){m.encounter_location=String(d.encounter_location)}return m};IncenseEncounterMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,true);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0;d.encounter_location=""}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber(true):m.encounter_id}if(m.encounter_location!=null&&m.hasOwnProperty("encounter_location")){d.encounter_location=m.encounter_location}return d};IncenseEncounterMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return IncenseEncounterMessage}();Messages.JoinLobbyMessage=function(){function JoinLobbyMessage(p){this.lobby_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}JoinLobbyMessage.prototype.raid_seed=$util.Long?$util.Long.fromBits(0,0,false):0;JoinLobbyMessage.prototype.gym_id="";JoinLobbyMessage.prototype.lobby_id=$util.emptyArray;JoinLobbyMessage.prototype["private"]=false;JoinLobbyMessage.prototype.player_lat_degrees=0;JoinLobbyMessage.prototype.player_lng_degrees=0;JoinLobbyMessage.prototype.gym_lat_degrees=0;JoinLobbyMessage.prototype.gym_lng_degrees=0;JoinLobbyMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed"))w.uint32(8).int64(m.raid_seed);if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(18).string(m.gym_id);if(m.lobby_id!=null&&m.lobby_id.length){w.uint32(26).fork();for(var i=0;i<m.lobby_id.length;++i)w.int32(m.lobby_id[i]);w.ldelim()}if(m["private"]!=null&&m.hasOwnProperty("private"))w.uint32(32).bool(m["private"]);if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees"))w.uint32(41).double(m.player_lat_degrees);if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees"))w.uint32(49).double(m.player_lng_degrees);if(m.gym_lat_degrees!=null&&m.hasOwnProperty("gym_lat_degrees"))w.uint32(57).double(m.gym_lat_degrees);if(m.gym_lng_degrees!=null&&m.hasOwnProperty("gym_lng_degrees"))w.uint32(65).double(m.gym_lng_degrees);return w};JoinLobbyMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.JoinLobbyMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.raid_seed=r.int64();break;case 2:m.gym_id=r.string();break;case 3:if(!(m.lobby_id&&m.lobby_id.length))m.lobby_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.lobby_id.push(r.int32())}else m.lobby_id.push(r.int32());break;case 4:m["private"]=r.bool();break;case 5:m.player_lat_degrees=r.double();break;case 6:m.player_lng_degrees=r.double();break;case 7:m.gym_lat_degrees=r.double();break;case 8:m.gym_lng_degrees=r.double();break;default:r.skipType(t&7);break}}return m};JoinLobbyMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.JoinLobbyMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.JoinLobbyMessage;if(d.raid_seed!=null){if($util.Long)(m.raid_seed=$util.Long.fromValue(d.raid_seed)).unsigned=false;else if(typeof d.raid_seed==="string")m.raid_seed=parseInt(d.raid_seed,10);else if(typeof d.raid_seed==="number")m.raid_seed=d.raid_seed;else if(typeof d.raid_seed==="object")m.raid_seed=new $util.LongBits(d.raid_seed.low>>>0,d.raid_seed.high>>>0).toNumber()}if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.lobby_id){if(!Array.isArray(d.lobby_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.JoinLobbyMessage.lobby_id: array expected");m.lobby_id=[];for(var i=0;i<d.lobby_id.length;++i){m.lobby_id[i]=d.lobby_id[i]|0}}if(d["private"]!=null){m["private"]=Boolean(d["private"])}if(d.player_lat_degrees!=null){m.player_lat_degrees=Number(d.player_lat_degrees)}if(d.player_lng_degrees!=null){m.player_lng_degrees=Number(d.player_lng_degrees)}if(d.gym_lat_degrees!=null){m.gym_lat_degrees=Number(d.gym_lat_degrees)}if(d.gym_lng_degrees!=null){m.gym_lng_degrees=Number(d.gym_lng_degrees)}return m};JoinLobbyMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.lobby_id=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.raid_seed=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_seed=o.longs===String?"0":0;d.gym_id="";d["private"]=false;d.player_lat_degrees=0;d.player_lng_degrees=0;d.gym_lat_degrees=0;d.gym_lng_degrees=0}if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed")){if(typeof m.raid_seed==="number")d.raid_seed=o.longs===String?String(m.raid_seed):m.raid_seed;else d.raid_seed=o.longs===String?$util.Long.prototype.toString.call(m.raid_seed):o.longs===Number?new $util.LongBits(m.raid_seed.low>>>0,m.raid_seed.high>>>0).toNumber():m.raid_seed}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.lobby_id&&m.lobby_id.length){d.lobby_id=[];for(var j=0;j<m.lobby_id.length;++j){d.lobby_id[j]=m.lobby_id[j]}}if(m["private"]!=null&&m.hasOwnProperty("private")){d["private"]=m["private"]}if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees")){d.player_lat_degrees=o.json&&!isFinite(m.player_lat_degrees)?String(m.player_lat_degrees):m.player_lat_degrees}if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees")){d.player_lng_degrees=o.json&&!isFinite(m.player_lng_degrees)?String(m.player_lng_degrees):m.player_lng_degrees}if(m.gym_lat_degrees!=null&&m.hasOwnProperty("gym_lat_degrees")){d.gym_lat_degrees=o.json&&!isFinite(m.gym_lat_degrees)?String(m.gym_lat_degrees):m.gym_lat_degrees}if(m.gym_lng_degrees!=null&&m.hasOwnProperty("gym_lng_degrees")){d.gym_lng_degrees=o.json&&!isFinite(m.gym_lng_degrees)?String(m.gym_lng_degrees):m.gym_lng_degrees}return d};JoinLobbyMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return JoinLobbyMessage}();Messages.LeaveLobbyMessage=function(){function LeaveLobbyMessage(p){this.lobby_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LeaveLobbyMessage.prototype.raid_seed=$util.Long?$util.Long.fromBits(0,0,false):0;LeaveLobbyMessage.prototype.gym_id="";LeaveLobbyMessage.prototype.lobby_id=$util.emptyArray;LeaveLobbyMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed"))w.uint32(8).int64(m.raid_seed);if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(18).string(m.gym_id);if(m.lobby_id!=null&&m.lobby_id.length){w.uint32(26).fork();for(var i=0;i<m.lobby_id.length;++i)w.int32(m.lobby_id[i]);w.ldelim()}return w};LeaveLobbyMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.LeaveLobbyMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.raid_seed=r.int64();break;case 2:m.gym_id=r.string();break;case 3:if(!(m.lobby_id&&m.lobby_id.length))m.lobby_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.lobby_id.push(r.int32())}else m.lobby_id.push(r.int32());break;default:r.skipType(t&7);break}}return m};LeaveLobbyMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.LeaveLobbyMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.LeaveLobbyMessage;if(d.raid_seed!=null){if($util.Long)(m.raid_seed=$util.Long.fromValue(d.raid_seed)).unsigned=false;else if(typeof d.raid_seed==="string")m.raid_seed=parseInt(d.raid_seed,10);else if(typeof d.raid_seed==="number")m.raid_seed=d.raid_seed;else if(typeof d.raid_seed==="object")m.raid_seed=new $util.LongBits(d.raid_seed.low>>>0,d.raid_seed.high>>>0).toNumber()}if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.lobby_id){if(!Array.isArray(d.lobby_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.LeaveLobbyMessage.lobby_id: array expected");m.lobby_id=[];for(var i=0;i<d.lobby_id.length;++i){m.lobby_id[i]=d.lobby_id[i]|0}}return m};LeaveLobbyMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.lobby_id=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.raid_seed=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_seed=o.longs===String?"0":0;d.gym_id=""}if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed")){if(typeof m.raid_seed==="number")d.raid_seed=o.longs===String?String(m.raid_seed):m.raid_seed;else d.raid_seed=o.longs===String?$util.Long.prototype.toString.call(m.raid_seed):o.longs===Number?new $util.LongBits(m.raid_seed.low>>>0,m.raid_seed.high>>>0).toNumber():m.raid_seed}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.lobby_id&&m.lobby_id.length){d.lobby_id=[];for(var j=0;j<m.lobby_id.length;++j){d.lobby_id[j]=m.lobby_id[j]}}return d};LeaveLobbyMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return LeaveLobbyMessage}();Messages.LevelUpRewardsMessage=function(){function LevelUpRewardsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LevelUpRewardsMessage.prototype.level=0;LevelUpRewardsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.level!=null&&m.hasOwnProperty("level"))w.uint32(8).int32(m.level);return w};LevelUpRewardsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.LevelUpRewardsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.level=r.int32();break;default:r.skipType(t&7);break}}return m};LevelUpRewardsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.LevelUpRewardsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.LevelUpRewardsMessage;if(d.level!=null){m.level=d.level|0}return m};LevelUpRewardsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.level=0}if(m.level!=null&&m.hasOwnProperty("level")){d.level=m.level}return d};LevelUpRewardsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return LevelUpRewardsMessage}();Messages.ListAvatarCustomizationsMessage=function(){function ListAvatarCustomizationsMessage(p){this.slot=[];this.filters=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListAvatarCustomizationsMessage.prototype.avatar_type=0;ListAvatarCustomizationsMessage.prototype.slot=$util.emptyArray;ListAvatarCustomizationsMessage.prototype.filters=$util.emptyArray;ListAvatarCustomizationsMessage.prototype.start=0;ListAvatarCustomizationsMessage.prototype.limit=0;ListAvatarCustomizationsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.avatar_type!=null&&m.hasOwnProperty("avatar_type"))w.uint32(8).int32(m.avatar_type);if(m.slot!=null&&m.slot.length){w.uint32(18).fork();for(var i=0;i<m.slot.length;++i)w.int32(m.slot[i]);w.ldelim()}if(m.filters!=null&&m.filters.length){w.uint32(26).fork();for(var i=0;i<m.filters.length;++i)w.int32(m.filters[i]);w.ldelim()}if(m.start!=null&&m.hasOwnProperty("start"))w.uint32(32).int32(m.start);if(m.limit!=null&&m.hasOwnProperty("limit"))w.uint32(40).int32(m.limit);return w};ListAvatarCustomizationsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.ListAvatarCustomizationsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.avatar_type=r.int32();break;case 2:if(!(m.slot&&m.slot.length))m.slot=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.slot.push(r.int32())}else m.slot.push(r.int32());break;case 3:if(!(m.filters&&m.filters.length))m.filters=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.filters.push(r.int32())}else m.filters.push(r.int32());break;case 4:m.start=r.int32();break;case 5:m.limit=r.int32();break;default:r.skipType(t&7);break}}return m};ListAvatarCustomizationsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.ListAvatarCustomizationsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.ListAvatarCustomizationsMessage;switch(d.avatar_type){case"PLAYER_AVATAR_MALE":case 0:m.avatar_type=0;break;case"PLAYER_AVATAR_FEMALE":case 1:m.avatar_type=1;break}if(d.slot){if(!Array.isArray(d.slot))throw TypeError(".POGOProtos.Networking.Requests.Messages.ListAvatarCustomizationsMessage.slot: array expected");m.slot=[];for(var i=0;i<d.slot.length;++i){switch(d.slot[i]){default:case"UNSET_SLOT":case 0:m.slot[i]=0;break;case"HAIR":case 1:m.slot[i]=1;break;case"SHIRT":case 2:m.slot[i]=2;break;case"PANTS":case 3:m.slot[i]=3;break;case"HAT":case 4:m.slot[i]=4;break;case"SHOES":case 5:m.slot[i]=5;break;case"EYES":case 6:m.slot[i]=6;break;case"BACKPACK":case 7:m.slot[i]=7;break;case"GLOVES":case 8:m.slot[i]=8;break;case"SOCKS":case 9:m.slot[i]=9;break;case"BELT":case 10:m.slot[i]=10;break;case"GLASSES":case 11:m.slot[i]=11;break;case"NECKLACE":case 12:m.slot[i]=12;break;case"SKIN":case 13:m.slot[i]=13;break}}}if(d.filters){if(!Array.isArray(d.filters))throw TypeError(".POGOProtos.Networking.Requests.Messages.ListAvatarCustomizationsMessage.filters: array expected");m.filters=[];for(var i=0;i<d.filters.length;++i){switch(d.filters[i]){default:case"UNSET_FILTER":case 0:m.filters[i]=0;break;case"ALL":case 1:m.filters[i]=1;break;case"DEFAULT":case 2:m.filters[i]=2;break;case"OWNED":case 3:m.filters[i]=3;break;case"FEATURED":case 4:m.filters[i]=4;break;case"PURCHASABLE":case 5:m.filters[i]=5;break;case"UNLOCKABLE":case 6:m.filters[i]=6;break}}}if(d.start!=null){m.start=d.start|0}if(d.limit!=null){m.limit=d.limit|0}return m};ListAvatarCustomizationsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.slot=[];d.filters=[]}if(o.defaults){d.avatar_type=o.enums===String?"PLAYER_AVATAR_MALE":0;d.start=0;d.limit=0}if(m.avatar_type!=null&&m.hasOwnProperty("avatar_type")){d.avatar_type=o.enums===String?$root.POGOProtos.Data.Player.PlayerAvatarType[m.avatar_type]:m.avatar_type}if(m.slot&&m.slot.length){d.slot=[];for(var j=0;j<m.slot.length;++j){d.slot[j]=o.enums===String?$root.POGOProtos.Data.Avatar.AvatarCustomization.Slot[m.slot[j]]:m.slot[j]}}if(m.filters&&m.filters.length){d.filters=[];for(var j=0;j<m.filters.length;++j){d.filters[j]=o.enums===String?$root.POGOProtos.Enums.Filter[m.filters[j]]:m.filters[j]}}if(m.start!=null&&m.hasOwnProperty("start")){d.start=m.start}if(m.limit!=null&&m.hasOwnProperty("limit")){d.limit=m.limit}return d};ListAvatarCustomizationsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ListAvatarCustomizationsMessage}();Messages.ListGymBadgesMessage=function(){function ListGymBadgesMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListGymBadgesMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};ListGymBadgesMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.ListGymBadgesMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};ListGymBadgesMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.ListGymBadgesMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.ListGymBadgesMessage};ListGymBadgesMessage.toObject=function toObject(){return{}};ListGymBadgesMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ListGymBadgesMessage}();Messages.MarkReadNewsArticleMessage=function(){function MarkReadNewsArticleMessage(p){this.news_ids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}MarkReadNewsArticleMessage.prototype.news_ids=$util.emptyArray;MarkReadNewsArticleMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.news_ids!=null&&m.news_ids.length){for(var i=0;i<m.news_ids.length;++i)w.uint32(10).string(m.news_ids[i])}return w};MarkReadNewsArticleMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.MarkReadNewsArticleMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.news_ids&&m.news_ids.length))m.news_ids=[];m.news_ids.push(r.string());break;default:r.skipType(t&7);break}}return m};MarkReadNewsArticleMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.MarkReadNewsArticleMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.MarkReadNewsArticleMessage;if(d.news_ids){if(!Array.isArray(d.news_ids))throw TypeError(".POGOProtos.Networking.Requests.Messages.MarkReadNewsArticleMessage.news_ids: array expected");m.news_ids=[];for(var i=0;i<d.news_ids.length;++i){m.news_ids[i]=String(d.news_ids[i])}}return m};MarkReadNewsArticleMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.news_ids=[]}if(m.news_ids&&m.news_ids.length){d.news_ids=[];for(var j=0;j<m.news_ids.length;++j){d.news_ids[j]=m.news_ids[j]}}return d};MarkReadNewsArticleMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return MarkReadNewsArticleMessage}();Messages.MarkTutorialCompleteMessage=function(){function MarkTutorialCompleteMessage(p){this.tutorials_completed=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}MarkTutorialCompleteMessage.prototype.tutorials_completed=$util.emptyArray;MarkTutorialCompleteMessage.prototype.send_marketing_emails=false;MarkTutorialCompleteMessage.prototype.send_push_notifications=false;MarkTutorialCompleteMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.tutorials_completed!=null&&m.tutorials_completed.length){w.uint32(10).fork();for(var i=0;i<m.tutorials_completed.length;++i)w.int32(m.tutorials_completed[i]);w.ldelim()}if(m.send_marketing_emails!=null&&m.hasOwnProperty("send_marketing_emails"))w.uint32(16).bool(m.send_marketing_emails);if(m.send_push_notifications!=null&&m.hasOwnProperty("send_push_notifications"))w.uint32(24).bool(m.send_push_notifications);return w};MarkTutorialCompleteMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.MarkTutorialCompleteMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.tutorials_completed&&m.tutorials_completed.length))m.tutorials_completed=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.tutorials_completed.push(r.int32())}else m.tutorials_completed.push(r.int32());break;case 2:m.send_marketing_emails=r.bool();break;case 3:m.send_push_notifications=r.bool();break;default:r.skipType(t&7);break}}return m};MarkTutorialCompleteMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.MarkTutorialCompleteMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.MarkTutorialCompleteMessage;if(d.tutorials_completed){if(!Array.isArray(d.tutorials_completed))throw TypeError(".POGOProtos.Networking.Requests.Messages.MarkTutorialCompleteMessage.tutorials_completed: array expected");m.tutorials_completed=[];for(var i=0;i<d.tutorials_completed.length;++i){switch(d.tutorials_completed[i]){default:case"LEGAL_SCREEN":case 0:m.tutorials_completed[i]=0;break;case"AVATAR_SELECTION":case 1:m.tutorials_completed[i]=1;break;case"ACCOUNT_CREATION":case 2:m.tutorials_completed[i]=2;break;case"POKEMON_CAPTURE":case 3:m.tutorials_completed[i]=3;break;case"NAME_SELECTION":case 4:m.tutorials_completed[i]=4;break;case"POKEMON_BERRY":case 5:m.tutorials_completed[i]=5;break;case"USE_ITEM_TUTORIAL_STATE":case 6:m.tutorials_completed[i]=6;break;case"FIRST_TIME_EXPERIENCE_COMPLETE":case 7:m.tutorials_completed[i]=7;break;case"POKESTOP_TUTORIAL":case 8:m.tutorials_completed[i]=8;break;case"GYM_TUTORIAL":case 9:m.tutorials_completed[i]=9;break;case"CHALLENGE_QUEST_TUTORIAL":case 10:m.tutorials_completed[i]=10;break;case"PRIVACY_POLICY_CONFIRMATION":case 11:m.tutorials_completed[i]=11;break;case"TRADING_TUTORIAL":case 12:m.tutorials_completed[i]=12;break;case"POI_SUBMISSION_TUTORIAL":case 13:m.tutorials_completed[i]=13;break;case"V1_START_TUTORIAL":case 14:m.tutorials_completed[i]=14;break;case"V2_START_TUTORIAL":case 15:m.tutorials_completed[i]=15;break;case"V2_CUSTOMIZED_AVATAR":case 16:m.tutorials_completed[i]=16;break;case"V2_CAUGHT_FIRST_WILD":case 17:m.tutorials_completed[i]=17;break;case"V2_FINISHED_TUTORIAL_CATCHES":case 18:m.tutorials_completed[i]=18;break;case"V2_NAME_SELECTION":case 19:m.tutorials_completed[i]=19;break;case"V2_EGG_GIVEN":case 20:m.tutorials_completed[i]=20;break;case"V2_START_EGG_TUTORIAL":case 21:m.tutorials_completed[i]=21;break;case"V2_COMPLETED_EGG_TUTORIAL":case 22:m.tutorials_completed[i]=22;break}}}if(d.send_marketing_emails!=null){m.send_marketing_emails=Boolean(d.send_marketing_emails)}if(d.send_push_notifications!=null){m.send_push_notifications=Boolean(d.send_push_notifications)}return m};MarkTutorialCompleteMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.tutorials_completed=[]}if(o.defaults){d.send_marketing_emails=false;d.send_push_notifications=false}if(m.tutorials_completed&&m.tutorials_completed.length){d.tutorials_completed=[];for(var j=0;j<m.tutorials_completed.length;++j){d.tutorials_completed[j]=o.enums===String?$root.POGOProtos.Enums.TutorialState[m.tutorials_completed[j]]:m.tutorials_completed[j]}}if(m.send_marketing_emails!=null&&m.hasOwnProperty("send_marketing_emails")){d.send_marketing_emails=m.send_marketing_emails}if(m.send_push_notifications!=null&&m.hasOwnProperty("send_push_notifications")){d.send_push_notifications=m.send_push_notifications}return d};MarkTutorialCompleteMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return MarkTutorialCompleteMessage}();Messages.NicknamePokemonMessage=function(){function NicknamePokemonMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}NicknamePokemonMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;NicknamePokemonMessage.prototype.nickname="";NicknamePokemonMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(9).fixed64(m.pokemon_id);if(m.nickname!=null&&m.hasOwnProperty("nickname"))w.uint32(18).string(m.nickname);return w};NicknamePokemonMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.NicknamePokemonMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.fixed64();break;case 2:m.nickname=r.string();break;default:r.skipType(t&7);break}}return m};NicknamePokemonMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.NicknamePokemonMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.NicknamePokemonMessage;if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}if(d.nickname!=null){m.nickname=String(d.nickname)}return m};NicknamePokemonMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0;d.nickname=""}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}if(m.nickname!=null&&m.hasOwnProperty("nickname")){d.nickname=m.nickname}return d};NicknamePokemonMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return NicknamePokemonMessage}();Messages.OpenCombatChallengeMessage=function(){function OpenCombatChallengeMessage(p){this.attacking_pokemon_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OpenCombatChallengeMessage.prototype.type=0;OpenCombatChallengeMessage.prototype.challenge_id="";OpenCombatChallengeMessage.prototype.combat_league_template_id="";OpenCombatChallengeMessage.prototype.opponent_player_id="";OpenCombatChallengeMessage.prototype.attacking_pokemon_id=$util.emptyArray;OpenCombatChallengeMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(8).int32(m.type);if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id"))w.uint32(18).string(m.challenge_id);if(m.combat_league_template_id!=null&&m.hasOwnProperty("combat_league_template_id"))w.uint32(26).string(m.combat_league_template_id);if(m.opponent_player_id!=null&&m.hasOwnProperty("opponent_player_id"))w.uint32(34).string(m.opponent_player_id);if(m.attacking_pokemon_id!=null&&m.attacking_pokemon_id.length){w.uint32(42).fork();for(var i=0;i<m.attacking_pokemon_id.length;++i)w.fixed64(m.attacking_pokemon_id[i]);w.ldelim()}return w};OpenCombatChallengeMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.OpenCombatChallengeMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.type=r.int32();break;case 2:m.challenge_id=r.string();break;case 3:m.combat_league_template_id=r.string();break;case 4:m.opponent_player_id=r.string();break;case 5:if(!(m.attacking_pokemon_id&&m.attacking_pokemon_id.length))m.attacking_pokemon_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.attacking_pokemon_id.push(r.fixed64())}else m.attacking_pokemon_id.push(r.fixed64());break;default:r.skipType(t&7);break}}return m};OpenCombatChallengeMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.OpenCombatChallengeMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.OpenCombatChallengeMessage;switch(d.type){case"COMBAT_TYPE_UNSET":case 0:m.type=0;break;case"SOLO":case 1:m.type=1;break;case"QR_CODE":case 2:m.type=2;break;case"FRIENDS":case 3:m.type=3;break;case"NEARBY_COMBAT":case 4:m.type=4;break}if(d.challenge_id!=null){m.challenge_id=String(d.challenge_id)}if(d.combat_league_template_id!=null){m.combat_league_template_id=String(d.combat_league_template_id)}if(d.opponent_player_id!=null){m.opponent_player_id=String(d.opponent_player_id)}if(d.attacking_pokemon_id){if(!Array.isArray(d.attacking_pokemon_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.OpenCombatChallengeMessage.attacking_pokemon_id: array expected");m.attacking_pokemon_id=[];for(var i=0;i<d.attacking_pokemon_id.length;++i){if($util.Long)(m.attacking_pokemon_id[i]=$util.Long.fromValue(d.attacking_pokemon_id[i])).unsigned=false;else if(typeof d.attacking_pokemon_id[i]==="string")m.attacking_pokemon_id[i]=parseInt(d.attacking_pokemon_id[i],10);else if(typeof d.attacking_pokemon_id[i]==="number")m.attacking_pokemon_id[i]=d.attacking_pokemon_id[i];else if(typeof d.attacking_pokemon_id[i]==="object")m.attacking_pokemon_id[i]=new $util.LongBits(d.attacking_pokemon_id[i].low>>>0,d.attacking_pokemon_id[i].high>>>0).toNumber()}}return m};OpenCombatChallengeMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.attacking_pokemon_id=[]}if(o.defaults){d.type=o.enums===String?"COMBAT_TYPE_UNSET":0;d.challenge_id="";d.combat_league_template_id="";d.opponent_player_id=""}if(m.type!=null&&m.hasOwnProperty("type")){d.type=o.enums===String?$root.POGOProtos.Enums.CombatType[m.type]:m.type}if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id")){d.challenge_id=m.challenge_id}if(m.combat_league_template_id!=null&&m.hasOwnProperty("combat_league_template_id")){d.combat_league_template_id=m.combat_league_template_id}if(m.opponent_player_id!=null&&m.hasOwnProperty("opponent_player_id")){d.opponent_player_id=m.opponent_player_id}if(m.attacking_pokemon_id&&m.attacking_pokemon_id.length){d.attacking_pokemon_id=[];for(var j=0;j<m.attacking_pokemon_id.length;++j){if(typeof m.attacking_pokemon_id[j]==="number")d.attacking_pokemon_id[j]=o.longs===String?String(m.attacking_pokemon_id[j]):m.attacking_pokemon_id[j];else d.attacking_pokemon_id[j]=o.longs===String?$util.Long.prototype.toString.call(m.attacking_pokemon_id[j]):o.longs===Number?new $util.LongBits(m.attacking_pokemon_id[j].low>>>0,m.attacking_pokemon_id[j].high>>>0).toNumber():m.attacking_pokemon_id[j]}}return d};OpenCombatChallengeMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return OpenCombatChallengeMessage}();Messages.OpenCombatSessionMessage=function(){function OpenCombatSessionMessage(p){this.attacking_pokemon_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OpenCombatSessionMessage.prototype.combat_id="";OpenCombatSessionMessage.prototype.attacking_pokemon_id=$util.emptyArray;OpenCombatSessionMessage.prototype.combat_league_template_id="";OpenCombatSessionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.combat_id!=null&&m.hasOwnProperty("combat_id"))w.uint32(10).string(m.combat_id);if(m.attacking_pokemon_id!=null&&m.attacking_pokemon_id.length){w.uint32(18).fork();for(var i=0;i<m.attacking_pokemon_id.length;++i)w.fixed64(m.attacking_pokemon_id[i]);w.ldelim()}if(m.combat_league_template_id!=null&&m.hasOwnProperty("combat_league_template_id"))w.uint32(26).string(m.combat_league_template_id);return w};OpenCombatSessionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.OpenCombatSessionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.combat_id=r.string();break;case 2:if(!(m.attacking_pokemon_id&&m.attacking_pokemon_id.length))m.attacking_pokemon_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.attacking_pokemon_id.push(r.fixed64())}else m.attacking_pokemon_id.push(r.fixed64());break;case 3:m.combat_league_template_id=r.string();break;default:r.skipType(t&7);break}}return m};OpenCombatSessionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.OpenCombatSessionMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.OpenCombatSessionMessage;if(d.combat_id!=null){m.combat_id=String(d.combat_id)}if(d.attacking_pokemon_id){if(!Array.isArray(d.attacking_pokemon_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.OpenCombatSessionMessage.attacking_pokemon_id: array expected");m.attacking_pokemon_id=[];for(var i=0;i<d.attacking_pokemon_id.length;++i){if($util.Long)(m.attacking_pokemon_id[i]=$util.Long.fromValue(d.attacking_pokemon_id[i])).unsigned=false;else if(typeof d.attacking_pokemon_id[i]==="string")m.attacking_pokemon_id[i]=parseInt(d.attacking_pokemon_id[i],10);else if(typeof d.attacking_pokemon_id[i]==="number")m.attacking_pokemon_id[i]=d.attacking_pokemon_id[i];else if(typeof d.attacking_pokemon_id[i]==="object")m.attacking_pokemon_id[i]=new $util.LongBits(d.attacking_pokemon_id[i].low>>>0,d.attacking_pokemon_id[i].high>>>0).toNumber()}}if(d.combat_league_template_id!=null){m.combat_league_template_id=String(d.combat_league_template_id)}return m};OpenCombatSessionMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.attacking_pokemon_id=[]}if(o.defaults){d.combat_id="";d.combat_league_template_id=""}if(m.combat_id!=null&&m.hasOwnProperty("combat_id")){d.combat_id=m.combat_id}if(m.attacking_pokemon_id&&m.attacking_pokemon_id.length){d.attacking_pokemon_id=[];for(var j=0;j<m.attacking_pokemon_id.length;++j){if(typeof m.attacking_pokemon_id[j]==="number")d.attacking_pokemon_id[j]=o.longs===String?String(m.attacking_pokemon_id[j]):m.attacking_pokemon_id[j];else d.attacking_pokemon_id[j]=o.longs===String?$util.Long.prototype.toString.call(m.attacking_pokemon_id[j]):o.longs===Number?new $util.LongBits(m.attacking_pokemon_id[j].low>>>0,m.attacking_pokemon_id[j].high>>>0).toNumber():m.attacking_pokemon_id[j]}}if(m.combat_league_template_id!=null&&m.hasOwnProperty("combat_league_template_id")){d.combat_league_template_id=m.combat_league_template_id}return d};OpenCombatSessionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return OpenCombatSessionMessage}();Messages.OpenGiftMessage=function(){function OpenGiftMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OpenGiftMessage.prototype.player_id="";OpenGiftMessage.prototype.giftbox_id=$util.Long?$util.Long.fromBits(0,0,false):0;OpenGiftMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);if(m.giftbox_id!=null&&m.hasOwnProperty("giftbox_id"))w.uint32(17).fixed64(m.giftbox_id);return w};OpenGiftMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.OpenGiftMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;case 2:m.giftbox_id=r.fixed64();break;default:r.skipType(t&7);break}}return m};OpenGiftMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.OpenGiftMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.OpenGiftMessage;if(d.player_id!=null){m.player_id=String(d.player_id)}if(d.giftbox_id!=null){if($util.Long)(m.giftbox_id=$util.Long.fromValue(d.giftbox_id)).unsigned=false;else if(typeof d.giftbox_id==="string")m.giftbox_id=parseInt(d.giftbox_id,10);else if(typeof d.giftbox_id==="number")m.giftbox_id=d.giftbox_id;else if(typeof d.giftbox_id==="object")m.giftbox_id=new $util.LongBits(d.giftbox_id.low>>>0,d.giftbox_id.high>>>0).toNumber()}return m};OpenGiftMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id="";if($util.Long){var n=new $util.Long(0,0,false);d.giftbox_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.giftbox_id=o.longs===String?"0":0}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}if(m.giftbox_id!=null&&m.hasOwnProperty("giftbox_id")){if(typeof m.giftbox_id==="number")d.giftbox_id=o.longs===String?String(m.giftbox_id):m.giftbox_id;else d.giftbox_id=o.longs===String?$util.Long.prototype.toString.call(m.giftbox_id):o.longs===Number?new $util.LongBits(m.giftbox_id.low>>>0,m.giftbox_id.high>>>0).toNumber():m.giftbox_id}return d};OpenGiftMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return OpenGiftMessage}();Messages.OpenNpcCombatSessionMessage=function(){function OpenNpcCombatSessionMessage(p){this.attacking_pokemon_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OpenNpcCombatSessionMessage.prototype.attacking_pokemon_id=$util.emptyArray;OpenNpcCombatSessionMessage.prototype.combat_npc_template_id="";OpenNpcCombatSessionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.attacking_pokemon_id!=null&&m.attacking_pokemon_id.length){w.uint32(10).fork();for(var i=0;i<m.attacking_pokemon_id.length;++i)w.fixed64(m.attacking_pokemon_id[i]);w.ldelim()}if(m.combat_npc_template_id!=null&&m.hasOwnProperty("combat_npc_template_id"))w.uint32(18).string(m.combat_npc_template_id);return w};OpenNpcCombatSessionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.OpenNpcCombatSessionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.attacking_pokemon_id&&m.attacking_pokemon_id.length))m.attacking_pokemon_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.attacking_pokemon_id.push(r.fixed64())}else m.attacking_pokemon_id.push(r.fixed64());break;case 2:m.combat_npc_template_id=r.string();break;default:r.skipType(t&7);break}}return m};OpenNpcCombatSessionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.OpenNpcCombatSessionMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.OpenNpcCombatSessionMessage;if(d.attacking_pokemon_id){if(!Array.isArray(d.attacking_pokemon_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.OpenNpcCombatSessionMessage.attacking_pokemon_id: array expected");m.attacking_pokemon_id=[];for(var i=0;i<d.attacking_pokemon_id.length;++i){if($util.Long)(m.attacking_pokemon_id[i]=$util.Long.fromValue(d.attacking_pokemon_id[i])).unsigned=false;else if(typeof d.attacking_pokemon_id[i]==="string")m.attacking_pokemon_id[i]=parseInt(d.attacking_pokemon_id[i],10);else if(typeof d.attacking_pokemon_id[i]==="number")m.attacking_pokemon_id[i]=d.attacking_pokemon_id[i];else if(typeof d.attacking_pokemon_id[i]==="object")m.attacking_pokemon_id[i]=new $util.LongBits(d.attacking_pokemon_id[i].low>>>0,d.attacking_pokemon_id[i].high>>>0).toNumber()}}if(d.combat_npc_template_id!=null){m.combat_npc_template_id=String(d.combat_npc_template_id)}return m};OpenNpcCombatSessionMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.attacking_pokemon_id=[]}if(o.defaults){d.combat_npc_template_id=""}if(m.attacking_pokemon_id&&m.attacking_pokemon_id.length){d.attacking_pokemon_id=[];for(var j=0;j<m.attacking_pokemon_id.length;++j){if(typeof m.attacking_pokemon_id[j]==="number")d.attacking_pokemon_id[j]=o.longs===String?String(m.attacking_pokemon_id[j]):m.attacking_pokemon_id[j];else d.attacking_pokemon_id[j]=o.longs===String?$util.Long.prototype.toString.call(m.attacking_pokemon_id[j]):o.longs===Number?new $util.LongBits(m.attacking_pokemon_id[j].low>>>0,m.attacking_pokemon_id[j].high>>>0).toNumber():m.attacking_pokemon_id[j]}}if(m.combat_npc_template_id!=null&&m.hasOwnProperty("combat_npc_template_id")){d.combat_npc_template_id=m.combat_npc_template_id}return d};OpenNpcCombatSessionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return OpenNpcCombatSessionMessage}();Messages.OpenTradingMessage=function(){function OpenTradingMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OpenTradingMessage.prototype.player_id="";OpenTradingMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);return w};OpenTradingMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.OpenTradingMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;default:r.skipType(t&7);break}}return m};OpenTradingMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.OpenTradingMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.OpenTradingMessage;if(d.player_id!=null){m.player_id=String(d.player_id)}return m};OpenTradingMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id=""}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}return d};OpenTradingMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return OpenTradingMessage}();Messages.RegisterPushNotificationMessage=function(){function RegisterPushNotificationMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RegisterPushNotificationMessage.prototype.apn_token=null;RegisterPushNotificationMessage.prototype.gcm_token=null;RegisterPushNotificationMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.apn_token!=null&&m.hasOwnProperty("apn_token"))$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.ApnToken.encode(m.apn_token,w.uint32(10).fork()).ldelim();if(m.gcm_token!=null&&m.hasOwnProperty("gcm_token"))$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.GcmToken.encode(m.gcm_token,w.uint32(18).fork()).ldelim();return w};RegisterPushNotificationMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.apn_token=$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.ApnToken.decode(r,r.uint32());break;case 2:m.gcm_token=$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.GcmToken.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};RegisterPushNotificationMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage;if(d.apn_token!=null){if(typeof d.apn_token!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.apn_token: object expected");m.apn_token=$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.ApnToken.fromObject(d.apn_token)}if(d.gcm_token!=null){if(typeof d.gcm_token!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.gcm_token: object expected");m.gcm_token=$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.GcmToken.fromObject(d.gcm_token)}return m};RegisterPushNotificationMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.apn_token=null;d.gcm_token=null}if(m.apn_token!=null&&m.hasOwnProperty("apn_token")){d.apn_token=$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.ApnToken.toObject(m.apn_token,o)}if(m.gcm_token!=null&&m.hasOwnProperty("gcm_token")){d.gcm_token=$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.GcmToken.toObject(m.gcm_token,o)}return d};RegisterPushNotificationMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RegisterPushNotificationMessage.ApnToken=function(){function ApnToken(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ApnToken.prototype.registration_id="";ApnToken.prototype.bundle_identifier="";ApnToken.prototype.payload_byte_size=0;ApnToken.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.registration_id!=null&&m.hasOwnProperty("registration_id"))w.uint32(10).string(m.registration_id);if(m.bundle_identifier!=null&&m.hasOwnProperty("bundle_identifier"))w.uint32(18).string(m.bundle_identifier);if(m.payload_byte_size!=null&&m.hasOwnProperty("payload_byte_size"))w.uint32(24).int32(m.payload_byte_size);return w};ApnToken.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.ApnToken;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.registration_id=r.string();break;case 2:m.bundle_identifier=r.string();break;case 3:m.payload_byte_size=r.int32();break;default:r.skipType(t&7);break}}return m};ApnToken.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.ApnToken)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.ApnToken;if(d.registration_id!=null){m.registration_id=String(d.registration_id)}if(d.bundle_identifier!=null){m.bundle_identifier=String(d.bundle_identifier)}if(d.payload_byte_size!=null){m.payload_byte_size=d.payload_byte_size|0}return m};ApnToken.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.registration_id="";d.bundle_identifier="";d.payload_byte_size=0}if(m.registration_id!=null&&m.hasOwnProperty("registration_id")){d.registration_id=m.registration_id}if(m.bundle_identifier!=null&&m.hasOwnProperty("bundle_identifier")){d.bundle_identifier=m.bundle_identifier}if(m.payload_byte_size!=null&&m.hasOwnProperty("payload_byte_size")){d.payload_byte_size=m.payload_byte_size}return d};ApnToken.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ApnToken}();RegisterPushNotificationMessage.GcmToken=function(){function GcmToken(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GcmToken.prototype.registration_id="";GcmToken.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.registration_id!=null&&m.hasOwnProperty("registration_id"))w.uint32(10).string(m.registration_id);return w};GcmToken.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.GcmToken;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.registration_id=r.string();break;default:r.skipType(t&7);break}}return m};GcmToken.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.GcmToken)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.GcmToken;if(d.registration_id!=null){m.registration_id=String(d.registration_id)}return m};GcmToken.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.registration_id=""}if(m.registration_id!=null&&m.hasOwnProperty("registration_id")){d.registration_id=m.registration_id}return d};GcmToken.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GcmToken}();return RegisterPushNotificationMessage}();Messages.UpdateNotificationStatusMessage=function(){function UpdateNotificationStatusMessage(p){this.notification_ids=[];this.create_timestamp_ms=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateNotificationStatusMessage.prototype.notification_ids=$util.emptyArray;UpdateNotificationStatusMessage.prototype.create_timestamp_ms=$util.emptyArray;UpdateNotificationStatusMessage.prototype.state=0;UpdateNotificationStatusMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.notification_ids!=null&&m.notification_ids.length){for(var i=0;i<m.notification_ids.length;++i)w.uint32(10).string(m.notification_ids[i])}if(m.create_timestamp_ms!=null&&m.create_timestamp_ms.length){w.uint32(18).fork();for(var i=0;i<m.create_timestamp_ms.length;++i)w.int64(m.create_timestamp_ms[i]);w.ldelim()}if(m.state!=null&&m.hasOwnProperty("state"))w.uint32(24).int32(m.state);return w};UpdateNotificationStatusMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UpdateNotificationStatusMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.notification_ids&&m.notification_ids.length))m.notification_ids=[];m.notification_ids.push(r.string());break;case 2:if(!(m.create_timestamp_ms&&m.create_timestamp_ms.length))m.create_timestamp_ms=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.create_timestamp_ms.push(r.int64())}else m.create_timestamp_ms.push(r.int64());break;case 3:m.state=r.int32();break;default:r.skipType(t&7);break}}return m};UpdateNotificationStatusMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UpdateNotificationStatusMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UpdateNotificationStatusMessage;if(d.notification_ids){if(!Array.isArray(d.notification_ids))throw TypeError(".POGOProtos.Networking.Requests.Messages.UpdateNotificationStatusMessage.notification_ids: array expected");m.notification_ids=[];for(var i=0;i<d.notification_ids.length;++i){m.notification_ids[i]=String(d.notification_ids[i])}}if(d.create_timestamp_ms){if(!Array.isArray(d.create_timestamp_ms))throw TypeError(".POGOProtos.Networking.Requests.Messages.UpdateNotificationStatusMessage.create_timestamp_ms: array expected");m.create_timestamp_ms=[];for(var i=0;i<d.create_timestamp_ms.length;++i){if($util.Long)(m.create_timestamp_ms[i]=$util.Long.fromValue(d.create_timestamp_ms[i])).unsigned=false;else if(typeof d.create_timestamp_ms[i]==="string")m.create_timestamp_ms[i]=parseInt(d.create_timestamp_ms[i],10);else if(typeof d.create_timestamp_ms[i]==="number")m.create_timestamp_ms[i]=d.create_timestamp_ms[i];else if(typeof d.create_timestamp_ms[i]==="object")m.create_timestamp_ms[i]=new $util.LongBits(d.create_timestamp_ms[i].low>>>0,d.create_timestamp_ms[i].high>>>0).toNumber()}}switch(d.state){case"UNSET_STATE":case 0:m.state=0;break;case"VIEWED":case 1:m.state=1;break}return m};UpdateNotificationStatusMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.notification_ids=[];d.create_timestamp_ms=[]}if(o.defaults){d.state=o.enums===String?"UNSET_STATE":0}if(m.notification_ids&&m.notification_ids.length){d.notification_ids=[];for(var j=0;j<m.notification_ids.length;++j){d.notification_ids[j]=m.notification_ids[j]}}if(m.create_timestamp_ms&&m.create_timestamp_ms.length){d.create_timestamp_ms=[];for(var j=0;j<m.create_timestamp_ms.length;++j){if(typeof m.create_timestamp_ms[j]==="number")d.create_timestamp_ms[j]=o.longs===String?String(m.create_timestamp_ms[j]):m.create_timestamp_ms[j];else d.create_timestamp_ms[j]=o.longs===String?$util.Long.prototype.toString.call(m.create_timestamp_ms[j]):o.longs===Number?new $util.LongBits(m.create_timestamp_ms[j].low>>>0,m.create_timestamp_ms[j].high>>>0).toNumber():m.create_timestamp_ms[j]}}if(m.state!=null&&m.hasOwnProperty("state")){d.state=o.enums===String?$root.POGOProtos.Enums.NotificationState[m.state]:m.state}return d};UpdateNotificationStatusMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UpdateNotificationStatusMessage}();Messages.OptOutPushNotificationCategoryMessage=function(){function OptOutPushNotificationCategoryMessage(p){this.categories=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OptOutPushNotificationCategoryMessage.prototype.categories=$util.emptyArray;OptOutPushNotificationCategoryMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.categories!=null&&m.categories.length){for(var i=0;i<m.categories.length;++i)w.uint32(10).string(m.categories[i])}return w};OptOutPushNotificationCategoryMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.OptOutPushNotificationCategoryMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.categories&&m.categories.length))m.categories=[];m.categories.push(r.string());break;default:r.skipType(t&7);break}}return m};OptOutPushNotificationCategoryMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.OptOutPushNotificationCategoryMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.OptOutPushNotificationCategoryMessage;if(d.categories){if(!Array.isArray(d.categories))throw TypeError(".POGOProtos.Networking.Requests.Messages.OptOutPushNotificationCategoryMessage.categories: array expected");m.categories=[];for(var i=0;i<d.categories.length;++i){m.categories[i]=String(d.categories[i])}}return m};OptOutPushNotificationCategoryMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.categories=[]}if(m.categories&&m.categories.length){d.categories=[];for(var j=0;j<m.categories.length;++j){d.categories[j]=m.categories[j]}}return d};OptOutPushNotificationCategoryMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return OptOutPushNotificationCategoryMessage}();Messages.RedeemPasscodeMessage=function(){function RedeemPasscodeMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RedeemPasscodeMessage.prototype.passcode="";RedeemPasscodeMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.passcode!=null&&m.hasOwnProperty("passcode"))w.uint32(10).string(m.passcode);return w};RedeemPasscodeMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.RedeemPasscodeMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.passcode=r.string();break;default:r.skipType(t&7);break}}return m};RedeemPasscodeMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.RedeemPasscodeMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.RedeemPasscodeMessage;if(d.passcode!=null){m.passcode=String(d.passcode)}return m};RedeemPasscodeMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.passcode=""}if(m.passcode!=null&&m.hasOwnProperty("passcode")){d.passcode=m.passcode}return d};RedeemPasscodeMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RedeemPasscodeMessage}();Messages.AddNewPoiMessage=function(){function AddNewPoiMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AddNewPoiMessage.prototype.title="";AddNewPoiMessage.prototype.long_description="";AddNewPoiMessage.prototype.image_gs_file_path="";AddNewPoiMessage.prototype.lat_e6=0;AddNewPoiMessage.prototype.lng_e6=0;AddNewPoiMessage.prototype.image_serving_url="";AddNewPoiMessage.prototype.user_id="";AddNewPoiMessage.prototype.player_language="";AddNewPoiMessage.prototype.game_unique_id="";AddNewPoiMessage.prototype.app_id="";AddNewPoiMessage.prototype.player_reputation=null;AddNewPoiMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.title!=null&&m.hasOwnProperty("title"))w.uint32(10).string(m.title);if(m.long_description!=null&&m.hasOwnProperty("long_description"))w.uint32(18).string(m.long_description);if(m.image_gs_file_path!=null&&m.hasOwnProperty("image_gs_file_path"))w.uint32(26).string(m.image_gs_file_path);if(m.lat_e6!=null&&m.hasOwnProperty("lat_e6"))w.uint32(32).int32(m.lat_e6);if(m.lng_e6!=null&&m.hasOwnProperty("lng_e6"))w.uint32(40).int32(m.lng_e6);if(m.image_serving_url!=null&&m.hasOwnProperty("image_serving_url"))w.uint32(50).string(m.image_serving_url);if(m.user_id!=null&&m.hasOwnProperty("user_id"))w.uint32(58).string(m.user_id);if(m.player_language!=null&&m.hasOwnProperty("player_language"))w.uint32(66).string(m.player_language);if(m.game_unique_id!=null&&m.hasOwnProperty("game_unique_id"))w.uint32(74).string(m.game_unique_id);if(m.app_id!=null&&m.hasOwnProperty("app_id"))w.uint32(82).string(m.app_id);if(m.player_reputation!=null&&m.hasOwnProperty("player_reputation"))$root.POGOProtos.Data.Player.PlayerReputation.encode(m.player_reputation,w.uint32(90).fork()).ldelim();return w};AddNewPoiMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.AddNewPoiMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.title=r.string();break;case 2:m.long_description=r.string();break;case 3:m.image_gs_file_path=r.string();break;case 4:m.lat_e6=r.int32();break;case 5:m.lng_e6=r.int32();break;case 6:m.image_serving_url=r.string();break;case 7:m.user_id=r.string();break;case 8:m.player_language=r.string();break;case 9:m.game_unique_id=r.string();break;case 10:m.app_id=r.string();break;case 11:m.player_reputation=$root.POGOProtos.Data.Player.PlayerReputation.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};AddNewPoiMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.AddNewPoiMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.AddNewPoiMessage;if(d.title!=null){m.title=String(d.title)}if(d.long_description!=null){m.long_description=String(d.long_description)}if(d.image_gs_file_path!=null){m.image_gs_file_path=String(d.image_gs_file_path)}if(d.lat_e6!=null){m.lat_e6=d.lat_e6|0}if(d.lng_e6!=null){m.lng_e6=d.lng_e6|0}if(d.image_serving_url!=null){m.image_serving_url=String(d.image_serving_url)}if(d.user_id!=null){m.user_id=String(d.user_id)}if(d.player_language!=null){m.player_language=String(d.player_language)}if(d.game_unique_id!=null){m.game_unique_id=String(d.game_unique_id)}if(d.app_id!=null){m.app_id=String(d.app_id)}if(d.player_reputation!=null){if(typeof d.player_reputation!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.AddNewPoiMessage.player_reputation: object expected");m.player_reputation=$root.POGOProtos.Data.Player.PlayerReputation.fromObject(d.player_reputation)}return m};AddNewPoiMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.title="";d.long_description="";d.image_gs_file_path="";d.lat_e6=0;d.lng_e6=0;d.image_serving_url="";d.user_id="";d.player_language="";d.game_unique_id="";d.app_id="";d.player_reputation=null}if(m.title!=null&&m.hasOwnProperty("title")){d.title=m.title}if(m.long_description!=null&&m.hasOwnProperty("long_description")){d.long_description=m.long_description}if(m.image_gs_file_path!=null&&m.hasOwnProperty("image_gs_file_path")){d.image_gs_file_path=m.image_gs_file_path}if(m.lat_e6!=null&&m.hasOwnProperty("lat_e6")){d.lat_e6=m.lat_e6}if(m.lng_e6!=null&&m.hasOwnProperty("lng_e6")){d.lng_e6=m.lng_e6}if(m.image_serving_url!=null&&m.hasOwnProperty("image_serving_url")){d.image_serving_url=m.image_serving_url}if(m.user_id!=null&&m.hasOwnProperty("user_id")){d.user_id=m.user_id}if(m.player_language!=null&&m.hasOwnProperty("player_language")){d.player_language=m.player_language}if(m.game_unique_id!=null&&m.hasOwnProperty("game_unique_id")){d.game_unique_id=m.game_unique_id}if(m.app_id!=null&&m.hasOwnProperty("app_id")){d.app_id=m.app_id}if(m.player_reputation!=null&&m.hasOwnProperty("player_reputation")){d.player_reputation=$root.POGOProtos.Data.Player.PlayerReputation.toObject(m.player_reputation,o)}return d};AddNewPoiMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AddNewPoiMessage}();Messages.ProxySocialActionMessage=function(){function ProxySocialActionMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ProxySocialActionMessage.prototype.action=0;ProxySocialActionMessage.prototype.host="";ProxySocialActionMessage.prototype.payload=$util.newBuffer([]);ProxySocialActionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.action!=null&&m.hasOwnProperty("action"))w.uint32(8).uint32(m.action);if(m.host!=null&&m.hasOwnProperty("host"))w.uint32(18).string(m.host);if(m.payload!=null&&m.hasOwnProperty("payload"))w.uint32(26).bytes(m.payload);return w};ProxySocialActionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.ProxySocialActionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.action=r.uint32();break;case 2:m.host=r.string();break;case 3:m.payload=r.bytes();break;default:r.skipType(t&7);break}}return m};ProxySocialActionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.ProxySocialActionMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.ProxySocialActionMessage;if(d.action!=null){m.action=d.action>>>0}if(d.host!=null){m.host=String(d.host)}if(d.payload!=null){if(typeof d.payload==="string")$util.base64.decode(d.payload,m.payload=$util.newBuffer($util.base64.length(d.payload)),0);else if(d.payload.length)m.payload=d.payload}return m};ProxySocialActionMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.action=0;d.host="";if(o.bytes===String)d.payload="";else{d.payload=[];if(o.bytes!==Array)d.payload=$util.newBuffer(d.payload)}}if(m.action!=null&&m.hasOwnProperty("action")){d.action=m.action}if(m.host!=null&&m.hasOwnProperty("host")){d.host=m.host}if(m.payload!=null&&m.hasOwnProperty("payload")){d.payload=o.bytes===String?$util.base64.encode(m.payload,0,m.payload.length):o.bytes===Array?Array.prototype.slice.call(m.payload):m.payload}return d};ProxySocialActionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ProxySocialActionMessage}();Messages.ProxySocialSideChannelActionMessage=function(){function ProxySocialSideChannelActionMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ProxySocialSideChannelActionMessage.prototype.action=0;ProxySocialSideChannelActionMessage.prototype.host="";ProxySocialSideChannelActionMessage.prototype.payload=$util.newBuffer([]);ProxySocialSideChannelActionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.action!=null&&m.hasOwnProperty("action"))w.uint32(8).uint32(m.action);if(m.host!=null&&m.hasOwnProperty("host"))w.uint32(18).string(m.host);if(m.payload!=null&&m.hasOwnProperty("payload"))w.uint32(26).bytes(m.payload);return w};ProxySocialSideChannelActionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.ProxySocialSideChannelActionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.action=r.uint32();break;case 2:m.host=r.string();break;case 3:m.payload=r.bytes();break;default:r.skipType(t&7);break}}return m};ProxySocialSideChannelActionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.ProxySocialSideChannelActionMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.ProxySocialSideChannelActionMessage;if(d.action!=null){m.action=d.action>>>0}if(d.host!=null){m.host=String(d.host)}if(d.payload!=null){if(typeof d.payload==="string")$util.base64.decode(d.payload,m.payload=$util.newBuffer($util.base64.length(d.payload)),0);else if(d.payload.length)m.payload=d.payload}return m};ProxySocialSideChannelActionMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.action=0;d.host="";if(o.bytes===String)d.payload="";else{d.payload=[];if(o.bytes!==Array)d.payload=$util.newBuffer(d.payload)}}if(m.action!=null&&m.hasOwnProperty("action")){d.action=m.action}if(m.host!=null&&m.hasOwnProperty("host")){d.host=m.host}if(m.payload!=null&&m.hasOwnProperty("payload")){d.payload=o.bytes===String?$util.base64.encode(m.payload,0,m.payload.length):o.bytes===Array?Array.prototype.slice.call(m.payload):m.payload}return d};ProxySocialSideChannelActionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ProxySocialSideChannelActionMessage}();Messages.GetAvailableSubmissionsMessage=function(){function GetAvailableSubmissionsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetAvailableSubmissionsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};GetAvailableSubmissionsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.GetAvailableSubmissionsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};GetAvailableSubmissionsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.GetAvailableSubmissionsMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.GetAvailableSubmissionsMessage};GetAvailableSubmissionsMessage.toObject=function toObject(){return{}};GetAvailableSubmissionsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetAvailableSubmissionsMessage}();Messages.PushNotificationRegistryMessage=function(){function PushNotificationRegistryMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PushNotificationRegistryMessage.prototype.apn_token=null;PushNotificationRegistryMessage.prototype.gcm_token=null;PushNotificationRegistryMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.apn_token!=null&&m.hasOwnProperty("apn_token"))$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.ApnToken.encode(m.apn_token,w.uint32(10).fork()).ldelim();if(m.gcm_token!=null&&m.hasOwnProperty("gcm_token"))$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.GcmToken.encode(m.gcm_token,w.uint32(18).fork()).ldelim();return w};PushNotificationRegistryMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.PushNotificationRegistryMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.apn_token=$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.ApnToken.decode(r,r.uint32());break;case 2:m.gcm_token=$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.GcmToken.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};PushNotificationRegistryMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.PushNotificationRegistryMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.PushNotificationRegistryMessage;if(d.apn_token!=null){if(typeof d.apn_token!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.PushNotificationRegistryMessage.apn_token: object expected");m.apn_token=$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.ApnToken.fromObject(d.apn_token)}if(d.gcm_token!=null){if(typeof d.gcm_token!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.PushNotificationRegistryMessage.gcm_token: object expected");m.gcm_token=$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.GcmToken.fromObject(d.gcm_token)}return m};PushNotificationRegistryMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.apn_token=null;d.gcm_token=null}if(m.apn_token!=null&&m.hasOwnProperty("apn_token")){d.apn_token=$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.ApnToken.toObject(m.apn_token,o)}if(m.gcm_token!=null&&m.hasOwnProperty("gcm_token")){d.gcm_token=$root.POGOProtos.Networking.Requests.Messages.RegisterPushNotificationMessage.GcmToken.toObject(m.gcm_token,o)}return d};PushNotificationRegistryMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PushNotificationRegistryMessage}();Messages.AddLoginActionMessage=function(){function AddLoginActionMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AddLoginActionMessage.prototype.identity_provider=0;AddLoginActionMessage.prototype.inner_message=$util.newBuffer([]);AddLoginActionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.identity_provider!=null&&m.hasOwnProperty("identity_provider"))w.uint32(8).int32(m.identity_provider);if(m.inner_message!=null&&m.hasOwnProperty("inner_message"))w.uint32(18).bytes(m.inner_message);return w};AddLoginActionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.AddLoginActionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.identity_provider=r.int32();break;case 2:m.inner_message=r.bytes();break;default:r.skipType(t&7);break}}return m};AddLoginActionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.AddLoginActionMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.AddLoginActionMessage;switch(d.identity_provider){case"UNSET_IDENTITY_PROVIDER":case 0:m.identity_provider=0;break;case"GOOGLE":case 1:m.identity_provider=1;break;case"PTC":case 2:m.identity_provider=2;break;case"FACEBOOK":case 3:m.identity_provider=3;break;case"BACKGROUND":case 4:m.identity_provider=4;break;case"INTERNAL":case 5:m.identity_provider=5;break;case"SFIDA":case 6:m.identity_provider=6;break;case"SUPER_AWESOME":case 7:m.identity_provider=7;break}if(d.inner_message!=null){if(typeof d.inner_message==="string")$util.base64.decode(d.inner_message,m.inner_message=$util.newBuffer($util.base64.length(d.inner_message)),0);else if(d.inner_message.length)m.inner_message=d.inner_message}return m};AddLoginActionMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.identity_provider=o.enums===String?"UNSET_IDENTITY_PROVIDER":0;if(o.bytes===String)d.inner_message="";else{d.inner_message=[];if(o.bytes!==Array)d.inner_message=$util.newBuffer(d.inner_message)}}if(m.identity_provider!=null&&m.hasOwnProperty("identity_provider")){d.identity_provider=o.enums===String?$root.POGOProtos.Enums.IdentityProvider[m.identity_provider]:m.identity_provider}if(m.inner_message!=null&&m.hasOwnProperty("inner_message")){d.inner_message=o.bytes===String?$util.base64.encode(m.inner_message,0,m.inner_message.length):o.bytes===Array?Array.prototype.slice.call(m.inner_message):m.inner_message}return d};AddLoginActionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AddLoginActionMessage}();Messages.RemoveLoginActionMessage=function(){function RemoveLoginActionMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RemoveLoginActionMessage.prototype.identity_provider=0;RemoveLoginActionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.identity_provider!=null&&m.hasOwnProperty("identity_provider"))w.uint32(8).int32(m.identity_provider);return w};RemoveLoginActionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.RemoveLoginActionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.identity_provider=r.int32();break;default:r.skipType(t&7);break}}return m};RemoveLoginActionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.RemoveLoginActionMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.RemoveLoginActionMessage;switch(d.identity_provider){case"UNSET_IDENTITY_PROVIDER":case 0:m.identity_provider=0;break;case"GOOGLE":case 1:m.identity_provider=1;break;case"PTC":case 2:m.identity_provider=2;break;case"FACEBOOK":case 3:m.identity_provider=3;break;case"BACKGROUND":case 4:m.identity_provider=4;break;case"INTERNAL":case 5:m.identity_provider=5;break;case"SFIDA":case 6:m.identity_provider=6;break;case"SUPER_AWESOME":case 7:m.identity_provider=7;break}return m};RemoveLoginActionMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.identity_provider=o.enums===String?"UNSET_IDENTITY_PROVIDER":0}if(m.identity_provider!=null&&m.hasOwnProperty("identity_provider")){d.identity_provider=o.enums===String?$root.POGOProtos.Enums.IdentityProvider[m.identity_provider]:m.identity_provider}return d};RemoveLoginActionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RemoveLoginActionMessage}();Messages.SubmitNewPoiMessage=function(){function SubmitNewPoiMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SubmitNewPoiMessage.prototype.title="";SubmitNewPoiMessage.prototype.long_description="";SubmitNewPoiMessage.prototype.lat_e6=0;SubmitNewPoiMessage.prototype.lng_e6=0;SubmitNewPoiMessage.prototype.supporting_statement="";SubmitNewPoiMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.title!=null&&m.hasOwnProperty("title"))w.uint32(10).string(m.title);if(m.long_description!=null&&m.hasOwnProperty("long_description"))w.uint32(18).string(m.long_description);if(m.lat_e6!=null&&m.hasOwnProperty("lat_e6"))w.uint32(32).int32(m.lat_e6);if(m.lng_e6!=null&&m.hasOwnProperty("lng_e6"))w.uint32(40).int32(m.lng_e6);if(m.supporting_statement!=null&&m.hasOwnProperty("supporting_statement"))w.uint32(114).string(m.supporting_statement);return w};SubmitNewPoiMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SubmitNewPoiMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.title=r.string();break;case 2:m.long_description=r.string();break;case 4:m.lat_e6=r.int32();break;case 5:m.lng_e6=r.int32();break;case 14:m.supporting_statement=r.string();break;default:r.skipType(t&7);break}}return m};SubmitNewPoiMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SubmitNewPoiMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SubmitNewPoiMessage;if(d.title!=null){m.title=String(d.title)}if(d.long_description!=null){m.long_description=String(d.long_description)}if(d.lat_e6!=null){m.lat_e6=d.lat_e6|0}if(d.lng_e6!=null){m.lng_e6=d.lng_e6|0}if(d.supporting_statement!=null){m.supporting_statement=String(d.supporting_statement)}return m};SubmitNewPoiMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.title="";d.long_description="";d.lat_e6=0;d.lng_e6=0;d.supporting_statement=""}if(m.title!=null&&m.hasOwnProperty("title")){d.title=m.title}if(m.long_description!=null&&m.hasOwnProperty("long_description")){d.long_description=m.long_description}if(m.lat_e6!=null&&m.hasOwnProperty("lat_e6")){d.lat_e6=m.lat_e6}if(m.lng_e6!=null&&m.hasOwnProperty("lng_e6")){d.lng_e6=m.lng_e6}if(m.supporting_statement!=null&&m.hasOwnProperty("supporting_statement")){d.supporting_statement=m.supporting_statement}return d};SubmitNewPoiMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SubmitNewPoiMessage}();Messages.UploadPoiPhotoByUrlMessage=function(){function UploadPoiPhotoByUrlMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UploadPoiPhotoByUrlMessage.prototype.request_id="";UploadPoiPhotoByUrlMessage.prototype.image_url="";UploadPoiPhotoByUrlMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.request_id!=null&&m.hasOwnProperty("request_id"))w.uint32(10).string(m.request_id);if(m.image_url!=null&&m.hasOwnProperty("image_url"))w.uint32(18).string(m.image_url);return w};UploadPoiPhotoByUrlMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UploadPoiPhotoByUrlMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.request_id=r.string();break;case 2:m.image_url=r.string();break;default:r.skipType(t&7);break}}return m};UploadPoiPhotoByUrlMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UploadPoiPhotoByUrlMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UploadPoiPhotoByUrlMessage;if(d.request_id!=null){m.request_id=String(d.request_id)}if(d.image_url!=null){m.image_url=String(d.image_url)}return m};UploadPoiPhotoByUrlMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.request_id="";d.image_url=""}if(m.request_id!=null&&m.hasOwnProperty("request_id")){d.request_id=m.request_id}if(m.image_url!=null&&m.hasOwnProperty("image_url")){d.image_url=m.image_url}return d};UploadPoiPhotoByUrlMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UploadPoiPhotoByUrlMessage}();Messages.PingMessage=function(){function PingMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PingMessage.prototype.response_size_bytes=0;PingMessage.prototype.random_request_bytes="";PingMessage.prototype.use_cache_for_random_request_bytes=false;PingMessage.prototype.return_value="";PingMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.response_size_bytes!=null&&m.hasOwnProperty("response_size_bytes"))w.uint32(8).int32(m.response_size_bytes);if(m.random_request_bytes!=null&&m.hasOwnProperty("random_request_bytes"))w.uint32(18).string(m.random_request_bytes);if(m.use_cache_for_random_request_bytes!=null&&m.hasOwnProperty("use_cache_for_random_request_bytes"))w.uint32(24).bool(m.use_cache_for_random_request_bytes);if(m.return_value!=null&&m.hasOwnProperty("return_value"))w.uint32(34).string(m.return_value);return w};PingMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.PingMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.response_size_bytes=r.int32();break;case 2:m.random_request_bytes=r.string();break;case 3:m.use_cache_for_random_request_bytes=r.bool();break;case 4:m.return_value=r.string();break;default:r.skipType(t&7);break}}return m};PingMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.PingMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.PingMessage;if(d.response_size_bytes!=null){m.response_size_bytes=d.response_size_bytes|0}if(d.random_request_bytes!=null){m.random_request_bytes=String(d.random_request_bytes)}if(d.use_cache_for_random_request_bytes!=null){m.use_cache_for_random_request_bytes=Boolean(d.use_cache_for_random_request_bytes)}if(d.return_value!=null){m.return_value=String(d.return_value)}return m};PingMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.response_size_bytes=0;d.random_request_bytes="";d.use_cache_for_random_request_bytes=false;d.return_value=""}if(m.response_size_bytes!=null&&m.hasOwnProperty("response_size_bytes")){d.response_size_bytes=m.response_size_bytes}if(m.random_request_bytes!=null&&m.hasOwnProperty("random_request_bytes")){d.random_request_bytes=m.random_request_bytes}if(m.use_cache_for_random_request_bytes!=null&&m.hasOwnProperty("use_cache_for_random_request_bytes")){d.use_cache_for_random_request_bytes=m.use_cache_for_random_request_bytes}if(m.return_value!=null&&m.hasOwnProperty("return_value")){d.return_value=m.return_value}return d};PingMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PingMessage}();Messages.ReplaceLoginActionMessage=function(){function ReplaceLoginActionMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ReplaceLoginActionMessage.prototype.existing_identity_provider=0;ReplaceLoginActionMessage.prototype.new_login=null;ReplaceLoginActionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.existing_identity_provider!=null&&m.hasOwnProperty("existing_identity_provider"))w.uint32(8).int32(m.existing_identity_provider);if(m.new_login!=null&&m.hasOwnProperty("new_login"))$root.POGOProtos.Networking.Requests.Messages.AddLoginActionMessage.encode(m.new_login,w.uint32(18).fork()).ldelim();return w};ReplaceLoginActionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.ReplaceLoginActionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.existing_identity_provider=r.int32();break;case 2:m.new_login=$root.POGOProtos.Networking.Requests.Messages.AddLoginActionMessage.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};ReplaceLoginActionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.ReplaceLoginActionMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.ReplaceLoginActionMessage;switch(d.existing_identity_provider){case"UNSET_IDENTITY_PROVIDER":case 0:m.existing_identity_provider=0;break;case"GOOGLE":case 1:m.existing_identity_provider=1;break;case"PTC":case 2:m.existing_identity_provider=2;break;case"FACEBOOK":case 3:m.existing_identity_provider=3;break;case"BACKGROUND":case 4:m.existing_identity_provider=4;break;case"INTERNAL":case 5:m.existing_identity_provider=5;break;case"SFIDA":case 6:m.existing_identity_provider=6;break;case"SUPER_AWESOME":case 7:m.existing_identity_provider=7;break}if(d.new_login!=null){if(typeof d.new_login!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.ReplaceLoginActionMessage.new_login: object expected");m.new_login=$root.POGOProtos.Networking.Requests.Messages.AddLoginActionMessage.fromObject(d.new_login)}return m};ReplaceLoginActionMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.existing_identity_provider=o.enums===String?"UNSET_IDENTITY_PROVIDER":0;d.new_login=null}if(m.existing_identity_provider!=null&&m.hasOwnProperty("existing_identity_provider")){d.existing_identity_provider=o.enums===String?$root.POGOProtos.Enums.IdentityProvider[m.existing_identity_provider]:m.existing_identity_provider}if(m.new_login!=null&&m.hasOwnProperty("new_login")){d.new_login=$root.POGOProtos.Networking.Requests.Messages.AddLoginActionMessage.toObject(m.new_login,o)}return d};ReplaceLoginActionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ReplaceLoginActionMessage}();Messages.ListLoginActionMessage=function(){function ListLoginActionMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListLoginActionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};ListLoginActionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.ListLoginActionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};ListLoginActionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.ListLoginActionMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.ListLoginActionMessage};ListLoginActionMessage.toObject=function toObject(){return{}};ListLoginActionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ListLoginActionMessage}();Messages.PurchaseSkuMessage=function(){function PurchaseSkuMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PurchaseSkuMessage.prototype.sku_id="";PurchaseSkuMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.sku_id!=null&&m.hasOwnProperty("sku_id"))w.uint32(10).string(m.sku_id);return w};PurchaseSkuMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.PurchaseSkuMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.sku_id=r.string();break;default:r.skipType(t&7);break}}return m};PurchaseSkuMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.PurchaseSkuMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.PurchaseSkuMessage;if(d.sku_id!=null){m.sku_id=String(d.sku_id)}return m};PurchaseSkuMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.sku_id=""}if(m.sku_id!=null&&m.hasOwnProperty("sku_id")){d.sku_id=m.sku_id}return d};PurchaseSkuMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PurchaseSkuMessage}();Messages.QuestEncounterMessage=function(){function QuestEncounterMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}QuestEncounterMessage.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,false):0;QuestEncounterMessage.prototype.spawn_point_id="";QuestEncounterMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(9).fixed64(m.encounter_id);if(m.spawn_point_id!=null&&m.hasOwnProperty("spawn_point_id"))w.uint32(18).string(m.spawn_point_id);return w};QuestEncounterMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.QuestEncounterMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.encounter_id=r.fixed64();break;case 2:m.spawn_point_id=r.string();break;default:r.skipType(t&7);break}}return m};QuestEncounterMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.QuestEncounterMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.QuestEncounterMessage;if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=false;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber()}if(d.spawn_point_id!=null){m.spawn_point_id=String(d.spawn_point_id)}return m};QuestEncounterMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0;d.spawn_point_id=""}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber():m.encounter_id}if(m.spawn_point_id!=null&&m.hasOwnProperty("spawn_point_id")){d.spawn_point_id=m.spawn_point_id}return d};QuestEncounterMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return QuestEncounterMessage}();Messages.QuitCombatMessage=function(){function QuitCombatMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}QuitCombatMessage.prototype.combat_id="";QuitCombatMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.combat_id!=null&&m.hasOwnProperty("combat_id"))w.uint32(10).string(m.combat_id);return w};QuitCombatMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.QuitCombatMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.combat_id=r.string();break;default:r.skipType(t&7);break}}return m};QuitCombatMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.QuitCombatMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.QuitCombatMessage;if(d.combat_id!=null){m.combat_id=String(d.combat_id)}return m};QuitCombatMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.combat_id=""}if(m.combat_id!=null&&m.hasOwnProperty("combat_id")){d.combat_id=m.combat_id}return d};QuitCombatMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return QuitCombatMessage}();Messages.RecycleInventoryItemMessage=function(){function RecycleInventoryItemMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RecycleInventoryItemMessage.prototype.item_id=0;RecycleInventoryItemMessage.prototype.count=0;RecycleInventoryItemMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(8).int32(m.item_id);if(m.count!=null&&m.hasOwnProperty("count"))w.uint32(16).int32(m.count);return w};RecycleInventoryItemMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.RecycleInventoryItemMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.int32();break;case 2:m.count=r.int32();break;default:r.skipType(t&7);break}}return m};RecycleInventoryItemMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.RecycleInventoryItemMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.RecycleInventoryItemMessage;switch(d.item_id){case"ITEM_UNKNOWN":case 0:m.item_id=0;break;case"ITEM_POKE_BALL":case 1:m.item_id=1;break;case"ITEM_GREAT_BALL":case 2:m.item_id=2;break;case"ITEM_ULTRA_BALL":case 3:m.item_id=3;break;case"ITEM_MASTER_BALL":case 4:m.item_id=4;break;case"ITEM_PREMIER_BALL":case 5:m.item_id=5;break;case"ITEM_POTION":case 101:m.item_id=101;break;case"ITEM_SUPER_POTION":case 102:m.item_id=102;break;case"ITEM_HYPER_POTION":case 103:m.item_id=103;break;case"ITEM_MAX_POTION":case 104:m.item_id=104;break;case"ITEM_REVIVE":case 201:m.item_id=201;break;case"ITEM_MAX_REVIVE":case 202:m.item_id=202;break;case"ITEM_LUCKY_EGG":case 301:m.item_id=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item_id=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item_id=402;break;case"ITEM_INCENSE_COOL":case 403:m.item_id=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item_id=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item_id=405;break;case"ITEM_TROY_DISK":case 501:m.item_id=501;break;case"ITEM_X_ATTACK":case 602:m.item_id=602;break;case"ITEM_X_DEFENSE":case 603:m.item_id=603;break;case"ITEM_X_MIRACLE":case 604:m.item_id=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item_id=701;break;case"ITEM_BLUK_BERRY":case 702:m.item_id=702;break;case"ITEM_NANAB_BERRY":case 703:m.item_id=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item_id=704;break;case"ITEM_PINAP_BERRY":case 705:m.item_id=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item_id=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item_id=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item_id=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item_id=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item_id=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item_id=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item_id=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item_id=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item_id=1002;break;case"ITEM_SUN_STONE":case 1101:m.item_id=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item_id=1102;break;case"ITEM_METAL_COAT":case 1103:m.item_id=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item_id=1104;break;case"ITEM_UP_GRADE":case 1105:m.item_id=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item_id=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item_id=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item_id=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item_id=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item_id=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item_id=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item_id=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item_id=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item_id=1405;break}if(d.count!=null){m.count=d.count|0}return m};RecycleInventoryItemMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id=o.enums===String?"ITEM_UNKNOWN":0;d.count=0}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item_id]:m.item_id}if(m.count!=null&&m.hasOwnProperty("count")){d.count=m.count}return d};RecycleInventoryItemMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RecycleInventoryItemMessage}();Messages.RedeemGoogleReceiptMessage=function(){function RedeemGoogleReceiptMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RedeemGoogleReceiptMessage.prototype.receipt="";RedeemGoogleReceiptMessage.prototype.receipt_signature="";RedeemGoogleReceiptMessage.prototype.purchase_currency="";RedeemGoogleReceiptMessage.prototype.price_paid_e6=0;RedeemGoogleReceiptMessage.prototype.price_paid_e6_long=$util.Long?$util.Long.fromBits(0,0,false):0;RedeemGoogleReceiptMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.receipt!=null&&m.hasOwnProperty("receipt"))w.uint32(10).string(m.receipt);if(m.receipt_signature!=null&&m.hasOwnProperty("receipt_signature"))w.uint32(18).string(m.receipt_signature);if(m.purchase_currency!=null&&m.hasOwnProperty("purchase_currency"))w.uint32(26).string(m.purchase_currency);if(m.price_paid_e6!=null&&m.hasOwnProperty("price_paid_e6"))w.uint32(32).int32(m.price_paid_e6);if(m.price_paid_e6_long!=null&&m.hasOwnProperty("price_paid_e6_long"))w.uint32(40).int64(m.price_paid_e6_long);return w};RedeemGoogleReceiptMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.RedeemGoogleReceiptMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.receipt=r.string();break;case 2:m.receipt_signature=r.string();break;case 3:m.purchase_currency=r.string();break;case 4:m.price_paid_e6=r.int32();break;case 5:m.price_paid_e6_long=r.int64();break;default:r.skipType(t&7);break}}return m};RedeemGoogleReceiptMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.RedeemGoogleReceiptMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.RedeemGoogleReceiptMessage;if(d.receipt!=null){m.receipt=String(d.receipt)}if(d.receipt_signature!=null){m.receipt_signature=String(d.receipt_signature)}if(d.purchase_currency!=null){m.purchase_currency=String(d.purchase_currency)}if(d.price_paid_e6!=null){m.price_paid_e6=d.price_paid_e6|0}if(d.price_paid_e6_long!=null){if($util.Long)(m.price_paid_e6_long=$util.Long.fromValue(d.price_paid_e6_long)).unsigned=false;else if(typeof d.price_paid_e6_long==="string")m.price_paid_e6_long=parseInt(d.price_paid_e6_long,10);else if(typeof d.price_paid_e6_long==="number")m.price_paid_e6_long=d.price_paid_e6_long;else if(typeof d.price_paid_e6_long==="object")m.price_paid_e6_long=new $util.LongBits(d.price_paid_e6_long.low>>>0,d.price_paid_e6_long.high>>>0).toNumber()}return m};RedeemGoogleReceiptMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.receipt="";d.receipt_signature="";d.purchase_currency="";d.price_paid_e6=0;if($util.Long){var n=new $util.Long(0,0,false);d.price_paid_e6_long=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.price_paid_e6_long=o.longs===String?"0":0}if(m.receipt!=null&&m.hasOwnProperty("receipt")){d.receipt=m.receipt}if(m.receipt_signature!=null&&m.hasOwnProperty("receipt_signature")){d.receipt_signature=m.receipt_signature}if(m.purchase_currency!=null&&m.hasOwnProperty("purchase_currency")){d.purchase_currency=m.purchase_currency}if(m.price_paid_e6!=null&&m.hasOwnProperty("price_paid_e6")){d.price_paid_e6=m.price_paid_e6}if(m.price_paid_e6_long!=null&&m.hasOwnProperty("price_paid_e6_long")){if(typeof m.price_paid_e6_long==="number")d.price_paid_e6_long=o.longs===String?String(m.price_paid_e6_long):m.price_paid_e6_long;else d.price_paid_e6_long=o.longs===String?$util.Long.prototype.toString.call(m.price_paid_e6_long):o.longs===Number?new $util.LongBits(m.price_paid_e6_long.low>>>0,m.price_paid_e6_long.high>>>0).toNumber():m.price_paid_e6_long}return d};RedeemGoogleReceiptMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RedeemGoogleReceiptMessage}();Messages.RegisterBackgroundDeviceMessage=function(){function RegisterBackgroundDeviceMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RegisterBackgroundDeviceMessage.prototype.device_type="";RegisterBackgroundDeviceMessage.prototype.device_id="";RegisterBackgroundDeviceMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.device_type!=null&&m.hasOwnProperty("device_type"))w.uint32(10).string(m.device_type);if(m.device_id!=null&&m.hasOwnProperty("device_id"))w.uint32(18).string(m.device_id);return w};RegisterBackgroundDeviceMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.RegisterBackgroundDeviceMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.device_type=r.string();break;case 2:m.device_id=r.string();break;default:r.skipType(t&7);break}}return m};RegisterBackgroundDeviceMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.RegisterBackgroundDeviceMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.RegisterBackgroundDeviceMessage;if(d.device_type!=null){m.device_type=String(d.device_type)}if(d.device_id!=null){m.device_id=String(d.device_id)}return m};RegisterBackgroundDeviceMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.device_type="";d.device_id=""}if(m.device_type!=null&&m.hasOwnProperty("device_type")){d.device_type=m.device_type}if(m.device_id!=null&&m.hasOwnProperty("device_id")){d.device_id=m.device_id}return d};RegisterBackgroundDeviceMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RegisterBackgroundDeviceMessage}();Messages.ReleasePokemonMessage=function(){function ReleasePokemonMessage(p){this.pokemon_ids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ReleasePokemonMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;ReleasePokemonMessage.prototype.pokemon_ids=$util.emptyArray;ReleasePokemonMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(9).fixed64(m.pokemon_id);if(m.pokemon_ids!=null&&m.pokemon_ids.length){w.uint32(18).fork();for(var i=0;i<m.pokemon_ids.length;++i)w.fixed64(m.pokemon_ids[i]);w.ldelim()}return w};ReleasePokemonMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.ReleasePokemonMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.fixed64();break;case 2:if(!(m.pokemon_ids&&m.pokemon_ids.length))m.pokemon_ids=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.pokemon_ids.push(r.fixed64())}else m.pokemon_ids.push(r.fixed64());break;default:r.skipType(t&7);break}}return m};ReleasePokemonMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.ReleasePokemonMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.ReleasePokemonMessage;if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}if(d.pokemon_ids){if(!Array.isArray(d.pokemon_ids))throw TypeError(".POGOProtos.Networking.Requests.Messages.ReleasePokemonMessage.pokemon_ids: array expected");m.pokemon_ids=[];for(var i=0;i<d.pokemon_ids.length;++i){if($util.Long)(m.pokemon_ids[i]=$util.Long.fromValue(d.pokemon_ids[i])).unsigned=false;else if(typeof d.pokemon_ids[i]==="string")m.pokemon_ids[i]=parseInt(d.pokemon_ids[i],10);else if(typeof d.pokemon_ids[i]==="number")m.pokemon_ids[i]=d.pokemon_ids[i];else if(typeof d.pokemon_ids[i]==="object")m.pokemon_ids[i]=new $util.LongBits(d.pokemon_ids[i].low>>>0,d.pokemon_ids[i].high>>>0).toNumber()}}return m};ReleasePokemonMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.pokemon_ids=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}if(m.pokemon_ids&&m.pokemon_ids.length){d.pokemon_ids=[];for(var j=0;j<m.pokemon_ids.length;++j){if(typeof m.pokemon_ids[j]==="number")d.pokemon_ids[j]=o.longs===String?String(m.pokemon_ids[j]):m.pokemon_ids[j];else d.pokemon_ids[j]=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_ids[j]):o.longs===Number?new $util.LongBits(m.pokemon_ids[j].low>>>0,m.pokemon_ids[j].high>>>0).toNumber():m.pokemon_ids[j]}}return d};ReleasePokemonMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ReleasePokemonMessage}();Messages.RemoveQuestMessage=function(){function RemoveQuestMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RemoveQuestMessage.prototype.quest_id="";RemoveQuestMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.quest_id!=null&&m.hasOwnProperty("quest_id"))w.uint32(10).string(m.quest_id);return w};RemoveQuestMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.RemoveQuestMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.quest_id=r.string();break;default:r.skipType(t&7);break}}return m};RemoveQuestMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.RemoveQuestMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.RemoveQuestMessage;if(d.quest_id!=null){m.quest_id=String(d.quest_id)}return m};RemoveQuestMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.quest_id=""}if(m.quest_id!=null&&m.hasOwnProperty("quest_id")){d.quest_id=m.quest_id}return d};RemoveQuestMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RemoveQuestMessage}();Messages.RequestGeofenceUpdatesMessage=function(){function RequestGeofenceUpdatesMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RequestGeofenceUpdatesMessage.prototype.number_of_points=0;RequestGeofenceUpdatesMessage.prototype.minimum_point_radius_m=0;RequestGeofenceUpdatesMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.number_of_points!=null&&m.hasOwnProperty("number_of_points"))w.uint32(8).int32(m.number_of_points);if(m.minimum_point_radius_m!=null&&m.hasOwnProperty("minimum_point_radius_m"))w.uint32(17).double(m.minimum_point_radius_m);return w};RequestGeofenceUpdatesMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.RequestGeofenceUpdatesMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.number_of_points=r.int32();break;case 2:m.minimum_point_radius_m=r.double();break;default:r.skipType(t&7);break}}return m};RequestGeofenceUpdatesMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.RequestGeofenceUpdatesMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.RequestGeofenceUpdatesMessage;if(d.number_of_points!=null){m.number_of_points=d.number_of_points|0}if(d.minimum_point_radius_m!=null){m.minimum_point_radius_m=Number(d.minimum_point_radius_m)}return m};RequestGeofenceUpdatesMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.number_of_points=0;d.minimum_point_radius_m=0}if(m.number_of_points!=null&&m.hasOwnProperty("number_of_points")){d.number_of_points=m.number_of_points}if(m.minimum_point_radius_m!=null&&m.hasOwnProperty("minimum_point_radius_m")){d.minimum_point_radius_m=o.json&&!isFinite(m.minimum_point_radius_m)?String(m.minimum_point_radius_m):m.minimum_point_radius_m}return d};RequestGeofenceUpdatesMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RequestGeofenceUpdatesMessage}();Messages.SaveCombatPlayerPreferencesMessage=function(){function SaveCombatPlayerPreferencesMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SaveCombatPlayerPreferencesMessage.prototype.preferences=null;SaveCombatPlayerPreferencesMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.preferences!=null&&m.hasOwnProperty("preferences"))$root.POGOProtos.Data.Combat.CombatPlayerPreferences.encode(m.preferences,w.uint32(10).fork()).ldelim();return w};SaveCombatPlayerPreferencesMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SaveCombatPlayerPreferencesMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.preferences=$root.POGOProtos.Data.Combat.CombatPlayerPreferences.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};SaveCombatPlayerPreferencesMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SaveCombatPlayerPreferencesMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SaveCombatPlayerPreferencesMessage;if(d.preferences!=null){if(typeof d.preferences!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.SaveCombatPlayerPreferencesMessage.preferences: object expected");m.preferences=$root.POGOProtos.Data.Combat.CombatPlayerPreferences.fromObject(d.preferences)}return m};SaveCombatPlayerPreferencesMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.preferences=null}if(m.preferences!=null&&m.hasOwnProperty("preferences")){d.preferences=$root.POGOProtos.Data.Combat.CombatPlayerPreferences.toObject(m.preferences,o)}return d};SaveCombatPlayerPreferencesMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SaveCombatPlayerPreferencesMessage}();Messages.SavePlayerSnapshotMessage=function(){function SavePlayerSnapshotMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SavePlayerSnapshotMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};SavePlayerSnapshotMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SavePlayerSnapshotMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};SavePlayerSnapshotMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SavePlayerSnapshotMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.SavePlayerSnapshotMessage};SavePlayerSnapshotMessage.toObject=function toObject(){return{}};SavePlayerSnapshotMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SavePlayerSnapshotMessage}();Messages.SaveSocialPlayerSettingsMessage=function(){function SaveSocialPlayerSettingsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SaveSocialPlayerSettingsMessage.prototype.settings=null;SaveSocialPlayerSettingsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.settings!=null&&m.hasOwnProperty("settings"))$root.POGOProtos.Data.Player.SocialPlayerSettings.encode(m.settings,w.uint32(10).fork()).ldelim();return w};SaveSocialPlayerSettingsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SaveSocialPlayerSettingsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.settings=$root.POGOProtos.Data.Player.SocialPlayerSettings.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};SaveSocialPlayerSettingsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SaveSocialPlayerSettingsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SaveSocialPlayerSettingsMessage;if(d.settings!=null){if(typeof d.settings!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.SaveSocialPlayerSettingsMessage.settings: object expected");m.settings=$root.POGOProtos.Data.Player.SocialPlayerSettings.fromObject(d.settings)}return m};SaveSocialPlayerSettingsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.settings=null}if(m.settings!=null&&m.hasOwnProperty("settings")){d.settings=$root.POGOProtos.Data.Player.SocialPlayerSettings.toObject(m.settings,o)}return d};SaveSocialPlayerSettingsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SaveSocialPlayerSettingsMessage}();Messages.SendGiftMessage=function(){function SendGiftMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SendGiftMessage.prototype.giftbox_id=$util.Long?$util.Long.fromBits(0,0,false):0;SendGiftMessage.prototype.player_id="";SendGiftMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.giftbox_id!=null&&m.hasOwnProperty("giftbox_id"))w.uint32(9).fixed64(m.giftbox_id);if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(18).string(m.player_id);return w};SendGiftMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SendGiftMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.giftbox_id=r.fixed64();break;case 2:m.player_id=r.string();break;default:r.skipType(t&7);break}}return m};SendGiftMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SendGiftMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SendGiftMessage;if(d.giftbox_id!=null){if($util.Long)(m.giftbox_id=$util.Long.fromValue(d.giftbox_id)).unsigned=false;else if(typeof d.giftbox_id==="string")m.giftbox_id=parseInt(d.giftbox_id,10);else if(typeof d.giftbox_id==="number")m.giftbox_id=d.giftbox_id;else if(typeof d.giftbox_id==="object")m.giftbox_id=new $util.LongBits(d.giftbox_id.low>>>0,d.giftbox_id.high>>>0).toNumber()}if(d.player_id!=null){m.player_id=String(d.player_id)}return m};SendGiftMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.giftbox_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.giftbox_id=o.longs===String?"0":0;d.player_id=""}if(m.giftbox_id!=null&&m.hasOwnProperty("giftbox_id")){if(typeof m.giftbox_id==="number")d.giftbox_id=o.longs===String?String(m.giftbox_id):m.giftbox_id;else d.giftbox_id=o.longs===String?$util.Long.prototype.toString.call(m.giftbox_id):o.longs===Number?new $util.LongBits(m.giftbox_id.low>>>0,m.giftbox_id.high>>>0).toNumber():m.giftbox_id}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}return d};SendGiftMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SendGiftMessage}();Messages.SendProbeMessage=function(){function SendProbeMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SendProbeMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};SendProbeMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SendProbeMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};SendProbeMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SendProbeMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.SendProbeMessage};SendProbeMessage.toObject=function toObject(){return{}};SendProbeMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SendProbeMessage}();Messages.SetAvatarItemAsViewedMessage=function(){function SetAvatarItemAsViewedMessage(p){this.avatar_template_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetAvatarItemAsViewedMessage.prototype.avatar_template_id=$util.emptyArray;SetAvatarItemAsViewedMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.avatar_template_id!=null&&m.avatar_template_id.length){for(var i=0;i<m.avatar_template_id.length;++i)w.uint32(10).string(m.avatar_template_id[i])}return w};SetAvatarItemAsViewedMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SetAvatarItemAsViewedMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.avatar_template_id&&m.avatar_template_id.length))m.avatar_template_id=[];m.avatar_template_id.push(r.string());break;default:r.skipType(t&7);break}}return m};SetAvatarItemAsViewedMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SetAvatarItemAsViewedMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SetAvatarItemAsViewedMessage;if(d.avatar_template_id){if(!Array.isArray(d.avatar_template_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.SetAvatarItemAsViewedMessage.avatar_template_id: array expected");m.avatar_template_id=[];for(var i=0;i<d.avatar_template_id.length;++i){m.avatar_template_id[i]=String(d.avatar_template_id[i])}}return m};SetAvatarItemAsViewedMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.avatar_template_id=[]}if(m.avatar_template_id&&m.avatar_template_id.length){d.avatar_template_id=[];for(var j=0;j<m.avatar_template_id.length;++j){d.avatar_template_id[j]=m.avatar_template_id[j]}}return d};SetAvatarItemAsViewedMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SetAvatarItemAsViewedMessage}();Messages.SetAvatarMessage=function(){function SetAvatarMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetAvatarMessage.prototype.player_avatar=null;SetAvatarMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_avatar!=null&&m.hasOwnProperty("player_avatar"))$root.POGOProtos.Data.Player.PlayerAvatar.encode(m.player_avatar,w.uint32(18).fork()).ldelim();return w};SetAvatarMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SetAvatarMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 2:m.player_avatar=$root.POGOProtos.Data.Player.PlayerAvatar.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};SetAvatarMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SetAvatarMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SetAvatarMessage;if(d.player_avatar!=null){if(typeof d.player_avatar!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.SetAvatarMessage.player_avatar: object expected");m.player_avatar=$root.POGOProtos.Data.Player.PlayerAvatar.fromObject(d.player_avatar)}return m};SetAvatarMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_avatar=null}if(m.player_avatar!=null&&m.hasOwnProperty("player_avatar")){d.player_avatar=$root.POGOProtos.Data.Player.PlayerAvatar.toObject(m.player_avatar,o)}return d};SetAvatarMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SetAvatarMessage}();Messages.SetBuddyPokemonMessage=function(){function SetBuddyPokemonMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetBuddyPokemonMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;SetBuddyPokemonMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(9).fixed64(m.pokemon_id);return w};SetBuddyPokemonMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SetBuddyPokemonMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.fixed64();break;default:r.skipType(t&7);break}}return m};SetBuddyPokemonMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SetBuddyPokemonMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SetBuddyPokemonMessage;if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}return m};SetBuddyPokemonMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}return d};SetBuddyPokemonMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SetBuddyPokemonMessage}();Messages.SetContactSettingsMessage=function(){function SetContactSettingsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetContactSettingsMessage.prototype.contact_settings=null;SetContactSettingsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.contact_settings!=null&&m.hasOwnProperty("contact_settings"))$root.POGOProtos.Data.Player.ContactSettings.encode(m.contact_settings,w.uint32(10).fork()).ldelim();return w};SetContactSettingsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SetContactSettingsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.contact_settings=$root.POGOProtos.Data.Player.ContactSettings.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};SetContactSettingsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SetContactSettingsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SetContactSettingsMessage;if(d.contact_settings!=null){if(typeof d.contact_settings!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.SetContactSettingsMessage.contact_settings: object expected");m.contact_settings=$root.POGOProtos.Data.Player.ContactSettings.fromObject(d.contact_settings)}return m};SetContactSettingsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.contact_settings=null}if(m.contact_settings!=null&&m.hasOwnProperty("contact_settings")){d.contact_settings=$root.POGOProtos.Data.Player.ContactSettings.toObject(m.contact_settings,o)}return d};SetContactSettingsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SetContactSettingsMessage}();Messages.SetFavoritePokemonMessage=function(){function SetFavoritePokemonMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetFavoritePokemonMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;SetFavoritePokemonMessage.prototype.is_favorite=false;SetFavoritePokemonMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(8).int64(m.pokemon_id);if(m.is_favorite!=null&&m.hasOwnProperty("is_favorite"))w.uint32(16).bool(m.is_favorite);return w};SetFavoritePokemonMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SetFavoritePokemonMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.int64();break;case 2:m.is_favorite=r.bool();break;default:r.skipType(t&7);break}}return m};SetFavoritePokemonMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SetFavoritePokemonMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SetFavoritePokemonMessage;if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}if(d.is_favorite!=null){m.is_favorite=Boolean(d.is_favorite)}return m};SetFavoritePokemonMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0;d.is_favorite=false}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}if(m.is_favorite!=null&&m.hasOwnProperty("is_favorite")){d.is_favorite=m.is_favorite}return d};SetFavoritePokemonMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SetFavoritePokemonMessage}();Messages.SetFriendNicknameMessage=function(){function SetFriendNicknameMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetFriendNicknameMessage.prototype.friend_id="";SetFriendNicknameMessage.prototype.friend_nickname="";SetFriendNicknameMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.friend_id!=null&&m.hasOwnProperty("friend_id"))w.uint32(10).string(m.friend_id);if(m.friend_nickname!=null&&m.hasOwnProperty("friend_nickname"))w.uint32(18).string(m.friend_nickname);return w};SetFriendNicknameMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SetFriendNicknameMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.friend_id=r.string();break;case 2:m.friend_nickname=r.string();break;default:r.skipType(t&7);break}}return m};SetFriendNicknameMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SetFriendNicknameMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SetFriendNicknameMessage;if(d.friend_id!=null){m.friend_id=String(d.friend_id)}if(d.friend_nickname!=null){m.friend_nickname=String(d.friend_nickname)}return m};SetFriendNicknameMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.friend_id="";d.friend_nickname=""}if(m.friend_id!=null&&m.hasOwnProperty("friend_id")){d.friend_id=m.friend_id}if(m.friend_nickname!=null&&m.hasOwnProperty("friend_nickname")){d.friend_nickname=m.friend_nickname}return d};SetFriendNicknameMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SetFriendNicknameMessage}();Messages.SetInGameCurrencyExchangeRateMessage=function(){function SetInGameCurrencyExchangeRateMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetInGameCurrencyExchangeRateMessage.prototype.in_game_currency="";SetInGameCurrencyExchangeRateMessage.prototype.fiat_currency="";SetInGameCurrencyExchangeRateMessage.prototype.fiat_currency_cost_e6_per_in_game_unit=$util.Long?$util.Long.fromBits(0,0,false):0;SetInGameCurrencyExchangeRateMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.in_game_currency!=null&&m.hasOwnProperty("in_game_currency"))w.uint32(10).string(m.in_game_currency);if(m.fiat_currency!=null&&m.hasOwnProperty("fiat_currency"))w.uint32(18).string(m.fiat_currency);if(m.fiat_currency_cost_e6_per_in_game_unit!=null&&m.hasOwnProperty("fiat_currency_cost_e6_per_in_game_unit"))w.uint32(24).int64(m.fiat_currency_cost_e6_per_in_game_unit);return w};SetInGameCurrencyExchangeRateMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SetInGameCurrencyExchangeRateMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.in_game_currency=r.string();break;case 2:m.fiat_currency=r.string();break;case 3:m.fiat_currency_cost_e6_per_in_game_unit=r.int64();break;default:r.skipType(t&7);break}}return m};SetInGameCurrencyExchangeRateMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SetInGameCurrencyExchangeRateMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SetInGameCurrencyExchangeRateMessage;if(d.in_game_currency!=null){m.in_game_currency=String(d.in_game_currency)}if(d.fiat_currency!=null){m.fiat_currency=String(d.fiat_currency)}if(d.fiat_currency_cost_e6_per_in_game_unit!=null){if($util.Long)(m.fiat_currency_cost_e6_per_in_game_unit=$util.Long.fromValue(d.fiat_currency_cost_e6_per_in_game_unit)).unsigned=false;else if(typeof d.fiat_currency_cost_e6_per_in_game_unit==="string")m.fiat_currency_cost_e6_per_in_game_unit=parseInt(d.fiat_currency_cost_e6_per_in_game_unit,10);else if(typeof d.fiat_currency_cost_e6_per_in_game_unit==="number")m.fiat_currency_cost_e6_per_in_game_unit=d.fiat_currency_cost_e6_per_in_game_unit;else if(typeof d.fiat_currency_cost_e6_per_in_game_unit==="object")m.fiat_currency_cost_e6_per_in_game_unit=new $util.LongBits(d.fiat_currency_cost_e6_per_in_game_unit.low>>>0,d.fiat_currency_cost_e6_per_in_game_unit.high>>>0).toNumber()}return m};SetInGameCurrencyExchangeRateMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.in_game_currency="";d.fiat_currency="";if($util.Long){var n=new $util.Long(0,0,false);d.fiat_currency_cost_e6_per_in_game_unit=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.fiat_currency_cost_e6_per_in_game_unit=o.longs===String?"0":0}if(m.in_game_currency!=null&&m.hasOwnProperty("in_game_currency")){d.in_game_currency=m.in_game_currency}if(m.fiat_currency!=null&&m.hasOwnProperty("fiat_currency")){d.fiat_currency=m.fiat_currency}if(m.fiat_currency_cost_e6_per_in_game_unit!=null&&m.hasOwnProperty("fiat_currency_cost_e6_per_in_game_unit")){if(typeof m.fiat_currency_cost_e6_per_in_game_unit==="number")d.fiat_currency_cost_e6_per_in_game_unit=o.longs===String?String(m.fiat_currency_cost_e6_per_in_game_unit):m.fiat_currency_cost_e6_per_in_game_unit;else d.fiat_currency_cost_e6_per_in_game_unit=o.longs===String?$util.Long.prototype.toString.call(m.fiat_currency_cost_e6_per_in_game_unit):o.longs===Number?new $util.LongBits(m.fiat_currency_cost_e6_per_in_game_unit.low>>>0,m.fiat_currency_cost_e6_per_in_game_unit.high>>>0).toNumber():m.fiat_currency_cost_e6_per_in_game_unit}return d};SetInGameCurrencyExchangeRateMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SetInGameCurrencyExchangeRateMessage}();Messages.SetLobbyPokemonMessage=function(){function SetLobbyPokemonMessage(p){this.lobby_id=[];this.pokemon_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetLobbyPokemonMessage.prototype.raid_seed=$util.Long?$util.Long.fromBits(0,0,false):0;SetLobbyPokemonMessage.prototype.gym_id="";SetLobbyPokemonMessage.prototype.lobby_id=$util.emptyArray;SetLobbyPokemonMessage.prototype.pokemon_id=$util.emptyArray;SetLobbyPokemonMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed"))w.uint32(8).int64(m.raid_seed);if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(18).string(m.gym_id);if(m.lobby_id!=null&&m.lobby_id.length){w.uint32(26).fork();for(var i=0;i<m.lobby_id.length;++i)w.int32(m.lobby_id[i]);w.ldelim()}if(m.pokemon_id!=null&&m.pokemon_id.length){w.uint32(34).fork();for(var i=0;i<m.pokemon_id.length;++i)w.fixed64(m.pokemon_id[i]);w.ldelim()}return w};SetLobbyPokemonMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SetLobbyPokemonMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.raid_seed=r.int64();break;case 2:m.gym_id=r.string();break;case 3:if(!(m.lobby_id&&m.lobby_id.length))m.lobby_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.lobby_id.push(r.int32())}else m.lobby_id.push(r.int32());break;case 4:if(!(m.pokemon_id&&m.pokemon_id.length))m.pokemon_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.pokemon_id.push(r.fixed64())}else m.pokemon_id.push(r.fixed64());break;default:r.skipType(t&7);break}}return m};SetLobbyPokemonMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SetLobbyPokemonMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SetLobbyPokemonMessage;if(d.raid_seed!=null){if($util.Long)(m.raid_seed=$util.Long.fromValue(d.raid_seed)).unsigned=false;else if(typeof d.raid_seed==="string")m.raid_seed=parseInt(d.raid_seed,10);else if(typeof d.raid_seed==="number")m.raid_seed=d.raid_seed;else if(typeof d.raid_seed==="object")m.raid_seed=new $util.LongBits(d.raid_seed.low>>>0,d.raid_seed.high>>>0).toNumber()}if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.lobby_id){if(!Array.isArray(d.lobby_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.SetLobbyPokemonMessage.lobby_id: array expected");m.lobby_id=[];for(var i=0;i<d.lobby_id.length;++i){m.lobby_id[i]=d.lobby_id[i]|0}}if(d.pokemon_id){if(!Array.isArray(d.pokemon_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.SetLobbyPokemonMessage.pokemon_id: array expected");m.pokemon_id=[];for(var i=0;i<d.pokemon_id.length;++i){if($util.Long)(m.pokemon_id[i]=$util.Long.fromValue(d.pokemon_id[i])).unsigned=false;else if(typeof d.pokemon_id[i]==="string")m.pokemon_id[i]=parseInt(d.pokemon_id[i],10);else if(typeof d.pokemon_id[i]==="number")m.pokemon_id[i]=d.pokemon_id[i];else if(typeof d.pokemon_id[i]==="object")m.pokemon_id[i]=new $util.LongBits(d.pokemon_id[i].low>>>0,d.pokemon_id[i].high>>>0).toNumber()}}return m};SetLobbyPokemonMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.lobby_id=[];d.pokemon_id=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.raid_seed=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_seed=o.longs===String?"0":0;d.gym_id=""}if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed")){if(typeof m.raid_seed==="number")d.raid_seed=o.longs===String?String(m.raid_seed):m.raid_seed;else d.raid_seed=o.longs===String?$util.Long.prototype.toString.call(m.raid_seed):o.longs===Number?new $util.LongBits(m.raid_seed.low>>>0,m.raid_seed.high>>>0).toNumber():m.raid_seed}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.lobby_id&&m.lobby_id.length){d.lobby_id=[];for(var j=0;j<m.lobby_id.length;++j){d.lobby_id[j]=m.lobby_id[j]}}if(m.pokemon_id&&m.pokemon_id.length){d.pokemon_id=[];for(var j=0;j<m.pokemon_id.length;++j){if(typeof m.pokemon_id[j]==="number")d.pokemon_id[j]=o.longs===String?String(m.pokemon_id[j]):m.pokemon_id[j];else d.pokemon_id[j]=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id[j]):o.longs===Number?new $util.LongBits(m.pokemon_id[j].low>>>0,m.pokemon_id[j].high>>>0).toNumber():m.pokemon_id[j]}}return d};SetLobbyPokemonMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SetLobbyPokemonMessage}();Messages.SetLobbyVisibilityMessage=function(){function SetLobbyVisibilityMessage(p){this.lobby_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetLobbyVisibilityMessage.prototype.raid_seed=$util.Long?$util.Long.fromBits(0,0,false):0;SetLobbyVisibilityMessage.prototype.gym_id="";SetLobbyVisibilityMessage.prototype.lobby_id=$util.emptyArray;SetLobbyVisibilityMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed"))w.uint32(8).int64(m.raid_seed);if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(18).string(m.gym_id);if(m.lobby_id!=null&&m.lobby_id.length){w.uint32(26).fork();for(var i=0;i<m.lobby_id.length;++i)w.int32(m.lobby_id[i]);w.ldelim()}return w};SetLobbyVisibilityMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SetLobbyVisibilityMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.raid_seed=r.int64();break;case 2:m.gym_id=r.string();break;case 3:if(!(m.lobby_id&&m.lobby_id.length))m.lobby_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.lobby_id.push(r.int32())}else m.lobby_id.push(r.int32());break;default:r.skipType(t&7);break}}return m};SetLobbyVisibilityMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SetLobbyVisibilityMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SetLobbyVisibilityMessage;if(d.raid_seed!=null){if($util.Long)(m.raid_seed=$util.Long.fromValue(d.raid_seed)).unsigned=false;else if(typeof d.raid_seed==="string")m.raid_seed=parseInt(d.raid_seed,10);else if(typeof d.raid_seed==="number")m.raid_seed=d.raid_seed;else if(typeof d.raid_seed==="object")m.raid_seed=new $util.LongBits(d.raid_seed.low>>>0,d.raid_seed.high>>>0).toNumber()}if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.lobby_id){if(!Array.isArray(d.lobby_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.SetLobbyVisibilityMessage.lobby_id: array expected");m.lobby_id=[];for(var i=0;i<d.lobby_id.length;++i){m.lobby_id[i]=d.lobby_id[i]|0}}return m};SetLobbyVisibilityMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.lobby_id=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.raid_seed=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_seed=o.longs===String?"0":0;d.gym_id=""}if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed")){if(typeof m.raid_seed==="number")d.raid_seed=o.longs===String?String(m.raid_seed):m.raid_seed;else d.raid_seed=o.longs===String?$util.Long.prototype.toString.call(m.raid_seed):o.longs===Number?new $util.LongBits(m.raid_seed.low>>>0,m.raid_seed.high>>>0).toNumber():m.raid_seed}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.lobby_id&&m.lobby_id.length){d.lobby_id=[];for(var j=0;j<m.lobby_id.length;++j){d.lobby_id[j]=m.lobby_id[j]}}return d};SetLobbyVisibilityMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SetLobbyVisibilityMessage}();Messages.SetPlayerTeamMessage=function(){function SetPlayerTeamMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetPlayerTeamMessage.prototype.team=0;SetPlayerTeamMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.team!=null&&m.hasOwnProperty("team"))w.uint32(8).int32(m.team);return w};SetPlayerTeamMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SetPlayerTeamMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.team=r.int32();break;default:r.skipType(t&7);break}}return m};SetPlayerTeamMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SetPlayerTeamMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SetPlayerTeamMessage;switch(d.team){case"NEUTRAL":case 0:m.team=0;break;case"BLUE":case 1:m.team=1;break;case"RED":case 2:m.team=2;break;case"YELLOW":case 3:m.team=3;break}return m};SetPlayerTeamMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.team=o.enums===String?"NEUTRAL":0}if(m.team!=null&&m.hasOwnProperty("team")){d.team=o.enums===String?$root.POGOProtos.Enums.TeamColor[m.team]:m.team}return d};SetPlayerTeamMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SetPlayerTeamMessage}();Messages.SfidaActionLogMessage=function(){function SfidaActionLogMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaActionLogMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};SfidaActionLogMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SfidaActionLogMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};SfidaActionLogMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SfidaActionLogMessage)return d;return new $root.POGOProtos.Networking.Requests.Messages.SfidaActionLogMessage};SfidaActionLogMessage.toObject=function toObject(){return{}};SfidaActionLogMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SfidaActionLogMessage}();Messages.SfidaCaptureMessage=function(){function SfidaCaptureMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaCaptureMessage.prototype.spawnpoint_id="";SfidaCaptureMessage.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,false):0;SfidaCaptureMessage.prototype.player_lat=0;SfidaCaptureMessage.prototype.player_lng=0;SfidaCaptureMessage.prototype.encounter_type=0;SfidaCaptureMessage.prototype.gym_lat=0;SfidaCaptureMessage.prototype.gym_lng=0;SfidaCaptureMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.spawnpoint_id!=null&&m.hasOwnProperty("spawnpoint_id"))w.uint32(10).string(m.spawnpoint_id);if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(16).int64(m.encounter_id);if(m.player_lat!=null&&m.hasOwnProperty("player_lat"))w.uint32(25).double(m.player_lat);if(m.player_lng!=null&&m.hasOwnProperty("player_lng"))w.uint32(33).double(m.player_lng);if(m.encounter_type!=null&&m.hasOwnProperty("encounter_type"))w.uint32(40).int32(m.encounter_type);if(m.gym_lat!=null&&m.hasOwnProperty("gym_lat"))w.uint32(49).double(m.gym_lat);if(m.gym_lng!=null&&m.hasOwnProperty("gym_lng"))w.uint32(57).double(m.gym_lng);return w};SfidaCaptureMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SfidaCaptureMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.spawnpoint_id=r.string();break;case 2:m.encounter_id=r.int64();break;case 3:m.player_lat=r.double();break;case 4:m.player_lng=r.double();break;case 5:m.encounter_type=r.int32();break;case 6:m.gym_lat=r.double();break;case 7:m.gym_lng=r.double();break;default:r.skipType(t&7);break}}return m};SfidaCaptureMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SfidaCaptureMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SfidaCaptureMessage;if(d.spawnpoint_id!=null){m.spawnpoint_id=String(d.spawnpoint_id)}if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=false;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber()}if(d.player_lat!=null){m.player_lat=Number(d.player_lat)}if(d.player_lng!=null){m.player_lng=Number(d.player_lng)}switch(d.encounter_type){case"SPAWN_POINT":case 0:m.encounter_type=0;break;case"INCENSE":case 1:m.encounter_type=1;break;case"DISK":case 2:m.encounter_type=2;break;case"POST_RAID":case 3:m.encounter_type=3;break;case"STORY_QUEST":case 4:m.encounter_type=4;break;case"QUEST_STAMP_CARD":case 5:m.encounter_type=5;break;case"CHALLENGE_QUEST":case 6:m.encounter_type=6;break}if(d.gym_lat!=null){m.gym_lat=Number(d.gym_lat)}if(d.gym_lng!=null){m.gym_lng=Number(d.gym_lng)}return m};SfidaCaptureMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.spawnpoint_id="";if($util.Long){var n=new $util.Long(0,0,false);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0;d.player_lat=0;d.player_lng=0;d.encounter_type=o.enums===String?"SPAWN_POINT":0;d.gym_lat=0;d.gym_lng=0}if(m.spawnpoint_id!=null&&m.hasOwnProperty("spawnpoint_id")){d.spawnpoint_id=m.spawnpoint_id}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber():m.encounter_id}if(m.player_lat!=null&&m.hasOwnProperty("player_lat")){d.player_lat=o.json&&!isFinite(m.player_lat)?String(m.player_lat):m.player_lat}if(m.player_lng!=null&&m.hasOwnProperty("player_lng")){d.player_lng=o.json&&!isFinite(m.player_lng)?String(m.player_lng):m.player_lng}if(m.encounter_type!=null&&m.hasOwnProperty("encounter_type")){d.encounter_type=o.enums===String?$root.POGOProtos.Enums.EncounterType[m.encounter_type]:m.encounter_type}if(m.gym_lat!=null&&m.hasOwnProperty("gym_lat")){d.gym_lat=o.json&&!isFinite(m.gym_lat)?String(m.gym_lat):m.gym_lat}if(m.gym_lng!=null&&m.hasOwnProperty("gym_lng")){d.gym_lng=o.json&&!isFinite(m.gym_lng)?String(m.gym_lng):m.gym_lng}return d};SfidaCaptureMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SfidaCaptureMessage}();Messages.SfidaCertificationMessage=function(){function SfidaCertificationMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaCertificationMessage.prototype.stage=0;SfidaCertificationMessage.prototype.payload=$util.newBuffer([]);SfidaCertificationMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.stage!=null&&m.hasOwnProperty("stage"))w.uint32(8).int32(m.stage);if(m.payload!=null&&m.hasOwnProperty("payload"))w.uint32(18).bytes(m.payload);return w};SfidaCertificationMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SfidaCertificationMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.stage=r.int32();break;case 2:m.payload=r.bytes();break;default:r.skipType(t&7);break}}return m};SfidaCertificationMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SfidaCertificationMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SfidaCertificationMessage;switch(d.stage){case"UNSET":case 0:m.stage=0;break;case"STAGE1":case 1:m.stage=1;break;case"STAGE2":case 2:m.stage=2;break;case"STAGE3":case 3:m.stage=3;break}if(d.payload!=null){if(typeof d.payload==="string")$util.base64.decode(d.payload,m.payload=$util.newBuffer($util.base64.length(d.payload)),0);else if(d.payload.length)m.payload=d.payload}return m};SfidaCertificationMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.stage=o.enums===String?"UNSET":0;if(o.bytes===String)d.payload="";else{d.payload=[];if(o.bytes!==Array)d.payload=$util.newBuffer(d.payload)}}if(m.stage!=null&&m.hasOwnProperty("stage")){d.stage=o.enums===String?$root.POGOProtos.Networking.Requests.Messages.SfidaCertificationMessage.SfidaCertificationStage[m.stage]:m.stage}if(m.payload!=null&&m.hasOwnProperty("payload")){d.payload=o.bytes===String?$util.base64.encode(m.payload,0,m.payload.length):o.bytes===Array?Array.prototype.slice.call(m.payload):m.payload}return d};SfidaCertificationMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SfidaCertificationMessage.SfidaCertificationStage=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="STAGE1"]=1;values[valuesById[2]="STAGE2"]=2;values[valuesById[3]="STAGE3"]=3;return values}();return SfidaCertificationMessage}();Messages.SfidaDowserMessage=function(){function SfidaDowserMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaDowserMessage.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,false):0;SfidaDowserMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(8).int64(m.encounter_id);return w};SfidaDowserMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SfidaDowserMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.encounter_id=r.int64();break;default:r.skipType(t&7);break}}return m};SfidaDowserMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SfidaDowserMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SfidaDowserMessage;if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=false;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber()}return m};SfidaDowserMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber():m.encounter_id}return d};SfidaDowserMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SfidaDowserMessage}();Messages.SfidaRegistrationMessage=function(){function SfidaRegistrationMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaRegistrationMessage.prototype.sfida_id="";SfidaRegistrationMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.sfida_id!=null&&m.hasOwnProperty("sfida_id"))w.uint32(10).string(m.sfida_id);return w};SfidaRegistrationMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SfidaRegistrationMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.sfida_id=r.string();break;default:r.skipType(t&7);break}}return m};SfidaRegistrationMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SfidaRegistrationMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SfidaRegistrationMessage;if(d.sfida_id!=null){m.sfida_id=String(d.sfida_id)}return m};SfidaRegistrationMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.sfida_id=""}if(m.sfida_id!=null&&m.hasOwnProperty("sfida_id")){d.sfida_id=m.sfida_id}return d};SfidaRegistrationMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SfidaRegistrationMessage}();Messages.SfidaUpdateMessage=function(){function SfidaUpdateMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaUpdateMessage.prototype.player_lat=0;SfidaUpdateMessage.prototype.player_lng=0;SfidaUpdateMessage.prototype.metrics_update=null;SfidaUpdateMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_lat!=null&&m.hasOwnProperty("player_lat"))w.uint32(9).double(m.player_lat);if(m.player_lng!=null&&m.hasOwnProperty("player_lng"))w.uint32(17).double(m.player_lng);if(m.metrics_update!=null&&m.hasOwnProperty("metrics_update"))$root.POGOProtos.Data.Sfida.SfidaMetricsUpdate.encode(m.metrics_update,w.uint32(26).fork()).ldelim();return w};SfidaUpdateMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SfidaUpdateMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_lat=r.double();break;case 2:m.player_lng=r.double();break;case 3:m.metrics_update=$root.POGOProtos.Data.Sfida.SfidaMetricsUpdate.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};SfidaUpdateMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SfidaUpdateMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SfidaUpdateMessage;if(d.player_lat!=null){m.player_lat=Number(d.player_lat)}if(d.player_lng!=null){m.player_lng=Number(d.player_lng)}if(d.metrics_update!=null){if(typeof d.metrics_update!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.SfidaUpdateMessage.metrics_update: object expected");m.metrics_update=$root.POGOProtos.Data.Sfida.SfidaMetricsUpdate.fromObject(d.metrics_update)}return m};SfidaUpdateMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_lat=0;d.player_lng=0;d.metrics_update=null}if(m.player_lat!=null&&m.hasOwnProperty("player_lat")){d.player_lat=o.json&&!isFinite(m.player_lat)?String(m.player_lat):m.player_lat}if(m.player_lng!=null&&m.hasOwnProperty("player_lng")){d.player_lng=o.json&&!isFinite(m.player_lng)?String(m.player_lng):m.player_lng}if(m.metrics_update!=null&&m.hasOwnProperty("metrics_update")){d.metrics_update=$root.POGOProtos.Data.Sfida.SfidaMetricsUpdate.toObject(m.metrics_update,o)}return d};SfidaUpdateMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SfidaUpdateMessage}();Messages.ShareExRaidPassMessage=function(){function ShareExRaidPassMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ShareExRaidPassMessage.prototype.friend_id="";ShareExRaidPassMessage.prototype.fort_id="";ShareExRaidPassMessage.prototype.raid_seed=$util.Long?$util.Long.fromBits(0,0,false):0;ShareExRaidPassMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.friend_id!=null&&m.hasOwnProperty("friend_id"))w.uint32(10).string(m.friend_id);if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(18).string(m.fort_id);if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed"))w.uint32(24).int64(m.raid_seed);return w};ShareExRaidPassMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.ShareExRaidPassMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.friend_id=r.string();break;case 2:m.fort_id=r.string();break;case 3:m.raid_seed=r.int64();break;default:r.skipType(t&7);break}}return m};ShareExRaidPassMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.ShareExRaidPassMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.ShareExRaidPassMessage;if(d.friend_id!=null){m.friend_id=String(d.friend_id)}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.raid_seed!=null){if($util.Long)(m.raid_seed=$util.Long.fromValue(d.raid_seed)).unsigned=false;else if(typeof d.raid_seed==="string")m.raid_seed=parseInt(d.raid_seed,10);else if(typeof d.raid_seed==="number")m.raid_seed=d.raid_seed;else if(typeof d.raid_seed==="object")m.raid_seed=new $util.LongBits(d.raid_seed.low>>>0,d.raid_seed.high>>>0).toNumber()}return m};ShareExRaidPassMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.friend_id="";d.fort_id="";if($util.Long){var n=new $util.Long(0,0,false);d.raid_seed=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_seed=o.longs===String?"0":0}if(m.friend_id!=null&&m.hasOwnProperty("friend_id")){d.friend_id=m.friend_id}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed")){if(typeof m.raid_seed==="number")d.raid_seed=o.longs===String?String(m.raid_seed):m.raid_seed;else d.raid_seed=o.longs===String?$util.Long.prototype.toString.call(m.raid_seed):o.longs===Number?new $util.LongBits(m.raid_seed.low>>>0,m.raid_seed.high>>>0).toNumber():m.raid_seed}return d};ShareExRaidPassMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ShareExRaidPassMessage}();Messages.StartGymBattleMessage=function(){function StartGymBattleMessage(p){this.attacking_pokemon_ids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}StartGymBattleMessage.prototype.gym_id="";StartGymBattleMessage.prototype.attacking_pokemon_ids=$util.emptyArray;StartGymBattleMessage.prototype.defending_pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;StartGymBattleMessage.prototype.player_latitude=0;StartGymBattleMessage.prototype.player_longitude=0;StartGymBattleMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(10).string(m.gym_id);if(m.attacking_pokemon_ids!=null&&m.attacking_pokemon_ids.length){w.uint32(18).fork();for(var i=0;i<m.attacking_pokemon_ids.length;++i)w.fixed64(m.attacking_pokemon_ids[i]);w.ldelim()}if(m.defending_pokemon_id!=null&&m.hasOwnProperty("defending_pokemon_id"))w.uint32(25).fixed64(m.defending_pokemon_id);if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude"))w.uint32(33).double(m.player_latitude);if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude"))w.uint32(41).double(m.player_longitude);return w};StartGymBattleMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.StartGymBattleMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gym_id=r.string();break;case 2:if(!(m.attacking_pokemon_ids&&m.attacking_pokemon_ids.length))m.attacking_pokemon_ids=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.attacking_pokemon_ids.push(r.fixed64())}else m.attacking_pokemon_ids.push(r.fixed64());break;case 3:m.defending_pokemon_id=r.fixed64();break;case 4:m.player_latitude=r.double();break;case 5:m.player_longitude=r.double();break;default:r.skipType(t&7);break}}return m};StartGymBattleMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.StartGymBattleMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.StartGymBattleMessage;if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.attacking_pokemon_ids){if(!Array.isArray(d.attacking_pokemon_ids))throw TypeError(".POGOProtos.Networking.Requests.Messages.StartGymBattleMessage.attacking_pokemon_ids: array expected");m.attacking_pokemon_ids=[];for(var i=0;i<d.attacking_pokemon_ids.length;++i){if($util.Long)(m.attacking_pokemon_ids[i]=$util.Long.fromValue(d.attacking_pokemon_ids[i])).unsigned=false;else if(typeof d.attacking_pokemon_ids[i]==="string")m.attacking_pokemon_ids[i]=parseInt(d.attacking_pokemon_ids[i],10);else if(typeof d.attacking_pokemon_ids[i]==="number")m.attacking_pokemon_ids[i]=d.attacking_pokemon_ids[i];else if(typeof d.attacking_pokemon_ids[i]==="object")m.attacking_pokemon_ids[i]=new $util.LongBits(d.attacking_pokemon_ids[i].low>>>0,d.attacking_pokemon_ids[i].high>>>0).toNumber()}}if(d.defending_pokemon_id!=null){if($util.Long)(m.defending_pokemon_id=$util.Long.fromValue(d.defending_pokemon_id)).unsigned=false;else if(typeof d.defending_pokemon_id==="string")m.defending_pokemon_id=parseInt(d.defending_pokemon_id,10);else if(typeof d.defending_pokemon_id==="number")m.defending_pokemon_id=d.defending_pokemon_id;else if(typeof d.defending_pokemon_id==="object")m.defending_pokemon_id=new $util.LongBits(d.defending_pokemon_id.low>>>0,d.defending_pokemon_id.high>>>0).toNumber()}if(d.player_latitude!=null){m.player_latitude=Number(d.player_latitude)}if(d.player_longitude!=null){m.player_longitude=Number(d.player_longitude)}return m};StartGymBattleMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.attacking_pokemon_ids=[]}if(o.defaults){d.gym_id="";if($util.Long){var n=new $util.Long(0,0,false);d.defending_pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.defending_pokemon_id=o.longs===String?"0":0;d.player_latitude=0;d.player_longitude=0}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.attacking_pokemon_ids&&m.attacking_pokemon_ids.length){d.attacking_pokemon_ids=[];for(var j=0;j<m.attacking_pokemon_ids.length;++j){if(typeof m.attacking_pokemon_ids[j]==="number")d.attacking_pokemon_ids[j]=o.longs===String?String(m.attacking_pokemon_ids[j]):m.attacking_pokemon_ids[j];else d.attacking_pokemon_ids[j]=o.longs===String?$util.Long.prototype.toString.call(m.attacking_pokemon_ids[j]):o.longs===Number?new $util.LongBits(m.attacking_pokemon_ids[j].low>>>0,m.attacking_pokemon_ids[j].high>>>0).toNumber():m.attacking_pokemon_ids[j]}}if(m.defending_pokemon_id!=null&&m.hasOwnProperty("defending_pokemon_id")){if(typeof m.defending_pokemon_id==="number")d.defending_pokemon_id=o.longs===String?String(m.defending_pokemon_id):m.defending_pokemon_id;else d.defending_pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.defending_pokemon_id):o.longs===Number?new $util.LongBits(m.defending_pokemon_id.low>>>0,m.defending_pokemon_id.high>>>0).toNumber():m.defending_pokemon_id}if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude")){d.player_latitude=o.json&&!isFinite(m.player_latitude)?String(m.player_latitude):m.player_latitude}if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude")){d.player_longitude=o.json&&!isFinite(m.player_longitude)?String(m.player_longitude):m.player_longitude}return d};StartGymBattleMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return StartGymBattleMessage}();Messages.StartRaidBattleMessage=function(){function StartRaidBattleMessage(p){this.lobby_id=[];this.attacking_pokemon_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}StartRaidBattleMessage.prototype.gym_id="";StartRaidBattleMessage.prototype.raid_seed=$util.Long?$util.Long.fromBits(0,0,false):0;StartRaidBattleMessage.prototype.lobby_id=$util.emptyArray;StartRaidBattleMessage.prototype.attacking_pokemon_id=$util.emptyArray;StartRaidBattleMessage.prototype.player_lat_degrees=0;StartRaidBattleMessage.prototype.player_lng_degrees=0;StartRaidBattleMessage.prototype.gym_lat_degrees=0;StartRaidBattleMessage.prototype.gym_lng_degrees=0;StartRaidBattleMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(10).string(m.gym_id);if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed"))w.uint32(16).int64(m.raid_seed);if(m.lobby_id!=null&&m.lobby_id.length){w.uint32(34).fork();for(var i=0;i<m.lobby_id.length;++i)w.int32(m.lobby_id[i]);w.ldelim()}if(m.attacking_pokemon_id!=null&&m.attacking_pokemon_id.length){w.uint32(42).fork();for(var i=0;i<m.attacking_pokemon_id.length;++i)w.fixed64(m.attacking_pokemon_id[i]);w.ldelim()}if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees"))w.uint32(49).double(m.player_lat_degrees);if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees"))w.uint32(57).double(m.player_lng_degrees);if(m.gym_lat_degrees!=null&&m.hasOwnProperty("gym_lat_degrees"))w.uint32(65).double(m.gym_lat_degrees);if(m.gym_lng_degrees!=null&&m.hasOwnProperty("gym_lng_degrees"))w.uint32(73).double(m.gym_lng_degrees);return w};StartRaidBattleMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.StartRaidBattleMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gym_id=r.string();break;case 2:m.raid_seed=r.int64();break;case 4:if(!(m.lobby_id&&m.lobby_id.length))m.lobby_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.lobby_id.push(r.int32())}else m.lobby_id.push(r.int32());break;case 5:if(!(m.attacking_pokemon_id&&m.attacking_pokemon_id.length))m.attacking_pokemon_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.attacking_pokemon_id.push(r.fixed64())}else m.attacking_pokemon_id.push(r.fixed64());break;case 6:m.player_lat_degrees=r.double();break;case 7:m.player_lng_degrees=r.double();break;case 8:m.gym_lat_degrees=r.double();break;case 9:m.gym_lng_degrees=r.double();break;default:r.skipType(t&7);break}}return m};StartRaidBattleMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.StartRaidBattleMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.StartRaidBattleMessage;if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.raid_seed!=null){if($util.Long)(m.raid_seed=$util.Long.fromValue(d.raid_seed)).unsigned=false;else if(typeof d.raid_seed==="string")m.raid_seed=parseInt(d.raid_seed,10);else if(typeof d.raid_seed==="number")m.raid_seed=d.raid_seed;else if(typeof d.raid_seed==="object")m.raid_seed=new $util.LongBits(d.raid_seed.low>>>0,d.raid_seed.high>>>0).toNumber()}if(d.lobby_id){if(!Array.isArray(d.lobby_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.StartRaidBattleMessage.lobby_id: array expected");m.lobby_id=[];for(var i=0;i<d.lobby_id.length;++i){m.lobby_id[i]=d.lobby_id[i]|0}}if(d.attacking_pokemon_id){if(!Array.isArray(d.attacking_pokemon_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.StartRaidBattleMessage.attacking_pokemon_id: array expected");m.attacking_pokemon_id=[];for(var i=0;i<d.attacking_pokemon_id.length;++i){if($util.Long)(m.attacking_pokemon_id[i]=$util.Long.fromValue(d.attacking_pokemon_id[i])).unsigned=false;else if(typeof d.attacking_pokemon_id[i]==="string")m.attacking_pokemon_id[i]=parseInt(d.attacking_pokemon_id[i],10);else if(typeof d.attacking_pokemon_id[i]==="number")m.attacking_pokemon_id[i]=d.attacking_pokemon_id[i];else if(typeof d.attacking_pokemon_id[i]==="object")m.attacking_pokemon_id[i]=new $util.LongBits(d.attacking_pokemon_id[i].low>>>0,d.attacking_pokemon_id[i].high>>>0).toNumber()}}if(d.player_lat_degrees!=null){m.player_lat_degrees=Number(d.player_lat_degrees)}if(d.player_lng_degrees!=null){m.player_lng_degrees=Number(d.player_lng_degrees)}if(d.gym_lat_degrees!=null){m.gym_lat_degrees=Number(d.gym_lat_degrees)}if(d.gym_lng_degrees!=null){m.gym_lng_degrees=Number(d.gym_lng_degrees)}return m};StartRaidBattleMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.lobby_id=[];d.attacking_pokemon_id=[]}if(o.defaults){d.gym_id="";if($util.Long){var n=new $util.Long(0,0,false);d.raid_seed=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.raid_seed=o.longs===String?"0":0;d.player_lat_degrees=0;d.player_lng_degrees=0;d.gym_lat_degrees=0;d.gym_lng_degrees=0}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.raid_seed!=null&&m.hasOwnProperty("raid_seed")){if(typeof m.raid_seed==="number")d.raid_seed=o.longs===String?String(m.raid_seed):m.raid_seed;else d.raid_seed=o.longs===String?$util.Long.prototype.toString.call(m.raid_seed):o.longs===Number?new $util.LongBits(m.raid_seed.low>>>0,m.raid_seed.high>>>0).toNumber():m.raid_seed}if(m.lobby_id&&m.lobby_id.length){d.lobby_id=[];for(var j=0;j<m.lobby_id.length;++j){d.lobby_id[j]=m.lobby_id[j]}}if(m.attacking_pokemon_id&&m.attacking_pokemon_id.length){d.attacking_pokemon_id=[];for(var j=0;j<m.attacking_pokemon_id.length;++j){if(typeof m.attacking_pokemon_id[j]==="number")d.attacking_pokemon_id[j]=o.longs===String?String(m.attacking_pokemon_id[j]):m.attacking_pokemon_id[j];else d.attacking_pokemon_id[j]=o.longs===String?$util.Long.prototype.toString.call(m.attacking_pokemon_id[j]):o.longs===Number?new $util.LongBits(m.attacking_pokemon_id[j].low>>>0,m.attacking_pokemon_id[j].high>>>0).toNumber():m.attacking_pokemon_id[j]}}if(m.player_lat_degrees!=null&&m.hasOwnProperty("player_lat_degrees")){d.player_lat_degrees=o.json&&!isFinite(m.player_lat_degrees)?String(m.player_lat_degrees):m.player_lat_degrees}if(m.player_lng_degrees!=null&&m.hasOwnProperty("player_lng_degrees")){d.player_lng_degrees=o.json&&!isFinite(m.player_lng_degrees)?String(m.player_lng_degrees):m.player_lng_degrees}if(m.gym_lat_degrees!=null&&m.hasOwnProperty("gym_lat_degrees")){d.gym_lat_degrees=o.json&&!isFinite(m.gym_lat_degrees)?String(m.gym_lat_degrees):m.gym_lat_degrees}if(m.gym_lng_degrees!=null&&m.hasOwnProperty("gym_lng_degrees")){d.gym_lng_degrees=o.json&&!isFinite(m.gym_lng_degrees)?String(m.gym_lng_degrees):m.gym_lng_degrees}return d};StartRaidBattleMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return StartRaidBattleMessage}();Messages.StartTutorialActionMessage=function(){function StartTutorialActionMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}StartTutorialActionMessage.prototype.onboarding_v2_enabled=false;StartTutorialActionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.onboarding_v2_enabled!=null&&m.hasOwnProperty("onboarding_v2_enabled"))w.uint32(8).bool(m.onboarding_v2_enabled);return w};StartTutorialActionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.StartTutorialActionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.onboarding_v2_enabled=r.bool();break;default:r.skipType(t&7);break}}return m};StartTutorialActionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.StartTutorialActionMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.StartTutorialActionMessage;if(d.onboarding_v2_enabled!=null){m.onboarding_v2_enabled=Boolean(d.onboarding_v2_enabled)}return m};StartTutorialActionMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.onboarding_v2_enabled=false}if(m.onboarding_v2_enabled!=null&&m.hasOwnProperty("onboarding_v2_enabled")){d.onboarding_v2_enabled=m.onboarding_v2_enabled}return d};StartTutorialActionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return StartTutorialActionMessage}();Messages.SubmitCombatChallengePokemonsMessage=function(){function SubmitCombatChallengePokemonsMessage(p){this.attacking_pokemon_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SubmitCombatChallengePokemonsMessage.prototype.challenge_id="";SubmitCombatChallengePokemonsMessage.prototype.attacking_pokemon_id=$util.emptyArray;SubmitCombatChallengePokemonsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id"))w.uint32(10).string(m.challenge_id);if(m.attacking_pokemon_id!=null&&m.attacking_pokemon_id.length){w.uint32(18).fork();for(var i=0;i<m.attacking_pokemon_id.length;++i)w.fixed64(m.attacking_pokemon_id[i]);w.ldelim()}return w};SubmitCombatChallengePokemonsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.SubmitCombatChallengePokemonsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.challenge_id=r.string();break;case 2:if(!(m.attacking_pokemon_id&&m.attacking_pokemon_id.length))m.attacking_pokemon_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.attacking_pokemon_id.push(r.fixed64())}else m.attacking_pokemon_id.push(r.fixed64());break;default:r.skipType(t&7);break}}return m};SubmitCombatChallengePokemonsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.SubmitCombatChallengePokemonsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.SubmitCombatChallengePokemonsMessage;if(d.challenge_id!=null){m.challenge_id=String(d.challenge_id)}if(d.attacking_pokemon_id){if(!Array.isArray(d.attacking_pokemon_id))throw TypeError(".POGOProtos.Networking.Requests.Messages.SubmitCombatChallengePokemonsMessage.attacking_pokemon_id: array expected");m.attacking_pokemon_id=[];for(var i=0;i<d.attacking_pokemon_id.length;++i){if($util.Long)(m.attacking_pokemon_id[i]=$util.Long.fromValue(d.attacking_pokemon_id[i])).unsigned=false;else if(typeof d.attacking_pokemon_id[i]==="string")m.attacking_pokemon_id[i]=parseInt(d.attacking_pokemon_id[i],10);else if(typeof d.attacking_pokemon_id[i]==="number")m.attacking_pokemon_id[i]=d.attacking_pokemon_id[i];else if(typeof d.attacking_pokemon_id[i]==="object")m.attacking_pokemon_id[i]=new $util.LongBits(d.attacking_pokemon_id[i].low>>>0,d.attacking_pokemon_id[i].high>>>0).toNumber()}}return m};SubmitCombatChallengePokemonsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.attacking_pokemon_id=[]}if(o.defaults){d.challenge_id=""}if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id")){d.challenge_id=m.challenge_id}if(m.attacking_pokemon_id&&m.attacking_pokemon_id.length){d.attacking_pokemon_id=[];for(var j=0;j<m.attacking_pokemon_id.length;++j){if(typeof m.attacking_pokemon_id[j]==="number")d.attacking_pokemon_id[j]=o.longs===String?String(m.attacking_pokemon_id[j]):m.attacking_pokemon_id[j];else d.attacking_pokemon_id[j]=o.longs===String?$util.Long.prototype.toString.call(m.attacking_pokemon_id[j]):o.longs===Number?new $util.LongBits(m.attacking_pokemon_id[j].low>>>0,m.attacking_pokemon_id[j].high>>>0).toNumber():m.attacking_pokemon_id[j]}}return d};SubmitCombatChallengePokemonsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SubmitCombatChallengePokemonsMessage}();Messages.UnlockSpecialMoveMessage=function(){function UnlockSpecialMoveMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UnlockSpecialMoveMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;UnlockSpecialMoveMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(9).fixed64(m.pokemon_id);return w};UnlockSpecialMoveMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UnlockSpecialMoveMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.fixed64();break;default:r.skipType(t&7);break}}return m};UnlockSpecialMoveMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UnlockSpecialMoveMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UnlockSpecialMoveMessage;if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}return m};UnlockSpecialMoveMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}return d};UnlockSpecialMoveMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UnlockSpecialMoveMessage}();Messages.UpdateCombatMessage=function(){function UpdateCombatMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateCombatMessage.prototype.combat_id="";UpdateCombatMessage.prototype.action=null;UpdateCombatMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.combat_id!=null&&m.hasOwnProperty("combat_id"))w.uint32(10).string(m.combat_id);if(m.action!=null&&m.hasOwnProperty("action"))$root.POGOProtos.Data.Combat.CombatAction.encode(m.action,w.uint32(18).fork()).ldelim();return w};UpdateCombatMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UpdateCombatMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.combat_id=r.string();break;case 2:m.action=$root.POGOProtos.Data.Combat.CombatAction.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};UpdateCombatMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UpdateCombatMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UpdateCombatMessage;if(d.combat_id!=null){m.combat_id=String(d.combat_id)}if(d.action!=null){if(typeof d.action!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.UpdateCombatMessage.action: object expected");m.action=$root.POGOProtos.Data.Combat.CombatAction.fromObject(d.action)}return m};UpdateCombatMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.combat_id="";d.action=null}if(m.combat_id!=null&&m.hasOwnProperty("combat_id")){d.combat_id=m.combat_id}if(m.action!=null&&m.hasOwnProperty("action")){d.action=$root.POGOProtos.Data.Combat.CombatAction.toObject(m.action,o)}return d};UpdateCombatMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UpdateCombatMessage}();Messages.UpdateFitnessMetricsMessage=function(){function UpdateFitnessMetricsMessage(p){this.fitness_samples=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateFitnessMetricsMessage.prototype.fitness_samples=$util.emptyArray;UpdateFitnessMetricsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fitness_samples!=null&&m.fitness_samples.length){for(var i=0;i<m.fitness_samples.length;++i)$root.POGOProtos.Data.Fitness.FitnessSample.encode(m.fitness_samples[i],w.uint32(10).fork()).ldelim()}return w};UpdateFitnessMetricsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UpdateFitnessMetricsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.fitness_samples&&m.fitness_samples.length))m.fitness_samples=[];m.fitness_samples.push($root.POGOProtos.Data.Fitness.FitnessSample.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};UpdateFitnessMetricsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UpdateFitnessMetricsMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UpdateFitnessMetricsMessage;if(d.fitness_samples){if(!Array.isArray(d.fitness_samples))throw TypeError(".POGOProtos.Networking.Requests.Messages.UpdateFitnessMetricsMessage.fitness_samples: array expected");m.fitness_samples=[];for(var i=0;i<d.fitness_samples.length;++i){if(typeof d.fitness_samples[i]!=="object")throw TypeError(".POGOProtos.Networking.Requests.Messages.UpdateFitnessMetricsMessage.fitness_samples: object expected");m.fitness_samples[i]=$root.POGOProtos.Data.Fitness.FitnessSample.fromObject(d.fitness_samples[i])}}return m};UpdateFitnessMetricsMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.fitness_samples=[]}if(m.fitness_samples&&m.fitness_samples.length){d.fitness_samples=[];for(var j=0;j<m.fitness_samples.length;++j){d.fitness_samples[j]=$root.POGOProtos.Data.Fitness.FitnessSample.toObject(m.fitness_samples[j],o)}}return d};UpdateFitnessMetricsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UpdateFitnessMetricsMessage}();Messages.UpdatePlayerLocationMessage=function(){function UpdatePlayerLocationMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdatePlayerLocationMessage.prototype.geofence_identifier="";UpdatePlayerLocationMessage.prototype.reason=0;UpdatePlayerLocationMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.geofence_identifier!=null&&m.hasOwnProperty("geofence_identifier"))w.uint32(10).string(m.geofence_identifier);if(m.reason!=null&&m.hasOwnProperty("reason"))w.uint32(16).int32(m.reason);return w};UpdatePlayerLocationMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UpdatePlayerLocationMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.geofence_identifier=r.string();break;case 2:m.reason=r.int32();break;default:r.skipType(t&7);break}}return m};UpdatePlayerLocationMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UpdatePlayerLocationMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UpdatePlayerLocationMessage;if(d.geofence_identifier!=null){m.geofence_identifier=String(d.geofence_identifier)}switch(d.reason){case"UNSET":case 0:m.reason=0;break;case"ENTRANCE_EVENT":case 1:m.reason=1;break;case"EXIT_EVENT":case 2:m.reason=2;break;case"DWELL_EVENT":case 3:m.reason=3;break;case"VISIT_EVENT":case 4:m.reason=4;break;case"FITNESS_WAKEUP":case 5:m.reason=5;break;case"OTHER_WAKEUP":case 6:m.reason=6;break}return m};UpdatePlayerLocationMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.geofence_identifier="";d.reason=o.enums===String?"UNSET":0}if(m.geofence_identifier!=null&&m.hasOwnProperty("geofence_identifier")){d.geofence_identifier=m.geofence_identifier}if(m.reason!=null&&m.hasOwnProperty("reason")){d.reason=o.enums===String?$root.POGOProtos.Networking.Requests.Messages.UpdatePlayerLocationMessage.PingReason[m.reason]:m.reason}return d};UpdatePlayerLocationMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdatePlayerLocationMessage.PingReason=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="ENTRANCE_EVENT"]=1;values[valuesById[2]="EXIT_EVENT"]=2;values[valuesById[3]="DWELL_EVENT"]=3;values[valuesById[4]="VISIT_EVENT"]=4;values[valuesById[5]="FITNESS_WAKEUP"]=5;values[valuesById[6]="OTHER_WAKEUP"]=6;return values}();return UpdatePlayerLocationMessage}();Messages.UpdateTradingMessage=function(){function UpdateTradingMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateTradingMessage.prototype.player_id="";UpdateTradingMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;UpdateTradingMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(17).fixed64(m.pokemon_id);return w};UpdateTradingMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UpdateTradingMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;case 2:m.pokemon_id=r.fixed64();break;default:r.skipType(t&7);break}}return m};UpdateTradingMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UpdateTradingMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UpdateTradingMessage;if(d.player_id!=null){m.player_id=String(d.player_id)}if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}return m};UpdateTradingMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id="";if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}return d};UpdateTradingMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UpdateTradingMessage}();Messages.UpgradePokemonMessage=function(){function UpgradePokemonMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpgradePokemonMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;UpgradePokemonMessage.prototype.preview=false;UpgradePokemonMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(9).fixed64(m.pokemon_id);if(m.preview!=null&&m.hasOwnProperty("preview"))w.uint32(16).bool(m.preview);return w};UpgradePokemonMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UpgradePokemonMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.fixed64();break;case 2:m.preview=r.bool();break;default:r.skipType(t&7);break}}return m};UpgradePokemonMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UpgradePokemonMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UpgradePokemonMessage;if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}if(d.preview!=null){m.preview=Boolean(d.preview)}return m};UpgradePokemonMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0;d.preview=false}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}if(m.preview!=null&&m.hasOwnProperty("preview")){d.preview=m.preview}return d};UpgradePokemonMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UpgradePokemonMessage}();Messages.UseIncenseMessage=function(){function UseIncenseMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseIncenseMessage.prototype.incense_type=0;UseIncenseMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.incense_type!=null&&m.hasOwnProperty("incense_type"))w.uint32(8).int32(m.incense_type);return w};UseIncenseMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UseIncenseMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.incense_type=r.int32();break;default:r.skipType(t&7);break}}return m};UseIncenseMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UseIncenseMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UseIncenseMessage;switch(d.incense_type){case"ITEM_UNKNOWN":case 0:m.incense_type=0;break;case"ITEM_POKE_BALL":case 1:m.incense_type=1;break;case"ITEM_GREAT_BALL":case 2:m.incense_type=2;break;case"ITEM_ULTRA_BALL":case 3:m.incense_type=3;break;case"ITEM_MASTER_BALL":case 4:m.incense_type=4;break;case"ITEM_PREMIER_BALL":case 5:m.incense_type=5;break;case"ITEM_POTION":case 101:m.incense_type=101;break;case"ITEM_SUPER_POTION":case 102:m.incense_type=102;break;case"ITEM_HYPER_POTION":case 103:m.incense_type=103;break;case"ITEM_MAX_POTION":case 104:m.incense_type=104;break;case"ITEM_REVIVE":case 201:m.incense_type=201;break;case"ITEM_MAX_REVIVE":case 202:m.incense_type=202;break;case"ITEM_LUCKY_EGG":case 301:m.incense_type=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.incense_type=401;break;case"ITEM_INCENSE_SPICY":case 402:m.incense_type=402;break;case"ITEM_INCENSE_COOL":case 403:m.incense_type=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.incense_type=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.incense_type=405;break;case"ITEM_TROY_DISK":case 501:m.incense_type=501;break;case"ITEM_X_ATTACK":case 602:m.incense_type=602;break;case"ITEM_X_DEFENSE":case 603:m.incense_type=603;break;case"ITEM_X_MIRACLE":case 604:m.incense_type=604;break;case"ITEM_RAZZ_BERRY":case 701:m.incense_type=701;break;case"ITEM_BLUK_BERRY":case 702:m.incense_type=702;break;case"ITEM_NANAB_BERRY":case 703:m.incense_type=703;break;case"ITEM_WEPAR_BERRY":case 704:m.incense_type=704;break;case"ITEM_PINAP_BERRY":case 705:m.incense_type=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.incense_type=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.incense_type=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.incense_type=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.incense_type=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.incense_type=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.incense_type=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.incense_type=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.incense_type=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.incense_type=1002;break;case"ITEM_SUN_STONE":case 1101:m.incense_type=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.incense_type=1102;break;case"ITEM_METAL_COAT":case 1103:m.incense_type=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.incense_type=1104;break;case"ITEM_UP_GRADE":case 1105:m.incense_type=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.incense_type=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.incense_type=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.incense_type=1202;break;case"ITEM_RARE_CANDY":case 1301:m.incense_type=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.incense_type=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.incense_type=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.incense_type=1403;break;case"ITEM_STAR_PIECE":case 1404:m.incense_type=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.incense_type=1405;break}return m};UseIncenseMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.incense_type=o.enums===String?"ITEM_UNKNOWN":0}if(m.incense_type!=null&&m.hasOwnProperty("incense_type")){d.incense_type=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.incense_type]:m.incense_type}return d};UseIncenseMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UseIncenseMessage}();Messages.UseItemCaptureMessage=function(){function UseItemCaptureMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemCaptureMessage.prototype.item_id=0;UseItemCaptureMessage.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,false):0;UseItemCaptureMessage.prototype.spawn_point_id="";UseItemCaptureMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(8).int32(m.item_id);if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(17).fixed64(m.encounter_id);if(m.spawn_point_id!=null&&m.hasOwnProperty("spawn_point_id"))w.uint32(26).string(m.spawn_point_id);return w};UseItemCaptureMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UseItemCaptureMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.int32();break;case 2:m.encounter_id=r.fixed64();break;case 3:m.spawn_point_id=r.string();break;default:r.skipType(t&7);break}}return m};UseItemCaptureMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UseItemCaptureMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UseItemCaptureMessage;switch(d.item_id){case"ITEM_UNKNOWN":case 0:m.item_id=0;break;case"ITEM_POKE_BALL":case 1:m.item_id=1;break;case"ITEM_GREAT_BALL":case 2:m.item_id=2;break;case"ITEM_ULTRA_BALL":case 3:m.item_id=3;break;case"ITEM_MASTER_BALL":case 4:m.item_id=4;break;case"ITEM_PREMIER_BALL":case 5:m.item_id=5;break;case"ITEM_POTION":case 101:m.item_id=101;break;case"ITEM_SUPER_POTION":case 102:m.item_id=102;break;case"ITEM_HYPER_POTION":case 103:m.item_id=103;break;case"ITEM_MAX_POTION":case 104:m.item_id=104;break;case"ITEM_REVIVE":case 201:m.item_id=201;break;case"ITEM_MAX_REVIVE":case 202:m.item_id=202;break;case"ITEM_LUCKY_EGG":case 301:m.item_id=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item_id=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item_id=402;break;case"ITEM_INCENSE_COOL":case 403:m.item_id=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item_id=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item_id=405;break;case"ITEM_TROY_DISK":case 501:m.item_id=501;break;case"ITEM_X_ATTACK":case 602:m.item_id=602;break;case"ITEM_X_DEFENSE":case 603:m.item_id=603;break;case"ITEM_X_MIRACLE":case 604:m.item_id=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item_id=701;break;case"ITEM_BLUK_BERRY":case 702:m.item_id=702;break;case"ITEM_NANAB_BERRY":case 703:m.item_id=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item_id=704;break;case"ITEM_PINAP_BERRY":case 705:m.item_id=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item_id=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item_id=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item_id=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item_id=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item_id=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item_id=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item_id=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item_id=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item_id=1002;break;case"ITEM_SUN_STONE":case 1101:m.item_id=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item_id=1102;break;case"ITEM_METAL_COAT":case 1103:m.item_id=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item_id=1104;break;case"ITEM_UP_GRADE":case 1105:m.item_id=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item_id=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item_id=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item_id=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item_id=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item_id=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item_id=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item_id=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item_id=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item_id=1405;break}if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=false;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber()}if(d.spawn_point_id!=null){m.spawn_point_id=String(d.spawn_point_id)}return m};UseItemCaptureMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id=o.enums===String?"ITEM_UNKNOWN":0;if($util.Long){var n=new $util.Long(0,0,false);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0;d.spawn_point_id=""}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item_id]:m.item_id}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber():m.encounter_id}if(m.spawn_point_id!=null&&m.hasOwnProperty("spawn_point_id")){d.spawn_point_id=m.spawn_point_id}return d};UseItemCaptureMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UseItemCaptureMessage}();Messages.UseItemEggIncubatorMessage=function(){function UseItemEggIncubatorMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemEggIncubatorMessage.prototype.item_id="";UseItemEggIncubatorMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,true):0;UseItemEggIncubatorMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(10).string(m.item_id);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(16).uint64(m.pokemon_id);return w};UseItemEggIncubatorMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UseItemEggIncubatorMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.string();break;case 2:m.pokemon_id=r.uint64();break;default:r.skipType(t&7);break}}return m};UseItemEggIncubatorMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UseItemEggIncubatorMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UseItemEggIncubatorMessage;if(d.item_id!=null){m.item_id=String(d.item_id)}if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=true;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber(true)}return m};UseItemEggIncubatorMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id="";if($util.Long){var n=new $util.Long(0,0,true);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=m.item_id}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber(true):m.pokemon_id}return d};UseItemEggIncubatorMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UseItemEggIncubatorMessage}();Messages.UseItemEncounterMessage=function(){function UseItemEncounterMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemEncounterMessage.prototype.item=0;UseItemEncounterMessage.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,false):0;UseItemEncounterMessage.prototype.spawn_point_guid="";UseItemEncounterMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item!=null&&m.hasOwnProperty("item"))w.uint32(8).int32(m.item);if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(17).fixed64(m.encounter_id);if(m.spawn_point_guid!=null&&m.hasOwnProperty("spawn_point_guid"))w.uint32(26).string(m.spawn_point_guid);return w};UseItemEncounterMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UseItemEncounterMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item=r.int32();break;case 2:m.encounter_id=r.fixed64();break;case 3:m.spawn_point_guid=r.string();break;default:r.skipType(t&7);break}}return m};UseItemEncounterMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UseItemEncounterMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UseItemEncounterMessage;switch(d.item){case"ITEM_UNKNOWN":case 0:m.item=0;break;case"ITEM_POKE_BALL":case 1:m.item=1;break;case"ITEM_GREAT_BALL":case 2:m.item=2;break;case"ITEM_ULTRA_BALL":case 3:m.item=3;break;case"ITEM_MASTER_BALL":case 4:m.item=4;break;case"ITEM_PREMIER_BALL":case 5:m.item=5;break;case"ITEM_POTION":case 101:m.item=101;break;case"ITEM_SUPER_POTION":case 102:m.item=102;break;case"ITEM_HYPER_POTION":case 103:m.item=103;break;case"ITEM_MAX_POTION":case 104:m.item=104;break;case"ITEM_REVIVE":case 201:m.item=201;break;case"ITEM_MAX_REVIVE":case 202:m.item=202;break;case"ITEM_LUCKY_EGG":case 301:m.item=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item=402;break;case"ITEM_INCENSE_COOL":case 403:m.item=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item=405;break;case"ITEM_TROY_DISK":case 501:m.item=501;break;case"ITEM_X_ATTACK":case 602:m.item=602;break;case"ITEM_X_DEFENSE":case 603:m.item=603;break;case"ITEM_X_MIRACLE":case 604:m.item=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item=701;break;case"ITEM_BLUK_BERRY":case 702:m.item=702;break;case"ITEM_NANAB_BERRY":case 703:m.item=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item=704;break;case"ITEM_PINAP_BERRY":case 705:m.item=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item=1002;break;case"ITEM_SUN_STONE":case 1101:m.item=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item=1102;break;case"ITEM_METAL_COAT":case 1103:m.item=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item=1104;break;case"ITEM_UP_GRADE":case 1105:m.item=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item=1405;break}if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=false;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber()}if(d.spawn_point_guid!=null){m.spawn_point_guid=String(d.spawn_point_guid)}return m};UseItemEncounterMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item=o.enums===String?"ITEM_UNKNOWN":0;if($util.Long){var n=new $util.Long(0,0,false);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0;d.spawn_point_guid=""}if(m.item!=null&&m.hasOwnProperty("item")){d.item=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item]:m.item}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber():m.encounter_id}if(m.spawn_point_guid!=null&&m.hasOwnProperty("spawn_point_guid")){d.spawn_point_guid=m.spawn_point_guid}return d};UseItemEncounterMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UseItemEncounterMessage}();Messages.UseItemGymMessage=function(){function UseItemGymMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemGymMessage.prototype.item_id=0;UseItemGymMessage.prototype.gym_id="";UseItemGymMessage.prototype.player_latitude=0;UseItemGymMessage.prototype.player_longitude=0;UseItemGymMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(8).int32(m.item_id);if(m.gym_id!=null&&m.hasOwnProperty("gym_id"))w.uint32(18).string(m.gym_id);if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude"))w.uint32(25).double(m.player_latitude);if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude"))w.uint32(33).double(m.player_longitude);return w};UseItemGymMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UseItemGymMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.int32();break;case 2:m.gym_id=r.string();break;case 3:m.player_latitude=r.double();break;case 4:m.player_longitude=r.double();break;default:r.skipType(t&7);break}}return m};UseItemGymMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UseItemGymMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UseItemGymMessage;switch(d.item_id){case"ITEM_UNKNOWN":case 0:m.item_id=0;break;case"ITEM_POKE_BALL":case 1:m.item_id=1;break;case"ITEM_GREAT_BALL":case 2:m.item_id=2;break;case"ITEM_ULTRA_BALL":case 3:m.item_id=3;break;case"ITEM_MASTER_BALL":case 4:m.item_id=4;break;case"ITEM_PREMIER_BALL":case 5:m.item_id=5;break;case"ITEM_POTION":case 101:m.item_id=101;break;case"ITEM_SUPER_POTION":case 102:m.item_id=102;break;case"ITEM_HYPER_POTION":case 103:m.item_id=103;break;case"ITEM_MAX_POTION":case 104:m.item_id=104;break;case"ITEM_REVIVE":case 201:m.item_id=201;break;case"ITEM_MAX_REVIVE":case 202:m.item_id=202;break;case"ITEM_LUCKY_EGG":case 301:m.item_id=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item_id=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item_id=402;break;case"ITEM_INCENSE_COOL":case 403:m.item_id=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item_id=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item_id=405;break;case"ITEM_TROY_DISK":case 501:m.item_id=501;break;case"ITEM_X_ATTACK":case 602:m.item_id=602;break;case"ITEM_X_DEFENSE":case 603:m.item_id=603;break;case"ITEM_X_MIRACLE":case 604:m.item_id=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item_id=701;break;case"ITEM_BLUK_BERRY":case 702:m.item_id=702;break;case"ITEM_NANAB_BERRY":case 703:m.item_id=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item_id=704;break;case"ITEM_PINAP_BERRY":case 705:m.item_id=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item_id=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item_id=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item_id=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item_id=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item_id=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item_id=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item_id=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item_id=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item_id=1002;break;case"ITEM_SUN_STONE":case 1101:m.item_id=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item_id=1102;break;case"ITEM_METAL_COAT":case 1103:m.item_id=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item_id=1104;break;case"ITEM_UP_GRADE":case 1105:m.item_id=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item_id=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item_id=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item_id=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item_id=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item_id=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item_id=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item_id=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item_id=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item_id=1405;break}if(d.gym_id!=null){m.gym_id=String(d.gym_id)}if(d.player_latitude!=null){m.player_latitude=Number(d.player_latitude)}if(d.player_longitude!=null){m.player_longitude=Number(d.player_longitude)}return m};UseItemGymMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id=o.enums===String?"ITEM_UNKNOWN":0;d.gym_id="";d.player_latitude=0;d.player_longitude=0}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item_id]:m.item_id}if(m.gym_id!=null&&m.hasOwnProperty("gym_id")){d.gym_id=m.gym_id}if(m.player_latitude!=null&&m.hasOwnProperty("player_latitude")){d.player_latitude=o.json&&!isFinite(m.player_latitude)?String(m.player_latitude):m.player_latitude}if(m.player_longitude!=null&&m.hasOwnProperty("player_longitude")){d.player_longitude=o.json&&!isFinite(m.player_longitude)?String(m.player_longitude):m.player_longitude}return d};UseItemGymMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UseItemGymMessage}();Messages.UseItemMoveRerollMessage=function(){function UseItemMoveRerollMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemMoveRerollMessage.prototype.item_id=0;UseItemMoveRerollMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;UseItemMoveRerollMessage.prototype.reroll_unlocked_move=false;UseItemMoveRerollMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(8).int32(m.item_id);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(17).fixed64(m.pokemon_id);if(m.reroll_unlocked_move!=null&&m.hasOwnProperty("reroll_unlocked_move"))w.uint32(24).bool(m.reroll_unlocked_move);return w};UseItemMoveRerollMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UseItemMoveRerollMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.int32();break;case 2:m.pokemon_id=r.fixed64();break;case 3:m.reroll_unlocked_move=r.bool();break;default:r.skipType(t&7);break}}return m};UseItemMoveRerollMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UseItemMoveRerollMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UseItemMoveRerollMessage;switch(d.item_id){case"ITEM_UNKNOWN":case 0:m.item_id=0;break;case"ITEM_POKE_BALL":case 1:m.item_id=1;break;case"ITEM_GREAT_BALL":case 2:m.item_id=2;break;case"ITEM_ULTRA_BALL":case 3:m.item_id=3;break;case"ITEM_MASTER_BALL":case 4:m.item_id=4;break;case"ITEM_PREMIER_BALL":case 5:m.item_id=5;break;case"ITEM_POTION":case 101:m.item_id=101;break;case"ITEM_SUPER_POTION":case 102:m.item_id=102;break;case"ITEM_HYPER_POTION":case 103:m.item_id=103;break;case"ITEM_MAX_POTION":case 104:m.item_id=104;break;case"ITEM_REVIVE":case 201:m.item_id=201;break;case"ITEM_MAX_REVIVE":case 202:m.item_id=202;break;case"ITEM_LUCKY_EGG":case 301:m.item_id=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item_id=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item_id=402;break;case"ITEM_INCENSE_COOL":case 403:m.item_id=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item_id=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item_id=405;break;case"ITEM_TROY_DISK":case 501:m.item_id=501;break;case"ITEM_X_ATTACK":case 602:m.item_id=602;break;case"ITEM_X_DEFENSE":case 603:m.item_id=603;break;case"ITEM_X_MIRACLE":case 604:m.item_id=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item_id=701;break;case"ITEM_BLUK_BERRY":case 702:m.item_id=702;break;case"ITEM_NANAB_BERRY":case 703:m.item_id=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item_id=704;break;case"ITEM_PINAP_BERRY":case 705:m.item_id=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item_id=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item_id=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item_id=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item_id=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item_id=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item_id=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item_id=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item_id=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item_id=1002;break;case"ITEM_SUN_STONE":case 1101:m.item_id=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item_id=1102;break;case"ITEM_METAL_COAT":case 1103:m.item_id=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item_id=1104;break;case"ITEM_UP_GRADE":case 1105:m.item_id=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item_id=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item_id=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item_id=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item_id=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item_id=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item_id=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item_id=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item_id=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item_id=1405;break}if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}if(d.reroll_unlocked_move!=null){m.reroll_unlocked_move=Boolean(d.reroll_unlocked_move)}return m};UseItemMoveRerollMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id=o.enums===String?"ITEM_UNKNOWN":0;if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0;d.reroll_unlocked_move=false}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item_id]:m.item_id}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}if(m.reroll_unlocked_move!=null&&m.hasOwnProperty("reroll_unlocked_move")){d.reroll_unlocked_move=m.reroll_unlocked_move}return d};UseItemMoveRerollMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UseItemMoveRerollMessage}();Messages.UseItemPotionMessage=function(){function UseItemPotionMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemPotionMessage.prototype.item_id=0;UseItemPotionMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;UseItemPotionMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(8).int32(m.item_id);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(17).fixed64(m.pokemon_id);return w};UseItemPotionMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UseItemPotionMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.int32();break;case 2:m.pokemon_id=r.fixed64();break;default:r.skipType(t&7);break}}return m};UseItemPotionMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UseItemPotionMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UseItemPotionMessage;switch(d.item_id){case"ITEM_UNKNOWN":case 0:m.item_id=0;break;case"ITEM_POKE_BALL":case 1:m.item_id=1;break;case"ITEM_GREAT_BALL":case 2:m.item_id=2;break;case"ITEM_ULTRA_BALL":case 3:m.item_id=3;break;case"ITEM_MASTER_BALL":case 4:m.item_id=4;break;case"ITEM_PREMIER_BALL":case 5:m.item_id=5;break;case"ITEM_POTION":case 101:m.item_id=101;break;case"ITEM_SUPER_POTION":case 102:m.item_id=102;break;case"ITEM_HYPER_POTION":case 103:m.item_id=103;break;case"ITEM_MAX_POTION":case 104:m.item_id=104;break;case"ITEM_REVIVE":case 201:m.item_id=201;break;case"ITEM_MAX_REVIVE":case 202:m.item_id=202;break;case"ITEM_LUCKY_EGG":case 301:m.item_id=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item_id=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item_id=402;break;case"ITEM_INCENSE_COOL":case 403:m.item_id=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item_id=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item_id=405;break;case"ITEM_TROY_DISK":case 501:m.item_id=501;break;case"ITEM_X_ATTACK":case 602:m.item_id=602;break;case"ITEM_X_DEFENSE":case 603:m.item_id=603;break;case"ITEM_X_MIRACLE":case 604:m.item_id=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item_id=701;break;case"ITEM_BLUK_BERRY":case 702:m.item_id=702;break;case"ITEM_NANAB_BERRY":case 703:m.item_id=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item_id=704;break;case"ITEM_PINAP_BERRY":case 705:m.item_id=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item_id=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item_id=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item_id=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item_id=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item_id=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item_id=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item_id=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item_id=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item_id=1002;break;case"ITEM_SUN_STONE":case 1101:m.item_id=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item_id=1102;break;case"ITEM_METAL_COAT":case 1103:m.item_id=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item_id=1104;break;case"ITEM_UP_GRADE":case 1105:m.item_id=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item_id=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item_id=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item_id=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item_id=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item_id=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item_id=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item_id=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item_id=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item_id=1405;break}if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}return m};UseItemPotionMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id=o.enums===String?"ITEM_UNKNOWN":0;if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item_id]:m.item_id}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}return d};UseItemPotionMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UseItemPotionMessage}();Messages.UseItemRareCandyMessage=function(){function UseItemRareCandyMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemRareCandyMessage.prototype.item_id=0;UseItemRareCandyMessage.prototype.pokemon_id=0;UseItemRareCandyMessage.prototype.candy_count=0;UseItemRareCandyMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(8).int32(m.item_id);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(16).int32(m.pokemon_id);if(m.candy_count!=null&&m.hasOwnProperty("candy_count"))w.uint32(24).int32(m.candy_count);return w};UseItemRareCandyMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UseItemRareCandyMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.int32();break;case 2:m.pokemon_id=r.int32();break;case 3:m.candy_count=r.int32();break;default:r.skipType(t&7);break}}return m};UseItemRareCandyMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UseItemRareCandyMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UseItemRareCandyMessage;switch(d.item_id){case"ITEM_UNKNOWN":case 0:m.item_id=0;break;case"ITEM_POKE_BALL":case 1:m.item_id=1;break;case"ITEM_GREAT_BALL":case 2:m.item_id=2;break;case"ITEM_ULTRA_BALL":case 3:m.item_id=3;break;case"ITEM_MASTER_BALL":case 4:m.item_id=4;break;case"ITEM_PREMIER_BALL":case 5:m.item_id=5;break;case"ITEM_POTION":case 101:m.item_id=101;break;case"ITEM_SUPER_POTION":case 102:m.item_id=102;break;case"ITEM_HYPER_POTION":case 103:m.item_id=103;break;case"ITEM_MAX_POTION":case 104:m.item_id=104;break;case"ITEM_REVIVE":case 201:m.item_id=201;break;case"ITEM_MAX_REVIVE":case 202:m.item_id=202;break;case"ITEM_LUCKY_EGG":case 301:m.item_id=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item_id=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item_id=402;break;case"ITEM_INCENSE_COOL":case 403:m.item_id=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item_id=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item_id=405;break;case"ITEM_TROY_DISK":case 501:m.item_id=501;break;case"ITEM_X_ATTACK":case 602:m.item_id=602;break;case"ITEM_X_DEFENSE":case 603:m.item_id=603;break;case"ITEM_X_MIRACLE":case 604:m.item_id=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item_id=701;break;case"ITEM_BLUK_BERRY":case 702:m.item_id=702;break;case"ITEM_NANAB_BERRY":case 703:m.item_id=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item_id=704;break;case"ITEM_PINAP_BERRY":case 705:m.item_id=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item_id=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item_id=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item_id=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item_id=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item_id=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item_id=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item_id=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item_id=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item_id=1002;break;case"ITEM_SUN_STONE":case 1101:m.item_id=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item_id=1102;break;case"ITEM_METAL_COAT":case 1103:m.item_id=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item_id=1104;break;case"ITEM_UP_GRADE":case 1105:m.item_id=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item_id=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item_id=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item_id=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item_id=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item_id=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item_id=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item_id=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item_id=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item_id=1405;break}switch(d.pokemon_id){case"MISSINGNO":case 0:m.pokemon_id=0;break;case"BULBASAUR":case 1:m.pokemon_id=1;break;case"IVYSAUR":case 2:m.pokemon_id=2;break;case"VENUSAUR":case 3:m.pokemon_id=3;break;case"CHARMANDER":case 4:m.pokemon_id=4;break;case"CHARMELEON":case 5:m.pokemon_id=5;break;case"CHARIZARD":case 6:m.pokemon_id=6;break;case"SQUIRTLE":case 7:m.pokemon_id=7;break;case"WARTORTLE":case 8:m.pokemon_id=8;break;case"BLASTOISE":case 9:m.pokemon_id=9;break;case"CATERPIE":case 10:m.pokemon_id=10;break;case"METAPOD":case 11:m.pokemon_id=11;break;case"BUTTERFREE":case 12:m.pokemon_id=12;break;case"WEEDLE":case 13:m.pokemon_id=13;break;case"KAKUNA":case 14:m.pokemon_id=14;break;case"BEEDRILL":case 15:m.pokemon_id=15;break;case"PIDGEY":case 16:m.pokemon_id=16;break;case"PIDGEOTTO":case 17:m.pokemon_id=17;break;case"PIDGEOT":case 18:m.pokemon_id=18;break;case"RATTATA":case 19:m.pokemon_id=19;break;case"RATICATE":case 20:m.pokemon_id=20;break;case"SPEAROW":case 21:m.pokemon_id=21;break;case"FEAROW":case 22:m.pokemon_id=22;break;case"EKANS":case 23:m.pokemon_id=23;break;case"ARBOK":case 24:m.pokemon_id=24;break;case"PIKACHU":case 25:m.pokemon_id=25;break;case"RAICHU":case 26:m.pokemon_id=26;break;case"SANDSHREW":case 27:m.pokemon_id=27;break;case"SANDSLASH":case 28:m.pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_id=29;break;case"NIDORINA":case 30:m.pokemon_id=30;break;case"NIDOQUEEN":case 31:m.pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.pokemon_id=32;break;case"NIDORINO":case 33:m.pokemon_id=33;break;case"NIDOKING":case 34:m.pokemon_id=34;break;case"CLEFAIRY":case 35:m.pokemon_id=35;break;case"CLEFABLE":case 36:m.pokemon_id=36;break;case"VULPIX":case 37:m.pokemon_id=37;break;case"NINETALES":case 38:m.pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.pokemon_id=40;break;case"ZUBAT":case 41:m.pokemon_id=41;break;case"GOLBAT":case 42:m.pokemon_id=42;break;case"ODDISH":case 43:m.pokemon_id=43;break;case"GLOOM":case 44:m.pokemon_id=44;break;case"VILEPLUME":case 45:m.pokemon_id=45;break;case"PARAS":case 46:m.pokemon_id=46;break;case"PARASECT":case 47:m.pokemon_id=47;break;case"VENONAT":case 48:m.pokemon_id=48;break;case"VENOMOTH":case 49:m.pokemon_id=49;break;case"DIGLETT":case 50:m.pokemon_id=50;break;case"DUGTRIO":case 51:m.pokemon_id=51;break;case"MEOWTH":case 52:m.pokemon_id=52;break;case"PERSIAN":case 53:m.pokemon_id=53;break;case"PSYDUCK":case 54:m.pokemon_id=54;break;case"GOLDUCK":case 55:m.pokemon_id=55;break;case"MANKEY":case 56:m.pokemon_id=56;break;case"PRIMEAPE":case 57:m.pokemon_id=57;break;case"GROWLITHE":case 58:m.pokemon_id=58;break;case"ARCANINE":case 59:m.pokemon_id=59;break;case"POLIWAG":case 60:m.pokemon_id=60;break;case"POLIWHIRL":case 61:m.pokemon_id=61;break;case"POLIWRATH":case 62:m.pokemon_id=62;break;case"ABRA":case 63:m.pokemon_id=63;break;case"KADABRA":case 64:m.pokemon_id=64;break;case"ALAKAZAM":case 65:m.pokemon_id=65;break;case"MACHOP":case 66:m.pokemon_id=66;break;case"MACHOKE":case 67:m.pokemon_id=67;break;case"MACHAMP":case 68:m.pokemon_id=68;break;case"BELLSPROUT":case 69:m.pokemon_id=69;break;case"WEEPINBELL":case 70:m.pokemon_id=70;break;case"VICTREEBEL":case 71:m.pokemon_id=71;break;case"TENTACOOL":case 72:m.pokemon_id=72;break;case"TENTACRUEL":case 73:m.pokemon_id=73;break;case"GEODUDE":case 74:m.pokemon_id=74;break;case"GRAVELER":case 75:m.pokemon_id=75;break;case"GOLEM":case 76:m.pokemon_id=76;break;case"PONYTA":case 77:m.pokemon_id=77;break;case"RAPIDASH":case 78:m.pokemon_id=78;break;case"SLOWPOKE":case 79:m.pokemon_id=79;break;case"SLOWBRO":case 80:m.pokemon_id=80;break;case"MAGNEMITE":case 81:m.pokemon_id=81;break;case"MAGNETON":case 82:m.pokemon_id=82;break;case"FARFETCHD":case 83:m.pokemon_id=83;break;case"DODUO":case 84:m.pokemon_id=84;break;case"DODRIO":case 85:m.pokemon_id=85;break;case"SEEL":case 86:m.pokemon_id=86;break;case"DEWGONG":case 87:m.pokemon_id=87;break;case"GRIMER":case 88:m.pokemon_id=88;break;case"MUK":case 89:m.pokemon_id=89;break;case"SHELLDER":case 90:m.pokemon_id=90;break;case"CLOYSTER":case 91:m.pokemon_id=91;break;case"GASTLY":case 92:m.pokemon_id=92;break;case"HAUNTER":case 93:m.pokemon_id=93;break;case"GENGAR":case 94:m.pokemon_id=94;break;case"ONIX":case 95:m.pokemon_id=95;break;case"DROWZEE":case 96:m.pokemon_id=96;break;case"HYPNO":case 97:m.pokemon_id=97;break;case"KRABBY":case 98:m.pokemon_id=98;break;case"KINGLER":case 99:m.pokemon_id=99;break;case"VOLTORB":case 100:m.pokemon_id=100;break;case"ELECTRODE":case 101:m.pokemon_id=101;break;case"EXEGGCUTE":case 102:m.pokemon_id=102;break;case"EXEGGUTOR":case 103:m.pokemon_id=103;break;case"CUBONE":case 104:m.pokemon_id=104;break;case"MAROWAK":case 105:m.pokemon_id=105;break;case"HITMONLEE":case 106:m.pokemon_id=106;break;case"HITMONCHAN":case 107:m.pokemon_id=107;break;case"LICKITUNG":case 108:m.pokemon_id=108;break;case"KOFFING":case 109:m.pokemon_id=109;break;case"WEEZING":case 110:m.pokemon_id=110;break;case"RHYHORN":case 111:m.pokemon_id=111;break;case"RHYDON":case 112:m.pokemon_id=112;break;case"CHANSEY":case 113:m.pokemon_id=113;break;case"TANGELA":case 114:m.pokemon_id=114;break;case"KANGASKHAN":case 115:m.pokemon_id=115;break;case"HORSEA":case 116:m.pokemon_id=116;break;case"SEADRA":case 117:m.pokemon_id=117;break;case"GOLDEEN":case 118:m.pokemon_id=118;break;case"SEAKING":case 119:m.pokemon_id=119;break;case"STARYU":case 120:m.pokemon_id=120;break;case"STARMIE":case 121:m.pokemon_id=121;break;case"MR_MIME":case 122:m.pokemon_id=122;break;case"SCYTHER":case 123:m.pokemon_id=123;break;case"JYNX":case 124:m.pokemon_id=124;break;case"ELECTABUZZ":case 125:m.pokemon_id=125;break;case"MAGMAR":case 126:m.pokemon_id=126;break;case"PINSIR":case 127:m.pokemon_id=127;break;case"TAUROS":case 128:m.pokemon_id=128;break;case"MAGIKARP":case 129:m.pokemon_id=129;break;case"GYARADOS":case 130:m.pokemon_id=130;break;case"LAPRAS":case 131:m.pokemon_id=131;break;case"DITTO":case 132:m.pokemon_id=132;break;case"EEVEE":case 133:m.pokemon_id=133;break;case"VAPOREON":case 134:m.pokemon_id=134;break;case"JOLTEON":case 135:m.pokemon_id=135;break;case"FLAREON":case 136:m.pokemon_id=136;break;case"PORYGON":case 137:m.pokemon_id=137;break;case"OMANYTE":case 138:m.pokemon_id=138;break;case"OMASTAR":case 139:m.pokemon_id=139;break;case"KABUTO":case 140:m.pokemon_id=140;break;case"KABUTOPS":case 141:m.pokemon_id=141;break;case"AERODACTYL":case 142:m.pokemon_id=142;break;case"SNORLAX":case 143:m.pokemon_id=143;break;case"ARTICUNO":case 144:m.pokemon_id=144;break;case"ZAPDOS":case 145:m.pokemon_id=145;break;case"MOLTRES":case 146:m.pokemon_id=146;break;case"DRATINI":case 147:m.pokemon_id=147;break;case"DRAGONAIR":case 148:m.pokemon_id=148;break;case"DRAGONITE":case 149:m.pokemon_id=149;break;case"MEWTWO":case 150:m.pokemon_id=150;break;case"MEW":case 151:m.pokemon_id=151;break;case"CHIKORITA":case 152:m.pokemon_id=152;break;case"BAYLEEF":case 153:m.pokemon_id=153;break;case"MEGANIUM":case 154:m.pokemon_id=154;break;case"CYNDAQUIL":case 155:m.pokemon_id=155;break;case"QUILAVA":case 156:m.pokemon_id=156;break;case"TYPHLOSION":case 157:m.pokemon_id=157;break;case"TOTODILE":case 158:m.pokemon_id=158;break;case"CROCONAW":case 159:m.pokemon_id=159;break;case"FERALIGATR":case 160:m.pokemon_id=160;break;case"SENTRET":case 161:m.pokemon_id=161;break;case"FURRET":case 162:m.pokemon_id=162;break;case"HOOTHOOT":case 163:m.pokemon_id=163;break;case"NOCTOWL":case 164:m.pokemon_id=164;break;case"LEDYBA":case 165:m.pokemon_id=165;break;case"LEDIAN":case 166:m.pokemon_id=166;break;case"SPINARAK":case 167:m.pokemon_id=167;break;case"ARIADOS":case 168:m.pokemon_id=168;break;case"CROBAT":case 169:m.pokemon_id=169;break;case"CHINCHOU":case 170:m.pokemon_id=170;break;case"LANTURN":case 171:m.pokemon_id=171;break;case"PICHU":case 172:m.pokemon_id=172;break;case"CLEFFA":case 173:m.pokemon_id=173;break;case"IGGLYBUFF":case 174:m.pokemon_id=174;break;case"TOGEPI":case 175:m.pokemon_id=175;break;case"TOGETIC":case 176:m.pokemon_id=176;break;case"NATU":case 177:m.pokemon_id=177;break;case"XATU":case 178:m.pokemon_id=178;break;case"MAREEP":case 179:m.pokemon_id=179;break;case"FLAAFFY":case 180:m.pokemon_id=180;break;case"AMPHAROS":case 181:m.pokemon_id=181;break;case"BELLOSSOM":case 182:m.pokemon_id=182;break;case"MARILL":case 183:m.pokemon_id=183;break;case"AZUMARILL":case 184:m.pokemon_id=184;break;case"SUDOWOODO":case 185:m.pokemon_id=185;break;case"POLITOED":case 186:m.pokemon_id=186;break;case"HOPPIP":case 187:m.pokemon_id=187;break;case"SKIPLOOM":case 188:m.pokemon_id=188;break;case"JUMPLUFF":case 189:m.pokemon_id=189;break;case"AIPOM":case 190:m.pokemon_id=190;break;case"SUNKERN":case 191:m.pokemon_id=191;break;case"SUNFLORA":case 192:m.pokemon_id=192;break;case"YANMA":case 193:m.pokemon_id=193;break;case"WOOPER":case 194:m.pokemon_id=194;break;case"QUAGSIRE":case 195:m.pokemon_id=195;break;case"ESPEON":case 196:m.pokemon_id=196;break;case"UMBREON":case 197:m.pokemon_id=197;break;case"MURKROW":case 198:m.pokemon_id=198;break;case"SLOWKING":case 199:m.pokemon_id=199;break;case"MISDREAVUS":case 200:m.pokemon_id=200;break;case"UNOWN":case 201:m.pokemon_id=201;break;case"WOBBUFFET":case 202:m.pokemon_id=202;break;case"GIRAFARIG":case 203:m.pokemon_id=203;break;case"PINECO":case 204:m.pokemon_id=204;break;case"FORRETRESS":case 205:m.pokemon_id=205;break;case"DUNSPARCE":case 206:m.pokemon_id=206;break;case"GLIGAR":case 207:m.pokemon_id=207;break;case"STEELIX":case 208:m.pokemon_id=208;break;case"SNUBBULL":case 209:m.pokemon_id=209;break;case"GRANBULL":case 210:m.pokemon_id=210;break;case"QWILFISH":case 211:m.pokemon_id=211;break;case"SCIZOR":case 212:m.pokemon_id=212;break;case"SHUCKLE":case 213:m.pokemon_id=213;break;case"HERACROSS":case 214:m.pokemon_id=214;break;case"SNEASEL":case 215:m.pokemon_id=215;break;case"TEDDIURSA":case 216:m.pokemon_id=216;break;case"URSARING":case 217:m.pokemon_id=217;break;case"SLUGMA":case 218:m.pokemon_id=218;break;case"MAGCARGO":case 219:m.pokemon_id=219;break;case"SWINUB":case 220:m.pokemon_id=220;break;case"PILOSWINE":case 221:m.pokemon_id=221;break;case"CORSOLA":case 222:m.pokemon_id=222;break;case"REMORAID":case 223:m.pokemon_id=223;break;case"OCTILLERY":case 224:m.pokemon_id=224;break;case"DELIBIRD":case 225:m.pokemon_id=225;break;case"MANTINE":case 226:m.pokemon_id=226;break;case"SKARMORY":case 227:m.pokemon_id=227;break;case"HOUNDOUR":case 228:m.pokemon_id=228;break;case"HOUNDOOM":case 229:m.pokemon_id=229;break;case"KINGDRA":case 230:m.pokemon_id=230;break;case"PHANPY":case 231:m.pokemon_id=231;break;case"DONPHAN":case 232:m.pokemon_id=232;break;case"PORYGON2":case 233:m.pokemon_id=233;break;case"STANTLER":case 234:m.pokemon_id=234;break;case"SMEARGLE":case 235:m.pokemon_id=235;break;case"TYROGUE":case 236:m.pokemon_id=236;break;case"HITMONTOP":case 237:m.pokemon_id=237;break;case"SMOOCHUM":case 238:m.pokemon_id=238;break;case"ELEKID":case 239:m.pokemon_id=239;break;case"MAGBY":case 240:m.pokemon_id=240;break;case"MILTANK":case 241:m.pokemon_id=241;break;case"BLISSEY":case 242:m.pokemon_id=242;break;case"RAIKOU":case 243:m.pokemon_id=243;break;case"ENTEI":case 244:m.pokemon_id=244;break;case"SUICUNE":case 245:m.pokemon_id=245;break;case"LARVITAR":case 246:m.pokemon_id=246;break;case"PUPITAR":case 247:m.pokemon_id=247;break;case"TYRANITAR":case 248:m.pokemon_id=248;break;case"LUGIA":case 249:m.pokemon_id=249;break;case"HO_OH":case 250:m.pokemon_id=250;break;case"CELEBI":case 251:m.pokemon_id=251;break;case"TREECKO":case 252:m.pokemon_id=252;break;case"GROVYLE":case 253:m.pokemon_id=253;break;case"SCEPTILE":case 254:m.pokemon_id=254;break;case"TORCHIC":case 255:m.pokemon_id=255;break;case"COMBUSKEN":case 256:m.pokemon_id=256;break;case"BLAZIKEN":case 257:m.pokemon_id=257;break;case"MUDKIP":case 258:m.pokemon_id=258;break;case"MARSHTOMP":case 259:m.pokemon_id=259;break;case"SWAMPERT":case 260:m.pokemon_id=260;break;case"POOCHYENA":case 261:m.pokemon_id=261;break;case"MIGHTYENA":case 262:m.pokemon_id=262;break;case"ZIGZAGOON":case 263:m.pokemon_id=263;break;case"LINOONE":case 264:m.pokemon_id=264;break;case"WURMPLE":case 265:m.pokemon_id=265;break;case"SILCOON":case 266:m.pokemon_id=266;break;case"BEAUTIFLY":case 267:m.pokemon_id=267;break;case"CASCOON":case 268:m.pokemon_id=268;break;case"DUSTOX":case 269:m.pokemon_id=269;break;case"LOTAD":case 270:m.pokemon_id=270;break;case"LOMBRE":case 271:m.pokemon_id=271;break;case"LUDICOLO":case 272:m.pokemon_id=272;break;case"SEEDOT":case 273:m.pokemon_id=273;break;case"NUZLEAF":case 274:m.pokemon_id=274;break;case"SHIFTRY":case 275:m.pokemon_id=275;break;case"TAILLOW":case 276:m.pokemon_id=276;break;case"SWELLOW":case 277:m.pokemon_id=277;break;case"WINGULL":case 278:m.pokemon_id=278;break;case"PELIPPER":case 279:m.pokemon_id=279;break;case"RALTS":case 280:m.pokemon_id=280;break;case"KIRLIA":case 281:m.pokemon_id=281;break;case"GARDEVOIR":case 282:m.pokemon_id=282;break;case"SURSKIT":case 283:m.pokemon_id=283;break;case"MASQUERAIN":case 284:m.pokemon_id=284;break;case"SHROOMISH":case 285:m.pokemon_id=285;break;case"BRELOOM":case 286:m.pokemon_id=286;break;case"SLAKOTH":case 287:m.pokemon_id=287;break;case"VIGOROTH":case 288:m.pokemon_id=288;break;case"SLAKING":case 289:m.pokemon_id=289;break;case"NINCADA":case 290:m.pokemon_id=290;break;case"NINJASK":case 291:m.pokemon_id=291;break;case"SHEDINJA":case 292:m.pokemon_id=292;break;case"WHISMUR":case 293:m.pokemon_id=293;break;case"LOUDRED":case 294:m.pokemon_id=294;break;case"EXPLOUD":case 295:m.pokemon_id=295;break;case"MAKUHITA":case 296:m.pokemon_id=296;break;case"HARIYAMA":case 297:m.pokemon_id=297;break;case"AZURILL":case 298:m.pokemon_id=298;break;case"NOSEPASS":case 299:m.pokemon_id=299;break;case"SKITTY":case 300:m.pokemon_id=300;break;case"DELCATTY":case 301:m.pokemon_id=301;break;case"SABLEYE":case 302:m.pokemon_id=302;break;case"MAWILE":case 303:m.pokemon_id=303;break;case"ARON":case 304:m.pokemon_id=304;break;case"LAIRON":case 305:m.pokemon_id=305;break;case"AGGRON":case 306:m.pokemon_id=306;break;case"MEDITITE":case 307:m.pokemon_id=307;break;case"MEDICHAM":case 308:m.pokemon_id=308;break;case"ELECTRIKE":case 309:m.pokemon_id=309;break;case"MANECTRIC":case 310:m.pokemon_id=310;break;case"PLUSLE":case 311:m.pokemon_id=311;break;case"MINUN":case 312:m.pokemon_id=312;break;case"VOLBEAT":case 313:m.pokemon_id=313;break;case"ILLUMISE":case 314:m.pokemon_id=314;break;case"ROSELIA":case 315:m.pokemon_id=315;break;case"GULPIN":case 316:m.pokemon_id=316;break;case"SWALOT":case 317:m.pokemon_id=317;break;case"CARVANHA":case 318:m.pokemon_id=318;break;case"SHARPEDO":case 319:m.pokemon_id=319;break;case"WAILMER":case 320:m.pokemon_id=320;break;case"WAILORD":case 321:m.pokemon_id=321;break;case"NUMEL":case 322:m.pokemon_id=322;break;case"CAMERUPT":case 323:m.pokemon_id=323;break;case"TORKOAL":case 324:m.pokemon_id=324;break;case"SPOINK":case 325:m.pokemon_id=325;break;case"GRUMPIG":case 326:m.pokemon_id=326;break;case"SPINDA":case 327:m.pokemon_id=327;break;case"TRAPINCH":case 328:m.pokemon_id=328;break;case"VIBRAVA":case 329:m.pokemon_id=329;break;case"FLYGON":case 330:m.pokemon_id=330;break;case"CACNEA":case 331:m.pokemon_id=331;break;case"CACTURNE":case 332:m.pokemon_id=332;break;case"SWABLU":case 333:m.pokemon_id=333;break;case"ALTARIA":case 334:m.pokemon_id=334;break;case"ZANGOOSE":case 335:m.pokemon_id=335;break;case"SEVIPER":case 336:m.pokemon_id=336;break;case"LUNATONE":case 337:m.pokemon_id=337;break;case"SOLROCK":case 338:m.pokemon_id=338;break;case"BARBOACH":case 339:m.pokemon_id=339;break;case"WHISCASH":case 340:m.pokemon_id=340;break;case"CORPHISH":case 341:m.pokemon_id=341;break;case"CRAWDAUNT":case 342:m.pokemon_id=342;break;case"BALTOY":case 343:m.pokemon_id=343;break;case"CLAYDOL":case 344:m.pokemon_id=344;break;case"LILEEP":case 345:m.pokemon_id=345;break;case"CRADILY":case 346:m.pokemon_id=346;break;case"ANORITH":case 347:m.pokemon_id=347;break;case"ARMALDO":case 348:m.pokemon_id=348;break;case"FEEBAS":case 349:m.pokemon_id=349;break;case"MILOTIC":case 350:m.pokemon_id=350;break;case"CASTFORM":case 351:m.pokemon_id=351;break;case"KECLEON":case 352:m.pokemon_id=352;break;case"SHUPPET":case 353:m.pokemon_id=353;break;case"BANETTE":case 354:m.pokemon_id=354;break;case"DUSKULL":case 355:m.pokemon_id=355;break;case"DUSCLOPS":case 356:m.pokemon_id=356;break;case"TROPIUS":case 357:m.pokemon_id=357;break;case"CHIMECHO":case 358:m.pokemon_id=358;break;case"ABSOL":case 359:m.pokemon_id=359;break;case"WYNAUT":case 360:m.pokemon_id=360;break;case"SNORUNT":case 361:m.pokemon_id=361;break;case"GLALIE":case 362:m.pokemon_id=362;break;case"SPHEAL":case 363:m.pokemon_id=363;break;case"SEALEO":case 364:m.pokemon_id=364;break;case"WALREIN":case 365:m.pokemon_id=365;break;case"CLAMPERL":case 366:m.pokemon_id=366;break;case"HUNTAIL":case 367:m.pokemon_id=367;break;case"GOREBYSS":case 368:m.pokemon_id=368;break;case"RELICANTH":case 369:m.pokemon_id=369;break;case"LUVDISC":case 370:m.pokemon_id=370;break;case"BAGON":case 371:m.pokemon_id=371;break;case"SHELGON":case 372:m.pokemon_id=372;break;case"SALAMENCE":case 373:m.pokemon_id=373;break;case"BELDUM":case 374:m.pokemon_id=374;break;case"METANG":case 375:m.pokemon_id=375;break;case"METAGROSS":case 376:m.pokemon_id=376;break;case"REGIROCK":case 377:m.pokemon_id=377;break;case"REGICE":case 378:m.pokemon_id=378;break;case"REGISTEEL":case 379:m.pokemon_id=379;break;case"LATIAS":case 380:m.pokemon_id=380;break;case"LATIOS":case 381:m.pokemon_id=381;break;case"KYOGRE":case 382:m.pokemon_id=382;break;case"GROUDON":case 383:m.pokemon_id=383;break;case"RAYQUAZA":case 384:m.pokemon_id=384;break;case"JIRACHI":case 385:m.pokemon_id=385;break;case"DEOXYS":case 386:m.pokemon_id=386;break;case"TURTWIG":case 387:m.pokemon_id=387;break;case"GROTLE":case 388:m.pokemon_id=388;break;case"TORTERRA":case 389:m.pokemon_id=389;break;case"CHIMCHAR":case 390:m.pokemon_id=390;break;case"MONFERNO":case 391:m.pokemon_id=391;break;case"INFERNAPE":case 392:m.pokemon_id=392;break;case"PIPLUP":case 393:m.pokemon_id=393;break;case"PRINPLUP":case 394:m.pokemon_id=394;break;case"EMPOLEON":case 395:m.pokemon_id=395;break;case"STARLY":case 396:m.pokemon_id=396;break;case"STARAVIA":case 397:m.pokemon_id=397;break;case"STARAPTOR":case 398:m.pokemon_id=398;break;case"BIDOOF":case 399:m.pokemon_id=399;break;case"BIBAREL":case 400:m.pokemon_id=400;break;case"KRICKETOT":case 401:m.pokemon_id=401;break;case"KRICKETUNE":case 402:m.pokemon_id=402;break;case"SHINX":case 403:m.pokemon_id=403;break;case"LUXIO":case 404:m.pokemon_id=404;break;case"LUXRAY":case 405:m.pokemon_id=405;break;case"BUDEW":case 406:m.pokemon_id=406;break;case"ROSERADE":case 407:m.pokemon_id=407;break;case"CRANIDOS":case 408:m.pokemon_id=408;break;case"RAMPARDOS":case 409:m.pokemon_id=409;break;case"SHIELDON":case 410:m.pokemon_id=410;break;case"BASTIODON":case 411:m.pokemon_id=411;break;case"BURMY":case 412:m.pokemon_id=412;break;case"WORMADAM":case 413:m.pokemon_id=413;break;case"MOTHIM":case 414:m.pokemon_id=414;break;case"COMBEE":case 415:m.pokemon_id=415;break;case"VESPIQUEN":case 416:m.pokemon_id=416;break;case"PACHIRISU":case 417:m.pokemon_id=417;break;case"BUIZEL":case 418:m.pokemon_id=418;break;case"FLOATZEL":case 419:m.pokemon_id=419;break;case"CHERUBI":case 420:m.pokemon_id=420;break;case"CHERRIM":case 421:m.pokemon_id=421;break;case"SHELLOS":case 422:m.pokemon_id=422;break;case"GASTRODON":case 423:m.pokemon_id=423;break;case"AMBIPOM":case 424:m.pokemon_id=424;break;case"DRIFLOON":case 425:m.pokemon_id=425;break;case"DRIFBLIM":case 426:m.pokemon_id=426;break;case"BUNEARY":case 427:m.pokemon_id=427;break;case"LOPUNNY":case 428:m.pokemon_id=428;break;case"MISMAGIUS":case 429:m.pokemon_id=429;break;case"HONCHKROW":case 430:m.pokemon_id=430;break;case"GLAMEOW":case 431:m.pokemon_id=431;break;case"PURUGLY":case 432:m.pokemon_id=432;break;case"CHINGLING":case 433:m.pokemon_id=433;break;case"STUNKY":case 434:m.pokemon_id=434;break;case"SKUNTANK":case 435:m.pokemon_id=435;break;case"BRONZOR":case 436:m.pokemon_id=436;break;case"BRONZONG":case 437:m.pokemon_id=437;break;case"BONSLY":case 438:m.pokemon_id=438;break;case"MIME_JR":case 439:m.pokemon_id=439;break;case"HAPPINY":case 440:m.pokemon_id=440;break;case"CHATOT":case 441:m.pokemon_id=441;break;case"SPIRITOMB":case 442:m.pokemon_id=442;break;case"GIBLE":case 443:m.pokemon_id=443;break;case"GABITE":case 444:m.pokemon_id=444;break;case"GARCHOMP":case 445:m.pokemon_id=445;break;case"MUNCHLAX":case 446:m.pokemon_id=446;break;case"RIOLU":case 447:m.pokemon_id=447;break;case"LUCARIO":case 448:m.pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.pokemon_id=449;break;case"HIPPOWDON":case 450:m.pokemon_id=450;break;case"SKORUPI":case 451:m.pokemon_id=451;break;case"DRAPION":case 452:m.pokemon_id=452;break;case"CROAGUNK":case 453:m.pokemon_id=453;break;case"TOXICROAK":case 454:m.pokemon_id=454;break;case"CARNIVINE":case 455:m.pokemon_id=455;break;case"FINNEON":case 456:m.pokemon_id=456;break;case"LUMINEON":case 457:m.pokemon_id=457;break;case"MANTYKE":case 458:m.pokemon_id=458;break;case"SNOVER":case 459:m.pokemon_id=459;break;case"ABOMASNOW":case 460:m.pokemon_id=460;break;case"WEAVILE":case 461:m.pokemon_id=461;break;case"MAGNEZONE":case 462:m.pokemon_id=462;break;case"LICKILICKY":case 463:m.pokemon_id=463;break;case"RHYPERIOR":case 464:m.pokemon_id=464;break;case"TANGROWTH":case 465:m.pokemon_id=465;break;case"ELECTIVIRE":case 466:m.pokemon_id=466;break;case"MAGMORTAR":case 467:m.pokemon_id=467;break;case"TOGEKISS":case 468:m.pokemon_id=468;break;case"YANMEGA":case 469:m.pokemon_id=469;break;case"LEAFEON":case 470:m.pokemon_id=470;break;case"GLACEON":case 471:m.pokemon_id=471;break;case"GLISCOR":case 472:m.pokemon_id=472;break;case"MAMOSWINE":case 473:m.pokemon_id=473;break;case"PORYGON_Z":case 474:m.pokemon_id=474;break;case"GALLADE":case 475:m.pokemon_id=475;break;case"PROBOPASS":case 476:m.pokemon_id=476;break;case"DUSKNOIR":case 477:m.pokemon_id=477;break;case"FROSLASS":case 478:m.pokemon_id=478;break;case"ROTOM":case 479:m.pokemon_id=479;break;case"UXIE":case 480:m.pokemon_id=480;break;case"MESPRIT":case 481:m.pokemon_id=481;break;case"AZELF":case 482:m.pokemon_id=482;break;case"DIALGA":case 483:m.pokemon_id=483;break;case"PALKIA":case 484:m.pokemon_id=484;break;case"HEATRAN":case 485:m.pokemon_id=485;break;case"REGIGIGAS":case 486:m.pokemon_id=486;break;case"GIRATINA":case 487:m.pokemon_id=487;break;case"CRESSELIA":case 488:m.pokemon_id=488;break;case"PHIONE":case 489:m.pokemon_id=489;break;case"MANAPHY":case 490:m.pokemon_id=490;break;case"DARKRAI":case 491:m.pokemon_id=491;break;case"SHAYMIN":case 492:m.pokemon_id=492;break;case"ARCEUS":case 493:m.pokemon_id=493;break;case"MELTAN":case 808:m.pokemon_id=808;break;case"MELMETAL":case 809:m.pokemon_id=809;break}if(d.candy_count!=null){m.candy_count=d.candy_count|0}return m};UseItemRareCandyMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id=o.enums===String?"ITEM_UNKNOWN":0;d.pokemon_id=o.enums===String?"MISSINGNO":0;d.candy_count=0}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item_id]:m.item_id}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){d.pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_id]:m.pokemon_id}if(m.candy_count!=null&&m.hasOwnProperty("candy_count")){d.candy_count=m.candy_count}return d};UseItemRareCandyMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UseItemRareCandyMessage}();Messages.UseItemReviveMessage=function(){function UseItemReviveMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemReviveMessage.prototype.item_id=0;UseItemReviveMessage.prototype.pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;UseItemReviveMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(8).int32(m.item_id);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(17).fixed64(m.pokemon_id);return w};UseItemReviveMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UseItemReviveMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.int32();break;case 2:m.pokemon_id=r.fixed64();break;default:r.skipType(t&7);break}}return m};UseItemReviveMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UseItemReviveMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UseItemReviveMessage;switch(d.item_id){case"ITEM_UNKNOWN":case 0:m.item_id=0;break;case"ITEM_POKE_BALL":case 1:m.item_id=1;break;case"ITEM_GREAT_BALL":case 2:m.item_id=2;break;case"ITEM_ULTRA_BALL":case 3:m.item_id=3;break;case"ITEM_MASTER_BALL":case 4:m.item_id=4;break;case"ITEM_PREMIER_BALL":case 5:m.item_id=5;break;case"ITEM_POTION":case 101:m.item_id=101;break;case"ITEM_SUPER_POTION":case 102:m.item_id=102;break;case"ITEM_HYPER_POTION":case 103:m.item_id=103;break;case"ITEM_MAX_POTION":case 104:m.item_id=104;break;case"ITEM_REVIVE":case 201:m.item_id=201;break;case"ITEM_MAX_REVIVE":case 202:m.item_id=202;break;case"ITEM_LUCKY_EGG":case 301:m.item_id=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item_id=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item_id=402;break;case"ITEM_INCENSE_COOL":case 403:m.item_id=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item_id=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item_id=405;break;case"ITEM_TROY_DISK":case 501:m.item_id=501;break;case"ITEM_X_ATTACK":case 602:m.item_id=602;break;case"ITEM_X_DEFENSE":case 603:m.item_id=603;break;case"ITEM_X_MIRACLE":case 604:m.item_id=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item_id=701;break;case"ITEM_BLUK_BERRY":case 702:m.item_id=702;break;case"ITEM_NANAB_BERRY":case 703:m.item_id=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item_id=704;break;case"ITEM_PINAP_BERRY":case 705:m.item_id=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item_id=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item_id=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item_id=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item_id=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item_id=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item_id=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item_id=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item_id=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item_id=1002;break;case"ITEM_SUN_STONE":case 1101:m.item_id=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item_id=1102;break;case"ITEM_METAL_COAT":case 1103:m.item_id=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item_id=1104;break;case"ITEM_UP_GRADE":case 1105:m.item_id=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item_id=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item_id=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item_id=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item_id=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item_id=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item_id=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item_id=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item_id=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item_id=1405;break}if(d.pokemon_id!=null){if($util.Long)(m.pokemon_id=$util.Long.fromValue(d.pokemon_id)).unsigned=false;else if(typeof d.pokemon_id==="string")m.pokemon_id=parseInt(d.pokemon_id,10);else if(typeof d.pokemon_id==="number")m.pokemon_id=d.pokemon_id;else if(typeof d.pokemon_id==="object")m.pokemon_id=new $util.LongBits(d.pokemon_id.low>>>0,d.pokemon_id.high>>>0).toNumber()}return m};UseItemReviveMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id=o.enums===String?"ITEM_UNKNOWN":0;if($util.Long){var n=new $util.Long(0,0,false);d.pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.pokemon_id=o.longs===String?"0":0}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item_id]:m.item_id}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){if(typeof m.pokemon_id==="number")d.pokemon_id=o.longs===String?String(m.pokemon_id):m.pokemon_id;else d.pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id):o.longs===Number?new $util.LongBits(m.pokemon_id.low>>>0,m.pokemon_id.high>>>0).toNumber():m.pokemon_id}return d};UseItemReviveMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UseItemReviveMessage}();Messages.UseItemStardustBoostMessage=function(){function UseItemStardustBoostMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemStardustBoostMessage.prototype.item=0;UseItemStardustBoostMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item!=null&&m.hasOwnProperty("item"))w.uint32(8).int32(m.item);return w};UseItemStardustBoostMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UseItemStardustBoostMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item=r.int32();break;default:r.skipType(t&7);break}}return m};UseItemStardustBoostMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UseItemStardustBoostMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UseItemStardustBoostMessage;switch(d.item){case"ITEM_UNKNOWN":case 0:m.item=0;break;case"ITEM_POKE_BALL":case 1:m.item=1;break;case"ITEM_GREAT_BALL":case 2:m.item=2;break;case"ITEM_ULTRA_BALL":case 3:m.item=3;break;case"ITEM_MASTER_BALL":case 4:m.item=4;break;case"ITEM_PREMIER_BALL":case 5:m.item=5;break;case"ITEM_POTION":case 101:m.item=101;break;case"ITEM_SUPER_POTION":case 102:m.item=102;break;case"ITEM_HYPER_POTION":case 103:m.item=103;break;case"ITEM_MAX_POTION":case 104:m.item=104;break;case"ITEM_REVIVE":case 201:m.item=201;break;case"ITEM_MAX_REVIVE":case 202:m.item=202;break;case"ITEM_LUCKY_EGG":case 301:m.item=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item=402;break;case"ITEM_INCENSE_COOL":case 403:m.item=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item=405;break;case"ITEM_TROY_DISK":case 501:m.item=501;break;case"ITEM_X_ATTACK":case 602:m.item=602;break;case"ITEM_X_DEFENSE":case 603:m.item=603;break;case"ITEM_X_MIRACLE":case 604:m.item=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item=701;break;case"ITEM_BLUK_BERRY":case 702:m.item=702;break;case"ITEM_NANAB_BERRY":case 703:m.item=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item=704;break;case"ITEM_PINAP_BERRY":case 705:m.item=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item=1002;break;case"ITEM_SUN_STONE":case 1101:m.item=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item=1102;break;case"ITEM_METAL_COAT":case 1103:m.item=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item=1104;break;case"ITEM_UP_GRADE":case 1105:m.item=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item=1405;break}return m};UseItemStardustBoostMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item=o.enums===String?"ITEM_UNKNOWN":0}if(m.item!=null&&m.hasOwnProperty("item")){d.item=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item]:m.item}return d};UseItemStardustBoostMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UseItemStardustBoostMessage}();Messages.UseItemXpBoostMessage=function(){function UseItemXpBoostMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemXpBoostMessage.prototype.item_id=0;UseItemXpBoostMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(8).int32(m.item_id);return w};UseItemXpBoostMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.UseItemXpBoostMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.int32();break;default:r.skipType(t&7);break}}return m};UseItemXpBoostMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.UseItemXpBoostMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.UseItemXpBoostMessage;switch(d.item_id){case"ITEM_UNKNOWN":case 0:m.item_id=0;break;case"ITEM_POKE_BALL":case 1:m.item_id=1;break;case"ITEM_GREAT_BALL":case 2:m.item_id=2;break;case"ITEM_ULTRA_BALL":case 3:m.item_id=3;break;case"ITEM_MASTER_BALL":case 4:m.item_id=4;break;case"ITEM_PREMIER_BALL":case 5:m.item_id=5;break;case"ITEM_POTION":case 101:m.item_id=101;break;case"ITEM_SUPER_POTION":case 102:m.item_id=102;break;case"ITEM_HYPER_POTION":case 103:m.item_id=103;break;case"ITEM_MAX_POTION":case 104:m.item_id=104;break;case"ITEM_REVIVE":case 201:m.item_id=201;break;case"ITEM_MAX_REVIVE":case 202:m.item_id=202;break;case"ITEM_LUCKY_EGG":case 301:m.item_id=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item_id=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item_id=402;break;case"ITEM_INCENSE_COOL":case 403:m.item_id=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item_id=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item_id=405;break;case"ITEM_TROY_DISK":case 501:m.item_id=501;break;case"ITEM_X_ATTACK":case 602:m.item_id=602;break;case"ITEM_X_DEFENSE":case 603:m.item_id=603;break;case"ITEM_X_MIRACLE":case 604:m.item_id=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item_id=701;break;case"ITEM_BLUK_BERRY":case 702:m.item_id=702;break;case"ITEM_NANAB_BERRY":case 703:m.item_id=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item_id=704;break;case"ITEM_PINAP_BERRY":case 705:m.item_id=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item_id=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item_id=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item_id=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item_id=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item_id=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item_id=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item_id=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item_id=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item_id=1002;break;case"ITEM_SUN_STONE":case 1101:m.item_id=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item_id=1102;break;case"ITEM_METAL_COAT":case 1103:m.item_id=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item_id=1104;break;case"ITEM_UP_GRADE":case 1105:m.item_id=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item_id=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item_id=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item_id=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item_id=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item_id=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item_id=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item_id=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item_id=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item_id=1405;break}return m};UseItemXpBoostMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id=o.enums===String?"ITEM_UNKNOWN":0}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item_id]:m.item_id}return d};UseItemXpBoostMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UseItemXpBoostMessage}();Messages.VerifyChallengeMessage=function(){function VerifyChallengeMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}VerifyChallengeMessage.prototype.token="";VerifyChallengeMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.token!=null&&m.hasOwnProperty("token"))w.uint32(10).string(m.token);return w};VerifyChallengeMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.VerifyChallengeMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.token=r.string();break;default:r.skipType(t&7);break}}return m};VerifyChallengeMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.VerifyChallengeMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.VerifyChallengeMessage;if(d.token!=null){m.token=String(d.token)}return m};VerifyChallengeMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.token=""}if(m.token!=null&&m.hasOwnProperty("token")){d.token=m.token}return d};VerifyChallengeMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return VerifyChallengeMessage}();Messages.Social=function(){var Social={};Social.UpdateNotificationMessage=function(){function UpdateNotificationMessage(p){this.notification_ids=[];this.create_timestamp_ms=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateNotificationMessage.prototype.notification_ids=$util.emptyArray;UpdateNotificationMessage.prototype.create_timestamp_ms=$util.emptyArray;UpdateNotificationMessage.prototype.state=0;UpdateNotificationMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.notification_ids!=null&&m.notification_ids.length){for(var i=0;i<m.notification_ids.length;++i)w.uint32(10).string(m.notification_ids[i])}if(m.create_timestamp_ms!=null&&m.create_timestamp_ms.length){w.uint32(18).fork();for(var i=0;i<m.create_timestamp_ms.length;++i)w.int64(m.create_timestamp_ms[i]);w.ldelim()}if(m.state!=null&&m.hasOwnProperty("state"))w.uint32(24).int32(m.state);return w};UpdateNotificationMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Messages.Social.UpdateNotificationMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.notification_ids&&m.notification_ids.length))m.notification_ids=[];m.notification_ids.push(r.string());break;case 2:if(!(m.create_timestamp_ms&&m.create_timestamp_ms.length))m.create_timestamp_ms=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.create_timestamp_ms.push(r.int64())}else m.create_timestamp_ms.push(r.int64());break;case 3:m.state=r.int32();break;default:r.skipType(t&7);break}}return m};UpdateNotificationMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Messages.Social.UpdateNotificationMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Messages.Social.UpdateNotificationMessage;if(d.notification_ids){if(!Array.isArray(d.notification_ids))throw TypeError(".POGOProtos.Networking.Requests.Messages.Social.UpdateNotificationMessage.notification_ids: array expected");m.notification_ids=[];for(var i=0;i<d.notification_ids.length;++i){m.notification_ids[i]=String(d.notification_ids[i])}}if(d.create_timestamp_ms){if(!Array.isArray(d.create_timestamp_ms))throw TypeError(".POGOProtos.Networking.Requests.Messages.Social.UpdateNotificationMessage.create_timestamp_ms: array expected");m.create_timestamp_ms=[];for(var i=0;i<d.create_timestamp_ms.length;++i){if($util.Long)(m.create_timestamp_ms[i]=$util.Long.fromValue(d.create_timestamp_ms[i])).unsigned=false;else if(typeof d.create_timestamp_ms[i]==="string")m.create_timestamp_ms[i]=parseInt(d.create_timestamp_ms[i],10);else if(typeof d.create_timestamp_ms[i]==="number")m.create_timestamp_ms[i]=d.create_timestamp_ms[i];else if(typeof d.create_timestamp_ms[i]==="object")m.create_timestamp_ms[i]=new $util.LongBits(d.create_timestamp_ms[i].low>>>0,d.create_timestamp_ms[i].high>>>0).toNumber()}}switch(d.state){case"UNSET_STATE":case 0:m.state=0;break;case"VIEWED":case 1:m.state=1;break}return m};UpdateNotificationMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.notification_ids=[];d.create_timestamp_ms=[]}if(o.defaults){d.state=o.enums===String?"UNSET_STATE":0}if(m.notification_ids&&m.notification_ids.length){d.notification_ids=[];for(var j=0;j<m.notification_ids.length;++j){d.notification_ids[j]=m.notification_ids[j]}}if(m.create_timestamp_ms&&m.create_timestamp_ms.length){d.create_timestamp_ms=[];for(var j=0;j<m.create_timestamp_ms.length;++j){if(typeof m.create_timestamp_ms[j]==="number")d.create_timestamp_ms[j]=o.longs===String?String(m.create_timestamp_ms[j]):m.create_timestamp_ms[j];else d.create_timestamp_ms[j]=o.longs===String?$util.Long.prototype.toString.call(m.create_timestamp_ms[j]):o.longs===Number?new $util.LongBits(m.create_timestamp_ms[j].low>>>0,m.create_timestamp_ms[j].high>>>0).toNumber():m.create_timestamp_ms[j]}}if(m.state!=null&&m.hasOwnProperty("state")){d.state=o.enums===String?$root.POGOProtos.Enums.NotificationState[m.state]:m.state}return d};UpdateNotificationMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UpdateNotificationMessage}();return Social}();return Messages}();Requests.Request=function(){function Request(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Request.prototype.request_type=0;Request.prototype.request_message=$util.newBuffer([]);Request.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.request_type!=null&&m.hasOwnProperty("request_type"))w.uint32(8).int32(m.request_type);if(m.request_message!=null&&m.hasOwnProperty("request_message"))w.uint32(18).bytes(m.request_message);return w};Request.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Request;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.request_type=r.int32();break;case 2:m.request_message=r.bytes();break;default:r.skipType(t&7);break}}return m};Request.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Request)return d;var m=new $root.POGOProtos.Networking.Requests.Request;switch(d.request_type){case"METHOD_UNSET":case 0:m.request_type=0;break;case"GET_PLAYER":case 2:m.request_type=2;break;case"GET_HOLO_INVENTORY":case 4:m.request_type=4;break;case"DOWNLOAD_SETTINGS":case 5:m.request_type=5;break;case"DOWNLOAD_ITEM_TEMPLATES":case 6:m.request_type=6;break;case"DOWNLOAD_REMOTE_CONFIG_VERSION":case 7:m.request_type=7;break;case"REGISTER_BACKGROUND_DEVICE":case 8:m.request_type=8;break;case"GET_PLAYER_DAY":case 9:m.request_type=9;break;case"ACKNOWLEDGE_PUNISHMENT":case 10:m.request_type=10;break;case"FORT_SEARCH":case 101:m.request_type=101;break;case"ENCOUNTER":case 102:m.request_type=102;break;case"CATCH_POKEMON":case 103:m.request_type=103;break;case"FORT_DETAILS":case 104:m.request_type=104;break;case"GET_MAP_OBJECTS":case 106:m.request_type=106;break;case"FORT_DEPLOY_POKEMON":case 110:m.request_type=110;break;case"FORT_RECALL_POKEMON":case 111:m.request_type=111;break;case"RELEASE_POKEMON":case 112:m.request_type=112;break;case"USE_ITEM_POTION":case 113:m.request_type=113;break;case"USE_ITEM_CAPTURE":case 114:m.request_type=114;break;case"USE_ITEM_FLEE":case 115:m.request_type=115;break;case"USE_ITEM_REVIVE":case 116:m.request_type=116;break;case"GET_PLAYER_PROFILE":case 121:m.request_type=121;break;case"EVOLVE_POKEMON":case 125:m.request_type=125;break;case"GET_HATCHED_EGGS":case 126:m.request_type=126;break;case"ENCOUNTER_TUTORIAL_COMPLETE":case 127:m.request_type=127;break;case"LEVEL_UP_REWARDS":case 128:m.request_type=128;break;case"CHECK_AWARDED_BADGES":case 129:m.request_type=129;break;case"USE_ITEM_GYM":case 133:m.request_type=133;break;case"GET_GYM_DETAILS":case 134:m.request_type=134;break;case"START_GYM_BATTLE":case 135:m.request_type=135;break;case"ATTACK_GYM":case 136:m.request_type=136;break;case"RECYCLE_INVENTORY_ITEM":case 137:m.request_type=137;break;case"COLLECT_DAILY_BONUS":case 138:m.request_type=138;break;case"USE_ITEM_XP_BOOST":case 139:m.request_type=139;break;case"USE_ITEM_EGG_INCUBATOR":case 140:m.request_type=140;break;case"USE_INCENSE":case 141:m.request_type=141;break;case"GET_INCENSE_POKEMON":case 142:m.request_type=142;break;case"INCENSE_ENCOUNTER":case 143:m.request_type=143;break;case"ADD_FORT_MODIFIER":case 144:m.request_type=144;break;case"DISK_ENCOUNTER":case 145:m.request_type=145;break;case"COLLECT_DAILY_DEFENDER_BONUS":case 146:m.request_type=146;break;case"UPGRADE_POKEMON":case 147:m.request_type=147;break;case"SET_FAVORITE_POKEMON":case 148:m.request_type=148;break;case"NICKNAME_POKEMON":case 149:m.request_type=149;break;case"EQUIP_BADGE":case 150:m.request_type=150;break;case"SET_CONTACT_SETTINGS":case 151:m.request_type=151;break;case"SET_BUDDY_POKEMON":case 152:m.request_type=152;break;case"GET_BUDDY_WALKED":case 153:m.request_type=153;break;case"USE_ITEM_ENCOUNTER":case 154:m.request_type=154;break;case"GYM_DEPLOY":case 155:m.request_type=155;break;case"GYM_GET_INFO":case 156:m.request_type=156;break;case"GYM_START_SESSION":case 157:m.request_type=157;break;case"GYM_BATTLE_ATTACK":case 158:m.request_type=158;break;case"JOIN_LOBBY":case 159:m.request_type=159;break;case"LEAVE_LOBBY":case 160:m.request_type=160;break;case"SET_LOBBY_VISIBILITY":case 161:m.request_type=161;break;case"SET_LOBBY_POKEMON":case 162:m.request_type=162;break;case"GET_RAID_DETAILS":case 163:m.request_type=163;break;case"GYM_FEED_POKEMON":case 164:m.request_type=164;break;case"START_RAID_BATTLE":case 165:m.request_type=165;break;case"ATTACK_RAID":case 166:m.request_type=166;break;case"AWARD_POKECOIN":case 167:m.request_type=167;break;case"USE_ITEM_STARDUST_BOOST":case 168:m.request_type=168;break;case"GET_ASSET_DIGEST":case 300:m.request_type=300;break;case"GET_DOWNLOAD_URLS":case 301:m.request_type=301;break;case"CLAIM_CODENAME":case 403:m.request_type=403;break;case"SET_AVATAR":case 404:m.request_type=404;break;case"SET_PLAYER_TEAM":case 405:m.request_type=405;break;case"MARK_TUTORIAL_COMPLETE":case 406:m.request_type=406;break;case"UPDATE_PERFORMANCE_METRICS":case 407:m.request_type=407;break;case"CHECK_CHALLENGE":case 600:m.request_type=600;break;case"VERIFY_CHALLENGE":case 601:m.request_type=601;break;case"ECHO":case 666:m.request_type=666;break;case"SFIDA_REGISTRATION":case 800:m.request_type=800;break;case"SFIDA_ACTION_LOG":case 801:m.request_type=801;break;case"SFIDA_CERTIFICATION":case 802:m.request_type=802;break;case"SFIDA_UPDATE":case 803:m.request_type=803;break;case"SFIDA_ACTION":case 804:m.request_type=804;break;case"SFIDA_DOWSER":case 805:m.request_type=805;break;case"SFIDA_CAPTURE":case 806:m.request_type=806;break;case"LIST_AVATAR_CUSTOMIZATIONS":case 807:m.request_type=807;break;case"SET_AVATAR_ITEM_AS_VIEWED":case 808:m.request_type=808;break;case"GET_INBOX":case 809:m.request_type=809;break;case"LIST_GYM_BADGES":case 811:m.request_type=811;break;case"GET_GYM_BADGE_DETAILS":case 812:m.request_type=812;break;case"USE_ITEM_MOVE_REROLL":case 813:m.request_type=813;break;case"USE_ITEM_RARE_CANDY":case 814:m.request_type=814;break;case"AWARD_FREE_RAID_TICKET":case 815:m.request_type=815;break;case"FETCH_ALL_NEWS":case 816:m.request_type=816;break;case"MARK_READ_NEWS_ARTICLE":case 817:m.request_type=817;break;case"GET_PLAYER_DISPLAY_INFO":case 818:m.request_type=818;break;case"BELUGA_TRANSACTION_START":case 819:m.request_type=819;break;case"BELUGA_TRANSACTION_COMPLETE":case 820:m.request_type=820;break;case"GET_NEW_QUESTS":case 900:m.request_type=900;break;case"GET_QUEST_DETAILS":case 901:m.request_type=901;break;case"COMPLETE_QUEST":case 902:m.request_type=902;break;case"REMOVE_QUEST":case 903:m.request_type=903;break;case"QUEST_ENCOUNTER":case 904:m.request_type=904;break;case"COMPLETE_QUEST_STAMP_CARD":case 905:m.request_type=905;break;case"SEND_GIFT":case 950:m.request_type=950;break;case"OPEN_GIFT":case 951:m.request_type=951;break;case"GIFT_DETAILS":case 952:m.request_type=952;break;case"DELETE_GIFT":case 953:m.request_type=953;break;case"SAVE_PLAYER_SNAPSHOT":case 954:m.request_type=954;break;case"GET_FRIENDSHIP_MILESTONE_REWARDS":case 955:m.request_type=955;break;case"CHECK_SEND_GIFT":case 956:m.request_type=956;break;case"SET_FRIEND_NICKNAME":case 957:m.request_type=957;break;case"DELETE_GIFT_FROM_INVENTORY":case 958:m.request_type=958;break;case"SAVE_SOCIAL_PLAYER_SETTINGS":case 959:m.request_type=959;break;case"SHARE_EX_RAID_PASS":case 960:m.request_type=960;break;case"CHECK_SHARE_EX_RAID_PASS":case 961:m.request_type=961;break;case"DECLINE_SHARED_EX_RAID_PASS":case 962:m.request_type=962;break;case"OPEN_TRADING":case 970:m.request_type=970;break;case"UPDATE_TRADING":case 971:m.request_type=971;break;case"CONFIRM_TRADING":case 972:m.request_type=972;break;case"CANCEL_TRADING":case 973:m.request_type=973;break;case"GET_TRADING":case 974:m.request_type=974;break;case"GET_FITNESS_REWARDS":case 980:m.request_type=980;break;case"GET_COMBAT_PLAYER_PROFILE":case 990:m.request_type=990;break;case"GENERATE_COMBAT_CHALLENGE_ID":case 991:m.request_type=991;break;case"CREATE_COMBAT_CHALLENGE":case 992:m.request_type=992;break;case"OPEN_COMBAT_CHALLENGE":case 993:m.request_type=993;break;case"GET_COMBAT_CHALLENGE":case 994:m.request_type=994;break;case"ACCEPT_COMBAT_CHALLENGE":case 995:m.request_type=995;break;case"DECLINE_COMBAT_CHALLENGE":case 996:m.request_type=996;break;case"CANCEL_COMBAT_CHALLENGE":case 997:m.request_type=997;break;case"SUBMIT_COMBAT_CHALLENGE_POKEMONS":case 998:m.request_type=998;break;case"SAVE_COMBAT_PLAYER_PREFERENCES":case 999:m.request_type=999;break;case"OPEN_COMBAT_SESSION":case 1e3:m.request_type=1e3;break;case"UPDATE_COMBAT":case 1001:m.request_type=1001;break;case"QUIT_COMBAT":case 1002:m.request_type=1002;break;case"GET_COMBAT_RESULTS":case 1003:m.request_type=1003;break;case"UNLOCK_SPECIAL_MOVE":case 1004:m.request_type=1004;break;case"GET_NPC_COMBAT_REWARDS":case 1005:m.request_type=1005;break;case"COMBAT_FRIEND_REQUEST":case 1006:m.request_type=1006;break;case"OPEN_NPC_COMBAT_SESSION":case 1007:m.request_type=1007;break;case"START_TUTORIAL_ACTION":case 1008:m.request_type=1008;break;case"GET_TUTORIAL_EGG_ACTION":case 1009:m.request_type=1009;break;case"SEND_PROBE":case 1020:m.request_type=1020;break;case"PROBE_DATA":case 1021:m.request_type=1021;break;case"COMBAT_DATA":case 1022:m.request_type=1022;break;case"COMBAT_CHALLENGE_DATA":case 1023:m.request_type=1023;break;case"GET_SIGNED_GMAP_URL":case 1105:m.request_type=1105;break;case"REGISTER_PUSH_NOTIFICATION":case 5e3:m.request_type=5e3;break;case"UNREGISTER_PUSH_NOTIFICATION":case 5001:m.request_type=5001;break;case"UPDATE_NOTIFICATION_STATUS":case 5002:m.request_type=5002;break;case"OPT_OUT_PUSH_NOTIFICATION_CATEGORY":case 5003:m.request_type=5003;break;case"DOWNLOAD_GAME_MASTER_TEMPLATES":case 5004:m.request_type=5004;break;case"GET_INVENTORY":case 5005:m.request_type=5005;break;case"REDEEM_PASSCODE":case 5006:m.request_type=5006;break;case"PING":case 5007:m.request_type=5007;break;case"ADD_LOGIN_ACTION":case 5008:m.request_type=5008;break;case"REMOVE_LOGIN_ACTION":case 5009:m.request_type=5009;break;case"LIST_LOGIN_ACTION":case 5010:m.request_type=5010;break;case"ADD_NEW_POI":case 5011:m.request_type=5011;break;case"PROXY_SOCIAL_ACTION":case 5012:m.request_type=5012;break;case"CLIENT_TELEMETRY":case 5013:m.request_type=5013;break;case"GET_AVAILABLE_SUBMISSIONS":case 5014:m.request_type=5014;break;case"GET_SIGNED_URL_FOR_PHOTO_UPLOAD":case 5015:m.request_type=5015;break;case"REPLACE_LOGIN_ACTION":case 5016:m.request_type=5016;break;case"PROXY_SOCIAL_SIDE_CHANNEL_ACTION":case 5017:m.request_type=5017;break;case"COLLECT_CLIENT_TELEMETRY":case 5018:m.request_type=5018;break;case"PURCHASE_SKU":case 5019:m.request_type=5019;break;case"GET_AVAILABLE_SKUS_AND_BALANCES":case 5020:m.request_type=5020;break;case"REDEEM_GOOGLE_RECEIPT":case 5021:m.request_type=5021;break;case"REDEEM_APPLE_RECEIPT":case 5022:m.request_type=5022;break;case"REDEEM_DESKTOP_RECEIPT":case 5023:m.request_type=5023;break;case"UPDATE_FITNESS_METRICS":case 5024:m.request_type=5024;break;case"GET_FITNESS_REPORT":case 5025:m.request_type=5025;break;case"GET_CLIENT_TELEMETRY_SETTINGS":case 5026:m.request_type=5026;break;case"REGISTER_BACKGROUND_SERVICE":case 5028:m.request_type=5028;break;case"GET_CLIENT_BGMODE_SETTINGS":case 5029:m.request_type=5029;break;case"PING_ASYNC":case 5027:m.request_type=5027;break;case"PING_DOWNSTREAM":case 5030:m.request_type=5030;break;case"SET_IN_GAME_CURRENCY_EXCHANGE_RATE":case 5032:m.request_type=5032;break;case"REQUEST_GEOFENCE_UPDATES":case 5033:m.request_type=5033;break;case"UPDATE_PLAYER_LOCATION":case 5034:m.request_type=5034;break;case"PROFANITY_FILTER_ACTION":case 5035:m.request_type=5035;break}if(d.request_message!=null){if(typeof d.request_message==="string")$util.base64.decode(d.request_message,m.request_message=$util.newBuffer($util.base64.length(d.request_message)),0);else if(d.request_message.length)m.request_message=d.request_message}return m};Request.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.request_type=o.enums===String?"METHOD_UNSET":0;if(o.bytes===String)d.request_message="";else{d.request_message=[];if(o.bytes!==Array)d.request_message=$util.newBuffer(d.request_message)}}if(m.request_type!=null&&m.hasOwnProperty("request_type")){d.request_type=o.enums===String?$root.POGOProtos.Networking.Requests.RequestType[m.request_type]:m.request_type}if(m.request_message!=null&&m.hasOwnProperty("request_message")){d.request_message=o.bytes===String?$util.base64.encode(m.request_message,0,m.request_message.length):o.bytes===Array?Array.prototype.slice.call(m.request_message):m.request_message}return d};Request.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Request}();Requests.RequestType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="METHOD_UNSET"]=0;values[valuesById[2]="GET_PLAYER"]=2;values[valuesById[4]="GET_HOLO_INVENTORY"]=4;values[valuesById[5]="DOWNLOAD_SETTINGS"]=5;values[valuesById[6]="DOWNLOAD_ITEM_TEMPLATES"]=6;values[valuesById[7]="DOWNLOAD_REMOTE_CONFIG_VERSION"]=7;values[valuesById[8]="REGISTER_BACKGROUND_DEVICE"]=8;values[valuesById[9]="GET_PLAYER_DAY"]=9;values[valuesById[10]="ACKNOWLEDGE_PUNISHMENT"]=10;values[valuesById[101]="FORT_SEARCH"]=101;values[valuesById[102]="ENCOUNTER"]=102;values[valuesById[103]="CATCH_POKEMON"]=103;values[valuesById[104]="FORT_DETAILS"]=104;values[valuesById[106]="GET_MAP_OBJECTS"]=106;values[valuesById[110]="FORT_DEPLOY_POKEMON"]=110;values[valuesById[111]="FORT_RECALL_POKEMON"]=111;values[valuesById[112]="RELEASE_POKEMON"]=112;values[valuesById[113]="USE_ITEM_POTION"]=113;values[valuesById[114]="USE_ITEM_CAPTURE"]=114;values[valuesById[115]="USE_ITEM_FLEE"]=115;values[valuesById[116]="USE_ITEM_REVIVE"]=116;values[valuesById[121]="GET_PLAYER_PROFILE"]=121;values[valuesById[125]="EVOLVE_POKEMON"]=125;values[valuesById[126]="GET_HATCHED_EGGS"]=126;values[valuesById[127]="ENCOUNTER_TUTORIAL_COMPLETE"]=127;values[valuesById[128]="LEVEL_UP_REWARDS"]=128;values[valuesById[129]="CHECK_AWARDED_BADGES"]=129;values[valuesById[133]="USE_ITEM_GYM"]=133;values[valuesById[134]="GET_GYM_DETAILS"]=134;values[valuesById[135]="START_GYM_BATTLE"]=135;values[valuesById[136]="ATTACK_GYM"]=136;values[valuesById[137]="RECYCLE_INVENTORY_ITEM"]=137;values[valuesById[138]="COLLECT_DAILY_BONUS"]=138;values[valuesById[139]="USE_ITEM_XP_BOOST"]=139;values[valuesById[140]="USE_ITEM_EGG_INCUBATOR"]=140;values[valuesById[141]="USE_INCENSE"]=141;values[valuesById[142]="GET_INCENSE_POKEMON"]=142;values[valuesById[143]="INCENSE_ENCOUNTER"]=143;values[valuesById[144]="ADD_FORT_MODIFIER"]=144;values[valuesById[145]="DISK_ENCOUNTER"]=145;values[valuesById[146]="COLLECT_DAILY_DEFENDER_BONUS"]=146;values[valuesById[147]="UPGRADE_POKEMON"]=147;values[valuesById[148]="SET_FAVORITE_POKEMON"]=148;values[valuesById[149]="NICKNAME_POKEMON"]=149;values[valuesById[150]="EQUIP_BADGE"]=150;values[valuesById[151]="SET_CONTACT_SETTINGS"]=151;values[valuesById[152]="SET_BUDDY_POKEMON"]=152;values[valuesById[153]="GET_BUDDY_WALKED"]=153;values[valuesById[154]="USE_ITEM_ENCOUNTER"]=154;values[valuesById[155]="GYM_DEPLOY"]=155;values[valuesById[156]="GYM_GET_INFO"]=156;values[valuesById[157]="GYM_START_SESSION"]=157;values[valuesById[158]="GYM_BATTLE_ATTACK"]=158;values[valuesById[159]="JOIN_LOBBY"]=159;values[valuesById[160]="LEAVE_LOBBY"]=160;values[valuesById[161]="SET_LOBBY_VISIBILITY"]=161;values[valuesById[162]="SET_LOBBY_POKEMON"]=162;values[valuesById[163]="GET_RAID_DETAILS"]=163;values[valuesById[164]="GYM_FEED_POKEMON"]=164;values[valuesById[165]="START_RAID_BATTLE"]=165;values[valuesById[166]="ATTACK_RAID"]=166;values[valuesById[167]="AWARD_POKECOIN"]=167;values[valuesById[168]="USE_ITEM_STARDUST_BOOST"]=168;values[valuesById[300]="GET_ASSET_DIGEST"]=300;values[valuesById[301]="GET_DOWNLOAD_URLS"]=301;values[valuesById[403]="CLAIM_CODENAME"]=403;values[valuesById[404]="SET_AVATAR"]=404;values[valuesById[405]="SET_PLAYER_TEAM"]=405;values[valuesById[406]="MARK_TUTORIAL_COMPLETE"]=406;values[valuesById[407]="UPDATE_PERFORMANCE_METRICS"]=407;values[valuesById[600]="CHECK_CHALLENGE"]=600;values[valuesById[601]="VERIFY_CHALLENGE"]=601;values[valuesById[666]="ECHO"]=666;values[valuesById[800]="SFIDA_REGISTRATION"]=800;values[valuesById[801]="SFIDA_ACTION_LOG"]=801;values[valuesById[802]="SFIDA_CERTIFICATION"]=802;values[valuesById[803]="SFIDA_UPDATE"]=803;values[valuesById[804]="SFIDA_ACTION"]=804;values[valuesById[805]="SFIDA_DOWSER"]=805;values[valuesById[806]="SFIDA_CAPTURE"]=806;values[valuesById[807]="LIST_AVATAR_CUSTOMIZATIONS"]=807;values[valuesById[808]="SET_AVATAR_ITEM_AS_VIEWED"]=808;values[valuesById[809]="GET_INBOX"]=809;values[valuesById[811]="LIST_GYM_BADGES"]=811;values[valuesById[812]="GET_GYM_BADGE_DETAILS"]=812;values[valuesById[813]="USE_ITEM_MOVE_REROLL"]=813;values[valuesById[814]="USE_ITEM_RARE_CANDY"]=814;values[valuesById[815]="AWARD_FREE_RAID_TICKET"]=815;values[valuesById[816]="FETCH_ALL_NEWS"]=816;values[valuesById[817]="MARK_READ_NEWS_ARTICLE"]=817;values[valuesById[818]="GET_PLAYER_DISPLAY_INFO"]=818;values[valuesById[819]="BELUGA_TRANSACTION_START"]=819;values[valuesById[820]="BELUGA_TRANSACTION_COMPLETE"]=820;values[valuesById[900]="GET_NEW_QUESTS"]=900;values[valuesById[901]="GET_QUEST_DETAILS"]=901;values[valuesById[902]="COMPLETE_QUEST"]=902;values[valuesById[903]="REMOVE_QUEST"]=903;values[valuesById[904]="QUEST_ENCOUNTER"]=904;values[valuesById[905]="COMPLETE_QUEST_STAMP_CARD"]=905;values[valuesById[950]="SEND_GIFT"]=950;values[valuesById[951]="OPEN_GIFT"]=951;values[valuesById[952]="GIFT_DETAILS"]=952;values[valuesById[953]="DELETE_GIFT"]=953;values[valuesById[954]="SAVE_PLAYER_SNAPSHOT"]=954;values[valuesById[955]="GET_FRIENDSHIP_MILESTONE_REWARDS"]=955;values[valuesById[956]="CHECK_SEND_GIFT"]=956;values[valuesById[957]="SET_FRIEND_NICKNAME"]=957;values[valuesById[958]="DELETE_GIFT_FROM_INVENTORY"]=958;values[valuesById[959]="SAVE_SOCIAL_PLAYER_SETTINGS"]=959;values[valuesById[960]="SHARE_EX_RAID_PASS"]=960;values[valuesById[961]="CHECK_SHARE_EX_RAID_PASS"]=961;values[valuesById[962]="DECLINE_SHARED_EX_RAID_PASS"]=962;values[valuesById[970]="OPEN_TRADING"]=970;values[valuesById[971]="UPDATE_TRADING"]=971;values[valuesById[972]="CONFIRM_TRADING"]=972;values[valuesById[973]="CANCEL_TRADING"]=973;values[valuesById[974]="GET_TRADING"]=974;values[valuesById[980]="GET_FITNESS_REWARDS"]=980;values[valuesById[990]="GET_COMBAT_PLAYER_PROFILE"]=990;values[valuesById[991]="GENERATE_COMBAT_CHALLENGE_ID"]=991;values[valuesById[992]="CREATE_COMBAT_CHALLENGE"]=992;values[valuesById[993]="OPEN_COMBAT_CHALLENGE"]=993;values[valuesById[994]="GET_COMBAT_CHALLENGE"]=994;values[valuesById[995]="ACCEPT_COMBAT_CHALLENGE"]=995;values[valuesById[996]="DECLINE_COMBAT_CHALLENGE"]=996;values[valuesById[997]="CANCEL_COMBAT_CHALLENGE"]=997;values[valuesById[998]="SUBMIT_COMBAT_CHALLENGE_POKEMONS"]=998;values[valuesById[999]="SAVE_COMBAT_PLAYER_PREFERENCES"]=999;values[valuesById[1e3]="OPEN_COMBAT_SESSION"]=1e3;values[valuesById[1001]="UPDATE_COMBAT"]=1001;values[valuesById[1002]="QUIT_COMBAT"]=1002;values[valuesById[1003]="GET_COMBAT_RESULTS"]=1003;values[valuesById[1004]="UNLOCK_SPECIAL_MOVE"]=1004;values[valuesById[1005]="GET_NPC_COMBAT_REWARDS"]=1005;values[valuesById[1006]="COMBAT_FRIEND_REQUEST"]=1006;values[valuesById[1007]="OPEN_NPC_COMBAT_SESSION"]=1007;values[valuesById[1008]="START_TUTORIAL_ACTION"]=1008;values[valuesById[1009]="GET_TUTORIAL_EGG_ACTION"]=1009;values[valuesById[1020]="SEND_PROBE"]=1020;values[valuesById[1021]="PROBE_DATA"]=1021;values[valuesById[1022]="COMBAT_DATA"]=1022;values[valuesById[1023]="COMBAT_CHALLENGE_DATA"]=1023;values[valuesById[1105]="GET_SIGNED_GMAP_URL"]=1105;values[valuesById[5e3]="REGISTER_PUSH_NOTIFICATION"]=5e3;values[valuesById[5001]="UNREGISTER_PUSH_NOTIFICATION"]=5001;values[valuesById[5002]="UPDATE_NOTIFICATION_STATUS"]=5002;values[valuesById[5003]="OPT_OUT_PUSH_NOTIFICATION_CATEGORY"]=5003;values[valuesById[5004]="DOWNLOAD_GAME_MASTER_TEMPLATES"]=5004;values[valuesById[5005]="GET_INVENTORY"]=5005;values[valuesById[5006]="REDEEM_PASSCODE"]=5006;values[valuesById[5007]="PING"]=5007;values[valuesById[5008]="ADD_LOGIN_ACTION"]=5008;values[valuesById[5009]="REMOVE_LOGIN_ACTION"]=5009;values[valuesById[5010]="LIST_LOGIN_ACTION"]=5010;values[valuesById[5011]="ADD_NEW_POI"]=5011;values[valuesById[5012]="PROXY_SOCIAL_ACTION"]=5012;values[valuesById[5013]="CLIENT_TELEMETRY"]=5013;values[valuesById[5014]="GET_AVAILABLE_SUBMISSIONS"]=5014;values[valuesById[5015]="GET_SIGNED_URL_FOR_PHOTO_UPLOAD"]=5015;values[valuesById[5016]="REPLACE_LOGIN_ACTION"]=5016;values[valuesById[5017]="PROXY_SOCIAL_SIDE_CHANNEL_ACTION"]=5017;values[valuesById[5018]="COLLECT_CLIENT_TELEMETRY"]=5018;values[valuesById[5019]="PURCHASE_SKU"]=5019;values[valuesById[5020]="GET_AVAILABLE_SKUS_AND_BALANCES"]=5020;values[valuesById[5021]="REDEEM_GOOGLE_RECEIPT"]=5021;values[valuesById[5022]="REDEEM_APPLE_RECEIPT"]=5022;values[valuesById[5023]="REDEEM_DESKTOP_RECEIPT"]=5023;values[valuesById[5024]="UPDATE_FITNESS_METRICS"]=5024;values[valuesById[5025]="GET_FITNESS_REPORT"]=5025;values[valuesById[5026]="GET_CLIENT_TELEMETRY_SETTINGS"]=5026;values[valuesById[5028]="REGISTER_BACKGROUND_SERVICE"]=5028;values[valuesById[5029]="GET_CLIENT_BGMODE_SETTINGS"]=5029;values[valuesById[5027]="PING_ASYNC"]=5027;values[valuesById[5030]="PING_DOWNSTREAM"]=5030;values[valuesById[5032]="SET_IN_GAME_CURRENCY_EXCHANGE_RATE"]=5032;values[valuesById[5033]="REQUEST_GEOFENCE_UPDATES"]=5033;values[valuesById[5034]="UPDATE_PLAYER_LOCATION"]=5034;values[valuesById[5035]="PROFANITY_FILTER_ACTION"]=5035;return values}();Requests.Social=function(){var Social={};Social.AcceptFriendInviteMessage=function(){function AcceptFriendInviteMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AcceptFriendInviteMessage.prototype.player_id="";AcceptFriendInviteMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);return w};AcceptFriendInviteMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.AcceptFriendInviteMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;default:r.skipType(t&7);break}}return m};AcceptFriendInviteMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.AcceptFriendInviteMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Social.AcceptFriendInviteMessage;if(d.player_id!=null){m.player_id=String(d.player_id)}return m};AcceptFriendInviteMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id=""}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}return d};AcceptFriendInviteMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AcceptFriendInviteMessage}();Social.CancelFriendInviteMessage=function(){function CancelFriendInviteMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CancelFriendInviteMessage.prototype.player_id="";CancelFriendInviteMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);return w};CancelFriendInviteMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.CancelFriendInviteMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;default:r.skipType(t&7);break}}return m};CancelFriendInviteMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.CancelFriendInviteMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Social.CancelFriendInviteMessage;if(d.player_id!=null){m.player_id=String(d.player_id)}return m};CancelFriendInviteMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id=""}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}return d};CancelFriendInviteMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CancelFriendInviteMessage}();Social.CreateInviteCodeMessage=function(){function CreateInviteCodeMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CreateInviteCodeMessage.prototype.force_generate_code=false;CreateInviteCodeMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.force_generate_code!=null&&m.hasOwnProperty("force_generate_code"))w.uint32(8).bool(m.force_generate_code);return w};CreateInviteCodeMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.CreateInviteCodeMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.force_generate_code=r.bool();break;default:r.skipType(t&7);break}}return m};CreateInviteCodeMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.CreateInviteCodeMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Social.CreateInviteCodeMessage;if(d.force_generate_code!=null){m.force_generate_code=Boolean(d.force_generate_code)}return m};CreateInviteCodeMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.force_generate_code=false}if(m.force_generate_code!=null&&m.hasOwnProperty("force_generate_code")){d.force_generate_code=m.force_generate_code}return d};CreateInviteCodeMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CreateInviteCodeMessage}();Social.DeclineFriendInviteMessage=function(){function DeclineFriendInviteMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DeclineFriendInviteMessage.prototype.player_id="";DeclineFriendInviteMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);return w};DeclineFriendInviteMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.DeclineFriendInviteMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;default:r.skipType(t&7);break}}return m};DeclineFriendInviteMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.DeclineFriendInviteMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Social.DeclineFriendInviteMessage;if(d.player_id!=null){m.player_id=String(d.player_id)}return m};DeclineFriendInviteMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id=""}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}return d};DeclineFriendInviteMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DeclineFriendInviteMessage}();Social.GetFacebookFriendListMessage=function(){function GetFacebookFriendListMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetFacebookFriendListMessage.prototype.fb_access_token="";GetFacebookFriendListMessage.prototype.limit=0;GetFacebookFriendListMessage.prototype.cursor="";GetFacebookFriendListMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fb_access_token!=null&&m.hasOwnProperty("fb_access_token"))w.uint32(10).string(m.fb_access_token);if(m.limit!=null&&m.hasOwnProperty("limit"))w.uint32(16).int32(m.limit);if(m.cursor!=null&&m.hasOwnProperty("cursor"))w.uint32(26).string(m.cursor);return w};GetFacebookFriendListMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.GetFacebookFriendListMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fb_access_token=r.string();break;case 2:m.limit=r.int32();break;case 3:m.cursor=r.string();break;default:r.skipType(t&7);break}}return m};GetFacebookFriendListMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.GetFacebookFriendListMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Social.GetFacebookFriendListMessage;if(d.fb_access_token!=null){m.fb_access_token=String(d.fb_access_token)}if(d.limit!=null){m.limit=d.limit|0}if(d.cursor!=null){m.cursor=String(d.cursor)}return m};GetFacebookFriendListMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.fb_access_token="";d.limit=0;d.cursor=""}if(m.fb_access_token!=null&&m.hasOwnProperty("fb_access_token")){d.fb_access_token=m.fb_access_token}if(m.limit!=null&&m.hasOwnProperty("limit")){d.limit=m.limit}if(m.cursor!=null&&m.hasOwnProperty("cursor")){d.cursor=m.cursor}return d};GetFacebookFriendListMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetFacebookFriendListMessage}();Social.GetInboxMessage=function(){function GetInboxMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetInboxMessage.prototype.is_history=false;GetInboxMessage.prototype.is_reverse=false;GetInboxMessage.prototype.not_before_ms=$util.Long?$util.Long.fromBits(0,0,false):0;GetInboxMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.is_history!=null&&m.hasOwnProperty("is_history"))w.uint32(8).bool(m.is_history);if(m.is_reverse!=null&&m.hasOwnProperty("is_reverse"))w.uint32(16).bool(m.is_reverse);if(m.not_before_ms!=null&&m.hasOwnProperty("not_before_ms"))w.uint32(24).int64(m.not_before_ms);return w};GetInboxMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.GetInboxMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.is_history=r.bool();break;case 2:m.is_reverse=r.bool();break;case 3:m.not_before_ms=r.int64();break;default:r.skipType(t&7);break}}return m};GetInboxMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.GetInboxMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Social.GetInboxMessage;if(d.is_history!=null){m.is_history=Boolean(d.is_history)}if(d.is_reverse!=null){m.is_reverse=Boolean(d.is_reverse)}if(d.not_before_ms!=null){if($util.Long)(m.not_before_ms=$util.Long.fromValue(d.not_before_ms)).unsigned=false;else if(typeof d.not_before_ms==="string")m.not_before_ms=parseInt(d.not_before_ms,10);else if(typeof d.not_before_ms==="number")m.not_before_ms=d.not_before_ms;else if(typeof d.not_before_ms==="object")m.not_before_ms=new $util.LongBits(d.not_before_ms.low>>>0,d.not_before_ms.high>>>0).toNumber()}return m};GetInboxMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.is_history=false;d.is_reverse=false;if($util.Long){var n=new $util.Long(0,0,false);d.not_before_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.not_before_ms=o.longs===String?"0":0}if(m.is_history!=null&&m.hasOwnProperty("is_history")){d.is_history=m.is_history}if(m.is_reverse!=null&&m.hasOwnProperty("is_reverse")){d.is_reverse=m.is_reverse}if(m.not_before_ms!=null&&m.hasOwnProperty("not_before_ms")){if(typeof m.not_before_ms==="number")d.not_before_ms=o.longs===String?String(m.not_before_ms):m.not_before_ms;else d.not_before_ms=o.longs===String?$util.Long.prototype.toString.call(m.not_before_ms):o.longs===Number?new $util.LongBits(m.not_before_ms.low>>>0,m.not_before_ms.high>>>0).toNumber():m.not_before_ms}return d};GetInboxMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetInboxMessage}();Social.IsMyFriendMessage=function(){function IsMyFriendMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}IsMyFriendMessage.prototype.player_id="";IsMyFriendMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);return w};IsMyFriendMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.IsMyFriendMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;default:r.skipType(t&7);break}}return m};IsMyFriendMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.IsMyFriendMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Social.IsMyFriendMessage;if(d.player_id!=null){m.player_id=String(d.player_id)}return m};IsMyFriendMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id=""}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}return d};IsMyFriendMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return IsMyFriendMessage}();Social.ListFriendsMessage=function(){function ListFriendsMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListFriendsMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};ListFriendsMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.ListFriendsMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};ListFriendsMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.ListFriendsMessage)return d;return new $root.POGOProtos.Networking.Requests.Social.ListFriendsMessage};ListFriendsMessage.toObject=function toObject(){return{}};ListFriendsMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ListFriendsMessage}();Social.ListFriendStatusMessage=function(){function ListFriendStatusMessage(p){this.player_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListFriendStatusMessage.prototype.player_id=$util.emptyArray;ListFriendStatusMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.player_id.length){for(var i=0;i<m.player_id.length;++i)w.uint32(10).string(m.player_id[i])}return w};ListFriendStatusMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.ListFriendStatusMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.player_id&&m.player_id.length))m.player_id=[];m.player_id.push(r.string());break;default:r.skipType(t&7);break}}return m};ListFriendStatusMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.ListFriendStatusMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Social.ListFriendStatusMessage;if(d.player_id){if(!Array.isArray(d.player_id))throw TypeError(".POGOProtos.Networking.Requests.Social.ListFriendStatusMessage.player_id: array expected");m.player_id=[];for(var i=0;i<d.player_id.length;++i){m.player_id[i]=String(d.player_id[i])}}return m};ListFriendStatusMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.player_id=[]}if(m.player_id&&m.player_id.length){d.player_id=[];for(var j=0;j<m.player_id.length;++j){d.player_id[j]=m.player_id[j]}}return d};ListFriendStatusMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ListFriendStatusMessage}();Social.ListIncomingFriendInvitesMessage=function(){function ListIncomingFriendInvitesMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListIncomingFriendInvitesMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};ListIncomingFriendInvitesMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.ListIncomingFriendInvitesMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};ListIncomingFriendInvitesMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.ListIncomingFriendInvitesMessage)return d;return new $root.POGOProtos.Networking.Requests.Social.ListIncomingFriendInvitesMessage};ListIncomingFriendInvitesMessage.toObject=function toObject(){return{}};ListIncomingFriendInvitesMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ListIncomingFriendInvitesMessage}();Social.ListOutgoingFriendInvitesMessage=function(){function ListOutgoingFriendInvitesMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListOutgoingFriendInvitesMessage.encode=function encode(m,w){if(!w)w=$Writer.create();return w};ListOutgoingFriendInvitesMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.ListOutgoingFriendInvitesMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};ListOutgoingFriendInvitesMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.ListOutgoingFriendInvitesMessage)return d;return new $root.POGOProtos.Networking.Requests.Social.ListOutgoingFriendInvitesMessage};ListOutgoingFriendInvitesMessage.toObject=function toObject(){return{}};ListOutgoingFriendInvitesMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ListOutgoingFriendInvitesMessage}();Social.RemoveFriendMessage=function(){function RemoveFriendMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RemoveFriendMessage.prototype.player_id="";RemoveFriendMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);return w};RemoveFriendMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.RemoveFriendMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;default:r.skipType(t&7);break}}return m};RemoveFriendMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.RemoveFriendMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Social.RemoveFriendMessage;if(d.player_id!=null){m.player_id=String(d.player_id)}return m};RemoveFriendMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id=""}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}return d};RemoveFriendMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RemoveFriendMessage}();Social.SearchPlayerMessage=function(){function SearchPlayerMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SearchPlayerMessage.prototype.friend_code="";SearchPlayerMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.friend_code!=null&&m.hasOwnProperty("friend_code"))w.uint32(10).string(m.friend_code);return w};SearchPlayerMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.SearchPlayerMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.friend_code=r.string();break;default:r.skipType(t&7);break}}return m};SearchPlayerMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.SearchPlayerMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Social.SearchPlayerMessage;if(d.friend_code!=null){m.friend_code=String(d.friend_code)}return m};SearchPlayerMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.friend_code=""}if(m.friend_code!=null&&m.hasOwnProperty("friend_code")){d.friend_code=m.friend_code}return d};SearchPlayerMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SearchPlayerMessage}();Social.SendFacebookFriendInviteMessage=function(){function SendFacebookFriendInviteMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SendFacebookFriendInviteMessage.prototype.fb_access_token="";SendFacebookFriendInviteMessage.prototype.friend_fb_user_id="";SendFacebookFriendInviteMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fb_access_token!=null&&m.hasOwnProperty("fb_access_token"))w.uint32(10).string(m.fb_access_token);if(m.friend_fb_user_id!=null&&m.hasOwnProperty("friend_fb_user_id"))w.uint32(18).string(m.friend_fb_user_id);return w};SendFacebookFriendInviteMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.SendFacebookFriendInviteMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fb_access_token=r.string();break;case 2:m.friend_fb_user_id=r.string();break;default:r.skipType(t&7);break}}return m};SendFacebookFriendInviteMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.SendFacebookFriendInviteMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Social.SendFacebookFriendInviteMessage;if(d.fb_access_token!=null){m.fb_access_token=String(d.fb_access_token)}if(d.friend_fb_user_id!=null){m.friend_fb_user_id=String(d.friend_fb_user_id)}return m};SendFacebookFriendInviteMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.fb_access_token="";d.friend_fb_user_id=""}if(m.fb_access_token!=null&&m.hasOwnProperty("fb_access_token")){d.fb_access_token=m.fb_access_token}if(m.friend_fb_user_id!=null&&m.hasOwnProperty("friend_fb_user_id")){d.friend_fb_user_id=m.friend_fb_user_id}return d};SendFacebookFriendInviteMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SendFacebookFriendInviteMessage}();Social.SendFriendInviteMessage=function(){function SendFriendInviteMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SendFriendInviteMessage.prototype.player_id="";SendFriendInviteMessage.prototype.friend_code="";SendFriendInviteMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(10).string(m.player_id);if(m.friend_code!=null&&m.hasOwnProperty("friend_code"))w.uint32(18).string(m.friend_code);return w};SendFriendInviteMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.SendFriendInviteMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player_id=r.string();break;case 2:m.friend_code=r.string();break;default:r.skipType(t&7);break}}return m};SendFriendInviteMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.SendFriendInviteMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Social.SendFriendInviteMessage;if(d.player_id!=null){m.player_id=String(d.player_id)}if(d.friend_code!=null){m.friend_code=String(d.friend_code)}return m};SendFriendInviteMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player_id="";d.friend_code=""}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}if(m.friend_code!=null&&m.hasOwnProperty("friend_code")){d.friend_code=m.friend_code}return d};SendFriendInviteMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SendFriendInviteMessage}();Social.UpdateFacebookStatusMessage=function(){function UpdateFacebookStatusMessage(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateFacebookStatusMessage.prototype.fb_access_token="";UpdateFacebookStatusMessage.prototype.force_update=false;UpdateFacebookStatusMessage.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fb_access_token!=null&&m.hasOwnProperty("fb_access_token"))w.uint32(10).string(m.fb_access_token);if(m.force_update!=null&&m.hasOwnProperty("force_update"))w.uint32(16).bool(m.force_update);return w};UpdateFacebookStatusMessage.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Requests.Social.UpdateFacebookStatusMessage;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fb_access_token=r.string();break;case 2:m.force_update=r.bool();break;default:r.skipType(t&7);break}}return m};UpdateFacebookStatusMessage.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Requests.Social.UpdateFacebookStatusMessage)return d;var m=new $root.POGOProtos.Networking.Requests.Social.UpdateFacebookStatusMessage;if(d.fb_access_token!=null){m.fb_access_token=String(d.fb_access_token)}if(d.force_update!=null){m.force_update=Boolean(d.force_update)}return m};UpdateFacebookStatusMessage.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.fb_access_token="";d.force_update=false}if(m.fb_access_token!=null&&m.hasOwnProperty("fb_access_token")){d.fb_access_token=m.fb_access_token}if(m.force_update!=null&&m.hasOwnProperty("force_update")){d.force_update=m.force_update}return d};UpdateFacebookStatusMessage.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UpdateFacebookStatusMessage}();return Social}();return Requests}();Networking.Responses=function(){var Responses={};Responses.AcceptCombatChallengeResponse=function(){function AcceptCombatChallengeResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AcceptCombatChallengeResponse.prototype.result=0;AcceptCombatChallengeResponse.prototype.challenge=null;AcceptCombatChallengeResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.challenge!=null&&m.hasOwnProperty("challenge"))$root.POGOProtos.Data.Combat.CombatChallenge.encode(m.challenge,w.uint32(18).fork()).ldelim();return w};AcceptCombatChallengeResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.AcceptCombatChallengeResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.challenge=$root.POGOProtos.Data.Combat.CombatChallenge.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};AcceptCombatChallengeResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.AcceptCombatChallengeResponse)return d;var m=new $root.POGOProtos.Networking.Responses.AcceptCombatChallengeResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALID_CHALLENGE_STATE":case 2:m.result=2;break;case"ERROR_CHALLENGE_NOT_FOUND":case 3:m.result=3;break;case"ERROR_POKEMON_NOT_IN_INVENTORY":case 4:m.result=4;break;case"ERROR_NOT_ELIGIBLE_LEAGUE":case 5:m.result=5;break;case"ERROR_PLAYER_BELOW_MINIMUM_LEVEL":case 6:m.result=6;break;case"ERROR_OPPONENT_NOT_IN_RANGE":case 7:m.result=7;break;case"ERROR_ALREADY_TIMEDOUT":case 8:m.result=8;break;case"ERROR_ALREADY_CANCELLED":case 9:m.result=9;break;case"ERROR_ACCESS_DENIED":case 10:m.result=10;break}if(d.challenge!=null){if(typeof d.challenge!=="object")throw TypeError(".POGOProtos.Networking.Responses.AcceptCombatChallengeResponse.challenge: object expected");m.challenge=$root.POGOProtos.Data.Combat.CombatChallenge.fromObject(d.challenge)}return m};AcceptCombatChallengeResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.challenge=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.AcceptCombatChallengeResponse.Result[m.result]:m.result}if(m.challenge!=null&&m.hasOwnProperty("challenge")){d.challenge=$root.POGOProtos.Data.Combat.CombatChallenge.toObject(m.challenge,o)}return d};AcceptCombatChallengeResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AcceptCombatChallengeResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_CHALLENGE_STATE"]=2;values[valuesById[3]="ERROR_CHALLENGE_NOT_FOUND"]=3;values[valuesById[4]="ERROR_POKEMON_NOT_IN_INVENTORY"]=4;values[valuesById[5]="ERROR_NOT_ELIGIBLE_LEAGUE"]=5;values[valuesById[6]="ERROR_PLAYER_BELOW_MINIMUM_LEVEL"]=6;values[valuesById[7]="ERROR_OPPONENT_NOT_IN_RANGE"]=7;values[valuesById[8]="ERROR_ALREADY_TIMEDOUT"]=8;values[valuesById[9]="ERROR_ALREADY_CANCELLED"]=9;values[valuesById[10]="ERROR_ACCESS_DENIED"]=10;return values}();return AcceptCombatChallengeResponse}();Responses.AcknowledgePunishmentResponse=function(){function AcknowledgePunishmentResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AcknowledgePunishmentResponse.prototype.result=0;AcknowledgePunishmentResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};AcknowledgePunishmentResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.AcknowledgePunishmentResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};AcknowledgePunishmentResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.AcknowledgePunishmentResponse)return d;var m=new $root.POGOProtos.Networking.Responses.AcknowledgePunishmentResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break}return m};AcknowledgePunishmentResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.AcknowledgePunishmentResponse.Result[m.result]:m.result}return d};AcknowledgePunishmentResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AcknowledgePunishmentResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;return values}();return AcknowledgePunishmentResponse}();Responses.AddFortModifierResponse=function(){function AddFortModifierResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AddFortModifierResponse.prototype.result=0;AddFortModifierResponse.prototype.fort_details=null;AddFortModifierResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.fort_details!=null&&m.hasOwnProperty("fort_details"))$root.POGOProtos.Networking.Responses.FortDetailsResponse.encode(m.fort_details,w.uint32(18).fork()).ldelim();return w};AddFortModifierResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.AddFortModifierResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.fort_details=$root.POGOProtos.Networking.Responses.FortDetailsResponse.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};AddFortModifierResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.AddFortModifierResponse)return d;var m=new $root.POGOProtos.Networking.Responses.AddFortModifierResponse;switch(d.result){case"NO_RESULT_SET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"FORT_ALREADY_HAS_MODIFIER":case 2:m.result=2;break;case"TOO_FAR_AWAY":case 3:m.result=3;break;case"NO_ITEM_IN_INVENTORY":case 4:m.result=4;break;case"POI_INACCESSIBLE":case 5:m.result=5;break}if(d.fort_details!=null){if(typeof d.fort_details!=="object")throw TypeError(".POGOProtos.Networking.Responses.AddFortModifierResponse.fort_details: object expected");m.fort_details=$root.POGOProtos.Networking.Responses.FortDetailsResponse.fromObject(d.fort_details)}return m};AddFortModifierResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"NO_RESULT_SET":0;d.fort_details=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.AddFortModifierResponse.Result[m.result]:m.result}if(m.fort_details!=null&&m.hasOwnProperty("fort_details")){d.fort_details=$root.POGOProtos.Networking.Responses.FortDetailsResponse.toObject(m.fort_details,o)}return d};AddFortModifierResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AddFortModifierResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NO_RESULT_SET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FORT_ALREADY_HAS_MODIFIER"]=2;values[valuesById[3]="TOO_FAR_AWAY"]=3;values[valuesById[4]="NO_ITEM_IN_INVENTORY"]=4;values[valuesById[5]="POI_INACCESSIBLE"]=5;return values}();return AddFortModifierResponse}();Responses.AttackGymResponse=function(){function AttackGymResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AttackGymResponse.prototype.result=0;AttackGymResponse.prototype.battle_log=null;AttackGymResponse.prototype.battle_id="";AttackGymResponse.prototype.active_defender=null;AttackGymResponse.prototype.active_attacker=null;AttackGymResponse.prototype.battle_update=null;AttackGymResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.battle_log!=null&&m.hasOwnProperty("battle_log"))$root.POGOProtos.Data.Battle.BattleLog.encode(m.battle_log,w.uint32(18).fork()).ldelim();if(m.battle_id!=null&&m.hasOwnProperty("battle_id"))w.uint32(26).string(m.battle_id);if(m.active_defender!=null&&m.hasOwnProperty("active_defender"))$root.POGOProtos.Data.Battle.BattlePokemonInfo.encode(m.active_defender,w.uint32(34).fork()).ldelim();if(m.active_attacker!=null&&m.hasOwnProperty("active_attacker"))$root.POGOProtos.Data.Battle.BattlePokemonInfo.encode(m.active_attacker,w.uint32(42).fork()).ldelim();if(m.battle_update!=null&&m.hasOwnProperty("battle_update"))$root.POGOProtos.Data.Battle.BattleUpdate.encode(m.battle_update,w.uint32(50).fork()).ldelim();return w};AttackGymResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.AttackGymResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.battle_log=$root.POGOProtos.Data.Battle.BattleLog.decode(r,r.uint32());break;case 3:m.battle_id=r.string();break;case 4:m.active_defender=$root.POGOProtos.Data.Battle.BattlePokemonInfo.decode(r,r.uint32());break;case 5:m.active_attacker=$root.POGOProtos.Data.Battle.BattlePokemonInfo.decode(r,r.uint32());break;case 6:m.battle_update=$root.POGOProtos.Data.Battle.BattleUpdate.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};AttackGymResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.AttackGymResponse)return d;var m=new $root.POGOProtos.Networking.Responses.AttackGymResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALID_ATTACK_ACTIONS":case 2:m.result=2;break;case"ERROR_NOT_IN_RANGE":case 3:m.result=3;break}if(d.battle_log!=null){if(typeof d.battle_log!=="object")throw TypeError(".POGOProtos.Networking.Responses.AttackGymResponse.battle_log: object expected");m.battle_log=$root.POGOProtos.Data.Battle.BattleLog.fromObject(d.battle_log)}if(d.battle_id!=null){m.battle_id=String(d.battle_id)}if(d.active_defender!=null){if(typeof d.active_defender!=="object")throw TypeError(".POGOProtos.Networking.Responses.AttackGymResponse.active_defender: object expected");m.active_defender=$root.POGOProtos.Data.Battle.BattlePokemonInfo.fromObject(d.active_defender)}if(d.active_attacker!=null){if(typeof d.active_attacker!=="object")throw TypeError(".POGOProtos.Networking.Responses.AttackGymResponse.active_attacker: object expected");m.active_attacker=$root.POGOProtos.Data.Battle.BattlePokemonInfo.fromObject(d.active_attacker)}if(d.battle_update!=null){if(typeof d.battle_update!=="object")throw TypeError(".POGOProtos.Networking.Responses.AttackGymResponse.battle_update: object expected");m.battle_update=$root.POGOProtos.Data.Battle.BattleUpdate.fromObject(d.battle_update)}return m};AttackGymResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.battle_log=null;d.battle_id="";d.active_defender=null;d.active_attacker=null;d.battle_update=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.AttackGymResponse.Result[m.result]:m.result}if(m.battle_log!=null&&m.hasOwnProperty("battle_log")){d.battle_log=$root.POGOProtos.Data.Battle.BattleLog.toObject(m.battle_log,o)}if(m.battle_id!=null&&m.hasOwnProperty("battle_id")){d.battle_id=m.battle_id}if(m.active_defender!=null&&m.hasOwnProperty("active_defender")){d.active_defender=$root.POGOProtos.Data.Battle.BattlePokemonInfo.toObject(m.active_defender,o)}if(m.active_attacker!=null&&m.hasOwnProperty("active_attacker")){d.active_attacker=$root.POGOProtos.Data.Battle.BattlePokemonInfo.toObject(m.active_attacker,o)}if(m.battle_update!=null&&m.hasOwnProperty("battle_update")){d.battle_update=$root.POGOProtos.Data.Battle.BattleUpdate.toObject(m.battle_update,o)}return d};AttackGymResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AttackGymResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_ATTACK_ACTIONS"]=2;values[valuesById[3]="ERROR_NOT_IN_RANGE"]=3;return values}();return AttackGymResponse}();Responses.AttackRaidBattleResponse=function(){function AttackRaidBattleResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AttackRaidBattleResponse.prototype.result=0;AttackRaidBattleResponse.prototype.battle_update=null;AttackRaidBattleResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.battle_update!=null&&m.hasOwnProperty("battle_update"))$root.POGOProtos.Data.Battle.BattleUpdate.encode(m.battle_update,w.uint32(18).fork()).ldelim();return w};AttackRaidBattleResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.AttackRaidBattleResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.battle_update=$root.POGOProtos.Data.Battle.BattleUpdate.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};AttackRaidBattleResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.AttackRaidBattleResponse)return d;var m=new $root.POGOProtos.Networking.Responses.AttackRaidBattleResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_GYM_NOT_FOUND":case 2:m.result=2;break;case"ERROR_BATTLE_NOT_FOUND":case 3:m.result=3;break;case"ERROR_INVALID_ATTACK_ACTIONS":case 4:m.result=4;break;case"ERROR_NOT_PART_OF_BATTLE":case 5:m.result=5;break;case"ERROR_BATTLE_ID_NOT_RAID":case 6:m.result=6;break}if(d.battle_update!=null){if(typeof d.battle_update!=="object")throw TypeError(".POGOProtos.Networking.Responses.AttackRaidBattleResponse.battle_update: object expected");m.battle_update=$root.POGOProtos.Data.Battle.BattleUpdate.fromObject(d.battle_update)}return m};AttackRaidBattleResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.battle_update=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.AttackRaidBattleResponse.Result[m.result]:m.result}if(m.battle_update!=null&&m.hasOwnProperty("battle_update")){d.battle_update=$root.POGOProtos.Data.Battle.BattleUpdate.toObject(m.battle_update,o)}return d};AttackRaidBattleResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AttackRaidBattleResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_GYM_NOT_FOUND"]=2;values[valuesById[3]="ERROR_BATTLE_NOT_FOUND"]=3;values[valuesById[4]="ERROR_INVALID_ATTACK_ACTIONS"]=4;values[valuesById[5]="ERROR_NOT_PART_OF_BATTLE"]=5;values[valuesById[6]="ERROR_BATTLE_ID_NOT_RAID"]=6;return values}();return AttackRaidBattleResponse}();Responses.AwardFreeRaidTicketResponse=function(){function AwardFreeRaidTicketResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AwardFreeRaidTicketResponse.prototype.result=0;AwardFreeRaidTicketResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};AwardFreeRaidTicketResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.AwardFreeRaidTicketResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};AwardFreeRaidTicketResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.AwardFreeRaidTicketResponse)return d;var m=new $root.POGOProtos.Networking.Responses.AwardFreeRaidTicketResponse;switch(d.result){case"NO_RESULT_SET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_PLAYER_DOES_NOT_MEET_MIN_LEVEL":case 2:m.result=2;break;case"ERROR_DAILY_TICKET_ALREADY_AWARDED":case 3:m.result=3;break;case"ERROR_PLAYER_OUT_OF_RANGE":case 4:m.result=4;break}return m};AwardFreeRaidTicketResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"NO_RESULT_SET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.AwardFreeRaidTicketResponse.Result[m.result]:m.result}return d};AwardFreeRaidTicketResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AwardFreeRaidTicketResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NO_RESULT_SET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_PLAYER_DOES_NOT_MEET_MIN_LEVEL"]=2;values[valuesById[3]="ERROR_DAILY_TICKET_ALREADY_AWARDED"]=3;values[valuesById[4]="ERROR_PLAYER_OUT_OF_RANGE"]=4;return values}();return AwardFreeRaidTicketResponse}();Responses.BelugaTransactionCompleteResponse=function(){function BelugaTransactionCompleteResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BelugaTransactionCompleteResponse.prototype.status=0;BelugaTransactionCompleteResponse.prototype.candy_awarded=0;BelugaTransactionCompleteResponse.prototype.loot_awarded=null;BelugaTransactionCompleteResponse.prototype.beluga_finalize_response=null;BelugaTransactionCompleteResponse.prototype.buckets_until_weekly_award=0;BelugaTransactionCompleteResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.candy_awarded!=null&&m.hasOwnProperty("candy_awarded"))w.uint32(16).int32(m.candy_awarded);if(m.loot_awarded!=null&&m.hasOwnProperty("loot_awarded"))$root.POGOProtos.Inventory.Loot.encode(m.loot_awarded,w.uint32(26).fork()).ldelim();if(m.beluga_finalize_response!=null&&m.hasOwnProperty("beluga_finalize_response"))$root.POGOProtos.Data.Beluga.BelugaBleFinalizeTransfer.encode(m.beluga_finalize_response,w.uint32(34).fork()).ldelim();if(m.buckets_until_weekly_award!=null&&m.hasOwnProperty("buckets_until_weekly_award"))w.uint32(40).int32(m.buckets_until_weekly_award);return w};BelugaTransactionCompleteResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.BelugaTransactionCompleteResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.candy_awarded=r.int32();break;case 3:m.loot_awarded=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;case 4:m.beluga_finalize_response=$root.POGOProtos.Data.Beluga.BelugaBleFinalizeTransfer.decode(r,r.uint32());break;case 5:m.buckets_until_weekly_award=r.int32();break;default:r.skipType(t&7);break}}return m};BelugaTransactionCompleteResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.BelugaTransactionCompleteResponse)return d;var m=new $root.POGOProtos.Networking.Responses.BelugaTransactionCompleteResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"FAILED":case 2:m.status=2;break;case"ERROR_INVALID_POKEMON_ID":case 3:m.status=3;break;case"ERROR_POKEMON_DEPLOYED":case 4:m.status=4;break;case"ERROR_POKEMON_NOT_ALLOWED":case 5:m.status=5;break;case"ERROR_POKEMON_IS_BUDDY":case 6:m.status=6;break;case"ERROR_INVALID_TRANSACTION_ID":case 7:m.status=7;break;case"ERROR_MISSING_TRANSACTION_ID":case 8:m.status=8;break}if(d.candy_awarded!=null){m.candy_awarded=d.candy_awarded|0}if(d.loot_awarded!=null){if(typeof d.loot_awarded!=="object")throw TypeError(".POGOProtos.Networking.Responses.BelugaTransactionCompleteResponse.loot_awarded: object expected");m.loot_awarded=$root.POGOProtos.Inventory.Loot.fromObject(d.loot_awarded)}if(d.beluga_finalize_response!=null){if(typeof d.beluga_finalize_response!=="object")throw TypeError(".POGOProtos.Networking.Responses.BelugaTransactionCompleteResponse.beluga_finalize_response: object expected");m.beluga_finalize_response=$root.POGOProtos.Data.Beluga.BelugaBleFinalizeTransfer.fromObject(d.beluga_finalize_response)}if(d.buckets_until_weekly_award!=null){m.buckets_until_weekly_award=d.buckets_until_weekly_award|0}return m};BelugaTransactionCompleteResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0;d.candy_awarded=0;d.loot_awarded=null;d.beluga_finalize_response=null;d.buckets_until_weekly_award=0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.BelugaTransactionCompleteResponse.Status[m.status]:m.status}if(m.candy_awarded!=null&&m.hasOwnProperty("candy_awarded")){d.candy_awarded=m.candy_awarded}if(m.loot_awarded!=null&&m.hasOwnProperty("loot_awarded")){d.loot_awarded=$root.POGOProtos.Inventory.Loot.toObject(m.loot_awarded,o)}if(m.beluga_finalize_response!=null&&m.hasOwnProperty("beluga_finalize_response")){d.beluga_finalize_response=$root.POGOProtos.Data.Beluga.BelugaBleFinalizeTransfer.toObject(m.beluga_finalize_response,o)}if(m.buckets_until_weekly_award!=null&&m.hasOwnProperty("buckets_until_weekly_award")){d.buckets_until_weekly_award=m.buckets_until_weekly_award}return d};BelugaTransactionCompleteResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BelugaTransactionCompleteResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILED"]=2;values[valuesById[3]="ERROR_INVALID_POKEMON_ID"]=3;values[valuesById[4]="ERROR_POKEMON_DEPLOYED"]=4;values[valuesById[5]="ERROR_POKEMON_NOT_ALLOWED"]=5;values[valuesById[6]="ERROR_POKEMON_IS_BUDDY"]=6;values[valuesById[7]="ERROR_INVALID_TRANSACTION_ID"]=7;values[valuesById[8]="ERROR_MISSING_TRANSACTION_ID"]=8;return values}();return BelugaTransactionCompleteResponse}();Responses.BelugaTransactionStartResponse=function(){function BelugaTransactionStartResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BelugaTransactionStartResponse.prototype.status=0;BelugaTransactionStartResponse.prototype.beluga_transfer_prep=null;BelugaTransactionStartResponse.prototype.server_signature=$util.newBuffer([]);BelugaTransactionStartResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.beluga_transfer_prep!=null&&m.hasOwnProperty("beluga_transfer_prep"))$root.POGOProtos.Data.Beluga.BelugaBleTransferPrep.encode(m.beluga_transfer_prep,w.uint32(18).fork()).ldelim();if(m.server_signature!=null&&m.hasOwnProperty("server_signature"))w.uint32(26).bytes(m.server_signature);return w};BelugaTransactionStartResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.BelugaTransactionStartResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.beluga_transfer_prep=$root.POGOProtos.Data.Beluga.BelugaBleTransferPrep.decode(r,r.uint32());break;case 3:m.server_signature=r.bytes();break;default:r.skipType(t&7);break}}return m};BelugaTransactionStartResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.BelugaTransactionStartResponse)return d;var m=new $root.POGOProtos.Networking.Responses.BelugaTransactionStartResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"FAILED":case 2:m.status=2;break;case"ERROR_INVALID_POKEMON_ID":case 3:m.status=3;break;case"ERROR_POKEMON_DEPLOYED":case 4:m.status=4;break;case"ERROR_POKEMON_IS_EGG":case 5:m.status=5;break;case"ERROR_POKEMON_IS_BUDDY":case 6:m.status=6;break;case"ERROR_POKEMON_NOT_ALLOWED":case 7:m.status=7;break;case"ERROR_INVALID_NONCE":case 8:m.status=8;break;case"ERROR_TOO_MANY_POKEMON":case 9:m.status=9;break;case"ERROR_NO_POKEMON_SPECIFIED":case 10:m.status=10;break}if(d.beluga_transfer_prep!=null){if(typeof d.beluga_transfer_prep!=="object")throw TypeError(".POGOProtos.Networking.Responses.BelugaTransactionStartResponse.beluga_transfer_prep: object expected");m.beluga_transfer_prep=$root.POGOProtos.Data.Beluga.BelugaBleTransferPrep.fromObject(d.beluga_transfer_prep)}if(d.server_signature!=null){if(typeof d.server_signature==="string")$util.base64.decode(d.server_signature,m.server_signature=$util.newBuffer($util.base64.length(d.server_signature)),0);else if(d.server_signature.length)m.server_signature=d.server_signature}return m};BelugaTransactionStartResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0;d.beluga_transfer_prep=null;if(o.bytes===String)d.server_signature="";else{d.server_signature=[];if(o.bytes!==Array)d.server_signature=$util.newBuffer(d.server_signature)}}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.BelugaTransactionStartResponse.Status[m.status]:m.status}if(m.beluga_transfer_prep!=null&&m.hasOwnProperty("beluga_transfer_prep")){d.beluga_transfer_prep=$root.POGOProtos.Data.Beluga.BelugaBleTransferPrep.toObject(m.beluga_transfer_prep,o)}if(m.server_signature!=null&&m.hasOwnProperty("server_signature")){d.server_signature=o.bytes===String?$util.base64.encode(m.server_signature,0,m.server_signature.length):o.bytes===Array?Array.prototype.slice.call(m.server_signature):m.server_signature}return d};BelugaTransactionStartResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};BelugaTransactionStartResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILED"]=2;values[valuesById[3]="ERROR_INVALID_POKEMON_ID"]=3;values[valuesById[4]="ERROR_POKEMON_DEPLOYED"]=4;values[valuesById[5]="ERROR_POKEMON_IS_EGG"]=5;values[valuesById[6]="ERROR_POKEMON_IS_BUDDY"]=6;values[valuesById[7]="ERROR_POKEMON_NOT_ALLOWED"]=7;values[valuesById[8]="ERROR_INVALID_NONCE"]=8;values[valuesById[9]="ERROR_TOO_MANY_POKEMON"]=9;values[valuesById[10]="ERROR_NO_POKEMON_SPECIFIED"]=10;return values}();return BelugaTransactionStartResponse}();Responses.CancelCombatChallengeResponse=function(){function CancelCombatChallengeResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CancelCombatChallengeResponse.prototype.result=0;CancelCombatChallengeResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};CancelCombatChallengeResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.CancelCombatChallengeResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};CancelCombatChallengeResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.CancelCombatChallengeResponse)return d;var m=new $root.POGOProtos.Networking.Responses.CancelCombatChallengeResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALID_CHALLENGE_STATE":case 2:m.result=2;break;case"ERROR_CHALLENGE_NOT_FOUND":case 3:m.result=3;break;case"ERROR_ALREADY_ACCEPTED":case 4:m.result=4;break;case"ERROR_ALREADY_DECLINED":case 5:m.result=5;break;case"ERROR_ALREADY_TIMEDOUT":case 6:m.result=6;break;case"ERROR_ACCESS_DENIED":case 7:m.result=7;break}return m};CancelCombatChallengeResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.CancelCombatChallengeResponse.Result[m.result]:m.result}return d};CancelCombatChallengeResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CancelCombatChallengeResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_CHALLENGE_STATE"]=2;values[valuesById[3]="ERROR_CHALLENGE_NOT_FOUND"]=3;values[valuesById[4]="ERROR_ALREADY_ACCEPTED"]=4;values[valuesById[5]="ERROR_ALREADY_DECLINED"]=5;values[valuesById[6]="ERROR_ALREADY_TIMEDOUT"]=6;values[valuesById[7]="ERROR_ACCESS_DENIED"]=7;return values}();return CancelCombatChallengeResponse}();Responses.CancelTradingResponse=function(){function CancelTradingResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CancelTradingResponse.prototype.result=0;CancelTradingResponse.prototype.trading=null;CancelTradingResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.trading!=null&&m.hasOwnProperty("trading"))$root.POGOProtos.Data.Trading.Trading.encode(m.trading,w.uint32(18).fork()).ldelim();return w};CancelTradingResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.CancelTradingResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.trading=$root.POGOProtos.Data.Trading.Trading.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};CancelTradingResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.CancelTradingResponse)return d;var m=new $root.POGOProtos.Networking.Responses.CancelTradingResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_FRIEND_NOT_FOUND":case 3:m.result=3;break;case"ERROR_INVALID_PLAYER_ID":case 4:m.result=4;break;case"ERROR_INVALID_STATE":case 5:m.result=5;break;case"ERROR_STATE_HANDLER":case 6:m.result=6;break}if(d.trading!=null){if(typeof d.trading!=="object")throw TypeError(".POGOProtos.Networking.Responses.CancelTradingResponse.trading: object expected");m.trading=$root.POGOProtos.Data.Trading.Trading.fromObject(d.trading)}return m};CancelTradingResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.trading=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.CancelTradingResponse.Result[m.result]:m.result}if(m.trading!=null&&m.hasOwnProperty("trading")){d.trading=$root.POGOProtos.Data.Trading.Trading.toObject(m.trading,o)}return d};CancelTradingResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CancelTradingResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_FRIEND_NOT_FOUND"]=3;values[valuesById[4]="ERROR_INVALID_PLAYER_ID"]=4;values[valuesById[5]="ERROR_INVALID_STATE"]=5;values[valuesById[6]="ERROR_STATE_HANDLER"]=6;return values}();return CancelTradingResponse}();Responses.CatchPokemonResponse=function(){function CatchPokemonResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CatchPokemonResponse.prototype.status=0;CatchPokemonResponse.prototype.miss_percent=0;CatchPokemonResponse.prototype.captured_pokemon_id=$util.Long?$util.Long.fromBits(0,0,false):0;CatchPokemonResponse.prototype.capture_award=null;CatchPokemonResponse.prototype.capture_reason=0;CatchPokemonResponse.prototype.display_pokedex_id=0;CatchPokemonResponse.prototype.throws_remaining=0;CatchPokemonResponse.prototype.pokemon_display=null;CatchPokemonResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.miss_percent!=null&&m.hasOwnProperty("miss_percent"))w.uint32(17).double(m.miss_percent);if(m.captured_pokemon_id!=null&&m.hasOwnProperty("captured_pokemon_id"))w.uint32(25).fixed64(m.captured_pokemon_id);if(m.capture_award!=null&&m.hasOwnProperty("capture_award"))$root.POGOProtos.Data.Capture.CaptureAward.encode(m.capture_award,w.uint32(34).fork()).ldelim();if(m.capture_reason!=null&&m.hasOwnProperty("capture_reason"))w.uint32(40).int32(m.capture_reason);if(m.display_pokedex_id!=null&&m.hasOwnProperty("display_pokedex_id"))w.uint32(48).int32(m.display_pokedex_id);if(m.throws_remaining!=null&&m.hasOwnProperty("throws_remaining"))w.uint32(56).int32(m.throws_remaining);if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display"))$root.POGOProtos.Data.PokemonDisplay.encode(m.pokemon_display,w.uint32(66).fork()).ldelim();return w};CatchPokemonResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.CatchPokemonResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.miss_percent=r.double();break;case 3:m.captured_pokemon_id=r.fixed64();break;case 4:m.capture_award=$root.POGOProtos.Data.Capture.CaptureAward.decode(r,r.uint32());break;case 5:m.capture_reason=r.int32();break;case 6:m.display_pokedex_id=r.int32();break;case 7:m.throws_remaining=r.int32();break;case 8:m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};CatchPokemonResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.CatchPokemonResponse)return d;var m=new $root.POGOProtos.Networking.Responses.CatchPokemonResponse;switch(d.status){case"CATCH_ERROR":case 0:m.status=0;break;case"CATCH_SUCCESS":case 1:m.status=1;break;case"CATCH_ESCAPE":case 2:m.status=2;break;case"CATCH_FLEE":case 3:m.status=3;break;case"CATCH_MISSED":case 4:m.status=4;break}if(d.miss_percent!=null){m.miss_percent=Number(d.miss_percent)}if(d.captured_pokemon_id!=null){if($util.Long)(m.captured_pokemon_id=$util.Long.fromValue(d.captured_pokemon_id)).unsigned=false;else if(typeof d.captured_pokemon_id==="string")m.captured_pokemon_id=parseInt(d.captured_pokemon_id,10);else if(typeof d.captured_pokemon_id==="number")m.captured_pokemon_id=d.captured_pokemon_id;else if(typeof d.captured_pokemon_id==="object")m.captured_pokemon_id=new $util.LongBits(d.captured_pokemon_id.low>>>0,d.captured_pokemon_id.high>>>0).toNumber()}if(d.capture_award!=null){if(typeof d.capture_award!=="object")throw TypeError(".POGOProtos.Networking.Responses.CatchPokemonResponse.capture_award: object expected");m.capture_award=$root.POGOProtos.Data.Capture.CaptureAward.fromObject(d.capture_award)}switch(d.capture_reason){case"UNSET":case 0:m.capture_reason=0;break;case"DEFAULT":case 1:m.capture_reason=1;break;case"ELEMENTAL_BADGE":case 2:m.capture_reason=2;break;case"CRITICAL_CATCH":case 3:m.capture_reason=3;break}if(d.display_pokedex_id!=null){m.display_pokedex_id=d.display_pokedex_id|0}if(d.throws_remaining!=null){m.throws_remaining=d.throws_remaining|0}if(d.pokemon_display!=null){if(typeof d.pokemon_display!=="object")throw TypeError(".POGOProtos.Networking.Responses.CatchPokemonResponse.pokemon_display: object expected");m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.pokemon_display)}return m};CatchPokemonResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"CATCH_ERROR":0;d.miss_percent=0;if($util.Long){var n=new $util.Long(0,0,false);d.captured_pokemon_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.captured_pokemon_id=o.longs===String?"0":0;d.capture_award=null;d.capture_reason=o.enums===String?"UNSET":0;d.display_pokedex_id=0;d.throws_remaining=0;d.pokemon_display=null}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.CatchPokemonResponse.CatchStatus[m.status]:m.status}if(m.miss_percent!=null&&m.hasOwnProperty("miss_percent")){d.miss_percent=o.json&&!isFinite(m.miss_percent)?String(m.miss_percent):m.miss_percent}if(m.captured_pokemon_id!=null&&m.hasOwnProperty("captured_pokemon_id")){if(typeof m.captured_pokemon_id==="number")d.captured_pokemon_id=o.longs===String?String(m.captured_pokemon_id):m.captured_pokemon_id;else d.captured_pokemon_id=o.longs===String?$util.Long.prototype.toString.call(m.captured_pokemon_id):o.longs===Number?new $util.LongBits(m.captured_pokemon_id.low>>>0,m.captured_pokemon_id.high>>>0).toNumber():m.captured_pokemon_id}if(m.capture_award!=null&&m.hasOwnProperty("capture_award")){d.capture_award=$root.POGOProtos.Data.Capture.CaptureAward.toObject(m.capture_award,o)}if(m.capture_reason!=null&&m.hasOwnProperty("capture_reason")){d.capture_reason=o.enums===String?$root.POGOProtos.Networking.Responses.CatchPokemonResponse.CaptureReason[m.capture_reason]:m.capture_reason}if(m.display_pokedex_id!=null&&m.hasOwnProperty("display_pokedex_id")){d.display_pokedex_id=m.display_pokedex_id}if(m.throws_remaining!=null&&m.hasOwnProperty("throws_remaining")){d.throws_remaining=m.throws_remaining}if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display")){d.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.toObject(m.pokemon_display,o)}return d};CatchPokemonResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CatchPokemonResponse.CatchStatus=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="CATCH_ERROR"]=0;values[valuesById[1]="CATCH_SUCCESS"]=1;values[valuesById[2]="CATCH_ESCAPE"]=2;values[valuesById[3]="CATCH_FLEE"]=3;values[valuesById[4]="CATCH_MISSED"]=4;return values}();CatchPokemonResponse.CaptureReason=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="DEFAULT"]=1;values[valuesById[2]="ELEMENTAL_BADGE"]=2;values[valuesById[3]="CRITICAL_CATCH"]=3;return values}();return CatchPokemonResponse}();Responses.CheckAwardedBadgesResponse=function(){function CheckAwardedBadgesResponse(p){this.awarded_badges=[];this.awarded_badge_levels=[];this.avatar_template_ids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CheckAwardedBadgesResponse.prototype.success=false;CheckAwardedBadgesResponse.prototype.awarded_badges=$util.emptyArray;CheckAwardedBadgesResponse.prototype.awarded_badge_levels=$util.emptyArray;CheckAwardedBadgesResponse.prototype.avatar_template_ids=$util.emptyArray;CheckAwardedBadgesResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.awarded_badges!=null&&m.awarded_badges.length){w.uint32(18).fork();for(var i=0;i<m.awarded_badges.length;++i)w.int32(m.awarded_badges[i]);w.ldelim()}if(m.awarded_badge_levels!=null&&m.awarded_badge_levels.length){w.uint32(26).fork();for(var i=0;i<m.awarded_badge_levels.length;++i)w.int32(m.awarded_badge_levels[i]);w.ldelim()}if(m.avatar_template_ids!=null&&m.avatar_template_ids.length){for(var i=0;i<m.avatar_template_ids.length;++i)w.uint32(34).string(m.avatar_template_ids[i])}return w};CheckAwardedBadgesResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.CheckAwardedBadgesResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:if(!(m.awarded_badges&&m.awarded_badges.length))m.awarded_badges=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.awarded_badges.push(r.int32())}else m.awarded_badges.push(r.int32());break;case 3:if(!(m.awarded_badge_levels&&m.awarded_badge_levels.length))m.awarded_badge_levels=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.awarded_badge_levels.push(r.int32())}else m.awarded_badge_levels.push(r.int32());break;case 4:if(!(m.avatar_template_ids&&m.avatar_template_ids.length))m.avatar_template_ids=[];m.avatar_template_ids.push(r.string());break;default:r.skipType(t&7);break}}return m};CheckAwardedBadgesResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.CheckAwardedBadgesResponse)return d;var m=new $root.POGOProtos.Networking.Responses.CheckAwardedBadgesResponse;if(d.success!=null){m.success=Boolean(d.success)}if(d.awarded_badges){if(!Array.isArray(d.awarded_badges))throw TypeError(".POGOProtos.Networking.Responses.CheckAwardedBadgesResponse.awarded_badges: array expected");m.awarded_badges=[];for(var i=0;i<d.awarded_badges.length;++i){switch(d.awarded_badges[i]){default:case"BADGE_UNSET":case 0:m.awarded_badges[i]=0;break;case"BADGE_TRAVEL_KM":case 1:m.awarded_badges[i]=1;break;case"BADGE_POKEDEX_ENTRIES":case 2:m.awarded_badges[i]=2;break;case"BADGE_CAPTURE_TOTAL":case 3:m.awarded_badges[i]=3;break;case"BADGE_DEFEATED_FORT":case 4:m.awarded_badges[i]=4;break;case"BADGE_EVOLVED_TOTAL":case 5:m.awarded_badges[i]=5;break;case"BADGE_HATCHED_TOTAL":case 6:m.awarded_badges[i]=6;break;case"BADGE_ENCOUNTERED_TOTAL":case 7:m.awarded_badges[i]=7;break;case"BADGE_POKESTOPS_VISITED":case 8:m.awarded_badges[i]=8;break;case"BADGE_UNIQUE_POKESTOPS":case 9:m.awarded_badges[i]=9;break;case"BADGE_POKEBALL_THROWN":case 10:m.awarded_badges[i]=10;break;case"BADGE_BIG_MAGIKARP":case 11:m.awarded_badges[i]=11;break;case"BADGE_DEPLOYED_TOTAL":case 12:m.awarded_badges[i]=12;break;case"BADGE_BATTLE_ATTACK_WON":case 13:m.awarded_badges[i]=13;break;case"BADGE_BATTLE_TRAINING_WON":case 14:m.awarded_badges[i]=14;break;case"BADGE_BATTLE_DEFEND_WON":case 15:m.awarded_badges[i]=15;break;case"BADGE_PRESTIGE_RAISED":case 16:m.awarded_badges[i]=16;break;case"BADGE_PRESTIGE_DROPPED":case 17:m.awarded_badges[i]=17;break;case"BADGE_TYPE_NORMAL":case 18:m.awarded_badges[i]=18;break;case"BADGE_TYPE_FIGHTING":case 19:m.awarded_badges[i]=19;break;case"BADGE_TYPE_FLYING":case 20:m.awarded_badges[i]=20;break;case"BADGE_TYPE_POISON":case 21:m.awarded_badges[i]=21;break;case"BADGE_TYPE_GROUND":case 22:m.awarded_badges[i]=22;break;case"BADGE_TYPE_ROCK":case 23:m.awarded_badges[i]=23;break;case"BADGE_TYPE_BUG":case 24:m.awarded_badges[i]=24;break;case"BADGE_TYPE_GHOST":case 25:m.awarded_badges[i]=25;break;case"BADGE_TYPE_STEEL":case 26:m.awarded_badges[i]=26;break;case"BADGE_TYPE_FIRE":case 27:m.awarded_badges[i]=27;break;case"BADGE_TYPE_WATER":case 28:m.awarded_badges[i]=28;break;case"BADGE_TYPE_GRASS":case 29:m.awarded_badges[i]=29;break;case"BADGE_TYPE_ELECTRIC":case 30:m.awarded_badges[i]=30;break;case"BADGE_TYPE_PSYCHIC":case 31:m.awarded_badges[i]=31;break;case"BADGE_TYPE_ICE":case 32:m.awarded_badges[i]=32;break;case"BADGE_TYPE_DRAGON":case 33:m.awarded_badges[i]=33;break;case"BADGE_TYPE_DARK":case 34:m.awarded_badges[i]=34;break;case"BADGE_TYPE_FAIRY":case 35:m.awarded_badges[i]=35;break;case"BADGE_SMALL_RATTATA":case 36:m.awarded_badges[i]=36;break;case"BADGE_PIKACHU":case 37:m.awarded_badges[i]=37;break;case"BADGE_UNOWN":case 38:m.awarded_badges[i]=38;break;case"BADGE_POKEDEX_ENTRIES_GEN2":case 39:m.awarded_badges[i]=39;break;case"BADGE_RAID_BATTLE_WON":case 40:m.awarded_badges[i]=40;break;case"BADGE_LEGENDARY_BATTLE_WON":case 41:m.awarded_badges[i]=41;break;case"BADGE_BERRIES_FED":case 42:m.awarded_badges[i]=42;break;case"BADGE_HOURS_DEFENDED":case 43:m.awarded_badges[i]=43;break;case"BADGE_PLACE_HOLDER":case 44:m.awarded_badges[i]=44;break;case"BADGE_POKEDEX_ENTRIES_GEN3":case 45:m.awarded_badges[i]=45;break;case"BADGE_CHALLENGE_QUESTS":case 46:m.awarded_badges[i]=46;break;case"BADGE_MEW_ENCOUNTER":case 47:m.awarded_badges[i]=47;break;case"BADGE_MAX_LEVEL_FRIENDS":case 48:m.awarded_badges[i]=48;break;case"BADGE_TRADING":case 49:m.awarded_badges[i]=49;break;case"BADGE_TRADING_DISTANCE":case 50:m.awarded_badges[i]=50;break;case"BADGE_POKEDEX_ENTRIES_GEN4":case 51:m.awarded_badges[i]=51;break;case"BADGE_GREAT_LEAGUE":case 52:m.awarded_badges[i]=52;break;case"BADGE_ULTRA_LEAGUE":case 53:m.awarded_badges[i]=53;break;case"BADGE_MASTER_LEAGUE":case 54:m.awarded_badges[i]=54;break;case"BADGE_EVENT_MIN":case 2e3:m.awarded_badges[i]=2e3;break;case"BADGE_CHICAGO_FEST_JULY_2017":case 2001:m.awarded_badges[i]=2001;break;case"BADGE_PIKACHU_OUTBREAK_YOKOHAMA_2017":case 2002:m.awarded_badges[i]=2002;break;case"BADGE_SAFARI_ZONE_EUROPE_2017":case 2003:m.awarded_badges[i]=2003;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_07":case 2004:m.awarded_badges[i]=2004;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_14":case 2005:m.awarded_badges[i]=2005;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_NORTH":case 2006:m.awarded_badges[i]=2006;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_SOUTH":case 2007:m.awarded_badges[i]=2007;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_NORTH":case 2008:m.awarded_badges[i]=2008;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_SOUTH":case 2009:m.awarded_badges[i]=2009;break;case"BADGE_APAC_PARTNER_JULY_2018_0":case 2010:m.awarded_badges[i]=2010;break;case"BADGE_APAC_PARTNER_JULY_2018_1":case 2011:m.awarded_badges[i]=2011;break;case"BADGE_APAC_PARTNER_JULY_2018_2":case 2012:m.awarded_badges[i]=2012;break;case"BADGE_APAC_PARTNER_JULY_2018_3":case 2013:m.awarded_badges[i]=2013;break;case"BADGE_APAC_PARTNER_JULY_2018_4":case 2014:m.awarded_badges[i]=2014;break;case"BADGE_APAC_PARTNER_JULY_2018_5":case 2015:m.awarded_badges[i]=2015;break;case"BADGE_APAC_PARTNER_JULY_2018_6":case 2016:m.awarded_badges[i]=2016;break;case"BADGE_APAC_PARTNER_JULY_2018_7":case 2017:m.awarded_badges[i]=2017;break;case"BADGE_APAC_PARTNER_JULY_2018_8":case 2018:m.awarded_badges[i]=2018;break;case"BADGE_APAC_PARTNER_JULY_2018_9":case 2019:m.awarded_badges[i]=2019;break;case"BADGE_YOKOSUKA_29_AUG_2018_MIKASA":case 2020:m.awarded_badges[i]=2020;break;case"BADGE_YOKOSUKA_29_AUG_2018_VERNY":case 2021:m.awarded_badges[i]=2021;break;case"BADGE_YOKOSUKA_29_AUG_2018_KURIHAMA":case 2022:m.awarded_badges[i]=2022;break;case"BADGE_YOKOSUKA_30_AUG_2018_MIKASA":case 2023:m.awarded_badges[i]=2023;break;case"BADGE_YOKOSUKA_30_AUG_2018_VERNY":case 2024:m.awarded_badges[i]=2024;break;case"BADGE_YOKOSUKA_30_AUG_2018_KURIHAMA":case 2025:m.awarded_badges[i]=2025;break;case"BADGE_YOKOSUKA_31_AUG_2018_MIKASA":case 2026:m.awarded_badges[i]=2026;break;case"BADGE_YOKOSUKA_31_AUG_2018_VERNY":case 2027:m.awarded_badges[i]=2027;break;case"BADGE_YOKOSUKA_31_AUG_2018_KURIHAMA":case 2028:m.awarded_badges[i]=2028;break;case"BADGE_YOKOSUKA_1_SEP_2018_MIKASA":case 2029:m.awarded_badges[i]=2029;break;case"BADGE_YOKOSUKA_1_SEP_2018_VERNY":case 2030:m.awarded_badges[i]=2030;break;case"BADGE_YOKOSUKA_1_SEP_2018_KURIHAMA":case 2031:m.awarded_badges[i]=2031;break;case"BADGE_YOKOSUKA_2_SEP_2018_MIKASA":case 2032:m.awarded_badges[i]=2032;break;case"BADGE_YOKOSUKA_2_SEP_2018_VERNY":case 2033:m.awarded_badges[i]=2033;break;case"BADGE_YOKOSUKA_2_SEP_2018_KURIHAMA":case 2034:m.awarded_badges[i]=2034;break;case"BADGE_TOP_BANANA_1":case 2035:m.awarded_badges[i]=2035;break;case"BADGE_TOP_BANANA_2":case 2036:m.awarded_badges[i]=2036;break;case"BADGE_TOP_BANANA_3":case 2037:m.awarded_badges[i]=2037;break}}}if(d.awarded_badge_levels){if(!Array.isArray(d.awarded_badge_levels))throw TypeError(".POGOProtos.Networking.Responses.CheckAwardedBadgesResponse.awarded_badge_levels: array expected");m.awarded_badge_levels=[];for(var i=0;i<d.awarded_badge_levels.length;++i){m.awarded_badge_levels[i]=d.awarded_badge_levels[i]|0}}if(d.avatar_template_ids){if(!Array.isArray(d.avatar_template_ids))throw TypeError(".POGOProtos.Networking.Responses.CheckAwardedBadgesResponse.avatar_template_ids: array expected");m.avatar_template_ids=[];for(var i=0;i<d.avatar_template_ids.length;++i){m.avatar_template_ids[i]=String(d.avatar_template_ids[i])}}return m};CheckAwardedBadgesResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.awarded_badges=[];d.awarded_badge_levels=[];d.avatar_template_ids=[]}if(o.defaults){d.success=false}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.awarded_badges&&m.awarded_badges.length){d.awarded_badges=[];for(var j=0;j<m.awarded_badges.length;++j){d.awarded_badges[j]=o.enums===String?$root.POGOProtos.Enums.BadgeType[m.awarded_badges[j]]:m.awarded_badges[j]}}if(m.awarded_badge_levels&&m.awarded_badge_levels.length){d.awarded_badge_levels=[];for(var j=0;j<m.awarded_badge_levels.length;++j){d.awarded_badge_levels[j]=m.awarded_badge_levels[j]}}if(m.avatar_template_ids&&m.avatar_template_ids.length){d.avatar_template_ids=[];for(var j=0;j<m.avatar_template_ids.length;++j){d.avatar_template_ids[j]=m.avatar_template_ids[j]}}return d};CheckAwardedBadgesResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CheckAwardedBadgesResponse}();Responses.CheckChallengeResponse=function(){function CheckChallengeResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CheckChallengeResponse.prototype.show_challenge=false;CheckChallengeResponse.prototype.challenge_url="";CheckChallengeResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.show_challenge!=null&&m.hasOwnProperty("show_challenge"))w.uint32(8).bool(m.show_challenge);if(m.challenge_url!=null&&m.hasOwnProperty("challenge_url"))w.uint32(18).string(m.challenge_url);return w};CheckChallengeResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.CheckChallengeResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.show_challenge=r.bool();break;case 2:m.challenge_url=r.string();break;default:r.skipType(t&7);break}}return m};CheckChallengeResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.CheckChallengeResponse)return d;var m=new $root.POGOProtos.Networking.Responses.CheckChallengeResponse;if(d.show_challenge!=null){m.show_challenge=Boolean(d.show_challenge)}if(d.challenge_url!=null){m.challenge_url=String(d.challenge_url)}return m};CheckChallengeResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.show_challenge=false;d.challenge_url=""}if(m.show_challenge!=null&&m.hasOwnProperty("show_challenge")){d.show_challenge=m.show_challenge}if(m.challenge_url!=null&&m.hasOwnProperty("challenge_url")){d.challenge_url=m.challenge_url}return d};CheckChallengeResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CheckChallengeResponse}();Responses.CheckSendGiftResponse=function(){function CheckSendGiftResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CheckSendGiftResponse.prototype.result=0;CheckSendGiftResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};CheckSendGiftResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.CheckSendGiftResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};CheckSendGiftResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.CheckSendGiftResponse)return d;var m=new $root.POGOProtos.Networking.Responses.CheckSendGiftResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_PLAYER_DOES_NOT_EXIST":case 3:m.result=3;break;case"ERROR_GIFT_NOT_AVAILABLE":case 4:m.result=4;break;case"ERROR_GIFT_ALREADY_SENT_TODAY":case 5:m.result=5;break;case"ERROR_PLAYER_HAS_UNOPENED_GIFT":case 6:m.result=6;break}return m};CheckSendGiftResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.CheckSendGiftResponse.Result[m.result]:m.result}return d};CheckSendGiftResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CheckSendGiftResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_PLAYER_DOES_NOT_EXIST"]=3;values[valuesById[4]="ERROR_GIFT_NOT_AVAILABLE"]=4;values[valuesById[5]="ERROR_GIFT_ALREADY_SENT_TODAY"]=5;values[valuesById[6]="ERROR_PLAYER_HAS_UNOPENED_GIFT"]=6;return values}();return CheckSendGiftResponse}();Responses.CheckShareExRaidPassResponse=function(){function CheckShareExRaidPassResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CheckShareExRaidPassResponse.prototype.result=0;CheckShareExRaidPassResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};CheckShareExRaidPassResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.CheckShareExRaidPassResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};CheckShareExRaidPassResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.CheckShareExRaidPassResponse)return d;var m=new $root.POGOProtos.Networking.Responses.CheckShareExRaidPassResponse;switch(d.result){case"SHARE_EX_RAID_PASS_UNSET":case 0:m.result=0;break;case"SHARE_EX_RAID_PASS_SUCCESS":case 1:m.result=1;break;case"ERROR_FRIEND_ALREADY_INVITED_TO_SAME_RAID":case 2:m.result=2;break;case"ERROR_EX_RAID_PASS_ALREADY_SHARED":case 3:m.result=3;break;case"ERROR_FRIEND_ALREADY_HAS_SHARED_EX_PASS_IN_INVENTORY":case 4:m.result=4;break;case"ERROR_TOO_LOW_FRIENDSHIP_LEVEL":case 5:m.result=5;break;case"ERROR_FRIEND_NOT_FOUND":case 6:m.result=6;break;case"ERROR_EX_RAID_ALREADY_STARTED":case 7:m.result=7;break;case"ERROR_EX_RAID_INVALID":case 8:m.result=8;break;case"ERROR_EX_RAID_PASS_NOT_FOUND":case 9:m.result=9;break;case"ERROR_UNKNOWN":case 10:m.result=10;break}return m};CheckShareExRaidPassResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"SHARE_EX_RAID_PASS_UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Enums.ShareExRaidPassResult[m.result]:m.result}return d};CheckShareExRaidPassResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CheckShareExRaidPassResponse}();Responses.ClaimCodenameResponse=function(){function ClaimCodenameResponse(p){this.suggested_codenames=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ClaimCodenameResponse.prototype.codename="";ClaimCodenameResponse.prototype.user_message="";ClaimCodenameResponse.prototype.is_assignable=false;ClaimCodenameResponse.prototype.status=0;ClaimCodenameResponse.prototype.updated_player=null;ClaimCodenameResponse.prototype.suggested_codenames=$util.emptyArray;ClaimCodenameResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.codename!=null&&m.hasOwnProperty("codename"))w.uint32(10).string(m.codename);if(m.user_message!=null&&m.hasOwnProperty("user_message"))w.uint32(18).string(m.user_message);if(m.is_assignable!=null&&m.hasOwnProperty("is_assignable"))w.uint32(24).bool(m.is_assignable);if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(32).int32(m.status);if(m.updated_player!=null&&m.hasOwnProperty("updated_player"))$root.POGOProtos.Data.PlayerData.encode(m.updated_player,w.uint32(42).fork()).ldelim();if(m.suggested_codenames!=null&&m.suggested_codenames.length){for(var i=0;i<m.suggested_codenames.length;++i)w.uint32(50).string(m.suggested_codenames[i])}return w};ClaimCodenameResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.ClaimCodenameResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.codename=r.string();break;case 2:m.user_message=r.string();break;case 3:m.is_assignable=r.bool();break;case 4:m.status=r.int32();break;case 5:m.updated_player=$root.POGOProtos.Data.PlayerData.decode(r,r.uint32());break;case 6:if(!(m.suggested_codenames&&m.suggested_codenames.length))m.suggested_codenames=[];m.suggested_codenames.push(r.string());break;default:r.skipType(t&7);break}}return m};ClaimCodenameResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.ClaimCodenameResponse)return d;var m=new $root.POGOProtos.Networking.Responses.ClaimCodenameResponse;if(d.codename!=null){m.codename=String(d.codename)}if(d.user_message!=null){m.user_message=String(d.user_message)}if(d.is_assignable!=null){m.is_assignable=Boolean(d.is_assignable)}switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"CODENAME_NOT_AVAILABLE":case 2:m.status=2;break;case"CODENAME_NOT_VALID":case 3:m.status=3;break;case"CURRENT_OWNER":case 4:m.status=4;break;case"CODENAME_CHANGE_NOT_ALLOWED":case 5:m.status=5;break}if(d.updated_player!=null){if(typeof d.updated_player!=="object")throw TypeError(".POGOProtos.Networking.Responses.ClaimCodenameResponse.updated_player: object expected");m.updated_player=$root.POGOProtos.Data.PlayerData.fromObject(d.updated_player)}if(d.suggested_codenames){if(!Array.isArray(d.suggested_codenames))throw TypeError(".POGOProtos.Networking.Responses.ClaimCodenameResponse.suggested_codenames: array expected");m.suggested_codenames=[];for(var i=0;i<d.suggested_codenames.length;++i){m.suggested_codenames[i]=String(d.suggested_codenames[i])}}return m};ClaimCodenameResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.suggested_codenames=[]}if(o.defaults){d.codename="";d.user_message="";d.is_assignable=false;d.status=o.enums===String?"UNSET":0;d.updated_player=null}if(m.codename!=null&&m.hasOwnProperty("codename")){d.codename=m.codename}if(m.user_message!=null&&m.hasOwnProperty("user_message")){d.user_message=m.user_message}if(m.is_assignable!=null&&m.hasOwnProperty("is_assignable")){d.is_assignable=m.is_assignable}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.ClaimCodenameResponse.Status[m.status]:m.status}if(m.updated_player!=null&&m.hasOwnProperty("updated_player")){d.updated_player=$root.POGOProtos.Data.PlayerData.toObject(m.updated_player,o)}if(m.suggested_codenames&&m.suggested_codenames.length){d.suggested_codenames=[];for(var j=0;j<m.suggested_codenames.length;++j){d.suggested_codenames[j]=m.suggested_codenames[j]}}return d};ClaimCodenameResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ClaimCodenameResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="CODENAME_NOT_AVAILABLE"]=2;values[valuesById[3]="CODENAME_NOT_VALID"]=3;values[valuesById[4]="CURRENT_OWNER"]=4;values[valuesById[5]="CODENAME_CHANGE_NOT_ALLOWED"]=5;return values}();return ClaimCodenameResponse}();Responses.CollectDailyBonusResponse=function(){function CollectDailyBonusResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CollectDailyBonusResponse.prototype.result=0;CollectDailyBonusResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};CollectDailyBonusResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.CollectDailyBonusResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};CollectDailyBonusResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.CollectDailyBonusResponse)return d;var m=new $root.POGOProtos.Networking.Responses.CollectDailyBonusResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"FAILURE":case 2:m.result=2;break;case"TOO_SOON":case 3:m.result=3;break}return m};CollectDailyBonusResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.CollectDailyBonusResponse.Result[m.result]:m.result}return d};CollectDailyBonusResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CollectDailyBonusResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;values[valuesById[3]="TOO_SOON"]=3;return values}();return CollectDailyBonusResponse}();Responses.CollectDailyDefenderBonusResponse=function(){function CollectDailyDefenderBonusResponse(p){this.currency_type=[];this.currency_awarded=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CollectDailyDefenderBonusResponse.prototype.result=0;CollectDailyDefenderBonusResponse.prototype.currency_type=$util.emptyArray;CollectDailyDefenderBonusResponse.prototype.currency_awarded=$util.emptyArray;CollectDailyDefenderBonusResponse.prototype.defenders_count=0;CollectDailyDefenderBonusResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.currency_type!=null&&m.currency_type.length){for(var i=0;i<m.currency_type.length;++i)w.uint32(18).string(m.currency_type[i])}if(m.currency_awarded!=null&&m.currency_awarded.length){w.uint32(26).fork();for(var i=0;i<m.currency_awarded.length;++i)w.int32(m.currency_awarded[i]);w.ldelim()}if(m.defenders_count!=null&&m.hasOwnProperty("defenders_count"))w.uint32(32).int32(m.defenders_count);return w};CollectDailyDefenderBonusResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.CollectDailyDefenderBonusResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.currency_type&&m.currency_type.length))m.currency_type=[];m.currency_type.push(r.string());break;case 3:if(!(m.currency_awarded&&m.currency_awarded.length))m.currency_awarded=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.currency_awarded.push(r.int32())}else m.currency_awarded.push(r.int32());break;case 4:m.defenders_count=r.int32();break;default:r.skipType(t&7);break}}return m};CollectDailyDefenderBonusResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.CollectDailyDefenderBonusResponse)return d;var m=new $root.POGOProtos.Networking.Responses.CollectDailyDefenderBonusResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"FAILURE":case 2:m.result=2;break;case"TOO_SOON":case 3:m.result=3;break;case"NO_DEFENDERS":case 4:m.result=4;break}if(d.currency_type){if(!Array.isArray(d.currency_type))throw TypeError(".POGOProtos.Networking.Responses.CollectDailyDefenderBonusResponse.currency_type: array expected");m.currency_type=[];for(var i=0;i<d.currency_type.length;++i){m.currency_type[i]=String(d.currency_type[i])}}if(d.currency_awarded){if(!Array.isArray(d.currency_awarded))throw TypeError(".POGOProtos.Networking.Responses.CollectDailyDefenderBonusResponse.currency_awarded: array expected");m.currency_awarded=[];for(var i=0;i<d.currency_awarded.length;++i){m.currency_awarded[i]=d.currency_awarded[i]|0}}if(d.defenders_count!=null){m.defenders_count=d.defenders_count|0}return m};CollectDailyDefenderBonusResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.currency_type=[];d.currency_awarded=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0;d.defenders_count=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.CollectDailyDefenderBonusResponse.Result[m.result]:m.result}if(m.currency_type&&m.currency_type.length){d.currency_type=[];for(var j=0;j<m.currency_type.length;++j){d.currency_type[j]=m.currency_type[j]}}if(m.currency_awarded&&m.currency_awarded.length){d.currency_awarded=[];for(var j=0;j<m.currency_awarded.length;++j){d.currency_awarded[j]=m.currency_awarded[j]}}if(m.defenders_count!=null&&m.hasOwnProperty("defenders_count")){d.defenders_count=m.defenders_count}return d};CollectDailyDefenderBonusResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CollectDailyDefenderBonusResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;values[valuesById[3]="TOO_SOON"]=3;values[valuesById[4]="NO_DEFENDERS"]=4;return values}();return CollectDailyDefenderBonusResponse}();Responses.CombatFriendRequestResponse=function(){function CombatFriendRequestResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatFriendRequestResponse.prototype.result=0;CombatFriendRequestResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};CombatFriendRequestResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.CombatFriendRequestResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};CombatFriendRequestResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.CombatFriendRequestResponse)return d;var m=new $root.POGOProtos.Networking.Responses.CombatFriendRequestResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_COMBAT_NOT_FOUND":case 2:m.result=2;break;case"ERROR_COMBAT_INCOMPLETE":case 3:m.result=3;break;case"ERROR_PLAYER_NOT_IN_COMBAT":case 4:m.result=4;break;case"ERROR_SOCIAL_RPC":case 5:m.result=5;break}return m};CombatFriendRequestResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.CombatFriendRequestResponse.Result[m.result]:m.result}return d};CombatFriendRequestResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CombatFriendRequestResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_COMBAT_NOT_FOUND"]=2;values[valuesById[3]="ERROR_COMBAT_INCOMPLETE"]=3;values[valuesById[4]="ERROR_PLAYER_NOT_IN_COMBAT"]=4;values[valuesById[5]="ERROR_SOCIAL_RPC"]=5;return values}();return CombatFriendRequestResponse}();Responses.CompleteQuestResponse=function(){function CompleteQuestResponse(p){this.stamp=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CompleteQuestResponse.prototype.status=0;CompleteQuestResponse.prototype.quest=null;CompleteQuestResponse.prototype.stamp=$util.emptyArray;CompleteQuestResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.quest!=null&&m.hasOwnProperty("quest"))$root.POGOProtos.Data.Quests.ClientQuest.encode(m.quest,w.uint32(18).fork()).ldelim();if(m.stamp!=null&&m.stamp.length){for(var i=0;i<m.stamp.length;++i)$root.POGOProtos.Data.Quests.QuestStamp.encode(m.stamp[i],w.uint32(26).fork()).ldelim()}return w};CompleteQuestResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.CompleteQuestResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.quest=$root.POGOProtos.Data.Quests.ClientQuest.decode(r,r.uint32());break;case 3:if(!(m.stamp&&m.stamp.length))m.stamp=[];m.stamp.push($root.POGOProtos.Data.Quests.QuestStamp.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};CompleteQuestResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.CompleteQuestResponse)return d;var m=new $root.POGOProtos.Networking.Responses.CompleteQuestResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"ERROR_QUEST_NOT_FOUND":case 2:m.status=2;break;case"ERROR_QUEST_STILL_IN_PROGRESS":case 3:m.status=3;break;case"ERROR_QUEST_ALREADY_COMPLETED":case 4:m.status=4;break;case"ERROR_SUBQUEST_NOT_FOUND":case 5:m.status=5;break;case"ERROR_SUBQUEST_STILL_IN_PROGRESS":case 6:m.status=6;break;case"ERROR_SUBQUEST_ALREADY_COMPLETED":case 7:m.status=7;break;case"ERROR_MULTIPART_STILL_IN_PROGRESS":case 8:m.status=8;break;case"ERROR_MULTIPART_ALREADY_COMPLETED":case 9:m.status=9;break;case"ERROR_REDEEM_COMPLETED_QUEST_STAMP_CARD_FIRST":case 10:m.status=10;break;case"ERROR_INVENTORY_FULL":case 11:m.status=11;break}if(d.quest!=null){if(typeof d.quest!=="object")throw TypeError(".POGOProtos.Networking.Responses.CompleteQuestResponse.quest: object expected");m.quest=$root.POGOProtos.Data.Quests.ClientQuest.fromObject(d.quest)}if(d.stamp){if(!Array.isArray(d.stamp))throw TypeError(".POGOProtos.Networking.Responses.CompleteQuestResponse.stamp: array expected");m.stamp=[];for(var i=0;i<d.stamp.length;++i){if(typeof d.stamp[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.CompleteQuestResponse.stamp: object expected");m.stamp[i]=$root.POGOProtos.Data.Quests.QuestStamp.fromObject(d.stamp[i])}}return m};CompleteQuestResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.stamp=[]}if(o.defaults){d.status=o.enums===String?"UNSET":0;d.quest=null}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.CompleteQuestResponse.Status[m.status]:m.status}if(m.quest!=null&&m.hasOwnProperty("quest")){d.quest=$root.POGOProtos.Data.Quests.ClientQuest.toObject(m.quest,o)}if(m.stamp&&m.stamp.length){d.stamp=[];for(var j=0;j<m.stamp.length;++j){d.stamp[j]=$root.POGOProtos.Data.Quests.QuestStamp.toObject(m.stamp[j],o)}}return d};CompleteQuestResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CompleteQuestResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_QUEST_NOT_FOUND"]=2;values[valuesById[3]="ERROR_QUEST_STILL_IN_PROGRESS"]=3;values[valuesById[4]="ERROR_QUEST_ALREADY_COMPLETED"]=4;values[valuesById[5]="ERROR_SUBQUEST_NOT_FOUND"]=5;values[valuesById[6]="ERROR_SUBQUEST_STILL_IN_PROGRESS"]=6;values[valuesById[7]="ERROR_SUBQUEST_ALREADY_COMPLETED"]=7;values[valuesById[8]="ERROR_MULTIPART_STILL_IN_PROGRESS"]=8;values[valuesById[9]="ERROR_MULTIPART_ALREADY_COMPLETED"]=9;values[valuesById[10]="ERROR_REDEEM_COMPLETED_QUEST_STAMP_CARD_FIRST"]=10;values[valuesById[11]="ERROR_INVENTORY_FULL"]=11;return values}();return CompleteQuestResponse}();Responses.CompleteQuestStampCardResponse=function(){function CompleteQuestStampCardResponse(p){this.reward=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CompleteQuestStampCardResponse.prototype.status=0;CompleteQuestStampCardResponse.prototype.reward=$util.emptyArray;CompleteQuestStampCardResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.reward!=null&&m.reward.length){for(var i=0;i<m.reward.length;++i)$root.POGOProtos.Data.Quests.QuestReward.encode(m.reward[i],w.uint32(18).fork()).ldelim()}return w};CompleteQuestStampCardResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.CompleteQuestStampCardResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:if(!(m.reward&&m.reward.length))m.reward=[];m.reward.push($root.POGOProtos.Data.Quests.QuestReward.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};CompleteQuestStampCardResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.CompleteQuestStampCardResponse)return d;var m=new $root.POGOProtos.Networking.Responses.CompleteQuestStampCardResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"ERROR_STILL_IN_PROGRESS":case 2:m.status=2;break}if(d.reward){if(!Array.isArray(d.reward))throw TypeError(".POGOProtos.Networking.Responses.CompleteQuestStampCardResponse.reward: array expected");m.reward=[];for(var i=0;i<d.reward.length;++i){if(typeof d.reward[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.CompleteQuestStampCardResponse.reward: object expected");m.reward[i]=$root.POGOProtos.Data.Quests.QuestReward.fromObject(d.reward[i])}}return m};CompleteQuestStampCardResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.reward=[]}if(o.defaults){d.status=o.enums===String?"UNSET":0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.CompleteQuestStampCardResponse.Status[m.status]:m.status}if(m.reward&&m.reward.length){d.reward=[];for(var j=0;j<m.reward.length;++j){d.reward[j]=$root.POGOProtos.Data.Quests.QuestReward.toObject(m.reward[j],o)}}return d};CompleteQuestStampCardResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CompleteQuestStampCardResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_STILL_IN_PROGRESS"]=2;return values}();return CompleteQuestStampCardResponse}();Responses.ConfirmTradingResponse=function(){function ConfirmTradingResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ConfirmTradingResponse.prototype.result=0;ConfirmTradingResponse.prototype.trading=null;ConfirmTradingResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.trading!=null&&m.hasOwnProperty("trading"))$root.POGOProtos.Data.Trading.Trading.encode(m.trading,w.uint32(18).fork()).ldelim();return w};ConfirmTradingResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.ConfirmTradingResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.trading=$root.POGOProtos.Data.Trading.Trading.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};ConfirmTradingResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.ConfirmTradingResponse)return d;var m=new $root.POGOProtos.Networking.Responses.ConfirmTradingResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_FRIEND_NOT_FOUND":case 3:m.result=3;break;case"ERROR_INVALID_PLAYER_ID":case 4:m.result=4;break;case"ERROR_INVALID_STATE":case 5:m.result=5;break;case"ERROR_STATE_HANDLER":case 6:m.result=6;break;case"ERROR_INVALID_POKEMON":case 7:m.result=7;break;case"ERROR_INSUFFICIENT_PAYMENT":case 8:m.result=8;break;case"ERROR_NO_PLAYER_POKEMON":case 9:m.result=9;break;case"ERROR_NO_FRIEND_POKEMON":case 10:m.result=10;break;case"ERROR_PLAYER_ALREADY_CONFIRMED":case 11:m.result=11;break;case"ERROR_TRANSACTION_LOG_NOT_MATCH":case 12:m.result=12;break;case"ERROR_TRADING_EXPIRED":case 13:m.result=13;break;case"ERROR_TRANSACTION":case 14:m.result=14;break;case"ERROR_DAILY_LIMIT_REACHED":case 15:m.result=15;break}if(d.trading!=null){if(typeof d.trading!=="object")throw TypeError(".POGOProtos.Networking.Responses.ConfirmTradingResponse.trading: object expected");m.trading=$root.POGOProtos.Data.Trading.Trading.fromObject(d.trading)}return m};ConfirmTradingResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.trading=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.ConfirmTradingResponse.Result[m.result]:m.result}if(m.trading!=null&&m.hasOwnProperty("trading")){d.trading=$root.POGOProtos.Data.Trading.Trading.toObject(m.trading,o)}return d};ConfirmTradingResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ConfirmTradingResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_FRIEND_NOT_FOUND"]=3;values[valuesById[4]="ERROR_INVALID_PLAYER_ID"]=4;values[valuesById[5]="ERROR_INVALID_STATE"]=5;values[valuesById[6]="ERROR_STATE_HANDLER"]=6;values[valuesById[7]="ERROR_INVALID_POKEMON"]=7;values[valuesById[8]="ERROR_INSUFFICIENT_PAYMENT"]=8;values[valuesById[9]="ERROR_NO_PLAYER_POKEMON"]=9;values[valuesById[10]="ERROR_NO_FRIEND_POKEMON"]=10;values[valuesById[11]="ERROR_PLAYER_ALREADY_CONFIRMED"]=11;values[valuesById[12]="ERROR_TRANSACTION_LOG_NOT_MATCH"]=12;values[valuesById[13]="ERROR_TRADING_EXPIRED"]=13;values[valuesById[14]="ERROR_TRANSACTION"]=14;values[valuesById[15]="ERROR_DAILY_LIMIT_REACHED"]=15;return values}();return ConfirmTradingResponse}();Responses.CreateCombatChallengeResponse=function(){function CreateCombatChallengeResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CreateCombatChallengeResponse.prototype.result=0;CreateCombatChallengeResponse.prototype.challenge=null;CreateCombatChallengeResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.challenge!=null&&m.hasOwnProperty("challenge"))$root.POGOProtos.Data.Combat.CombatChallenge.encode(m.challenge,w.uint32(18).fork()).ldelim();return w};CreateCombatChallengeResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.CreateCombatChallengeResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.challenge=$root.POGOProtos.Data.Combat.CombatChallenge.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};CreateCombatChallengeResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.CreateCombatChallengeResponse)return d;var m=new $root.POGOProtos.Networking.Responses.CreateCombatChallengeResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALID_CHALLENGE_STATE":case 2:m.result=2;break;case"ERROR_PLAYER_BELOW_MINIMUM_LEVEL":case 3:m.result=3;break;case"ERROR_ACCESS_DENIED":case 4:m.result=4;break}if(d.challenge!=null){if(typeof d.challenge!=="object")throw TypeError(".POGOProtos.Networking.Responses.CreateCombatChallengeResponse.challenge: object expected");m.challenge=$root.POGOProtos.Data.Combat.CombatChallenge.fromObject(d.challenge)}return m};CreateCombatChallengeResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.challenge=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.CreateCombatChallengeResponse.Result[m.result]:m.result}if(m.challenge!=null&&m.hasOwnProperty("challenge")){d.challenge=$root.POGOProtos.Data.Combat.CombatChallenge.toObject(m.challenge,o)}return d};CreateCombatChallengeResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateCombatChallengeResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_CHALLENGE_STATE"]=2;values[valuesById[3]="ERROR_PLAYER_BELOW_MINIMUM_LEVEL"]=3;values[valuesById[4]="ERROR_ACCESS_DENIED"]=4;return values}();return CreateCombatChallengeResponse}();Responses.DeclineCombatChallengeResponse=function(){function DeclineCombatChallengeResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DeclineCombatChallengeResponse.prototype.result=0;DeclineCombatChallengeResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};DeclineCombatChallengeResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.DeclineCombatChallengeResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};DeclineCombatChallengeResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.DeclineCombatChallengeResponse)return d;var m=new $root.POGOProtos.Networking.Responses.DeclineCombatChallengeResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALID_CHALLENGE_STATE":case 2:m.result=2;break;case"ERROR_CHALLENGE_NOT_FOUND":case 3:m.result=3;break;case"ERROR_ALREADY_TIMEDOUT":case 4:m.result=4;break;case"ERROR_ALREADY_CANCELLED":case 5:m.result=5;break}return m};DeclineCombatChallengeResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.DeclineCombatChallengeResponse.Result[m.result]:m.result}return d};DeclineCombatChallengeResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeclineCombatChallengeResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_CHALLENGE_STATE"]=2;values[valuesById[3]="ERROR_CHALLENGE_NOT_FOUND"]=3;values[valuesById[4]="ERROR_ALREADY_TIMEDOUT"]=4;values[valuesById[5]="ERROR_ALREADY_CANCELLED"]=5;return values}();return DeclineCombatChallengeResponse}();Responses.DeclineSharedExRaidPassResponse=function(){function DeclineSharedExRaidPassResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DeclineSharedExRaidPassResponse.prototype.result=0;DeclineSharedExRaidPassResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};DeclineSharedExRaidPassResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.DeclineSharedExRaidPassResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};DeclineSharedExRaidPassResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.DeclineSharedExRaidPassResponse)return d;var m=new $root.POGOProtos.Networking.Responses.DeclineSharedExRaidPassResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_EX_RAID_PASS_NOT_FOUND":case 2:m.result=2;break;case"ERROR_UNKNOWN":case 3:m.result=3;break}return m};DeclineSharedExRaidPassResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.DeclineSharedExRaidPassResponse.Result[m.result]:m.result}return d};DeclineSharedExRaidPassResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeclineSharedExRaidPassResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_EX_RAID_PASS_NOT_FOUND"]=2;values[valuesById[3]="ERROR_UNKNOWN"]=3;return values}();return DeclineSharedExRaidPassResponse}();Responses.DeleteGiftFromInventoryResponse=function(){function DeleteGiftFromInventoryResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DeleteGiftFromInventoryResponse.prototype.result=0;DeleteGiftFromInventoryResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};DeleteGiftFromInventoryResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.DeleteGiftFromInventoryResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};DeleteGiftFromInventoryResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.DeleteGiftFromInventoryResponse)return d;var m=new $root.POGOProtos.Networking.Responses.DeleteGiftFromInventoryResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_GIFT_DOES_NOT_EXIST":case 3:m.result=3;break}return m};DeleteGiftFromInventoryResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.DeleteGiftFromInventoryResponse.Result[m.result]:m.result}return d};DeleteGiftFromInventoryResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteGiftFromInventoryResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_GIFT_DOES_NOT_EXIST"]=3;return values}();return DeleteGiftFromInventoryResponse}();Responses.DeleteGiftResponse=function(){function DeleteGiftResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DeleteGiftResponse.prototype.result=0;DeleteGiftResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};DeleteGiftResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.DeleteGiftResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};DeleteGiftResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.DeleteGiftResponse)return d;var m=new $root.POGOProtos.Networking.Responses.DeleteGiftResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_INVALID_PLAYER_ID":case 3:m.result=3;break;case"ERROR_FRIEND_NOT_FOUND":case 4:m.result=4;break;case"ERROR_GIFT_DOES_NOT_EXIST":case 5:m.result=5;break;case"ERROR_FRIEND_UPDATE":case 6:m.result=6;break}return m};DeleteGiftResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.DeleteGiftResponse.Result[m.result]:m.result}return d};DeleteGiftResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeleteGiftResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_INVALID_PLAYER_ID"]=3;values[valuesById[4]="ERROR_FRIEND_NOT_FOUND"]=4;values[valuesById[5]="ERROR_GIFT_DOES_NOT_EXIST"]=5;values[valuesById[6]="ERROR_FRIEND_UPDATE"]=6;return values}();return DeleteGiftResponse}();Responses.DiskEncounterResponse=function(){function DiskEncounterResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DiskEncounterResponse.prototype.result=0;DiskEncounterResponse.prototype.pokemon_data=null;DiskEncounterResponse.prototype.capture_probability=null;DiskEncounterResponse.prototype.active_item=0;DiskEncounterResponse.prototype.arplus_attempts_until_flee=0;DiskEncounterResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data"))$root.POGOProtos.Data.PokemonData.encode(m.pokemon_data,w.uint32(18).fork()).ldelim();if(m.capture_probability!=null&&m.hasOwnProperty("capture_probability"))$root.POGOProtos.Data.Capture.CaptureProbability.encode(m.capture_probability,w.uint32(26).fork()).ldelim();if(m.active_item!=null&&m.hasOwnProperty("active_item"))w.uint32(32).int32(m.active_item);if(m.arplus_attempts_until_flee!=null&&m.hasOwnProperty("arplus_attempts_until_flee"))w.uint32(40).int32(m.arplus_attempts_until_flee);return w};DiskEncounterResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.DiskEncounterResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.pokemon_data=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 3:m.capture_probability=$root.POGOProtos.Data.Capture.CaptureProbability.decode(r,r.uint32());break;case 4:m.active_item=r.int32();break;case 5:m.arplus_attempts_until_flee=r.int32();break;default:r.skipType(t&7);break}}return m};DiskEncounterResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.DiskEncounterResponse)return d;var m=new $root.POGOProtos.Networking.Responses.DiskEncounterResponse;switch(d.result){case"UNKNOWN":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"NOT_AVAILABLE":case 2:m.result=2;break;case"NOT_IN_RANGE":case 3:m.result=3;break;case"ENCOUNTER_ALREADY_FINISHED":case 4:m.result=4;break;case"POKEMON_INVENTORY_FULL":case 5:m.result=5;break}if(d.pokemon_data!=null){if(typeof d.pokemon_data!=="object")throw TypeError(".POGOProtos.Networking.Responses.DiskEncounterResponse.pokemon_data: object expected");m.pokemon_data=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon_data)}if(d.capture_probability!=null){if(typeof d.capture_probability!=="object")throw TypeError(".POGOProtos.Networking.Responses.DiskEncounterResponse.capture_probability: object expected");m.capture_probability=$root.POGOProtos.Data.Capture.CaptureProbability.fromObject(d.capture_probability)}switch(d.active_item){case"ITEM_UNKNOWN":case 0:m.active_item=0;break;case"ITEM_POKE_BALL":case 1:m.active_item=1;break;case"ITEM_GREAT_BALL":case 2:m.active_item=2;break;case"ITEM_ULTRA_BALL":case 3:m.active_item=3;break;case"ITEM_MASTER_BALL":case 4:m.active_item=4;break;case"ITEM_PREMIER_BALL":case 5:m.active_item=5;break;case"ITEM_POTION":case 101:m.active_item=101;break;case"ITEM_SUPER_POTION":case 102:m.active_item=102;break;case"ITEM_HYPER_POTION":case 103:m.active_item=103;break;case"ITEM_MAX_POTION":case 104:m.active_item=104;break;case"ITEM_REVIVE":case 201:m.active_item=201;break;case"ITEM_MAX_REVIVE":case 202:m.active_item=202;break;case"ITEM_LUCKY_EGG":case 301:m.active_item=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.active_item=401;break;case"ITEM_INCENSE_SPICY":case 402:m.active_item=402;break;case"ITEM_INCENSE_COOL":case 403:m.active_item=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.active_item=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.active_item=405;break;case"ITEM_TROY_DISK":case 501:m.active_item=501;break;case"ITEM_X_ATTACK":case 602:m.active_item=602;break;case"ITEM_X_DEFENSE":case 603:m.active_item=603;break;case"ITEM_X_MIRACLE":case 604:m.active_item=604;break;case"ITEM_RAZZ_BERRY":case 701:m.active_item=701;break;case"ITEM_BLUK_BERRY":case 702:m.active_item=702;break;case"ITEM_NANAB_BERRY":case 703:m.active_item=703;break;case"ITEM_WEPAR_BERRY":case 704:m.active_item=704;break;case"ITEM_PINAP_BERRY":case 705:m.active_item=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.active_item=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.active_item=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.active_item=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.active_item=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.active_item=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.active_item=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.active_item=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.active_item=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.active_item=1002;break;case"ITEM_SUN_STONE":case 1101:m.active_item=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.active_item=1102;break;case"ITEM_METAL_COAT":case 1103:m.active_item=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.active_item=1104;break;case"ITEM_UP_GRADE":case 1105:m.active_item=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.active_item=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.active_item=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.active_item=1202;break;case"ITEM_RARE_CANDY":case 1301:m.active_item=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.active_item=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.active_item=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.active_item=1403;break;case"ITEM_STAR_PIECE":case 1404:m.active_item=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.active_item=1405;break}if(d.arplus_attempts_until_flee!=null){m.arplus_attempts_until_flee=d.arplus_attempts_until_flee|0}return m};DiskEncounterResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNKNOWN":0;d.pokemon_data=null;d.capture_probability=null;d.active_item=o.enums===String?"ITEM_UNKNOWN":0;d.arplus_attempts_until_flee=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.DiskEncounterResponse.Result[m.result]:m.result}if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data")){d.pokemon_data=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon_data,o)}if(m.capture_probability!=null&&m.hasOwnProperty("capture_probability")){d.capture_probability=$root.POGOProtos.Data.Capture.CaptureProbability.toObject(m.capture_probability,o)}if(m.active_item!=null&&m.hasOwnProperty("active_item")){d.active_item=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.active_item]:m.active_item}if(m.arplus_attempts_until_flee!=null&&m.hasOwnProperty("arplus_attempts_until_flee")){d.arplus_attempts_until_flee=m.arplus_attempts_until_flee}return d};DiskEncounterResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DiskEncounterResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNKNOWN"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="NOT_AVAILABLE"]=2;values[valuesById[3]="NOT_IN_RANGE"]=3;values[valuesById[4]="ENCOUNTER_ALREADY_FINISHED"]=4;values[valuesById[5]="POKEMON_INVENTORY_FULL"]=5;return values}();return DiskEncounterResponse}();Responses.DownloadGmTemplatesResponse=function(){function DownloadGmTemplatesResponse(p){this.template=[];this.deleted_template=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DownloadGmTemplatesResponse.prototype.result=0;DownloadGmTemplatesResponse.prototype.template=$util.emptyArray;DownloadGmTemplatesResponse.prototype.deleted_template=$util.emptyArray;DownloadGmTemplatesResponse.prototype.batch_id=$util.Long?$util.Long.fromBits(0,0,false):0;DownloadGmTemplatesResponse.prototype.page_offset=0;DownloadGmTemplatesResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.template!=null&&m.template.length){for(var i=0;i<m.template.length;++i)$root.POGOProtos.Networking.Responses.DownloadGmTemplatesResponse.ClientGameMasterTemplate.encode(m.template[i],w.uint32(18).fork()).ldelim()}if(m.deleted_template!=null&&m.deleted_template.length){for(var i=0;i<m.deleted_template.length;++i)w.uint32(26).string(m.deleted_template[i])}if(m.batch_id!=null&&m.hasOwnProperty("batch_id"))w.uint32(33).fixed64(m.batch_id);if(m.page_offset!=null&&m.hasOwnProperty("page_offset"))w.uint32(40).int32(m.page_offset);return w};DownloadGmTemplatesResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.DownloadGmTemplatesResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.template&&m.template.length))m.template=[];m.template.push($root.POGOProtos.Networking.Responses.DownloadGmTemplatesResponse.ClientGameMasterTemplate.decode(r,r.uint32()));break;case 3:if(!(m.deleted_template&&m.deleted_template.length))m.deleted_template=[];m.deleted_template.push(r.string());break;case 4:m.batch_id=r.fixed64();break;case 5:m.page_offset=r.int32();break;default:r.skipType(t&7);break}}return m};DownloadGmTemplatesResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.DownloadGmTemplatesResponse)return d;var m=new $root.POGOProtos.Networking.Responses.DownloadGmTemplatesResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"COMPLETE":case 1:m.result=1;break;case"MORE_RESULTS":case 2:m.result=2;break;case"BATCH_ID_NOT_LIVE":case 3:m.result=3;break;case"INVALID_BASIS_BATCH_ID":case 4:m.result=4;break}if(d.template){if(!Array.isArray(d.template))throw TypeError(".POGOProtos.Networking.Responses.DownloadGmTemplatesResponse.template: array expected");m.template=[];for(var i=0;i<d.template.length;++i){if(typeof d.template[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadGmTemplatesResponse.template: object expected");m.template[i]=$root.POGOProtos.Networking.Responses.DownloadGmTemplatesResponse.ClientGameMasterTemplate.fromObject(d.template[i])}}if(d.deleted_template){if(!Array.isArray(d.deleted_template))throw TypeError(".POGOProtos.Networking.Responses.DownloadGmTemplatesResponse.deleted_template: array expected");m.deleted_template=[];for(var i=0;i<d.deleted_template.length;++i){m.deleted_template[i]=String(d.deleted_template[i])}}if(d.batch_id!=null){if($util.Long)(m.batch_id=$util.Long.fromValue(d.batch_id)).unsigned=false;else if(typeof d.batch_id==="string")m.batch_id=parseInt(d.batch_id,10);else if(typeof d.batch_id==="number")m.batch_id=d.batch_id;else if(typeof d.batch_id==="object")m.batch_id=new $util.LongBits(d.batch_id.low>>>0,d.batch_id.high>>>0).toNumber()}if(d.page_offset!=null){m.page_offset=d.page_offset|0}return m};DownloadGmTemplatesResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.template=[];d.deleted_template=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0;if($util.Long){var n=new $util.Long(0,0,false);d.batch_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.batch_id=o.longs===String?"0":0;d.page_offset=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.DownloadGmTemplatesResponse.Result[m.result]:m.result}if(m.template&&m.template.length){d.template=[];for(var j=0;j<m.template.length;++j){d.template[j]=$root.POGOProtos.Networking.Responses.DownloadGmTemplatesResponse.ClientGameMasterTemplate.toObject(m.template[j],o)}}if(m.deleted_template&&m.deleted_template.length){d.deleted_template=[];for(var j=0;j<m.deleted_template.length;++j){d.deleted_template[j]=m.deleted_template[j]}}if(m.batch_id!=null&&m.hasOwnProperty("batch_id")){if(typeof m.batch_id==="number")d.batch_id=o.longs===String?String(m.batch_id):m.batch_id;else d.batch_id=o.longs===String?$util.Long.prototype.toString.call(m.batch_id):o.longs===Number?new $util.LongBits(m.batch_id.low>>>0,m.batch_id.high>>>0).toNumber():m.batch_id}if(m.page_offset!=null&&m.hasOwnProperty("page_offset")){d.page_offset=m.page_offset}return d};DownloadGmTemplatesResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DownloadGmTemplatesResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="COMPLETE"]=1;values[valuesById[2]="MORE_RESULTS"]=2;values[valuesById[3]="BATCH_ID_NOT_LIVE"]=3;values[valuesById[4]="INVALID_BASIS_BATCH_ID"]=4;return values}();DownloadGmTemplatesResponse.ClientGameMasterTemplate=function(){function ClientGameMasterTemplate(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ClientGameMasterTemplate.prototype.template_id="";ClientGameMasterTemplate.prototype.data=$util.newBuffer([]);ClientGameMasterTemplate.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.template_id!=null&&m.hasOwnProperty("template_id"))w.uint32(10).string(m.template_id);if(m.data!=null&&m.hasOwnProperty("data"))w.uint32(18).bytes(m.data);return w};ClientGameMasterTemplate.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.DownloadGmTemplatesResponse.ClientGameMasterTemplate;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.template_id=r.string();break;case 2:m.data=r.bytes();break;default:r.skipType(t&7);break}}return m};ClientGameMasterTemplate.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.DownloadGmTemplatesResponse.ClientGameMasterTemplate)return d;var m=new $root.POGOProtos.Networking.Responses.DownloadGmTemplatesResponse.ClientGameMasterTemplate;if(d.template_id!=null){m.template_id=String(d.template_id)}if(d.data!=null){if(typeof d.data==="string")$util.base64.decode(d.data,m.data=$util.newBuffer($util.base64.length(d.data)),0);else if(d.data.length)m.data=d.data}return m};ClientGameMasterTemplate.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.template_id="";if(o.bytes===String)d.data="";else{d.data=[];if(o.bytes!==Array)d.data=$util.newBuffer(d.data)}}if(m.template_id!=null&&m.hasOwnProperty("template_id")){d.template_id=m.template_id}if(m.data!=null&&m.hasOwnProperty("data")){d.data=o.bytes===String?$util.base64.encode(m.data,0,m.data.length):o.bytes===Array?Array.prototype.slice.call(m.data):m.data}return d};ClientGameMasterTemplate.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ClientGameMasterTemplate}();return DownloadGmTemplatesResponse}();Responses.DownloadItemTemplatesResponse=function(){function DownloadItemTemplatesResponse(p){this.item_templates=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DownloadItemTemplatesResponse.prototype.result=0;DownloadItemTemplatesResponse.prototype.item_templates=$util.emptyArray;DownloadItemTemplatesResponse.prototype.timestamp_ms=$util.Long?$util.Long.fromBits(0,0,true):0;DownloadItemTemplatesResponse.prototype.page_offset=0;DownloadItemTemplatesResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.item_templates!=null&&m.item_templates.length){for(var i=0;i<m.item_templates.length;++i)$root.POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.encode(m.item_templates[i],w.uint32(18).fork()).ldelim()}if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms"))w.uint32(24).uint64(m.timestamp_ms);if(m.page_offset!=null&&m.hasOwnProperty("page_offset"))w.uint32(32).int32(m.page_offset);return w};DownloadItemTemplatesResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.DownloadItemTemplatesResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.item_templates&&m.item_templates.length))m.item_templates=[];m.item_templates.push($root.POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.decode(r,r.uint32()));break;case 3:m.timestamp_ms=r.uint64();break;case 4:m.page_offset=r.int32();break;default:r.skipType(t&7);break}}return m};DownloadItemTemplatesResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.DownloadItemTemplatesResponse)return d;var m=new $root.POGOProtos.Networking.Responses.DownloadItemTemplatesResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"PAGE":case 2:m.result=2;break;case"RETRY":case 3:m.result=3;break}if(d.item_templates){if(!Array.isArray(d.item_templates))throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.item_templates: array expected");m.item_templates=[];for(var i=0;i<d.item_templates.length;++i){if(typeof d.item_templates[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.item_templates: object expected");m.item_templates[i]=$root.POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.fromObject(d.item_templates[i])}}if(d.timestamp_ms!=null){if($util.Long)(m.timestamp_ms=$util.Long.fromValue(d.timestamp_ms)).unsigned=true;else if(typeof d.timestamp_ms==="string")m.timestamp_ms=parseInt(d.timestamp_ms,10);else if(typeof d.timestamp_ms==="number")m.timestamp_ms=d.timestamp_ms;else if(typeof d.timestamp_ms==="object")m.timestamp_ms=new $util.LongBits(d.timestamp_ms.low>>>0,d.timestamp_ms.high>>>0).toNumber(true)}if(d.page_offset!=null){m.page_offset=d.page_offset|0}return m};DownloadItemTemplatesResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.item_templates=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0;if($util.Long){var n=new $util.Long(0,0,true);d.timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.timestamp_ms=o.longs===String?"0":0;d.page_offset=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.Result[m.result]:m.result}if(m.item_templates&&m.item_templates.length){d.item_templates=[];for(var j=0;j<m.item_templates.length;++j){d.item_templates[j]=$root.POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.toObject(m.item_templates[j],o)}}if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms")){if(typeof m.timestamp_ms==="number")d.timestamp_ms=o.longs===String?String(m.timestamp_ms):m.timestamp_ms;else d.timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.timestamp_ms):o.longs===Number?new $util.LongBits(m.timestamp_ms.low>>>0,m.timestamp_ms.high>>>0).toNumber(true):m.timestamp_ms}if(m.page_offset!=null&&m.hasOwnProperty("page_offset")){d.page_offset=m.page_offset}return d};DownloadItemTemplatesResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DownloadItemTemplatesResponse.ItemTemplate=function(){function ItemTemplate(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ItemTemplate.prototype.template_id="";ItemTemplate.prototype.pokemon_settings=null;ItemTemplate.prototype.item_settings=null;ItemTemplate.prototype.move_settings=null;ItemTemplate.prototype.move_sequence_settings=null;ItemTemplate.prototype.type_effective=null;ItemTemplate.prototype.badge_settings=null;ItemTemplate.prototype.camera=null;ItemTemplate.prototype.player_level=null;ItemTemplate.prototype.gym_level=null;ItemTemplate.prototype.battle_settings=null;ItemTemplate.prototype.encounter_settings=null;ItemTemplate.prototype.iap_item_display=null;ItemTemplate.prototype.iap_settings=null;ItemTemplate.prototype.pokemon_upgrades=null;ItemTemplate.prototype.equipped_badges=null;ItemTemplate.prototype.quest_settings=null;ItemTemplate.prototype.avatar_customization=null;ItemTemplate.prototype.form_settings=null;ItemTemplate.prototype.gender_settings=null;ItemTemplate.prototype.gym_badge_settings=null;ItemTemplate.prototype.weather_affinities=null;ItemTemplate.prototype.weather_bonus_settings=null;ItemTemplate.prototype.pokemon_scale_settings=null;ItemTemplate.prototype.iap_category_display=null;ItemTemplate.prototype.beluga_pokemon_whitelist=null;ItemTemplate.prototype.onboarding_settings=null;ItemTemplate.prototype.friendship_milestone_settings=null;ItemTemplate.prototype.lucky_pokemon_settings=null;ItemTemplate.prototype.combat_settings=null;ItemTemplate.prototype.combat_league_settings=null;ItemTemplate.prototype.combat_league=null;ItemTemplate.prototype.ex_raid_settings=null;ItemTemplate.prototype.combat_move=null;ItemTemplate.prototype.background_mode_settings=null;ItemTemplate.prototype.combat_stat_stage_settings=null;ItemTemplate.prototype.combat_npc_trainer=null;ItemTemplate.prototype.combat_npc_personality=null;ItemTemplate.prototype.onboarding_v2_settings=null;ItemTemplate.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.template_id!=null&&m.hasOwnProperty("template_id"))w.uint32(10).string(m.template_id);if(m.pokemon_settings!=null&&m.hasOwnProperty("pokemon_settings"))$root.POGOProtos.Settings.Master.PokemonSettings.encode(m.pokemon_settings,w.uint32(18).fork()).ldelim();if(m.item_settings!=null&&m.hasOwnProperty("item_settings"))$root.POGOProtos.Settings.Master.ItemSettings.encode(m.item_settings,w.uint32(26).fork()).ldelim();if(m.move_settings!=null&&m.hasOwnProperty("move_settings"))$root.POGOProtos.Settings.Master.MoveSettings.encode(m.move_settings,w.uint32(34).fork()).ldelim();if(m.move_sequence_settings!=null&&m.hasOwnProperty("move_sequence_settings"))$root.POGOProtos.Settings.Master.MoveSequenceSettings.encode(m.move_sequence_settings,w.uint32(42).fork()).ldelim();if(m.type_effective!=null&&m.hasOwnProperty("type_effective"))$root.POGOProtos.Settings.Master.TypeEffectiveSettings.encode(m.type_effective,w.uint32(66).fork()).ldelim();if(m.badge_settings!=null&&m.hasOwnProperty("badge_settings"))$root.POGOProtos.Settings.Master.BadgeSettings.encode(m.badge_settings,w.uint32(82).fork()).ldelim();if(m.camera!=null&&m.hasOwnProperty("camera"))$root.POGOProtos.Settings.Master.CameraSettings.encode(m.camera,w.uint32(90).fork()).ldelim();if(m.player_level!=null&&m.hasOwnProperty("player_level"))$root.POGOProtos.Settings.Master.PlayerLevelSettings.encode(m.player_level,w.uint32(98).fork()).ldelim();if(m.gym_level!=null&&m.hasOwnProperty("gym_level"))$root.POGOProtos.Settings.Master.GymLevelSettings.encode(m.gym_level,w.uint32(106).fork()).ldelim();if(m.battle_settings!=null&&m.hasOwnProperty("battle_settings"))$root.POGOProtos.Settings.Master.GymBattleSettings.encode(m.battle_settings,w.uint32(114).fork()).ldelim();if(m.encounter_settings!=null&&m.hasOwnProperty("encounter_settings"))$root.POGOProtos.Settings.Master.EncounterSettings.encode(m.encounter_settings,w.uint32(122).fork()).ldelim();if(m.iap_item_display!=null&&m.hasOwnProperty("iap_item_display"))$root.POGOProtos.Settings.Master.IapItemDisplay.encode(m.iap_item_display,w.uint32(130).fork()).ldelim();if(m.iap_settings!=null&&m.hasOwnProperty("iap_settings"))$root.POGOProtos.Settings.Master.IapSettings.encode(m.iap_settings,w.uint32(138).fork()).ldelim();if(m.pokemon_upgrades!=null&&m.hasOwnProperty("pokemon_upgrades"))$root.POGOProtos.Settings.Master.PokemonUpgradeSettings.encode(m.pokemon_upgrades,w.uint32(146).fork()).ldelim();if(m.equipped_badges!=null&&m.hasOwnProperty("equipped_badges"))$root.POGOProtos.Settings.Master.EquippedBadgeSettings.encode(m.equipped_badges,w.uint32(154).fork()).ldelim();if(m.quest_settings!=null&&m.hasOwnProperty("quest_settings"))$root.POGOProtos.Settings.Master.QuestSettings.encode(m.quest_settings,w.uint32(162).fork()).ldelim();if(m.avatar_customization!=null&&m.hasOwnProperty("avatar_customization"))$root.POGOProtos.Data.Avatar.AvatarCustomization.encode(m.avatar_customization,w.uint32(170).fork()).ldelim();if(m.form_settings!=null&&m.hasOwnProperty("form_settings"))$root.POGOProtos.Settings.Master.FormSettings.encode(m.form_settings,w.uint32(178).fork()).ldelim();if(m.gender_settings!=null&&m.hasOwnProperty("gender_settings"))$root.POGOProtos.Settings.Master.GenderSettings.encode(m.gender_settings,w.uint32(186).fork()).ldelim();if(m.gym_badge_settings!=null&&m.hasOwnProperty("gym_badge_settings"))$root.POGOProtos.Settings.Master.GymBadgeGmtSettings.encode(m.gym_badge_settings,w.uint32(194).fork()).ldelim();if(m.weather_affinities!=null&&m.hasOwnProperty("weather_affinities"))$root.POGOProtos.Settings.Master.WeatherAffinity.encode(m.weather_affinities,w.uint32(202).fork()).ldelim();if(m.weather_bonus_settings!=null&&m.hasOwnProperty("weather_bonus_settings"))$root.POGOProtos.Settings.Master.WeatherBonus.encode(m.weather_bonus_settings,w.uint32(210).fork()).ldelim();if(m.pokemon_scale_settings!=null&&m.hasOwnProperty("pokemon_scale_settings"))$root.POGOProtos.Settings.Master.PokemonScaleSetting.encode(m.pokemon_scale_settings,w.uint32(218).fork()).ldelim();if(m.iap_category_display!=null&&m.hasOwnProperty("iap_category_display"))$root.POGOProtos.Settings.Master.IapItemCategoryDisplay.encode(m.iap_category_display,w.uint32(226).fork()).ldelim();if(m.beluga_pokemon_whitelist!=null&&m.hasOwnProperty("beluga_pokemon_whitelist"))$root.POGOProtos.Settings.Master.BelugaPokemonWhitelist.encode(m.beluga_pokemon_whitelist,w.uint32(234).fork()).ldelim();if(m.onboarding_settings!=null&&m.hasOwnProperty("onboarding_settings"))$root.POGOProtos.Settings.Master.OnboardingSettings.encode(m.onboarding_settings,w.uint32(242).fork()).ldelim();if(m.friendship_milestone_settings!=null&&m.hasOwnProperty("friendship_milestone_settings"))$root.POGOProtos.Settings.Master.FriendshipLevelMilestoneSettings.encode(m.friendship_milestone_settings,w.uint32(250).fork()).ldelim();if(m.lucky_pokemon_settings!=null&&m.hasOwnProperty("lucky_pokemon_settings"))$root.POGOProtos.Settings.Master.LuckyPokemonSettings.encode(m.lucky_pokemon_settings,w.uint32(258).fork()).ldelim();if(m.combat_settings!=null&&m.hasOwnProperty("combat_settings"))$root.POGOProtos.Settings.Master.CombatSettings.encode(m.combat_settings,w.uint32(266).fork()).ldelim();if(m.combat_league_settings!=null&&m.hasOwnProperty("combat_league_settings"))$root.POGOProtos.Settings.Master.CombatLeagueSettings.encode(m.combat_league_settings,w.uint32(274).fork()).ldelim();if(m.combat_league!=null&&m.hasOwnProperty("combat_league"))$root.POGOProtos.Settings.Master.CombatLeague.encode(m.combat_league,w.uint32(282).fork()).ldelim();if(m.ex_raid_settings!=null&&m.hasOwnProperty("ex_raid_settings"))$root.POGOProtos.Settings.Master.ExRaidSettings.encode(m.ex_raid_settings,w.uint32(290).fork()).ldelim();if(m.combat_move!=null&&m.hasOwnProperty("combat_move"))$root.POGOProtos.Settings.Master.CombatMoveSettings.encode(m.combat_move,w.uint32(298).fork()).ldelim();if(m.background_mode_settings!=null&&m.hasOwnProperty("background_mode_settings"))$root.POGOProtos.Settings.Master.BackgroundModeSettings.encode(m.background_mode_settings,w.uint32(306).fork()).ldelim();if(m.combat_stat_stage_settings!=null&&m.hasOwnProperty("combat_stat_stage_settings"))$root.POGOProtos.Settings.Master.CombatStatStageSettings.encode(m.combat_stat_stage_settings,w.uint32(314).fork()).ldelim();if(m.combat_npc_trainer!=null&&m.hasOwnProperty("combat_npc_trainer"))$root.POGOProtos.Settings.Master.CombatNpcTrainer.encode(m.combat_npc_trainer,w.uint32(322).fork()).ldelim();if(m.combat_npc_personality!=null&&m.hasOwnProperty("combat_npc_personality"))$root.POGOProtos.Settings.Master.CombatNpcPersonality.encode(m.combat_npc_personality,w.uint32(330).fork()).ldelim();if(m.onboarding_v2_settings!=null&&m.hasOwnProperty("onboarding_v2_settings"))$root.POGOProtos.Settings.Master.OnboardingV2Settings.encode(m.onboarding_v2_settings,w.uint32(338).fork()).ldelim();return w};ItemTemplate.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.template_id=r.string();break;case 2:m.pokemon_settings=$root.POGOProtos.Settings.Master.PokemonSettings.decode(r,r.uint32());break;case 3:m.item_settings=$root.POGOProtos.Settings.Master.ItemSettings.decode(r,r.uint32());break;case 4:m.move_settings=$root.POGOProtos.Settings.Master.MoveSettings.decode(r,r.uint32());break;case 5:m.move_sequence_settings=$root.POGOProtos.Settings.Master.MoveSequenceSettings.decode(r,r.uint32());break;case 8:m.type_effective=$root.POGOProtos.Settings.Master.TypeEffectiveSettings.decode(r,r.uint32());break;case 10:m.badge_settings=$root.POGOProtos.Settings.Master.BadgeSettings.decode(r,r.uint32());break;case 11:m.camera=$root.POGOProtos.Settings.Master.CameraSettings.decode(r,r.uint32());break;case 12:m.player_level=$root.POGOProtos.Settings.Master.PlayerLevelSettings.decode(r,r.uint32());break;case 13:m.gym_level=$root.POGOProtos.Settings.Master.GymLevelSettings.decode(r,r.uint32());break;case 14:m.battle_settings=$root.POGOProtos.Settings.Master.GymBattleSettings.decode(r,r.uint32());break;case 15:m.encounter_settings=$root.POGOProtos.Settings.Master.EncounterSettings.decode(r,r.uint32());break;case 16:m.iap_item_display=$root.POGOProtos.Settings.Master.IapItemDisplay.decode(r,r.uint32());break;case 17:m.iap_settings=$root.POGOProtos.Settings.Master.IapSettings.decode(r,r.uint32());break;case 18:m.pokemon_upgrades=$root.POGOProtos.Settings.Master.PokemonUpgradeSettings.decode(r,r.uint32());break;case 19:m.equipped_badges=$root.POGOProtos.Settings.Master.EquippedBadgeSettings.decode(r,r.uint32());break;case 20:m.quest_settings=$root.POGOProtos.Settings.Master.QuestSettings.decode(r,r.uint32());break;case 21:m.avatar_customization=$root.POGOProtos.Data.Avatar.AvatarCustomization.decode(r,r.uint32());break;case 22:m.form_settings=$root.POGOProtos.Settings.Master.FormSettings.decode(r,r.uint32());break;case 23:m.gender_settings=$root.POGOProtos.Settings.Master.GenderSettings.decode(r,r.uint32());break;case 24:m.gym_badge_settings=$root.POGOProtos.Settings.Master.GymBadgeGmtSettings.decode(r,r.uint32());break;case 25:m.weather_affinities=$root.POGOProtos.Settings.Master.WeatherAffinity.decode(r,r.uint32());break;case 26:m.weather_bonus_settings=$root.POGOProtos.Settings.Master.WeatherBonus.decode(r,r.uint32());break;case 27:m.pokemon_scale_settings=$root.POGOProtos.Settings.Master.PokemonScaleSetting.decode(r,r.uint32());break;case 28:m.iap_category_display=$root.POGOProtos.Settings.Master.IapItemCategoryDisplay.decode(r,r.uint32());break;case 29:m.beluga_pokemon_whitelist=$root.POGOProtos.Settings.Master.BelugaPokemonWhitelist.decode(r,r.uint32());break;case 30:m.onboarding_settings=$root.POGOProtos.Settings.Master.OnboardingSettings.decode(r,r.uint32());break;case 31:m.friendship_milestone_settings=$root.POGOProtos.Settings.Master.FriendshipLevelMilestoneSettings.decode(r,r.uint32());break;case 32:m.lucky_pokemon_settings=$root.POGOProtos.Settings.Master.LuckyPokemonSettings.decode(r,r.uint32());break;case 33:m.combat_settings=$root.POGOProtos.Settings.Master.CombatSettings.decode(r,r.uint32());break;case 34:m.combat_league_settings=$root.POGOProtos.Settings.Master.CombatLeagueSettings.decode(r,r.uint32());break;case 35:m.combat_league=$root.POGOProtos.Settings.Master.CombatLeague.decode(r,r.uint32());break;case 36:m.ex_raid_settings=$root.POGOProtos.Settings.Master.ExRaidSettings.decode(r,r.uint32());break;case 37:m.combat_move=$root.POGOProtos.Settings.Master.CombatMoveSettings.decode(r,r.uint32());break;case 38:m.background_mode_settings=$root.POGOProtos.Settings.Master.BackgroundModeSettings.decode(r,r.uint32());break;case 39:m.combat_stat_stage_settings=$root.POGOProtos.Settings.Master.CombatStatStageSettings.decode(r,r.uint32());break;case 40:m.combat_npc_trainer=$root.POGOProtos.Settings.Master.CombatNpcTrainer.decode(r,r.uint32());break;case 41:m.combat_npc_personality=$root.POGOProtos.Settings.Master.CombatNpcPersonality.decode(r,r.uint32());break;case 42:m.onboarding_v2_settings=$root.POGOProtos.Settings.Master.OnboardingV2Settings.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};ItemTemplate.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate)return d;var m=new $root.POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate;if(d.template_id!=null){m.template_id=String(d.template_id)}if(d.pokemon_settings!=null){if(typeof d.pokemon_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.pokemon_settings: object expected");m.pokemon_settings=$root.POGOProtos.Settings.Master.PokemonSettings.fromObject(d.pokemon_settings)}if(d.item_settings!=null){if(typeof d.item_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.item_settings: object expected");m.item_settings=$root.POGOProtos.Settings.Master.ItemSettings.fromObject(d.item_settings)}if(d.move_settings!=null){if(typeof d.move_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.move_settings: object expected");m.move_settings=$root.POGOProtos.Settings.Master.MoveSettings.fromObject(d.move_settings)}if(d.move_sequence_settings!=null){if(typeof d.move_sequence_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.move_sequence_settings: object expected");m.move_sequence_settings=$root.POGOProtos.Settings.Master.MoveSequenceSettings.fromObject(d.move_sequence_settings)}if(d.type_effective!=null){if(typeof d.type_effective!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.type_effective: object expected");m.type_effective=$root.POGOProtos.Settings.Master.TypeEffectiveSettings.fromObject(d.type_effective)}if(d.badge_settings!=null){if(typeof d.badge_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.badge_settings: object expected");m.badge_settings=$root.POGOProtos.Settings.Master.BadgeSettings.fromObject(d.badge_settings)}if(d.camera!=null){if(typeof d.camera!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.camera: object expected");m.camera=$root.POGOProtos.Settings.Master.CameraSettings.fromObject(d.camera)}if(d.player_level!=null){if(typeof d.player_level!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.player_level: object expected");m.player_level=$root.POGOProtos.Settings.Master.PlayerLevelSettings.fromObject(d.player_level)}if(d.gym_level!=null){if(typeof d.gym_level!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.gym_level: object expected");m.gym_level=$root.POGOProtos.Settings.Master.GymLevelSettings.fromObject(d.gym_level)}if(d.battle_settings!=null){if(typeof d.battle_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.battle_settings: object expected");m.battle_settings=$root.POGOProtos.Settings.Master.GymBattleSettings.fromObject(d.battle_settings)}if(d.encounter_settings!=null){if(typeof d.encounter_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.encounter_settings: object expected");m.encounter_settings=$root.POGOProtos.Settings.Master.EncounterSettings.fromObject(d.encounter_settings)}if(d.iap_item_display!=null){if(typeof d.iap_item_display!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.iap_item_display: object expected");m.iap_item_display=$root.POGOProtos.Settings.Master.IapItemDisplay.fromObject(d.iap_item_display)}if(d.iap_settings!=null){if(typeof d.iap_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.iap_settings: object expected");m.iap_settings=$root.POGOProtos.Settings.Master.IapSettings.fromObject(d.iap_settings)}if(d.pokemon_upgrades!=null){if(typeof d.pokemon_upgrades!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.pokemon_upgrades: object expected");m.pokemon_upgrades=$root.POGOProtos.Settings.Master.PokemonUpgradeSettings.fromObject(d.pokemon_upgrades)}if(d.equipped_badges!=null){if(typeof d.equipped_badges!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.equipped_badges: object expected");m.equipped_badges=$root.POGOProtos.Settings.Master.EquippedBadgeSettings.fromObject(d.equipped_badges)}if(d.quest_settings!=null){if(typeof d.quest_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.quest_settings: object expected");m.quest_settings=$root.POGOProtos.Settings.Master.QuestSettings.fromObject(d.quest_settings)}if(d.avatar_customization!=null){if(typeof d.avatar_customization!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.avatar_customization: object expected");m.avatar_customization=$root.POGOProtos.Data.Avatar.AvatarCustomization.fromObject(d.avatar_customization)}if(d.form_settings!=null){if(typeof d.form_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.form_settings: object expected");m.form_settings=$root.POGOProtos.Settings.Master.FormSettings.fromObject(d.form_settings)}if(d.gender_settings!=null){if(typeof d.gender_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.gender_settings: object expected");m.gender_settings=$root.POGOProtos.Settings.Master.GenderSettings.fromObject(d.gender_settings)}if(d.gym_badge_settings!=null){if(typeof d.gym_badge_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.gym_badge_settings: object expected");m.gym_badge_settings=$root.POGOProtos.Settings.Master.GymBadgeGmtSettings.fromObject(d.gym_badge_settings)}if(d.weather_affinities!=null){if(typeof d.weather_affinities!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.weather_affinities: object expected");m.weather_affinities=$root.POGOProtos.Settings.Master.WeatherAffinity.fromObject(d.weather_affinities)}if(d.weather_bonus_settings!=null){if(typeof d.weather_bonus_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.weather_bonus_settings: object expected");m.weather_bonus_settings=$root.POGOProtos.Settings.Master.WeatherBonus.fromObject(d.weather_bonus_settings)}if(d.pokemon_scale_settings!=null){if(typeof d.pokemon_scale_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.pokemon_scale_settings: object expected");m.pokemon_scale_settings=$root.POGOProtos.Settings.Master.PokemonScaleSetting.fromObject(d.pokemon_scale_settings)}if(d.iap_category_display!=null){if(typeof d.iap_category_display!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.iap_category_display: object expected");m.iap_category_display=$root.POGOProtos.Settings.Master.IapItemCategoryDisplay.fromObject(d.iap_category_display)}if(d.beluga_pokemon_whitelist!=null){if(typeof d.beluga_pokemon_whitelist!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.beluga_pokemon_whitelist: object expected");m.beluga_pokemon_whitelist=$root.POGOProtos.Settings.Master.BelugaPokemonWhitelist.fromObject(d.beluga_pokemon_whitelist)}if(d.onboarding_settings!=null){if(typeof d.onboarding_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.onboarding_settings: object expected");m.onboarding_settings=$root.POGOProtos.Settings.Master.OnboardingSettings.fromObject(d.onboarding_settings)}if(d.friendship_milestone_settings!=null){if(typeof d.friendship_milestone_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.friendship_milestone_settings: object expected");m.friendship_milestone_settings=$root.POGOProtos.Settings.Master.FriendshipLevelMilestoneSettings.fromObject(d.friendship_milestone_settings)}if(d.lucky_pokemon_settings!=null){if(typeof d.lucky_pokemon_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.lucky_pokemon_settings: object expected");m.lucky_pokemon_settings=$root.POGOProtos.Settings.Master.LuckyPokemonSettings.fromObject(d.lucky_pokemon_settings)}if(d.combat_settings!=null){if(typeof d.combat_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.combat_settings: object expected");m.combat_settings=$root.POGOProtos.Settings.Master.CombatSettings.fromObject(d.combat_settings)}if(d.combat_league_settings!=null){if(typeof d.combat_league_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.combat_league_settings: object expected");m.combat_league_settings=$root.POGOProtos.Settings.Master.CombatLeagueSettings.fromObject(d.combat_league_settings)}if(d.combat_league!=null){if(typeof d.combat_league!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.combat_league: object expected");m.combat_league=$root.POGOProtos.Settings.Master.CombatLeague.fromObject(d.combat_league)}if(d.ex_raid_settings!=null){if(typeof d.ex_raid_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.ex_raid_settings: object expected");m.ex_raid_settings=$root.POGOProtos.Settings.Master.ExRaidSettings.fromObject(d.ex_raid_settings)}if(d.combat_move!=null){if(typeof d.combat_move!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.combat_move: object expected");m.combat_move=$root.POGOProtos.Settings.Master.CombatMoveSettings.fromObject(d.combat_move)}if(d.background_mode_settings!=null){if(typeof d.background_mode_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.background_mode_settings: object expected");m.background_mode_settings=$root.POGOProtos.Settings.Master.BackgroundModeSettings.fromObject(d.background_mode_settings)}if(d.combat_stat_stage_settings!=null){if(typeof d.combat_stat_stage_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.combat_stat_stage_settings: object expected");m.combat_stat_stage_settings=$root.POGOProtos.Settings.Master.CombatStatStageSettings.fromObject(d.combat_stat_stage_settings)}if(d.combat_npc_trainer!=null){if(typeof d.combat_npc_trainer!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.combat_npc_trainer: object expected");m.combat_npc_trainer=$root.POGOProtos.Settings.Master.CombatNpcTrainer.fromObject(d.combat_npc_trainer)}if(d.combat_npc_personality!=null){if(typeof d.combat_npc_personality!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.combat_npc_personality: object expected");m.combat_npc_personality=$root.POGOProtos.Settings.Master.CombatNpcPersonality.fromObject(d.combat_npc_personality)}if(d.onboarding_v2_settings!=null){if(typeof d.onboarding_v2_settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadItemTemplatesResponse.ItemTemplate.onboarding_v2_settings: object expected");m.onboarding_v2_settings=$root.POGOProtos.Settings.Master.OnboardingV2Settings.fromObject(d.onboarding_v2_settings)}return m};ItemTemplate.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.template_id="";d.pokemon_settings=null;d.item_settings=null;d.move_settings=null;d.move_sequence_settings=null;d.type_effective=null;d.badge_settings=null;d.camera=null;d.player_level=null;d.gym_level=null;d.battle_settings=null;d.encounter_settings=null;d.iap_item_display=null;d.iap_settings=null;d.pokemon_upgrades=null;d.equipped_badges=null;d.quest_settings=null;d.avatar_customization=null;d.form_settings=null;d.gender_settings=null;d.gym_badge_settings=null;d.weather_affinities=null;d.weather_bonus_settings=null;d.pokemon_scale_settings=null;d.iap_category_display=null;d.beluga_pokemon_whitelist=null;d.onboarding_settings=null;d.friendship_milestone_settings=null;d.lucky_pokemon_settings=null;d.combat_settings=null;d.combat_league_settings=null;d.combat_league=null;d.ex_raid_settings=null;d.combat_move=null;d.background_mode_settings=null;d.combat_stat_stage_settings=null;d.combat_npc_trainer=null;d.combat_npc_personality=null;d.onboarding_v2_settings=null}if(m.template_id!=null&&m.hasOwnProperty("template_id")){d.template_id=m.template_id}if(m.pokemon_settings!=null&&m.hasOwnProperty("pokemon_settings")){d.pokemon_settings=$root.POGOProtos.Settings.Master.PokemonSettings.toObject(m.pokemon_settings,o)}if(m.item_settings!=null&&m.hasOwnProperty("item_settings")){d.item_settings=$root.POGOProtos.Settings.Master.ItemSettings.toObject(m.item_settings,o)}if(m.move_settings!=null&&m.hasOwnProperty("move_settings")){d.move_settings=$root.POGOProtos.Settings.Master.MoveSettings.toObject(m.move_settings,o)}if(m.move_sequence_settings!=null&&m.hasOwnProperty("move_sequence_settings")){d.move_sequence_settings=$root.POGOProtos.Settings.Master.MoveSequenceSettings.toObject(m.move_sequence_settings,o)}if(m.type_effective!=null&&m.hasOwnProperty("type_effective")){d.type_effective=$root.POGOProtos.Settings.Master.TypeEffectiveSettings.toObject(m.type_effective,o)}if(m.badge_settings!=null&&m.hasOwnProperty("badge_settings")){d.badge_settings=$root.POGOProtos.Settings.Master.BadgeSettings.toObject(m.badge_settings,o)}if(m.camera!=null&&m.hasOwnProperty("camera")){d.camera=$root.POGOProtos.Settings.Master.CameraSettings.toObject(m.camera,o)}if(m.player_level!=null&&m.hasOwnProperty("player_level")){d.player_level=$root.POGOProtos.Settings.Master.PlayerLevelSettings.toObject(m.player_level,o)}if(m.gym_level!=null&&m.hasOwnProperty("gym_level")){d.gym_level=$root.POGOProtos.Settings.Master.GymLevelSettings.toObject(m.gym_level,o)}if(m.battle_settings!=null&&m.hasOwnProperty("battle_settings")){d.battle_settings=$root.POGOProtos.Settings.Master.GymBattleSettings.toObject(m.battle_settings,o)}if(m.encounter_settings!=null&&m.hasOwnProperty("encounter_settings")){d.encounter_settings=$root.POGOProtos.Settings.Master.EncounterSettings.toObject(m.encounter_settings,o)}if(m.iap_item_display!=null&&m.hasOwnProperty("iap_item_display")){d.iap_item_display=$root.POGOProtos.Settings.Master.IapItemDisplay.toObject(m.iap_item_display,o)}if(m.iap_settings!=null&&m.hasOwnProperty("iap_settings")){d.iap_settings=$root.POGOProtos.Settings.Master.IapSettings.toObject(m.iap_settings,o)}if(m.pokemon_upgrades!=null&&m.hasOwnProperty("pokemon_upgrades")){d.pokemon_upgrades=$root.POGOProtos.Settings.Master.PokemonUpgradeSettings.toObject(m.pokemon_upgrades,o)}if(m.equipped_badges!=null&&m.hasOwnProperty("equipped_badges")){d.equipped_badges=$root.POGOProtos.Settings.Master.EquippedBadgeSettings.toObject(m.equipped_badges,o)}if(m.quest_settings!=null&&m.hasOwnProperty("quest_settings")){d.quest_settings=$root.POGOProtos.Settings.Master.QuestSettings.toObject(m.quest_settings,o)}if(m.avatar_customization!=null&&m.hasOwnProperty("avatar_customization")){d.avatar_customization=$root.POGOProtos.Data.Avatar.AvatarCustomization.toObject(m.avatar_customization,o)}if(m.form_settings!=null&&m.hasOwnProperty("form_settings")){d.form_settings=$root.POGOProtos.Settings.Master.FormSettings.toObject(m.form_settings,o)}if(m.gender_settings!=null&&m.hasOwnProperty("gender_settings")){d.gender_settings=$root.POGOProtos.Settings.Master.GenderSettings.toObject(m.gender_settings,o)}if(m.gym_badge_settings!=null&&m.hasOwnProperty("gym_badge_settings")){d.gym_badge_settings=$root.POGOProtos.Settings.Master.GymBadgeGmtSettings.toObject(m.gym_badge_settings,o)}if(m.weather_affinities!=null&&m.hasOwnProperty("weather_affinities")){d.weather_affinities=$root.POGOProtos.Settings.Master.WeatherAffinity.toObject(m.weather_affinities,o)}if(m.weather_bonus_settings!=null&&m.hasOwnProperty("weather_bonus_settings")){d.weather_bonus_settings=$root.POGOProtos.Settings.Master.WeatherBonus.toObject(m.weather_bonus_settings,o)}if(m.pokemon_scale_settings!=null&&m.hasOwnProperty("pokemon_scale_settings")){d.pokemon_scale_settings=$root.POGOProtos.Settings.Master.PokemonScaleSetting.toObject(m.pokemon_scale_settings,o)}if(m.iap_category_display!=null&&m.hasOwnProperty("iap_category_display")){d.iap_category_display=$root.POGOProtos.Settings.Master.IapItemCategoryDisplay.toObject(m.iap_category_display,o)}if(m.beluga_pokemon_whitelist!=null&&m.hasOwnProperty("beluga_pokemon_whitelist")){d.beluga_pokemon_whitelist=$root.POGOProtos.Settings.Master.BelugaPokemonWhitelist.toObject(m.beluga_pokemon_whitelist,o)}if(m.onboarding_settings!=null&&m.hasOwnProperty("onboarding_settings")){d.onboarding_settings=$root.POGOProtos.Settings.Master.OnboardingSettings.toObject(m.onboarding_settings,o)}if(m.friendship_milestone_settings!=null&&m.hasOwnProperty("friendship_milestone_settings")){d.friendship_milestone_settings=$root.POGOProtos.Settings.Master.FriendshipLevelMilestoneSettings.toObject(m.friendship_milestone_settings,o)}if(m.lucky_pokemon_settings!=null&&m.hasOwnProperty("lucky_pokemon_settings")){d.lucky_pokemon_settings=$root.POGOProtos.Settings.Master.LuckyPokemonSettings.toObject(m.lucky_pokemon_settings,o)}if(m.combat_settings!=null&&m.hasOwnProperty("combat_settings")){d.combat_settings=$root.POGOProtos.Settings.Master.CombatSettings.toObject(m.combat_settings,o)}if(m.combat_league_settings!=null&&m.hasOwnProperty("combat_league_settings")){d.combat_league_settings=$root.POGOProtos.Settings.Master.CombatLeagueSettings.toObject(m.combat_league_settings,o)}if(m.combat_league!=null&&m.hasOwnProperty("combat_league")){d.combat_league=$root.POGOProtos.Settings.Master.CombatLeague.toObject(m.combat_league,o)}if(m.ex_raid_settings!=null&&m.hasOwnProperty("ex_raid_settings")){d.ex_raid_settings=$root.POGOProtos.Settings.Master.ExRaidSettings.toObject(m.ex_raid_settings,o)}if(m.combat_move!=null&&m.hasOwnProperty("combat_move")){d.combat_move=$root.POGOProtos.Settings.Master.CombatMoveSettings.toObject(m.combat_move,o)}if(m.background_mode_settings!=null&&m.hasOwnProperty("background_mode_settings")){d.background_mode_settings=$root.POGOProtos.Settings.Master.BackgroundModeSettings.toObject(m.background_mode_settings,o)}if(m.combat_stat_stage_settings!=null&&m.hasOwnProperty("combat_stat_stage_settings")){d.combat_stat_stage_settings=$root.POGOProtos.Settings.Master.CombatStatStageSettings.toObject(m.combat_stat_stage_settings,o)}if(m.combat_npc_trainer!=null&&m.hasOwnProperty("combat_npc_trainer")){d.combat_npc_trainer=$root.POGOProtos.Settings.Master.CombatNpcTrainer.toObject(m.combat_npc_trainer,o)}if(m.combat_npc_personality!=null&&m.hasOwnProperty("combat_npc_personality")){d.combat_npc_personality=$root.POGOProtos.Settings.Master.CombatNpcPersonality.toObject(m.combat_npc_personality,o)}if(m.onboarding_v2_settings!=null&&m.hasOwnProperty("onboarding_v2_settings")){d.onboarding_v2_settings=$root.POGOProtos.Settings.Master.OnboardingV2Settings.toObject(m.onboarding_v2_settings,o)}return d};ItemTemplate.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ItemTemplate}();DownloadItemTemplatesResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="PAGE"]=2;values[valuesById[3]="RETRY"]=3;return values}();return DownloadItemTemplatesResponse}();Responses.DownloadRemoteConfigVersionResponse=function(){function DownloadRemoteConfigVersionResponse(p){this.experiment_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DownloadRemoteConfigVersionResponse.prototype.result=0;DownloadRemoteConfigVersionResponse.prototype.item_templates_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,true):0;DownloadRemoteConfigVersionResponse.prototype.asset_digest_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,true):0;DownloadRemoteConfigVersionResponse.prototype.experiment_id=$util.emptyArray;DownloadRemoteConfigVersionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.item_templates_timestamp_ms!=null&&m.hasOwnProperty("item_templates_timestamp_ms"))w.uint32(16).uint64(m.item_templates_timestamp_ms);if(m.asset_digest_timestamp_ms!=null&&m.hasOwnProperty("asset_digest_timestamp_ms"))w.uint32(24).uint64(m.asset_digest_timestamp_ms);if(m.experiment_id!=null&&m.experiment_id.length){w.uint32(34).fork();for(var i=0;i<m.experiment_id.length;++i)w.uint32(m.experiment_id[i]);w.ldelim()}return w};DownloadRemoteConfigVersionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.DownloadRemoteConfigVersionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.item_templates_timestamp_ms=r.uint64();break;case 3:m.asset_digest_timestamp_ms=r.uint64();break;case 4:if(!(m.experiment_id&&m.experiment_id.length))m.experiment_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.experiment_id.push(r.uint32())}else m.experiment_id.push(r.uint32());break;default:r.skipType(t&7);break}}return m};DownloadRemoteConfigVersionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.DownloadRemoteConfigVersionResponse)return d;var m=new $root.POGOProtos.Networking.Responses.DownloadRemoteConfigVersionResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.item_templates_timestamp_ms!=null){if($util.Long)(m.item_templates_timestamp_ms=$util.Long.fromValue(d.item_templates_timestamp_ms)).unsigned=true;else if(typeof d.item_templates_timestamp_ms==="string")m.item_templates_timestamp_ms=parseInt(d.item_templates_timestamp_ms,10);else if(typeof d.item_templates_timestamp_ms==="number")m.item_templates_timestamp_ms=d.item_templates_timestamp_ms;else if(typeof d.item_templates_timestamp_ms==="object")m.item_templates_timestamp_ms=new $util.LongBits(d.item_templates_timestamp_ms.low>>>0,d.item_templates_timestamp_ms.high>>>0).toNumber(true)}if(d.asset_digest_timestamp_ms!=null){if($util.Long)(m.asset_digest_timestamp_ms=$util.Long.fromValue(d.asset_digest_timestamp_ms)).unsigned=true;else if(typeof d.asset_digest_timestamp_ms==="string")m.asset_digest_timestamp_ms=parseInt(d.asset_digest_timestamp_ms,10);else if(typeof d.asset_digest_timestamp_ms==="number")m.asset_digest_timestamp_ms=d.asset_digest_timestamp_ms;else if(typeof d.asset_digest_timestamp_ms==="object")m.asset_digest_timestamp_ms=new $util.LongBits(d.asset_digest_timestamp_ms.low>>>0,d.asset_digest_timestamp_ms.high>>>0).toNumber(true)}if(d.experiment_id){if(!Array.isArray(d.experiment_id))throw TypeError(".POGOProtos.Networking.Responses.DownloadRemoteConfigVersionResponse.experiment_id: array expected");m.experiment_id=[];for(var i=0;i<d.experiment_id.length;++i){m.experiment_id[i]=d.experiment_id[i]>>>0}}return m};DownloadRemoteConfigVersionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.experiment_id=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0;if($util.Long){var n=new $util.Long(0,0,true);d.item_templates_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.item_templates_timestamp_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,true);d.asset_digest_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.asset_digest_timestamp_ms=o.longs===String?"0":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.DownloadRemoteConfigVersionResponse.Result[m.result]:m.result}if(m.item_templates_timestamp_ms!=null&&m.hasOwnProperty("item_templates_timestamp_ms")){if(typeof m.item_templates_timestamp_ms==="number")d.item_templates_timestamp_ms=o.longs===String?String(m.item_templates_timestamp_ms):m.item_templates_timestamp_ms;else d.item_templates_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.item_templates_timestamp_ms):o.longs===Number?new $util.LongBits(m.item_templates_timestamp_ms.low>>>0,m.item_templates_timestamp_ms.high>>>0).toNumber(true):m.item_templates_timestamp_ms}if(m.asset_digest_timestamp_ms!=null&&m.hasOwnProperty("asset_digest_timestamp_ms")){if(typeof m.asset_digest_timestamp_ms==="number")d.asset_digest_timestamp_ms=o.longs===String?String(m.asset_digest_timestamp_ms):m.asset_digest_timestamp_ms;else d.asset_digest_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.asset_digest_timestamp_ms):o.longs===Number?new $util.LongBits(m.asset_digest_timestamp_ms.low>>>0,m.asset_digest_timestamp_ms.high>>>0).toNumber(true):m.asset_digest_timestamp_ms}if(m.experiment_id&&m.experiment_id.length){d.experiment_id=[];for(var j=0;j<m.experiment_id.length;++j){d.experiment_id[j]=m.experiment_id[j]}}return d};DownloadRemoteConfigVersionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DownloadRemoteConfigVersionResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return DownloadRemoteConfigVersionResponse}();Responses.DownloadSettingsResponse=function(){function DownloadSettingsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DownloadSettingsResponse.prototype.error="";DownloadSettingsResponse.prototype.hash="";DownloadSettingsResponse.prototype.settings=null;DownloadSettingsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.error!=null&&m.hasOwnProperty("error"))w.uint32(10).string(m.error);if(m.hash!=null&&m.hasOwnProperty("hash"))w.uint32(18).string(m.hash);if(m.settings!=null&&m.hasOwnProperty("settings"))$root.POGOProtos.Settings.GlobalSettings.encode(m.settings,w.uint32(26).fork()).ldelim();return w};DownloadSettingsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.DownloadSettingsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.error=r.string();break;case 2:m.hash=r.string();break;case 3:m.settings=$root.POGOProtos.Settings.GlobalSettings.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};DownloadSettingsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.DownloadSettingsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.DownloadSettingsResponse;if(d.error!=null){m.error=String(d.error)}if(d.hash!=null){m.hash=String(d.hash)}if(d.settings!=null){if(typeof d.settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.DownloadSettingsResponse.settings: object expected");m.settings=$root.POGOProtos.Settings.GlobalSettings.fromObject(d.settings)}return m};DownloadSettingsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.error="";d.hash="";d.settings=null}if(m.error!=null&&m.hasOwnProperty("error")){d.error=m.error}if(m.hash!=null&&m.hasOwnProperty("hash")){d.hash=m.hash}if(m.settings!=null&&m.hasOwnProperty("settings")){d.settings=$root.POGOProtos.Settings.GlobalSettings.toObject(m.settings,o)}return d};DownloadSettingsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DownloadSettingsResponse}();Responses.EchoResponse=function(){function EchoResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EchoResponse.prototype.context="";EchoResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.context!=null&&m.hasOwnProperty("context"))w.uint32(10).string(m.context);return w};EchoResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.EchoResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.context=r.string();break;default:r.skipType(t&7);break}}return m};EchoResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.EchoResponse)return d;var m=new $root.POGOProtos.Networking.Responses.EchoResponse;if(d.context!=null){m.context=String(d.context)}return m};EchoResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.context=""}if(m.context!=null&&m.hasOwnProperty("context")){d.context=m.context}return d};EchoResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EchoResponse}();Responses.EncounterResponse=function(){function EncounterResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EncounterResponse.prototype.wild_pokemon=null;EncounterResponse.prototype.background=0;EncounterResponse.prototype.status=0;EncounterResponse.prototype.capture_probability=null;EncounterResponse.prototype.active_item=0;EncounterResponse.prototype.arplus_attempts_until_flee=0;EncounterResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.wild_pokemon!=null&&m.hasOwnProperty("wild_pokemon"))$root.POGOProtos.Map.Pokemon.WildPokemon.encode(m.wild_pokemon,w.uint32(10).fork()).ldelim();if(m.background!=null&&m.hasOwnProperty("background"))w.uint32(16).int32(m.background);if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(24).int32(m.status);if(m.capture_probability!=null&&m.hasOwnProperty("capture_probability"))$root.POGOProtos.Data.Capture.CaptureProbability.encode(m.capture_probability,w.uint32(34).fork()).ldelim();if(m.active_item!=null&&m.hasOwnProperty("active_item"))w.uint32(40).int32(m.active_item);if(m.arplus_attempts_until_flee!=null&&m.hasOwnProperty("arplus_attempts_until_flee"))w.uint32(48).int32(m.arplus_attempts_until_flee);return w};EncounterResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.EncounterResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.wild_pokemon=$root.POGOProtos.Map.Pokemon.WildPokemon.decode(r,r.uint32());break;case 2:m.background=r.int32();break;case 3:m.status=r.int32();break;case 4:m.capture_probability=$root.POGOProtos.Data.Capture.CaptureProbability.decode(r,r.uint32());break;case 5:m.active_item=r.int32();break;case 6:m.arplus_attempts_until_flee=r.int32();break;default:r.skipType(t&7);break}}return m};EncounterResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.EncounterResponse)return d;var m=new $root.POGOProtos.Networking.Responses.EncounterResponse;if(d.wild_pokemon!=null){if(typeof d.wild_pokemon!=="object")throw TypeError(".POGOProtos.Networking.Responses.EncounterResponse.wild_pokemon: object expected");m.wild_pokemon=$root.POGOProtos.Map.Pokemon.WildPokemon.fromObject(d.wild_pokemon)}switch(d.background){case"PARK":case 0:m.background=0;break;case"DESERT":case 1:m.background=1;break}switch(d.status){case"ENCOUNTER_ERROR":case 0:m.status=0;break;case"ENCOUNTER_SUCCESS":case 1:m.status=1;break;case"ENCOUNTER_NOT_FOUND":case 2:m.status=2;break;case"ENCOUNTER_CLOSED":case 3:m.status=3;break;case"ENCOUNTER_POKEMON_FLED":case 4:m.status=4;break;case"ENCOUNTER_NOT_IN_RANGE":case 5:m.status=5;break;case"ENCOUNTER_ALREADY_HAPPENED":case 6:m.status=6;break;case"POKEMON_INVENTORY_FULL":case 7:m.status=7;break}if(d.capture_probability!=null){if(typeof d.capture_probability!=="object")throw TypeError(".POGOProtos.Networking.Responses.EncounterResponse.capture_probability: object expected");m.capture_probability=$root.POGOProtos.Data.Capture.CaptureProbability.fromObject(d.capture_probability)}switch(d.active_item){case"ITEM_UNKNOWN":case 0:m.active_item=0;break;case"ITEM_POKE_BALL":case 1:m.active_item=1;break;case"ITEM_GREAT_BALL":case 2:m.active_item=2;break;case"ITEM_ULTRA_BALL":case 3:m.active_item=3;break;case"ITEM_MASTER_BALL":case 4:m.active_item=4;break;case"ITEM_PREMIER_BALL":case 5:m.active_item=5;break;case"ITEM_POTION":case 101:m.active_item=101;break;case"ITEM_SUPER_POTION":case 102:m.active_item=102;break;case"ITEM_HYPER_POTION":case 103:m.active_item=103;break;case"ITEM_MAX_POTION":case 104:m.active_item=104;break;case"ITEM_REVIVE":case 201:m.active_item=201;break;case"ITEM_MAX_REVIVE":case 202:m.active_item=202;break;case"ITEM_LUCKY_EGG":case 301:m.active_item=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.active_item=401;break;case"ITEM_INCENSE_SPICY":case 402:m.active_item=402;break;case"ITEM_INCENSE_COOL":case 403:m.active_item=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.active_item=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.active_item=405;break;case"ITEM_TROY_DISK":case 501:m.active_item=501;break;case"ITEM_X_ATTACK":case 602:m.active_item=602;break;case"ITEM_X_DEFENSE":case 603:m.active_item=603;break;case"ITEM_X_MIRACLE":case 604:m.active_item=604;break;case"ITEM_RAZZ_BERRY":case 701:m.active_item=701;break;case"ITEM_BLUK_BERRY":case 702:m.active_item=702;break;case"ITEM_NANAB_BERRY":case 703:m.active_item=703;break;case"ITEM_WEPAR_BERRY":case 704:m.active_item=704;break;case"ITEM_PINAP_BERRY":case 705:m.active_item=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.active_item=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.active_item=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.active_item=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.active_item=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.active_item=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.active_item=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.active_item=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.active_item=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.active_item=1002;break;case"ITEM_SUN_STONE":case 1101:m.active_item=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.active_item=1102;break;case"ITEM_METAL_COAT":case 1103:m.active_item=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.active_item=1104;break;case"ITEM_UP_GRADE":case 1105:m.active_item=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.active_item=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.active_item=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.active_item=1202;break;case"ITEM_RARE_CANDY":case 1301:m.active_item=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.active_item=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.active_item=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.active_item=1403;break;case"ITEM_STAR_PIECE":case 1404:m.active_item=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.active_item=1405;break}if(d.arplus_attempts_until_flee!=null){m.arplus_attempts_until_flee=d.arplus_attempts_until_flee|0}return m};EncounterResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.wild_pokemon=null;d.background=o.enums===String?"PARK":0;d.status=o.enums===String?"ENCOUNTER_ERROR":0;d.capture_probability=null;d.active_item=o.enums===String?"ITEM_UNKNOWN":0;d.arplus_attempts_until_flee=0}if(m.wild_pokemon!=null&&m.hasOwnProperty("wild_pokemon")){d.wild_pokemon=$root.POGOProtos.Map.Pokemon.WildPokemon.toObject(m.wild_pokemon,o)}if(m.background!=null&&m.hasOwnProperty("background")){d.background=o.enums===String?$root.POGOProtos.Networking.Responses.EncounterResponse.Background[m.background]:m.background}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.EncounterResponse.Status[m.status]:m.status}if(m.capture_probability!=null&&m.hasOwnProperty("capture_probability")){d.capture_probability=$root.POGOProtos.Data.Capture.CaptureProbability.toObject(m.capture_probability,o)}if(m.active_item!=null&&m.hasOwnProperty("active_item")){d.active_item=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.active_item]:m.active_item}if(m.arplus_attempts_until_flee!=null&&m.hasOwnProperty("arplus_attempts_until_flee")){d.arplus_attempts_until_flee=m.arplus_attempts_until_flee}return d};EncounterResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};EncounterResponse.Background=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="PARK"]=0;values[valuesById[1]="DESERT"]=1;return values}();EncounterResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="ENCOUNTER_ERROR"]=0;values[valuesById[1]="ENCOUNTER_SUCCESS"]=1;values[valuesById[2]="ENCOUNTER_NOT_FOUND"]=2;values[valuesById[3]="ENCOUNTER_CLOSED"]=3;values[valuesById[4]="ENCOUNTER_POKEMON_FLED"]=4;values[valuesById[5]="ENCOUNTER_NOT_IN_RANGE"]=5;values[valuesById[6]="ENCOUNTER_ALREADY_HAPPENED"]=6;values[valuesById[7]="POKEMON_INVENTORY_FULL"]=7;return values}();return EncounterResponse}();Responses.EncounterTutorialCompleteResponse=function(){function EncounterTutorialCompleteResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EncounterTutorialCompleteResponse.prototype.result=0;EncounterTutorialCompleteResponse.prototype.pokemon_data=null;EncounterTutorialCompleteResponse.prototype.capture_award=null;EncounterTutorialCompleteResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data"))$root.POGOProtos.Data.PokemonData.encode(m.pokemon_data,w.uint32(18).fork()).ldelim();if(m.capture_award!=null&&m.hasOwnProperty("capture_award"))$root.POGOProtos.Data.Capture.CaptureAward.encode(m.capture_award,w.uint32(26).fork()).ldelim();return w};EncounterTutorialCompleteResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.EncounterTutorialCompleteResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.pokemon_data=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 3:m.capture_award=$root.POGOProtos.Data.Capture.CaptureAward.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};EncounterTutorialCompleteResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.EncounterTutorialCompleteResponse)return d;var m=new $root.POGOProtos.Networking.Responses.EncounterTutorialCompleteResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALID_POKEMON":case 2:m.result=2;break}if(d.pokemon_data!=null){if(typeof d.pokemon_data!=="object")throw TypeError(".POGOProtos.Networking.Responses.EncounterTutorialCompleteResponse.pokemon_data: object expected");m.pokemon_data=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon_data)}if(d.capture_award!=null){if(typeof d.capture_award!=="object")throw TypeError(".POGOProtos.Networking.Responses.EncounterTutorialCompleteResponse.capture_award: object expected");m.capture_award=$root.POGOProtos.Data.Capture.CaptureAward.fromObject(d.capture_award)}return m};EncounterTutorialCompleteResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.pokemon_data=null;d.capture_award=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.EncounterTutorialCompleteResponse.Result[m.result]:m.result}if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data")){d.pokemon_data=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon_data,o)}if(m.capture_award!=null&&m.hasOwnProperty("capture_award")){d.capture_award=$root.POGOProtos.Data.Capture.CaptureAward.toObject(m.capture_award,o)}return d};EncounterTutorialCompleteResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};EncounterTutorialCompleteResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_POKEMON"]=2;return values}();return EncounterTutorialCompleteResponse}();Responses.EquipBadgeResponse=function(){function EquipBadgeResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EquipBadgeResponse.prototype.result=0;EquipBadgeResponse.prototype.equipped=null;EquipBadgeResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.equipped!=null&&m.hasOwnProperty("equipped"))$root.POGOProtos.Data.Player.EquippedBadge.encode(m.equipped,w.uint32(18).fork()).ldelim();return w};EquipBadgeResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.EquipBadgeResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.equipped=$root.POGOProtos.Data.Player.EquippedBadge.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};EquipBadgeResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.EquipBadgeResponse)return d;var m=new $root.POGOProtos.Networking.Responses.EquipBadgeResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"COOLDOWN_ACTIVE":case 2:m.result=2;break;case"NOT_QUALIFIED":case 3:m.result=3;break}if(d.equipped!=null){if(typeof d.equipped!=="object")throw TypeError(".POGOProtos.Networking.Responses.EquipBadgeResponse.equipped: object expected");m.equipped=$root.POGOProtos.Data.Player.EquippedBadge.fromObject(d.equipped)}return m};EquipBadgeResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.equipped=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.EquipBadgeResponse.Result[m.result]:m.result}if(m.equipped!=null&&m.hasOwnProperty("equipped")){d.equipped=$root.POGOProtos.Data.Player.EquippedBadge.toObject(m.equipped,o)}return d};EquipBadgeResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};EquipBadgeResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="COOLDOWN_ACTIVE"]=2;values[valuesById[3]="NOT_QUALIFIED"]=3;return values}();return EquipBadgeResponse}();Responses.EvolvePokemonResponse=function(){function EvolvePokemonResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EvolvePokemonResponse.prototype.result=0;EvolvePokemonResponse.prototype.evolved_pokemon_data=null;EvolvePokemonResponse.prototype.experience_awarded=0;EvolvePokemonResponse.prototype.candy_awarded=0;EvolvePokemonResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.evolved_pokemon_data!=null&&m.hasOwnProperty("evolved_pokemon_data"))$root.POGOProtos.Data.PokemonData.encode(m.evolved_pokemon_data,w.uint32(18).fork()).ldelim();if(m.experience_awarded!=null&&m.hasOwnProperty("experience_awarded"))w.uint32(24).int32(m.experience_awarded);if(m.candy_awarded!=null&&m.hasOwnProperty("candy_awarded"))w.uint32(32).int32(m.candy_awarded);return w};EvolvePokemonResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.EvolvePokemonResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.evolved_pokemon_data=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 3:m.experience_awarded=r.int32();break;case 4:m.candy_awarded=r.int32();break;default:r.skipType(t&7);break}}return m};EvolvePokemonResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.EvolvePokemonResponse)return d;var m=new $root.POGOProtos.Networking.Responses.EvolvePokemonResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"FAILED_POKEMON_MISSING":case 2:m.result=2;break;case"FAILED_INSUFFICIENT_RESOURCES":case 3:m.result=3;break;case"FAILED_POKEMON_CANNOT_EVOLVE":case 4:m.result=4;break;case"FAILED_POKEMON_IS_DEPLOYED":case 5:m.result=5;break;case"FAILED_INVALID_ITEM_REQUIREMENT":case 6:m.result=6;break}if(d.evolved_pokemon_data!=null){if(typeof d.evolved_pokemon_data!=="object")throw TypeError(".POGOProtos.Networking.Responses.EvolvePokemonResponse.evolved_pokemon_data: object expected");m.evolved_pokemon_data=$root.POGOProtos.Data.PokemonData.fromObject(d.evolved_pokemon_data)}if(d.experience_awarded!=null){m.experience_awarded=d.experience_awarded|0}if(d.candy_awarded!=null){m.candy_awarded=d.candy_awarded|0}return m};EvolvePokemonResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.evolved_pokemon_data=null;d.experience_awarded=0;d.candy_awarded=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.EvolvePokemonResponse.Result[m.result]:m.result}if(m.evolved_pokemon_data!=null&&m.hasOwnProperty("evolved_pokemon_data")){d.evolved_pokemon_data=$root.POGOProtos.Data.PokemonData.toObject(m.evolved_pokemon_data,o)}if(m.experience_awarded!=null&&m.hasOwnProperty("experience_awarded")){d.experience_awarded=m.experience_awarded}if(m.candy_awarded!=null&&m.hasOwnProperty("candy_awarded")){d.candy_awarded=m.candy_awarded}return d};EvolvePokemonResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};EvolvePokemonResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILED_POKEMON_MISSING"]=2;values[valuesById[3]="FAILED_INSUFFICIENT_RESOURCES"]=3;values[valuesById[4]="FAILED_POKEMON_CANNOT_EVOLVE"]=4;values[valuesById[5]="FAILED_POKEMON_IS_DEPLOYED"]=5;values[valuesById[6]="FAILED_INVALID_ITEM_REQUIREMENT"]=6;return values}();return EvolvePokemonResponse}();Responses.FetchAllNewsResponse=function(){function FetchAllNewsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FetchAllNewsResponse.prototype.result=0;FetchAllNewsResponse.prototype.current_news=null;FetchAllNewsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.current_news!=null&&m.hasOwnProperty("current_news"))$root.POGOProtos.Data.News.CurrentNews.encode(m.current_news,w.uint32(18).fork()).ldelim();return w};FetchAllNewsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.FetchAllNewsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.current_news=$root.POGOProtos.Data.News.CurrentNews.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};FetchAllNewsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.FetchAllNewsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.FetchAllNewsResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"NO_NEWS_FOUND":case 2:m.result=2;break}if(d.current_news!=null){if(typeof d.current_news!=="object")throw TypeError(".POGOProtos.Networking.Responses.FetchAllNewsResponse.current_news: object expected");m.current_news=$root.POGOProtos.Data.News.CurrentNews.fromObject(d.current_news)}return m};FetchAllNewsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.current_news=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.FetchAllNewsResponse.Result[m.result]:m.result}if(m.current_news!=null&&m.hasOwnProperty("current_news")){d.current_news=$root.POGOProtos.Data.News.CurrentNews.toObject(m.current_news,o)}return d};FetchAllNewsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FetchAllNewsResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="NO_NEWS_FOUND"]=2;return values}();return FetchAllNewsResponse}();Responses.FortDeployPokemonResponse=function(){function FortDeployPokemonResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FortDeployPokemonResponse.prototype.result=0;FortDeployPokemonResponse.prototype.fort_details=null;FortDeployPokemonResponse.prototype.pokemon_data=null;FortDeployPokemonResponse.prototype.gym_state=null;FortDeployPokemonResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.fort_details!=null&&m.hasOwnProperty("fort_details"))$root.POGOProtos.Networking.Responses.FortDetailsResponse.encode(m.fort_details,w.uint32(18).fork()).ldelim();if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data"))$root.POGOProtos.Data.PokemonData.encode(m.pokemon_data,w.uint32(26).fork()).ldelim();if(m.gym_state!=null&&m.hasOwnProperty("gym_state"))$root.POGOProtos.Data.Gym.GymState.encode(m.gym_state,w.uint32(34).fork()).ldelim();return w};FortDeployPokemonResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.FortDeployPokemonResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.fort_details=$root.POGOProtos.Networking.Responses.FortDetailsResponse.decode(r,r.uint32());break;case 3:m.pokemon_data=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 4:m.gym_state=$root.POGOProtos.Data.Gym.GymState.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};FortDeployPokemonResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.FortDeployPokemonResponse)return d;var m=new $root.POGOProtos.Networking.Responses.FortDeployPokemonResponse;switch(d.result){case"NO_RESULT_SET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_ALREADY_HAS_POKEMON_ON_FORT":case 2:m.result=2;break;case"ERROR_OPPOSING_TEAM_OWNS_FORT":case 3:m.result=3;break;case"ERROR_FORT_IS_FULL":case 4:m.result=4;break;case"ERROR_NOT_IN_RANGE":case 5:m.result=5;break;case"ERROR_PLAYER_HAS_NO_TEAM":case 6:m.result=6;break;case"ERROR_POKEMON_NOT_FULL_HP":case 7:m.result=7;break;case"ERROR_PLAYER_BELOW_MINIMUM_LEVEL":case 8:m.result=8;break;case"ERROR_POKEMON_IS_BUDDY":case 9:m.result=9;break;case"ERROR_FORT_DEPLOY_LOCKOUT":case 10:m.result=10;break;case"ERROR_PLAYER_HAS_NO_NICKNAME":case 11:m.result=11;break;case"ERROR_POI_INACCESSIBLE":case 12:m.result=12;break;case"ERROR_LEGENDARY_POKEMON":case 13:m.result=13;break;case"ERROR_INVALID_POKEMON":case 14:m.result=14;break}if(d.fort_details!=null){if(typeof d.fort_details!=="object")throw TypeError(".POGOProtos.Networking.Responses.FortDeployPokemonResponse.fort_details: object expected");m.fort_details=$root.POGOProtos.Networking.Responses.FortDetailsResponse.fromObject(d.fort_details)}if(d.pokemon_data!=null){if(typeof d.pokemon_data!=="object")throw TypeError(".POGOProtos.Networking.Responses.FortDeployPokemonResponse.pokemon_data: object expected");m.pokemon_data=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon_data)}if(d.gym_state!=null){if(typeof d.gym_state!=="object")throw TypeError(".POGOProtos.Networking.Responses.FortDeployPokemonResponse.gym_state: object expected");m.gym_state=$root.POGOProtos.Data.Gym.GymState.fromObject(d.gym_state)}return m};FortDeployPokemonResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"NO_RESULT_SET":0;d.fort_details=null;d.pokemon_data=null;d.gym_state=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.FortDeployPokemonResponse.Result[m.result]:m.result}if(m.fort_details!=null&&m.hasOwnProperty("fort_details")){d.fort_details=$root.POGOProtos.Networking.Responses.FortDetailsResponse.toObject(m.fort_details,o)}if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data")){d.pokemon_data=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon_data,o)}if(m.gym_state!=null&&m.hasOwnProperty("gym_state")){d.gym_state=$root.POGOProtos.Data.Gym.GymState.toObject(m.gym_state,o)}return d};FortDeployPokemonResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FortDeployPokemonResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NO_RESULT_SET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_ALREADY_HAS_POKEMON_ON_FORT"]=2;values[valuesById[3]="ERROR_OPPOSING_TEAM_OWNS_FORT"]=3;values[valuesById[4]="ERROR_FORT_IS_FULL"]=4;values[valuesById[5]="ERROR_NOT_IN_RANGE"]=5;values[valuesById[6]="ERROR_PLAYER_HAS_NO_TEAM"]=6;values[valuesById[7]="ERROR_POKEMON_NOT_FULL_HP"]=7;values[valuesById[8]="ERROR_PLAYER_BELOW_MINIMUM_LEVEL"]=8;values[valuesById[9]="ERROR_POKEMON_IS_BUDDY"]=9;values[valuesById[10]="ERROR_FORT_DEPLOY_LOCKOUT"]=10;values[valuesById[11]="ERROR_PLAYER_HAS_NO_NICKNAME"]=11;values[valuesById[12]="ERROR_POI_INACCESSIBLE"]=12;values[valuesById[13]="ERROR_LEGENDARY_POKEMON"]=13;values[valuesById[14]="ERROR_INVALID_POKEMON"]=14;return values}();return FortDeployPokemonResponse}();Responses.FortDetailsResponse=function(){function FortDetailsResponse(p){this.image_urls=[];this.modifiers=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FortDetailsResponse.prototype.fort_id="";FortDetailsResponse.prototype.team_color=0;FortDetailsResponse.prototype.pokemon_data=null;FortDetailsResponse.prototype.name="";FortDetailsResponse.prototype.image_urls=$util.emptyArray;FortDetailsResponse.prototype.fp=0;FortDetailsResponse.prototype.stamina=0;FortDetailsResponse.prototype.max_stamina=0;FortDetailsResponse.prototype.type=0;FortDetailsResponse.prototype.latitude=0;FortDetailsResponse.prototype.longitude=0;FortDetailsResponse.prototype.description="";FortDetailsResponse.prototype.modifiers=$util.emptyArray;FortDetailsResponse.prototype.close_soon=false;FortDetailsResponse.prototype.checkin_image_url="";FortDetailsResponse.prototype.event_info=null;FortDetailsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(10).string(m.fort_id);if(m.team_color!=null&&m.hasOwnProperty("team_color"))w.uint32(16).int32(m.team_color);if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data"))$root.POGOProtos.Data.PokemonData.encode(m.pokemon_data,w.uint32(26).fork()).ldelim();if(m.name!=null&&m.hasOwnProperty("name"))w.uint32(34).string(m.name);if(m.image_urls!=null&&m.image_urls.length){for(var i=0;i<m.image_urls.length;++i)w.uint32(42).string(m.image_urls[i])}if(m.fp!=null&&m.hasOwnProperty("fp"))w.uint32(48).int32(m.fp);if(m.stamina!=null&&m.hasOwnProperty("stamina"))w.uint32(56).int32(m.stamina);if(m.max_stamina!=null&&m.hasOwnProperty("max_stamina"))w.uint32(64).int32(m.max_stamina);if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(72).int32(m.type);if(m.latitude!=null&&m.hasOwnProperty("latitude"))w.uint32(81).double(m.latitude);if(m.longitude!=null&&m.hasOwnProperty("longitude"))w.uint32(89).double(m.longitude);if(m.description!=null&&m.hasOwnProperty("description"))w.uint32(98).string(m.description);if(m.modifiers!=null&&m.modifiers.length){for(var i=0;i<m.modifiers.length;++i)$root.POGOProtos.Map.Fort.FortModifier.encode(m.modifiers[i],w.uint32(106).fork()).ldelim()}if(m.close_soon!=null&&m.hasOwnProperty("close_soon"))w.uint32(112).bool(m.close_soon);if(m.checkin_image_url!=null&&m.hasOwnProperty("checkin_image_url"))w.uint32(122).string(m.checkin_image_url);if(m.event_info!=null&&m.hasOwnProperty("event_info"))$root.POGOProtos.Data.Raid.EventInfo.encode(m.event_info,w.uint32(130).fork()).ldelim();return w};FortDetailsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.FortDetailsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fort_id=r.string();break;case 2:m.team_color=r.int32();break;case 3:m.pokemon_data=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 4:m.name=r.string();break;case 5:if(!(m.image_urls&&m.image_urls.length))m.image_urls=[];m.image_urls.push(r.string());break;case 6:m.fp=r.int32();break;case 7:m.stamina=r.int32();break;case 8:m.max_stamina=r.int32();break;case 9:m.type=r.int32();break;case 10:m.latitude=r.double();break;case 11:m.longitude=r.double();break;case 12:m.description=r.string();break;case 13:if(!(m.modifiers&&m.modifiers.length))m.modifiers=[];m.modifiers.push($root.POGOProtos.Map.Fort.FortModifier.decode(r,r.uint32()));break;case 14:m.close_soon=r.bool();break;case 15:m.checkin_image_url=r.string();break;case 16:m.event_info=$root.POGOProtos.Data.Raid.EventInfo.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};FortDetailsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.FortDetailsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.FortDetailsResponse;if(d.fort_id!=null){m.fort_id=String(d.fort_id)}switch(d.team_color){case"NEUTRAL":case 0:m.team_color=0;break;case"BLUE":case 1:m.team_color=1;break;case"RED":case 2:m.team_color=2;break;case"YELLOW":case 3:m.team_color=3;break}if(d.pokemon_data!=null){if(typeof d.pokemon_data!=="object")throw TypeError(".POGOProtos.Networking.Responses.FortDetailsResponse.pokemon_data: object expected");m.pokemon_data=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon_data)}if(d.name!=null){m.name=String(d.name)}if(d.image_urls){if(!Array.isArray(d.image_urls))throw TypeError(".POGOProtos.Networking.Responses.FortDetailsResponse.image_urls: array expected");m.image_urls=[];for(var i=0;i<d.image_urls.length;++i){m.image_urls[i]=String(d.image_urls[i])}}if(d.fp!=null){m.fp=d.fp|0}if(d.stamina!=null){m.stamina=d.stamina|0}if(d.max_stamina!=null){m.max_stamina=d.max_stamina|0}switch(d.type){case"GYM":case 0:m.type=0;break;case"CHECKPOINT":case 1:m.type=1;break}if(d.latitude!=null){m.latitude=Number(d.latitude)}if(d.longitude!=null){m.longitude=Number(d.longitude)}if(d.description!=null){m.description=String(d.description)}if(d.modifiers){if(!Array.isArray(d.modifiers))throw TypeError(".POGOProtos.Networking.Responses.FortDetailsResponse.modifiers: array expected");m.modifiers=[];for(var i=0;i<d.modifiers.length;++i){if(typeof d.modifiers[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.FortDetailsResponse.modifiers: object expected");m.modifiers[i]=$root.POGOProtos.Map.Fort.FortModifier.fromObject(d.modifiers[i])}}if(d.close_soon!=null){m.close_soon=Boolean(d.close_soon)}if(d.checkin_image_url!=null){m.checkin_image_url=String(d.checkin_image_url)}if(d.event_info!=null){if(typeof d.event_info!=="object")throw TypeError(".POGOProtos.Networking.Responses.FortDetailsResponse.event_info: object expected");m.event_info=$root.POGOProtos.Data.Raid.EventInfo.fromObject(d.event_info)}return m};FortDetailsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.image_urls=[];d.modifiers=[]}if(o.defaults){d.fort_id="";d.team_color=o.enums===String?"NEUTRAL":0;d.pokemon_data=null;d.name="";d.fp=0;d.stamina=0;d.max_stamina=0;d.type=o.enums===String?"GYM":0;d.latitude=0;d.longitude=0;d.description="";d.close_soon=false;d.checkin_image_url="";d.event_info=null}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.team_color!=null&&m.hasOwnProperty("team_color")){d.team_color=o.enums===String?$root.POGOProtos.Enums.TeamColor[m.team_color]:m.team_color}if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data")){d.pokemon_data=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon_data,o)}if(m.name!=null&&m.hasOwnProperty("name")){d.name=m.name}if(m.image_urls&&m.image_urls.length){d.image_urls=[];for(var j=0;j<m.image_urls.length;++j){d.image_urls[j]=m.image_urls[j]}}if(m.fp!=null&&m.hasOwnProperty("fp")){d.fp=m.fp}if(m.stamina!=null&&m.hasOwnProperty("stamina")){d.stamina=m.stamina}if(m.max_stamina!=null&&m.hasOwnProperty("max_stamina")){d.max_stamina=m.max_stamina}if(m.type!=null&&m.hasOwnProperty("type")){d.type=o.enums===String?$root.POGOProtos.Map.Fort.FortType[m.type]:m.type}if(m.latitude!=null&&m.hasOwnProperty("latitude")){d.latitude=o.json&&!isFinite(m.latitude)?String(m.latitude):m.latitude}if(m.longitude!=null&&m.hasOwnProperty("longitude")){d.longitude=o.json&&!isFinite(m.longitude)?String(m.longitude):m.longitude}if(m.description!=null&&m.hasOwnProperty("description")){d.description=m.description}if(m.modifiers&&m.modifiers.length){d.modifiers=[];for(var j=0;j<m.modifiers.length;++j){d.modifiers[j]=$root.POGOProtos.Map.Fort.FortModifier.toObject(m.modifiers[j],o)}}if(m.close_soon!=null&&m.hasOwnProperty("close_soon")){d.close_soon=m.close_soon}if(m.checkin_image_url!=null&&m.hasOwnProperty("checkin_image_url")){d.checkin_image_url=m.checkin_image_url}if(m.event_info!=null&&m.hasOwnProperty("event_info")){d.event_info=$root.POGOProtos.Data.Raid.EventInfo.toObject(m.event_info,o)}return d};FortDetailsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FortDetailsResponse}();Responses.FortRecallPokemonResponse=function(){function FortRecallPokemonResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FortRecallPokemonResponse.prototype.result=0;FortRecallPokemonResponse.prototype.fort_details=null;FortRecallPokemonResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.fort_details!=null&&m.hasOwnProperty("fort_details"))$root.POGOProtos.Networking.Responses.FortDetailsResponse.encode(m.fort_details,w.uint32(18).fork()).ldelim();return w};FortRecallPokemonResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.FortRecallPokemonResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.fort_details=$root.POGOProtos.Networking.Responses.FortDetailsResponse.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};FortRecallPokemonResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.FortRecallPokemonResponse)return d;var m=new $root.POGOProtos.Networking.Responses.FortRecallPokemonResponse;switch(d.result){case"NO_RESULT_SET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_NOT_IN_RANGE":case 2:m.result=2;break;case"ERROR_POKEMON_NOT_ON_FORT":case 3:m.result=3;break;case"ERROR_NO_PLAYER":case 4:m.result=4;break}if(d.fort_details!=null){if(typeof d.fort_details!=="object")throw TypeError(".POGOProtos.Networking.Responses.FortRecallPokemonResponse.fort_details: object expected");m.fort_details=$root.POGOProtos.Networking.Responses.FortDetailsResponse.fromObject(d.fort_details)}return m};FortRecallPokemonResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"NO_RESULT_SET":0;d.fort_details=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.FortRecallPokemonResponse.Result[m.result]:m.result}if(m.fort_details!=null&&m.hasOwnProperty("fort_details")){d.fort_details=$root.POGOProtos.Networking.Responses.FortDetailsResponse.toObject(m.fort_details,o)}return d};FortRecallPokemonResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FortRecallPokemonResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NO_RESULT_SET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_NOT_IN_RANGE"]=2;values[valuesById[3]="ERROR_POKEMON_NOT_ON_FORT"]=3;values[valuesById[4]="ERROR_NO_PLAYER"]=4;return values}();return FortRecallPokemonResponse}();Responses.FortSearchResponse=function(){function FortSearchResponse(p){this.items_awarded=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FortSearchResponse.prototype.result=0;FortSearchResponse.prototype.items_awarded=$util.emptyArray;FortSearchResponse.prototype.gems_awarded=0;FortSearchResponse.prototype.pokemon_data_egg=null;FortSearchResponse.prototype.experience_awarded=0;FortSearchResponse.prototype.cooldown_complete_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;FortSearchResponse.prototype.chain_hack_sequence_number=0;FortSearchResponse.prototype.awarded_gym_badge=null;FortSearchResponse.prototype.loot=null;FortSearchResponse.prototype.bonus_loot=null;FortSearchResponse.prototype.raid_tickets=0;FortSearchResponse.prototype.team_bonus_loot=null;FortSearchResponse.prototype.fort_id="";FortSearchResponse.prototype.challenge_quest=null;FortSearchResponse.prototype.gift_box=null;FortSearchResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.items_awarded!=null&&m.items_awarded.length){for(var i=0;i<m.items_awarded.length;++i)$root.POGOProtos.Inventory.Item.ItemAward.encode(m.items_awarded[i],w.uint32(18).fork()).ldelim()}if(m.gems_awarded!=null&&m.hasOwnProperty("gems_awarded"))w.uint32(24).int32(m.gems_awarded);if(m.pokemon_data_egg!=null&&m.hasOwnProperty("pokemon_data_egg"))$root.POGOProtos.Data.PokemonData.encode(m.pokemon_data_egg,w.uint32(34).fork()).ldelim();if(m.experience_awarded!=null&&m.hasOwnProperty("experience_awarded"))w.uint32(40).int32(m.experience_awarded);if(m.cooldown_complete_timestamp_ms!=null&&m.hasOwnProperty("cooldown_complete_timestamp_ms"))w.uint32(48).int64(m.cooldown_complete_timestamp_ms);if(m.chain_hack_sequence_number!=null&&m.hasOwnProperty("chain_hack_sequence_number"))w.uint32(56).int32(m.chain_hack_sequence_number);if(m.awarded_gym_badge!=null&&m.hasOwnProperty("awarded_gym_badge"))$root.POGOProtos.Data.Badge.AwardedGymBadge.encode(m.awarded_gym_badge,w.uint32(66).fork()).ldelim();if(m.loot!=null&&m.hasOwnProperty("loot"))$root.POGOProtos.Inventory.Loot.encode(m.loot,w.uint32(74).fork()).ldelim();if(m.bonus_loot!=null&&m.hasOwnProperty("bonus_loot"))$root.POGOProtos.Inventory.Loot.encode(m.bonus_loot,w.uint32(82).fork()).ldelim();if(m.raid_tickets!=null&&m.hasOwnProperty("raid_tickets"))w.uint32(88).int32(m.raid_tickets);if(m.team_bonus_loot!=null&&m.hasOwnProperty("team_bonus_loot"))$root.POGOProtos.Inventory.Loot.encode(m.team_bonus_loot,w.uint32(98).fork()).ldelim();if(m.fort_id!=null&&m.hasOwnProperty("fort_id"))w.uint32(106).string(m.fort_id);if(m.challenge_quest!=null&&m.hasOwnProperty("challenge_quest"))$root.POGOProtos.Data.Quests.ClientQuest.encode(m.challenge_quest,w.uint32(114).fork()).ldelim();if(m.gift_box!=null&&m.hasOwnProperty("gift_box"))$root.POGOProtos.Data.Gift.GiftBox.encode(m.gift_box,w.uint32(122).fork()).ldelim();return w};FortSearchResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.FortSearchResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.items_awarded&&m.items_awarded.length))m.items_awarded=[];m.items_awarded.push($root.POGOProtos.Inventory.Item.ItemAward.decode(r,r.uint32()));break;case 3:m.gems_awarded=r.int32();break;case 4:m.pokemon_data_egg=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 5:m.experience_awarded=r.int32();break;case 6:m.cooldown_complete_timestamp_ms=r.int64();break;case 7:m.chain_hack_sequence_number=r.int32();break;case 8:m.awarded_gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.decode(r,r.uint32());break;case 9:m.loot=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;case 10:m.bonus_loot=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;case 11:m.raid_tickets=r.int32();break;case 12:m.team_bonus_loot=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;case 13:m.fort_id=r.string();break;case 14:m.challenge_quest=$root.POGOProtos.Data.Quests.ClientQuest.decode(r,r.uint32());break;case 15:m.gift_box=$root.POGOProtos.Data.Gift.GiftBox.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};FortSearchResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.FortSearchResponse)return d;var m=new $root.POGOProtos.Networking.Responses.FortSearchResponse;switch(d.result){case"NO_RESULT_SET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"OUT_OF_RANGE":case 2:m.result=2;break;case"IN_COOLDOWN_PERIOD":case 3:m.result=3;break;case"INVENTORY_FULL":case 4:m.result=4;break;case"EXCEEDED_DAILY_LIMIT":case 5:m.result=5;break;case"POI_INACCESSIBLE":case 6:m.result=6;break}if(d.items_awarded){if(!Array.isArray(d.items_awarded))throw TypeError(".POGOProtos.Networking.Responses.FortSearchResponse.items_awarded: array expected");m.items_awarded=[];for(var i=0;i<d.items_awarded.length;++i){if(typeof d.items_awarded[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.FortSearchResponse.items_awarded: object expected");m.items_awarded[i]=$root.POGOProtos.Inventory.Item.ItemAward.fromObject(d.items_awarded[i])}}if(d.gems_awarded!=null){m.gems_awarded=d.gems_awarded|0}if(d.pokemon_data_egg!=null){if(typeof d.pokemon_data_egg!=="object")throw TypeError(".POGOProtos.Networking.Responses.FortSearchResponse.pokemon_data_egg: object expected");m.pokemon_data_egg=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon_data_egg)}if(d.experience_awarded!=null){m.experience_awarded=d.experience_awarded|0}if(d.cooldown_complete_timestamp_ms!=null){if($util.Long)(m.cooldown_complete_timestamp_ms=$util.Long.fromValue(d.cooldown_complete_timestamp_ms)).unsigned=false;else if(typeof d.cooldown_complete_timestamp_ms==="string")m.cooldown_complete_timestamp_ms=parseInt(d.cooldown_complete_timestamp_ms,10);else if(typeof d.cooldown_complete_timestamp_ms==="number")m.cooldown_complete_timestamp_ms=d.cooldown_complete_timestamp_ms;else if(typeof d.cooldown_complete_timestamp_ms==="object")m.cooldown_complete_timestamp_ms=new $util.LongBits(d.cooldown_complete_timestamp_ms.low>>>0,d.cooldown_complete_timestamp_ms.high>>>0).toNumber()}if(d.chain_hack_sequence_number!=null){m.chain_hack_sequence_number=d.chain_hack_sequence_number|0}if(d.awarded_gym_badge!=null){if(typeof d.awarded_gym_badge!=="object")throw TypeError(".POGOProtos.Networking.Responses.FortSearchResponse.awarded_gym_badge: object expected");m.awarded_gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.fromObject(d.awarded_gym_badge)}if(d.loot!=null){if(typeof d.loot!=="object")throw TypeError(".POGOProtos.Networking.Responses.FortSearchResponse.loot: object expected");m.loot=$root.POGOProtos.Inventory.Loot.fromObject(d.loot)}if(d.bonus_loot!=null){if(typeof d.bonus_loot!=="object")throw TypeError(".POGOProtos.Networking.Responses.FortSearchResponse.bonus_loot: object expected");m.bonus_loot=$root.POGOProtos.Inventory.Loot.fromObject(d.bonus_loot)}if(d.raid_tickets!=null){m.raid_tickets=d.raid_tickets|0}if(d.team_bonus_loot!=null){if(typeof d.team_bonus_loot!=="object")throw TypeError(".POGOProtos.Networking.Responses.FortSearchResponse.team_bonus_loot: object expected");m.team_bonus_loot=$root.POGOProtos.Inventory.Loot.fromObject(d.team_bonus_loot)}if(d.fort_id!=null){m.fort_id=String(d.fort_id)}if(d.challenge_quest!=null){if(typeof d.challenge_quest!=="object")throw TypeError(".POGOProtos.Networking.Responses.FortSearchResponse.challenge_quest: object expected");m.challenge_quest=$root.POGOProtos.Data.Quests.ClientQuest.fromObject(d.challenge_quest)}if(d.gift_box!=null){if(typeof d.gift_box!=="object")throw TypeError(".POGOProtos.Networking.Responses.FortSearchResponse.gift_box: object expected");m.gift_box=$root.POGOProtos.Data.Gift.GiftBox.fromObject(d.gift_box)}return m};FortSearchResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.items_awarded=[]}if(o.defaults){d.result=o.enums===String?"NO_RESULT_SET":0;d.gems_awarded=0;d.pokemon_data_egg=null;d.experience_awarded=0;if($util.Long){var n=new $util.Long(0,0,false);d.cooldown_complete_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.cooldown_complete_timestamp_ms=o.longs===String?"0":0;d.chain_hack_sequence_number=0;d.awarded_gym_badge=null;d.loot=null;d.bonus_loot=null;d.raid_tickets=0;d.team_bonus_loot=null;d.fort_id="";d.challenge_quest=null;d.gift_box=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.FortSearchResponse.Result[m.result]:m.result}if(m.items_awarded&&m.items_awarded.length){d.items_awarded=[];for(var j=0;j<m.items_awarded.length;++j){d.items_awarded[j]=$root.POGOProtos.Inventory.Item.ItemAward.toObject(m.items_awarded[j],o)}}if(m.gems_awarded!=null&&m.hasOwnProperty("gems_awarded")){d.gems_awarded=m.gems_awarded}if(m.pokemon_data_egg!=null&&m.hasOwnProperty("pokemon_data_egg")){d.pokemon_data_egg=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon_data_egg,o)}if(m.experience_awarded!=null&&m.hasOwnProperty("experience_awarded")){d.experience_awarded=m.experience_awarded}if(m.cooldown_complete_timestamp_ms!=null&&m.hasOwnProperty("cooldown_complete_timestamp_ms")){if(typeof m.cooldown_complete_timestamp_ms==="number")d.cooldown_complete_timestamp_ms=o.longs===String?String(m.cooldown_complete_timestamp_ms):m.cooldown_complete_timestamp_ms;else d.cooldown_complete_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.cooldown_complete_timestamp_ms):o.longs===Number?new $util.LongBits(m.cooldown_complete_timestamp_ms.low>>>0,m.cooldown_complete_timestamp_ms.high>>>0).toNumber():m.cooldown_complete_timestamp_ms}if(m.chain_hack_sequence_number!=null&&m.hasOwnProperty("chain_hack_sequence_number")){d.chain_hack_sequence_number=m.chain_hack_sequence_number}if(m.awarded_gym_badge!=null&&m.hasOwnProperty("awarded_gym_badge")){d.awarded_gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.toObject(m.awarded_gym_badge,o)}if(m.loot!=null&&m.hasOwnProperty("loot")){d.loot=$root.POGOProtos.Inventory.Loot.toObject(m.loot,o)}if(m.bonus_loot!=null&&m.hasOwnProperty("bonus_loot")){d.bonus_loot=$root.POGOProtos.Inventory.Loot.toObject(m.bonus_loot,o)}if(m.raid_tickets!=null&&m.hasOwnProperty("raid_tickets")){d.raid_tickets=m.raid_tickets}if(m.team_bonus_loot!=null&&m.hasOwnProperty("team_bonus_loot")){d.team_bonus_loot=$root.POGOProtos.Inventory.Loot.toObject(m.team_bonus_loot,o)}if(m.fort_id!=null&&m.hasOwnProperty("fort_id")){d.fort_id=m.fort_id}if(m.challenge_quest!=null&&m.hasOwnProperty("challenge_quest")){d.challenge_quest=$root.POGOProtos.Data.Quests.ClientQuest.toObject(m.challenge_quest,o)}if(m.gift_box!=null&&m.hasOwnProperty("gift_box")){d.gift_box=$root.POGOProtos.Data.Gift.GiftBox.toObject(m.gift_box,o)}return d};FortSearchResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FortSearchResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NO_RESULT_SET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="OUT_OF_RANGE"]=2;values[valuesById[3]="IN_COOLDOWN_PERIOD"]=3;values[valuesById[4]="INVENTORY_FULL"]=4;values[valuesById[5]="EXCEEDED_DAILY_LIMIT"]=5;values[valuesById[6]="POI_INACCESSIBLE"]=6;return values}();return FortSearchResponse}();Responses.GenerateCombatChallengeIdResponse=function(){function GenerateCombatChallengeIdResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GenerateCombatChallengeIdResponse.prototype.result=0;GenerateCombatChallengeIdResponse.prototype.challenge_id="";GenerateCombatChallengeIdResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id"))w.uint32(18).string(m.challenge_id);return w};GenerateCombatChallengeIdResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GenerateCombatChallengeIdResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.challenge_id=r.string();break;default:r.skipType(t&7);break}}return m};GenerateCombatChallengeIdResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GenerateCombatChallengeIdResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GenerateCombatChallengeIdResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_PLAYER_BELOW_MINIMUM_LEVEL":case 2:m.result=2;break;case"ERROR_ACCESS_DENIED":case 3:m.result=3;break}if(d.challenge_id!=null){m.challenge_id=String(d.challenge_id)}return m};GenerateCombatChallengeIdResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.challenge_id=""}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GenerateCombatChallengeIdResponse.Result[m.result]:m.result}if(m.challenge_id!=null&&m.hasOwnProperty("challenge_id")){d.challenge_id=m.challenge_id}return d};GenerateCombatChallengeIdResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GenerateCombatChallengeIdResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_PLAYER_BELOW_MINIMUM_LEVEL"]=2;values[valuesById[3]="ERROR_ACCESS_DENIED"]=3;return values}();return GenerateCombatChallengeIdResponse}();Responses.GetAssetDigestResponse=function(){function GetAssetDigestResponse(p){this.digest=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetAssetDigestResponse.prototype.digest=$util.emptyArray;GetAssetDigestResponse.prototype.timestamp_ms=$util.Long?$util.Long.fromBits(0,0,true):0;GetAssetDigestResponse.prototype.result=0;GetAssetDigestResponse.prototype.page_offset=0;GetAssetDigestResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.digest!=null&&m.digest.length){for(var i=0;i<m.digest.length;++i)$root.POGOProtos.Data.AssetDigestEntry.encode(m.digest[i],w.uint32(10).fork()).ldelim()}if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms"))w.uint32(16).uint64(m.timestamp_ms);if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(24).int32(m.result);if(m.page_offset!=null&&m.hasOwnProperty("page_offset"))w.uint32(32).int32(m.page_offset);return w};GetAssetDigestResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetAssetDigestResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.digest&&m.digest.length))m.digest=[];m.digest.push($root.POGOProtos.Data.AssetDigestEntry.decode(r,r.uint32()));break;case 2:m.timestamp_ms=r.uint64();break;case 3:m.result=r.int32();break;case 4:m.page_offset=r.int32();break;default:r.skipType(t&7);break}}return m};GetAssetDigestResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetAssetDigestResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetAssetDigestResponse;if(d.digest){if(!Array.isArray(d.digest))throw TypeError(".POGOProtos.Networking.Responses.GetAssetDigestResponse.digest: array expected");m.digest=[];for(var i=0;i<d.digest.length;++i){if(typeof d.digest[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetAssetDigestResponse.digest: object expected");m.digest[i]=$root.POGOProtos.Data.AssetDigestEntry.fromObject(d.digest[i])}}if(d.timestamp_ms!=null){if($util.Long)(m.timestamp_ms=$util.Long.fromValue(d.timestamp_ms)).unsigned=true;else if(typeof d.timestamp_ms==="string")m.timestamp_ms=parseInt(d.timestamp_ms,10);else if(typeof d.timestamp_ms==="number")m.timestamp_ms=d.timestamp_ms;else if(typeof d.timestamp_ms==="object")m.timestamp_ms=new $util.LongBits(d.timestamp_ms.low>>>0,d.timestamp_ms.high>>>0).toNumber(true)}switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"PAGE":case 2:m.result=2;break;case"RETRY":case 3:m.result=3;break}if(d.page_offset!=null){m.page_offset=d.page_offset|0}return m};GetAssetDigestResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.digest=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,true);d.timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.timestamp_ms=o.longs===String?"0":0;d.result=o.enums===String?"UNSET":0;d.page_offset=0}if(m.digest&&m.digest.length){d.digest=[];for(var j=0;j<m.digest.length;++j){d.digest[j]=$root.POGOProtos.Data.AssetDigestEntry.toObject(m.digest[j],o)}}if(m.timestamp_ms!=null&&m.hasOwnProperty("timestamp_ms")){if(typeof m.timestamp_ms==="number")d.timestamp_ms=o.longs===String?String(m.timestamp_ms):m.timestamp_ms;else d.timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.timestamp_ms):o.longs===Number?new $util.LongBits(m.timestamp_ms.low>>>0,m.timestamp_ms.high>>>0).toNumber(true):m.timestamp_ms}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetAssetDigestResponse.Result[m.result]:m.result}if(m.page_offset!=null&&m.hasOwnProperty("page_offset")){d.page_offset=m.page_offset}return d};GetAssetDigestResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetAssetDigestResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="PAGE"]=2;values[valuesById[3]="RETRY"]=3;return values}();return GetAssetDigestResponse}();Responses.GetAvailableSkusAndBalancesResponse=function(){function GetAvailableSkusAndBalancesResponse(p){this.available_sku=[];this.player_currencies=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetAvailableSkusAndBalancesResponse.prototype.status=0;GetAvailableSkusAndBalancesResponse.prototype.available_sku=$util.emptyArray;GetAvailableSkusAndBalancesResponse.prototype.player_currencies=$util.emptyArray;GetAvailableSkusAndBalancesResponse.prototype.player_token="";GetAvailableSkusAndBalancesResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.available_sku!=null&&m.available_sku.length){for(var i=0;i<m.available_sku.length;++i)$root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.encode(m.available_sku[i],w.uint32(18).fork()).ldelim()}if(m.player_currencies!=null&&m.player_currencies.length){for(var i=0;i<m.player_currencies.length;++i)$root.POGOProtos.Data.Store.CurrencyQuantity.encode(m.player_currencies[i],w.uint32(26).fork()).ldelim()}if(m.player_token!=null&&m.hasOwnProperty("player_token"))w.uint32(34).string(m.player_token);return w};GetAvailableSkusAndBalancesResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:if(!(m.available_sku&&m.available_sku.length))m.available_sku=[];m.available_sku.push($root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.decode(r,r.uint32()));break;case 3:if(!(m.player_currencies&&m.player_currencies.length))m.player_currencies=[];m.player_currencies.push($root.POGOProtos.Data.Store.CurrencyQuantity.decode(r,r.uint32()));break;case 4:m.player_token=r.string();break;default:r.skipType(t&7);break}}return m};GetAvailableSkusAndBalancesResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"FAILURE":case 2:m.status=2;break}if(d.available_sku){if(!Array.isArray(d.available_sku))throw TypeError(".POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.available_sku: array expected");m.available_sku=[];for(var i=0;i<d.available_sku.length;++i){if(typeof d.available_sku[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.available_sku: object expected");m.available_sku[i]=$root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.fromObject(d.available_sku[i])}}if(d.player_currencies){if(!Array.isArray(d.player_currencies))throw TypeError(".POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.player_currencies: array expected");m.player_currencies=[];for(var i=0;i<d.player_currencies.length;++i){if(typeof d.player_currencies[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.player_currencies: object expected");m.player_currencies[i]=$root.POGOProtos.Data.Store.CurrencyQuantity.fromObject(d.player_currencies[i])}}if(d.player_token!=null){m.player_token=String(d.player_token)}return m};GetAvailableSkusAndBalancesResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.available_sku=[];d.player_currencies=[]}if(o.defaults){d.status=o.enums===String?"UNSET":0;d.player_token=""}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.Status[m.status]:m.status}if(m.available_sku&&m.available_sku.length){d.available_sku=[];for(var j=0;j<m.available_sku.length;++j){d.available_sku[j]=$root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.toObject(m.available_sku[j],o)}}if(m.player_currencies&&m.player_currencies.length){d.player_currencies=[];for(var j=0;j<m.player_currencies.length;++j){d.player_currencies[j]=$root.POGOProtos.Data.Store.CurrencyQuantity.toObject(m.player_currencies[j],o)}}if(m.player_token!=null&&m.hasOwnProperty("player_token")){d.player_token=m.player_token}return d};GetAvailableSkusAndBalancesResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetAvailableSkusAndBalancesResponse.AvailableSku=function(){function AvailableSku(p){this.game_item_content=[];this.presentation_data=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AvailableSku.prototype.id="";AvailableSku.prototype.is_third_party_vendor_item=false;AvailableSku.prototype.price=null;AvailableSku.prototype.currency_granted=null;AvailableSku.prototype.game_item_content=$util.emptyArray;AvailableSku.prototype.presentation_data=$util.emptyArray;AvailableSku.prototype.can_be_purchased=false;AvailableSku.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.id!=null&&m.hasOwnProperty("id"))w.uint32(10).string(m.id);if(m.is_third_party_vendor_item!=null&&m.hasOwnProperty("is_third_party_vendor_item"))w.uint32(16).bool(m.is_third_party_vendor_item);if(m.price!=null&&m.hasOwnProperty("price"))$root.POGOProtos.Data.Store.CurrencyQuantity.encode(m.price,w.uint32(26).fork()).ldelim();if(m.currency_granted!=null&&m.hasOwnProperty("currency_granted"))$root.POGOProtos.Data.Store.CurrencyQuantity.encode(m.currency_granted,w.uint32(34).fork()).ldelim();if(m.game_item_content!=null&&m.game_item_content.length){for(var i=0;i<m.game_item_content.length;++i)$root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.GameItemContent.encode(m.game_item_content[i],w.uint32(42).fork()).ldelim()}if(m.presentation_data!=null&&m.presentation_data.length){for(var i=0;i<m.presentation_data.length;++i)$root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.SkuPresentation.encode(m.presentation_data[i],w.uint32(50).fork()).ldelim()}if(m.can_be_purchased!=null&&m.hasOwnProperty("can_be_purchased"))w.uint32(56).bool(m.can_be_purchased);return w};AvailableSku.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.id=r.string();break;case 2:m.is_third_party_vendor_item=r.bool();break;case 3:m.price=$root.POGOProtos.Data.Store.CurrencyQuantity.decode(r,r.uint32());break;case 4:m.currency_granted=$root.POGOProtos.Data.Store.CurrencyQuantity.decode(r,r.uint32());break;case 5:if(!(m.game_item_content&&m.game_item_content.length))m.game_item_content=[];m.game_item_content.push($root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.GameItemContent.decode(r,r.uint32()));break;case 6:if(!(m.presentation_data&&m.presentation_data.length))m.presentation_data=[];m.presentation_data.push($root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.SkuPresentation.decode(r,r.uint32()));break;case 7:m.can_be_purchased=r.bool();break;default:r.skipType(t&7);break}}return m};AvailableSku.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku)return d;var m=new $root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku;if(d.id!=null){m.id=String(d.id)}if(d.is_third_party_vendor_item!=null){m.is_third_party_vendor_item=Boolean(d.is_third_party_vendor_item)}if(d.price!=null){if(typeof d.price!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.price: object expected");m.price=$root.POGOProtos.Data.Store.CurrencyQuantity.fromObject(d.price)}if(d.currency_granted!=null){if(typeof d.currency_granted!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.currency_granted: object expected");m.currency_granted=$root.POGOProtos.Data.Store.CurrencyQuantity.fromObject(d.currency_granted)}if(d.game_item_content){if(!Array.isArray(d.game_item_content))throw TypeError(".POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.game_item_content: array expected");m.game_item_content=[];for(var i=0;i<d.game_item_content.length;++i){if(typeof d.game_item_content[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.game_item_content: object expected");m.game_item_content[i]=$root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.GameItemContent.fromObject(d.game_item_content[i])}}if(d.presentation_data){if(!Array.isArray(d.presentation_data))throw TypeError(".POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.presentation_data: array expected");m.presentation_data=[];for(var i=0;i<d.presentation_data.length;++i){if(typeof d.presentation_data[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.AvailableSku.presentation_data: object expected");m.presentation_data[i]=$root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.SkuPresentation.fromObject(d.presentation_data[i])}}if(d.can_be_purchased!=null){m.can_be_purchased=Boolean(d.can_be_purchased)}return m};AvailableSku.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.game_item_content=[];d.presentation_data=[]}if(o.defaults){d.id="";d.is_third_party_vendor_item=false;d.price=null;d.currency_granted=null;d.can_be_purchased=false}if(m.id!=null&&m.hasOwnProperty("id")){d.id=m.id}if(m.is_third_party_vendor_item!=null&&m.hasOwnProperty("is_third_party_vendor_item")){d.is_third_party_vendor_item=m.is_third_party_vendor_item}if(m.price!=null&&m.hasOwnProperty("price")){d.price=$root.POGOProtos.Data.Store.CurrencyQuantity.toObject(m.price,o)}if(m.currency_granted!=null&&m.hasOwnProperty("currency_granted")){d.currency_granted=$root.POGOProtos.Data.Store.CurrencyQuantity.toObject(m.currency_granted,o)}if(m.game_item_content&&m.game_item_content.length){d.game_item_content=[];for(var j=0;j<m.game_item_content.length;++j){d.game_item_content[j]=$root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.GameItemContent.toObject(m.game_item_content[j],o)}}if(m.presentation_data&&m.presentation_data.length){d.presentation_data=[];for(var j=0;j<m.presentation_data.length;++j){d.presentation_data[j]=$root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.SkuPresentation.toObject(m.presentation_data[j],o)}}if(m.can_be_purchased!=null&&m.hasOwnProperty("can_be_purchased")){d.can_be_purchased=m.can_be_purchased}return d};AvailableSku.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AvailableSku}();GetAvailableSkusAndBalancesResponse.GameItemContent=function(){function GameItemContent(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GameItemContent.prototype.type="";GameItemContent.prototype.quantity=0;GameItemContent.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(10).string(m.type);if(m.quantity!=null&&m.hasOwnProperty("quantity"))w.uint32(16).int32(m.quantity);return w};GameItemContent.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.GameItemContent;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.type=r.string();break;case 2:m.quantity=r.int32();break;default:r.skipType(t&7);break}}return m};GameItemContent.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.GameItemContent)return d;var m=new $root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.GameItemContent;if(d.type!=null){m.type=String(d.type)}if(d.quantity!=null){m.quantity=d.quantity|0}return m};GameItemContent.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.type="";d.quantity=0}if(m.type!=null&&m.hasOwnProperty("type")){d.type=m.type}if(m.quantity!=null&&m.hasOwnProperty("quantity")){d.quantity=m.quantity}return d};GameItemContent.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GameItemContent}();GetAvailableSkusAndBalancesResponse.SkuPresentation=function(){function SkuPresentation(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SkuPresentation.prototype.key="";SkuPresentation.prototype.value="";SkuPresentation.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.key!=null&&m.hasOwnProperty("key"))w.uint32(10).string(m.key);if(m.value!=null&&m.hasOwnProperty("value"))w.uint32(18).string(m.value);return w};SkuPresentation.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.SkuPresentation;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.key=r.string();break;case 2:m.value=r.string();break;default:r.skipType(t&7);break}}return m};SkuPresentation.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.SkuPresentation)return d;var m=new $root.POGOProtos.Networking.Responses.GetAvailableSkusAndBalancesResponse.SkuPresentation;if(d.key!=null){m.key=String(d.key)}if(d.value!=null){m.value=String(d.value)}return m};SkuPresentation.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.key="";d.value=""}if(m.key!=null&&m.hasOwnProperty("key")){d.key=m.key}if(m.value!=null&&m.hasOwnProperty("value")){d.value=m.value}return d};SkuPresentation.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SkuPresentation}();GetAvailableSkusAndBalancesResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;return values}();return GetAvailableSkusAndBalancesResponse}();Responses.GetBuddyWalkedResponse=function(){function GetBuddyWalkedResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetBuddyWalkedResponse.prototype.success=false;GetBuddyWalkedResponse.prototype.family_candy_id=0;GetBuddyWalkedResponse.prototype.candy_earned_count=0;GetBuddyWalkedResponse.prototype.km_remaining=0;GetBuddyWalkedResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.family_candy_id!=null&&m.hasOwnProperty("family_candy_id"))w.uint32(16).int32(m.family_candy_id);if(m.candy_earned_count!=null&&m.hasOwnProperty("candy_earned_count"))w.uint32(24).int32(m.candy_earned_count);if(m.km_remaining!=null&&m.hasOwnProperty("km_remaining"))w.uint32(33).double(m.km_remaining);return w};GetBuddyWalkedResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetBuddyWalkedResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:m.family_candy_id=r.int32();break;case 3:m.candy_earned_count=r.int32();break;case 4:m.km_remaining=r.double();break;default:r.skipType(t&7);break}}return m};GetBuddyWalkedResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetBuddyWalkedResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetBuddyWalkedResponse;if(d.success!=null){m.success=Boolean(d.success)}switch(d.family_candy_id){case"FAMILY_UNSET":case 0:m.family_candy_id=0;break;case"FAMILY_BULBASAUR":case 1:m.family_candy_id=1;break;case"FAMILY_CHARMANDER":case 4:m.family_candy_id=4;break;case"FAMILY_SQUIRTLE":case 7:m.family_candy_id=7;break;case"FAMILY_CATERPIE":case 10:m.family_candy_id=10;break;case"FAMILY_WEEDLE":case 13:m.family_candy_id=13;break;case"FAMILY_PIDGEY":case 16:m.family_candy_id=16;break;case"FAMILY_RATTATA":case 19:m.family_candy_id=19;break;case"FAMILY_SPEAROW":case 21:m.family_candy_id=21;break;case"FAMILY_EKANS":case 23:m.family_candy_id=23;break;case"FAMILY_PIKACHU":case 25:m.family_candy_id=25;break;case"FAMILY_SANDSHREW":case 27:m.family_candy_id=27;break;case"FAMILY_NIDORAN_FEMALE":case 29:m.family_candy_id=29;break;case"FAMILY_NIDORAN_MALE":case 32:m.family_candy_id=32;break;case"FAMILY_CLEFAIRY":case 35:m.family_candy_id=35;break;case"FAMILY_VULPIX":case 37:m.family_candy_id=37;break;case"FAMILY_JIGGLYPUFF":case 39:m.family_candy_id=39;break;case"FAMILY_ZUBAT":case 41:m.family_candy_id=41;break;case"FAMILY_ODDISH":case 43:m.family_candy_id=43;break;case"FAMILY_PARAS":case 46:m.family_candy_id=46;break;case"FAMILY_VENONAT":case 48:m.family_candy_id=48;break;case"FAMILY_DIGLETT":case 50:m.family_candy_id=50;break;case"FAMILY_MEOWTH":case 52:m.family_candy_id=52;break;case"FAMILY_PSYDUCK":case 54:m.family_candy_id=54;break;case"FAMILY_MANKEY":case 56:m.family_candy_id=56;break;case"FAMILY_GROWLITHE":case 58:m.family_candy_id=58;break;case"FAMILY_POLIWAG":case 60:m.family_candy_id=60;break;case"FAMILY_ABRA":case 63:m.family_candy_id=63;break;case"FAMILY_MACHOP":case 66:m.family_candy_id=66;break;case"FAMILY_BELLSPROUT":case 69:m.family_candy_id=69;break;case"FAMILY_TENTACOOL":case 72:m.family_candy_id=72;break;case"FAMILY_GEODUDE":case 74:m.family_candy_id=74;break;case"FAMILY_PONYTA":case 77:m.family_candy_id=77;break;case"FAMILY_SLOWPOKE":case 79:m.family_candy_id=79;break;case"FAMILY_MAGNEMITE":case 81:m.family_candy_id=81;break;case"FAMILY_FARFETCHD":case 83:m.family_candy_id=83;break;case"FAMILY_DODUO":case 84:m.family_candy_id=84;break;case"FAMILY_SEEL":case 86:m.family_candy_id=86;break;case"FAMILY_GRIMER":case 88:m.family_candy_id=88;break;case"FAMILY_SHELLDER":case 90:m.family_candy_id=90;break;case"FAMILY_GASTLY":case 92:m.family_candy_id=92;break;case"FAMILY_ONIX":case 95:m.family_candy_id=95;break;case"FAMILY_DROWZEE":case 96:m.family_candy_id=96;break;case"FAMILY_HYPNO":case 97:m.family_candy_id=97;break;case"FAMILY_KRABBY":case 98:m.family_candy_id=98;break;case"FAMILY_VOLTORB":case 100:m.family_candy_id=100;break;case"FAMILY_EXEGGCUTE":case 102:m.family_candy_id=102;break;case"FAMILY_CUBONE":case 104:m.family_candy_id=104;break;case"FAMILY_HITMONLEE":case 106:m.family_candy_id=106;break;case"FAMILY_HITMONCHAN":case 107:m.family_candy_id=107;break;case"FAMILY_LICKITUNG":case 108:m.family_candy_id=108;break;case"FAMILY_KOFFING":case 109:m.family_candy_id=109;break;case"FAMILY_RHYHORN":case 111:m.family_candy_id=111;break;case"FAMILY_CHANSEY":case 113:m.family_candy_id=113;break;case"FAMILY_TANGELA":case 114:m.family_candy_id=114;break;case"FAMILY_KANGASKHAN":case 115:m.family_candy_id=115;break;case"FAMILY_HORSEA":case 116:m.family_candy_id=116;break;case"FAMILY_GOLDEEN":case 118:m.family_candy_id=118;break;case"FAMILY_STARYU":case 120:m.family_candy_id=120;break;case"FAMILY_MR_MIME":case 122:m.family_candy_id=122;break;case"FAMILY_SCYTHER":case 123:m.family_candy_id=123;break;case"FAMILY_JYNX":case 124:m.family_candy_id=124;break;case"FAMILY_ELECTABUZZ":case 125:m.family_candy_id=125;break;case"FAMILY_MAGMAR":case 126:m.family_candy_id=126;break;case"FAMILY_PINSIR":case 127:m.family_candy_id=127;break;case"FAMILY_TAUROS":case 128:m.family_candy_id=128;break;case"FAMILY_MAGIKARP":case 129:m.family_candy_id=129;break;case"FAMILY_LAPRAS":case 131:m.family_candy_id=131;break;case"FAMILY_DITTO":case 132:m.family_candy_id=132;break;case"FAMILY_EEVEE":case 133:m.family_candy_id=133;break;case"FAMILY_PORYGON":case 137:m.family_candy_id=137;break;case"FAMILY_OMANYTE":case 138:m.family_candy_id=138;break;case"FAMILY_KABUTO":case 140:m.family_candy_id=140;break;case"FAMILY_AERODACTYL":case 142:m.family_candy_id=142;break;case"FAMILY_SNORLAX":case 143:m.family_candy_id=143;break;case"FAMILY_ARTICUNO":case 144:m.family_candy_id=144;break;case"FAMILY_ZAPDOS":case 145:m.family_candy_id=145;break;case"FAMILY_MOLTRES":case 146:m.family_candy_id=146;break;case"FAMILY_DRATINI":case 147:m.family_candy_id=147;break;case"FAMILY_MEWTWO":case 150:m.family_candy_id=150;break;case"FAMILY_MEW":case 151:m.family_candy_id=151;break;case"FAMILY_CHIKORITA":case 152:m.family_candy_id=152;break;case"FAMILY_CYNDAQUIL":case 155:m.family_candy_id=155;break;case"FAMILY_TOTODILE":case 158:m.family_candy_id=158;break;case"FAMILY_SENTRET":case 161:m.family_candy_id=161;break;case"FAMILY_HOOTHOOT":case 163:m.family_candy_id=163;break;case"FAMILY_LEDYBA":case 165:m.family_candy_id=165;break;case"FAMILY_SPINARAK":case 167:m.family_candy_id=167;break;case"FAMILY_CHINCHOU":case 170:m.family_candy_id=170;break;case"FAMILY_TOGEPI":case 175:m.family_candy_id=175;break;case"FAMILY_NATU":case 177:m.family_candy_id=177;break;case"FAMILY_MAREEP":case 179:m.family_candy_id=179;break;case"FAMILY_MARILL":case 183:m.family_candy_id=183;break;case"FAMILY_SUDOWOODO":case 185:m.family_candy_id=185;break;case"FAMILY_HOPPIP":case 187:m.family_candy_id=187;break;case"FAMILY_AIPOM":case 190:m.family_candy_id=190;break;case"FAMILY_SUNKERN":case 191:m.family_candy_id=191;break;case"FAMILY_YANMA":case 193:m.family_candy_id=193;break;case"FAMILY_WOOPER":case 194:m.family_candy_id=194;break;case"FAMILY_MURKROW":case 198:m.family_candy_id=198;break;case"FAMILY_MISDREAVUS":case 200:m.family_candy_id=200;break;case"FAMILY_UNOWN":case 201:m.family_candy_id=201;break;case"FAMILY_WOBBUFFET":case 202:m.family_candy_id=202;break;case"FAMILY_GIRAFARIG":case 203:m.family_candy_id=203;break;case"FAMILY_PINECO":case 204:m.family_candy_id=204;break;case"FAMILY_DUNSPARCE":case 206:m.family_candy_id=206;break;case"FAMILY_GLIGAR":case 207:m.family_candy_id=207;break;case"FAMILY_SNUBBULL":case 209:m.family_candy_id=209;break;case"FAMILY_QWILFISH":case 211:m.family_candy_id=211;break;case"FAMILY_SHUCKLE":case 213:m.family_candy_id=213;break;case"FAMILY_HERACROSS":case 214:m.family_candy_id=214;break;case"FAMILY_SNEASEL":case 215:m.family_candy_id=215;break;case"FAMILY_TEDDIURSA":case 216:m.family_candy_id=216;break;case"FAMILY_SLUGMA":case 218:m.family_candy_id=218;break;case"FAMILY_SWINUB":case 220:m.family_candy_id=220;break;case"FAMILY_CORSOLA":case 222:m.family_candy_id=222;break;case"FAMILY_REMORAID":case 223:m.family_candy_id=223;break;case"FAMILY_DELIBIRD":case 225:m.family_candy_id=225;break;case"FAMILY_MANTINE":case 226:m.family_candy_id=226;break;case"FAMILY_SKARMORY":case 227:m.family_candy_id=227;break;case"FAMILY_HOUNDOUR":case 228:m.family_candy_id=228;break;case"FAMILY_PHANPY":case 231:m.family_candy_id=231;break;case"FAMILY_STANTLER":case 234:m.family_candy_id=234;break;case"FAMILY_SMEARGLE":case 235:m.family_candy_id=235;break;case"FAMILY_TYROGUE":case 236:m.family_candy_id=236;break;case"FAMILY_MILTANK":case 241:m.family_candy_id=241;break;case"FAMILY_RAIKOU":case 243:m.family_candy_id=243;break;case"FAMILY_ENTEI":case 244:m.family_candy_id=244;break;case"FAMILY_SUICUNE":case 245:m.family_candy_id=245;break;case"FAMILY_LARVITAR":case 246:m.family_candy_id=246;break;case"FAMILY_LUGIA":case 249:m.family_candy_id=249;break;case"FAMILY_HO_OH":case 250:m.family_candy_id=250;break;case"FAMILY_CELEBI":case 251:m.family_candy_id=251;break;case"FAMILY_TREECKO":case 252:m.family_candy_id=252;break;case"FAMILY_TORCHIC":case 255:m.family_candy_id=255;break;case"FAMILY_MUDKIP":case 258:m.family_candy_id=258;break;case"FAMILY_POOCHYENA":case 261:m.family_candy_id=261;break;case"FAMILY_ZIGZAGOON":case 263:m.family_candy_id=263;break;case"FAMILY_WURMPLE":case 265:m.family_candy_id=265;break;case"FAMILY_LOTAD":case 270:m.family_candy_id=270;break;case"FAMILY_SEEDOT":case 273:m.family_candy_id=273;break;case"FAMILY_TAILLOW":case 276:m.family_candy_id=276;break;case"FAMILY_WINGULL":case 278:m.family_candy_id=278;break;case"FAMILY_RALTS":case 280:m.family_candy_id=280;break;case"FAMILY_SURSKIT":case 283:m.family_candy_id=283;break;case"FAMILY_SHROOMISH":case 285:m.family_candy_id=285;break;case"FAMILY_SLAKOTH":case 287:m.family_candy_id=287;break;case"FAMILY_NINCADA":case 290:m.family_candy_id=290;break;case"FAMILY_WHISMUR":case 293:m.family_candy_id=293;break;case"FAMILY_MAKUHITA":case 296:m.family_candy_id=296;break;case"FAMILY_NOSEPASS":case 299:m.family_candy_id=299;break;case"FAMILY_SKITTY":case 300:m.family_candy_id=300;break;case"FAMILY_SABLEYE":case 302:m.family_candy_id=302;break;case"FAMILY_MAWILE":case 303:m.family_candy_id=303;break;case"FAMILY_ARON":case 304:m.family_candy_id=304;break;case"FAMILY_MEDITITE":case 307:m.family_candy_id=307;break;case"FAMILY_ELECTRIKE":case 309:m.family_candy_id=309;break;case"FAMILY_PLUSLE":case 311:m.family_candy_id=311;break;case"FAMILY_MINUN":case 312:m.family_candy_id=312;break;case"FAMILY_VOLBEAT":case 313:m.family_candy_id=313;break;case"FAMILY_ILLUMISE":case 314:m.family_candy_id=314;break;case"FAMILY_ROSELIA":case 315:m.family_candy_id=315;break;case"FAMILY_GULPIN":case 316:m.family_candy_id=316;break;case"FAMILY_CARVANHA":case 318:m.family_candy_id=318;break;case"FAMILY_WAILMER":case 320:m.family_candy_id=320;break;case"FAMILY_NUMEL":case 322:m.family_candy_id=322;break;case"FAMILY_TORKOAL":case 324:m.family_candy_id=324;break;case"FAMILY_SPOINK":case 325:m.family_candy_id=325;break;case"FAMILY_SPINDA":case 327:m.family_candy_id=327;break;case"FAMILY_TRAPINCH":case 328:m.family_candy_id=328;break;case"FAMILY_CACNEA":case 331:m.family_candy_id=331;break;case"FAMILY_SWABLU":case 333:m.family_candy_id=333;break;case"FAMILY_ZANGOOSE":case 335:m.family_candy_id=335;break;case"FAMILY_SEVIPER":case 336:m.family_candy_id=336;break;case"FAMILY_LUNATONE":case 337:m.family_candy_id=337;break;case"FAMILY_SOLROCK":case 338:m.family_candy_id=338;break;case"FAMILY_BARBOACH":case 339:m.family_candy_id=339;break;case"FAMILY_CORPHISH":case 341:m.family_candy_id=341;break;case"FAMILY_BALTOY":case 343:m.family_candy_id=343;break;case"FAMILY_LILEEP":case 345:m.family_candy_id=345;break;case"FAMILY_ANORITH":case 347:m.family_candy_id=347;break;case"FAMILY_FEEBAS":case 349:m.family_candy_id=349;break;case"FAMILY_CASTFORM":case 351:m.family_candy_id=351;break;case"FAMILY_KECLEON":case 352:m.family_candy_id=352;break;case"FAMILY_SHUPPET":case 353:m.family_candy_id=353;break;case"FAMILY_DUSKULL":case 355:m.family_candy_id=355;break;case"FAMILY_TROPIUS":case 357:m.family_candy_id=357;break;case"FAMILY_CHIMECHO":case 358:m.family_candy_id=358;break;case"FAMILY_ABSOL":case 359:m.family_candy_id=359;break;case"FAMILY_SNORUNT":case 361:m.family_candy_id=361;break;case"FAMILY_SPHEAL":case 363:m.family_candy_id=363;break;case"FAMILY_CLAMPERL":case 366:m.family_candy_id=366;break;case"FAMILY_RELICANTH":case 369:m.family_candy_id=369;break;case"FAMILY_LUVDISC":case 370:m.family_candy_id=370;break;case"FAMILY_BAGON":case 371:m.family_candy_id=371;break;case"FAMILY_BELDUM":case 374:m.family_candy_id=374;break;case"FAMILY_REGIROCK":case 377:m.family_candy_id=377;break;case"FAMILY_REGICE":case 378:m.family_candy_id=378;break;case"FAMILY_REGISTEEL":case 379:m.family_candy_id=379;break;case"FAMILY_LATIAS":case 380:m.family_candy_id=380;break;case"FAMILY_LATIOS":case 381:m.family_candy_id=381;break;case"FAMILY_KYOGRE":case 382:m.family_candy_id=382;break;case"FAMILY_GROUDON":case 383:m.family_candy_id=383;break;case"FAMILY_RAYQUAZA":case 384:m.family_candy_id=384;break;case"FAMILY_JIRACHI":case 385:m.family_candy_id=385;break;case"FAMILY_DEOXYS":case 386:m.family_candy_id=386;break;case"FAMILY_TURTWIG":case 387:m.family_candy_id=387;break;case"FAMILY_CHIMCHAR":case 390:m.family_candy_id=390;break;case"FAMILY_PIPLUP":case 393:m.family_candy_id=393;break;case"FAMILY_STARLY":case 396:m.family_candy_id=396;break;case"FAMILY_BIDOOF":case 399:m.family_candy_id=399;break;case"FAMILY_KRICKETOT":case 401:m.family_candy_id=401;break;case"FAMILY_SHINX":case 403:m.family_candy_id=403;break;case"FAMILY_CRANIDOS":case 408:m.family_candy_id=408;break;case"FAMILY_SHIELDON":case 410:m.family_candy_id=410;break;case"FAMILY_BURMY":case 412:m.family_candy_id=412;break;case"FAMILY_COMBEE":case 415:m.family_candy_id=415;break;case"FAMILY_PACHIRISU":case 417:m.family_candy_id=417;break;case"FAMILY_BUIZEL":case 418:m.family_candy_id=418;break;case"FAMILY_CHERUBI":case 420:m.family_candy_id=420;break;case"FAMILY_SHELLOS":case 422:m.family_candy_id=422;break;case"FAMILY_DRIFLOON":case 425:m.family_candy_id=425;break;case"FAMILY_BUNEARY":case 427:m.family_candy_id=427;break;case"FAMILY_GLAMEOW":case 431:m.family_candy_id=431;break;case"FAMILY_STUNKY":case 434:m.family_candy_id=434;break;case"FAMILY_BRONZOR":case 436:m.family_candy_id=436;break;case"FAMILY_CHATOT":case 441:m.family_candy_id=441;break;case"FAMILY_SPIRITOMB":case 442:m.family_candy_id=442;break;case"FAMILY_GIBLE":case 443:m.family_candy_id=443;break;case"FAMILY_LUCARIO":case 448:m.family_candy_id=448;break;case"FAMILY_HIPPOPOTAS":case 449:m.family_candy_id=449;break;case"FAMILY_SKORUPI":case 451:m.family_candy_id=451;break;case"FAMILY_CROAGUNK":case 453:m.family_candy_id=453;break;case"FAMILY_CARNIVINE":case 455:m.family_candy_id=455;break;case"FAMILY_FINNEON":case 456:m.family_candy_id=456;break;case"FAMILY_SNOVER":case 459:m.family_candy_id=459;break;case"FAMILY_ROTOM":case 479:m.family_candy_id=479;break;case"FAMILY_UXIE":case 480:m.family_candy_id=480;break;case"FAMILY_MESPRIT":case 481:m.family_candy_id=481;break;case"FAMILY_AZELF":case 482:m.family_candy_id=482;break;case"FAMILY_DIALGA":case 483:m.family_candy_id=483;break;case"FAMILY_PALKIA":case 484:m.family_candy_id=484;break;case"FAMILY_HEATRAN":case 485:m.family_candy_id=485;break;case"FAMILY_REGIGIGAS":case 486:m.family_candy_id=486;break;case"FAMILY_GIRATINA":case 487:m.family_candy_id=487;break;case"FAMILY_CRESSELIA":case 488:m.family_candy_id=488;break;case"FAMILY_PHIONE":case 489:m.family_candy_id=489;break;case"FAMILY_MANAPHY":case 490:m.family_candy_id=490;break;case"FAMILY_DARKRAI":case 491:m.family_candy_id=491;break;case"FAMILY_SHAYMIN":case 492:m.family_candy_id=492;break;case"FAMILY_ARCEUS":case 493:m.family_candy_id=493;break;case"FAMILY_MELTAN":case 808:m.family_candy_id=808;break}if(d.candy_earned_count!=null){m.candy_earned_count=d.candy_earned_count|0}if(d.km_remaining!=null){m.km_remaining=Number(d.km_remaining)}return m};GetBuddyWalkedResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.success=false;d.family_candy_id=o.enums===String?"FAMILY_UNSET":0;d.candy_earned_count=0;d.km_remaining=0}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.family_candy_id!=null&&m.hasOwnProperty("family_candy_id")){d.family_candy_id=o.enums===String?$root.POGOProtos.Enums.PokemonFamilyId[m.family_candy_id]:m.family_candy_id}if(m.candy_earned_count!=null&&m.hasOwnProperty("candy_earned_count")){d.candy_earned_count=m.candy_earned_count}if(m.km_remaining!=null&&m.hasOwnProperty("km_remaining")){d.km_remaining=o.json&&!isFinite(m.km_remaining)?String(m.km_remaining):m.km_remaining}return d};GetBuddyWalkedResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetBuddyWalkedResponse}();Responses.GetClientBgmodeSettingsResponse=function(){function GetClientBgmodeSettingsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetClientBgmodeSettingsResponse.prototype.status=0;GetClientBgmodeSettingsResponse.prototype.settings=null;GetClientBgmodeSettingsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.settings!=null&&m.hasOwnProperty("settings"))$root.POGOProtos.Settings.BackgroundModeClientSettings.encode(m.settings,w.uint32(18).fork()).ldelim();return w};GetClientBgmodeSettingsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetClientBgmodeSettingsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.settings=$root.POGOProtos.Settings.BackgroundModeClientSettings.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GetClientBgmodeSettingsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetClientBgmodeSettingsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetClientBgmodeSettingsResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"ERROR_UNKNOWN":case 2:m.status=2;break}if(d.settings!=null){if(typeof d.settings!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetClientBgmodeSettingsResponse.settings: object expected");m.settings=$root.POGOProtos.Settings.BackgroundModeClientSettings.fromObject(d.settings)}return m};GetClientBgmodeSettingsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0;d.settings=null}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.GetClientBgmodeSettingsResponse.Status[m.status]:m.status}if(m.settings!=null&&m.hasOwnProperty("settings")){d.settings=$root.POGOProtos.Settings.BackgroundModeClientSettings.toObject(m.settings,o)}return d};GetClientBgmodeSettingsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetClientBgmodeSettingsResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;return values}();return GetClientBgmodeSettingsResponse}();Responses.GetClientTelemetrySettingsResponse=function(){function GetClientTelemetrySettingsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetClientTelemetrySettingsResponse.prototype.one=0;GetClientTelemetrySettingsResponse.prototype.two=0;GetClientTelemetrySettingsResponse.prototype.three=0;GetClientTelemetrySettingsResponse.prototype.four=0;GetClientTelemetrySettingsResponse.prototype.five=0;GetClientTelemetrySettingsResponse.prototype.six=$util.Long?$util.Long.fromBits(0,0,false):0;GetClientTelemetrySettingsResponse.prototype.seven=0;GetClientTelemetrySettingsResponse.prototype.eight=$util.Long?$util.Long.fromBits(0,0,false):0;GetClientTelemetrySettingsResponse.prototype.nine="";GetClientTelemetrySettingsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.one!=null&&m.hasOwnProperty("one"))w.uint32(8).int32(m.one);if(m.two!=null&&m.hasOwnProperty("two"))w.uint32(16).int32(m.two);if(m.three!=null&&m.hasOwnProperty("three"))w.uint32(24).int32(m.three);if(m.four!=null&&m.hasOwnProperty("four"))w.uint32(32).int32(m.four);if(m.five!=null&&m.hasOwnProperty("five"))w.uint32(40).int32(m.five);if(m.six!=null&&m.hasOwnProperty("six"))w.uint32(49).fixed64(m.six);if(m.seven!=null&&m.hasOwnProperty("seven"))w.uint32(56).int32(m.seven);if(m.eight!=null&&m.hasOwnProperty("eight"))w.uint32(65).fixed64(m.eight);if(m.nine!=null&&m.hasOwnProperty("nine"))w.uint32(74).string(m.nine);return w};GetClientTelemetrySettingsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetClientTelemetrySettingsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.one=r.int32();break;case 2:m.two=r.int32();break;case 3:m.three=r.int32();break;case 4:m.four=r.int32();break;case 5:m.five=r.int32();break;case 6:m.six=r.fixed64();break;case 7:m.seven=r.int32();break;case 8:m.eight=r.fixed64();break;case 9:m.nine=r.string();break;default:r.skipType(t&7);break}}return m};GetClientTelemetrySettingsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetClientTelemetrySettingsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetClientTelemetrySettingsResponse;if(d.one!=null){m.one=d.one|0}if(d.two!=null){m.two=d.two|0}if(d.three!=null){m.three=d.three|0}if(d.four!=null){m.four=d.four|0}if(d.five!=null){m.five=d.five|0}if(d.six!=null){if($util.Long)(m.six=$util.Long.fromValue(d.six)).unsigned=false;else if(typeof d.six==="string")m.six=parseInt(d.six,10);else if(typeof d.six==="number")m.six=d.six;else if(typeof d.six==="object")m.six=new $util.LongBits(d.six.low>>>0,d.six.high>>>0).toNumber()}if(d.seven!=null){m.seven=d.seven|0}if(d.eight!=null){if($util.Long)(m.eight=$util.Long.fromValue(d.eight)).unsigned=false;else if(typeof d.eight==="string")m.eight=parseInt(d.eight,10);else if(typeof d.eight==="number")m.eight=d.eight;else if(typeof d.eight==="object")m.eight=new $util.LongBits(d.eight.low>>>0,d.eight.high>>>0).toNumber()}if(d.nine!=null){m.nine=String(d.nine)}return m};GetClientTelemetrySettingsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.one=0;d.two=0;d.three=0;d.four=0;d.five=0;if($util.Long){var n=new $util.Long(0,0,false);d.six=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.six=o.longs===String?"0":0;d.seven=0;if($util.Long){var n=new $util.Long(0,0,false);d.eight=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.eight=o.longs===String?"0":0;d.nine=""}if(m.one!=null&&m.hasOwnProperty("one")){d.one=m.one}if(m.two!=null&&m.hasOwnProperty("two")){d.two=m.two}if(m.three!=null&&m.hasOwnProperty("three")){d.three=m.three}if(m.four!=null&&m.hasOwnProperty("four")){d.four=m.four}if(m.five!=null&&m.hasOwnProperty("five")){d.five=m.five}if(m.six!=null&&m.hasOwnProperty("six")){if(typeof m.six==="number")d.six=o.longs===String?String(m.six):m.six;else d.six=o.longs===String?$util.Long.prototype.toString.call(m.six):o.longs===Number?new $util.LongBits(m.six.low>>>0,m.six.high>>>0).toNumber():m.six}if(m.seven!=null&&m.hasOwnProperty("seven")){d.seven=m.seven}if(m.eight!=null&&m.hasOwnProperty("eight")){if(typeof m.eight==="number")d.eight=o.longs===String?String(m.eight):m.eight;else d.eight=o.longs===String?$util.Long.prototype.toString.call(m.eight):o.longs===Number?new $util.LongBits(m.eight.low>>>0,m.eight.high>>>0).toNumber():m.eight}if(m.nine!=null&&m.hasOwnProperty("nine")){d.nine=m.nine}return d};GetClientTelemetrySettingsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetClientTelemetrySettingsResponse}();Responses.GetCombatChallengeResponse=function(){function GetCombatChallengeResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetCombatChallengeResponse.prototype.result=0;GetCombatChallengeResponse.prototype.challenge=null;GetCombatChallengeResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.challenge!=null&&m.hasOwnProperty("challenge"))$root.POGOProtos.Data.Combat.CombatChallenge.encode(m.challenge,w.uint32(18).fork()).ldelim();return w};GetCombatChallengeResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetCombatChallengeResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.challenge=$root.POGOProtos.Data.Combat.CombatChallenge.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GetCombatChallengeResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetCombatChallengeResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetCombatChallengeResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_CHALLENGE_NOT_FOUND":case 2:m.result=2;break}if(d.challenge!=null){if(typeof d.challenge!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetCombatChallengeResponse.challenge: object expected");m.challenge=$root.POGOProtos.Data.Combat.CombatChallenge.fromObject(d.challenge)}return m};GetCombatChallengeResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.challenge=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetCombatChallengeResponse.Result[m.result]:m.result}if(m.challenge!=null&&m.hasOwnProperty("challenge")){d.challenge=$root.POGOProtos.Data.Combat.CombatChallenge.toObject(m.challenge,o)}return d};GetCombatChallengeResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetCombatChallengeResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_CHALLENGE_NOT_FOUND"]=2;return values}();return GetCombatChallengeResponse}();Responses.GetCombatPlayerProfileResponse=function(){function GetCombatPlayerProfileResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetCombatPlayerProfileResponse.prototype.result=0;GetCombatPlayerProfileResponse.prototype.profile=null;GetCombatPlayerProfileResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.profile!=null&&m.hasOwnProperty("profile"))$root.POGOProtos.Data.Combat.CombatPlayerProfile.encode(m.profile,w.uint32(18).fork()).ldelim();return w};GetCombatPlayerProfileResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetCombatPlayerProfileResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.profile=$root.POGOProtos.Data.Combat.CombatPlayerProfile.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GetCombatPlayerProfileResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetCombatPlayerProfileResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetCombatPlayerProfileResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_PLAYER_NOT_FOUND":case 2:m.result=2;break;case"ERROR_ACCESS_DENIED":case 3:m.result=3;break}if(d.profile!=null){if(typeof d.profile!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetCombatPlayerProfileResponse.profile: object expected");m.profile=$root.POGOProtos.Data.Combat.CombatPlayerProfile.fromObject(d.profile)}return m};GetCombatPlayerProfileResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.profile=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetCombatPlayerProfileResponse.Result[m.result]:m.result}if(m.profile!=null&&m.hasOwnProperty("profile")){d.profile=$root.POGOProtos.Data.Combat.CombatPlayerProfile.toObject(m.profile,o)}return d};GetCombatPlayerProfileResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetCombatPlayerProfileResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_PLAYER_NOT_FOUND"]=2;values[valuesById[3]="ERROR_ACCESS_DENIED"]=3;return values}();return GetCombatPlayerProfileResponse}();Responses.GetCombatResultsResponse=function(){function GetCombatResultsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetCombatResultsResponse.prototype.result=0;GetCombatResultsResponse.prototype.reward_status=0;GetCombatResultsResponse.prototype.rewards=null;GetCombatResultsResponse.prototype.friend_level_up=null;GetCombatResultsResponse.prototype.number_rewarded_battles_today=0;GetCombatResultsResponse.prototype.combat_player_finish_state=0;GetCombatResultsResponse.prototype.combat_rematch=null;GetCombatResultsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.reward_status!=null&&m.hasOwnProperty("reward_status"))w.uint32(16).int32(m.reward_status);if(m.rewards!=null&&m.hasOwnProperty("rewards"))$root.POGOProtos.Inventory.Loot.encode(m.rewards,w.uint32(26).fork()).ldelim();if(m.friend_level_up!=null&&m.hasOwnProperty("friend_level_up"))$root.POGOProtos.Data.Friends.LeveledUpFriends.encode(m.friend_level_up,w.uint32(34).fork()).ldelim();if(m.number_rewarded_battles_today!=null&&m.hasOwnProperty("number_rewarded_battles_today"))w.uint32(40).int32(m.number_rewarded_battles_today);if(m.combat_player_finish_state!=null&&m.hasOwnProperty("combat_player_finish_state"))w.uint32(48).int32(m.combat_player_finish_state);if(m.combat_rematch!=null&&m.hasOwnProperty("combat_rematch"))$root.POGOProtos.Networking.Responses.GetCombatResultsResponse.CombatRematch.encode(m.combat_rematch,w.uint32(58).fork()).ldelim();return w};GetCombatResultsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetCombatResultsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.reward_status=r.int32();break;case 3:m.rewards=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;case 4:m.friend_level_up=$root.POGOProtos.Data.Friends.LeveledUpFriends.decode(r,r.uint32());break;case 5:m.number_rewarded_battles_today=r.int32();break;case 6:m.combat_player_finish_state=r.int32();break;case 7:m.combat_rematch=$root.POGOProtos.Networking.Responses.GetCombatResultsResponse.CombatRematch.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GetCombatResultsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetCombatResultsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetCombatResultsResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALID_COMBAT_STATE":case 2:m.result=2;break;case"ERROR_COMBAT_NOT_FOUND":case 3:m.result=3;break;case"ERROR_PLAYER_QUIT":case 4:m.result=4;break}switch(d.reward_status){case"UNSET_REWARD_STATUS":case 0:m.reward_status=0;break;case"REWARDS_GRANTED":case 1:m.reward_status=1;break;case"MAX_REWARDS_RECEIVED":case 2:m.reward_status=2;break;case"PLAYER_BAG_FULL":case 3:m.reward_status=3;break}if(d.rewards!=null){if(typeof d.rewards!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetCombatResultsResponse.rewards: object expected");m.rewards=$root.POGOProtos.Inventory.Loot.fromObject(d.rewards)}if(d.friend_level_up!=null){if(typeof d.friend_level_up!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetCombatResultsResponse.friend_level_up: object expected");m.friend_level_up=$root.POGOProtos.Data.Friends.LeveledUpFriends.fromObject(d.friend_level_up)}if(d.number_rewarded_battles_today!=null){m.number_rewarded_battles_today=d.number_rewarded_battles_today|0}switch(d.combat_player_finish_state){case"WINNER":case 0:m.combat_player_finish_state=0;break;case"LOSER":case 1:m.combat_player_finish_state=1;break;case"DRAW":case 2:m.combat_player_finish_state=2;break}if(d.combat_rematch!=null){if(typeof d.combat_rematch!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetCombatResultsResponse.combat_rematch: object expected");m.combat_rematch=$root.POGOProtos.Networking.Responses.GetCombatResultsResponse.CombatRematch.fromObject(d.combat_rematch)}return m};GetCombatResultsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.reward_status=o.enums===String?"UNSET_REWARD_STATUS":0;d.rewards=null;d.friend_level_up=null;d.number_rewarded_battles_today=0;d.combat_player_finish_state=o.enums===String?"WINNER":0;d.combat_rematch=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetCombatResultsResponse.Result[m.result]:m.result}if(m.reward_status!=null&&m.hasOwnProperty("reward_status")){d.reward_status=o.enums===String?$root.POGOProtos.Enums.CombatRewardStatus[m.reward_status]:m.reward_status}if(m.rewards!=null&&m.hasOwnProperty("rewards")){d.rewards=$root.POGOProtos.Inventory.Loot.toObject(m.rewards,o)}if(m.friend_level_up!=null&&m.hasOwnProperty("friend_level_up")){d.friend_level_up=$root.POGOProtos.Data.Friends.LeveledUpFriends.toObject(m.friend_level_up,o)}if(m.number_rewarded_battles_today!=null&&m.hasOwnProperty("number_rewarded_battles_today")){d.number_rewarded_battles_today=m.number_rewarded_battles_today}if(m.combat_player_finish_state!=null&&m.hasOwnProperty("combat_player_finish_state")){d.combat_player_finish_state=o.enums===String?$root.POGOProtos.Enums.CombatPlayerFinishState[m.combat_player_finish_state]:m.combat_player_finish_state}if(m.combat_rematch!=null&&m.hasOwnProperty("combat_rematch")){d.combat_rematch=$root.POGOProtos.Networking.Responses.GetCombatResultsResponse.CombatRematch.toObject(m.combat_rematch,o)}return d};GetCombatResultsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetCombatResultsResponse.CombatRematch=function(){function CombatRematch(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatRematch.prototype.combat_rematch_id="";CombatRematch.prototype.combat_league_template_id="";CombatRematch.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.combat_rematch_id!=null&&m.hasOwnProperty("combat_rematch_id"))w.uint32(10).string(m.combat_rematch_id);if(m.combat_league_template_id!=null&&m.hasOwnProperty("combat_league_template_id"))w.uint32(18).string(m.combat_league_template_id);return w};CombatRematch.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetCombatResultsResponse.CombatRematch;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.combat_rematch_id=r.string();break;case 2:m.combat_league_template_id=r.string();break;default:r.skipType(t&7);break}}return m};CombatRematch.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetCombatResultsResponse.CombatRematch)return d;var m=new $root.POGOProtos.Networking.Responses.GetCombatResultsResponse.CombatRematch;if(d.combat_rematch_id!=null){m.combat_rematch_id=String(d.combat_rematch_id)}if(d.combat_league_template_id!=null){m.combat_league_template_id=String(d.combat_league_template_id)}return m};CombatRematch.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.combat_rematch_id="";d.combat_league_template_id=""}if(m.combat_rematch_id!=null&&m.hasOwnProperty("combat_rematch_id")){d.combat_rematch_id=m.combat_rematch_id}if(m.combat_league_template_id!=null&&m.hasOwnProperty("combat_league_template_id")){d.combat_league_template_id=m.combat_league_template_id}return d};CombatRematch.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatRematch}();GetCombatResultsResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_COMBAT_STATE"]=2;values[valuesById[3]="ERROR_COMBAT_NOT_FOUND"]=3;values[valuesById[4]="ERROR_PLAYER_QUIT"]=4;return values}();return GetCombatResultsResponse}();Responses.GetDownloadUrlsResponse=function(){function GetDownloadUrlsResponse(p){this.download_urls=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetDownloadUrlsResponse.prototype.download_urls=$util.emptyArray;GetDownloadUrlsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.download_urls!=null&&m.download_urls.length){for(var i=0;i<m.download_urls.length;++i)$root.POGOProtos.Data.DownloadUrlEntry.encode(m.download_urls[i],w.uint32(10).fork()).ldelim()}return w};GetDownloadUrlsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetDownloadUrlsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.download_urls&&m.download_urls.length))m.download_urls=[];m.download_urls.push($root.POGOProtos.Data.DownloadUrlEntry.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};GetDownloadUrlsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetDownloadUrlsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetDownloadUrlsResponse;if(d.download_urls){if(!Array.isArray(d.download_urls))throw TypeError(".POGOProtos.Networking.Responses.GetDownloadUrlsResponse.download_urls: array expected");m.download_urls=[];for(var i=0;i<d.download_urls.length;++i){if(typeof d.download_urls[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetDownloadUrlsResponse.download_urls: object expected");m.download_urls[i]=$root.POGOProtos.Data.DownloadUrlEntry.fromObject(d.download_urls[i])}}return m};GetDownloadUrlsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.download_urls=[]}if(m.download_urls&&m.download_urls.length){d.download_urls=[];for(var j=0;j<m.download_urls.length;++j){d.download_urls[j]=$root.POGOProtos.Data.DownloadUrlEntry.toObject(m.download_urls[j],o)}}return d};GetDownloadUrlsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetDownloadUrlsResponse}();Responses.GetFitnessReportResponse=function(){function GetFitnessReportResponse(p){this.daily_reports=[];this.weekly_reports=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetFitnessReportResponse.prototype.status=0;GetFitnessReportResponse.prototype.daily_reports=$util.emptyArray;GetFitnessReportResponse.prototype.weekly_reports=$util.emptyArray;GetFitnessReportResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.daily_reports!=null&&m.daily_reports.length){for(var i=0;i<m.daily_reports.length;++i)$root.POGOProtos.Data.Fitness.FitnessReport.encode(m.daily_reports[i],w.uint32(18).fork()).ldelim()}if(m.weekly_reports!=null&&m.weekly_reports.length){for(var i=0;i<m.weekly_reports.length;++i)$root.POGOProtos.Data.Fitness.FitnessReport.encode(m.weekly_reports[i],w.uint32(26).fork()).ldelim()}return w};GetFitnessReportResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetFitnessReportResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:if(!(m.daily_reports&&m.daily_reports.length))m.daily_reports=[];m.daily_reports.push($root.POGOProtos.Data.Fitness.FitnessReport.decode(r,r.uint32()));break;case 3:if(!(m.weekly_reports&&m.weekly_reports.length))m.weekly_reports=[];m.weekly_reports.push($root.POGOProtos.Data.Fitness.FitnessReport.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};GetFitnessReportResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetFitnessReportResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetFitnessReportResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"ERROR_PLAYER_NOT_FOUND":case 2:m.status=2;break;case"ERROR_RECORDS_NOT_FOUND":case 3:m.status=3;break;case"ERROR_INVALID_WINDOW":case 4:m.status=4;break;case"ERROR_UNKNOWN":case 5:m.status=5;break}if(d.daily_reports){if(!Array.isArray(d.daily_reports))throw TypeError(".POGOProtos.Networking.Responses.GetFitnessReportResponse.daily_reports: array expected");m.daily_reports=[];for(var i=0;i<d.daily_reports.length;++i){if(typeof d.daily_reports[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetFitnessReportResponse.daily_reports: object expected");m.daily_reports[i]=$root.POGOProtos.Data.Fitness.FitnessReport.fromObject(d.daily_reports[i])}}if(d.weekly_reports){if(!Array.isArray(d.weekly_reports))throw TypeError(".POGOProtos.Networking.Responses.GetFitnessReportResponse.weekly_reports: array expected");m.weekly_reports=[];for(var i=0;i<d.weekly_reports.length;++i){if(typeof d.weekly_reports[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetFitnessReportResponse.weekly_reports: object expected");m.weekly_reports[i]=$root.POGOProtos.Data.Fitness.FitnessReport.fromObject(d.weekly_reports[i])}}return m};GetFitnessReportResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.daily_reports=[];d.weekly_reports=[]}if(o.defaults){d.status=o.enums===String?"UNSET":0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.GetFitnessReportResponse.Status[m.status]:m.status}if(m.daily_reports&&m.daily_reports.length){d.daily_reports=[];for(var j=0;j<m.daily_reports.length;++j){d.daily_reports[j]=$root.POGOProtos.Data.Fitness.FitnessReport.toObject(m.daily_reports[j],o)}}if(m.weekly_reports&&m.weekly_reports.length){d.weekly_reports=[];for(var j=0;j<m.weekly_reports.length;++j){d.weekly_reports[j]=$root.POGOProtos.Data.Fitness.FitnessReport.toObject(m.weekly_reports[j],o)}}return d};GetFitnessReportResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetFitnessReportResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_PLAYER_NOT_FOUND"]=2;values[valuesById[3]="ERROR_RECORDS_NOT_FOUND"]=3;values[valuesById[4]="ERROR_INVALID_WINDOW"]=4;values[valuesById[5]="ERROR_UNKNOWN"]=5;return values}();return GetFitnessReportResponse}();Responses.GetFitnessRewardsResponse=function(){function GetFitnessRewardsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetFitnessRewardsResponse.prototype.result=0;GetFitnessRewardsResponse.prototype.rewards=null;GetFitnessRewardsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.rewards!=null&&m.hasOwnProperty("rewards"))$root.POGOProtos.Inventory.Loot.encode(m.rewards,w.uint32(18).fork()).ldelim();return w};GetFitnessRewardsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetFitnessRewardsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.rewards=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GetFitnessRewardsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetFitnessRewardsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetFitnessRewardsResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"REWARDS_ALREADY_COLLECTED":case 2:m.result=2;break;case"ERROR_UNKNOWN":case 3:m.result=3;break}if(d.rewards!=null){if(typeof d.rewards!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetFitnessRewardsResponse.rewards: object expected");m.rewards=$root.POGOProtos.Inventory.Loot.fromObject(d.rewards)}return m};GetFitnessRewardsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.rewards=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetFitnessRewardsResponse.Result[m.result]:m.result}if(m.rewards!=null&&m.hasOwnProperty("rewards")){d.rewards=$root.POGOProtos.Inventory.Loot.toObject(m.rewards,o)}return d};GetFitnessRewardsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetFitnessRewardsResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="REWARDS_ALREADY_COLLECTED"]=2;values[valuesById[3]="ERROR_UNKNOWN"]=3;return values}();return GetFitnessRewardsResponse}();Responses.GetFriendshipMilestoneRewardsResponse=function(){function GetFriendshipMilestoneRewardsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetFriendshipMilestoneRewardsResponse.prototype.result=0;GetFriendshipMilestoneRewardsResponse.prototype.xp_reward=$util.Long?$util.Long.fromBits(0,0,false):0;GetFriendshipMilestoneRewardsResponse.prototype.friend_id="";GetFriendshipMilestoneRewardsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.xp_reward!=null&&m.hasOwnProperty("xp_reward"))w.uint32(16).int64(m.xp_reward);if(m.friend_id!=null&&m.hasOwnProperty("friend_id"))w.uint32(26).string(m.friend_id);return w};GetFriendshipMilestoneRewardsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetFriendshipMilestoneRewardsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.xp_reward=r.int64();break;case 3:m.friend_id=r.string();break;default:r.skipType(t&7);break}}return m};GetFriendshipMilestoneRewardsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetFriendshipMilestoneRewardsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetFriendshipMilestoneRewardsResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_NOT_FRIENDS":case 3:m.result=3;break;case"ERROR_MILESTONE_ALREADY_AWARDED":case 4:m.result=4;break;case"ERROR_FAILED_TO_UPDATE":case 5:m.result=5;break}if(d.xp_reward!=null){if($util.Long)(m.xp_reward=$util.Long.fromValue(d.xp_reward)).unsigned=false;else if(typeof d.xp_reward==="string")m.xp_reward=parseInt(d.xp_reward,10);else if(typeof d.xp_reward==="number")m.xp_reward=d.xp_reward;else if(typeof d.xp_reward==="object")m.xp_reward=new $util.LongBits(d.xp_reward.low>>>0,d.xp_reward.high>>>0).toNumber()}if(d.friend_id!=null){m.friend_id=String(d.friend_id)}return m};GetFriendshipMilestoneRewardsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;if($util.Long){var n=new $util.Long(0,0,false);d.xp_reward=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.xp_reward=o.longs===String?"0":0;d.friend_id=""}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetFriendshipMilestoneRewardsResponse.Result[m.result]:m.result}if(m.xp_reward!=null&&m.hasOwnProperty("xp_reward")){if(typeof m.xp_reward==="number")d.xp_reward=o.longs===String?String(m.xp_reward):m.xp_reward;else d.xp_reward=o.longs===String?$util.Long.prototype.toString.call(m.xp_reward):o.longs===Number?new $util.LongBits(m.xp_reward.low>>>0,m.xp_reward.high>>>0).toNumber():m.xp_reward}if(m.friend_id!=null&&m.hasOwnProperty("friend_id")){d.friend_id=m.friend_id}return d};GetFriendshipMilestoneRewardsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetFriendshipMilestoneRewardsResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_NOT_FRIENDS"]=3;values[valuesById[4]="ERROR_MILESTONE_ALREADY_AWARDED"]=4;values[valuesById[5]="ERROR_FAILED_TO_UPDATE"]=5;return values}();return GetFriendshipMilestoneRewardsResponse}();Responses.GetFriendshipRewardsResponse=function(){function GetFriendshipRewardsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetFriendshipRewardsResponse.prototype.result=0;GetFriendshipRewardsResponse.prototype.xp_reward=$util.Long?$util.Long.fromBits(0,0,false):0;GetFriendshipRewardsResponse.prototype.friend_id="";GetFriendshipRewardsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.xp_reward!=null&&m.hasOwnProperty("xp_reward"))w.uint32(16).int64(m.xp_reward);if(m.friend_id!=null&&m.hasOwnProperty("friend_id"))w.uint32(26).string(m.friend_id);return w};GetFriendshipRewardsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetFriendshipRewardsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.xp_reward=r.int64();break;case 3:m.friend_id=r.string();break;default:r.skipType(t&7);break}}return m};GetFriendshipRewardsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetFriendshipRewardsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetFriendshipRewardsResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_NOT_FRIENDS":case 3:m.result=3;break;case"ERROR_MILESTONE_ALREADY_AWARDED":case 4:m.result=4;break;case"ERROR_FAILED_TO_UPDATE":case 5:m.result=5;break}if(d.xp_reward!=null){if($util.Long)(m.xp_reward=$util.Long.fromValue(d.xp_reward)).unsigned=false;else if(typeof d.xp_reward==="string")m.xp_reward=parseInt(d.xp_reward,10);else if(typeof d.xp_reward==="number")m.xp_reward=d.xp_reward;else if(typeof d.xp_reward==="object")m.xp_reward=new $util.LongBits(d.xp_reward.low>>>0,d.xp_reward.high>>>0).toNumber()}if(d.friend_id!=null){m.friend_id=String(d.friend_id)}return m};GetFriendshipRewardsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;if($util.Long){var n=new $util.Long(0,0,false);d.xp_reward=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.xp_reward=o.longs===String?"0":0;d.friend_id=""}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetFriendshipRewardsResponse.Result[m.result]:m.result}if(m.xp_reward!=null&&m.hasOwnProperty("xp_reward")){if(typeof m.xp_reward==="number")d.xp_reward=o.longs===String?String(m.xp_reward):m.xp_reward;else d.xp_reward=o.longs===String?$util.Long.prototype.toString.call(m.xp_reward):o.longs===Number?new $util.LongBits(m.xp_reward.low>>>0,m.xp_reward.high>>>0).toNumber():m.xp_reward}if(m.friend_id!=null&&m.hasOwnProperty("friend_id")){d.friend_id=m.friend_id}return d};GetFriendshipRewardsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetFriendshipRewardsResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_NOT_FRIENDS"]=3;values[valuesById[4]="ERROR_MILESTONE_ALREADY_AWARDED"]=4;values[valuesById[5]="ERROR_FAILED_TO_UPDATE"]=5;return values}();return GetFriendshipRewardsResponse}();Responses.GetGymBadgeDetailsResponse=function(){function GetGymBadgeDetailsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetGymBadgeDetailsResponse.prototype.gym_badge=null;GetGymBadgeDetailsResponse.prototype.gym_defender=null;GetGymBadgeDetailsResponse.prototype.success=false;GetGymBadgeDetailsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_badge!=null&&m.hasOwnProperty("gym_badge"))$root.POGOProtos.Data.Badge.AwardedGymBadge.encode(m.gym_badge,w.uint32(10).fork()).ldelim();if(m.gym_defender!=null&&m.hasOwnProperty("gym_defender"))$root.POGOProtos.Data.Gym.GymDefender.encode(m.gym_defender,w.uint32(18).fork()).ldelim();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(24).bool(m.success);return w};GetGymBadgeDetailsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetGymBadgeDetailsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.decode(r,r.uint32());break;case 2:m.gym_defender=$root.POGOProtos.Data.Gym.GymDefender.decode(r,r.uint32());break;case 3:m.success=r.bool();break;default:r.skipType(t&7);break}}return m};GetGymBadgeDetailsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetGymBadgeDetailsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetGymBadgeDetailsResponse;if(d.gym_badge!=null){if(typeof d.gym_badge!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetGymBadgeDetailsResponse.gym_badge: object expected");m.gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.fromObject(d.gym_badge)}if(d.gym_defender!=null){if(typeof d.gym_defender!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetGymBadgeDetailsResponse.gym_defender: object expected");m.gym_defender=$root.POGOProtos.Data.Gym.GymDefender.fromObject(d.gym_defender)}if(d.success!=null){m.success=Boolean(d.success)}return m};GetGymBadgeDetailsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.gym_badge=null;d.gym_defender=null;d.success=false}if(m.gym_badge!=null&&m.hasOwnProperty("gym_badge")){d.gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.toObject(m.gym_badge,o)}if(m.gym_defender!=null&&m.hasOwnProperty("gym_defender")){d.gym_defender=$root.POGOProtos.Data.Gym.GymDefender.toObject(m.gym_defender,o)}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}return d};GetGymBadgeDetailsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetGymBadgeDetailsResponse}();Responses.GetGymDetailsResponse=function(){function GetGymDetailsResponse(p){this.urls=[];this.secondary_url=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetGymDetailsResponse.prototype.gym_state=null;GetGymDetailsResponse.prototype.name="";GetGymDetailsResponse.prototype.urls=$util.emptyArray;GetGymDetailsResponse.prototype.result=0;GetGymDetailsResponse.prototype.description="";GetGymDetailsResponse.prototype.secondary_url=$util.emptyArray;GetGymDetailsResponse.prototype.checkin_image_url="";GetGymDetailsResponse.prototype.event_info=null;GetGymDetailsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_state!=null&&m.hasOwnProperty("gym_state"))$root.POGOProtos.Data.Gym.GymState.encode(m.gym_state,w.uint32(10).fork()).ldelim();if(m.name!=null&&m.hasOwnProperty("name"))w.uint32(18).string(m.name);if(m.urls!=null&&m.urls.length){for(var i=0;i<m.urls.length;++i)w.uint32(26).string(m.urls[i])}if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(32).int32(m.result);if(m.description!=null&&m.hasOwnProperty("description"))w.uint32(42).string(m.description);if(m.secondary_url!=null&&m.secondary_url.length){for(var i=0;i<m.secondary_url.length;++i)w.uint32(50).string(m.secondary_url[i])}if(m.checkin_image_url!=null&&m.hasOwnProperty("checkin_image_url"))w.uint32(58).string(m.checkin_image_url);if(m.event_info!=null&&m.hasOwnProperty("event_info"))$root.POGOProtos.Data.Raid.EventInfo.encode(m.event_info,w.uint32(66).fork()).ldelim();return w};GetGymDetailsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetGymDetailsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gym_state=$root.POGOProtos.Data.Gym.GymState.decode(r,r.uint32());break;case 2:m.name=r.string();break;case 3:if(!(m.urls&&m.urls.length))m.urls=[];m.urls.push(r.string());break;case 4:m.result=r.int32();break;case 5:m.description=r.string();break;case 6:if(!(m.secondary_url&&m.secondary_url.length))m.secondary_url=[];m.secondary_url.push(r.string());break;case 7:m.checkin_image_url=r.string();break;case 8:m.event_info=$root.POGOProtos.Data.Raid.EventInfo.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GetGymDetailsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetGymDetailsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetGymDetailsResponse;if(d.gym_state!=null){if(typeof d.gym_state!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetGymDetailsResponse.gym_state: object expected");m.gym_state=$root.POGOProtos.Data.Gym.GymState.fromObject(d.gym_state)}if(d.name!=null){m.name=String(d.name)}if(d.urls){if(!Array.isArray(d.urls))throw TypeError(".POGOProtos.Networking.Responses.GetGymDetailsResponse.urls: array expected");m.urls=[];for(var i=0;i<d.urls.length;++i){m.urls[i]=String(d.urls[i])}}switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_NOT_IN_RANGE":case 2:m.result=2;break}if(d.description!=null){m.description=String(d.description)}if(d.secondary_url){if(!Array.isArray(d.secondary_url))throw TypeError(".POGOProtos.Networking.Responses.GetGymDetailsResponse.secondary_url: array expected");m.secondary_url=[];for(var i=0;i<d.secondary_url.length;++i){m.secondary_url[i]=String(d.secondary_url[i])}}if(d.checkin_image_url!=null){m.checkin_image_url=String(d.checkin_image_url)}if(d.event_info!=null){if(typeof d.event_info!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetGymDetailsResponse.event_info: object expected");m.event_info=$root.POGOProtos.Data.Raid.EventInfo.fromObject(d.event_info)}return m};GetGymDetailsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.urls=[];d.secondary_url=[]}if(o.defaults){d.gym_state=null;d.name="";d.result=o.enums===String?"UNSET":0;d.description="";d.checkin_image_url="";d.event_info=null}if(m.gym_state!=null&&m.hasOwnProperty("gym_state")){d.gym_state=$root.POGOProtos.Data.Gym.GymState.toObject(m.gym_state,o)}if(m.name!=null&&m.hasOwnProperty("name")){d.name=m.name}if(m.urls&&m.urls.length){d.urls=[];for(var j=0;j<m.urls.length;++j){d.urls[j]=m.urls[j]}}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetGymDetailsResponse.Result[m.result]:m.result}if(m.description!=null&&m.hasOwnProperty("description")){d.description=m.description}if(m.secondary_url&&m.secondary_url.length){d.secondary_url=[];for(var j=0;j<m.secondary_url.length;++j){d.secondary_url[j]=m.secondary_url[j]}}if(m.checkin_image_url!=null&&m.hasOwnProperty("checkin_image_url")){d.checkin_image_url=m.checkin_image_url}if(m.event_info!=null&&m.hasOwnProperty("event_info")){d.event_info=$root.POGOProtos.Data.Raid.EventInfo.toObject(m.event_info,o)}return d};GetGymDetailsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetGymDetailsResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_NOT_IN_RANGE"]=2;return values}();return GetGymDetailsResponse}();Responses.GetHatchedEggsResponse=function(){function GetHatchedEggsResponse(p){this.pokemon_id=[];this.experience_awarded=[];this.candy_awarded=[];this.stardust_awarded=[];this.egg_km_walked=[];this.hatched_pokemon=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetHatchedEggsResponse.prototype.success=false;GetHatchedEggsResponse.prototype.pokemon_id=$util.emptyArray;GetHatchedEggsResponse.prototype.experience_awarded=$util.emptyArray;GetHatchedEggsResponse.prototype.candy_awarded=$util.emptyArray;GetHatchedEggsResponse.prototype.stardust_awarded=$util.emptyArray;GetHatchedEggsResponse.prototype.egg_km_walked=$util.emptyArray;GetHatchedEggsResponse.prototype.hatched_pokemon=$util.emptyArray;GetHatchedEggsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.pokemon_id!=null&&m.pokemon_id.length){w.uint32(18).fork();for(var i=0;i<m.pokemon_id.length;++i)w.fixed64(m.pokemon_id[i]);w.ldelim()}if(m.experience_awarded!=null&&m.experience_awarded.length){w.uint32(26).fork();for(var i=0;i<m.experience_awarded.length;++i)w.int32(m.experience_awarded[i]);w.ldelim()}if(m.candy_awarded!=null&&m.candy_awarded.length){w.uint32(34).fork();for(var i=0;i<m.candy_awarded.length;++i)w.int32(m.candy_awarded[i]);w.ldelim()}if(m.stardust_awarded!=null&&m.stardust_awarded.length){w.uint32(42).fork();for(var i=0;i<m.stardust_awarded.length;++i)w.int32(m.stardust_awarded[i]);w.ldelim()}if(m.egg_km_walked!=null&&m.egg_km_walked.length){w.uint32(50).fork();for(var i=0;i<m.egg_km_walked.length;++i)w.float(m.egg_km_walked[i]);w.ldelim()}if(m.hatched_pokemon!=null&&m.hatched_pokemon.length){for(var i=0;i<m.hatched_pokemon.length;++i)$root.POGOProtos.Data.PokemonData.encode(m.hatched_pokemon[i],w.uint32(58).fork()).ldelim()}return w};GetHatchedEggsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetHatchedEggsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:if(!(m.pokemon_id&&m.pokemon_id.length))m.pokemon_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.pokemon_id.push(r.fixed64())}else m.pokemon_id.push(r.fixed64());break;case 3:if(!(m.experience_awarded&&m.experience_awarded.length))m.experience_awarded=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.experience_awarded.push(r.int32())}else m.experience_awarded.push(r.int32());break;case 4:if(!(m.candy_awarded&&m.candy_awarded.length))m.candy_awarded=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.candy_awarded.push(r.int32())}else m.candy_awarded.push(r.int32());break;case 5:if(!(m.stardust_awarded&&m.stardust_awarded.length))m.stardust_awarded=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.stardust_awarded.push(r.int32())}else m.stardust_awarded.push(r.int32());break;case 6:if(!(m.egg_km_walked&&m.egg_km_walked.length))m.egg_km_walked=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.egg_km_walked.push(r.float())}else m.egg_km_walked.push(r.float());break;case 7:if(!(m.hatched_pokemon&&m.hatched_pokemon.length))m.hatched_pokemon=[];m.hatched_pokemon.push($root.POGOProtos.Data.PokemonData.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};GetHatchedEggsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetHatchedEggsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetHatchedEggsResponse;if(d.success!=null){m.success=Boolean(d.success)}if(d.pokemon_id){if(!Array.isArray(d.pokemon_id))throw TypeError(".POGOProtos.Networking.Responses.GetHatchedEggsResponse.pokemon_id: array expected");m.pokemon_id=[];for(var i=0;i<d.pokemon_id.length;++i){if($util.Long)(m.pokemon_id[i]=$util.Long.fromValue(d.pokemon_id[i])).unsigned=false;else if(typeof d.pokemon_id[i]==="string")m.pokemon_id[i]=parseInt(d.pokemon_id[i],10);else if(typeof d.pokemon_id[i]==="number")m.pokemon_id[i]=d.pokemon_id[i];else if(typeof d.pokemon_id[i]==="object")m.pokemon_id[i]=new $util.LongBits(d.pokemon_id[i].low>>>0,d.pokemon_id[i].high>>>0).toNumber()}}if(d.experience_awarded){if(!Array.isArray(d.experience_awarded))throw TypeError(".POGOProtos.Networking.Responses.GetHatchedEggsResponse.experience_awarded: array expected");m.experience_awarded=[];for(var i=0;i<d.experience_awarded.length;++i){m.experience_awarded[i]=d.experience_awarded[i]|0}}if(d.candy_awarded){if(!Array.isArray(d.candy_awarded))throw TypeError(".POGOProtos.Networking.Responses.GetHatchedEggsResponse.candy_awarded: array expected");m.candy_awarded=[];for(var i=0;i<d.candy_awarded.length;++i){m.candy_awarded[i]=d.candy_awarded[i]|0}}if(d.stardust_awarded){if(!Array.isArray(d.stardust_awarded))throw TypeError(".POGOProtos.Networking.Responses.GetHatchedEggsResponse.stardust_awarded: array expected");m.stardust_awarded=[];for(var i=0;i<d.stardust_awarded.length;++i){m.stardust_awarded[i]=d.stardust_awarded[i]|0}}if(d.egg_km_walked){if(!Array.isArray(d.egg_km_walked))throw TypeError(".POGOProtos.Networking.Responses.GetHatchedEggsResponse.egg_km_walked: array expected");m.egg_km_walked=[];for(var i=0;i<d.egg_km_walked.length;++i){m.egg_km_walked[i]=Number(d.egg_km_walked[i])}}if(d.hatched_pokemon){if(!Array.isArray(d.hatched_pokemon))throw TypeError(".POGOProtos.Networking.Responses.GetHatchedEggsResponse.hatched_pokemon: array expected");m.hatched_pokemon=[];for(var i=0;i<d.hatched_pokemon.length;++i){if(typeof d.hatched_pokemon[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetHatchedEggsResponse.hatched_pokemon: object expected");m.hatched_pokemon[i]=$root.POGOProtos.Data.PokemonData.fromObject(d.hatched_pokemon[i])}}return m};GetHatchedEggsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.pokemon_id=[];d.experience_awarded=[];d.candy_awarded=[];d.stardust_awarded=[];d.egg_km_walked=[];d.hatched_pokemon=[]}if(o.defaults){d.success=false}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.pokemon_id&&m.pokemon_id.length){d.pokemon_id=[];for(var j=0;j<m.pokemon_id.length;++j){if(typeof m.pokemon_id[j]==="number")d.pokemon_id[j]=o.longs===String?String(m.pokemon_id[j]):m.pokemon_id[j];else d.pokemon_id[j]=o.longs===String?$util.Long.prototype.toString.call(m.pokemon_id[j]):o.longs===Number?new $util.LongBits(m.pokemon_id[j].low>>>0,m.pokemon_id[j].high>>>0).toNumber():m.pokemon_id[j]}}if(m.experience_awarded&&m.experience_awarded.length){d.experience_awarded=[];for(var j=0;j<m.experience_awarded.length;++j){d.experience_awarded[j]=m.experience_awarded[j]}}if(m.candy_awarded&&m.candy_awarded.length){d.candy_awarded=[];for(var j=0;j<m.candy_awarded.length;++j){d.candy_awarded[j]=m.candy_awarded[j]}}if(m.stardust_awarded&&m.stardust_awarded.length){d.stardust_awarded=[];for(var j=0;j<m.stardust_awarded.length;++j){d.stardust_awarded[j]=m.stardust_awarded[j]}}if(m.egg_km_walked&&m.egg_km_walked.length){d.egg_km_walked=[];for(var j=0;j<m.egg_km_walked.length;++j){d.egg_km_walked[j]=o.json&&!isFinite(m.egg_km_walked[j])?String(m.egg_km_walked[j]):m.egg_km_walked[j]}}if(m.hatched_pokemon&&m.hatched_pokemon.length){d.hatched_pokemon=[];for(var j=0;j<m.hatched_pokemon.length;++j){d.hatched_pokemon[j]=$root.POGOProtos.Data.PokemonData.toObject(m.hatched_pokemon[j],o)}}return d};GetHatchedEggsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetHatchedEggsResponse}();Responses.GetHoloInventoryResponse=function(){function GetHoloInventoryResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetHoloInventoryResponse.prototype.success=false;GetHoloInventoryResponse.prototype.inventory_delta=null;GetHoloInventoryResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.inventory_delta!=null&&m.hasOwnProperty("inventory_delta"))$root.POGOProtos.Inventory.InventoryDelta.encode(m.inventory_delta,w.uint32(18).fork()).ldelim();return w};GetHoloInventoryResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetHoloInventoryResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:m.inventory_delta=$root.POGOProtos.Inventory.InventoryDelta.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GetHoloInventoryResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetHoloInventoryResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetHoloInventoryResponse;if(d.success!=null){m.success=Boolean(d.success)}if(d.inventory_delta!=null){if(typeof d.inventory_delta!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetHoloInventoryResponse.inventory_delta: object expected");m.inventory_delta=$root.POGOProtos.Inventory.InventoryDelta.fromObject(d.inventory_delta)}return m};GetHoloInventoryResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.success=false;d.inventory_delta=null}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.inventory_delta!=null&&m.hasOwnProperty("inventory_delta")){d.inventory_delta=$root.POGOProtos.Inventory.InventoryDelta.toObject(m.inventory_delta,o)}return d};GetHoloInventoryResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetHoloInventoryResponse}();Responses.GetInboxResponse=function(){function GetInboxResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetInboxResponse.prototype.result=0;GetInboxResponse.prototype.inbox=null;GetInboxResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.inbox!=null&&m.hasOwnProperty("inbox"))$root.POGOProtos.Data.Inbox.ClientInbox.encode(m.inbox,w.uint32(18).fork()).ldelim();return w};GetInboxResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetInboxResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.inbox=$root.POGOProtos.Data.Inbox.ClientInbox.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GetInboxResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetInboxResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetInboxResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"FAILURE":case 2:m.result=2;break;case"TIMED_OUT":case 3:m.result=3;break}if(d.inbox!=null){if(typeof d.inbox!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetInboxResponse.inbox: object expected");m.inbox=$root.POGOProtos.Data.Inbox.ClientInbox.fromObject(d.inbox)}return m};GetInboxResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.inbox=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetInboxResponse.Result[m.result]:m.result}if(m.inbox!=null&&m.hasOwnProperty("inbox")){d.inbox=$root.POGOProtos.Data.Inbox.ClientInbox.toObject(m.inbox,o)}return d};GetInboxResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetInboxResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;values[valuesById[3]="TIMED_OUT"]=3;return values}();return GetInboxResponse}();Responses.GetIncensePokemonResponse=function(){function GetIncensePokemonResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetIncensePokemonResponse.prototype.result=0;GetIncensePokemonResponse.prototype.pokemon_id=0;GetIncensePokemonResponse.prototype.latitude=0;GetIncensePokemonResponse.prototype.longitude=0;GetIncensePokemonResponse.prototype.encounter_location="";GetIncensePokemonResponse.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,false):0;GetIncensePokemonResponse.prototype.disappear_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;GetIncensePokemonResponse.prototype.pokemon_display=null;GetIncensePokemonResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(16).int32(m.pokemon_id);if(m.latitude!=null&&m.hasOwnProperty("latitude"))w.uint32(25).double(m.latitude);if(m.longitude!=null&&m.hasOwnProperty("longitude"))w.uint32(33).double(m.longitude);if(m.encounter_location!=null&&m.hasOwnProperty("encounter_location"))w.uint32(42).string(m.encounter_location);if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(49).fixed64(m.encounter_id);if(m.disappear_timestamp_ms!=null&&m.hasOwnProperty("disappear_timestamp_ms"))w.uint32(56).int64(m.disappear_timestamp_ms);if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display"))$root.POGOProtos.Data.PokemonDisplay.encode(m.pokemon_display,w.uint32(66).fork()).ldelim();return w};GetIncensePokemonResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetIncensePokemonResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.pokemon_id=r.int32();break;case 3:m.latitude=r.double();break;case 4:m.longitude=r.double();break;case 5:m.encounter_location=r.string();break;case 6:m.encounter_id=r.fixed64();break;case 7:m.disappear_timestamp_ms=r.int64();break;case 8:m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GetIncensePokemonResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetIncensePokemonResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetIncensePokemonResponse;switch(d.result){case"INCENSE_ENCOUNTER_UNKNOWN":case 0:m.result=0;break;case"INCENSE_ENCOUNTER_AVAILABLE":case 1:m.result=1;break;case"INCENSE_ENCOUNTER_NOT_AVAILABLE":case 2:m.result=2;break}switch(d.pokemon_id){case"MISSINGNO":case 0:m.pokemon_id=0;break;case"BULBASAUR":case 1:m.pokemon_id=1;break;case"IVYSAUR":case 2:m.pokemon_id=2;break;case"VENUSAUR":case 3:m.pokemon_id=3;break;case"CHARMANDER":case 4:m.pokemon_id=4;break;case"CHARMELEON":case 5:m.pokemon_id=5;break;case"CHARIZARD":case 6:m.pokemon_id=6;break;case"SQUIRTLE":case 7:m.pokemon_id=7;break;case"WARTORTLE":case 8:m.pokemon_id=8;break;case"BLASTOISE":case 9:m.pokemon_id=9;break;case"CATERPIE":case 10:m.pokemon_id=10;break;case"METAPOD":case 11:m.pokemon_id=11;break;case"BUTTERFREE":case 12:m.pokemon_id=12;break;case"WEEDLE":case 13:m.pokemon_id=13;break;case"KAKUNA":case 14:m.pokemon_id=14;break;case"BEEDRILL":case 15:m.pokemon_id=15;break;case"PIDGEY":case 16:m.pokemon_id=16;break;case"PIDGEOTTO":case 17:m.pokemon_id=17;break;case"PIDGEOT":case 18:m.pokemon_id=18;break;case"RATTATA":case 19:m.pokemon_id=19;break;case"RATICATE":case 20:m.pokemon_id=20;break;case"SPEAROW":case 21:m.pokemon_id=21;break;case"FEAROW":case 22:m.pokemon_id=22;break;case"EKANS":case 23:m.pokemon_id=23;break;case"ARBOK":case 24:m.pokemon_id=24;break;case"PIKACHU":case 25:m.pokemon_id=25;break;case"RAICHU":case 26:m.pokemon_id=26;break;case"SANDSHREW":case 27:m.pokemon_id=27;break;case"SANDSLASH":case 28:m.pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_id=29;break;case"NIDORINA":case 30:m.pokemon_id=30;break;case"NIDOQUEEN":case 31:m.pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.pokemon_id=32;break;case"NIDORINO":case 33:m.pokemon_id=33;break;case"NIDOKING":case 34:m.pokemon_id=34;break;case"CLEFAIRY":case 35:m.pokemon_id=35;break;case"CLEFABLE":case 36:m.pokemon_id=36;break;case"VULPIX":case 37:m.pokemon_id=37;break;case"NINETALES":case 38:m.pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.pokemon_id=40;break;case"ZUBAT":case 41:m.pokemon_id=41;break;case"GOLBAT":case 42:m.pokemon_id=42;break;case"ODDISH":case 43:m.pokemon_id=43;break;case"GLOOM":case 44:m.pokemon_id=44;break;case"VILEPLUME":case 45:m.pokemon_id=45;break;case"PARAS":case 46:m.pokemon_id=46;break;case"PARASECT":case 47:m.pokemon_id=47;break;case"VENONAT":case 48:m.pokemon_id=48;break;case"VENOMOTH":case 49:m.pokemon_id=49;break;case"DIGLETT":case 50:m.pokemon_id=50;break;case"DUGTRIO":case 51:m.pokemon_id=51;break;case"MEOWTH":case 52:m.pokemon_id=52;break;case"PERSIAN":case 53:m.pokemon_id=53;break;case"PSYDUCK":case 54:m.pokemon_id=54;break;case"GOLDUCK":case 55:m.pokemon_id=55;break;case"MANKEY":case 56:m.pokemon_id=56;break;case"PRIMEAPE":case 57:m.pokemon_id=57;break;case"GROWLITHE":case 58:m.pokemon_id=58;break;case"ARCANINE":case 59:m.pokemon_id=59;break;case"POLIWAG":case 60:m.pokemon_id=60;break;case"POLIWHIRL":case 61:m.pokemon_id=61;break;case"POLIWRATH":case 62:m.pokemon_id=62;break;case"ABRA":case 63:m.pokemon_id=63;break;case"KADABRA":case 64:m.pokemon_id=64;break;case"ALAKAZAM":case 65:m.pokemon_id=65;break;case"MACHOP":case 66:m.pokemon_id=66;break;case"MACHOKE":case 67:m.pokemon_id=67;break;case"MACHAMP":case 68:m.pokemon_id=68;break;case"BELLSPROUT":case 69:m.pokemon_id=69;break;case"WEEPINBELL":case 70:m.pokemon_id=70;break;case"VICTREEBEL":case 71:m.pokemon_id=71;break;case"TENTACOOL":case 72:m.pokemon_id=72;break;case"TENTACRUEL":case 73:m.pokemon_id=73;break;case"GEODUDE":case 74:m.pokemon_id=74;break;case"GRAVELER":case 75:m.pokemon_id=75;break;case"GOLEM":case 76:m.pokemon_id=76;break;case"PONYTA":case 77:m.pokemon_id=77;break;case"RAPIDASH":case 78:m.pokemon_id=78;break;case"SLOWPOKE":case 79:m.pokemon_id=79;break;case"SLOWBRO":case 80:m.pokemon_id=80;break;case"MAGNEMITE":case 81:m.pokemon_id=81;break;case"MAGNETON":case 82:m.pokemon_id=82;break;case"FARFETCHD":case 83:m.pokemon_id=83;break;case"DODUO":case 84:m.pokemon_id=84;break;case"DODRIO":case 85:m.pokemon_id=85;break;case"SEEL":case 86:m.pokemon_id=86;break;case"DEWGONG":case 87:m.pokemon_id=87;break;case"GRIMER":case 88:m.pokemon_id=88;break;case"MUK":case 89:m.pokemon_id=89;break;case"SHELLDER":case 90:m.pokemon_id=90;break;case"CLOYSTER":case 91:m.pokemon_id=91;break;case"GASTLY":case 92:m.pokemon_id=92;break;case"HAUNTER":case 93:m.pokemon_id=93;break;case"GENGAR":case 94:m.pokemon_id=94;break;case"ONIX":case 95:m.pokemon_id=95;break;case"DROWZEE":case 96:m.pokemon_id=96;break;case"HYPNO":case 97:m.pokemon_id=97;break;case"KRABBY":case 98:m.pokemon_id=98;break;case"KINGLER":case 99:m.pokemon_id=99;break;case"VOLTORB":case 100:m.pokemon_id=100;break;case"ELECTRODE":case 101:m.pokemon_id=101;break;case"EXEGGCUTE":case 102:m.pokemon_id=102;break;case"EXEGGUTOR":case 103:m.pokemon_id=103;break;case"CUBONE":case 104:m.pokemon_id=104;break;case"MAROWAK":case 105:m.pokemon_id=105;break;case"HITMONLEE":case 106:m.pokemon_id=106;break;case"HITMONCHAN":case 107:m.pokemon_id=107;break;case"LICKITUNG":case 108:m.pokemon_id=108;break;case"KOFFING":case 109:m.pokemon_id=109;break;case"WEEZING":case 110:m.pokemon_id=110;break;case"RHYHORN":case 111:m.pokemon_id=111;break;case"RHYDON":case 112:m.pokemon_id=112;break;case"CHANSEY":case 113:m.pokemon_id=113;break;case"TANGELA":case 114:m.pokemon_id=114;break;case"KANGASKHAN":case 115:m.pokemon_id=115;break;case"HORSEA":case 116:m.pokemon_id=116;break;case"SEADRA":case 117:m.pokemon_id=117;break;case"GOLDEEN":case 118:m.pokemon_id=118;break;case"SEAKING":case 119:m.pokemon_id=119;break;case"STARYU":case 120:m.pokemon_id=120;break;case"STARMIE":case 121:m.pokemon_id=121;break;case"MR_MIME":case 122:m.pokemon_id=122;break;case"SCYTHER":case 123:m.pokemon_id=123;break;case"JYNX":case 124:m.pokemon_id=124;break;case"ELECTABUZZ":case 125:m.pokemon_id=125;break;case"MAGMAR":case 126:m.pokemon_id=126;break;case"PINSIR":case 127:m.pokemon_id=127;break;case"TAUROS":case 128:m.pokemon_id=128;break;case"MAGIKARP":case 129:m.pokemon_id=129;break;case"GYARADOS":case 130:m.pokemon_id=130;break;case"LAPRAS":case 131:m.pokemon_id=131;break;case"DITTO":case 132:m.pokemon_id=132;break;case"EEVEE":case 133:m.pokemon_id=133;break;case"VAPOREON":case 134:m.pokemon_id=134;break;case"JOLTEON":case 135:m.pokemon_id=135;break;case"FLAREON":case 136:m.pokemon_id=136;break;case"PORYGON":case 137:m.pokemon_id=137;break;case"OMANYTE":case 138:m.pokemon_id=138;break;case"OMASTAR":case 139:m.pokemon_id=139;break;case"KABUTO":case 140:m.pokemon_id=140;break;case"KABUTOPS":case 141:m.pokemon_id=141;break;case"AERODACTYL":case 142:m.pokemon_id=142;break;case"SNORLAX":case 143:m.pokemon_id=143;break;case"ARTICUNO":case 144:m.pokemon_id=144;break;case"ZAPDOS":case 145:m.pokemon_id=145;break;case"MOLTRES":case 146:m.pokemon_id=146;break;case"DRATINI":case 147:m.pokemon_id=147;break;case"DRAGONAIR":case 148:m.pokemon_id=148;break;case"DRAGONITE":case 149:m.pokemon_id=149;break;case"MEWTWO":case 150:m.pokemon_id=150;break;case"MEW":case 151:m.pokemon_id=151;break;case"CHIKORITA":case 152:m.pokemon_id=152;break;case"BAYLEEF":case 153:m.pokemon_id=153;break;case"MEGANIUM":case 154:m.pokemon_id=154;break;case"CYNDAQUIL":case 155:m.pokemon_id=155;break;case"QUILAVA":case 156:m.pokemon_id=156;break;case"TYPHLOSION":case 157:m.pokemon_id=157;break;case"TOTODILE":case 158:m.pokemon_id=158;break;case"CROCONAW":case 159:m.pokemon_id=159;break;case"FERALIGATR":case 160:m.pokemon_id=160;break;case"SENTRET":case 161:m.pokemon_id=161;break;case"FURRET":case 162:m.pokemon_id=162;break;case"HOOTHOOT":case 163:m.pokemon_id=163;break;case"NOCTOWL":case 164:m.pokemon_id=164;break;case"LEDYBA":case 165:m.pokemon_id=165;break;case"LEDIAN":case 166:m.pokemon_id=166;break;case"SPINARAK":case 167:m.pokemon_id=167;break;case"ARIADOS":case 168:m.pokemon_id=168;break;case"CROBAT":case 169:m.pokemon_id=169;break;case"CHINCHOU":case 170:m.pokemon_id=170;break;case"LANTURN":case 171:m.pokemon_id=171;break;case"PICHU":case 172:m.pokemon_id=172;break;case"CLEFFA":case 173:m.pokemon_id=173;break;case"IGGLYBUFF":case 174:m.pokemon_id=174;break;case"TOGEPI":case 175:m.pokemon_id=175;break;case"TOGETIC":case 176:m.pokemon_id=176;break;case"NATU":case 177:m.pokemon_id=177;break;case"XATU":case 178:m.pokemon_id=178;break;case"MAREEP":case 179:m.pokemon_id=179;break;case"FLAAFFY":case 180:m.pokemon_id=180;break;case"AMPHAROS":case 181:m.pokemon_id=181;break;case"BELLOSSOM":case 182:m.pokemon_id=182;break;case"MARILL":case 183:m.pokemon_id=183;break;case"AZUMARILL":case 184:m.pokemon_id=184;break;case"SUDOWOODO":case 185:m.pokemon_id=185;break;case"POLITOED":case 186:m.pokemon_id=186;break;case"HOPPIP":case 187:m.pokemon_id=187;break;case"SKIPLOOM":case 188:m.pokemon_id=188;break;case"JUMPLUFF":case 189:m.pokemon_id=189;break;case"AIPOM":case 190:m.pokemon_id=190;break;case"SUNKERN":case 191:m.pokemon_id=191;break;case"SUNFLORA":case 192:m.pokemon_id=192;break;case"YANMA":case 193:m.pokemon_id=193;break;case"WOOPER":case 194:m.pokemon_id=194;break;case"QUAGSIRE":case 195:m.pokemon_id=195;break;case"ESPEON":case 196:m.pokemon_id=196;break;case"UMBREON":case 197:m.pokemon_id=197;break;case"MURKROW":case 198:m.pokemon_id=198;break;case"SLOWKING":case 199:m.pokemon_id=199;break;case"MISDREAVUS":case 200:m.pokemon_id=200;break;case"UNOWN":case 201:m.pokemon_id=201;break;case"WOBBUFFET":case 202:m.pokemon_id=202;break;case"GIRAFARIG":case 203:m.pokemon_id=203;break;case"PINECO":case 204:m.pokemon_id=204;break;case"FORRETRESS":case 205:m.pokemon_id=205;break;case"DUNSPARCE":case 206:m.pokemon_id=206;break;case"GLIGAR":case 207:m.pokemon_id=207;break;case"STEELIX":case 208:m.pokemon_id=208;break;case"SNUBBULL":case 209:m.pokemon_id=209;break;case"GRANBULL":case 210:m.pokemon_id=210;break;case"QWILFISH":case 211:m.pokemon_id=211;break;case"SCIZOR":case 212:m.pokemon_id=212;break;case"SHUCKLE":case 213:m.pokemon_id=213;break;case"HERACROSS":case 214:m.pokemon_id=214;break;case"SNEASEL":case 215:m.pokemon_id=215;break;case"TEDDIURSA":case 216:m.pokemon_id=216;break;case"URSARING":case 217:m.pokemon_id=217;break;case"SLUGMA":case 218:m.pokemon_id=218;break;case"MAGCARGO":case 219:m.pokemon_id=219;break;case"SWINUB":case 220:m.pokemon_id=220;break;case"PILOSWINE":case 221:m.pokemon_id=221;break;case"CORSOLA":case 222:m.pokemon_id=222;break;case"REMORAID":case 223:m.pokemon_id=223;break;case"OCTILLERY":case 224:m.pokemon_id=224;break;case"DELIBIRD":case 225:m.pokemon_id=225;break;case"MANTINE":case 226:m.pokemon_id=226;break;case"SKARMORY":case 227:m.pokemon_id=227;break;case"HOUNDOUR":case 228:m.pokemon_id=228;break;case"HOUNDOOM":case 229:m.pokemon_id=229;break;case"KINGDRA":case 230:m.pokemon_id=230;break;case"PHANPY":case 231:m.pokemon_id=231;break;case"DONPHAN":case 232:m.pokemon_id=232;break;case"PORYGON2":case 233:m.pokemon_id=233;break;case"STANTLER":case 234:m.pokemon_id=234;break;case"SMEARGLE":case 235:m.pokemon_id=235;break;case"TYROGUE":case 236:m.pokemon_id=236;break;case"HITMONTOP":case 237:m.pokemon_id=237;break;case"SMOOCHUM":case 238:m.pokemon_id=238;break;case"ELEKID":case 239:m.pokemon_id=239;break;case"MAGBY":case 240:m.pokemon_id=240;break;case"MILTANK":case 241:m.pokemon_id=241;break;case"BLISSEY":case 242:m.pokemon_id=242;break;case"RAIKOU":case 243:m.pokemon_id=243;break;case"ENTEI":case 244:m.pokemon_id=244;break;case"SUICUNE":case 245:m.pokemon_id=245;break;case"LARVITAR":case 246:m.pokemon_id=246;break;case"PUPITAR":case 247:m.pokemon_id=247;break;case"TYRANITAR":case 248:m.pokemon_id=248;break;case"LUGIA":case 249:m.pokemon_id=249;break;case"HO_OH":case 250:m.pokemon_id=250;break;case"CELEBI":case 251:m.pokemon_id=251;break;case"TREECKO":case 252:m.pokemon_id=252;break;case"GROVYLE":case 253:m.pokemon_id=253;break;case"SCEPTILE":case 254:m.pokemon_id=254;break;case"TORCHIC":case 255:m.pokemon_id=255;break;case"COMBUSKEN":case 256:m.pokemon_id=256;break;case"BLAZIKEN":case 257:m.pokemon_id=257;break;case"MUDKIP":case 258:m.pokemon_id=258;break;case"MARSHTOMP":case 259:m.pokemon_id=259;break;case"SWAMPERT":case 260:m.pokemon_id=260;break;case"POOCHYENA":case 261:m.pokemon_id=261;break;case"MIGHTYENA":case 262:m.pokemon_id=262;break;case"ZIGZAGOON":case 263:m.pokemon_id=263;break;case"LINOONE":case 264:m.pokemon_id=264;break;case"WURMPLE":case 265:m.pokemon_id=265;break;case"SILCOON":case 266:m.pokemon_id=266;break;case"BEAUTIFLY":case 267:m.pokemon_id=267;break;case"CASCOON":case 268:m.pokemon_id=268;break;case"DUSTOX":case 269:m.pokemon_id=269;break;case"LOTAD":case 270:m.pokemon_id=270;break;case"LOMBRE":case 271:m.pokemon_id=271;break;case"LUDICOLO":case 272:m.pokemon_id=272;break;case"SEEDOT":case 273:m.pokemon_id=273;break;case"NUZLEAF":case 274:m.pokemon_id=274;break;case"SHIFTRY":case 275:m.pokemon_id=275;break;case"TAILLOW":case 276:m.pokemon_id=276;break;case"SWELLOW":case 277:m.pokemon_id=277;break;case"WINGULL":case 278:m.pokemon_id=278;break;case"PELIPPER":case 279:m.pokemon_id=279;break;case"RALTS":case 280:m.pokemon_id=280;break;case"KIRLIA":case 281:m.pokemon_id=281;break;case"GARDEVOIR":case 282:m.pokemon_id=282;break;case"SURSKIT":case 283:m.pokemon_id=283;break;case"MASQUERAIN":case 284:m.pokemon_id=284;break;case"SHROOMISH":case 285:m.pokemon_id=285;break;case"BRELOOM":case 286:m.pokemon_id=286;break;case"SLAKOTH":case 287:m.pokemon_id=287;break;case"VIGOROTH":case 288:m.pokemon_id=288;break;case"SLAKING":case 289:m.pokemon_id=289;break;case"NINCADA":case 290:m.pokemon_id=290;break;case"NINJASK":case 291:m.pokemon_id=291;break;case"SHEDINJA":case 292:m.pokemon_id=292;break;case"WHISMUR":case 293:m.pokemon_id=293;break;case"LOUDRED":case 294:m.pokemon_id=294;break;case"EXPLOUD":case 295:m.pokemon_id=295;break;case"MAKUHITA":case 296:m.pokemon_id=296;break;case"HARIYAMA":case 297:m.pokemon_id=297;break;case"AZURILL":case 298:m.pokemon_id=298;break;case"NOSEPASS":case 299:m.pokemon_id=299;break;case"SKITTY":case 300:m.pokemon_id=300;break;case"DELCATTY":case 301:m.pokemon_id=301;break;case"SABLEYE":case 302:m.pokemon_id=302;break;case"MAWILE":case 303:m.pokemon_id=303;break;case"ARON":case 304:m.pokemon_id=304;break;case"LAIRON":case 305:m.pokemon_id=305;break;case"AGGRON":case 306:m.pokemon_id=306;break;case"MEDITITE":case 307:m.pokemon_id=307;break;case"MEDICHAM":case 308:m.pokemon_id=308;break;case"ELECTRIKE":case 309:m.pokemon_id=309;break;case"MANECTRIC":case 310:m.pokemon_id=310;break;case"PLUSLE":case 311:m.pokemon_id=311;break;case"MINUN":case 312:m.pokemon_id=312;break;case"VOLBEAT":case 313:m.pokemon_id=313;break;case"ILLUMISE":case 314:m.pokemon_id=314;break;case"ROSELIA":case 315:m.pokemon_id=315;break;case"GULPIN":case 316:m.pokemon_id=316;break;case"SWALOT":case 317:m.pokemon_id=317;break;case"CARVANHA":case 318:m.pokemon_id=318;break;case"SHARPEDO":case 319:m.pokemon_id=319;break;case"WAILMER":case 320:m.pokemon_id=320;break;case"WAILORD":case 321:m.pokemon_id=321;break;case"NUMEL":case 322:m.pokemon_id=322;break;case"CAMERUPT":case 323:m.pokemon_id=323;break;case"TORKOAL":case 324:m.pokemon_id=324;break;case"SPOINK":case 325:m.pokemon_id=325;break;case"GRUMPIG":case 326:m.pokemon_id=326;break;case"SPINDA":case 327:m.pokemon_id=327;break;case"TRAPINCH":case 328:m.pokemon_id=328;break;case"VIBRAVA":case 329:m.pokemon_id=329;break;case"FLYGON":case 330:m.pokemon_id=330;break;case"CACNEA":case 331:m.pokemon_id=331;break;case"CACTURNE":case 332:m.pokemon_id=332;break;case"SWABLU":case 333:m.pokemon_id=333;break;case"ALTARIA":case 334:m.pokemon_id=334;break;case"ZANGOOSE":case 335:m.pokemon_id=335;break;case"SEVIPER":case 336:m.pokemon_id=336;break;case"LUNATONE":case 337:m.pokemon_id=337;break;case"SOLROCK":case 338:m.pokemon_id=338;break;case"BARBOACH":case 339:m.pokemon_id=339;break;case"WHISCASH":case 340:m.pokemon_id=340;break;case"CORPHISH":case 341:m.pokemon_id=341;break;case"CRAWDAUNT":case 342:m.pokemon_id=342;break;case"BALTOY":case 343:m.pokemon_id=343;break;case"CLAYDOL":case 344:m.pokemon_id=344;break;case"LILEEP":case 345:m.pokemon_id=345;break;case"CRADILY":case 346:m.pokemon_id=346;break;case"ANORITH":case 347:m.pokemon_id=347;break;case"ARMALDO":case 348:m.pokemon_id=348;break;case"FEEBAS":case 349:m.pokemon_id=349;break;case"MILOTIC":case 350:m.pokemon_id=350;break;case"CASTFORM":case 351:m.pokemon_id=351;break;case"KECLEON":case 352:m.pokemon_id=352;break;case"SHUPPET":case 353:m.pokemon_id=353;break;case"BANETTE":case 354:m.pokemon_id=354;break;case"DUSKULL":case 355:m.pokemon_id=355;break;case"DUSCLOPS":case 356:m.pokemon_id=356;break;case"TROPIUS":case 357:m.pokemon_id=357;break;case"CHIMECHO":case 358:m.pokemon_id=358;break;case"ABSOL":case 359:m.pokemon_id=359;break;case"WYNAUT":case 360:m.pokemon_id=360;break;case"SNORUNT":case 361:m.pokemon_id=361;break;case"GLALIE":case 362:m.pokemon_id=362;break;case"SPHEAL":case 363:m.pokemon_id=363;break;case"SEALEO":case 364:m.pokemon_id=364;break;case"WALREIN":case 365:m.pokemon_id=365;break;case"CLAMPERL":case 366:m.pokemon_id=366;break;case"HUNTAIL":case 367:m.pokemon_id=367;break;case"GOREBYSS":case 368:m.pokemon_id=368;break;case"RELICANTH":case 369:m.pokemon_id=369;break;case"LUVDISC":case 370:m.pokemon_id=370;break;case"BAGON":case 371:m.pokemon_id=371;break;case"SHELGON":case 372:m.pokemon_id=372;break;case"SALAMENCE":case 373:m.pokemon_id=373;break;case"BELDUM":case 374:m.pokemon_id=374;break;case"METANG":case 375:m.pokemon_id=375;break;case"METAGROSS":case 376:m.pokemon_id=376;break;case"REGIROCK":case 377:m.pokemon_id=377;break;case"REGICE":case 378:m.pokemon_id=378;break;case"REGISTEEL":case 379:m.pokemon_id=379;break;case"LATIAS":case 380:m.pokemon_id=380;break;case"LATIOS":case 381:m.pokemon_id=381;break;case"KYOGRE":case 382:m.pokemon_id=382;break;case"GROUDON":case 383:m.pokemon_id=383;break;case"RAYQUAZA":case 384:m.pokemon_id=384;break;case"JIRACHI":case 385:m.pokemon_id=385;break;case"DEOXYS":case 386:m.pokemon_id=386;break;case"TURTWIG":case 387:m.pokemon_id=387;break;case"GROTLE":case 388:m.pokemon_id=388;break;case"TORTERRA":case 389:m.pokemon_id=389;break;case"CHIMCHAR":case 390:m.pokemon_id=390;break;case"MONFERNO":case 391:m.pokemon_id=391;break;case"INFERNAPE":case 392:m.pokemon_id=392;break;case"PIPLUP":case 393:m.pokemon_id=393;break;case"PRINPLUP":case 394:m.pokemon_id=394;break;case"EMPOLEON":case 395:m.pokemon_id=395;break;case"STARLY":case 396:m.pokemon_id=396;break;case"STARAVIA":case 397:m.pokemon_id=397;break;case"STARAPTOR":case 398:m.pokemon_id=398;break;case"BIDOOF":case 399:m.pokemon_id=399;break;case"BIBAREL":case 400:m.pokemon_id=400;break;case"KRICKETOT":case 401:m.pokemon_id=401;break;case"KRICKETUNE":case 402:m.pokemon_id=402;break;case"SHINX":case 403:m.pokemon_id=403;break;case"LUXIO":case 404:m.pokemon_id=404;break;case"LUXRAY":case 405:m.pokemon_id=405;break;case"BUDEW":case 406:m.pokemon_id=406;break;case"ROSERADE":case 407:m.pokemon_id=407;break;case"CRANIDOS":case 408:m.pokemon_id=408;break;case"RAMPARDOS":case 409:m.pokemon_id=409;break;case"SHIELDON":case 410:m.pokemon_id=410;break;case"BASTIODON":case 411:m.pokemon_id=411;break;case"BURMY":case 412:m.pokemon_id=412;break;case"WORMADAM":case 413:m.pokemon_id=413;break;case"MOTHIM":case 414:m.pokemon_id=414;break;case"COMBEE":case 415:m.pokemon_id=415;break;case"VESPIQUEN":case 416:m.pokemon_id=416;break;case"PACHIRISU":case 417:m.pokemon_id=417;break;case"BUIZEL":case 418:m.pokemon_id=418;break;case"FLOATZEL":case 419:m.pokemon_id=419;break;case"CHERUBI":case 420:m.pokemon_id=420;break;case"CHERRIM":case 421:m.pokemon_id=421;break;case"SHELLOS":case 422:m.pokemon_id=422;break;case"GASTRODON":case 423:m.pokemon_id=423;break;case"AMBIPOM":case 424:m.pokemon_id=424;break;case"DRIFLOON":case 425:m.pokemon_id=425;break;case"DRIFBLIM":case 426:m.pokemon_id=426;break;case"BUNEARY":case 427:m.pokemon_id=427;break;case"LOPUNNY":case 428:m.pokemon_id=428;break;case"MISMAGIUS":case 429:m.pokemon_id=429;break;case"HONCHKROW":case 430:m.pokemon_id=430;break;case"GLAMEOW":case 431:m.pokemon_id=431;break;case"PURUGLY":case 432:m.pokemon_id=432;break;case"CHINGLING":case 433:m.pokemon_id=433;break;case"STUNKY":case 434:m.pokemon_id=434;break;case"SKUNTANK":case 435:m.pokemon_id=435;break;case"BRONZOR":case 436:m.pokemon_id=436;break;case"BRONZONG":case 437:m.pokemon_id=437;break;case"BONSLY":case 438:m.pokemon_id=438;break;case"MIME_JR":case 439:m.pokemon_id=439;break;case"HAPPINY":case 440:m.pokemon_id=440;break;case"CHATOT":case 441:m.pokemon_id=441;break;case"SPIRITOMB":case 442:m.pokemon_id=442;break;case"GIBLE":case 443:m.pokemon_id=443;break;case"GABITE":case 444:m.pokemon_id=444;break;case"GARCHOMP":case 445:m.pokemon_id=445;break;case"MUNCHLAX":case 446:m.pokemon_id=446;break;case"RIOLU":case 447:m.pokemon_id=447;break;case"LUCARIO":case 448:m.pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.pokemon_id=449;break;case"HIPPOWDON":case 450:m.pokemon_id=450;break;case"SKORUPI":case 451:m.pokemon_id=451;break;case"DRAPION":case 452:m.pokemon_id=452;break;case"CROAGUNK":case 453:m.pokemon_id=453;break;case"TOXICROAK":case 454:m.pokemon_id=454;break;case"CARNIVINE":case 455:m.pokemon_id=455;break;case"FINNEON":case 456:m.pokemon_id=456;break;case"LUMINEON":case 457:m.pokemon_id=457;break;case"MANTYKE":case 458:m.pokemon_id=458;break;case"SNOVER":case 459:m.pokemon_id=459;break;case"ABOMASNOW":case 460:m.pokemon_id=460;break;case"WEAVILE":case 461:m.pokemon_id=461;break;case"MAGNEZONE":case 462:m.pokemon_id=462;break;case"LICKILICKY":case 463:m.pokemon_id=463;break;case"RHYPERIOR":case 464:m.pokemon_id=464;break;case"TANGROWTH":case 465:m.pokemon_id=465;break;case"ELECTIVIRE":case 466:m.pokemon_id=466;break;case"MAGMORTAR":case 467:m.pokemon_id=467;break;case"TOGEKISS":case 468:m.pokemon_id=468;break;case"YANMEGA":case 469:m.pokemon_id=469;break;case"LEAFEON":case 470:m.pokemon_id=470;break;case"GLACEON":case 471:m.pokemon_id=471;break;case"GLISCOR":case 472:m.pokemon_id=472;break;case"MAMOSWINE":case 473:m.pokemon_id=473;break;case"PORYGON_Z":case 474:m.pokemon_id=474;break;case"GALLADE":case 475:m.pokemon_id=475;break;case"PROBOPASS":case 476:m.pokemon_id=476;break;case"DUSKNOIR":case 477:m.pokemon_id=477;break;case"FROSLASS":case 478:m.pokemon_id=478;break;case"ROTOM":case 479:m.pokemon_id=479;break;case"UXIE":case 480:m.pokemon_id=480;break;case"MESPRIT":case 481:m.pokemon_id=481;break;case"AZELF":case 482:m.pokemon_id=482;break;case"DIALGA":case 483:m.pokemon_id=483;break;case"PALKIA":case 484:m.pokemon_id=484;break;case"HEATRAN":case 485:m.pokemon_id=485;break;case"REGIGIGAS":case 486:m.pokemon_id=486;break;case"GIRATINA":case 487:m.pokemon_id=487;break;case"CRESSELIA":case 488:m.pokemon_id=488;break;case"PHIONE":case 489:m.pokemon_id=489;break;case"MANAPHY":case 490:m.pokemon_id=490;break;case"DARKRAI":case 491:m.pokemon_id=491;break;case"SHAYMIN":case 492:m.pokemon_id=492;break;case"ARCEUS":case 493:m.pokemon_id=493;break;case"MELTAN":case 808:m.pokemon_id=808;break;case"MELMETAL":case 809:m.pokemon_id=809;break}if(d.latitude!=null){m.latitude=Number(d.latitude)}if(d.longitude!=null){m.longitude=Number(d.longitude)}if(d.encounter_location!=null){m.encounter_location=String(d.encounter_location)}if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=false;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber()}if(d.disappear_timestamp_ms!=null){if($util.Long)(m.disappear_timestamp_ms=$util.Long.fromValue(d.disappear_timestamp_ms)).unsigned=false;else if(typeof d.disappear_timestamp_ms==="string")m.disappear_timestamp_ms=parseInt(d.disappear_timestamp_ms,10);else if(typeof d.disappear_timestamp_ms==="number")m.disappear_timestamp_ms=d.disappear_timestamp_ms;else if(typeof d.disappear_timestamp_ms==="object")m.disappear_timestamp_ms=new $util.LongBits(d.disappear_timestamp_ms.low>>>0,d.disappear_timestamp_ms.high>>>0).toNumber()}if(d.pokemon_display!=null){if(typeof d.pokemon_display!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetIncensePokemonResponse.pokemon_display: object expected");m.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.fromObject(d.pokemon_display)}return m};GetIncensePokemonResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"INCENSE_ENCOUNTER_UNKNOWN":0;d.pokemon_id=o.enums===String?"MISSINGNO":0;d.latitude=0;d.longitude=0;d.encounter_location="";if($util.Long){var n=new $util.Long(0,0,false);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.disappear_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.disappear_timestamp_ms=o.longs===String?"0":0;d.pokemon_display=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetIncensePokemonResponse.Result[m.result]:m.result}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){d.pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_id]:m.pokemon_id}if(m.latitude!=null&&m.hasOwnProperty("latitude")){d.latitude=o.json&&!isFinite(m.latitude)?String(m.latitude):m.latitude}if(m.longitude!=null&&m.hasOwnProperty("longitude")){d.longitude=o.json&&!isFinite(m.longitude)?String(m.longitude):m.longitude}if(m.encounter_location!=null&&m.hasOwnProperty("encounter_location")){d.encounter_location=m.encounter_location}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber():m.encounter_id}if(m.disappear_timestamp_ms!=null&&m.hasOwnProperty("disappear_timestamp_ms")){if(typeof m.disappear_timestamp_ms==="number")d.disappear_timestamp_ms=o.longs===String?String(m.disappear_timestamp_ms):m.disappear_timestamp_ms;else d.disappear_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.disappear_timestamp_ms):o.longs===Number?new $util.LongBits(m.disappear_timestamp_ms.low>>>0,m.disappear_timestamp_ms.high>>>0).toNumber():m.disappear_timestamp_ms}if(m.pokemon_display!=null&&m.hasOwnProperty("pokemon_display")){d.pokemon_display=$root.POGOProtos.Data.PokemonDisplay.toObject(m.pokemon_display,o)}return d};GetIncensePokemonResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetIncensePokemonResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="INCENSE_ENCOUNTER_UNKNOWN"]=0;values[valuesById[1]="INCENSE_ENCOUNTER_AVAILABLE"]=1;values[valuesById[2]="INCENSE_ENCOUNTER_NOT_AVAILABLE"]=2;return values}();return GetIncensePokemonResponse}();Responses.GetInventoryResponse=function(){function GetInventoryResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetInventoryResponse.prototype.success=false;GetInventoryResponse.prototype.inventory_delta=null;GetInventoryResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.inventory_delta!=null&&m.hasOwnProperty("inventory_delta"))$root.POGOProtos.Inventory.InventoryDelta.encode(m.inventory_delta,w.uint32(18).fork()).ldelim();return w};GetInventoryResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetInventoryResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:m.inventory_delta=$root.POGOProtos.Inventory.InventoryDelta.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GetInventoryResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetInventoryResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetInventoryResponse;if(d.success!=null){m.success=Boolean(d.success)}if(d.inventory_delta!=null){if(typeof d.inventory_delta!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetInventoryResponse.inventory_delta: object expected");m.inventory_delta=$root.POGOProtos.Inventory.InventoryDelta.fromObject(d.inventory_delta)}return m};GetInventoryResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.success=false;d.inventory_delta=null}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.inventory_delta!=null&&m.hasOwnProperty("inventory_delta")){d.inventory_delta=$root.POGOProtos.Inventory.InventoryDelta.toObject(m.inventory_delta,o)}return d};GetInventoryResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetInventoryResponse}();Responses.GetMapObjectsResponse=function(){function GetMapObjectsResponse(p){this.map_cells=[];this.client_weather=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetMapObjectsResponse.prototype.map_cells=$util.emptyArray;GetMapObjectsResponse.prototype.status=0;GetMapObjectsResponse.prototype.time_of_day=0;GetMapObjectsResponse.prototype.client_weather=$util.emptyArray;GetMapObjectsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.map_cells!=null&&m.map_cells.length){for(var i=0;i<m.map_cells.length;++i)$root.POGOProtos.Map.MapCell.encode(m.map_cells[i],w.uint32(10).fork()).ldelim()}if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(16).int32(m.status);if(m.time_of_day!=null&&m.hasOwnProperty("time_of_day"))w.uint32(24).int32(m.time_of_day);if(m.client_weather!=null&&m.client_weather.length){for(var i=0;i<m.client_weather.length;++i)$root.POGOProtos.Map.Weather.ClientWeather.encode(m.client_weather[i],w.uint32(34).fork()).ldelim()}return w};GetMapObjectsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetMapObjectsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.map_cells&&m.map_cells.length))m.map_cells=[];m.map_cells.push($root.POGOProtos.Map.MapCell.decode(r,r.uint32()));break;case 2:m.status=r.int32();break;case 3:m.time_of_day=r.int32();break;case 4:if(!(m.client_weather&&m.client_weather.length))m.client_weather=[];m.client_weather.push($root.POGOProtos.Map.Weather.ClientWeather.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};GetMapObjectsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetMapObjectsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetMapObjectsResponse;if(d.map_cells){if(!Array.isArray(d.map_cells))throw TypeError(".POGOProtos.Networking.Responses.GetMapObjectsResponse.map_cells: array expected");m.map_cells=[];for(var i=0;i<d.map_cells.length;++i){if(typeof d.map_cells[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetMapObjectsResponse.map_cells: object expected");m.map_cells[i]=$root.POGOProtos.Map.MapCell.fromObject(d.map_cells[i])}}switch(d.status){case"UNSET_STATUS":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"LOCATION_UNSET":case 2:m.status=2;break}switch(d.time_of_day){case"NONE":case 0:m.time_of_day=0;break;case"DAY":case 1:m.time_of_day=1;break;case"NIGHT":case 2:m.time_of_day=2;break}if(d.client_weather){if(!Array.isArray(d.client_weather))throw TypeError(".POGOProtos.Networking.Responses.GetMapObjectsResponse.client_weather: array expected");m.client_weather=[];for(var i=0;i<d.client_weather.length;++i){if(typeof d.client_weather[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetMapObjectsResponse.client_weather: object expected");m.client_weather[i]=$root.POGOProtos.Map.Weather.ClientWeather.fromObject(d.client_weather[i])}}return m};GetMapObjectsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.map_cells=[];d.client_weather=[]}if(o.defaults){d.status=o.enums===String?"UNSET_STATUS":0;d.time_of_day=o.enums===String?"NONE":0}if(m.map_cells&&m.map_cells.length){d.map_cells=[];for(var j=0;j<m.map_cells.length;++j){d.map_cells[j]=$root.POGOProtos.Map.MapCell.toObject(m.map_cells[j],o)}}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Map.MapObjectsStatus[m.status]:m.status}if(m.time_of_day!=null&&m.hasOwnProperty("time_of_day")){d.time_of_day=o.enums===String?$root.POGOProtos.Networking.Responses.GetMapObjectsResponse.TimeOfDay[m.time_of_day]:m.time_of_day}if(m.client_weather&&m.client_weather.length){d.client_weather=[];for(var j=0;j<m.client_weather.length;++j){d.client_weather[j]=$root.POGOProtos.Map.Weather.ClientWeather.toObject(m.client_weather[j],o)}}return d};GetMapObjectsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetMapObjectsResponse.TimeOfDay=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NONE"]=0;values[valuesById[1]="DAY"]=1;values[valuesById[2]="NIGHT"]=2;return values}();return GetMapObjectsResponse}();Responses.GetNewQuestsResponse=function(){function GetNewQuestsResponse(p){this.quests=[];this.version_changed_quests=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetNewQuestsResponse.prototype.status=0;GetNewQuestsResponse.prototype.quests=$util.emptyArray;GetNewQuestsResponse.prototype.version_changed_quests=$util.emptyArray;GetNewQuestsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.quests!=null&&m.quests.length){for(var i=0;i<m.quests.length;++i)$root.POGOProtos.Data.Quests.ClientQuest.encode(m.quests[i],w.uint32(18).fork()).ldelim()}if(m.version_changed_quests!=null&&m.version_changed_quests.length){for(var i=0;i<m.version_changed_quests.length;++i)$root.POGOProtos.Data.Quests.ClientQuest.encode(m.version_changed_quests[i],w.uint32(26).fork()).ldelim()}return w};GetNewQuestsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetNewQuestsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:if(!(m.quests&&m.quests.length))m.quests=[];m.quests.push($root.POGOProtos.Data.Quests.ClientQuest.decode(r,r.uint32()));break;case 3:if(!(m.version_changed_quests&&m.version_changed_quests.length))m.version_changed_quests=[];m.version_changed_quests.push($root.POGOProtos.Data.Quests.ClientQuest.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};GetNewQuestsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetNewQuestsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetNewQuestsResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"ERROR_INVALID_DISPLAY":case 2:m.status=2;break}if(d.quests){if(!Array.isArray(d.quests))throw TypeError(".POGOProtos.Networking.Responses.GetNewQuestsResponse.quests: array expected");m.quests=[];for(var i=0;i<d.quests.length;++i){if(typeof d.quests[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetNewQuestsResponse.quests: object expected");m.quests[i]=$root.POGOProtos.Data.Quests.ClientQuest.fromObject(d.quests[i])}}if(d.version_changed_quests){if(!Array.isArray(d.version_changed_quests))throw TypeError(".POGOProtos.Networking.Responses.GetNewQuestsResponse.version_changed_quests: array expected");m.version_changed_quests=[];for(var i=0;i<d.version_changed_quests.length;++i){if(typeof d.version_changed_quests[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetNewQuestsResponse.version_changed_quests: object expected");m.version_changed_quests[i]=$root.POGOProtos.Data.Quests.ClientQuest.fromObject(d.version_changed_quests[i])}}return m};GetNewQuestsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.quests=[];d.version_changed_quests=[]}if(o.defaults){d.status=o.enums===String?"UNSET":0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.GetNewQuestsResponse.Status[m.status]:m.status}if(m.quests&&m.quests.length){d.quests=[];for(var j=0;j<m.quests.length;++j){d.quests[j]=$root.POGOProtos.Data.Quests.ClientQuest.toObject(m.quests[j],o)}}if(m.version_changed_quests&&m.version_changed_quests.length){d.version_changed_quests=[];for(var j=0;j<m.version_changed_quests.length;++j){d.version_changed_quests[j]=$root.POGOProtos.Data.Quests.ClientQuest.toObject(m.version_changed_quests[j],o)}}return d};GetNewQuestsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetNewQuestsResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_DISPLAY"]=2;return values}();return GetNewQuestsResponse}();Responses.GetNpcCombatRewardsResponse=function(){function GetNpcCombatRewardsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetNpcCombatRewardsResponse.prototype.result=0;GetNpcCombatRewardsResponse.prototype.reward_status=0;GetNpcCombatRewardsResponse.prototype.rewards=null;GetNpcCombatRewardsResponse.prototype.number_rewarded_npc_battles_today=0;GetNpcCombatRewardsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.reward_status!=null&&m.hasOwnProperty("reward_status"))w.uint32(16).int32(m.reward_status);if(m.rewards!=null&&m.hasOwnProperty("rewards"))$root.POGOProtos.Inventory.Loot.encode(m.rewards,w.uint32(26).fork()).ldelim();if(m.number_rewarded_npc_battles_today!=null&&m.hasOwnProperty("number_rewarded_npc_battles_today"))w.uint32(32).int32(m.number_rewarded_npc_battles_today);return w};GetNpcCombatRewardsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetNpcCombatRewardsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.reward_status=r.int32();break;case 3:m.rewards=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;case 4:m.number_rewarded_npc_battles_today=r.int32();break;default:r.skipType(t&7);break}}return m};GetNpcCombatRewardsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetNpcCombatRewardsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetNpcCombatRewardsResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALD_NUMBER_ATTACKING_POKEMON_IDS":case 2:m.result=2;break}switch(d.reward_status){case"UNSET_REWARD_STATUS":case 0:m.reward_status=0;break;case"REWARDS_GRANTED":case 1:m.reward_status=1;break;case"MAX_REWARDS_RECEIVED":case 2:m.reward_status=2;break;case"PLAYER_BAG_FULL":case 3:m.reward_status=3;break}if(d.rewards!=null){if(typeof d.rewards!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetNpcCombatRewardsResponse.rewards: object expected");m.rewards=$root.POGOProtos.Inventory.Loot.fromObject(d.rewards)}if(d.number_rewarded_npc_battles_today!=null){m.number_rewarded_npc_battles_today=d.number_rewarded_npc_battles_today|0}return m};GetNpcCombatRewardsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.reward_status=o.enums===String?"UNSET_REWARD_STATUS":0;d.rewards=null;d.number_rewarded_npc_battles_today=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetNpcCombatRewardsResponse.Result[m.result]:m.result}if(m.reward_status!=null&&m.hasOwnProperty("reward_status")){d.reward_status=o.enums===String?$root.POGOProtos.Enums.CombatRewardStatus[m.reward_status]:m.reward_status}if(m.rewards!=null&&m.hasOwnProperty("rewards")){d.rewards=$root.POGOProtos.Inventory.Loot.toObject(m.rewards,o)}if(m.number_rewarded_npc_battles_today!=null&&m.hasOwnProperty("number_rewarded_npc_battles_today")){d.number_rewarded_npc_battles_today=m.number_rewarded_npc_battles_today}return d};GetNpcCombatRewardsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetNpcCombatRewardsResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALD_NUMBER_ATTACKING_POKEMON_IDS"]=2;return values}();return GetNpcCombatRewardsResponse}();Responses.GetPlayerDayResponse=function(){function GetPlayerDayResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetPlayerDayResponse.prototype.result=0;GetPlayerDayResponse.prototype.day=$util.Long?$util.Long.fromBits(0,0,false):0;GetPlayerDayResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.day!=null&&m.hasOwnProperty("day"))w.uint32(16).int64(m.day);return w};GetPlayerDayResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetPlayerDayResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.day=r.int64();break;default:r.skipType(t&7);break}}return m};GetPlayerDayResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetPlayerDayResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetPlayerDayResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break}if(d.day!=null){if($util.Long)(m.day=$util.Long.fromValue(d.day)).unsigned=false;else if(typeof d.day==="string")m.day=parseInt(d.day,10);else if(typeof d.day==="number")m.day=d.day;else if(typeof d.day==="object")m.day=new $util.LongBits(d.day.low>>>0,d.day.high>>>0).toNumber()}return m};GetPlayerDayResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;if($util.Long){var n=new $util.Long(0,0,false);d.day=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.day=o.longs===String?"0":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetPlayerDayResponse.Result[m.result]:m.result}if(m.day!=null&&m.hasOwnProperty("day")){if(typeof m.day==="number")d.day=o.longs===String?String(m.day):m.day;else d.day=o.longs===String?$util.Long.prototype.toString.call(m.day):o.longs===Number?new $util.LongBits(m.day.low>>>0,m.day.high>>>0).toNumber():m.day}return d};GetPlayerDayResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetPlayerDayResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;return values}();return GetPlayerDayResponse}();Responses.GetPlayerProfileResponse=function(){function GetPlayerProfileResponse(p){this.badges=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetPlayerProfileResponse.prototype.result=0;GetPlayerProfileResponse.prototype.start_time=$util.Long?$util.Long.fromBits(0,0,false):0;GetPlayerProfileResponse.prototype.badges=$util.emptyArray;GetPlayerProfileResponse.prototype.gym_badges=null;GetPlayerProfileResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.start_time!=null&&m.hasOwnProperty("start_time"))w.uint32(16).int64(m.start_time);if(m.badges!=null&&m.badges.length){for(var i=0;i<m.badges.length;++i)$root.POGOProtos.Data.PlayerBadge.encode(m.badges[i],w.uint32(26).fork()).ldelim()}if(m.gym_badges!=null&&m.hasOwnProperty("gym_badges"))$root.POGOProtos.Networking.Responses.GetPlayerProfileResponse.GymBadges.encode(m.gym_badges,w.uint32(34).fork()).ldelim();return w};GetPlayerProfileResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetPlayerProfileResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.start_time=r.int64();break;case 3:if(!(m.badges&&m.badges.length))m.badges=[];m.badges.push($root.POGOProtos.Data.PlayerBadge.decode(r,r.uint32()));break;case 4:m.gym_badges=$root.POGOProtos.Networking.Responses.GetPlayerProfileResponse.GymBadges.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GetPlayerProfileResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetPlayerProfileResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetPlayerProfileResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.start_time!=null){if($util.Long)(m.start_time=$util.Long.fromValue(d.start_time)).unsigned=false;else if(typeof d.start_time==="string")m.start_time=parseInt(d.start_time,10);else if(typeof d.start_time==="number")m.start_time=d.start_time;else if(typeof d.start_time==="object")m.start_time=new $util.LongBits(d.start_time.low>>>0,d.start_time.high>>>0).toNumber()}if(d.badges){if(!Array.isArray(d.badges))throw TypeError(".POGOProtos.Networking.Responses.GetPlayerProfileResponse.badges: array expected");m.badges=[];for(var i=0;i<d.badges.length;++i){if(typeof d.badges[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetPlayerProfileResponse.badges: object expected");m.badges[i]=$root.POGOProtos.Data.PlayerBadge.fromObject(d.badges[i])}}if(d.gym_badges!=null){if(typeof d.gym_badges!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetPlayerProfileResponse.gym_badges: object expected");m.gym_badges=$root.POGOProtos.Networking.Responses.GetPlayerProfileResponse.GymBadges.fromObject(d.gym_badges)}return m};GetPlayerProfileResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.badges=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0;if($util.Long){var n=new $util.Long(0,0,false);d.start_time=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.start_time=o.longs===String?"0":0;d.gym_badges=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetPlayerProfileResponse.Result[m.result]:m.result}if(m.start_time!=null&&m.hasOwnProperty("start_time")){if(typeof m.start_time==="number")d.start_time=o.longs===String?String(m.start_time):m.start_time;else d.start_time=o.longs===String?$util.Long.prototype.toString.call(m.start_time):o.longs===Number?new $util.LongBits(m.start_time.low>>>0,m.start_time.high>>>0).toNumber():m.start_time}if(m.badges&&m.badges.length){d.badges=[];for(var j=0;j<m.badges.length;++j){d.badges[j]=$root.POGOProtos.Data.PlayerBadge.toObject(m.badges[j],o)}}if(m.gym_badges!=null&&m.hasOwnProperty("gym_badges")){d.gym_badges=$root.POGOProtos.Networking.Responses.GetPlayerProfileResponse.GymBadges.toObject(m.gym_badges,o)}return d};GetPlayerProfileResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetPlayerProfileResponse.GymBadges=function(){function GymBadges(p){this.gym_badge=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymBadges.prototype.gym_badge=$util.emptyArray;GymBadges.prototype.total=0;GymBadges.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_badge!=null&&m.gym_badge.length){for(var i=0;i<m.gym_badge.length;++i)$root.POGOProtos.Data.Badge.AwardedGymBadge.encode(m.gym_badge[i],w.uint32(10).fork()).ldelim()}if(m.total!=null&&m.hasOwnProperty("total"))w.uint32(16).int32(m.total);return w};GymBadges.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetPlayerProfileResponse.GymBadges;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.gym_badge&&m.gym_badge.length))m.gym_badge=[];m.gym_badge.push($root.POGOProtos.Data.Badge.AwardedGymBadge.decode(r,r.uint32()));break;case 2:m.total=r.int32();break;default:r.skipType(t&7);break}}return m};GymBadges.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetPlayerProfileResponse.GymBadges)return d;var m=new $root.POGOProtos.Networking.Responses.GetPlayerProfileResponse.GymBadges;if(d.gym_badge){if(!Array.isArray(d.gym_badge))throw TypeError(".POGOProtos.Networking.Responses.GetPlayerProfileResponse.GymBadges.gym_badge: array expected");m.gym_badge=[];for(var i=0;i<d.gym_badge.length;++i){if(typeof d.gym_badge[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetPlayerProfileResponse.GymBadges.gym_badge: object expected");m.gym_badge[i]=$root.POGOProtos.Data.Badge.AwardedGymBadge.fromObject(d.gym_badge[i])}}if(d.total!=null){m.total=d.total|0}return m};GymBadges.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.gym_badge=[]}if(o.defaults){d.total=0}if(m.gym_badge&&m.gym_badge.length){d.gym_badge=[];for(var j=0;j<m.gym_badge.length;++j){d.gym_badge[j]=$root.POGOProtos.Data.Badge.AwardedGymBadge.toObject(m.gym_badge[j],o)}}if(m.total!=null&&m.hasOwnProperty("total")){d.total=m.total}return d};GymBadges.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GymBadges}();GetPlayerProfileResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return GetPlayerProfileResponse}();Responses.GetPlayerResponse=function(){function GetPlayerResponse(p){this.user_permission=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetPlayerResponse.prototype.success=false;GetPlayerResponse.prototype.player_data=null;GetPlayerResponse.prototype.banned=false;GetPlayerResponse.prototype.warn=false;GetPlayerResponse.prototype.was_created=false;GetPlayerResponse.prototype.warn_message_acknowledged=false;GetPlayerResponse.prototype.was_suspended=false;GetPlayerResponse.prototype.suspended_message_acknowledged=false;GetPlayerResponse.prototype.warn_expire_ms=$util.Long?$util.Long.fromBits(0,0,false):0;GetPlayerResponse.prototype.user_permission=$util.emptyArray;GetPlayerResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.player_data!=null&&m.hasOwnProperty("player_data"))$root.POGOProtos.Data.PlayerData.encode(m.player_data,w.uint32(18).fork()).ldelim();if(m.banned!=null&&m.hasOwnProperty("banned"))w.uint32(24).bool(m.banned);if(m.warn!=null&&m.hasOwnProperty("warn"))w.uint32(32).bool(m.warn);if(m.was_created!=null&&m.hasOwnProperty("was_created"))w.uint32(40).bool(m.was_created);if(m.warn_message_acknowledged!=null&&m.hasOwnProperty("warn_message_acknowledged"))w.uint32(48).bool(m.warn_message_acknowledged);if(m.was_suspended!=null&&m.hasOwnProperty("was_suspended"))w.uint32(56).bool(m.was_suspended);if(m.suspended_message_acknowledged!=null&&m.hasOwnProperty("suspended_message_acknowledged"))w.uint32(64).bool(m.suspended_message_acknowledged);if(m.warn_expire_ms!=null&&m.hasOwnProperty("warn_expire_ms"))w.uint32(72).int64(m.warn_expire_ms);if(m.user_permission!=null&&m.user_permission.length){w.uint32(82).fork();for(var i=0;i<m.user_permission.length;++i)w.int32(m.user_permission[i]);w.ldelim()}return w};GetPlayerResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetPlayerResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:m.player_data=$root.POGOProtos.Data.PlayerData.decode(r,r.uint32());break;case 3:m.banned=r.bool();break;case 4:m.warn=r.bool();break;case 5:m.was_created=r.bool();break;case 6:m.warn_message_acknowledged=r.bool();break;case 7:m.was_suspended=r.bool();break;case 8:m.suspended_message_acknowledged=r.bool();break;case 9:m.warn_expire_ms=r.int64();break;case 10:if(!(m.user_permission&&m.user_permission.length))m.user_permission=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.user_permission.push(r.int32())}else m.user_permission.push(r.int32());break;default:r.skipType(t&7);break}}return m};GetPlayerResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetPlayerResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetPlayerResponse;if(d.success!=null){m.success=Boolean(d.success)}if(d.player_data!=null){if(typeof d.player_data!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetPlayerResponse.player_data: object expected");m.player_data=$root.POGOProtos.Data.PlayerData.fromObject(d.player_data)}if(d.banned!=null){m.banned=Boolean(d.banned)}if(d.warn!=null){m.warn=Boolean(d.warn)}if(d.was_created!=null){m.was_created=Boolean(d.was_created)}if(d.warn_message_acknowledged!=null){m.warn_message_acknowledged=Boolean(d.warn_message_acknowledged)}if(d.was_suspended!=null){m.was_suspended=Boolean(d.was_suspended)}if(d.suspended_message_acknowledged!=null){m.suspended_message_acknowledged=Boolean(d.suspended_message_acknowledged)}if(d.warn_expire_ms!=null){if($util.Long)(m.warn_expire_ms=$util.Long.fromValue(d.warn_expire_ms)).unsigned=false;else if(typeof d.warn_expire_ms==="string")m.warn_expire_ms=parseInt(d.warn_expire_ms,10);else if(typeof d.warn_expire_ms==="number")m.warn_expire_ms=d.warn_expire_ms;else if(typeof d.warn_expire_ms==="object")m.warn_expire_ms=new $util.LongBits(d.warn_expire_ms.low>>>0,d.warn_expire_ms.high>>>0).toNumber()}if(d.user_permission){if(!Array.isArray(d.user_permission))throw TypeError(".POGOProtos.Networking.Responses.GetPlayerResponse.user_permission: array expected");m.user_permission=[];for(var i=0;i<d.user_permission.length;++i){m.user_permission[i]=d.user_permission[i]|0}}return m};GetPlayerResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.user_permission=[]}if(o.defaults){d.success=false;d.player_data=null;d.banned=false;d.warn=false;d.was_created=false;d.warn_message_acknowledged=false;d.was_suspended=false;d.suspended_message_acknowledged=false;if($util.Long){var n=new $util.Long(0,0,false);d.warn_expire_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.warn_expire_ms=o.longs===String?"0":0}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.player_data!=null&&m.hasOwnProperty("player_data")){d.player_data=$root.POGOProtos.Data.PlayerData.toObject(m.player_data,o)}if(m.banned!=null&&m.hasOwnProperty("banned")){d.banned=m.banned}if(m.warn!=null&&m.hasOwnProperty("warn")){d.warn=m.warn}if(m.was_created!=null&&m.hasOwnProperty("was_created")){d.was_created=m.was_created}if(m.warn_message_acknowledged!=null&&m.hasOwnProperty("warn_message_acknowledged")){d.warn_message_acknowledged=m.warn_message_acknowledged}if(m.was_suspended!=null&&m.hasOwnProperty("was_suspended")){d.was_suspended=m.was_suspended}if(m.suspended_message_acknowledged!=null&&m.hasOwnProperty("suspended_message_acknowledged")){d.suspended_message_acknowledged=m.suspended_message_acknowledged}if(m.warn_expire_ms!=null&&m.hasOwnProperty("warn_expire_ms")){if(typeof m.warn_expire_ms==="number")d.warn_expire_ms=o.longs===String?String(m.warn_expire_ms):m.warn_expire_ms;else d.warn_expire_ms=o.longs===String?$util.Long.prototype.toString.call(m.warn_expire_ms):o.longs===Number?new $util.LongBits(m.warn_expire_ms.low>>>0,m.warn_expire_ms.high>>>0).toNumber():m.warn_expire_ms}if(m.user_permission&&m.user_permission.length){d.user_permission=[];for(var j=0;j<m.user_permission.length;++j){d.user_permission[j]=m.user_permission[j]}}return d};GetPlayerResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetPlayerResponse}();Responses.GetQuestDetailsResponse=function(){function GetQuestDetailsResponse(p){this.quests=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetQuestDetailsResponse.prototype.status=0;GetQuestDetailsResponse.prototype.quests=$util.emptyArray;GetQuestDetailsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.quests!=null&&m.quests.length){for(var i=0;i<m.quests.length;++i)$root.POGOProtos.Data.Quests.ClientQuest.encode(m.quests[i],w.uint32(18).fork()).ldelim()}return w};GetQuestDetailsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetQuestDetailsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:if(!(m.quests&&m.quests.length))m.quests=[];m.quests.push($root.POGOProtos.Data.Quests.ClientQuest.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};GetQuestDetailsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetQuestDetailsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetQuestDetailsResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"ERROR_QUEST_NOT_FOUND":case 2:m.status=2;break;case"ERROR_INVALID_DISPLAY":case 3:m.status=3;break}if(d.quests){if(!Array.isArray(d.quests))throw TypeError(".POGOProtos.Networking.Responses.GetQuestDetailsResponse.quests: array expected");m.quests=[];for(var i=0;i<d.quests.length;++i){if(typeof d.quests[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetQuestDetailsResponse.quests: object expected");m.quests[i]=$root.POGOProtos.Data.Quests.ClientQuest.fromObject(d.quests[i])}}return m};GetQuestDetailsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.quests=[]}if(o.defaults){d.status=o.enums===String?"UNSET":0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.GetQuestDetailsResponse.Status[m.status]:m.status}if(m.quests&&m.quests.length){d.quests=[];for(var j=0;j<m.quests.length;++j){d.quests[j]=$root.POGOProtos.Data.Quests.ClientQuest.toObject(m.quests[j],o)}}return d};GetQuestDetailsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetQuestDetailsResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_QUEST_NOT_FOUND"]=2;values[valuesById[3]="ERROR_INVALID_DISPLAY"]=3;return values}();return GetQuestDetailsResponse}();Responses.GetRaidDetailsResponse=function(){function GetRaidDetailsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetRaidDetailsResponse.prototype.lobby=null;GetRaidDetailsResponse.prototype.raid_battle=null;GetRaidDetailsResponse.prototype.player_can_join_lobby=false;GetRaidDetailsResponse.prototype.result=0;GetRaidDetailsResponse.prototype.raid_info=null;GetRaidDetailsResponse.prototype.ticket_used=false;GetRaidDetailsResponse.prototype.free_ticket_available=false;GetRaidDetailsResponse.prototype.throws_remaining=0;GetRaidDetailsResponse.prototype.received_rewards=false;GetRaidDetailsResponse.prototype.num_players_in_lobby=0;GetRaidDetailsResponse.prototype.server_ms=$util.Long?$util.Long.fromBits(0,0,false):0;GetRaidDetailsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.lobby!=null&&m.hasOwnProperty("lobby"))$root.POGOProtos.Data.Raid.Lobby.encode(m.lobby,w.uint32(10).fork()).ldelim();if(m.raid_battle!=null&&m.hasOwnProperty("raid_battle"))$root.POGOProtos.Data.Battle.Battle.encode(m.raid_battle,w.uint32(18).fork()).ldelim();if(m.player_can_join_lobby!=null&&m.hasOwnProperty("player_can_join_lobby"))w.uint32(24).bool(m.player_can_join_lobby);if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(32).int32(m.result);if(m.raid_info!=null&&m.hasOwnProperty("raid_info"))$root.POGOProtos.Data.Raid.RaidInfo.encode(m.raid_info,w.uint32(42).fork()).ldelim();if(m.ticket_used!=null&&m.hasOwnProperty("ticket_used"))w.uint32(48).bool(m.ticket_used);if(m.free_ticket_available!=null&&m.hasOwnProperty("free_ticket_available"))w.uint32(56).bool(m.free_ticket_available);if(m.throws_remaining!=null&&m.hasOwnProperty("throws_remaining"))w.uint32(64).int32(m.throws_remaining);if(m.received_rewards!=null&&m.hasOwnProperty("received_rewards"))w.uint32(72).bool(m.received_rewards);if(m.num_players_in_lobby!=null&&m.hasOwnProperty("num_players_in_lobby"))w.uint32(80).int32(m.num_players_in_lobby);if(m.server_ms!=null&&m.hasOwnProperty("server_ms"))w.uint32(88).int64(m.server_ms);return w};GetRaidDetailsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetRaidDetailsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.lobby=$root.POGOProtos.Data.Raid.Lobby.decode(r,r.uint32());break;case 2:m.raid_battle=$root.POGOProtos.Data.Battle.Battle.decode(r,r.uint32());break;case 3:m.player_can_join_lobby=r.bool();break;case 4:m.result=r.int32();break;case 5:m.raid_info=$root.POGOProtos.Data.Raid.RaidInfo.decode(r,r.uint32());break;case 6:m.ticket_used=r.bool();break;case 7:m.free_ticket_available=r.bool();break;case 8:m.throws_remaining=r.int32();break;case 9:m.received_rewards=r.bool();break;case 10:m.num_players_in_lobby=r.int32();break;case 11:m.server_ms=r.int64();break;default:r.skipType(t&7);break}}return m};GetRaidDetailsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetRaidDetailsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetRaidDetailsResponse;if(d.lobby!=null){if(typeof d.lobby!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetRaidDetailsResponse.lobby: object expected");m.lobby=$root.POGOProtos.Data.Raid.Lobby.fromObject(d.lobby)}if(d.raid_battle!=null){if(typeof d.raid_battle!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetRaidDetailsResponse.raid_battle: object expected");m.raid_battle=$root.POGOProtos.Data.Battle.Battle.fromObject(d.raid_battle)}if(d.player_can_join_lobby!=null){m.player_can_join_lobby=Boolean(d.player_can_join_lobby)}switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_NOT_IN_RANGE":case 2:m.result=2;break;case"ERROR_RAID_COMPLETED":case 3:m.result=3;break;case"ERROR_RAID_UNAVAILABLE":case 4:m.result=4;break;case"ERROR_PLAYER_BELOW_MINIMUM_LEVEL":case 5:m.result=5;break;case"ERROR_POI_INACCESSIBLE":case 6:m.result=6;break}if(d.raid_info!=null){if(typeof d.raid_info!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetRaidDetailsResponse.raid_info: object expected");m.raid_info=$root.POGOProtos.Data.Raid.RaidInfo.fromObject(d.raid_info)}if(d.ticket_used!=null){m.ticket_used=Boolean(d.ticket_used)}if(d.free_ticket_available!=null){m.free_ticket_available=Boolean(d.free_ticket_available)}if(d.throws_remaining!=null){m.throws_remaining=d.throws_remaining|0}if(d.received_rewards!=null){m.received_rewards=Boolean(d.received_rewards)}if(d.num_players_in_lobby!=null){m.num_players_in_lobby=d.num_players_in_lobby|0}if(d.server_ms!=null){if($util.Long)(m.server_ms=$util.Long.fromValue(d.server_ms)).unsigned=false;else if(typeof d.server_ms==="string")m.server_ms=parseInt(d.server_ms,10);else if(typeof d.server_ms==="number")m.server_ms=d.server_ms;else if(typeof d.server_ms==="object")m.server_ms=new $util.LongBits(d.server_ms.low>>>0,d.server_ms.high>>>0).toNumber()}return m};GetRaidDetailsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.lobby=null;d.raid_battle=null;d.player_can_join_lobby=false;d.result=o.enums===String?"UNSET":0;d.raid_info=null;d.ticket_used=false;d.free_ticket_available=false;d.throws_remaining=0;d.received_rewards=false;d.num_players_in_lobby=0;if($util.Long){var n=new $util.Long(0,0,false);d.server_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.server_ms=o.longs===String?"0":0}if(m.lobby!=null&&m.hasOwnProperty("lobby")){d.lobby=$root.POGOProtos.Data.Raid.Lobby.toObject(m.lobby,o)}if(m.raid_battle!=null&&m.hasOwnProperty("raid_battle")){d.raid_battle=$root.POGOProtos.Data.Battle.Battle.toObject(m.raid_battle,o)}if(m.player_can_join_lobby!=null&&m.hasOwnProperty("player_can_join_lobby")){d.player_can_join_lobby=m.player_can_join_lobby}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetRaidDetailsResponse.Result[m.result]:m.result}if(m.raid_info!=null&&m.hasOwnProperty("raid_info")){d.raid_info=$root.POGOProtos.Data.Raid.RaidInfo.toObject(m.raid_info,o)}if(m.ticket_used!=null&&m.hasOwnProperty("ticket_used")){d.ticket_used=m.ticket_used}if(m.free_ticket_available!=null&&m.hasOwnProperty("free_ticket_available")){d.free_ticket_available=m.free_ticket_available}if(m.throws_remaining!=null&&m.hasOwnProperty("throws_remaining")){d.throws_remaining=m.throws_remaining}if(m.received_rewards!=null&&m.hasOwnProperty("received_rewards")){d.received_rewards=m.received_rewards}if(m.num_players_in_lobby!=null&&m.hasOwnProperty("num_players_in_lobby")){d.num_players_in_lobby=m.num_players_in_lobby}if(m.server_ms!=null&&m.hasOwnProperty("server_ms")){if(typeof m.server_ms==="number")d.server_ms=o.longs===String?String(m.server_ms):m.server_ms;else d.server_ms=o.longs===String?$util.Long.prototype.toString.call(m.server_ms):o.longs===Number?new $util.LongBits(m.server_ms.low>>>0,m.server_ms.high>>>0).toNumber():m.server_ms}return d};GetRaidDetailsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetRaidDetailsResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_NOT_IN_RANGE"]=2;values[valuesById[3]="ERROR_RAID_COMPLETED"]=3;values[valuesById[4]="ERROR_RAID_UNAVAILABLE"]=4;values[valuesById[5]="ERROR_PLAYER_BELOW_MINIMUM_LEVEL"]=5;values[valuesById[6]="ERROR_POI_INACCESSIBLE"]=6;return values}();return GetRaidDetailsResponse}();Responses.GetSignedGmapUrlResponse=function(){function GetSignedGmapUrlResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetSignedGmapUrlResponse.prototype.result=0;GetSignedGmapUrlResponse.prototype.signed_url="";GetSignedGmapUrlResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.signed_url!=null&&m.hasOwnProperty("signed_url"))w.uint32(18).string(m.signed_url);return w};GetSignedGmapUrlResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetSignedGmapUrlResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.signed_url=r.string();break;default:r.skipType(t&7);break}}return m};GetSignedGmapUrlResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetSignedGmapUrlResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetSignedGmapUrlResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_PLAYER_NOT_VALID":case 2:m.result=2;break;case"ERROR_RATE_LIMITED":case 3:m.result=3;break;case"ERROR_MISSING_INPUT":case 4:m.result=4;break;case"ERROR_UNKNOWN":case 5:m.result=5;break}if(d.signed_url!=null){m.signed_url=String(d.signed_url)}return m};GetSignedGmapUrlResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.signed_url=""}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetSignedGmapUrlResponse.Result[m.result]:m.result}if(m.signed_url!=null&&m.hasOwnProperty("signed_url")){d.signed_url=m.signed_url}return d};GetSignedGmapUrlResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetSignedGmapUrlResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_PLAYER_NOT_VALID"]=2;values[valuesById[3]="ERROR_RATE_LIMITED"]=3;values[valuesById[4]="ERROR_MISSING_INPUT"]=4;values[valuesById[5]="ERROR_UNKNOWN"]=5;return values}();return GetSignedGmapUrlResponse}();Responses.GetTradingResponse=function(){function GetTradingResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetTradingResponse.prototype.result=0;GetTradingResponse.prototype.trading=null;GetTradingResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.trading!=null&&m.hasOwnProperty("trading"))$root.POGOProtos.Data.Trading.Trading.encode(m.trading,w.uint32(18).fork()).ldelim();return w};GetTradingResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetTradingResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.trading=$root.POGOProtos.Data.Trading.Trading.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GetTradingResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetTradingResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetTradingResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_FRIEND_NOT_FOUND":case 3:m.result=3;break;case"ERROR_INVALID_PLAYER_ID":case 4:m.result=4;break;case"ERROR_INVALID_STATE":case 5:m.result=5;break;case"ERROR_STATE_HANDLER":case 6:m.result=6;break}if(d.trading!=null){if(typeof d.trading!=="object")throw TypeError(".POGOProtos.Networking.Responses.GetTradingResponse.trading: object expected");m.trading=$root.POGOProtos.Data.Trading.Trading.fromObject(d.trading)}return m};GetTradingResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.trading=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetTradingResponse.Result[m.result]:m.result}if(m.trading!=null&&m.hasOwnProperty("trading")){d.trading=$root.POGOProtos.Data.Trading.Trading.toObject(m.trading,o)}return d};GetTradingResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetTradingResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_FRIEND_NOT_FOUND"]=3;values[valuesById[4]="ERROR_INVALID_PLAYER_ID"]=4;values[valuesById[5]="ERROR_INVALID_STATE"]=5;values[valuesById[6]="ERROR_STATE_HANDLER"]=6;return values}();return GetTradingResponse}();Responses.GetTutorialEggActionResponse=function(){function GetTutorialEggActionResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetTutorialEggActionResponse.prototype.result=0;GetTutorialEggActionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};GetTutorialEggActionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetTutorialEggActionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};GetTutorialEggActionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetTutorialEggActionResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetTutorialEggActionResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_PLAYER_ALREADY_HAS_TUTORIAL_EGG":case 2:m.result=2;break;case"ERROR_FAILED_TO_ADD_EGG":case 3:m.result=3;break;case"ERROR_NOT_V2_FLOW":case 4:m.result=4;break}return m};GetTutorialEggActionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GetTutorialEggActionResponse.Result[m.result]:m.result}return d};GetTutorialEggActionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetTutorialEggActionResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_PLAYER_ALREADY_HAS_TUTORIAL_EGG"]=2;values[valuesById[3]="ERROR_FAILED_TO_ADD_EGG"]=3;values[valuesById[4]="ERROR_NOT_V2_FLOW"]=4;return values}();return GetTutorialEggActionResponse}();Responses.GetUploadUrlResponse=function(){function GetUploadUrlResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetUploadUrlResponse.prototype.status=0;GetUploadUrlResponse.prototype.signed_url="";GetUploadUrlResponse.prototype.supporting_image_signed_url="";GetUploadUrlResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.signed_url!=null&&m.hasOwnProperty("signed_url"))w.uint32(18).string(m.signed_url);if(m.supporting_image_signed_url!=null&&m.hasOwnProperty("supporting_image_signed_url"))w.uint32(26).string(m.supporting_image_signed_url);return w};GetUploadUrlResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetUploadUrlResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.signed_url=r.string();break;case 3:m.supporting_image_signed_url=r.string();break;default:r.skipType(t&7);break}}return m};GetUploadUrlResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetUploadUrlResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetUploadUrlResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"FAILURES":case 1:m.status=1;break;case"SUCCESS":case 2:m.status=2;break}if(d.signed_url!=null){m.signed_url=String(d.signed_url)}if(d.supporting_image_signed_url!=null){m.supporting_image_signed_url=String(d.supporting_image_signed_url)}return m};GetUploadUrlResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0;d.signed_url="";d.supporting_image_signed_url=""}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.GetUploadUrlResponse.Status[m.status]:m.status}if(m.signed_url!=null&&m.hasOwnProperty("signed_url")){d.signed_url=m.signed_url}if(m.supporting_image_signed_url!=null&&m.hasOwnProperty("supporting_image_signed_url")){d.supporting_image_signed_url=m.supporting_image_signed_url}return d};GetUploadUrlResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetUploadUrlResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="FAILURES"]=1;values[valuesById[2]="SUCCESS"]=2;return values}();return GetUploadUrlResponse}();Responses.GiftDetailsResponse=function(){function GiftDetailsResponse(p){this.gift_boxes=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GiftDetailsResponse.prototype.result=0;GiftDetailsResponse.prototype.gift_boxes=$util.emptyArray;GiftDetailsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.gift_boxes!=null&&m.gift_boxes.length){for(var i=0;i<m.gift_boxes.length;++i)$root.POGOProtos.Data.Gift.GiftBoxDetails.encode(m.gift_boxes[i],w.uint32(18).fork()).ldelim()}return w};GiftDetailsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GiftDetailsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.gift_boxes&&m.gift_boxes.length))m.gift_boxes=[];m.gift_boxes.push($root.POGOProtos.Data.Gift.GiftBoxDetails.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};GiftDetailsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GiftDetailsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GiftDetailsResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_GIFT_DOES_NOT_EXIST":case 3:m.result=3;break;case"ERROR_INVALID_PLAYER_ID":case 4:m.result=4;break;case"ERROR_FRIEND_NOT_FOUND":case 5:m.result=5;break;case"ERROR_FORT_SEARCH":case 6:m.result=6;break}if(d.gift_boxes){if(!Array.isArray(d.gift_boxes))throw TypeError(".POGOProtos.Networking.Responses.GiftDetailsResponse.gift_boxes: array expected");m.gift_boxes=[];for(var i=0;i<d.gift_boxes.length;++i){if(typeof d.gift_boxes[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.GiftDetailsResponse.gift_boxes: object expected");m.gift_boxes[i]=$root.POGOProtos.Data.Gift.GiftBoxDetails.fromObject(d.gift_boxes[i])}}return m};GiftDetailsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.gift_boxes=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GiftDetailsResponse.Result[m.result]:m.result}if(m.gift_boxes&&m.gift_boxes.length){d.gift_boxes=[];for(var j=0;j<m.gift_boxes.length;++j){d.gift_boxes[j]=$root.POGOProtos.Data.Gift.GiftBoxDetails.toObject(m.gift_boxes[j],o)}}return d};GiftDetailsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GiftDetailsResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_GIFT_DOES_NOT_EXIST"]=3;values[valuesById[4]="ERROR_INVALID_PLAYER_ID"]=4;values[valuesById[5]="ERROR_FRIEND_NOT_FOUND"]=5;values[valuesById[6]="ERROR_FORT_SEARCH"]=6;return values}();return GiftDetailsResponse}();Responses.GymBattleAttackResponse=function(){function GymBattleAttackResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymBattleAttackResponse.prototype.result=0;GymBattleAttackResponse.prototype.battle_update=null;GymBattleAttackResponse.prototype.gym_badge=null;GymBattleAttackResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.battle_update!=null&&m.hasOwnProperty("battle_update"))$root.POGOProtos.Data.Battle.BattleUpdate.encode(m.battle_update,w.uint32(18).fork()).ldelim();if(m.gym_badge!=null&&m.hasOwnProperty("gym_badge"))$root.POGOProtos.Data.Badge.AwardedGymBadge.encode(m.gym_badge,w.uint32(26).fork()).ldelim();return w};GymBattleAttackResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GymBattleAttackResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.battle_update=$root.POGOProtos.Data.Battle.BattleUpdate.decode(r,r.uint32());break;case 3:m.gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GymBattleAttackResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GymBattleAttackResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GymBattleAttackResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALID_ATTACK_ACTIONS":case 2:m.result=2;break;case"ERROR_NOT_IN_RANGE":case 3:m.result=3;break;case"ERROR_WRONG_BATTLE_TYPE":case 4:m.result=4;break;case"ERROR_RAID_ACTIVE":case 5:m.result=5;break}if(d.battle_update!=null){if(typeof d.battle_update!=="object")throw TypeError(".POGOProtos.Networking.Responses.GymBattleAttackResponse.battle_update: object expected");m.battle_update=$root.POGOProtos.Data.Battle.BattleUpdate.fromObject(d.battle_update)}if(d.gym_badge!=null){if(typeof d.gym_badge!=="object")throw TypeError(".POGOProtos.Networking.Responses.GymBattleAttackResponse.gym_badge: object expected");m.gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.fromObject(d.gym_badge)}return m};GymBattleAttackResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.battle_update=null;d.gym_badge=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GymBattleAttackResponse.Result[m.result]:m.result}if(m.battle_update!=null&&m.hasOwnProperty("battle_update")){d.battle_update=$root.POGOProtos.Data.Battle.BattleUpdate.toObject(m.battle_update,o)}if(m.gym_badge!=null&&m.hasOwnProperty("gym_badge")){d.gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.toObject(m.gym_badge,o)}return d};GymBattleAttackResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GymBattleAttackResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_ATTACK_ACTIONS"]=2;values[valuesById[3]="ERROR_NOT_IN_RANGE"]=3;values[valuesById[4]="ERROR_WRONG_BATTLE_TYPE"]=4;values[valuesById[5]="ERROR_RAID_ACTIVE"]=5;return values}();return GymBattleAttackResponse}();Responses.GymDeployResponse=function(){function GymDeployResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymDeployResponse.prototype.result=0;GymDeployResponse.prototype.gym_status_and_defenders=null;GymDeployResponse.prototype.awarded_gym_badge=null;GymDeployResponse.prototype.cooldown_complete_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;GymDeployResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.gym_status_and_defenders!=null&&m.hasOwnProperty("gym_status_and_defenders"))$root.POGOProtos.Data.Gym.GymStatusAndDefenders.encode(m.gym_status_and_defenders,w.uint32(18).fork()).ldelim();if(m.awarded_gym_badge!=null&&m.hasOwnProperty("awarded_gym_badge"))$root.POGOProtos.Data.Badge.AwardedGymBadge.encode(m.awarded_gym_badge,w.uint32(26).fork()).ldelim();if(m.cooldown_complete_timestamp_ms!=null&&m.hasOwnProperty("cooldown_complete_timestamp_ms"))w.uint32(32).int64(m.cooldown_complete_timestamp_ms);return w};GymDeployResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GymDeployResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.gym_status_and_defenders=$root.POGOProtos.Data.Gym.GymStatusAndDefenders.decode(r,r.uint32());break;case 3:m.awarded_gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.decode(r,r.uint32());break;case 4:m.cooldown_complete_timestamp_ms=r.int64();break;default:r.skipType(t&7);break}}return m};GymDeployResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GymDeployResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GymDeployResponse;switch(d.result){case"NO_RESULT_SET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_ALREADY_HAS_POKEMON_ON_FORT":case 2:m.result=2;break;case"ERROR_OPPOSING_TEAM_OWNS_FORT":case 3:m.result=3;break;case"ERROR_FORT_IS_FULL":case 4:m.result=4;break;case"ERROR_NOT_IN_RANGE":case 5:m.result=5;break;case"ERROR_PLAYER_HAS_NO_TEAM":case 6:m.result=6;break;case"ERROR_POKEMON_NOT_FULL_HP":case 7:m.result=7;break;case"ERROR_PLAYER_BELOW_MINIMUM_LEVEL":case 8:m.result=8;break;case"ERROR_POKEMON_IS_BUDDY":case 9:m.result=9;break;case"ERROR_FORT_DEPLOY_LOCKOUT":case 10:m.result=10;break;case"ERROR_PLAYER_HAS_NO_NICKNAME":case 11:m.result=11;break;case"ERROR_POI_INACCESSIBLE":case 12:m.result=12;break;case"ERROR_NOT_A_POKEMON":case 13:m.result=13;break;case"ERROR_TOO_MANY_OF_SAME_KIND":case 14:m.result=14;break;case"ERROR_TOO_MANY_DEPLOYED":case 15:m.result=15;break;case"ERROR_TEAM_DEPLOY_LOCKOUT":case 16:m.result=16;break;case"ERROR_LEGENDARY_POKEMON":case 17:m.result=17;break;case"ERROR_INVALID_POKEMON":case 18:m.result=18;break;case"ERROR_RAID_ACTIVE":case 19:m.result=19;break}if(d.gym_status_and_defenders!=null){if(typeof d.gym_status_and_defenders!=="object")throw TypeError(".POGOProtos.Networking.Responses.GymDeployResponse.gym_status_and_defenders: object expected");m.gym_status_and_defenders=$root.POGOProtos.Data.Gym.GymStatusAndDefenders.fromObject(d.gym_status_and_defenders)}if(d.awarded_gym_badge!=null){if(typeof d.awarded_gym_badge!=="object")throw TypeError(".POGOProtos.Networking.Responses.GymDeployResponse.awarded_gym_badge: object expected");m.awarded_gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.fromObject(d.awarded_gym_badge)}if(d.cooldown_complete_timestamp_ms!=null){if($util.Long)(m.cooldown_complete_timestamp_ms=$util.Long.fromValue(d.cooldown_complete_timestamp_ms)).unsigned=false;else if(typeof d.cooldown_complete_timestamp_ms==="string")m.cooldown_complete_timestamp_ms=parseInt(d.cooldown_complete_timestamp_ms,10);else if(typeof d.cooldown_complete_timestamp_ms==="number")m.cooldown_complete_timestamp_ms=d.cooldown_complete_timestamp_ms;else if(typeof d.cooldown_complete_timestamp_ms==="object")m.cooldown_complete_timestamp_ms=new $util.LongBits(d.cooldown_complete_timestamp_ms.low>>>0,d.cooldown_complete_timestamp_ms.high>>>0).toNumber()}return m};GymDeployResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"NO_RESULT_SET":0;d.gym_status_and_defenders=null;d.awarded_gym_badge=null;if($util.Long){var n=new $util.Long(0,0,false);d.cooldown_complete_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.cooldown_complete_timestamp_ms=o.longs===String?"0":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GymDeployResponse.Result[m.result]:m.result}if(m.gym_status_and_defenders!=null&&m.hasOwnProperty("gym_status_and_defenders")){d.gym_status_and_defenders=$root.POGOProtos.Data.Gym.GymStatusAndDefenders.toObject(m.gym_status_and_defenders,o)}if(m.awarded_gym_badge!=null&&m.hasOwnProperty("awarded_gym_badge")){d.awarded_gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.toObject(m.awarded_gym_badge,o)}if(m.cooldown_complete_timestamp_ms!=null&&m.hasOwnProperty("cooldown_complete_timestamp_ms")){if(typeof m.cooldown_complete_timestamp_ms==="number")d.cooldown_complete_timestamp_ms=o.longs===String?String(m.cooldown_complete_timestamp_ms):m.cooldown_complete_timestamp_ms;else d.cooldown_complete_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.cooldown_complete_timestamp_ms):o.longs===Number?new $util.LongBits(m.cooldown_complete_timestamp_ms.low>>>0,m.cooldown_complete_timestamp_ms.high>>>0).toNumber():m.cooldown_complete_timestamp_ms}return d};GymDeployResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GymDeployResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NO_RESULT_SET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_ALREADY_HAS_POKEMON_ON_FORT"]=2;values[valuesById[3]="ERROR_OPPOSING_TEAM_OWNS_FORT"]=3;values[valuesById[4]="ERROR_FORT_IS_FULL"]=4;values[valuesById[5]="ERROR_NOT_IN_RANGE"]=5;values[valuesById[6]="ERROR_PLAYER_HAS_NO_TEAM"]=6;values[valuesById[7]="ERROR_POKEMON_NOT_FULL_HP"]=7;values[valuesById[8]="ERROR_PLAYER_BELOW_MINIMUM_LEVEL"]=8;values[valuesById[9]="ERROR_POKEMON_IS_BUDDY"]=9;values[valuesById[10]="ERROR_FORT_DEPLOY_LOCKOUT"]=10;values[valuesById[11]="ERROR_PLAYER_HAS_NO_NICKNAME"]=11;values[valuesById[12]="ERROR_POI_INACCESSIBLE"]=12;values[valuesById[13]="ERROR_NOT_A_POKEMON"]=13;values[valuesById[14]="ERROR_TOO_MANY_OF_SAME_KIND"]=14;values[valuesById[15]="ERROR_TOO_MANY_DEPLOYED"]=15;values[valuesById[16]="ERROR_TEAM_DEPLOY_LOCKOUT"]=16;values[valuesById[17]="ERROR_LEGENDARY_POKEMON"]=17;values[valuesById[18]="ERROR_INVALID_POKEMON"]=18;values[valuesById[19]="ERROR_RAID_ACTIVE"]=19;return values}();return GymDeployResponse}();Responses.GymFeedPokemonResponse=function(){function GymFeedPokemonResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymFeedPokemonResponse.prototype.result=0;GymFeedPokemonResponse.prototype.gym_status_and_defenders=null;GymFeedPokemonResponse.prototype.awarded_gym_badge=null;GymFeedPokemonResponse.prototype.stardust_awarded=0;GymFeedPokemonResponse.prototype.xp_awarded=0;GymFeedPokemonResponse.prototype.num_candy_awarded=0;GymFeedPokemonResponse.prototype.family_candy_id=0;GymFeedPokemonResponse.prototype.cooldown_complete=$util.Long?$util.Long.fromBits(0,0,false):0;GymFeedPokemonResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.gym_status_and_defenders!=null&&m.hasOwnProperty("gym_status_and_defenders"))$root.POGOProtos.Data.Gym.GymStatusAndDefenders.encode(m.gym_status_and_defenders,w.uint32(18).fork()).ldelim();if(m.awarded_gym_badge!=null&&m.hasOwnProperty("awarded_gym_badge"))$root.POGOProtos.Data.Badge.AwardedGymBadge.encode(m.awarded_gym_badge,w.uint32(26).fork()).ldelim();if(m.stardust_awarded!=null&&m.hasOwnProperty("stardust_awarded"))w.uint32(32).int32(m.stardust_awarded);if(m.xp_awarded!=null&&m.hasOwnProperty("xp_awarded"))w.uint32(40).int32(m.xp_awarded);if(m.num_candy_awarded!=null&&m.hasOwnProperty("num_candy_awarded"))w.uint32(48).int32(m.num_candy_awarded);if(m.family_candy_id!=null&&m.hasOwnProperty("family_candy_id"))w.uint32(56).int32(m.family_candy_id);if(m.cooldown_complete!=null&&m.hasOwnProperty("cooldown_complete"))w.uint32(64).int64(m.cooldown_complete);return w};GymFeedPokemonResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GymFeedPokemonResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.gym_status_and_defenders=$root.POGOProtos.Data.Gym.GymStatusAndDefenders.decode(r,r.uint32());break;case 3:m.awarded_gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.decode(r,r.uint32());break;case 4:m.stardust_awarded=r.int32();break;case 5:m.xp_awarded=r.int32();break;case 6:m.num_candy_awarded=r.int32();break;case 7:m.family_candy_id=r.int32();break;case 8:m.cooldown_complete=r.int64();break;default:r.skipType(t&7);break}}return m};GymFeedPokemonResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GymFeedPokemonResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GymFeedPokemonResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_CANNOT_USE":case 2:m.result=2;break;case"ERROR_NOT_IN_RANGE":case 3:m.result=3;break;case"ERROR_POKEMON_NOT_THERE":case 4:m.result=4;break;case"ERROR_POKEMON_FULL":case 5:m.result=5;break;case"ERROR_NO_BERRIES_LEFT":case 6:m.result=6;break;case"ERROR_WRONG_TEAM":case 7:m.result=7;break;case"ERROR_WRONG_COUNT":case 8:m.result=8;break;case"ERROR_TOO_FAST":case 9:m.result=9;break;case"ERROR_TOO_FREQUENT":case 10:m.result=10;break;case"ERROR_GYM_BUSY":case 11:m.result=11;break;case"ERROR_RAID_ACTIVE":case 12:m.result=12;break;case"ERROR_GYM_CLOSED":case 13:m.result=13;break}if(d.gym_status_and_defenders!=null){if(typeof d.gym_status_and_defenders!=="object")throw TypeError(".POGOProtos.Networking.Responses.GymFeedPokemonResponse.gym_status_and_defenders: object expected");m.gym_status_and_defenders=$root.POGOProtos.Data.Gym.GymStatusAndDefenders.fromObject(d.gym_status_and_defenders)}if(d.awarded_gym_badge!=null){if(typeof d.awarded_gym_badge!=="object")throw TypeError(".POGOProtos.Networking.Responses.GymFeedPokemonResponse.awarded_gym_badge: object expected");m.awarded_gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.fromObject(d.awarded_gym_badge)}if(d.stardust_awarded!=null){m.stardust_awarded=d.stardust_awarded|0}if(d.xp_awarded!=null){m.xp_awarded=d.xp_awarded|0}if(d.num_candy_awarded!=null){m.num_candy_awarded=d.num_candy_awarded|0}switch(d.family_candy_id){case"FAMILY_UNSET":case 0:m.family_candy_id=0;break;case"FAMILY_BULBASAUR":case 1:m.family_candy_id=1;break;case"FAMILY_CHARMANDER":case 4:m.family_candy_id=4;break;case"FAMILY_SQUIRTLE":case 7:m.family_candy_id=7;break;case"FAMILY_CATERPIE":case 10:m.family_candy_id=10;break;case"FAMILY_WEEDLE":case 13:m.family_candy_id=13;break;case"FAMILY_PIDGEY":case 16:m.family_candy_id=16;break;case"FAMILY_RATTATA":case 19:m.family_candy_id=19;break;case"FAMILY_SPEAROW":case 21:m.family_candy_id=21;break;case"FAMILY_EKANS":case 23:m.family_candy_id=23;break;case"FAMILY_PIKACHU":case 25:m.family_candy_id=25;break;case"FAMILY_SANDSHREW":case 27:m.family_candy_id=27;break;case"FAMILY_NIDORAN_FEMALE":case 29:m.family_candy_id=29;break;case"FAMILY_NIDORAN_MALE":case 32:m.family_candy_id=32;break;case"FAMILY_CLEFAIRY":case 35:m.family_candy_id=35;break;case"FAMILY_VULPIX":case 37:m.family_candy_id=37;break;case"FAMILY_JIGGLYPUFF":case 39:m.family_candy_id=39;break;case"FAMILY_ZUBAT":case 41:m.family_candy_id=41;break;case"FAMILY_ODDISH":case 43:m.family_candy_id=43;break;case"FAMILY_PARAS":case 46:m.family_candy_id=46;break;case"FAMILY_VENONAT":case 48:m.family_candy_id=48;break;case"FAMILY_DIGLETT":case 50:m.family_candy_id=50;break;case"FAMILY_MEOWTH":case 52:m.family_candy_id=52;break;case"FAMILY_PSYDUCK":case 54:m.family_candy_id=54;break;case"FAMILY_MANKEY":case 56:m.family_candy_id=56;break;case"FAMILY_GROWLITHE":case 58:m.family_candy_id=58;break;case"FAMILY_POLIWAG":case 60:m.family_candy_id=60;break;case"FAMILY_ABRA":case 63:m.family_candy_id=63;break;case"FAMILY_MACHOP":case 66:m.family_candy_id=66;break;case"FAMILY_BELLSPROUT":case 69:m.family_candy_id=69;break;case"FAMILY_TENTACOOL":case 72:m.family_candy_id=72;break;case"FAMILY_GEODUDE":case 74:m.family_candy_id=74;break;case"FAMILY_PONYTA":case 77:m.family_candy_id=77;break;case"FAMILY_SLOWPOKE":case 79:m.family_candy_id=79;break;case"FAMILY_MAGNEMITE":case 81:m.family_candy_id=81;break;case"FAMILY_FARFETCHD":case 83:m.family_candy_id=83;break;case"FAMILY_DODUO":case 84:m.family_candy_id=84;break;case"FAMILY_SEEL":case 86:m.family_candy_id=86;break;case"FAMILY_GRIMER":case 88:m.family_candy_id=88;break;case"FAMILY_SHELLDER":case 90:m.family_candy_id=90;break;case"FAMILY_GASTLY":case 92:m.family_candy_id=92;break;case"FAMILY_ONIX":case 95:m.family_candy_id=95;break;case"FAMILY_DROWZEE":case 96:m.family_candy_id=96;break;case"FAMILY_HYPNO":case 97:m.family_candy_id=97;break;case"FAMILY_KRABBY":case 98:m.family_candy_id=98;break;case"FAMILY_VOLTORB":case 100:m.family_candy_id=100;break;case"FAMILY_EXEGGCUTE":case 102:m.family_candy_id=102;break;case"FAMILY_CUBONE":case 104:m.family_candy_id=104;break;case"FAMILY_HITMONLEE":case 106:m.family_candy_id=106;break;case"FAMILY_HITMONCHAN":case 107:m.family_candy_id=107;break;case"FAMILY_LICKITUNG":case 108:m.family_candy_id=108;break;case"FAMILY_KOFFING":case 109:m.family_candy_id=109;break;case"FAMILY_RHYHORN":case 111:m.family_candy_id=111;break;case"FAMILY_CHANSEY":case 113:m.family_candy_id=113;break;case"FAMILY_TANGELA":case 114:m.family_candy_id=114;break;case"FAMILY_KANGASKHAN":case 115:m.family_candy_id=115;break;case"FAMILY_HORSEA":case 116:m.family_candy_id=116;break;case"FAMILY_GOLDEEN":case 118:m.family_candy_id=118;break;case"FAMILY_STARYU":case 120:m.family_candy_id=120;break;case"FAMILY_MR_MIME":case 122:m.family_candy_id=122;break;case"FAMILY_SCYTHER":case 123:m.family_candy_id=123;break;case"FAMILY_JYNX":case 124:m.family_candy_id=124;break;case"FAMILY_ELECTABUZZ":case 125:m.family_candy_id=125;break;case"FAMILY_MAGMAR":case 126:m.family_candy_id=126;break;case"FAMILY_PINSIR":case 127:m.family_candy_id=127;break;case"FAMILY_TAUROS":case 128:m.family_candy_id=128;break;case"FAMILY_MAGIKARP":case 129:m.family_candy_id=129;break;case"FAMILY_LAPRAS":case 131:m.family_candy_id=131;break;case"FAMILY_DITTO":case 132:m.family_candy_id=132;break;case"FAMILY_EEVEE":case 133:m.family_candy_id=133;break;case"FAMILY_PORYGON":case 137:m.family_candy_id=137;break;case"FAMILY_OMANYTE":case 138:m.family_candy_id=138;break;case"FAMILY_KABUTO":case 140:m.family_candy_id=140;break;case"FAMILY_AERODACTYL":case 142:m.family_candy_id=142;break;case"FAMILY_SNORLAX":case 143:m.family_candy_id=143;break;case"FAMILY_ARTICUNO":case 144:m.family_candy_id=144;break;case"FAMILY_ZAPDOS":case 145:m.family_candy_id=145;break;case"FAMILY_MOLTRES":case 146:m.family_candy_id=146;break;case"FAMILY_DRATINI":case 147:m.family_candy_id=147;break;case"FAMILY_MEWTWO":case 150:m.family_candy_id=150;break;case"FAMILY_MEW":case 151:m.family_candy_id=151;break;case"FAMILY_CHIKORITA":case 152:m.family_candy_id=152;break;case"FAMILY_CYNDAQUIL":case 155:m.family_candy_id=155;break;case"FAMILY_TOTODILE":case 158:m.family_candy_id=158;break;case"FAMILY_SENTRET":case 161:m.family_candy_id=161;break;case"FAMILY_HOOTHOOT":case 163:m.family_candy_id=163;break;case"FAMILY_LEDYBA":case 165:m.family_candy_id=165;break;case"FAMILY_SPINARAK":case 167:m.family_candy_id=167;break;case"FAMILY_CHINCHOU":case 170:m.family_candy_id=170;break;case"FAMILY_TOGEPI":case 175:m.family_candy_id=175;break;case"FAMILY_NATU":case 177:m.family_candy_id=177;break;case"FAMILY_MAREEP":case 179:m.family_candy_id=179;break;case"FAMILY_MARILL":case 183:m.family_candy_id=183;break;case"FAMILY_SUDOWOODO":case 185:m.family_candy_id=185;break;case"FAMILY_HOPPIP":case 187:m.family_candy_id=187;break;case"FAMILY_AIPOM":case 190:m.family_candy_id=190;break;case"FAMILY_SUNKERN":case 191:m.family_candy_id=191;break;case"FAMILY_YANMA":case 193:m.family_candy_id=193;break;case"FAMILY_WOOPER":case 194:m.family_candy_id=194;break;case"FAMILY_MURKROW":case 198:m.family_candy_id=198;break;case"FAMILY_MISDREAVUS":case 200:m.family_candy_id=200;break;case"FAMILY_UNOWN":case 201:m.family_candy_id=201;break;case"FAMILY_WOBBUFFET":case 202:m.family_candy_id=202;break;case"FAMILY_GIRAFARIG":case 203:m.family_candy_id=203;break;case"FAMILY_PINECO":case 204:m.family_candy_id=204;break;case"FAMILY_DUNSPARCE":case 206:m.family_candy_id=206;break;case"FAMILY_GLIGAR":case 207:m.family_candy_id=207;break;case"FAMILY_SNUBBULL":case 209:m.family_candy_id=209;break;case"FAMILY_QWILFISH":case 211:m.family_candy_id=211;break;case"FAMILY_SHUCKLE":case 213:m.family_candy_id=213;break;case"FAMILY_HERACROSS":case 214:m.family_candy_id=214;break;case"FAMILY_SNEASEL":case 215:m.family_candy_id=215;break;case"FAMILY_TEDDIURSA":case 216:m.family_candy_id=216;break;case"FAMILY_SLUGMA":case 218:m.family_candy_id=218;break;case"FAMILY_SWINUB":case 220:m.family_candy_id=220;break;case"FAMILY_CORSOLA":case 222:m.family_candy_id=222;break;case"FAMILY_REMORAID":case 223:m.family_candy_id=223;break;case"FAMILY_DELIBIRD":case 225:m.family_candy_id=225;break;case"FAMILY_MANTINE":case 226:m.family_candy_id=226;break;case"FAMILY_SKARMORY":case 227:m.family_candy_id=227;break;case"FAMILY_HOUNDOUR":case 228:m.family_candy_id=228;break;case"FAMILY_PHANPY":case 231:m.family_candy_id=231;break;case"FAMILY_STANTLER":case 234:m.family_candy_id=234;break;case"FAMILY_SMEARGLE":case 235:m.family_candy_id=235;break;case"FAMILY_TYROGUE":case 236:m.family_candy_id=236;break;case"FAMILY_MILTANK":case 241:m.family_candy_id=241;break;case"FAMILY_RAIKOU":case 243:m.family_candy_id=243;break;case"FAMILY_ENTEI":case 244:m.family_candy_id=244;break;case"FAMILY_SUICUNE":case 245:m.family_candy_id=245;break;case"FAMILY_LARVITAR":case 246:m.family_candy_id=246;break;case"FAMILY_LUGIA":case 249:m.family_candy_id=249;break;case"FAMILY_HO_OH":case 250:m.family_candy_id=250;break;case"FAMILY_CELEBI":case 251:m.family_candy_id=251;break;case"FAMILY_TREECKO":case 252:m.family_candy_id=252;break;case"FAMILY_TORCHIC":case 255:m.family_candy_id=255;break;case"FAMILY_MUDKIP":case 258:m.family_candy_id=258;break;case"FAMILY_POOCHYENA":case 261:m.family_candy_id=261;break;case"FAMILY_ZIGZAGOON":case 263:m.family_candy_id=263;break;case"FAMILY_WURMPLE":case 265:m.family_candy_id=265;break;case"FAMILY_LOTAD":case 270:m.family_candy_id=270;break;case"FAMILY_SEEDOT":case 273:m.family_candy_id=273;break;case"FAMILY_TAILLOW":case 276:m.family_candy_id=276;break;case"FAMILY_WINGULL":case 278:m.family_candy_id=278;break;case"FAMILY_RALTS":case 280:m.family_candy_id=280;break;case"FAMILY_SURSKIT":case 283:m.family_candy_id=283;break;case"FAMILY_SHROOMISH":case 285:m.family_candy_id=285;break;case"FAMILY_SLAKOTH":case 287:m.family_candy_id=287;break;case"FAMILY_NINCADA":case 290:m.family_candy_id=290;break;case"FAMILY_WHISMUR":case 293:m.family_candy_id=293;break;case"FAMILY_MAKUHITA":case 296:m.family_candy_id=296;break;case"FAMILY_NOSEPASS":case 299:m.family_candy_id=299;break;case"FAMILY_SKITTY":case 300:m.family_candy_id=300;break;case"FAMILY_SABLEYE":case 302:m.family_candy_id=302;break;case"FAMILY_MAWILE":case 303:m.family_candy_id=303;break;case"FAMILY_ARON":case 304:m.family_candy_id=304;break;case"FAMILY_MEDITITE":case 307:m.family_candy_id=307;break;case"FAMILY_ELECTRIKE":case 309:m.family_candy_id=309;break;case"FAMILY_PLUSLE":case 311:m.family_candy_id=311;break;case"FAMILY_MINUN":case 312:m.family_candy_id=312;break;case"FAMILY_VOLBEAT":case 313:m.family_candy_id=313;break;case"FAMILY_ILLUMISE":case 314:m.family_candy_id=314;break;case"FAMILY_ROSELIA":case 315:m.family_candy_id=315;break;case"FAMILY_GULPIN":case 316:m.family_candy_id=316;break;case"FAMILY_CARVANHA":case 318:m.family_candy_id=318;break;case"FAMILY_WAILMER":case 320:m.family_candy_id=320;break;case"FAMILY_NUMEL":case 322:m.family_candy_id=322;break;case"FAMILY_TORKOAL":case 324:m.family_candy_id=324;break;case"FAMILY_SPOINK":case 325:m.family_candy_id=325;break;case"FAMILY_SPINDA":case 327:m.family_candy_id=327;break;case"FAMILY_TRAPINCH":case 328:m.family_candy_id=328;break;case"FAMILY_CACNEA":case 331:m.family_candy_id=331;break;case"FAMILY_SWABLU":case 333:m.family_candy_id=333;break;case"FAMILY_ZANGOOSE":case 335:m.family_candy_id=335;break;case"FAMILY_SEVIPER":case 336:m.family_candy_id=336;break;case"FAMILY_LUNATONE":case 337:m.family_candy_id=337;break;case"FAMILY_SOLROCK":case 338:m.family_candy_id=338;break;case"FAMILY_BARBOACH":case 339:m.family_candy_id=339;break;case"FAMILY_CORPHISH":case 341:m.family_candy_id=341;break;case"FAMILY_BALTOY":case 343:m.family_candy_id=343;break;case"FAMILY_LILEEP":case 345:m.family_candy_id=345;break;case"FAMILY_ANORITH":case 347:m.family_candy_id=347;break;case"FAMILY_FEEBAS":case 349:m.family_candy_id=349;break;case"FAMILY_CASTFORM":case 351:m.family_candy_id=351;break;case"FAMILY_KECLEON":case 352:m.family_candy_id=352;break;case"FAMILY_SHUPPET":case 353:m.family_candy_id=353;break;case"FAMILY_DUSKULL":case 355:m.family_candy_id=355;break;case"FAMILY_TROPIUS":case 357:m.family_candy_id=357;break;case"FAMILY_CHIMECHO":case 358:m.family_candy_id=358;break;case"FAMILY_ABSOL":case 359:m.family_candy_id=359;break;case"FAMILY_SNORUNT":case 361:m.family_candy_id=361;break;case"FAMILY_SPHEAL":case 363:m.family_candy_id=363;break;case"FAMILY_CLAMPERL":case 366:m.family_candy_id=366;break;case"FAMILY_RELICANTH":case 369:m.family_candy_id=369;break;case"FAMILY_LUVDISC":case 370:m.family_candy_id=370;break;case"FAMILY_BAGON":case 371:m.family_candy_id=371;break;case"FAMILY_BELDUM":case 374:m.family_candy_id=374;break;case"FAMILY_REGIROCK":case 377:m.family_candy_id=377;break;case"FAMILY_REGICE":case 378:m.family_candy_id=378;break;case"FAMILY_REGISTEEL":case 379:m.family_candy_id=379;break;case"FAMILY_LATIAS":case 380:m.family_candy_id=380;break;case"FAMILY_LATIOS":case 381:m.family_candy_id=381;break;case"FAMILY_KYOGRE":case 382:m.family_candy_id=382;break;case"FAMILY_GROUDON":case 383:m.family_candy_id=383;break;case"FAMILY_RAYQUAZA":case 384:m.family_candy_id=384;break;case"FAMILY_JIRACHI":case 385:m.family_candy_id=385;break;case"FAMILY_DEOXYS":case 386:m.family_candy_id=386;break;case"FAMILY_TURTWIG":case 387:m.family_candy_id=387;break;case"FAMILY_CHIMCHAR":case 390:m.family_candy_id=390;break;case"FAMILY_PIPLUP":case 393:m.family_candy_id=393;break;case"FAMILY_STARLY":case 396:m.family_candy_id=396;break;case"FAMILY_BIDOOF":case 399:m.family_candy_id=399;break;case"FAMILY_KRICKETOT":case 401:m.family_candy_id=401;break;case"FAMILY_SHINX":case 403:m.family_candy_id=403;break;case"FAMILY_CRANIDOS":case 408:m.family_candy_id=408;break;case"FAMILY_SHIELDON":case 410:m.family_candy_id=410;break;case"FAMILY_BURMY":case 412:m.family_candy_id=412;break;case"FAMILY_COMBEE":case 415:m.family_candy_id=415;break;case"FAMILY_PACHIRISU":case 417:m.family_candy_id=417;break;case"FAMILY_BUIZEL":case 418:m.family_candy_id=418;break;case"FAMILY_CHERUBI":case 420:m.family_candy_id=420;break;case"FAMILY_SHELLOS":case 422:m.family_candy_id=422;break;case"FAMILY_DRIFLOON":case 425:m.family_candy_id=425;break;case"FAMILY_BUNEARY":case 427:m.family_candy_id=427;break;case"FAMILY_GLAMEOW":case 431:m.family_candy_id=431;break;case"FAMILY_STUNKY":case 434:m.family_candy_id=434;break;case"FAMILY_BRONZOR":case 436:m.family_candy_id=436;break;case"FAMILY_CHATOT":case 441:m.family_candy_id=441;break;case"FAMILY_SPIRITOMB":case 442:m.family_candy_id=442;break;case"FAMILY_GIBLE":case 443:m.family_candy_id=443;break;case"FAMILY_LUCARIO":case 448:m.family_candy_id=448;break;case"FAMILY_HIPPOPOTAS":case 449:m.family_candy_id=449;break;case"FAMILY_SKORUPI":case 451:m.family_candy_id=451;break;case"FAMILY_CROAGUNK":case 453:m.family_candy_id=453;break;case"FAMILY_CARNIVINE":case 455:m.family_candy_id=455;break;case"FAMILY_FINNEON":case 456:m.family_candy_id=456;break;case"FAMILY_SNOVER":case 459:m.family_candy_id=459;break;case"FAMILY_ROTOM":case 479:m.family_candy_id=479;break;case"FAMILY_UXIE":case 480:m.family_candy_id=480;break;case"FAMILY_MESPRIT":case 481:m.family_candy_id=481;break;case"FAMILY_AZELF":case 482:m.family_candy_id=482;break;case"FAMILY_DIALGA":case 483:m.family_candy_id=483;break;case"FAMILY_PALKIA":case 484:m.family_candy_id=484;break;case"FAMILY_HEATRAN":case 485:m.family_candy_id=485;break;case"FAMILY_REGIGIGAS":case 486:m.family_candy_id=486;break;case"FAMILY_GIRATINA":case 487:m.family_candy_id=487;break;case"FAMILY_CRESSELIA":case 488:m.family_candy_id=488;break;case"FAMILY_PHIONE":case 489:m.family_candy_id=489;break;case"FAMILY_MANAPHY":case 490:m.family_candy_id=490;break;case"FAMILY_DARKRAI":case 491:m.family_candy_id=491;break;case"FAMILY_SHAYMIN":case 492:m.family_candy_id=492;break;case"FAMILY_ARCEUS":case 493:m.family_candy_id=493;break;case"FAMILY_MELTAN":case 808:m.family_candy_id=808;break}if(d.cooldown_complete!=null){if($util.Long)(m.cooldown_complete=$util.Long.fromValue(d.cooldown_complete)).unsigned=false;else if(typeof d.cooldown_complete==="string")m.cooldown_complete=parseInt(d.cooldown_complete,10);else if(typeof d.cooldown_complete==="number")m.cooldown_complete=d.cooldown_complete;else if(typeof d.cooldown_complete==="object")m.cooldown_complete=new $util.LongBits(d.cooldown_complete.low>>>0,d.cooldown_complete.high>>>0).toNumber()}return m};GymFeedPokemonResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.gym_status_and_defenders=null;d.awarded_gym_badge=null;d.stardust_awarded=0;d.xp_awarded=0;d.num_candy_awarded=0;d.family_candy_id=o.enums===String?"FAMILY_UNSET":0;if($util.Long){var n=new $util.Long(0,0,false);d.cooldown_complete=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.cooldown_complete=o.longs===String?"0":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GymFeedPokemonResponse.Result[m.result]:m.result}if(m.gym_status_and_defenders!=null&&m.hasOwnProperty("gym_status_and_defenders")){d.gym_status_and_defenders=$root.POGOProtos.Data.Gym.GymStatusAndDefenders.toObject(m.gym_status_and_defenders,o)}if(m.awarded_gym_badge!=null&&m.hasOwnProperty("awarded_gym_badge")){d.awarded_gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.toObject(m.awarded_gym_badge,o)}if(m.stardust_awarded!=null&&m.hasOwnProperty("stardust_awarded")){d.stardust_awarded=m.stardust_awarded}if(m.xp_awarded!=null&&m.hasOwnProperty("xp_awarded")){d.xp_awarded=m.xp_awarded}if(m.num_candy_awarded!=null&&m.hasOwnProperty("num_candy_awarded")){d.num_candy_awarded=m.num_candy_awarded}if(m.family_candy_id!=null&&m.hasOwnProperty("family_candy_id")){d.family_candy_id=o.enums===String?$root.POGOProtos.Enums.PokemonFamilyId[m.family_candy_id]:m.family_candy_id}if(m.cooldown_complete!=null&&m.hasOwnProperty("cooldown_complete")){if(typeof m.cooldown_complete==="number")d.cooldown_complete=o.longs===String?String(m.cooldown_complete):m.cooldown_complete;else d.cooldown_complete=o.longs===String?$util.Long.prototype.toString.call(m.cooldown_complete):o.longs===Number?new $util.LongBits(m.cooldown_complete.low>>>0,m.cooldown_complete.high>>>0).toNumber():m.cooldown_complete}return d};GymFeedPokemonResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GymFeedPokemonResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_CANNOT_USE"]=2;values[valuesById[3]="ERROR_NOT_IN_RANGE"]=3;values[valuesById[4]="ERROR_POKEMON_NOT_THERE"]=4;values[valuesById[5]="ERROR_POKEMON_FULL"]=5;values[valuesById[6]="ERROR_NO_BERRIES_LEFT"]=6;values[valuesById[7]="ERROR_WRONG_TEAM"]=7;values[valuesById[8]="ERROR_WRONG_COUNT"]=8;values[valuesById[9]="ERROR_TOO_FAST"]=9;values[valuesById[10]="ERROR_TOO_FREQUENT"]=10;values[valuesById[11]="ERROR_GYM_BUSY"]=11;values[valuesById[12]="ERROR_RAID_ACTIVE"]=12;values[valuesById[13]="ERROR_GYM_CLOSED"]=13;return values}();return GymFeedPokemonResponse}();Responses.GymGetInfoResponse=function(){function GymGetInfoResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymGetInfoResponse.prototype.gym_status_and_defenders=null;GymGetInfoResponse.prototype.name="";GymGetInfoResponse.prototype.url="";GymGetInfoResponse.prototype.result=0;GymGetInfoResponse.prototype.description="";GymGetInfoResponse.prototype.secondary_url="";GymGetInfoResponse.prototype.awarded_gym_badge=null;GymGetInfoResponse.prototype.checkin_image_url="";GymGetInfoResponse.prototype.event_info=null;GymGetInfoResponse.prototype.display_weather=null;GymGetInfoResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_status_and_defenders!=null&&m.hasOwnProperty("gym_status_and_defenders"))$root.POGOProtos.Data.Gym.GymStatusAndDefenders.encode(m.gym_status_and_defenders,w.uint32(10).fork()).ldelim();if(m.name!=null&&m.hasOwnProperty("name"))w.uint32(18).string(m.name);if(m.url!=null&&m.hasOwnProperty("url"))w.uint32(26).string(m.url);if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(32).int32(m.result);if(m.description!=null&&m.hasOwnProperty("description"))w.uint32(42).string(m.description);if(m.secondary_url!=null&&m.hasOwnProperty("secondary_url"))w.uint32(50).string(m.secondary_url);if(m.awarded_gym_badge!=null&&m.hasOwnProperty("awarded_gym_badge"))$root.POGOProtos.Data.Badge.AwardedGymBadge.encode(m.awarded_gym_badge,w.uint32(58).fork()).ldelim();if(m.checkin_image_url!=null&&m.hasOwnProperty("checkin_image_url"))w.uint32(66).string(m.checkin_image_url);if(m.event_info!=null&&m.hasOwnProperty("event_info"))$root.POGOProtos.Data.Raid.EventInfo.encode(m.event_info,w.uint32(74).fork()).ldelim();if(m.display_weather!=null&&m.hasOwnProperty("display_weather"))$root.POGOProtos.Map.Weather.DisplayWeather.encode(m.display_weather,w.uint32(82).fork()).ldelim();return w};GymGetInfoResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GymGetInfoResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.gym_status_and_defenders=$root.POGOProtos.Data.Gym.GymStatusAndDefenders.decode(r,r.uint32());break;case 2:m.name=r.string();break;case 3:m.url=r.string();break;case 4:m.result=r.int32();break;case 5:m.description=r.string();break;case 6:m.secondary_url=r.string();break;case 7:m.awarded_gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.decode(r,r.uint32());break;case 8:m.checkin_image_url=r.string();break;case 9:m.event_info=$root.POGOProtos.Data.Raid.EventInfo.decode(r,r.uint32());break;case 10:m.display_weather=$root.POGOProtos.Map.Weather.DisplayWeather.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GymGetInfoResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GymGetInfoResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GymGetInfoResponse;if(d.gym_status_and_defenders!=null){if(typeof d.gym_status_and_defenders!=="object")throw TypeError(".POGOProtos.Networking.Responses.GymGetInfoResponse.gym_status_and_defenders: object expected");m.gym_status_and_defenders=$root.POGOProtos.Data.Gym.GymStatusAndDefenders.fromObject(d.gym_status_and_defenders)}if(d.name!=null){m.name=String(d.name)}if(d.url!=null){m.url=String(d.url)}switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_NOT_IN_RANGE":case 2:m.result=2;break;case"ERROR_GYM_DISABLED":case 3:m.result=3;break}if(d.description!=null){m.description=String(d.description)}if(d.secondary_url!=null){m.secondary_url=String(d.secondary_url)}if(d.awarded_gym_badge!=null){if(typeof d.awarded_gym_badge!=="object")throw TypeError(".POGOProtos.Networking.Responses.GymGetInfoResponse.awarded_gym_badge: object expected");m.awarded_gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.fromObject(d.awarded_gym_badge)}if(d.checkin_image_url!=null){m.checkin_image_url=String(d.checkin_image_url)}if(d.event_info!=null){if(typeof d.event_info!=="object")throw TypeError(".POGOProtos.Networking.Responses.GymGetInfoResponse.event_info: object expected");m.event_info=$root.POGOProtos.Data.Raid.EventInfo.fromObject(d.event_info)}if(d.display_weather!=null){if(typeof d.display_weather!=="object")throw TypeError(".POGOProtos.Networking.Responses.GymGetInfoResponse.display_weather: object expected");m.display_weather=$root.POGOProtos.Map.Weather.DisplayWeather.fromObject(d.display_weather)}return m};GymGetInfoResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.gym_status_and_defenders=null;d.name="";d.url="";d.result=o.enums===String?"UNSET":0;d.description="";d.secondary_url="";d.awarded_gym_badge=null;d.checkin_image_url="";d.event_info=null;d.display_weather=null}if(m.gym_status_and_defenders!=null&&m.hasOwnProperty("gym_status_and_defenders")){d.gym_status_and_defenders=$root.POGOProtos.Data.Gym.GymStatusAndDefenders.toObject(m.gym_status_and_defenders,o)}if(m.name!=null&&m.hasOwnProperty("name")){d.name=m.name}if(m.url!=null&&m.hasOwnProperty("url")){d.url=m.url}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GymGetInfoResponse.Result[m.result]:m.result}if(m.description!=null&&m.hasOwnProperty("description")){d.description=m.description}if(m.secondary_url!=null&&m.hasOwnProperty("secondary_url")){d.secondary_url=m.secondary_url}if(m.awarded_gym_badge!=null&&m.hasOwnProperty("awarded_gym_badge")){d.awarded_gym_badge=$root.POGOProtos.Data.Badge.AwardedGymBadge.toObject(m.awarded_gym_badge,o)}if(m.checkin_image_url!=null&&m.hasOwnProperty("checkin_image_url")){d.checkin_image_url=m.checkin_image_url}if(m.event_info!=null&&m.hasOwnProperty("event_info")){d.event_info=$root.POGOProtos.Data.Raid.EventInfo.toObject(m.event_info,o)}if(m.display_weather!=null&&m.hasOwnProperty("display_weather")){d.display_weather=$root.POGOProtos.Map.Weather.DisplayWeather.toObject(m.display_weather,o)}return d};GymGetInfoResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GymGetInfoResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_NOT_IN_RANGE"]=2;values[valuesById[3]="ERROR_GYM_DISABLED"]=3;return values}();return GymGetInfoResponse}();Responses.GymStartSessionResponse=function(){function GymStartSessionResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymStartSessionResponse.prototype.result=0;GymStartSessionResponse.prototype.battle=null;GymStartSessionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.battle!=null&&m.hasOwnProperty("battle"))$root.POGOProtos.Data.Battle.Battle.encode(m.battle,w.uint32(18).fork()).ldelim();return w};GymStartSessionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GymStartSessionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.battle=$root.POGOProtos.Data.Battle.Battle.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GymStartSessionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GymStartSessionResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GymStartSessionResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_GYM_NOT_FOUND":case 2:m.result=2;break;case"ERROR_GYM_NEUTRAL":case 3:m.result=3;break;case"ERROR_GYM_WRONG_TEAM":case 4:m.result=4;break;case"ERROR_GYM_EMPTY":case 5:m.result=5;break;case"ERROR_INVALID_DEFENDER":case 6:m.result=6;break;case"ERROR_TRAINING_INVALID_ATTACKER_COUNT":case 7:m.result=7;break;case"ERROR_ALL_POKEMON_FAINTED":case 8:m.result=8;break;case"ERROR_TOO_MANY_BATTLES":case 9:m.result=9;break;case"ERROR_TOO_MANY_PLAYERS":case 10:m.result=10;break;case"ERROR_GYM_BATTLE_LOCKOUT":case 11:m.result=11;break;case"ERROR_PLAYER_BELOW_MINIMUM_LEVEL":case 12:m.result=12;break;case"ERROR_NOT_IN_RANGE":case 13:m.result=13;break;case"ERROR_POI_INACCESSIBLE":case 14:m.result=14;break;case"ERROR_RAID_ACTIVE":case 15:m.result=15;break}if(d.battle!=null){if(typeof d.battle!=="object")throw TypeError(".POGOProtos.Networking.Responses.GymStartSessionResponse.battle: object expected");m.battle=$root.POGOProtos.Data.Battle.Battle.fromObject(d.battle)}return m};GymStartSessionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.battle=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.GymStartSessionResponse.Result[m.result]:m.result}if(m.battle!=null&&m.hasOwnProperty("battle")){d.battle=$root.POGOProtos.Data.Battle.Battle.toObject(m.battle,o)}return d};GymStartSessionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GymStartSessionResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_GYM_NOT_FOUND"]=2;values[valuesById[3]="ERROR_GYM_NEUTRAL"]=3;values[valuesById[4]="ERROR_GYM_WRONG_TEAM"]=4;values[valuesById[5]="ERROR_GYM_EMPTY"]=5;values[valuesById[6]="ERROR_INVALID_DEFENDER"]=6;values[valuesById[7]="ERROR_TRAINING_INVALID_ATTACKER_COUNT"]=7;values[valuesById[8]="ERROR_ALL_POKEMON_FAINTED"]=8;values[valuesById[9]="ERROR_TOO_MANY_BATTLES"]=9;values[valuesById[10]="ERROR_TOO_MANY_PLAYERS"]=10;values[valuesById[11]="ERROR_GYM_BATTLE_LOCKOUT"]=11;values[valuesById[12]="ERROR_PLAYER_BELOW_MINIMUM_LEVEL"]=12;values[valuesById[13]="ERROR_NOT_IN_RANGE"]=13;values[valuesById[14]="ERROR_POI_INACCESSIBLE"]=14;values[valuesById[15]="ERROR_RAID_ACTIVE"]=15;return values}();return GymStartSessionResponse}();Responses.IncenseEncounterResponse=function(){function IncenseEncounterResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}IncenseEncounterResponse.prototype.result=0;IncenseEncounterResponse.prototype.pokemon_data=null;IncenseEncounterResponse.prototype.capture_probability=null;IncenseEncounterResponse.prototype.active_item=0;IncenseEncounterResponse.prototype.arplus_attempts_until_flee=0;IncenseEncounterResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data"))$root.POGOProtos.Data.PokemonData.encode(m.pokemon_data,w.uint32(18).fork()).ldelim();if(m.capture_probability!=null&&m.hasOwnProperty("capture_probability"))$root.POGOProtos.Data.Capture.CaptureProbability.encode(m.capture_probability,w.uint32(26).fork()).ldelim();if(m.active_item!=null&&m.hasOwnProperty("active_item"))w.uint32(32).int32(m.active_item);if(m.arplus_attempts_until_flee!=null&&m.hasOwnProperty("arplus_attempts_until_flee"))w.uint32(40).int32(m.arplus_attempts_until_flee);return w};IncenseEncounterResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.IncenseEncounterResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.pokemon_data=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 3:m.capture_probability=$root.POGOProtos.Data.Capture.CaptureProbability.decode(r,r.uint32());break;case 4:m.active_item=r.int32();break;case 5:m.arplus_attempts_until_flee=r.int32();break;default:r.skipType(t&7);break}}return m};IncenseEncounterResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.IncenseEncounterResponse)return d;var m=new $root.POGOProtos.Networking.Responses.IncenseEncounterResponse;switch(d.result){case"INCENSE_ENCOUNTER_UNKNOWN":case 0:m.result=0;break;case"INCENSE_ENCOUNTER_SUCCESS":case 1:m.result=1;break;case"INCENSE_ENCOUNTER_NOT_AVAILABLE":case 2:m.result=2;break;case"POKEMON_INVENTORY_FULL":case 3:m.result=3;break}if(d.pokemon_data!=null){if(typeof d.pokemon_data!=="object")throw TypeError(".POGOProtos.Networking.Responses.IncenseEncounterResponse.pokemon_data: object expected");m.pokemon_data=$root.POGOProtos.Data.PokemonData.fromObject(d.pokemon_data)}if(d.capture_probability!=null){if(typeof d.capture_probability!=="object")throw TypeError(".POGOProtos.Networking.Responses.IncenseEncounterResponse.capture_probability: object expected");m.capture_probability=$root.POGOProtos.Data.Capture.CaptureProbability.fromObject(d.capture_probability)}switch(d.active_item){case"ITEM_UNKNOWN":case 0:m.active_item=0;break;case"ITEM_POKE_BALL":case 1:m.active_item=1;break;case"ITEM_GREAT_BALL":case 2:m.active_item=2;break;case"ITEM_ULTRA_BALL":case 3:m.active_item=3;break;case"ITEM_MASTER_BALL":case 4:m.active_item=4;break;case"ITEM_PREMIER_BALL":case 5:m.active_item=5;break;case"ITEM_POTION":case 101:m.active_item=101;break;case"ITEM_SUPER_POTION":case 102:m.active_item=102;break;case"ITEM_HYPER_POTION":case 103:m.active_item=103;break;case"ITEM_MAX_POTION":case 104:m.active_item=104;break;case"ITEM_REVIVE":case 201:m.active_item=201;break;case"ITEM_MAX_REVIVE":case 202:m.active_item=202;break;case"ITEM_LUCKY_EGG":case 301:m.active_item=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.active_item=401;break;case"ITEM_INCENSE_SPICY":case 402:m.active_item=402;break;case"ITEM_INCENSE_COOL":case 403:m.active_item=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.active_item=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.active_item=405;break;case"ITEM_TROY_DISK":case 501:m.active_item=501;break;case"ITEM_X_ATTACK":case 602:m.active_item=602;break;case"ITEM_X_DEFENSE":case 603:m.active_item=603;break;case"ITEM_X_MIRACLE":case 604:m.active_item=604;break;case"ITEM_RAZZ_BERRY":case 701:m.active_item=701;break;case"ITEM_BLUK_BERRY":case 702:m.active_item=702;break;case"ITEM_NANAB_BERRY":case 703:m.active_item=703;break;case"ITEM_WEPAR_BERRY":case 704:m.active_item=704;break;case"ITEM_PINAP_BERRY":case 705:m.active_item=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.active_item=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.active_item=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.active_item=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.active_item=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.active_item=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.active_item=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.active_item=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.active_item=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.active_item=1002;break;case"ITEM_SUN_STONE":case 1101:m.active_item=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.active_item=1102;break;case"ITEM_METAL_COAT":case 1103:m.active_item=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.active_item=1104;break;case"ITEM_UP_GRADE":case 1105:m.active_item=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.active_item=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.active_item=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.active_item=1202;break;case"ITEM_RARE_CANDY":case 1301:m.active_item=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.active_item=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.active_item=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.active_item=1403;break;case"ITEM_STAR_PIECE":case 1404:m.active_item=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.active_item=1405;break}if(d.arplus_attempts_until_flee!=null){m.arplus_attempts_until_flee=d.arplus_attempts_until_flee|0}return m};IncenseEncounterResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"INCENSE_ENCOUNTER_UNKNOWN":0;d.pokemon_data=null;d.capture_probability=null;d.active_item=o.enums===String?"ITEM_UNKNOWN":0;d.arplus_attempts_until_flee=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.IncenseEncounterResponse.Result[m.result]:m.result}if(m.pokemon_data!=null&&m.hasOwnProperty("pokemon_data")){d.pokemon_data=$root.POGOProtos.Data.PokemonData.toObject(m.pokemon_data,o)}if(m.capture_probability!=null&&m.hasOwnProperty("capture_probability")){d.capture_probability=$root.POGOProtos.Data.Capture.CaptureProbability.toObject(m.capture_probability,o)}if(m.active_item!=null&&m.hasOwnProperty("active_item")){d.active_item=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.active_item]:m.active_item}if(m.arplus_attempts_until_flee!=null&&m.hasOwnProperty("arplus_attempts_until_flee")){d.arplus_attempts_until_flee=m.arplus_attempts_until_flee}return d};IncenseEncounterResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};IncenseEncounterResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="INCENSE_ENCOUNTER_UNKNOWN"]=0;values[valuesById[1]="INCENSE_ENCOUNTER_SUCCESS"]=1;values[valuesById[2]="INCENSE_ENCOUNTER_NOT_AVAILABLE"]=2;values[valuesById[3]="POKEMON_INVENTORY_FULL"]=3;return values}();return IncenseEncounterResponse}();Responses.JoinLobbyResponse=function(){function JoinLobbyResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}JoinLobbyResponse.prototype.result=0;JoinLobbyResponse.prototype.lobby=null;JoinLobbyResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.lobby!=null&&m.hasOwnProperty("lobby"))$root.POGOProtos.Data.Raid.Lobby.encode(m.lobby,w.uint32(18).fork()).ldelim();return w};JoinLobbyResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.JoinLobbyResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.lobby=$root.POGOProtos.Data.Raid.Lobby.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};JoinLobbyResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.JoinLobbyResponse)return d;var m=new $root.POGOProtos.Networking.Responses.JoinLobbyResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_NOT_IN_RANGE":case 2:m.result=2;break;case"ERROR_RAID_UNAVAILABLE":case 3:m.result=3;break;case"ERROR_RAID_COMPLETED":case 4:m.result=4;break;case"ERROR_NO_AVAILABLE_LOBBIES":case 5:m.result=5;break;case"ERROR_PLAYER_BELOW_MINIMUM_LEVEL":case 6:m.result=6;break;case"ERROR_POI_INACCESSIBLE":case 7:m.result=7;break;case"ERROR_GYM_LOCKOUT":case 8:m.result=8;break;case"ERROR_NO_TICKET":case 9:m.result=9;break}if(d.lobby!=null){if(typeof d.lobby!=="object")throw TypeError(".POGOProtos.Networking.Responses.JoinLobbyResponse.lobby: object expected");m.lobby=$root.POGOProtos.Data.Raid.Lobby.fromObject(d.lobby)}return m};JoinLobbyResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.lobby=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.JoinLobbyResponse.Result[m.result]:m.result}if(m.lobby!=null&&m.hasOwnProperty("lobby")){d.lobby=$root.POGOProtos.Data.Raid.Lobby.toObject(m.lobby,o)}return d};JoinLobbyResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};JoinLobbyResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_NOT_IN_RANGE"]=2;values[valuesById[3]="ERROR_RAID_UNAVAILABLE"]=3;values[valuesById[4]="ERROR_RAID_COMPLETED"]=4;values[valuesById[5]="ERROR_NO_AVAILABLE_LOBBIES"]=5;values[valuesById[6]="ERROR_PLAYER_BELOW_MINIMUM_LEVEL"]=6;values[valuesById[7]="ERROR_POI_INACCESSIBLE"]=7;values[valuesById[8]="ERROR_GYM_LOCKOUT"]=8;values[valuesById[9]="ERROR_NO_TICKET"]=9;return values}();return JoinLobbyResponse}();Responses.LeaveLobbyResponse=function(){function LeaveLobbyResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LeaveLobbyResponse.prototype.result=0;LeaveLobbyResponse.prototype.lobby=null;LeaveLobbyResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.lobby!=null&&m.hasOwnProperty("lobby"))$root.POGOProtos.Data.Raid.Lobby.encode(m.lobby,w.uint32(18).fork()).ldelim();return w};LeaveLobbyResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.LeaveLobbyResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.lobby=$root.POGOProtos.Data.Raid.Lobby.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};LeaveLobbyResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.LeaveLobbyResponse)return d;var m=new $root.POGOProtos.Networking.Responses.LeaveLobbyResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_RAID_UNAVAILABLE":case 2:m.result=2;break;case"ERROR_LOBBY_NOT_FOUND":case 3:m.result=3;break}if(d.lobby!=null){if(typeof d.lobby!=="object")throw TypeError(".POGOProtos.Networking.Responses.LeaveLobbyResponse.lobby: object expected");m.lobby=$root.POGOProtos.Data.Raid.Lobby.fromObject(d.lobby)}return m};LeaveLobbyResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.lobby=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.LeaveLobbyResponse.Result[m.result]:m.result}if(m.lobby!=null&&m.hasOwnProperty("lobby")){d.lobby=$root.POGOProtos.Data.Raid.Lobby.toObject(m.lobby,o)}return d};LeaveLobbyResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};LeaveLobbyResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_RAID_UNAVAILABLE"]=2;values[valuesById[3]="ERROR_LOBBY_NOT_FOUND"]=3;return values}();return LeaveLobbyResponse}();Responses.LevelUpRewardsResponse=function(){function LevelUpRewardsResponse(p){this.items_awarded=[];this.items_unlocked=[];this.avatar_template_ids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LevelUpRewardsResponse.prototype.result=0;LevelUpRewardsResponse.prototype.items_awarded=$util.emptyArray;LevelUpRewardsResponse.prototype.items_unlocked=$util.emptyArray;LevelUpRewardsResponse.prototype.avatar_template_ids=$util.emptyArray;LevelUpRewardsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.items_awarded!=null&&m.items_awarded.length){for(var i=0;i<m.items_awarded.length;++i)$root.POGOProtos.Inventory.Item.ItemAward.encode(m.items_awarded[i],w.uint32(18).fork()).ldelim()}if(m.items_unlocked!=null&&m.items_unlocked.length){w.uint32(34).fork();for(var i=0;i<m.items_unlocked.length;++i)w.int32(m.items_unlocked[i]);w.ldelim()}if(m.avatar_template_ids!=null&&m.avatar_template_ids.length){for(var i=0;i<m.avatar_template_ids.length;++i)w.uint32(42).string(m.avatar_template_ids[i])}return w};LevelUpRewardsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.LevelUpRewardsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.items_awarded&&m.items_awarded.length))m.items_awarded=[];m.items_awarded.push($root.POGOProtos.Inventory.Item.ItemAward.decode(r,r.uint32()));break;case 4:if(!(m.items_unlocked&&m.items_unlocked.length))m.items_unlocked=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.items_unlocked.push(r.int32())}else m.items_unlocked.push(r.int32());break;case 5:if(!(m.avatar_template_ids&&m.avatar_template_ids.length))m.avatar_template_ids=[];m.avatar_template_ids.push(r.string());break;default:r.skipType(t&7);break}}return m};LevelUpRewardsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.LevelUpRewardsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.LevelUpRewardsResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"AWARDED_ALREADY":case 2:m.result=2;break}if(d.items_awarded){if(!Array.isArray(d.items_awarded))throw TypeError(".POGOProtos.Networking.Responses.LevelUpRewardsResponse.items_awarded: array expected");m.items_awarded=[];for(var i=0;i<d.items_awarded.length;++i){if(typeof d.items_awarded[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.LevelUpRewardsResponse.items_awarded: object expected");m.items_awarded[i]=$root.POGOProtos.Inventory.Item.ItemAward.fromObject(d.items_awarded[i])}}if(d.items_unlocked){if(!Array.isArray(d.items_unlocked))throw TypeError(".POGOProtos.Networking.Responses.LevelUpRewardsResponse.items_unlocked: array expected");m.items_unlocked=[];for(var i=0;i<d.items_unlocked.length;++i){switch(d.items_unlocked[i]){default:case"ITEM_UNKNOWN":case 0:m.items_unlocked[i]=0;break;case"ITEM_POKE_BALL":case 1:m.items_unlocked[i]=1;break;case"ITEM_GREAT_BALL":case 2:m.items_unlocked[i]=2;break;case"ITEM_ULTRA_BALL":case 3:m.items_unlocked[i]=3;break;case"ITEM_MASTER_BALL":case 4:m.items_unlocked[i]=4;break;case"ITEM_PREMIER_BALL":case 5:m.items_unlocked[i]=5;break;case"ITEM_POTION":case 101:m.items_unlocked[i]=101;break;case"ITEM_SUPER_POTION":case 102:m.items_unlocked[i]=102;break;case"ITEM_HYPER_POTION":case 103:m.items_unlocked[i]=103;break;case"ITEM_MAX_POTION":case 104:m.items_unlocked[i]=104;break;case"ITEM_REVIVE":case 201:m.items_unlocked[i]=201;break;case"ITEM_MAX_REVIVE":case 202:m.items_unlocked[i]=202;break;case"ITEM_LUCKY_EGG":case 301:m.items_unlocked[i]=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.items_unlocked[i]=401;break;case"ITEM_INCENSE_SPICY":case 402:m.items_unlocked[i]=402;break;case"ITEM_INCENSE_COOL":case 403:m.items_unlocked[i]=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.items_unlocked[i]=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.items_unlocked[i]=405;break;case"ITEM_TROY_DISK":case 501:m.items_unlocked[i]=501;break;case"ITEM_X_ATTACK":case 602:m.items_unlocked[i]=602;break;case"ITEM_X_DEFENSE":case 603:m.items_unlocked[i]=603;break;case"ITEM_X_MIRACLE":case 604:m.items_unlocked[i]=604;break;case"ITEM_RAZZ_BERRY":case 701:m.items_unlocked[i]=701;break;case"ITEM_BLUK_BERRY":case 702:m.items_unlocked[i]=702;break;case"ITEM_NANAB_BERRY":case 703:m.items_unlocked[i]=703;break;case"ITEM_WEPAR_BERRY":case 704:m.items_unlocked[i]=704;break;case"ITEM_PINAP_BERRY":case 705:m.items_unlocked[i]=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.items_unlocked[i]=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.items_unlocked[i]=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.items_unlocked[i]=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.items_unlocked[i]=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.items_unlocked[i]=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.items_unlocked[i]=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.items_unlocked[i]=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.items_unlocked[i]=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.items_unlocked[i]=1002;break;case"ITEM_SUN_STONE":case 1101:m.items_unlocked[i]=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.items_unlocked[i]=1102;break;case"ITEM_METAL_COAT":case 1103:m.items_unlocked[i]=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.items_unlocked[i]=1104;break;case"ITEM_UP_GRADE":case 1105:m.items_unlocked[i]=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.items_unlocked[i]=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.items_unlocked[i]=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.items_unlocked[i]=1202;break;case"ITEM_RARE_CANDY":case 1301:m.items_unlocked[i]=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.items_unlocked[i]=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.items_unlocked[i]=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.items_unlocked[i]=1403;break;case"ITEM_STAR_PIECE":case 1404:m.items_unlocked[i]=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.items_unlocked[i]=1405;break}}}if(d.avatar_template_ids){if(!Array.isArray(d.avatar_template_ids))throw TypeError(".POGOProtos.Networking.Responses.LevelUpRewardsResponse.avatar_template_ids: array expected");m.avatar_template_ids=[];for(var i=0;i<d.avatar_template_ids.length;++i){m.avatar_template_ids[i]=String(d.avatar_template_ids[i])}}return m};LevelUpRewardsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.items_awarded=[];d.items_unlocked=[];d.avatar_template_ids=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.LevelUpRewardsResponse.Result[m.result]:m.result}if(m.items_awarded&&m.items_awarded.length){d.items_awarded=[];for(var j=0;j<m.items_awarded.length;++j){d.items_awarded[j]=$root.POGOProtos.Inventory.Item.ItemAward.toObject(m.items_awarded[j],o)}}if(m.items_unlocked&&m.items_unlocked.length){d.items_unlocked=[];for(var j=0;j<m.items_unlocked.length;++j){d.items_unlocked[j]=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.items_unlocked[j]]:m.items_unlocked[j]}}if(m.avatar_template_ids&&m.avatar_template_ids.length){d.avatar_template_ids=[];for(var j=0;j<m.avatar_template_ids.length;++j){d.avatar_template_ids[j]=m.avatar_template_ids[j]}}return d};LevelUpRewardsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};LevelUpRewardsResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="AWARDED_ALREADY"]=2;return values}();return LevelUpRewardsResponse}();Responses.ListAvatarCustomizationsResponse=function(){function ListAvatarCustomizationsResponse(p){this.avatar_customizations=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListAvatarCustomizationsResponse.prototype.result=0;ListAvatarCustomizationsResponse.prototype.avatar_customizations=$util.emptyArray;ListAvatarCustomizationsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.avatar_customizations!=null&&m.avatar_customizations.length){for(var i=0;i<m.avatar_customizations.length;++i)$root.POGOProtos.Data.Avatar.AvatarCustomization.encode(m.avatar_customizations[i],w.uint32(18).fork()).ldelim()}return w};ListAvatarCustomizationsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.ListAvatarCustomizationsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.avatar_customizations&&m.avatar_customizations.length))m.avatar_customizations=[];m.avatar_customizations.push($root.POGOProtos.Data.Avatar.AvatarCustomization.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};ListAvatarCustomizationsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.ListAvatarCustomizationsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.ListAvatarCustomizationsResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"FAILURE":case 2:m.result=2;break}if(d.avatar_customizations){if(!Array.isArray(d.avatar_customizations))throw TypeError(".POGOProtos.Networking.Responses.ListAvatarCustomizationsResponse.avatar_customizations: array expected");m.avatar_customizations=[];for(var i=0;i<d.avatar_customizations.length;++i){if(typeof d.avatar_customizations[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.ListAvatarCustomizationsResponse.avatar_customizations: object expected");m.avatar_customizations[i]=$root.POGOProtos.Data.Avatar.AvatarCustomization.fromObject(d.avatar_customizations[i])}}return m};ListAvatarCustomizationsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.avatar_customizations=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.ListAvatarCustomizationsResponse.Result[m.result]:m.result}if(m.avatar_customizations&&m.avatar_customizations.length){d.avatar_customizations=[];for(var j=0;j<m.avatar_customizations.length;++j){d.avatar_customizations[j]=$root.POGOProtos.Data.Avatar.AvatarCustomization.toObject(m.avatar_customizations[j],o)}}return d};ListAvatarCustomizationsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListAvatarCustomizationsResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;return values}();return ListAvatarCustomizationsResponse}();Responses.ListGymBadgesResponse=function(){function ListGymBadgesResponse(p){this.gym_badge=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListGymBadgesResponse.prototype.gym_badge=$util.emptyArray;ListGymBadgesResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.gym_badge!=null&&m.gym_badge.length){for(var i=0;i<m.gym_badge.length;++i)$root.POGOProtos.Data.Badge.AwardedGymBadge.encode(m.gym_badge[i],w.uint32(10).fork()).ldelim()}return w};ListGymBadgesResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.ListGymBadgesResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.gym_badge&&m.gym_badge.length))m.gym_badge=[];m.gym_badge.push($root.POGOProtos.Data.Badge.AwardedGymBadge.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};ListGymBadgesResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.ListGymBadgesResponse)return d;var m=new $root.POGOProtos.Networking.Responses.ListGymBadgesResponse;if(d.gym_badge){if(!Array.isArray(d.gym_badge))throw TypeError(".POGOProtos.Networking.Responses.ListGymBadgesResponse.gym_badge: array expected");m.gym_badge=[];for(var i=0;i<d.gym_badge.length;++i){if(typeof d.gym_badge[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.ListGymBadgesResponse.gym_badge: object expected");m.gym_badge[i]=$root.POGOProtos.Data.Badge.AwardedGymBadge.fromObject(d.gym_badge[i])}}return m};ListGymBadgesResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.gym_badge=[]}if(m.gym_badge&&m.gym_badge.length){d.gym_badge=[];for(var j=0;j<m.gym_badge.length;++j){d.gym_badge[j]=$root.POGOProtos.Data.Badge.AwardedGymBadge.toObject(m.gym_badge[j],o)}}return d};ListGymBadgesResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ListGymBadgesResponse}();Responses.MarkReadNewsArticleResponse=function(){function MarkReadNewsArticleResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}MarkReadNewsArticleResponse.prototype.result=0;MarkReadNewsArticleResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};MarkReadNewsArticleResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.MarkReadNewsArticleResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};MarkReadNewsArticleResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.MarkReadNewsArticleResponse)return d;var m=new $root.POGOProtos.Networking.Responses.MarkReadNewsArticleResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"NO_NEWS_FOUND":case 2:m.result=2;break}return m};MarkReadNewsArticleResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.MarkReadNewsArticleResponse.Result[m.result]:m.result}return d};MarkReadNewsArticleResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};MarkReadNewsArticleResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="NO_NEWS_FOUND"]=2;return values}();return MarkReadNewsArticleResponse}();Responses.MarkTutorialCompleteResponse=function(){function MarkTutorialCompleteResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}MarkTutorialCompleteResponse.prototype.success=false;MarkTutorialCompleteResponse.prototype.player_data=null;MarkTutorialCompleteResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.player_data!=null&&m.hasOwnProperty("player_data"))$root.POGOProtos.Data.PlayerData.encode(m.player_data,w.uint32(18).fork()).ldelim();return w};MarkTutorialCompleteResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.MarkTutorialCompleteResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:m.player_data=$root.POGOProtos.Data.PlayerData.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};MarkTutorialCompleteResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.MarkTutorialCompleteResponse)return d;var m=new $root.POGOProtos.Networking.Responses.MarkTutorialCompleteResponse;if(d.success!=null){m.success=Boolean(d.success)}if(d.player_data!=null){if(typeof d.player_data!=="object")throw TypeError(".POGOProtos.Networking.Responses.MarkTutorialCompleteResponse.player_data: object expected");m.player_data=$root.POGOProtos.Data.PlayerData.fromObject(d.player_data)}return m};MarkTutorialCompleteResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.success=false;d.player_data=null}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.player_data!=null&&m.hasOwnProperty("player_data")){d.player_data=$root.POGOProtos.Data.PlayerData.toObject(m.player_data,o)}return d};MarkTutorialCompleteResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return MarkTutorialCompleteResponse}();Responses.NicknamePokemonResponse=function(){function NicknamePokemonResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}NicknamePokemonResponse.prototype.result=0;NicknamePokemonResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};NicknamePokemonResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.NicknamePokemonResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};NicknamePokemonResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.NicknamePokemonResponse)return d;var m=new $root.POGOProtos.Networking.Responses.NicknamePokemonResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALID_NICKNAME":case 2:m.result=2;break;case"ERROR_POKEMON_NOT_FOUND":case 3:m.result=3;break;case"ERROR_POKEMON_IS_EGG":case 4:m.result=4;break;case"ERROR_FILTERED_NICKNAME":case 5:m.result=5;break;case"ERROR_EXCEEDED_CHANGE_LIMIT":case 6:m.result=6;break}return m};NicknamePokemonResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.NicknamePokemonResponse.Result[m.result]:m.result}return d};NicknamePokemonResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};NicknamePokemonResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_NICKNAME"]=2;values[valuesById[3]="ERROR_POKEMON_NOT_FOUND"]=3;values[valuesById[4]="ERROR_POKEMON_IS_EGG"]=4;values[valuesById[5]="ERROR_FILTERED_NICKNAME"]=5;values[valuesById[6]="ERROR_EXCEEDED_CHANGE_LIMIT"]=6;return values}();return NicknamePokemonResponse}();Responses.OpenCombatChallengeResponse=function(){function OpenCombatChallengeResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OpenCombatChallengeResponse.prototype.result=0;OpenCombatChallengeResponse.prototype.challenge=null;OpenCombatChallengeResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.challenge!=null&&m.hasOwnProperty("challenge"))$root.POGOProtos.Data.Combat.CombatChallenge.encode(m.challenge,w.uint32(18).fork()).ldelim();return w};OpenCombatChallengeResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.OpenCombatChallengeResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.challenge=$root.POGOProtos.Data.Combat.CombatChallenge.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};OpenCombatChallengeResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.OpenCombatChallengeResponse)return d;var m=new $root.POGOProtos.Networking.Responses.OpenCombatChallengeResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALID_CHALLENGE_STATE":case 2:m.result=2;break;case"ERROR_CHALLENGE_NOT_FOUND":case 3:m.result=3;break;case"ERROR_POKEMON_NOT_IN_INVENTORY":case 4:m.result=4;break;case"ERROR_NOT_ELIGIBLE_LEAGUE":case 5:m.result=5;break;case"ERROR_PLAYER_BELOW_MINIMUM_LEVEL":case 6:m.result=6;break;case"ERROR_ALREADY_TIMEDOUT":case 8:m.result=8;break;case"ERROR_ALREADY_CANCELLED":case 9:m.result=9;break;case"ERROR_FRIEND_NOT_FOUND":case 10:m.result=10;break;case"ERROR_FAILED_TO_SEND_NOTIFICATION":case 11:m.result=11;break;case"ERROR_ACCESS_DENIED":case 12:m.result=12;break;case"ERROR_INELIGIBLE_OPPONENT":case 13:m.result=13;break}if(d.challenge!=null){if(typeof d.challenge!=="object")throw TypeError(".POGOProtos.Networking.Responses.OpenCombatChallengeResponse.challenge: object expected");m.challenge=$root.POGOProtos.Data.Combat.CombatChallenge.fromObject(d.challenge)}return m};OpenCombatChallengeResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.challenge=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.OpenCombatChallengeResponse.Result[m.result]:m.result}if(m.challenge!=null&&m.hasOwnProperty("challenge")){d.challenge=$root.POGOProtos.Data.Combat.CombatChallenge.toObject(m.challenge,o)}return d};OpenCombatChallengeResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};OpenCombatChallengeResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_CHALLENGE_STATE"]=2;values[valuesById[3]="ERROR_CHALLENGE_NOT_FOUND"]=3;values[valuesById[4]="ERROR_POKEMON_NOT_IN_INVENTORY"]=4;values[valuesById[5]="ERROR_NOT_ELIGIBLE_LEAGUE"]=5;values[valuesById[6]="ERROR_PLAYER_BELOW_MINIMUM_LEVEL"]=6;values[valuesById[8]="ERROR_ALREADY_TIMEDOUT"]=8;values[valuesById[9]="ERROR_ALREADY_CANCELLED"]=9;values[valuesById[10]="ERROR_FRIEND_NOT_FOUND"]=10;values[valuesById[11]="ERROR_FAILED_TO_SEND_NOTIFICATION"]=11;values[valuesById[12]="ERROR_ACCESS_DENIED"]=12;values[valuesById[13]="ERROR_INELIGIBLE_OPPONENT"]=13;return values}();return OpenCombatChallengeResponse}();Responses.OpenCombatSessionResponse=function(){function OpenCombatSessionResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OpenCombatSessionResponse.prototype.result=0;OpenCombatSessionResponse.prototype.combat=null;OpenCombatSessionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.combat!=null&&m.hasOwnProperty("combat"))$root.POGOProtos.Data.Combat.Combat.encode(m.combat,w.uint32(18).fork()).ldelim();return w};OpenCombatSessionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.OpenCombatSessionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.combat=$root.POGOProtos.Data.Combat.Combat.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};OpenCombatSessionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.OpenCombatSessionResponse)return d;var m=new $root.POGOProtos.Networking.Responses.OpenCombatSessionResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALID_COMBAT_STATE":case 2:m.result=2;break;case"ERROR_COMBAT_SESSION_FULL":case 3:m.result=3;break;case"ERROR_POKEMON_NOT_IN_INVENTORY":case 4:m.result=4;break;case"ERROR_OPPONENT_NOT_IN_RANGE":case 5:m.result=5;break;case"ERROR_CHALLENGE_EXPIRED":case 6:m.result=6;break;case"ERROR_PLAYER_BELOW_MINIMUM_LEVEL":case 7:m.result=7;break;case"ERROR_OPPONENT_QUIT":case 8:m.result=8;break;case"ERROR_POKEMON_LINEUP_INELIGIBLE_FOR_LEAGUE":case 9:m.result=9;break;case"ERROR_COMBAT_LEAGUE_UNSPECIFIED":case 10:m.result=10;break;case"ERROR_ACCESS_DENIED":case 11:m.result=11;break}if(d.combat!=null){if(typeof d.combat!=="object")throw TypeError(".POGOProtos.Networking.Responses.OpenCombatSessionResponse.combat: object expected");m.combat=$root.POGOProtos.Data.Combat.Combat.fromObject(d.combat)}return m};OpenCombatSessionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.combat=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.OpenCombatSessionResponse.Result[m.result]:m.result}if(m.combat!=null&&m.hasOwnProperty("combat")){d.combat=$root.POGOProtos.Data.Combat.Combat.toObject(m.combat,o)}return d};OpenCombatSessionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};OpenCombatSessionResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_COMBAT_STATE"]=2;values[valuesById[3]="ERROR_COMBAT_SESSION_FULL"]=3;values[valuesById[4]="ERROR_POKEMON_NOT_IN_INVENTORY"]=4;values[valuesById[5]="ERROR_OPPONENT_NOT_IN_RANGE"]=5;values[valuesById[6]="ERROR_CHALLENGE_EXPIRED"]=6;values[valuesById[7]="ERROR_PLAYER_BELOW_MINIMUM_LEVEL"]=7;values[valuesById[8]="ERROR_OPPONENT_QUIT"]=8;values[valuesById[9]="ERROR_POKEMON_LINEUP_INELIGIBLE_FOR_LEAGUE"]=9;values[valuesById[10]="ERROR_COMBAT_LEAGUE_UNSPECIFIED"]=10;values[valuesById[11]="ERROR_ACCESS_DENIED"]=11;return values}();return OpenCombatSessionResponse}();Responses.OpenGiftResponse=function(){function OpenGiftResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OpenGiftResponse.prototype.result=0;OpenGiftResponse.prototype.items=null;OpenGiftResponse.prototype.egg_pokemon=null;OpenGiftResponse.prototype.updated_friendship_data=null;OpenGiftResponse.prototype.friend_profile=null;OpenGiftResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.items!=null&&m.hasOwnProperty("items"))$root.POGOProtos.Inventory.Loot.encode(m.items,w.uint32(18).fork()).ldelim();if(m.egg_pokemon!=null&&m.hasOwnProperty("egg_pokemon"))$root.POGOProtos.Data.PokemonData.encode(m.egg_pokemon,w.uint32(26).fork()).ldelim();if(m.updated_friendship_data!=null&&m.hasOwnProperty("updated_friendship_data"))$root.POGOProtos.Data.Friends.FriendshipLevelData.encode(m.updated_friendship_data,w.uint32(34).fork()).ldelim();if(m.friend_profile!=null&&m.hasOwnProperty("friend_profile"))$root.POGOProtos.Data.Player.PlayerPublicProfile.encode(m.friend_profile,w.uint32(42).fork()).ldelim();return w};OpenGiftResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.OpenGiftResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.items=$root.POGOProtos.Inventory.Loot.decode(r,r.uint32());break;case 3:m.egg_pokemon=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 4:m.updated_friendship_data=$root.POGOProtos.Data.Friends.FriendshipLevelData.decode(r,r.uint32());break;case 5:m.friend_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};OpenGiftResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.OpenGiftResponse)return d;var m=new $root.POGOProtos.Networking.Responses.OpenGiftResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_PLAYER_BAG_FULL":case 3:m.result=3;break;case"ERROR_PLAYER_LIMIT_REACHED":case 4:m.result=4;break;case"ERROR_GIFT_DOES_NOT_EXIST":case 5:m.result=5;break;case"ERROR_FRIEND_NOT_FOUND":case 6:m.result=6;break;case"ERROR_INVALID_PLAYER_ID":case 7:m.result=7;break;case"ERROR_FRIEND_UPDATE":case 8:m.result=8;break}if(d.items!=null){if(typeof d.items!=="object")throw TypeError(".POGOProtos.Networking.Responses.OpenGiftResponse.items: object expected");m.items=$root.POGOProtos.Inventory.Loot.fromObject(d.items)}if(d.egg_pokemon!=null){if(typeof d.egg_pokemon!=="object")throw TypeError(".POGOProtos.Networking.Responses.OpenGiftResponse.egg_pokemon: object expected");m.egg_pokemon=$root.POGOProtos.Data.PokemonData.fromObject(d.egg_pokemon)}if(d.updated_friendship_data!=null){if(typeof d.updated_friendship_data!=="object")throw TypeError(".POGOProtos.Networking.Responses.OpenGiftResponse.updated_friendship_data: object expected");m.updated_friendship_data=$root.POGOProtos.Data.Friends.FriendshipLevelData.fromObject(d.updated_friendship_data)}if(d.friend_profile!=null){if(typeof d.friend_profile!=="object")throw TypeError(".POGOProtos.Networking.Responses.OpenGiftResponse.friend_profile: object expected");m.friend_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.fromObject(d.friend_profile)}return m};OpenGiftResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.items=null;d.egg_pokemon=null;d.updated_friendship_data=null;d.friend_profile=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.OpenGiftResponse.Result[m.result]:m.result}if(m.items!=null&&m.hasOwnProperty("items")){d.items=$root.POGOProtos.Inventory.Loot.toObject(m.items,o)}if(m.egg_pokemon!=null&&m.hasOwnProperty("egg_pokemon")){d.egg_pokemon=$root.POGOProtos.Data.PokemonData.toObject(m.egg_pokemon,o)}if(m.updated_friendship_data!=null&&m.hasOwnProperty("updated_friendship_data")){d.updated_friendship_data=$root.POGOProtos.Data.Friends.FriendshipLevelData.toObject(m.updated_friendship_data,o)}if(m.friend_profile!=null&&m.hasOwnProperty("friend_profile")){d.friend_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.toObject(m.friend_profile,o)}return d};OpenGiftResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};OpenGiftResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_PLAYER_BAG_FULL"]=3;values[valuesById[4]="ERROR_PLAYER_LIMIT_REACHED"]=4;values[valuesById[5]="ERROR_GIFT_DOES_NOT_EXIST"]=5;values[valuesById[6]="ERROR_FRIEND_NOT_FOUND"]=6;values[valuesById[7]="ERROR_INVALID_PLAYER_ID"]=7;values[valuesById[8]="ERROR_FRIEND_UPDATE"]=8;return values}();return OpenGiftResponse}();Responses.OpenNpcCombatSessionResponse=function(){function OpenNpcCombatSessionResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OpenNpcCombatSessionResponse.prototype.result=0;OpenNpcCombatSessionResponse.prototype.combat=null;OpenNpcCombatSessionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.combat!=null&&m.hasOwnProperty("combat"))$root.POGOProtos.Data.Combat.Combat.encode(m.combat,w.uint32(18).fork()).ldelim();return w};OpenNpcCombatSessionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.OpenNpcCombatSessionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.combat=$root.POGOProtos.Data.Combat.Combat.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};OpenNpcCombatSessionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.OpenNpcCombatSessionResponse)return d;var m=new $root.POGOProtos.Networking.Responses.OpenNpcCombatSessionResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_PLAYER_BELOW_MINIMUM_LEVEL":case 2:m.result=2;break;case"ERROR_POKEMON_LINEUP_INELIGIBLE_FOR_LEAGUE":case 3:m.result=3;break;case"ERROR_ACCESS_DENIED":case 4:m.result=4;break}if(d.combat!=null){if(typeof d.combat!=="object")throw TypeError(".POGOProtos.Networking.Responses.OpenNpcCombatSessionResponse.combat: object expected");m.combat=$root.POGOProtos.Data.Combat.Combat.fromObject(d.combat)}return m};OpenNpcCombatSessionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.combat=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.OpenNpcCombatSessionResponse.Result[m.result]:m.result}if(m.combat!=null&&m.hasOwnProperty("combat")){d.combat=$root.POGOProtos.Data.Combat.Combat.toObject(m.combat,o)}return d};OpenNpcCombatSessionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};OpenNpcCombatSessionResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_PLAYER_BELOW_MINIMUM_LEVEL"]=2;values[valuesById[3]="ERROR_POKEMON_LINEUP_INELIGIBLE_FOR_LEAGUE"]=3;values[valuesById[4]="ERROR_ACCESS_DENIED"]=4;return values}();return OpenNpcCombatSessionResponse}();Responses.OpenTradingResponse=function(){function OpenTradingResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OpenTradingResponse.prototype.result=0;OpenTradingResponse.prototype.trading=null;OpenTradingResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.trading!=null&&m.hasOwnProperty("trading"))$root.POGOProtos.Data.Trading.Trading.encode(m.trading,w.uint32(18).fork()).ldelim();return w};OpenTradingResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.OpenTradingResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.trading=$root.POGOProtos.Data.Trading.Trading.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};OpenTradingResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.OpenTradingResponse)return d;var m=new $root.POGOProtos.Networking.Responses.OpenTradingResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_FRIEND_NOT_FOUND":case 3:m.result=3;break;case"ERROR_INVALID_PLAYER_ID":case 4:m.result=4;break;case"ERROR_INVALID_STATE":case 5:m.result=5;break;case"ERROR_STATE_HANDLER":case 6:m.result=6;break;case"ERROR_TRADING_EXPIRED":case 7:m.result=7;break;case"ERROR_TRADING_COOLDOWN":case 8:m.result=8;break;case"ERROR_PLAYER_ALREADY_OPENED":case 9:m.result=9;break;case"ERROR_FRIEND_OUT_OF_RANGE":case 10:m.result=10;break;case"ERROR_PLAYER_BELOW_MINIMUM_LEVEL":case 11:m.result=11;break;case"ERROR_PLAYER_REACHED_DAILY_LIMIT":case 12:m.result=12;break;case"ERROR_FRIEND_REACHED_DAILY_LIMIT":case 13:m.result=13;break;case"ERROR_PLAYER_NOT_ENOUGH_STARDUST":case 14:m.result=14;break;case"ERROR_FRIEND_NOT_ENOUGH_STARDUST":case 15:m.result=15;break;case"ERROR_FRIEND_BELOW_MINIMUM_LEVEL":case 16:m.result=16;break}if(d.trading!=null){if(typeof d.trading!=="object")throw TypeError(".POGOProtos.Networking.Responses.OpenTradingResponse.trading: object expected");m.trading=$root.POGOProtos.Data.Trading.Trading.fromObject(d.trading)}return m};OpenTradingResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.trading=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.OpenTradingResponse.Result[m.result]:m.result}if(m.trading!=null&&m.hasOwnProperty("trading")){d.trading=$root.POGOProtos.Data.Trading.Trading.toObject(m.trading,o)}return d};OpenTradingResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};OpenTradingResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_FRIEND_NOT_FOUND"]=3;values[valuesById[4]="ERROR_INVALID_PLAYER_ID"]=4;values[valuesById[5]="ERROR_INVALID_STATE"]=5;values[valuesById[6]="ERROR_STATE_HANDLER"]=6;values[valuesById[7]="ERROR_TRADING_EXPIRED"]=7;values[valuesById[8]="ERROR_TRADING_COOLDOWN"]=8;values[valuesById[9]="ERROR_PLAYER_ALREADY_OPENED"]=9;values[valuesById[10]="ERROR_FRIEND_OUT_OF_RANGE"]=10;values[valuesById[11]="ERROR_PLAYER_BELOW_MINIMUM_LEVEL"]=11;values[valuesById[12]="ERROR_PLAYER_REACHED_DAILY_LIMIT"]=12;values[valuesById[13]="ERROR_FRIEND_REACHED_DAILY_LIMIT"]=13;values[valuesById[14]="ERROR_PLAYER_NOT_ENOUGH_STARDUST"]=14;values[valuesById[15]="ERROR_FRIEND_NOT_ENOUGH_STARDUST"]=15;values[valuesById[16]="ERROR_FRIEND_BELOW_MINIMUM_LEVEL"]=16;return values}();return OpenTradingResponse}();Responses.RegisterPushNotificationResponse=function(){function RegisterPushNotificationResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RegisterPushNotificationResponse.prototype.result=0;RegisterPushNotificationResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};RegisterPushNotificationResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.RegisterPushNotificationResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};RegisterPushNotificationResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.RegisterPushNotificationResponse)return d;var m=new $root.POGOProtos.Networking.Responses.RegisterPushNotificationResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"NO_CHANGE":case 2:m.result=2;break}return m};RegisterPushNotificationResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.RegisterPushNotificationResponse.Result[m.result]:m.result}return d};RegisterPushNotificationResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RegisterPushNotificationResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="NO_CHANGE"]=2;return values}();return RegisterPushNotificationResponse}();Responses.UpdateNotificationStatusResponse=function(){function UpdateNotificationStatusResponse(p){this.notification_ids=[];this.create_timestamp_ms=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateNotificationStatusResponse.prototype.notification_ids=$util.emptyArray;UpdateNotificationStatusResponse.prototype.create_timestamp_ms=$util.emptyArray;UpdateNotificationStatusResponse.prototype.state=0;UpdateNotificationStatusResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.notification_ids!=null&&m.notification_ids.length){for(var i=0;i<m.notification_ids.length;++i)w.uint32(10).string(m.notification_ids[i])}if(m.create_timestamp_ms!=null&&m.create_timestamp_ms.length){w.uint32(18).fork();for(var i=0;i<m.create_timestamp_ms.length;++i)w.int64(m.create_timestamp_ms[i]);w.ldelim()}if(m.state!=null&&m.hasOwnProperty("state"))w.uint32(24).int32(m.state);return w};UpdateNotificationStatusResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UpdateNotificationStatusResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.notification_ids&&m.notification_ids.length))m.notification_ids=[];m.notification_ids.push(r.string());break;case 2:if(!(m.create_timestamp_ms&&m.create_timestamp_ms.length))m.create_timestamp_ms=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.create_timestamp_ms.push(r.int64())}else m.create_timestamp_ms.push(r.int64());break;case 3:m.state=r.int32();break;default:r.skipType(t&7);break}}return m};UpdateNotificationStatusResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UpdateNotificationStatusResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UpdateNotificationStatusResponse;if(d.notification_ids){if(!Array.isArray(d.notification_ids))throw TypeError(".POGOProtos.Networking.Responses.UpdateNotificationStatusResponse.notification_ids: array expected");m.notification_ids=[];for(var i=0;i<d.notification_ids.length;++i){m.notification_ids[i]=String(d.notification_ids[i])}}if(d.create_timestamp_ms){if(!Array.isArray(d.create_timestamp_ms))throw TypeError(".POGOProtos.Networking.Responses.UpdateNotificationStatusResponse.create_timestamp_ms: array expected");m.create_timestamp_ms=[];for(var i=0;i<d.create_timestamp_ms.length;++i){if($util.Long)(m.create_timestamp_ms[i]=$util.Long.fromValue(d.create_timestamp_ms[i])).unsigned=false;else if(typeof d.create_timestamp_ms[i]==="string")m.create_timestamp_ms[i]=parseInt(d.create_timestamp_ms[i],10);else if(typeof d.create_timestamp_ms[i]==="number")m.create_timestamp_ms[i]=d.create_timestamp_ms[i];else if(typeof d.create_timestamp_ms[i]==="object")m.create_timestamp_ms[i]=new $util.LongBits(d.create_timestamp_ms[i].low>>>0,d.create_timestamp_ms[i].high>>>0).toNumber()}}switch(d.state){case"UNSET_STATE":case 0:m.state=0;break;case"VIEWED":case 1:m.state=1;break}return m};UpdateNotificationStatusResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.notification_ids=[];d.create_timestamp_ms=[]}if(o.defaults){d.state=o.enums===String?"UNSET_STATE":0}if(m.notification_ids&&m.notification_ids.length){d.notification_ids=[];for(var j=0;j<m.notification_ids.length;++j){d.notification_ids[j]=m.notification_ids[j]}}if(m.create_timestamp_ms&&m.create_timestamp_ms.length){d.create_timestamp_ms=[];for(var j=0;j<m.create_timestamp_ms.length;++j){if(typeof m.create_timestamp_ms[j]==="number")d.create_timestamp_ms[j]=o.longs===String?String(m.create_timestamp_ms[j]):m.create_timestamp_ms[j];else d.create_timestamp_ms[j]=o.longs===String?$util.Long.prototype.toString.call(m.create_timestamp_ms[j]):o.longs===Number?new $util.LongBits(m.create_timestamp_ms[j].low>>>0,m.create_timestamp_ms[j].high>>>0).toNumber():m.create_timestamp_ms[j]}}if(m.state!=null&&m.hasOwnProperty("state")){d.state=o.enums===String?$root.POGOProtos.Enums.NotificationState[m.state]:m.state}return d};UpdateNotificationStatusResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UpdateNotificationStatusResponse}();Responses.OptOutPushNotificationCategoryResponse=function(){function OptOutPushNotificationCategoryResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OptOutPushNotificationCategoryResponse.encode=function encode(m,w){if(!w)w=$Writer.create();return w};OptOutPushNotificationCategoryResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.OptOutPushNotificationCategoryResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};OptOutPushNotificationCategoryResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.OptOutPushNotificationCategoryResponse)return d;return new $root.POGOProtos.Networking.Responses.OptOutPushNotificationCategoryResponse};OptOutPushNotificationCategoryResponse.toObject=function toObject(){return{}};OptOutPushNotificationCategoryResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return OptOutPushNotificationCategoryResponse}();Responses.RedeemPasscodeResponse=function(){function RedeemPasscodeResponse(p){this.acquired_item=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RedeemPasscodeResponse.prototype.result=0;RedeemPasscodeResponse.prototype.acquired_item=$util.emptyArray;RedeemPasscodeResponse.prototype.acquired_items_proto=$util.newBuffer([]);RedeemPasscodeResponse.prototype.passcode="";RedeemPasscodeResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.acquired_item!=null&&m.acquired_item.length){for(var i=0;i<m.acquired_item.length;++i)$root.POGOProtos.Networking.Responses.RedeemPasscodeResponse.AcquiredItem.encode(m.acquired_item[i],w.uint32(18).fork()).ldelim()}if(m.acquired_items_proto!=null&&m.hasOwnProperty("acquired_items_proto"))w.uint32(26).bytes(m.acquired_items_proto);if(m.passcode!=null&&m.hasOwnProperty("passcode"))w.uint32(34).string(m.passcode);return w};RedeemPasscodeResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.RedeemPasscodeResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.acquired_item&&m.acquired_item.length))m.acquired_item=[];m.acquired_item.push($root.POGOProtos.Networking.Responses.RedeemPasscodeResponse.AcquiredItem.decode(r,r.uint32()));break;case 3:m.acquired_items_proto=r.bytes();break;case 4:m.passcode=r.string();break;default:r.skipType(t&7);break}}return m};RedeemPasscodeResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.RedeemPasscodeResponse)return d;var m=new $root.POGOProtos.Networking.Responses.RedeemPasscodeResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"NOT_AVAILABLE":case 2:m.result=2;break;case"OVER_INVENTORY_LIMIT":case 3:m.result=3;break;case"ALREADY_REDEEMED":case 4:m.result=4;break;case"OVER_PLAYER_REDEMPTION_LIMIT":case 5:m.result=5;break}if(d.acquired_item){if(!Array.isArray(d.acquired_item))throw TypeError(".POGOProtos.Networking.Responses.RedeemPasscodeResponse.acquired_item: array expected");m.acquired_item=[];for(var i=0;i<d.acquired_item.length;++i){if(typeof d.acquired_item[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.RedeemPasscodeResponse.acquired_item: object expected");m.acquired_item[i]=$root.POGOProtos.Networking.Responses.RedeemPasscodeResponse.AcquiredItem.fromObject(d.acquired_item[i])}}if(d.acquired_items_proto!=null){if(typeof d.acquired_items_proto==="string")$util.base64.decode(d.acquired_items_proto,m.acquired_items_proto=$util.newBuffer($util.base64.length(d.acquired_items_proto)),0);else if(d.acquired_items_proto.length)m.acquired_items_proto=d.acquired_items_proto}if(d.passcode!=null){m.passcode=String(d.passcode)}return m};RedeemPasscodeResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.acquired_item=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0;if(o.bytes===String)d.acquired_items_proto="";else{d.acquired_items_proto=[];if(o.bytes!==Array)d.acquired_items_proto=$util.newBuffer(d.acquired_items_proto)}d.passcode=""}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.RedeemPasscodeResponse.Result[m.result]:m.result}if(m.acquired_item&&m.acquired_item.length){d.acquired_item=[];for(var j=0;j<m.acquired_item.length;++j){d.acquired_item[j]=$root.POGOProtos.Networking.Responses.RedeemPasscodeResponse.AcquiredItem.toObject(m.acquired_item[j],o)}}if(m.acquired_items_proto!=null&&m.hasOwnProperty("acquired_items_proto")){d.acquired_items_proto=o.bytes===String?$util.base64.encode(m.acquired_items_proto,0,m.acquired_items_proto.length):o.bytes===Array?Array.prototype.slice.call(m.acquired_items_proto):m.acquired_items_proto}if(m.passcode!=null&&m.hasOwnProperty("passcode")){d.passcode=m.passcode}return d};RedeemPasscodeResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RedeemPasscodeResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="NOT_AVAILABLE"]=2;values[valuesById[3]="OVER_INVENTORY_LIMIT"]=3;values[valuesById[4]="ALREADY_REDEEMED"]=4;values[valuesById[5]="OVER_PLAYER_REDEMPTION_LIMIT"]=5;return values}();RedeemPasscodeResponse.AcquiredItem=function(){function AcquiredItem(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AcquiredItem.prototype.item="";AcquiredItem.prototype.count=$util.Long?$util.Long.fromBits(0,0,false):0;AcquiredItem.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item!=null&&m.hasOwnProperty("item"))w.uint32(10).string(m.item);if(m.count!=null&&m.hasOwnProperty("count"))w.uint32(16).int64(m.count);return w};AcquiredItem.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.RedeemPasscodeResponse.AcquiredItem;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item=r.string();break;case 2:m.count=r.int64();break;default:r.skipType(t&7);break}}return m};AcquiredItem.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.RedeemPasscodeResponse.AcquiredItem)return d;var m=new $root.POGOProtos.Networking.Responses.RedeemPasscodeResponse.AcquiredItem;if(d.item!=null){m.item=String(d.item)}if(d.count!=null){if($util.Long)(m.count=$util.Long.fromValue(d.count)).unsigned=false;else if(typeof d.count==="string")m.count=parseInt(d.count,10);else if(typeof d.count==="number")m.count=d.count;else if(typeof d.count==="object")m.count=new $util.LongBits(d.count.low>>>0,d.count.high>>>0).toNumber()}return m};AcquiredItem.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item="";if($util.Long){var n=new $util.Long(0,0,false);d.count=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.count=o.longs===String?"0":0}if(m.item!=null&&m.hasOwnProperty("item")){d.item=m.item}if(m.count!=null&&m.hasOwnProperty("count")){if(typeof m.count==="number")d.count=o.longs===String?String(m.count):m.count;else d.count=o.longs===String?$util.Long.prototype.toString.call(m.count):o.longs===Number?new $util.LongBits(m.count.low>>>0,m.count.high>>>0).toNumber():m.count}return d};AcquiredItem.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return AcquiredItem}();return RedeemPasscodeResponse}();Responses.AddNewPoiResponse=function(){function AddNewPoiResponse(p){this.message=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AddNewPoiResponse.prototype.status=0;AddNewPoiResponse.prototype.message=$util.emptyArray;AddNewPoiResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.message!=null&&m.message.length){for(var i=0;i<m.message.length;++i)w.uint32(18).string(m.message[i])}return w};AddNewPoiResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.AddNewPoiResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:if(!(m.message&&m.message.length))m.message=[];m.message.push(r.string());break;default:r.skipType(t&7);break}}return m};AddNewPoiResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.AddNewPoiResponse)return d;var m=new $root.POGOProtos.Networking.Responses.AddNewPoiResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"FAILURE":case 2:m.status=2;break;case"INTERNAL_ERROR":case 3:m.status=3;break;case"TOO_MANY_RECENT_SUBMISSIONS":case 4:m.status=4;break;case"INVALID_INPUT":case 5:m.status=5;break}if(d.message){if(!Array.isArray(d.message))throw TypeError(".POGOProtos.Networking.Responses.AddNewPoiResponse.message: array expected");m.message=[];for(var i=0;i<d.message.length;++i){m.message[i]=String(d.message[i])}}return m};AddNewPoiResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.message=[]}if(o.defaults){d.status=o.enums===String?"UNSET":0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.AddNewPoiResponse.Status[m.status]:m.status}if(m.message&&m.message.length){d.message=[];for(var j=0;j<m.message.length;++j){d.message[j]=m.message[j]}}return d};AddNewPoiResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AddNewPoiResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;values[valuesById[3]="INTERNAL_ERROR"]=3;values[valuesById[4]="TOO_MANY_RECENT_SUBMISSIONS"]=4;values[valuesById[5]="INVALID_INPUT"]=5;return values}();return AddNewPoiResponse}();Responses.ProxySocialActionResponse=function(){function ProxySocialActionResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ProxySocialActionResponse.prototype.status=0;ProxySocialActionResponse.prototype.assigned_host="";ProxySocialActionResponse.prototype.payload=$util.newBuffer([]);ProxySocialActionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.assigned_host!=null&&m.hasOwnProperty("assigned_host"))w.uint32(18).string(m.assigned_host);if(m.payload!=null&&m.hasOwnProperty("payload"))w.uint32(26).bytes(m.payload);return w};ProxySocialActionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.ProxySocialActionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.assigned_host=r.string();break;case 3:m.payload=r.bytes();break;default:r.skipType(t&7);break}}return m};ProxySocialActionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.ProxySocialActionResponse)return d;var m=new $root.POGOProtos.Networking.Responses.ProxySocialActionResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"COMPLETED":case 1:m.status=1;break;case"COMPLETED_AND_REASSIGNED":case 2:m.status=2;break;case"ACTION_NOT_FOUND":case 3:m.status=3;break;case"ASSIGNMENT_ERROR":case 4:m.status=4;break;case"PROXY_UNAUTHORIZED_ERROR":case 5:m.status=5;break;case"INTERNAL_ERROR":case 6:m.status=6;break;case"BAD_REQUEST":case 7:m.status=7;break;case"ACCESS_DENIED":case 8:m.status=8;break;case"TIMEOUT_ERROR":case 9:m.status=9;break;case"RATE_LIMITED":case 10:m.status=10;break}if(d.assigned_host!=null){m.assigned_host=String(d.assigned_host)}if(d.payload!=null){if(typeof d.payload==="string")$util.base64.decode(d.payload,m.payload=$util.newBuffer($util.base64.length(d.payload)),0);else if(d.payload.length)m.payload=d.payload}return m};ProxySocialActionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0;d.assigned_host="";if(o.bytes===String)d.payload="";else{d.payload=[];if(o.bytes!==Array)d.payload=$util.newBuffer(d.payload)}}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.ProxySocialActionResponse.Status[m.status]:m.status}if(m.assigned_host!=null&&m.hasOwnProperty("assigned_host")){d.assigned_host=m.assigned_host}if(m.payload!=null&&m.hasOwnProperty("payload")){d.payload=o.bytes===String?$util.base64.encode(m.payload,0,m.payload.length):o.bytes===Array?Array.prototype.slice.call(m.payload):m.payload}return d};ProxySocialActionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ProxySocialActionResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="COMPLETED"]=1;values[valuesById[2]="COMPLETED_AND_REASSIGNED"]=2;values[valuesById[3]="ACTION_NOT_FOUND"]=3;values[valuesById[4]="ASSIGNMENT_ERROR"]=4;values[valuesById[5]="PROXY_UNAUTHORIZED_ERROR"]=5;values[valuesById[6]="INTERNAL_ERROR"]=6;values[valuesById[7]="BAD_REQUEST"]=7;values[valuesById[8]="ACCESS_DENIED"]=8;values[valuesById[9]="TIMEOUT_ERROR"]=9;values[valuesById[10]="RATE_LIMITED"]=10;return values}();return ProxySocialActionResponse}();Responses.ProxySocialSideChannelActionResponse=function(){function ProxySocialSideChannelActionResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ProxySocialSideChannelActionResponse.prototype.status=0;ProxySocialSideChannelActionResponse.prototype.assigned_host="";ProxySocialSideChannelActionResponse.prototype.payload=$util.newBuffer([]);ProxySocialSideChannelActionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.assigned_host!=null&&m.hasOwnProperty("assigned_host"))w.uint32(18).string(m.assigned_host);if(m.payload!=null&&m.hasOwnProperty("payload"))w.uint32(26).bytes(m.payload);return w};ProxySocialSideChannelActionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.ProxySocialSideChannelActionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.assigned_host=r.string();break;case 3:m.payload=r.bytes();break;default:r.skipType(t&7);break}}return m};ProxySocialSideChannelActionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.ProxySocialSideChannelActionResponse)return d;var m=new $root.POGOProtos.Networking.Responses.ProxySocialSideChannelActionResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"COMPLETED":case 1:m.status=1;break;case"COMPLETED_AND_REASSIGNED":case 2:m.status=2;break;case"ACTION_NOT_FOUND":case 3:m.status=3;break;case"ASSIGNMENT_ERROR":case 4:m.status=4;break;case"PROXY_UNAUTHORIZED_ERROR":case 5:m.status=5;break;case"INTERNAL_ERROR":case 6:m.status=6;break;case"BAD_REQUEST":case 7:m.status=7;break;case"ACCESS_DENIED":case 8:m.status=8;break;case"TIMEOUT_ERROR":case 9:m.status=9;break;case"RATE_LIMITED":case 10:m.status=10;break}if(d.assigned_host!=null){m.assigned_host=String(d.assigned_host)}if(d.payload!=null){if(typeof d.payload==="string")$util.base64.decode(d.payload,m.payload=$util.newBuffer($util.base64.length(d.payload)),0);else if(d.payload.length)m.payload=d.payload}return m};ProxySocialSideChannelActionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0;d.assigned_host="";if(o.bytes===String)d.payload="";else{d.payload=[];if(o.bytes!==Array)d.payload=$util.newBuffer(d.payload)}}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.ProxySocialSideChannelActionResponse.Status[m.status]:m.status}if(m.assigned_host!=null&&m.hasOwnProperty("assigned_host")){d.assigned_host=m.assigned_host}if(m.payload!=null&&m.hasOwnProperty("payload")){d.payload=o.bytes===String?$util.base64.encode(m.payload,0,m.payload.length):o.bytes===Array?Array.prototype.slice.call(m.payload):m.payload}return d};ProxySocialSideChannelActionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ProxySocialSideChannelActionResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="COMPLETED"]=1;values[valuesById[2]="COMPLETED_AND_REASSIGNED"]=2;values[valuesById[3]="ACTION_NOT_FOUND"]=3;values[valuesById[4]="ASSIGNMENT_ERROR"]=4;values[valuesById[5]="PROXY_UNAUTHORIZED_ERROR"]=5;values[valuesById[6]="INTERNAL_ERROR"]=6;values[valuesById[7]="BAD_REQUEST"]=7;values[valuesById[8]="ACCESS_DENIED"]=8;values[valuesById[9]="TIMEOUT_ERROR"]=9;values[valuesById[10]="RATE_LIMITED"]=10;return values}();return ProxySocialSideChannelActionResponse}();Responses.GetAvailableSubmissionsResponse=function(){function GetAvailableSubmissionsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetAvailableSubmissionsResponse.prototype.submissions_left=0;GetAvailableSubmissionsResponse.prototype.min_player_level=0;GetAvailableSubmissionsResponse.prototype.has_valid_email=false;GetAvailableSubmissionsResponse.prototype.is_feature_enabled=false;GetAvailableSubmissionsResponse.prototype.time_window_for_submissions_limit_ms=$util.Long?$util.Long.fromBits(0,0,false):0;GetAvailableSubmissionsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.submissions_left!=null&&m.hasOwnProperty("submissions_left"))w.uint32(8).int32(m.submissions_left);if(m.min_player_level!=null&&m.hasOwnProperty("min_player_level"))w.uint32(16).int32(m.min_player_level);if(m.has_valid_email!=null&&m.hasOwnProperty("has_valid_email"))w.uint32(24).bool(m.has_valid_email);if(m.is_feature_enabled!=null&&m.hasOwnProperty("is_feature_enabled"))w.uint32(32).bool(m.is_feature_enabled);if(m.time_window_for_submissions_limit_ms!=null&&m.hasOwnProperty("time_window_for_submissions_limit_ms"))w.uint32(40).int64(m.time_window_for_submissions_limit_ms);return w};GetAvailableSubmissionsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.GetAvailableSubmissionsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.submissions_left=r.int32();break;case 2:m.min_player_level=r.int32();break;case 3:m.has_valid_email=r.bool();break;case 4:m.is_feature_enabled=r.bool();break;case 5:m.time_window_for_submissions_limit_ms=r.int64();break;default:r.skipType(t&7);break}}return m};GetAvailableSubmissionsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.GetAvailableSubmissionsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.GetAvailableSubmissionsResponse;if(d.submissions_left!=null){m.submissions_left=d.submissions_left|0}if(d.min_player_level!=null){m.min_player_level=d.min_player_level|0}if(d.has_valid_email!=null){m.has_valid_email=Boolean(d.has_valid_email)}if(d.is_feature_enabled!=null){m.is_feature_enabled=Boolean(d.is_feature_enabled)}if(d.time_window_for_submissions_limit_ms!=null){if($util.Long)(m.time_window_for_submissions_limit_ms=$util.Long.fromValue(d.time_window_for_submissions_limit_ms)).unsigned=false;else if(typeof d.time_window_for_submissions_limit_ms==="string")m.time_window_for_submissions_limit_ms=parseInt(d.time_window_for_submissions_limit_ms,10);else if(typeof d.time_window_for_submissions_limit_ms==="number")m.time_window_for_submissions_limit_ms=d.time_window_for_submissions_limit_ms;else if(typeof d.time_window_for_submissions_limit_ms==="object")m.time_window_for_submissions_limit_ms=new $util.LongBits(d.time_window_for_submissions_limit_ms.low>>>0,d.time_window_for_submissions_limit_ms.high>>>0).toNumber()}return m};GetAvailableSubmissionsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.submissions_left=0;d.min_player_level=0;d.has_valid_email=false;d.is_feature_enabled=false;if($util.Long){var n=new $util.Long(0,0,false);d.time_window_for_submissions_limit_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.time_window_for_submissions_limit_ms=o.longs===String?"0":0}if(m.submissions_left!=null&&m.hasOwnProperty("submissions_left")){d.submissions_left=m.submissions_left}if(m.min_player_level!=null&&m.hasOwnProperty("min_player_level")){d.min_player_level=m.min_player_level}if(m.has_valid_email!=null&&m.hasOwnProperty("has_valid_email")){d.has_valid_email=m.has_valid_email}if(m.is_feature_enabled!=null&&m.hasOwnProperty("is_feature_enabled")){d.is_feature_enabled=m.is_feature_enabled}if(m.time_window_for_submissions_limit_ms!=null&&m.hasOwnProperty("time_window_for_submissions_limit_ms")){if(typeof m.time_window_for_submissions_limit_ms==="number")d.time_window_for_submissions_limit_ms=o.longs===String?String(m.time_window_for_submissions_limit_ms):m.time_window_for_submissions_limit_ms;else d.time_window_for_submissions_limit_ms=o.longs===String?$util.Long.prototype.toString.call(m.time_window_for_submissions_limit_ms):o.longs===Number?new $util.LongBits(m.time_window_for_submissions_limit_ms.low>>>0,m.time_window_for_submissions_limit_ms.high>>>0).toNumber():m.time_window_for_submissions_limit_ms}return d};GetAvailableSubmissionsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GetAvailableSubmissionsResponse}();Responses.PushNotificationRegistryResponse=function(){function PushNotificationRegistryResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PushNotificationRegistryResponse.prototype.result=0;PushNotificationRegistryResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};PushNotificationRegistryResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.PushNotificationRegistryResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};PushNotificationRegistryResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.PushNotificationRegistryResponse)return d;var m=new $root.POGOProtos.Networking.Responses.PushNotificationRegistryResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"NO_CHANGE":case 2:m.result=2;break}return m};PushNotificationRegistryResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.PushNotificationRegistryResponse.Result[m.result]:m.result}return d};PushNotificationRegistryResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PushNotificationRegistryResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="NO_CHANGE"]=2;return values}();return PushNotificationRegistryResponse}();Responses.AddLoginActionResponse=function(){function AddLoginActionResponse(p){this.login_detail=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AddLoginActionResponse.prototype.success=false;AddLoginActionResponse.prototype.login_detail=$util.emptyArray;AddLoginActionResponse.prototype.status=0;AddLoginActionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.login_detail!=null&&m.login_detail.length){for(var i=0;i<m.login_detail.length;++i)$root.POGOProtos.Data.Login.LoginDetail.encode(m.login_detail[i],w.uint32(18).fork()).ldelim()}if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(24).int32(m.status);return w};AddLoginActionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.AddLoginActionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:if(!(m.login_detail&&m.login_detail.length))m.login_detail=[];m.login_detail.push($root.POGOProtos.Data.Login.LoginDetail.decode(r,r.uint32()));break;case 3:m.status=r.int32();break;default:r.skipType(t&7);break}}return m};AddLoginActionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.AddLoginActionResponse)return d;var m=new $root.POGOProtos.Networking.Responses.AddLoginActionResponse;if(d.success!=null){m.success=Boolean(d.success)}if(d.login_detail){if(!Array.isArray(d.login_detail))throw TypeError(".POGOProtos.Networking.Responses.AddLoginActionResponse.login_detail: array expected");m.login_detail=[];for(var i=0;i<d.login_detail.length;++i){if(typeof d.login_detail[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.AddLoginActionResponse.login_detail: object expected");m.login_detail[i]=$root.POGOProtos.Data.Login.LoginDetail.fromObject(d.login_detail[i])}}switch(d.status){case"UNSET":case 0:m.status=0;break;case"AUTH_FAILURE":case 1:m.status=1;break;case"LOGIN_TAKEN":case 2:m.status=2;break}return m};AddLoginActionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.login_detail=[]}if(o.defaults){d.success=false;d.status=o.enums===String?"UNSET":0}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.login_detail&&m.login_detail.length){d.login_detail=[];for(var j=0;j<m.login_detail.length;++j){d.login_detail[j]=$root.POGOProtos.Data.Login.LoginDetail.toObject(m.login_detail[j],o)}}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.AddLoginActionResponse.Status[m.status]:m.status}return d};AddLoginActionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AddLoginActionResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="AUTH_FAILURE"]=1;values[valuesById[2]="LOGIN_TAKEN"]=2;return values}();return AddLoginActionResponse}();Responses.RemoveLoginActionResponse=function(){function RemoveLoginActionResponse(p){this.login_detail=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RemoveLoginActionResponse.prototype.success=false;RemoveLoginActionResponse.prototype.login_detail=$util.emptyArray;RemoveLoginActionResponse.prototype.status=0;RemoveLoginActionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.login_detail!=null&&m.login_detail.length){for(var i=0;i<m.login_detail.length;++i)$root.POGOProtos.Data.Login.LoginDetail.encode(m.login_detail[i],w.uint32(18).fork()).ldelim()}if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(24).int32(m.status);return w};RemoveLoginActionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.RemoveLoginActionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:if(!(m.login_detail&&m.login_detail.length))m.login_detail=[];m.login_detail.push($root.POGOProtos.Data.Login.LoginDetail.decode(r,r.uint32()));break;case 3:m.status=r.int32();break;default:r.skipType(t&7);break}}return m};RemoveLoginActionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.RemoveLoginActionResponse)return d;var m=new $root.POGOProtos.Networking.Responses.RemoveLoginActionResponse;if(d.success!=null){m.success=Boolean(d.success)}if(d.login_detail){if(!Array.isArray(d.login_detail))throw TypeError(".POGOProtos.Networking.Responses.RemoveLoginActionResponse.login_detail: array expected");m.login_detail=[];for(var i=0;i<d.login_detail.length;++i){if(typeof d.login_detail[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.RemoveLoginActionResponse.login_detail: object expected");m.login_detail[i]=$root.POGOProtos.Data.Login.LoginDetail.fromObject(d.login_detail[i])}}switch(d.status){case"UNSET":case 0:m.status=0;break;case"LOGIN_NOT_REMOVABLE":case 1:m.status=1;break}return m};RemoveLoginActionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.login_detail=[]}if(o.defaults){d.success=false;d.status=o.enums===String?"UNSET":0}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.login_detail&&m.login_detail.length){d.login_detail=[];for(var j=0;j<m.login_detail.length;++j){d.login_detail[j]=$root.POGOProtos.Data.Login.LoginDetail.toObject(m.login_detail[j],o)}}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.RemoveLoginActionResponse.Status[m.status]:m.status}return d};RemoveLoginActionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RemoveLoginActionResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="LOGIN_NOT_REMOVABLE"]=1;return values}();return RemoveLoginActionResponse}();Responses.SubmitNewPoiResponse=function(){function SubmitNewPoiResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SubmitNewPoiResponse.prototype.status=0;SubmitNewPoiResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);return w};SubmitNewPoiResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SubmitNewPoiResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;default:r.skipType(t&7);break}}return m};SubmitNewPoiResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SubmitNewPoiResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SubmitNewPoiResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"FAILURE":case 2:m.status=2;break;case"INTERNAL_ERROR":case 3:m.status=3;break;case"TOO_MANY_RECENT_SUBMISSIONS":case 4:m.status=4;break;case"INVALID_INPUT":case 5:m.status=5;break;case"MINOR":case 6:m.status=6;break;case"NOT_AVAILABLE":case 7:m.status=7;break}return m};SubmitNewPoiResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.SubmitNewPoiResponse.Status[m.status]:m.status}return d};SubmitNewPoiResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SubmitNewPoiResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;values[valuesById[3]="INTERNAL_ERROR"]=3;values[valuesById[4]="TOO_MANY_RECENT_SUBMISSIONS"]=4;values[valuesById[5]="INVALID_INPUT"]=5;values[valuesById[6]="MINOR"]=6;values[valuesById[7]="NOT_AVAILABLE"]=7;return values}();return SubmitNewPoiResponse}();Responses.UploadPoiPhotoByUrlResponse=function(){function UploadPoiPhotoByUrlResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UploadPoiPhotoByUrlResponse.prototype.status=0;UploadPoiPhotoByUrlResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);return w};UploadPoiPhotoByUrlResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UploadPoiPhotoByUrlResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;default:r.skipType(t&7);break}}return m};UploadPoiPhotoByUrlResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UploadPoiPhotoByUrlResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UploadPoiPhotoByUrlResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"FEATURE_DISABLED":case 2:m.status=2;break;case"ALREADY_UPLOADED":case 3:m.status=3;break;case"IMAGE_NOT_FOUND":case 4:m.status=4;break;case"IMAGE_TOO_BIG":case 5:m.status=5;break;case"IMAGE_NOT_SERVABLE":case 6:m.status=6;break;case"PORTAL_NOT_FOUND":case 7:m.status=7;break}return m};UploadPoiPhotoByUrlResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.UploadPoiPhotoByUrlResponse.Result[m.status]:m.status}return d};UploadPoiPhotoByUrlResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UploadPoiPhotoByUrlResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FEATURE_DISABLED"]=2;values[valuesById[3]="ALREADY_UPLOADED"]=3;values[valuesById[4]="IMAGE_NOT_FOUND"]=4;values[valuesById[5]="IMAGE_TOO_BIG"]=5;values[valuesById[6]="IMAGE_NOT_SERVABLE"]=6;values[valuesById[7]="PORTAL_NOT_FOUND"]=7;return values}();return UploadPoiPhotoByUrlResponse}();Responses.PingResponse=function(){function PingResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PingResponse.prototype.user_info="";PingResponse.prototype.server_info="";PingResponse.prototype.random_response_bytes="";PingResponse.prototype.return_value="";PingResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.user_info!=null&&m.hasOwnProperty("user_info"))w.uint32(10).string(m.user_info);if(m.server_info!=null&&m.hasOwnProperty("server_info"))w.uint32(18).string(m.server_info);if(m.random_response_bytes!=null&&m.hasOwnProperty("random_response_bytes"))w.uint32(26).string(m.random_response_bytes);if(m.return_value!=null&&m.hasOwnProperty("return_value"))w.uint32(34).string(m.return_value);return w};PingResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.PingResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.user_info=r.string();break;case 2:m.server_info=r.string();break;case 3:m.random_response_bytes=r.string();break;case 4:m.return_value=r.string();break;default:r.skipType(t&7);break}}return m};PingResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.PingResponse)return d;var m=new $root.POGOProtos.Networking.Responses.PingResponse;if(d.user_info!=null){m.user_info=String(d.user_info)}if(d.server_info!=null){m.server_info=String(d.server_info)}if(d.random_response_bytes!=null){m.random_response_bytes=String(d.random_response_bytes)}if(d.return_value!=null){m.return_value=String(d.return_value)}return m};PingResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.user_info="";d.server_info="";d.random_response_bytes="";d.return_value=""}if(m.user_info!=null&&m.hasOwnProperty("user_info")){d.user_info=m.user_info}if(m.server_info!=null&&m.hasOwnProperty("server_info")){d.server_info=m.server_info}if(m.random_response_bytes!=null&&m.hasOwnProperty("random_response_bytes")){d.random_response_bytes=m.random_response_bytes}if(m.return_value!=null&&m.hasOwnProperty("return_value")){d.return_value=m.return_value}return d};PingResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PingResponse}();Responses.ReplaceLoginActionResponse=function(){function ReplaceLoginActionResponse(p){this.login_detail=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ReplaceLoginActionResponse.prototype.success=false;ReplaceLoginActionResponse.prototype.login_detail=$util.emptyArray;ReplaceLoginActionResponse.prototype.status=0;ReplaceLoginActionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.login_detail!=null&&m.login_detail.length){for(var i=0;i<m.login_detail.length;++i)$root.POGOProtos.Data.Login.LoginDetail.encode(m.login_detail[i],w.uint32(18).fork()).ldelim()}if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(24).int32(m.status);return w};ReplaceLoginActionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.ReplaceLoginActionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:if(!(m.login_detail&&m.login_detail.length))m.login_detail=[];m.login_detail.push($root.POGOProtos.Data.Login.LoginDetail.decode(r,r.uint32()));break;case 3:m.status=r.int32();break;default:r.skipType(t&7);break}}return m};ReplaceLoginActionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.ReplaceLoginActionResponse)return d;var m=new $root.POGOProtos.Networking.Responses.ReplaceLoginActionResponse;if(d.success!=null){m.success=Boolean(d.success)}if(d.login_detail){if(!Array.isArray(d.login_detail))throw TypeError(".POGOProtos.Networking.Responses.ReplaceLoginActionResponse.login_detail: array expected");m.login_detail=[];for(var i=0;i<d.login_detail.length;++i){if(typeof d.login_detail[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.ReplaceLoginActionResponse.login_detail: object expected");m.login_detail[i]=$root.POGOProtos.Data.Login.LoginDetail.fromObject(d.login_detail[i])}}switch(d.status){case"UNSET":case 0:m.status=0;break;case"AUTH_FAILURE":case 1:m.status=1;break;case"LOGIN_TAKEN":case 2:m.status=2;break;case"LOGIN_ALREADY_HAVE":case 3:m.status=3;break;case"LOGIN_NOT_REPLACEABLE":case 4:m.status=4;break}return m};ReplaceLoginActionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.login_detail=[]}if(o.defaults){d.success=false;d.status=o.enums===String?"UNSET":0}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.login_detail&&m.login_detail.length){d.login_detail=[];for(var j=0;j<m.login_detail.length;++j){d.login_detail[j]=$root.POGOProtos.Data.Login.LoginDetail.toObject(m.login_detail[j],o)}}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.ReplaceLoginActionResponse.Status[m.status]:m.status}return d};ReplaceLoginActionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ReplaceLoginActionResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="AUTH_FAILURE"]=1;values[valuesById[2]="LOGIN_TAKEN"]=2;values[valuesById[3]="LOGIN_ALREADY_HAVE"]=3;values[valuesById[4]="LOGIN_NOT_REPLACEABLE"]=4;return values}();return ReplaceLoginActionResponse}();Responses.ListLoginActionResponse=function(){function ListLoginActionResponse(p){this.login_detail=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListLoginActionResponse.prototype.success=false;ListLoginActionResponse.prototype.login_detail=$util.emptyArray;ListLoginActionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.login_detail!=null&&m.login_detail.length){for(var i=0;i<m.login_detail.length;++i)$root.POGOProtos.Data.Login.LoginDetail.encode(m.login_detail[i],w.uint32(18).fork()).ldelim()}return w};ListLoginActionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.ListLoginActionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:if(!(m.login_detail&&m.login_detail.length))m.login_detail=[];m.login_detail.push($root.POGOProtos.Data.Login.LoginDetail.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};ListLoginActionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.ListLoginActionResponse)return d;var m=new $root.POGOProtos.Networking.Responses.ListLoginActionResponse;if(d.success!=null){m.success=Boolean(d.success)}if(d.login_detail){if(!Array.isArray(d.login_detail))throw TypeError(".POGOProtos.Networking.Responses.ListLoginActionResponse.login_detail: array expected");m.login_detail=[];for(var i=0;i<d.login_detail.length;++i){if(typeof d.login_detail[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.ListLoginActionResponse.login_detail: object expected");m.login_detail[i]=$root.POGOProtos.Data.Login.LoginDetail.fromObject(d.login_detail[i])}}return m};ListLoginActionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.login_detail=[]}if(o.defaults){d.success=false}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.login_detail&&m.login_detail.length){d.login_detail=[];for(var j=0;j<m.login_detail.length;++j){d.login_detail[j]=$root.POGOProtos.Data.Login.LoginDetail.toObject(m.login_detail[j],o)}}return d};ListLoginActionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ListLoginActionResponse}();Responses.PurchaseSkuResponse=function(){function PurchaseSkuResponse(p){this.added_inventory_item=[];this.currency_update=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PurchaseSkuResponse.prototype.result=0;PurchaseSkuResponse.prototype.added_inventory_item=$util.emptyArray;PurchaseSkuResponse.prototype.currency_update=$util.emptyArray;PurchaseSkuResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.added_inventory_item!=null&&m.added_inventory_item.length){for(var i=0;i<m.added_inventory_item.length;++i)w.uint32(18).bytes(m.added_inventory_item[i])}if(m.currency_update!=null&&m.currency_update.length){for(var i=0;i<m.currency_update.length;++i)$root.POGOProtos.Data.Store.CurrencyUpdate.encode(m.currency_update[i],w.uint32(26).fork()).ldelim()}return w};PurchaseSkuResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.PurchaseSkuResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.added_inventory_item&&m.added_inventory_item.length))m.added_inventory_item=[];m.added_inventory_item.push(r.bytes());break;case 3:if(!(m.currency_update&&m.currency_update.length))m.currency_update=[];m.currency_update.push($root.POGOProtos.Data.Store.CurrencyUpdate.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};PurchaseSkuResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.PurchaseSkuResponse)return d;var m=new $root.POGOProtos.Networking.Responses.PurchaseSkuResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"FAILURE":case 2:m.result=2;break;case"BALANCE_TOO_LOW":case 3:m.result=3;break;case"SKU_NOT_AVAILABLE":case 4:m.result=4;break;case"OVER_INVENTORY_LIMIT":case 5:m.result=5;break}if(d.added_inventory_item){if(!Array.isArray(d.added_inventory_item))throw TypeError(".POGOProtos.Networking.Responses.PurchaseSkuResponse.added_inventory_item: array expected");m.added_inventory_item=[];for(var i=0;i<d.added_inventory_item.length;++i){if(typeof d.added_inventory_item[i]==="string")$util.base64.decode(d.added_inventory_item[i],m.added_inventory_item[i]=$util.newBuffer($util.base64.length(d.added_inventory_item[i])),0);else if(d.added_inventory_item[i].length)m.added_inventory_item[i]=d.added_inventory_item[i]}}if(d.currency_update){if(!Array.isArray(d.currency_update))throw TypeError(".POGOProtos.Networking.Responses.PurchaseSkuResponse.currency_update: array expected");m.currency_update=[];for(var i=0;i<d.currency_update.length;++i){if(typeof d.currency_update[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.PurchaseSkuResponse.currency_update: object expected");m.currency_update[i]=$root.POGOProtos.Data.Store.CurrencyUpdate.fromObject(d.currency_update[i])}}return m};PurchaseSkuResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.added_inventory_item=[];d.currency_update=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.PurchaseSkuResponse.Status[m.result]:m.result}if(m.added_inventory_item&&m.added_inventory_item.length){d.added_inventory_item=[];for(var j=0;j<m.added_inventory_item.length;++j){d.added_inventory_item[j]=o.bytes===String?$util.base64.encode(m.added_inventory_item[j],0,m.added_inventory_item[j].length):o.bytes===Array?Array.prototype.slice.call(m.added_inventory_item[j]):m.added_inventory_item[j]}}if(m.currency_update&&m.currency_update.length){d.currency_update=[];for(var j=0;j<m.currency_update.length;++j){d.currency_update[j]=$root.POGOProtos.Data.Store.CurrencyUpdate.toObject(m.currency_update[j],o)}}return d};PurchaseSkuResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PurchaseSkuResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;values[valuesById[3]="BALANCE_TOO_LOW"]=3;values[valuesById[4]="SKU_NOT_AVAILABLE"]=4;values[valuesById[5]="OVER_INVENTORY_LIMIT"]=5;return values}();return PurchaseSkuResponse}();Responses.QuestEncounterResponse=function(){function QuestEncounterResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}QuestEncounterResponse.prototype.result=0;QuestEncounterResponse.prototype.pokemon=null;QuestEncounterResponse.prototype.capture_probability=null;QuestEncounterResponse.prototype.active_item=0;QuestEncounterResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.pokemon!=null&&m.hasOwnProperty("pokemon"))$root.POGOProtos.Map.Pokemon.WildPokemon.encode(m.pokemon,w.uint32(18).fork()).ldelim();if(m.capture_probability!=null&&m.hasOwnProperty("capture_probability"))$root.POGOProtos.Data.Capture.CaptureProbability.encode(m.capture_probability,w.uint32(26).fork()).ldelim();if(m.active_item!=null&&m.hasOwnProperty("active_item"))w.uint32(32).int32(m.active_item);return w};QuestEncounterResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.QuestEncounterResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.pokemon=$root.POGOProtos.Map.Pokemon.WildPokemon.decode(r,r.uint32());break;case 3:m.capture_probability=$root.POGOProtos.Data.Capture.CaptureProbability.decode(r,r.uint32());break;case 4:m.active_item=r.int32();break;default:r.skipType(t&7);break}}return m};QuestEncounterResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.QuestEncounterResponse)return d;var m=new $root.POGOProtos.Networking.Responses.QuestEncounterResponse;switch(d.result){case"QUEST_ENCOUNTER_UNKNOWN":case 0:m.result=0;break;case"QUEST_ENCOUNTER_SUCCESS":case 1:m.result=1;break;case"QUEST_ENCOUNTER_NOT_AVAILABLE":case 2:m.result=2;break;case"QUEST_ENCOUNTER_ALREADY_FINISHED":case 3:m.result=3;break;case"POKEMON_INVENTORY_FULL":case 4:m.result=4;break}if(d.pokemon!=null){if(typeof d.pokemon!=="object")throw TypeError(".POGOProtos.Networking.Responses.QuestEncounterResponse.pokemon: object expected");m.pokemon=$root.POGOProtos.Map.Pokemon.WildPokemon.fromObject(d.pokemon)}if(d.capture_probability!=null){if(typeof d.capture_probability!=="object")throw TypeError(".POGOProtos.Networking.Responses.QuestEncounterResponse.capture_probability: object expected");m.capture_probability=$root.POGOProtos.Data.Capture.CaptureProbability.fromObject(d.capture_probability)}switch(d.active_item){case"ITEM_UNKNOWN":case 0:m.active_item=0;break;case"ITEM_POKE_BALL":case 1:m.active_item=1;break;case"ITEM_GREAT_BALL":case 2:m.active_item=2;break;case"ITEM_ULTRA_BALL":case 3:m.active_item=3;break;case"ITEM_MASTER_BALL":case 4:m.active_item=4;break;case"ITEM_PREMIER_BALL":case 5:m.active_item=5;break;case"ITEM_POTION":case 101:m.active_item=101;break;case"ITEM_SUPER_POTION":case 102:m.active_item=102;break;case"ITEM_HYPER_POTION":case 103:m.active_item=103;break;case"ITEM_MAX_POTION":case 104:m.active_item=104;break;case"ITEM_REVIVE":case 201:m.active_item=201;break;case"ITEM_MAX_REVIVE":case 202:m.active_item=202;break;case"ITEM_LUCKY_EGG":case 301:m.active_item=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.active_item=401;break;case"ITEM_INCENSE_SPICY":case 402:m.active_item=402;break;case"ITEM_INCENSE_COOL":case 403:m.active_item=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.active_item=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.active_item=405;break;case"ITEM_TROY_DISK":case 501:m.active_item=501;break;case"ITEM_X_ATTACK":case 602:m.active_item=602;break;case"ITEM_X_DEFENSE":case 603:m.active_item=603;break;case"ITEM_X_MIRACLE":case 604:m.active_item=604;break;case"ITEM_RAZZ_BERRY":case 701:m.active_item=701;break;case"ITEM_BLUK_BERRY":case 702:m.active_item=702;break;case"ITEM_NANAB_BERRY":case 703:m.active_item=703;break;case"ITEM_WEPAR_BERRY":case 704:m.active_item=704;break;case"ITEM_PINAP_BERRY":case 705:m.active_item=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.active_item=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.active_item=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.active_item=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.active_item=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.active_item=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.active_item=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.active_item=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.active_item=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.active_item=1002;break;case"ITEM_SUN_STONE":case 1101:m.active_item=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.active_item=1102;break;case"ITEM_METAL_COAT":case 1103:m.active_item=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.active_item=1104;break;case"ITEM_UP_GRADE":case 1105:m.active_item=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.active_item=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.active_item=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.active_item=1202;break;case"ITEM_RARE_CANDY":case 1301:m.active_item=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.active_item=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.active_item=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.active_item=1403;break;case"ITEM_STAR_PIECE":case 1404:m.active_item=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.active_item=1405;break}return m};QuestEncounterResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"QUEST_ENCOUNTER_UNKNOWN":0;d.pokemon=null;d.capture_probability=null;d.active_item=o.enums===String?"ITEM_UNKNOWN":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.QuestEncounterResponse.Result[m.result]:m.result}if(m.pokemon!=null&&m.hasOwnProperty("pokemon")){d.pokemon=$root.POGOProtos.Map.Pokemon.WildPokemon.toObject(m.pokemon,o)}if(m.capture_probability!=null&&m.hasOwnProperty("capture_probability")){d.capture_probability=$root.POGOProtos.Data.Capture.CaptureProbability.toObject(m.capture_probability,o)}if(m.active_item!=null&&m.hasOwnProperty("active_item")){d.active_item=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.active_item]:m.active_item}return d};QuestEncounterResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};QuestEncounterResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="QUEST_ENCOUNTER_UNKNOWN"]=0;values[valuesById[1]="QUEST_ENCOUNTER_SUCCESS"]=1;values[valuesById[2]="QUEST_ENCOUNTER_NOT_AVAILABLE"]=2;values[valuesById[3]="QUEST_ENCOUNTER_ALREADY_FINISHED"]=3;values[valuesById[4]="POKEMON_INVENTORY_FULL"]=4;return values}();return QuestEncounterResponse}();Responses.QuitCombatResponse=function(){function QuitCombatResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}QuitCombatResponse.prototype.result=0;QuitCombatResponse.prototype.combat=null;QuitCombatResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.combat!=null&&m.hasOwnProperty("combat"))$root.POGOProtos.Data.Combat.Combat.encode(m.combat,w.uint32(18).fork()).ldelim();return w};QuitCombatResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.QuitCombatResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.combat=$root.POGOProtos.Data.Combat.Combat.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};QuitCombatResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.QuitCombatResponse)return d;var m=new $root.POGOProtos.Networking.Responses.QuitCombatResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_COMBAT_NOT_FOUND":case 2:m.result=2;break;case"ERROR_INVALID_COMBAT_STATE":case 3:m.result=3;break;case"ERROR_PLAYER_NOT_IN_COMBAT":case 4:m.result=4;break}if(d.combat!=null){if(typeof d.combat!=="object")throw TypeError(".POGOProtos.Networking.Responses.QuitCombatResponse.combat: object expected");m.combat=$root.POGOProtos.Data.Combat.Combat.fromObject(d.combat)}return m};QuitCombatResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.combat=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.QuitCombatResponse.Result[m.result]:m.result}if(m.combat!=null&&m.hasOwnProperty("combat")){d.combat=$root.POGOProtos.Data.Combat.Combat.toObject(m.combat,o)}return d};QuitCombatResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};QuitCombatResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_COMBAT_NOT_FOUND"]=2;values[valuesById[3]="ERROR_INVALID_COMBAT_STATE"]=3;values[valuesById[4]="ERROR_PLAYER_NOT_IN_COMBAT"]=4;return values}();return QuitCombatResponse}();Responses.RecycleInventoryItemResponse=function(){function RecycleInventoryItemResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RecycleInventoryItemResponse.prototype.result=0;RecycleInventoryItemResponse.prototype.new_count=0;RecycleInventoryItemResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.new_count!=null&&m.hasOwnProperty("new_count"))w.uint32(16).int32(m.new_count);return w};RecycleInventoryItemResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.RecycleInventoryItemResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.new_count=r.int32();break;default:r.skipType(t&7);break}}return m};RecycleInventoryItemResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.RecycleInventoryItemResponse)return d;var m=new $root.POGOProtos.Networking.Responses.RecycleInventoryItemResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_NOT_ENOUGH_COPIES":case 2:m.result=2;break;case"ERROR_CANNOT_RECYCLE_INCUBATORS":case 3:m.result=3;break}if(d.new_count!=null){m.new_count=d.new_count|0}return m};RecycleInventoryItemResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.new_count=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.RecycleInventoryItemResponse.Result[m.result]:m.result}if(m.new_count!=null&&m.hasOwnProperty("new_count")){d.new_count=m.new_count}return d};RecycleInventoryItemResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RecycleInventoryItemResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_NOT_ENOUGH_COPIES"]=2;values[valuesById[3]="ERROR_CANNOT_RECYCLE_INCUBATORS"]=3;return values}();return RecycleInventoryItemResponse}();Responses.RedeemGoogleReceiptResponse=function(){function RedeemGoogleReceiptResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RedeemGoogleReceiptResponse.prototype.result=0;RedeemGoogleReceiptResponse.prototype.transaction_token="";RedeemGoogleReceiptResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.transaction_token!=null&&m.hasOwnProperty("transaction_token"))w.uint32(18).string(m.transaction_token);return w};RedeemGoogleReceiptResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.RedeemGoogleReceiptResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.transaction_token=r.string();break;default:r.skipType(t&7);break}}return m};RedeemGoogleReceiptResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.RedeemGoogleReceiptResponse)return d;var m=new $root.POGOProtos.Networking.Responses.RedeemGoogleReceiptResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"FAILURE":case 2:m.result=2;break}if(d.transaction_token!=null){m.transaction_token=String(d.transaction_token)}return m};RedeemGoogleReceiptResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.transaction_token=""}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.RedeemGoogleReceiptResponse.Status[m.result]:m.result}if(m.transaction_token!=null&&m.hasOwnProperty("transaction_token")){d.transaction_token=m.transaction_token}return d};RedeemGoogleReceiptResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RedeemGoogleReceiptResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;return values}();return RedeemGoogleReceiptResponse}();Responses.RegisterBackgroundDeviceResponse=function(){function RegisterBackgroundDeviceResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RegisterBackgroundDeviceResponse.prototype.status=0;RegisterBackgroundDeviceResponse.prototype.token=null;RegisterBackgroundDeviceResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.token!=null&&m.hasOwnProperty("token"))$root.POGOProtos.Data.BackgroundToken.encode(m.token,w.uint32(18).fork()).ldelim();return w};RegisterBackgroundDeviceResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.RegisterBackgroundDeviceResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.token=$root.POGOProtos.Data.BackgroundToken.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};RegisterBackgroundDeviceResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.RegisterBackgroundDeviceResponse)return d;var m=new $root.POGOProtos.Networking.Responses.RegisterBackgroundDeviceResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"ERROR":case 2:m.status=2;break}if(d.token!=null){if(typeof d.token!=="object")throw TypeError(".POGOProtos.Networking.Responses.RegisterBackgroundDeviceResponse.token: object expected");m.token=$root.POGOProtos.Data.BackgroundToken.fromObject(d.token)}return m};RegisterBackgroundDeviceResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0;d.token=null}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.RegisterBackgroundDeviceResponse.Status[m.status]:m.status}if(m.token!=null&&m.hasOwnProperty("token")){d.token=$root.POGOProtos.Data.BackgroundToken.toObject(m.token,o)}return d};RegisterBackgroundDeviceResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RegisterBackgroundDeviceResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR"]=2;return values}();return RegisterBackgroundDeviceResponse}();Responses.ReleasePokemonResponse=function(){function ReleasePokemonResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ReleasePokemonResponse.prototype.result=0;ReleasePokemonResponse.prototype.candy_awarded=0;ReleasePokemonResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.candy_awarded!=null&&m.hasOwnProperty("candy_awarded"))w.uint32(16).int32(m.candy_awarded);return w};ReleasePokemonResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.ReleasePokemonResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.candy_awarded=r.int32();break;default:r.skipType(t&7);break}}return m};ReleasePokemonResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.ReleasePokemonResponse)return d;var m=new $root.POGOProtos.Networking.Responses.ReleasePokemonResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"POKEMON_DEPLOYED":case 2:m.result=2;break;case"FAILED":case 3:m.result=3;break;case"ERROR_POKEMON_IS_EGG":case 4:m.result=4;break;case"ERROR_POKEMON_IS_BUDDY":case 5:m.result=5;break}if(d.candy_awarded!=null){m.candy_awarded=d.candy_awarded|0}return m};ReleasePokemonResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.candy_awarded=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.ReleasePokemonResponse.Result[m.result]:m.result}if(m.candy_awarded!=null&&m.hasOwnProperty("candy_awarded")){d.candy_awarded=m.candy_awarded}return d};ReleasePokemonResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ReleasePokemonResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="POKEMON_DEPLOYED"]=2;values[valuesById[3]="FAILED"]=3;values[valuesById[4]="ERROR_POKEMON_IS_EGG"]=4;values[valuesById[5]="ERROR_POKEMON_IS_BUDDY"]=5;return values}();return ReleasePokemonResponse}();Responses.RemoveQuestResponse=function(){function RemoveQuestResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RemoveQuestResponse.prototype.status=0;RemoveQuestResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);return w};RemoveQuestResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.RemoveQuestResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;default:r.skipType(t&7);break}}return m};RemoveQuestResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.RemoveQuestResponse)return d;var m=new $root.POGOProtos.Networking.Responses.RemoveQuestResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"ERROR_QUEST_NOT_FOUND":case 2:m.status=2;break;case"ERROR_STORY_QUEST_NOT_REMOVABLE":case 3:m.status=3;break}return m};RemoveQuestResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.RemoveQuestResponse.Status[m.status]:m.status}return d};RemoveQuestResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RemoveQuestResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_QUEST_NOT_FOUND"]=2;values[valuesById[3]="ERROR_STORY_QUEST_NOT_REMOVABLE"]=3;return values}();return RemoveQuestResponse}();Responses.RequestGeofenceUpdatesResponse=function(){function RequestGeofenceUpdatesResponse(p){this.geofence=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RequestGeofenceUpdatesResponse.prototype.geofence=$util.emptyArray;RequestGeofenceUpdatesResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.geofence!=null&&m.geofence.length){for(var i=0;i<m.geofence.length;++i)$root.POGOProtos.Data.Geofence.GeofenceMetadata.encode(m.geofence[i],w.uint32(10).fork()).ldelim()}return w};RequestGeofenceUpdatesResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.RequestGeofenceUpdatesResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.geofence&&m.geofence.length))m.geofence=[];m.geofence.push($root.POGOProtos.Data.Geofence.GeofenceMetadata.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};RequestGeofenceUpdatesResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.RequestGeofenceUpdatesResponse)return d;var m=new $root.POGOProtos.Networking.Responses.RequestGeofenceUpdatesResponse;if(d.geofence){if(!Array.isArray(d.geofence))throw TypeError(".POGOProtos.Networking.Responses.RequestGeofenceUpdatesResponse.geofence: array expected");m.geofence=[];for(var i=0;i<d.geofence.length;++i){if(typeof d.geofence[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.RequestGeofenceUpdatesResponse.geofence: object expected");m.geofence[i]=$root.POGOProtos.Data.Geofence.GeofenceMetadata.fromObject(d.geofence[i])}}return m};RequestGeofenceUpdatesResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.geofence=[]}if(m.geofence&&m.geofence.length){d.geofence=[];for(var j=0;j<m.geofence.length;++j){d.geofence[j]=$root.POGOProtos.Data.Geofence.GeofenceMetadata.toObject(m.geofence[j],o)}}return d};RequestGeofenceUpdatesResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return RequestGeofenceUpdatesResponse}();Responses.SaveCombatPlayerPreferencesResponse=function(){function SaveCombatPlayerPreferencesResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SaveCombatPlayerPreferencesResponse.prototype.result=0;SaveCombatPlayerPreferencesResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};SaveCombatPlayerPreferencesResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SaveCombatPlayerPreferencesResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};SaveCombatPlayerPreferencesResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SaveCombatPlayerPreferencesResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SaveCombatPlayerPreferencesResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break}return m};SaveCombatPlayerPreferencesResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.SaveCombatPlayerPreferencesResponse.Result[m.result]:m.result}return d};SaveCombatPlayerPreferencesResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SaveCombatPlayerPreferencesResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;return values}();return SaveCombatPlayerPreferencesResponse}();Responses.SavePlayerSnapshotResponse=function(){function SavePlayerSnapshotResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SavePlayerSnapshotResponse.prototype.result=0;SavePlayerSnapshotResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};SavePlayerSnapshotResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SavePlayerSnapshotResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};SavePlayerSnapshotResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SavePlayerSnapshotResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SavePlayerSnapshotResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"TOO_SOON_TO_UPDATE":case 2:m.result=2;break;case"ERROR_FAILED_TO_UPDATE":case 3:m.result=3;break;case"ERROR_REQUEST_TIMED_OUT":case 4:m.result=4;break}return m};SavePlayerSnapshotResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.SavePlayerSnapshotResponse.Result[m.result]:m.result}return d};SavePlayerSnapshotResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SavePlayerSnapshotResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="TOO_SOON_TO_UPDATE"]=2;values[valuesById[3]="ERROR_FAILED_TO_UPDATE"]=3;values[valuesById[4]="ERROR_REQUEST_TIMED_OUT"]=4;return values}();return SavePlayerSnapshotResponse}();Responses.SaveSocialPlayerSettingsResponse=function(){function SaveSocialPlayerSettingsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SaveSocialPlayerSettingsResponse.prototype.result=0;SaveSocialPlayerSettingsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};SaveSocialPlayerSettingsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SaveSocialPlayerSettingsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};SaveSocialPlayerSettingsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SaveSocialPlayerSettingsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SaveSocialPlayerSettingsResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break}return m};SaveSocialPlayerSettingsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.SaveSocialPlayerSettingsResponse.Result[m.result]:m.result}return d};SaveSocialPlayerSettingsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SaveSocialPlayerSettingsResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;return values}();return SaveSocialPlayerSettingsResponse}();Responses.SendGiftResponse=function(){function SendGiftResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SendGiftResponse.prototype.result=0;SendGiftResponse.prototype.awarded_xp=0;SendGiftResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.awarded_xp!=null&&m.hasOwnProperty("awarded_xp"))w.uint32(16).int32(m.awarded_xp);return w};SendGiftResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SendGiftResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.awarded_xp=r.int32();break;default:r.skipType(t&7);break}}return m};SendGiftResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SendGiftResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SendGiftResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_PLAYER_DOES_NOT_EXIST":case 3:m.result=3;break;case"ERROR_GIFT_DOES_NOT_EXIST":case 4:m.result=4;break;case"ERROR_GIFT_ALREADY_SENT_TODAY":case 5:m.result=5;break;case"ERROR_PLAYER_HAS_UNOPENED_GIFT":case 6:m.result=6;break;case"ERROR_FRIEND_UPDATE":case 7:m.result=7;break}if(d.awarded_xp!=null){m.awarded_xp=d.awarded_xp|0}return m};SendGiftResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.awarded_xp=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.SendGiftResponse.Result[m.result]:m.result}if(m.awarded_xp!=null&&m.hasOwnProperty("awarded_xp")){d.awarded_xp=m.awarded_xp}return d};SendGiftResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SendGiftResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_PLAYER_DOES_NOT_EXIST"]=3;values[valuesById[4]="ERROR_GIFT_DOES_NOT_EXIST"]=4;values[valuesById[5]="ERROR_GIFT_ALREADY_SENT_TODAY"]=5;values[valuesById[6]="ERROR_PLAYER_HAS_UNOPENED_GIFT"]=6;values[valuesById[7]="ERROR_FRIEND_UPDATE"]=7;return values}();return SendGiftResponse}();Responses.SendProbeResponse=function(){function SendProbeResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SendProbeResponse.prototype.result=0;SendProbeResponse.prototype.id="";SendProbeResponse.prototype.server_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;SendProbeResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.id!=null&&m.hasOwnProperty("id"))w.uint32(18).string(m.id);if(m.server_timestamp_ms!=null&&m.hasOwnProperty("server_timestamp_ms"))w.uint32(24).int64(m.server_timestamp_ms);return w};SendProbeResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SendProbeResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.id=r.string();break;case 3:m.server_timestamp_ms=r.int64();break;default:r.skipType(t&7);break}}return m};SendProbeResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SendProbeResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SendProbeResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.id!=null){m.id=String(d.id)}if(d.server_timestamp_ms!=null){if($util.Long)(m.server_timestamp_ms=$util.Long.fromValue(d.server_timestamp_ms)).unsigned=false;else if(typeof d.server_timestamp_ms==="string")m.server_timestamp_ms=parseInt(d.server_timestamp_ms,10);else if(typeof d.server_timestamp_ms==="number")m.server_timestamp_ms=d.server_timestamp_ms;else if(typeof d.server_timestamp_ms==="object")m.server_timestamp_ms=new $util.LongBits(d.server_timestamp_ms.low>>>0,d.server_timestamp_ms.high>>>0).toNumber()}return m};SendProbeResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.id="";if($util.Long){var n=new $util.Long(0,0,false);d.server_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.server_timestamp_ms=o.longs===String?"0":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.SendProbeResponse.Result[m.result]:m.result}if(m.id!=null&&m.hasOwnProperty("id")){d.id=m.id}if(m.server_timestamp_ms!=null&&m.hasOwnProperty("server_timestamp_ms")){if(typeof m.server_timestamp_ms==="number")d.server_timestamp_ms=o.longs===String?String(m.server_timestamp_ms):m.server_timestamp_ms;else d.server_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.server_timestamp_ms):o.longs===Number?new $util.LongBits(m.server_timestamp_ms.low>>>0,m.server_timestamp_ms.high>>>0).toNumber():m.server_timestamp_ms}return d};SendProbeResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SendProbeResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return SendProbeResponse}();Responses.SetAvatarItemAsViewedResponse=function(){function SetAvatarItemAsViewedResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetAvatarItemAsViewedResponse.prototype.result=0;SetAvatarItemAsViewedResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};SetAvatarItemAsViewedResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SetAvatarItemAsViewedResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};SetAvatarItemAsViewedResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SetAvatarItemAsViewedResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SetAvatarItemAsViewedResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"FAILURE":case 2:m.result=2;break}return m};SetAvatarItemAsViewedResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.SetAvatarItemAsViewedResponse.Result[m.result]:m.result}return d};SetAvatarItemAsViewedResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SetAvatarItemAsViewedResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;return values}();return SetAvatarItemAsViewedResponse}();Responses.SetAvatarResponse=function(){function SetAvatarResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetAvatarResponse.prototype.status=0;SetAvatarResponse.prototype.player_data=null;SetAvatarResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.player_data!=null&&m.hasOwnProperty("player_data"))$root.POGOProtos.Data.PlayerData.encode(m.player_data,w.uint32(18).fork()).ldelim();return w};SetAvatarResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SetAvatarResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.player_data=$root.POGOProtos.Data.PlayerData.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};SetAvatarResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SetAvatarResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SetAvatarResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"AVATAR_ALREADY_SET":case 2:m.status=2;break;case"FAILURE":case 3:m.status=3;break;case"SLOT_NOT_ALLOWED":case 4:m.status=4;break;case"ITEM_NOT_OWNED":case 5:m.status=5;break;case"INVALID_AVATAR_TYPE":case 6:m.status=6;break}if(d.player_data!=null){if(typeof d.player_data!=="object")throw TypeError(".POGOProtos.Networking.Responses.SetAvatarResponse.player_data: object expected");m.player_data=$root.POGOProtos.Data.PlayerData.fromObject(d.player_data)}return m};SetAvatarResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0;d.player_data=null}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.SetAvatarResponse.Status[m.status]:m.status}if(m.player_data!=null&&m.hasOwnProperty("player_data")){d.player_data=$root.POGOProtos.Data.PlayerData.toObject(m.player_data,o)}return d};SetAvatarResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SetAvatarResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="AVATAR_ALREADY_SET"]=2;values[valuesById[3]="FAILURE"]=3;values[valuesById[4]="SLOT_NOT_ALLOWED"]=4;values[valuesById[5]="ITEM_NOT_OWNED"]=5;values[valuesById[6]="INVALID_AVATAR_TYPE"]=6;return values}();return SetAvatarResponse}();Responses.SetBuddyPokemonResponse=function(){function SetBuddyPokemonResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetBuddyPokemonResponse.prototype.result=0;SetBuddyPokemonResponse.prototype.updated_buddy=null;SetBuddyPokemonResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.updated_buddy!=null&&m.hasOwnProperty("updated_buddy"))$root.POGOProtos.Data.BuddyPokemon.encode(m.updated_buddy,w.uint32(18).fork()).ldelim();return w};SetBuddyPokemonResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SetBuddyPokemonResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.updated_buddy=$root.POGOProtos.Data.BuddyPokemon.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};SetBuddyPokemonResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SetBuddyPokemonResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SetBuddyPokemonResponse;switch(d.result){case"UNEST":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_POKEMON_DEPLOYED":case 2:m.result=2;break;case"ERROR_POKEMON_NOT_OWNED":case 3:m.result=3;break;case"ERROR_POKEMON_IS_EGG":case 4:m.result=4;break;case"ERROR_INVALID_POKEMON":case 5:m.result=5;break}if(d.updated_buddy!=null){if(typeof d.updated_buddy!=="object")throw TypeError(".POGOProtos.Networking.Responses.SetBuddyPokemonResponse.updated_buddy: object expected");m.updated_buddy=$root.POGOProtos.Data.BuddyPokemon.fromObject(d.updated_buddy)}return m};SetBuddyPokemonResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNEST":0;d.updated_buddy=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.SetBuddyPokemonResponse.Result[m.result]:m.result}if(m.updated_buddy!=null&&m.hasOwnProperty("updated_buddy")){d.updated_buddy=$root.POGOProtos.Data.BuddyPokemon.toObject(m.updated_buddy,o)}return d};SetBuddyPokemonResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SetBuddyPokemonResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNEST"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_POKEMON_DEPLOYED"]=2;values[valuesById[3]="ERROR_POKEMON_NOT_OWNED"]=3;values[valuesById[4]="ERROR_POKEMON_IS_EGG"]=4;values[valuesById[5]="ERROR_INVALID_POKEMON"]=5;return values}();return SetBuddyPokemonResponse}();Responses.SetContactSettingsResponse=function(){function SetContactSettingsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetContactSettingsResponse.prototype.status=0;SetContactSettingsResponse.prototype.player_data=null;SetContactSettingsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.player_data!=null&&m.hasOwnProperty("player_data"))$root.POGOProtos.Data.PlayerData.encode(m.player_data,w.uint32(18).fork()).ldelim();return w};SetContactSettingsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SetContactSettingsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.player_data=$root.POGOProtos.Data.PlayerData.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};SetContactSettingsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SetContactSettingsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SetContactSettingsResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"FAILURE":case 2:m.status=2;break}if(d.player_data!=null){if(typeof d.player_data!=="object")throw TypeError(".POGOProtos.Networking.Responses.SetContactSettingsResponse.player_data: object expected");m.player_data=$root.POGOProtos.Data.PlayerData.fromObject(d.player_data)}return m};SetContactSettingsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0;d.player_data=null}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.SetContactSettingsResponse.Status[m.status]:m.status}if(m.player_data!=null&&m.hasOwnProperty("player_data")){d.player_data=$root.POGOProtos.Data.PlayerData.toObject(m.player_data,o)}return d};SetContactSettingsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SetContactSettingsResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;return values}();return SetContactSettingsResponse}();Responses.SetFavoritePokemonResponse=function(){function SetFavoritePokemonResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetFavoritePokemonResponse.prototype.result=0;SetFavoritePokemonResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};SetFavoritePokemonResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SetFavoritePokemonResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};SetFavoritePokemonResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SetFavoritePokemonResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SetFavoritePokemonResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_POKEMON_NOT_FOUND":case 2:m.result=2;break;case"ERROR_POKEMON_IS_EGG":case 3:m.result=3;break}return m};SetFavoritePokemonResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.SetFavoritePokemonResponse.Result[m.result]:m.result}return d};SetFavoritePokemonResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SetFavoritePokemonResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_POKEMON_NOT_FOUND"]=2;values[valuesById[3]="ERROR_POKEMON_IS_EGG"]=3;return values}();return SetFavoritePokemonResponse}();Responses.SetFriendNicknameResponse=function(){function SetFriendNicknameResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetFriendNicknameResponse.prototype.result=0;SetFriendNicknameResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};SetFriendNicknameResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SetFriendNicknameResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};SetFriendNicknameResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SetFriendNicknameResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SetFriendNicknameResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_NOT_FRIENDS":case 3:m.result=3;break;case"ERROR_EXCEEDED_NICKNAME_LENGTH":case 4:m.result=4;break;case"ERROR_SOCIAL_UPDATE":case 5:m.result=5;break;case"ERROR_FILTERED_NICKNAME":case 6:m.result=6;break;case"ERROR_EXCEEDED_CHANGE_LIMIT":case 7:m.result=7;break}return m};SetFriendNicknameResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.SetFriendNicknameResponse.Result[m.result]:m.result}return d};SetFriendNicknameResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SetFriendNicknameResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_NOT_FRIENDS"]=3;values[valuesById[4]="ERROR_EXCEEDED_NICKNAME_LENGTH"]=4;values[valuesById[5]="ERROR_SOCIAL_UPDATE"]=5;values[valuesById[6]="ERROR_FILTERED_NICKNAME"]=6;values[valuesById[7]="ERROR_EXCEEDED_CHANGE_LIMIT"]=7;return values}();return SetFriendNicknameResponse}();Responses.SetInGameCurrencyExchangeRateResponse=function(){function SetInGameCurrencyExchangeRateResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetInGameCurrencyExchangeRateResponse.prototype.status=0;SetInGameCurrencyExchangeRateResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);return w};SetInGameCurrencyExchangeRateResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SetInGameCurrencyExchangeRateResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;default:r.skipType(t&7);break}}return m};SetInGameCurrencyExchangeRateResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SetInGameCurrencyExchangeRateResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SetInGameCurrencyExchangeRateResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"FAILURE":case 2:m.status=2;break}return m};SetInGameCurrencyExchangeRateResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.SetInGameCurrencyExchangeRateResponse.Status[m.status]:m.status}return d};SetInGameCurrencyExchangeRateResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SetInGameCurrencyExchangeRateResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;return values}();return SetInGameCurrencyExchangeRateResponse}();Responses.SetLobbyPokemonResponse=function(){function SetLobbyPokemonResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetLobbyPokemonResponse.prototype.result=0;SetLobbyPokemonResponse.prototype.lobby=null;SetLobbyPokemonResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.lobby!=null&&m.hasOwnProperty("lobby"))$root.POGOProtos.Data.Raid.Lobby.encode(m.lobby,w.uint32(18).fork()).ldelim();return w};SetLobbyPokemonResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SetLobbyPokemonResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.lobby=$root.POGOProtos.Data.Raid.Lobby.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};SetLobbyPokemonResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SetLobbyPokemonResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SetLobbyPokemonResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_LOBBY_NOT_FOUND":case 2:m.result=2;break;case"ERROR_RAID_UNAVAILABLE":case 3:m.result=3;break;case"ERROR_INVALID_POKEMON":case 4:m.result=4;break}if(d.lobby!=null){if(typeof d.lobby!=="object")throw TypeError(".POGOProtos.Networking.Responses.SetLobbyPokemonResponse.lobby: object expected");m.lobby=$root.POGOProtos.Data.Raid.Lobby.fromObject(d.lobby)}return m};SetLobbyPokemonResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.lobby=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.SetLobbyPokemonResponse.Result[m.result]:m.result}if(m.lobby!=null&&m.hasOwnProperty("lobby")){d.lobby=$root.POGOProtos.Data.Raid.Lobby.toObject(m.lobby,o)}return d};SetLobbyPokemonResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SetLobbyPokemonResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_LOBBY_NOT_FOUND"]=2;values[valuesById[3]="ERROR_RAID_UNAVAILABLE"]=3;values[valuesById[4]="ERROR_INVALID_POKEMON"]=4;return values}();return SetLobbyPokemonResponse}();Responses.SetLobbyVisibilityResponse=function(){function SetLobbyVisibilityResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetLobbyVisibilityResponse.prototype.result=0;SetLobbyVisibilityResponse.prototype.lobby=null;SetLobbyVisibilityResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.lobby!=null&&m.hasOwnProperty("lobby"))$root.POGOProtos.Data.Raid.Lobby.encode(m.lobby,w.uint32(18).fork()).ldelim();return w};SetLobbyVisibilityResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SetLobbyVisibilityResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.lobby=$root.POGOProtos.Data.Raid.Lobby.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};SetLobbyVisibilityResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SetLobbyVisibilityResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SetLobbyVisibilityResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_NOT_LOBBY_CREATOR":case 2:m.result=2;break;case"ERROR_LOBBY_NOT_FOUND":case 3:m.result=3;break;case"ERROR_RAID_UNAVAILABLE":case 4:m.result=4;break}if(d.lobby!=null){if(typeof d.lobby!=="object")throw TypeError(".POGOProtos.Networking.Responses.SetLobbyVisibilityResponse.lobby: object expected");m.lobby=$root.POGOProtos.Data.Raid.Lobby.fromObject(d.lobby)}return m};SetLobbyVisibilityResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.lobby=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.SetLobbyVisibilityResponse.Result[m.result]:m.result}if(m.lobby!=null&&m.hasOwnProperty("lobby")){d.lobby=$root.POGOProtos.Data.Raid.Lobby.toObject(m.lobby,o)}return d};SetLobbyVisibilityResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SetLobbyVisibilityResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_NOT_LOBBY_CREATOR"]=2;values[valuesById[3]="ERROR_LOBBY_NOT_FOUND"]=3;values[valuesById[4]="ERROR_RAID_UNAVAILABLE"]=4;return values}();return SetLobbyVisibilityResponse}();Responses.SetPlayerTeamResponse=function(){function SetPlayerTeamResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SetPlayerTeamResponse.prototype.status=0;SetPlayerTeamResponse.prototype.player_data=null;SetPlayerTeamResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.player_data!=null&&m.hasOwnProperty("player_data"))$root.POGOProtos.Data.PlayerData.encode(m.player_data,w.uint32(18).fork()).ldelim();return w};SetPlayerTeamResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SetPlayerTeamResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.player_data=$root.POGOProtos.Data.PlayerData.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};SetPlayerTeamResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SetPlayerTeamResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SetPlayerTeamResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"TEAM_ALREADY_SET":case 2:m.status=2;break;case"FAILURE":case 3:m.status=3;break}if(d.player_data!=null){if(typeof d.player_data!=="object")throw TypeError(".POGOProtos.Networking.Responses.SetPlayerTeamResponse.player_data: object expected");m.player_data=$root.POGOProtos.Data.PlayerData.fromObject(d.player_data)}return m};SetPlayerTeamResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0;d.player_data=null}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.SetPlayerTeamResponse.Status[m.status]:m.status}if(m.player_data!=null&&m.hasOwnProperty("player_data")){d.player_data=$root.POGOProtos.Data.PlayerData.toObject(m.player_data,o)}return d};SetPlayerTeamResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SetPlayerTeamResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="TEAM_ALREADY_SET"]=2;values[valuesById[3]="FAILURE"]=3;return values}();return SetPlayerTeamResponse}();Responses.SfidaActionLogResponse=function(){function SfidaActionLogResponse(p){this.log_entries=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaActionLogResponse.prototype.result=0;SfidaActionLogResponse.prototype.log_entries=$util.emptyArray;SfidaActionLogResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.log_entries!=null&&m.log_entries.length){for(var i=0;i<m.log_entries.length;++i)$root.POGOProtos.Data.Logs.ActionLogEntry.encode(m.log_entries[i],w.uint32(18).fork()).ldelim()}return w};SfidaActionLogResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SfidaActionLogResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.log_entries&&m.log_entries.length))m.log_entries=[];m.log_entries.push($root.POGOProtos.Data.Logs.ActionLogEntry.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};SfidaActionLogResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SfidaActionLogResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SfidaActionLogResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.log_entries){if(!Array.isArray(d.log_entries))throw TypeError(".POGOProtos.Networking.Responses.SfidaActionLogResponse.log_entries: array expected");m.log_entries=[];for(var i=0;i<d.log_entries.length;++i){if(typeof d.log_entries[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.SfidaActionLogResponse.log_entries: object expected");m.log_entries[i]=$root.POGOProtos.Data.Logs.ActionLogEntry.fromObject(d.log_entries[i])}}return m};SfidaActionLogResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.log_entries=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.SfidaActionLogResponse.Result[m.result]:m.result}if(m.log_entries&&m.log_entries.length){d.log_entries=[];for(var j=0;j<m.log_entries.length;++j){d.log_entries[j]=$root.POGOProtos.Data.Logs.ActionLogEntry.toObject(m.log_entries[j],o)}}return d};SfidaActionLogResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SfidaActionLogResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return SfidaActionLogResponse}();Responses.SfidaCaptureResponse=function(){function SfidaCaptureResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaCaptureResponse.prototype.result=0;SfidaCaptureResponse.prototype.xp_gain=0;SfidaCaptureResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.xp_gain!=null&&m.hasOwnProperty("xp_gain"))w.uint32(16).int32(m.xp_gain);return w};SfidaCaptureResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SfidaCaptureResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.xp_gain=r.int32();break;default:r.skipType(t&7);break}}return m};SfidaCaptureResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SfidaCaptureResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SfidaCaptureResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"POKEMON_CAPTURED":case 1:m.result=1;break;case"POKEMON_FLED":case 2:m.result=2;break;case"NOT_FOUND":case 3:m.result=3;break;case"NO_MORE_POKEBALLS":case 4:m.result=4;break;case"POKEMON_INVENTORY_FULL":case 5:m.result=5;break;case"NOT_IN_RANGE":case 6:m.result=6;break;case"ENCOUNTER_ALREADY_FINISHED":case 7:m.result=7;break}if(d.xp_gain!=null){m.xp_gain=d.xp_gain|0}return m};SfidaCaptureResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.xp_gain=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.SfidaCaptureResponse.Result[m.result]:m.result}if(m.xp_gain!=null&&m.hasOwnProperty("xp_gain")){d.xp_gain=m.xp_gain}return d};SfidaCaptureResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SfidaCaptureResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="POKEMON_CAPTURED"]=1;values[valuesById[2]="POKEMON_FLED"]=2;values[valuesById[3]="NOT_FOUND"]=3;values[valuesById[4]="NO_MORE_POKEBALLS"]=4;values[valuesById[5]="POKEMON_INVENTORY_FULL"]=5;values[valuesById[6]="NOT_IN_RANGE"]=6;values[valuesById[7]="ENCOUNTER_ALREADY_FINISHED"]=7;return values}();return SfidaCaptureResponse}();Responses.SfidaCertificationResponse=function(){function SfidaCertificationResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaCertificationResponse.prototype.payload=$util.newBuffer([]);SfidaCertificationResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.payload!=null&&m.hasOwnProperty("payload"))w.uint32(10).bytes(m.payload);return w};SfidaCertificationResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SfidaCertificationResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.payload=r.bytes();break;default:r.skipType(t&7);break}}return m};SfidaCertificationResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SfidaCertificationResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SfidaCertificationResponse;if(d.payload!=null){if(typeof d.payload==="string")$util.base64.decode(d.payload,m.payload=$util.newBuffer($util.base64.length(d.payload)),0);else if(d.payload.length)m.payload=d.payload}return m};SfidaCertificationResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if(o.bytes===String)d.payload="";else{d.payload=[];if(o.bytes!==Array)d.payload=$util.newBuffer(d.payload)}}if(m.payload!=null&&m.hasOwnProperty("payload")){d.payload=o.bytes===String?$util.base64.encode(m.payload,0,m.payload.length):o.bytes===Array?Array.prototype.slice.call(m.payload):m.payload}return d};SfidaCertificationResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SfidaCertificationResponse}();Responses.SfidaDowserResponse=function(){function SfidaDowserResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaDowserResponse.prototype.result=0;SfidaDowserResponse.prototype.proximity=0;SfidaDowserResponse.prototype.spawnpoint_id="";SfidaDowserResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.proximity!=null&&m.hasOwnProperty("proximity"))w.uint32(16).int32(m.proximity);if(m.spawnpoint_id!=null&&m.hasOwnProperty("spawnpoint_id"))w.uint32(26).string(m.spawnpoint_id);return w};SfidaDowserResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SfidaDowserResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.proximity=r.int32();break;case 3:m.spawnpoint_id=r.string();break;default:r.skipType(t&7);break}}return m};SfidaDowserResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SfidaDowserResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SfidaDowserResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"FOUND":case 1:m.result=1;break;case"NEARBY":case 2:m.result=2;break;case"OUT_OF_RANGE":case 3:m.result=3;break;case"ALREADY_CAUGHT":case 4:m.result=4;break;case"NOT_AVAILABLE":case 5:m.result=5;break}if(d.proximity!=null){m.proximity=d.proximity|0}if(d.spawnpoint_id!=null){m.spawnpoint_id=String(d.spawnpoint_id)}return m};SfidaDowserResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.proximity=0;d.spawnpoint_id=""}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.SfidaDowserResponse.Result[m.result]:m.result}if(m.proximity!=null&&m.hasOwnProperty("proximity")){d.proximity=m.proximity}if(m.spawnpoint_id!=null&&m.hasOwnProperty("spawnpoint_id")){d.spawnpoint_id=m.spawnpoint_id}return d};SfidaDowserResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SfidaDowserResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="FOUND"]=1;values[valuesById[2]="NEARBY"]=2;values[valuesById[3]="OUT_OF_RANGE"]=3;values[valuesById[4]="ALREADY_CAUGHT"]=4;values[valuesById[5]="NOT_AVAILABLE"]=5;return values}();return SfidaDowserResponse}();Responses.SfidaRegistrationResponse=function(){function SfidaRegistrationResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaRegistrationResponse.prototype.access_token=$util.newBuffer([]);SfidaRegistrationResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.access_token!=null&&m.hasOwnProperty("access_token"))w.uint32(10).bytes(m.access_token);return w};SfidaRegistrationResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SfidaRegistrationResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.access_token=r.bytes();break;default:r.skipType(t&7);break}}return m};SfidaRegistrationResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SfidaRegistrationResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SfidaRegistrationResponse;if(d.access_token!=null){if(typeof d.access_token==="string")$util.base64.decode(d.access_token,m.access_token=$util.newBuffer($util.base64.length(d.access_token)),0);else if(d.access_token.length)m.access_token=d.access_token}return m};SfidaRegistrationResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if(o.bytes===String)d.access_token="";else{d.access_token=[];if(o.bytes!==Array)d.access_token=$util.newBuffer(d.access_token)}}if(m.access_token!=null&&m.hasOwnProperty("access_token")){d.access_token=o.bytes===String?$util.base64.encode(m.access_token,0,m.access_token.length):o.bytes===Array?Array.prototype.slice.call(m.access_token):m.access_token}return d};SfidaRegistrationResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SfidaRegistrationResponse}();Responses.SfidaUpdateResponse=function(){function SfidaUpdateResponse(p){this.nearby=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaUpdateResponse.prototype.status=0;SfidaUpdateResponse.prototype.nearby_pokemon=false;SfidaUpdateResponse.prototype.uncaught_pokemon=false;SfidaUpdateResponse.prototype.legendary_pokemon=false;SfidaUpdateResponse.prototype.spawnpoint_id="";SfidaUpdateResponse.prototype.encounter_id=$util.Long?$util.Long.fromBits(0,0,false):0;SfidaUpdateResponse.prototype.nearby_pokestop=false;SfidaUpdateResponse.prototype.pokestop_id="";SfidaUpdateResponse.prototype.encounter_type=0;SfidaUpdateResponse.prototype.pokedex_number=0;SfidaUpdateResponse.prototype.nearby=$util.emptyArray;SfidaUpdateResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.nearby_pokemon!=null&&m.hasOwnProperty("nearby_pokemon"))w.uint32(16).bool(m.nearby_pokemon);if(m.uncaught_pokemon!=null&&m.hasOwnProperty("uncaught_pokemon"))w.uint32(24).bool(m.uncaught_pokemon);if(m.legendary_pokemon!=null&&m.hasOwnProperty("legendary_pokemon"))w.uint32(32).bool(m.legendary_pokemon);if(m.spawnpoint_id!=null&&m.hasOwnProperty("spawnpoint_id"))w.uint32(42).string(m.spawnpoint_id);if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id"))w.uint32(48).int64(m.encounter_id);if(m.nearby_pokestop!=null&&m.hasOwnProperty("nearby_pokestop"))w.uint32(56).bool(m.nearby_pokestop);if(m.pokestop_id!=null&&m.hasOwnProperty("pokestop_id"))w.uint32(66).string(m.pokestop_id);if(m.encounter_type!=null&&m.hasOwnProperty("encounter_type"))w.uint32(72).int32(m.encounter_type);if(m.pokedex_number!=null&&m.hasOwnProperty("pokedex_number"))w.uint32(80).int32(m.pokedex_number);if(m.nearby!=null&&m.nearby.length){for(var i=0;i<m.nearby.length;++i)$root.POGOProtos.Data.Sfida.SfidaNearbyPokemon.encode(m.nearby[i],w.uint32(90).fork()).ldelim()}return w};SfidaUpdateResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SfidaUpdateResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.nearby_pokemon=r.bool();break;case 3:m.uncaught_pokemon=r.bool();break;case 4:m.legendary_pokemon=r.bool();break;case 5:m.spawnpoint_id=r.string();break;case 6:m.encounter_id=r.int64();break;case 7:m.nearby_pokestop=r.bool();break;case 8:m.pokestop_id=r.string();break;case 9:m.encounter_type=r.int32();break;case 10:m.pokedex_number=r.int32();break;case 11:if(!(m.nearby&&m.nearby.length))m.nearby=[];m.nearby.push($root.POGOProtos.Data.Sfida.SfidaNearbyPokemon.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};SfidaUpdateResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SfidaUpdateResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SfidaUpdateResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break}if(d.nearby_pokemon!=null){m.nearby_pokemon=Boolean(d.nearby_pokemon)}if(d.uncaught_pokemon!=null){m.uncaught_pokemon=Boolean(d.uncaught_pokemon)}if(d.legendary_pokemon!=null){m.legendary_pokemon=Boolean(d.legendary_pokemon)}if(d.spawnpoint_id!=null){m.spawnpoint_id=String(d.spawnpoint_id)}if(d.encounter_id!=null){if($util.Long)(m.encounter_id=$util.Long.fromValue(d.encounter_id)).unsigned=false;else if(typeof d.encounter_id==="string")m.encounter_id=parseInt(d.encounter_id,10);else if(typeof d.encounter_id==="number")m.encounter_id=d.encounter_id;else if(typeof d.encounter_id==="object")m.encounter_id=new $util.LongBits(d.encounter_id.low>>>0,d.encounter_id.high>>>0).toNumber()}if(d.nearby_pokestop!=null){m.nearby_pokestop=Boolean(d.nearby_pokestop)}if(d.pokestop_id!=null){m.pokestop_id=String(d.pokestop_id)}switch(d.encounter_type){case"SPAWN_POINT":case 0:m.encounter_type=0;break;case"INCENSE":case 1:m.encounter_type=1;break;case"DISK":case 2:m.encounter_type=2;break;case"POST_RAID":case 3:m.encounter_type=3;break;case"STORY_QUEST":case 4:m.encounter_type=4;break;case"QUEST_STAMP_CARD":case 5:m.encounter_type=5;break;case"CHALLENGE_QUEST":case 6:m.encounter_type=6;break}if(d.pokedex_number!=null){m.pokedex_number=d.pokedex_number|0}if(d.nearby){if(!Array.isArray(d.nearby))throw TypeError(".POGOProtos.Networking.Responses.SfidaUpdateResponse.nearby: array expected");m.nearby=[];for(var i=0;i<d.nearby.length;++i){if(typeof d.nearby[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.SfidaUpdateResponse.nearby: object expected");m.nearby[i]=$root.POGOProtos.Data.Sfida.SfidaNearbyPokemon.fromObject(d.nearby[i])}}return m};SfidaUpdateResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.nearby=[]}if(o.defaults){d.status=o.enums===String?"UNSET":0;d.nearby_pokemon=false;d.uncaught_pokemon=false;d.legendary_pokemon=false;d.spawnpoint_id="";if($util.Long){var n=new $util.Long(0,0,false);d.encounter_id=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.encounter_id=o.longs===String?"0":0;d.nearby_pokestop=false;d.pokestop_id="";d.encounter_type=o.enums===String?"SPAWN_POINT":0;d.pokedex_number=0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.SfidaUpdateResponse.Status[m.status]:m.status}if(m.nearby_pokemon!=null&&m.hasOwnProperty("nearby_pokemon")){d.nearby_pokemon=m.nearby_pokemon}if(m.uncaught_pokemon!=null&&m.hasOwnProperty("uncaught_pokemon")){d.uncaught_pokemon=m.uncaught_pokemon}if(m.legendary_pokemon!=null&&m.hasOwnProperty("legendary_pokemon")){d.legendary_pokemon=m.legendary_pokemon}if(m.spawnpoint_id!=null&&m.hasOwnProperty("spawnpoint_id")){d.spawnpoint_id=m.spawnpoint_id}if(m.encounter_id!=null&&m.hasOwnProperty("encounter_id")){if(typeof m.encounter_id==="number")d.encounter_id=o.longs===String?String(m.encounter_id):m.encounter_id;else d.encounter_id=o.longs===String?$util.Long.prototype.toString.call(m.encounter_id):o.longs===Number?new $util.LongBits(m.encounter_id.low>>>0,m.encounter_id.high>>>0).toNumber():m.encounter_id}if(m.nearby_pokestop!=null&&m.hasOwnProperty("nearby_pokestop")){d.nearby_pokestop=m.nearby_pokestop}if(m.pokestop_id!=null&&m.hasOwnProperty("pokestop_id")){d.pokestop_id=m.pokestop_id}if(m.encounter_type!=null&&m.hasOwnProperty("encounter_type")){d.encounter_type=o.enums===String?$root.POGOProtos.Enums.EncounterType[m.encounter_type]:m.encounter_type}if(m.pokedex_number!=null&&m.hasOwnProperty("pokedex_number")){d.pokedex_number=m.pokedex_number}if(m.nearby&&m.nearby.length){d.nearby=[];for(var j=0;j<m.nearby.length;++j){d.nearby[j]=$root.POGOProtos.Data.Sfida.SfidaNearbyPokemon.toObject(m.nearby[j],o)}}return d};SfidaUpdateResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SfidaUpdateResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return SfidaUpdateResponse}();Responses.ShareExRaidPassResponse=function(){function ShareExRaidPassResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ShareExRaidPassResponse.prototype.result=0;ShareExRaidPassResponse.prototype.updated_friendship_data=null;ShareExRaidPassResponse.prototype.friend_profile=null;ShareExRaidPassResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.updated_friendship_data!=null&&m.hasOwnProperty("updated_friendship_data"))$root.POGOProtos.Data.Friends.FriendshipLevelData.encode(m.updated_friendship_data,w.uint32(18).fork()).ldelim();if(m.friend_profile!=null&&m.hasOwnProperty("friend_profile"))$root.POGOProtos.Data.Player.PlayerPublicProfile.encode(m.friend_profile,w.uint32(26).fork()).ldelim();return w};ShareExRaidPassResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.ShareExRaidPassResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.updated_friendship_data=$root.POGOProtos.Data.Friends.FriendshipLevelData.decode(r,r.uint32());break;case 3:m.friend_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};ShareExRaidPassResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.ShareExRaidPassResponse)return d;var m=new $root.POGOProtos.Networking.Responses.ShareExRaidPassResponse;switch(d.result){case"SHARE_EX_RAID_PASS_UNSET":case 0:m.result=0;break;case"SHARE_EX_RAID_PASS_SUCCESS":case 1:m.result=1;break;case"ERROR_FRIEND_ALREADY_INVITED_TO_SAME_RAID":case 2:m.result=2;break;case"ERROR_EX_RAID_PASS_ALREADY_SHARED":case 3:m.result=3;break;case"ERROR_FRIEND_ALREADY_HAS_SHARED_EX_PASS_IN_INVENTORY":case 4:m.result=4;break;case"ERROR_TOO_LOW_FRIENDSHIP_LEVEL":case 5:m.result=5;break;case"ERROR_FRIEND_NOT_FOUND":case 6:m.result=6;break;case"ERROR_EX_RAID_ALREADY_STARTED":case 7:m.result=7;break;case"ERROR_EX_RAID_INVALID":case 8:m.result=8;break;case"ERROR_EX_RAID_PASS_NOT_FOUND":case 9:m.result=9;break;case"ERROR_UNKNOWN":case 10:m.result=10;break}if(d.updated_friendship_data!=null){if(typeof d.updated_friendship_data!=="object")throw TypeError(".POGOProtos.Networking.Responses.ShareExRaidPassResponse.updated_friendship_data: object expected");m.updated_friendship_data=$root.POGOProtos.Data.Friends.FriendshipLevelData.fromObject(d.updated_friendship_data)}if(d.friend_profile!=null){if(typeof d.friend_profile!=="object")throw TypeError(".POGOProtos.Networking.Responses.ShareExRaidPassResponse.friend_profile: object expected");m.friend_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.fromObject(d.friend_profile)}return m};ShareExRaidPassResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"SHARE_EX_RAID_PASS_UNSET":0;d.updated_friendship_data=null;d.friend_profile=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Enums.ShareExRaidPassResult[m.result]:m.result}if(m.updated_friendship_data!=null&&m.hasOwnProperty("updated_friendship_data")){d.updated_friendship_data=$root.POGOProtos.Data.Friends.FriendshipLevelData.toObject(m.updated_friendship_data,o)}if(m.friend_profile!=null&&m.hasOwnProperty("friend_profile")){d.friend_profile=$root.POGOProtos.Data.Player.PlayerPublicProfile.toObject(m.friend_profile,o)}return d};ShareExRaidPassResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ShareExRaidPassResponse}();Responses.Social=function(){var Social={};Social.AcceptFriendInviteResponse=function(){function AcceptFriendInviteResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}AcceptFriendInviteResponse.prototype.result=0;AcceptFriendInviteResponse.prototype.friend=null;AcceptFriendInviteResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.friend!=null&&m.hasOwnProperty("friend"))$root.POGOProtos.Data.Player.PlayerSummary.encode(m.friend,w.uint32(18).fork()).ldelim();return w};AcceptFriendInviteResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.AcceptFriendInviteResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.friend=$root.POGOProtos.Data.Player.PlayerSummary.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};AcceptFriendInviteResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.AcceptFriendInviteResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.AcceptFriendInviteResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_INVITE_DOES_NOT_EXIST":case 3:m.result=3;break;case"ERROR_MAX_FRIENDS_LIMIT_REACHED_DELETED":case 4:m.result=4;break;case"ERROR_INVITE_HAS_BEEN_CANCELLED":case 5:m.result=5;break;case"ERROR_SENDER_HAS_MAX_FRIENDS":case 6:m.result=6;break;case"ERROR_RECEIVER_HAS_MAX_FRIENDS":case 7:m.result=7;break}if(d.friend!=null){if(typeof d.friend!=="object")throw TypeError(".POGOProtos.Networking.Responses.Social.AcceptFriendInviteResponse.friend: object expected");m.friend=$root.POGOProtos.Data.Player.PlayerSummary.fromObject(d.friend)}return m};AcceptFriendInviteResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.friend=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.AcceptFriendInviteResponse.Result[m.result]:m.result}if(m.friend!=null&&m.hasOwnProperty("friend")){d.friend=$root.POGOProtos.Data.Player.PlayerSummary.toObject(m.friend,o)}return d};AcceptFriendInviteResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};AcceptFriendInviteResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_INVITE_DOES_NOT_EXIST"]=3;values[valuesById[4]="ERROR_MAX_FRIENDS_LIMIT_REACHED_DELETED"]=4;values[valuesById[5]="ERROR_INVITE_HAS_BEEN_CANCELLED"]=5;values[valuesById[6]="ERROR_SENDER_HAS_MAX_FRIENDS"]=6;values[valuesById[7]="ERROR_RECEIVER_HAS_MAX_FRIENDS"]=7;return values}();return AcceptFriendInviteResponse}();Social.CancelFriendInviteResponse=function(){function CancelFriendInviteResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CancelFriendInviteResponse.prototype.result=0;CancelFriendInviteResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};CancelFriendInviteResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.CancelFriendInviteResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};CancelFriendInviteResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.CancelFriendInviteResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.CancelFriendInviteResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_INVITE_DOES_NOT_EXIST":case 3:m.result=3;break;case"ERROR_ALREADY_CANCELLED":case 4:m.result=4;break}return m};CancelFriendInviteResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.CancelFriendInviteResponse.Result[m.result]:m.result}return d};CancelFriendInviteResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CancelFriendInviteResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_INVITE_DOES_NOT_EXIST"]=3;values[valuesById[4]="ERROR_ALREADY_CANCELLED"]=4;return values}();return CancelFriendInviteResponse}();Social.CreateInviteCodeResponse=function(){function CreateInviteCodeResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CreateInviteCodeResponse.prototype.result=0;CreateInviteCodeResponse.prototype.friend_code="";CreateInviteCodeResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.friend_code!=null&&m.hasOwnProperty("friend_code"))w.uint32(18).string(m.friend_code);return w};CreateInviteCodeResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.CreateInviteCodeResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.friend_code=r.string();break;default:r.skipType(t&7);break}}return m};CreateInviteCodeResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.CreateInviteCodeResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.CreateInviteCodeResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break}if(d.friend_code!=null){m.friend_code=String(d.friend_code)}return m};CreateInviteCodeResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.friend_code=""}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.CreateInviteCodeResponse.Result[m.result]:m.result}if(m.friend_code!=null&&m.hasOwnProperty("friend_code")){d.friend_code=m.friend_code}return d};CreateInviteCodeResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CreateInviteCodeResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;return values}();return CreateInviteCodeResponse}();Social.DeclineFriendInviteResponse=function(){function DeclineFriendInviteResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DeclineFriendInviteResponse.prototype.result=0;DeclineFriendInviteResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};DeclineFriendInviteResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.DeclineFriendInviteResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};DeclineFriendInviteResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.DeclineFriendInviteResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.DeclineFriendInviteResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_INVITE_DOES_NOT_EXIST":case 3:m.result=3;break;case"ERROR_INVITE_ALREADY_DECLINED":case 4:m.result=4;break}return m};DeclineFriendInviteResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.DeclineFriendInviteResponse.Result[m.result]:m.result}return d};DeclineFriendInviteResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};DeclineFriendInviteResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_INVITE_DOES_NOT_EXIST"]=3;values[valuesById[4]="ERROR_INVITE_ALREADY_DECLINED"]=4;return values}();return DeclineFriendInviteResponse}();Social.GetFacebookFriendListResponse=function(){function GetFacebookFriendListResponse(p){this.friend=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetFacebookFriendListResponse.prototype.result=0;GetFacebookFriendListResponse.prototype.friend=$util.emptyArray;GetFacebookFriendListResponse.prototype.next_cursor="";GetFacebookFriendListResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.friend!=null&&m.friend.length){for(var i=0;i<m.friend.length;++i)$root.POGOProtos.Networking.Responses.Social.GetFacebookFriendListResponse.FacebookFriend.encode(m.friend[i],w.uint32(18).fork()).ldelim()}if(m.next_cursor!=null&&m.hasOwnProperty("next_cursor"))w.uint32(26).string(m.next_cursor);return w};GetFacebookFriendListResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.GetFacebookFriendListResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.friend&&m.friend.length))m.friend=[];m.friend.push($root.POGOProtos.Networking.Responses.Social.GetFacebookFriendListResponse.FacebookFriend.decode(r,r.uint32()));break;case 3:m.next_cursor=r.string();break;default:r.skipType(t&7);break}}return m};GetFacebookFriendListResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.GetFacebookFriendListResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.GetFacebookFriendListResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_FACEBOOK_API":case 3:m.result=3;break;case"ERROR_FACEBOOK_PERMISSIONS":case 4:m.result=4;break;case"ERROR_NO_FACEBOOK_ID":case 5:m.result=5;break}if(d.friend){if(!Array.isArray(d.friend))throw TypeError(".POGOProtos.Networking.Responses.Social.GetFacebookFriendListResponse.friend: array expected");m.friend=[];for(var i=0;i<d.friend.length;++i){if(typeof d.friend[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.Social.GetFacebookFriendListResponse.friend: object expected");m.friend[i]=$root.POGOProtos.Networking.Responses.Social.GetFacebookFriendListResponse.FacebookFriend.fromObject(d.friend[i])}}if(d.next_cursor!=null){m.next_cursor=String(d.next_cursor)}return m};GetFacebookFriendListResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.friend=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0;d.next_cursor=""}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.GetFacebookFriendListResponse.Result[m.result]:m.result}if(m.friend&&m.friend.length){d.friend=[];for(var j=0;j<m.friend.length;++j){d.friend[j]=$root.POGOProtos.Networking.Responses.Social.GetFacebookFriendListResponse.FacebookFriend.toObject(m.friend[j],o)}}if(m.next_cursor!=null&&m.hasOwnProperty("next_cursor")){d.next_cursor=m.next_cursor}return d};GetFacebookFriendListResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetFacebookFriendListResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_FACEBOOK_API"]=3;values[valuesById[4]="ERROR_FACEBOOK_PERMISSIONS"]=4;values[valuesById[5]="ERROR_NO_FACEBOOK_ID"]=5;return values}();GetFacebookFriendListResponse.FacebookFriend=function(){function FacebookFriend(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FacebookFriend.prototype.player=null;FacebookFriend.prototype.full_name="";FacebookFriend.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.player!=null&&m.hasOwnProperty("player"))$root.POGOProtos.Data.Player.PlayerSummary.encode(m.player,w.uint32(10).fork()).ldelim();if(m.full_name!=null&&m.hasOwnProperty("full_name"))w.uint32(18).string(m.full_name);return w};FacebookFriend.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.GetFacebookFriendListResponse.FacebookFriend;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.player=$root.POGOProtos.Data.Player.PlayerSummary.decode(r,r.uint32());break;case 2:m.full_name=r.string();break;default:r.skipType(t&7);break}}return m};FacebookFriend.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.GetFacebookFriendListResponse.FacebookFriend)return d;var m=new $root.POGOProtos.Networking.Responses.Social.GetFacebookFriendListResponse.FacebookFriend;if(d.player!=null){if(typeof d.player!=="object")throw TypeError(".POGOProtos.Networking.Responses.Social.GetFacebookFriendListResponse.FacebookFriend.player: object expected");m.player=$root.POGOProtos.Data.Player.PlayerSummary.fromObject(d.player)}if(d.full_name!=null){m.full_name=String(d.full_name)}return m};FacebookFriend.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.player=null;d.full_name=""}if(m.player!=null&&m.hasOwnProperty("player")){d.player=$root.POGOProtos.Data.Player.PlayerSummary.toObject(m.player,o)}if(m.full_name!=null&&m.hasOwnProperty("full_name")){d.full_name=m.full_name}return d};FacebookFriend.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FacebookFriend}();return GetFacebookFriendListResponse}();Social.GetInboxResponse=function(){function GetInboxResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GetInboxResponse.prototype.result=0;GetInboxResponse.prototype.inbox=null;GetInboxResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.inbox!=null&&m.hasOwnProperty("inbox"))$root.POGOProtos.Data.Inbox.ClientInbox.encode(m.inbox,w.uint32(18).fork()).ldelim();return w};GetInboxResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.GetInboxResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.inbox=$root.POGOProtos.Data.Inbox.ClientInbox.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GetInboxResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.GetInboxResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.GetInboxResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"FAILURE":case 2:m.result=2;break}if(d.inbox!=null){if(typeof d.inbox!=="object")throw TypeError(".POGOProtos.Networking.Responses.Social.GetInboxResponse.inbox: object expected");m.inbox=$root.POGOProtos.Data.Inbox.ClientInbox.fromObject(d.inbox)}return m};GetInboxResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.inbox=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.GetInboxResponse.Result[m.result]:m.result}if(m.inbox!=null&&m.hasOwnProperty("inbox")){d.inbox=$root.POGOProtos.Data.Inbox.ClientInbox.toObject(m.inbox,o)}return d};GetInboxResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};GetInboxResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="FAILURE"]=2;return values}();return GetInboxResponse}();Social.IsMyFriendResponse=function(){function IsMyFriendResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}IsMyFriendResponse.prototype.result=0;IsMyFriendResponse.prototype.is_friend=false;IsMyFriendResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.is_friend!=null&&m.hasOwnProperty("is_friend"))w.uint32(16).bool(m.is_friend);return w};IsMyFriendResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.IsMyFriendResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.is_friend=r.bool();break;default:r.skipType(t&7);break}}return m};IsMyFriendResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.IsMyFriendResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.IsMyFriendResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_PLAYER_NOT_FOUND_DELETED":case 3:m.result=3;break}if(d.is_friend!=null){m.is_friend=Boolean(d.is_friend)}return m};IsMyFriendResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.is_friend=false}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.IsMyFriendResponse.Result[m.result]:m.result}if(m.is_friend!=null&&m.hasOwnProperty("is_friend")){d.is_friend=m.is_friend}return d};IsMyFriendResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};IsMyFriendResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_PLAYER_NOT_FOUND_DELETED"]=3;return values}();return IsMyFriendResponse}();Social.ListFriendsResponse=function(){function ListFriendsResponse(p){this.friend=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListFriendsResponse.prototype.result=0;ListFriendsResponse.prototype.friend=$util.emptyArray;ListFriendsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.friend!=null&&m.friend.length){for(var i=0;i<m.friend.length;++i)$root.POGOProtos.Data.Friends.Friend.encode(m.friend[i],w.uint32(18).fork()).ldelim()}return w};ListFriendsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.ListFriendsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.friend&&m.friend.length))m.friend=[];m.friend.push($root.POGOProtos.Data.Friends.Friend.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};ListFriendsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.ListFriendsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.ListFriendsResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break}if(d.friend){if(!Array.isArray(d.friend))throw TypeError(".POGOProtos.Networking.Responses.Social.ListFriendsResponse.friend: array expected");m.friend=[];for(var i=0;i<d.friend.length;++i){if(typeof d.friend[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.Social.ListFriendsResponse.friend: object expected");m.friend[i]=$root.POGOProtos.Data.Friends.Friend.fromObject(d.friend[i])}}return m};ListFriendsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.friend=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.ListFriendsResponse.Result[m.result]:m.result}if(m.friend&&m.friend.length){d.friend=[];for(var j=0;j<m.friend.length;++j){d.friend[j]=$root.POGOProtos.Data.Friends.Friend.toObject(m.friend[j],o)}}return d};ListFriendsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListFriendsResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;return values}();return ListFriendsResponse}();Social.ListFriendStatusResponse=function(){function ListFriendStatusResponse(p){this.friend=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListFriendStatusResponse.prototype.result=0;ListFriendStatusResponse.prototype.friend=$util.emptyArray;ListFriendStatusResponse.prototype.friend_details_debug_info=null;ListFriendStatusResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.friend!=null&&m.friend.length){for(var i=0;i<m.friend.length;++i)$root.POGOProtos.Data.Friends.FriendDetails.encode(m.friend[i],w.uint32(18).fork()).ldelim()}if(m.friend_details_debug_info!=null&&m.hasOwnProperty("friend_details_debug_info"))$root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug.encode(m.friend_details_debug_info,w.uint32(26).fork()).ldelim();return w};ListFriendStatusResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.friend&&m.friend.length))m.friend=[];m.friend.push($root.POGOProtos.Data.Friends.FriendDetails.decode(r,r.uint32()));break;case 3:m.friend_details_debug_info=$root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};ListFriendStatusResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"EXCEEDS_MAX_PLAYERS_PER_QUERY":case 3:m.result=3;break}if(d.friend){if(!Array.isArray(d.friend))throw TypeError(".POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.friend: array expected");m.friend=[];for(var i=0;i<d.friend.length;++i){if(typeof d.friend[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.friend: object expected");m.friend[i]=$root.POGOProtos.Data.Friends.FriendDetails.fromObject(d.friend[i])}}if(d.friend_details_debug_info!=null){if(typeof d.friend_details_debug_info!=="object")throw TypeError(".POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.friend_details_debug_info: object expected");m.friend_details_debug_info=$root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug.fromObject(d.friend_details_debug_info)}return m};ListFriendStatusResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.friend=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0;d.friend_details_debug_info=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Result[m.result]:m.result}if(m.friend&&m.friend.length){d.friend=[];for(var j=0;j<m.friend.length;++j){d.friend[j]=$root.POGOProtos.Data.Friends.FriendDetails.toObject(m.friend[j],o)}}if(m.friend_details_debug_info!=null&&m.hasOwnProperty("friend_details_debug_info")){d.friend_details_debug_info=$root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug.toObject(m.friend_details_debug_info,o)}return d};ListFriendStatusResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListFriendStatusResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="EXCEEDS_MAX_PLAYERS_PER_QUERY"]=3;return values}();ListFriendStatusResponse.Debug=function(){function Debug(p){this.callee_list=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Debug.prototype.fetched_from_db=0;Debug.prototype.fetched_from_fanout=0;Debug.prototype.fetched_from_player_mapper=0;Debug.prototype.fetched_from_status_cache=0;Debug.prototype.failed_to_fetch=0;Debug.prototype.callee_list=$util.emptyArray;Debug.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fetched_from_db!=null&&m.hasOwnProperty("fetched_from_db"))w.uint32(8).int32(m.fetched_from_db);if(m.fetched_from_fanout!=null&&m.hasOwnProperty("fetched_from_fanout"))w.uint32(16).int32(m.fetched_from_fanout);if(m.fetched_from_player_mapper!=null&&m.hasOwnProperty("fetched_from_player_mapper"))w.uint32(24).int32(m.fetched_from_player_mapper);if(m.fetched_from_status_cache!=null&&m.hasOwnProperty("fetched_from_status_cache"))w.uint32(32).int32(m.fetched_from_status_cache);if(m.failed_to_fetch!=null&&m.hasOwnProperty("failed_to_fetch"))w.uint32(40).int32(m.failed_to_fetch);if(m.callee_list!=null&&m.callee_list.length){for(var i=0;i<m.callee_list.length;++i)$root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug.Callee.encode(m.callee_list[i],w.uint32(50).fork()).ldelim()}return w};Debug.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.fetched_from_db=r.int32();break;case 2:m.fetched_from_fanout=r.int32();break;case 3:m.fetched_from_player_mapper=r.int32();break;case 4:m.fetched_from_status_cache=r.int32();break;case 5:m.failed_to_fetch=r.int32();break;case 6:if(!(m.callee_list&&m.callee_list.length))m.callee_list=[];m.callee_list.push($root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug.Callee.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};Debug.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug)return d;var m=new $root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug;if(d.fetched_from_db!=null){m.fetched_from_db=d.fetched_from_db|0}if(d.fetched_from_fanout!=null){m.fetched_from_fanout=d.fetched_from_fanout|0}if(d.fetched_from_player_mapper!=null){m.fetched_from_player_mapper=d.fetched_from_player_mapper|0}if(d.fetched_from_status_cache!=null){m.fetched_from_status_cache=d.fetched_from_status_cache|0}if(d.failed_to_fetch!=null){m.failed_to_fetch=d.failed_to_fetch|0}if(d.callee_list){if(!Array.isArray(d.callee_list))throw TypeError(".POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug.callee_list: array expected");m.callee_list=[];for(var i=0;i<d.callee_list.length;++i){if(typeof d.callee_list[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug.callee_list: object expected");m.callee_list[i]=$root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug.Callee.fromObject(d.callee_list[i])}}return m};Debug.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.callee_list=[]}if(o.defaults){d.fetched_from_db=0;d.fetched_from_fanout=0;d.fetched_from_player_mapper=0;d.fetched_from_status_cache=0;d.failed_to_fetch=0}if(m.fetched_from_db!=null&&m.hasOwnProperty("fetched_from_db")){d.fetched_from_db=m.fetched_from_db}if(m.fetched_from_fanout!=null&&m.hasOwnProperty("fetched_from_fanout")){d.fetched_from_fanout=m.fetched_from_fanout}if(m.fetched_from_player_mapper!=null&&m.hasOwnProperty("fetched_from_player_mapper")){d.fetched_from_player_mapper=m.fetched_from_player_mapper}if(m.fetched_from_status_cache!=null&&m.hasOwnProperty("fetched_from_status_cache")){d.fetched_from_status_cache=m.fetched_from_status_cache}if(m.failed_to_fetch!=null&&m.hasOwnProperty("failed_to_fetch")){d.failed_to_fetch=m.failed_to_fetch}if(m.callee_list&&m.callee_list.length){d.callee_list=[];for(var j=0;j<m.callee_list.length;++j){d.callee_list[j]=$root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug.Callee.toObject(m.callee_list[j],o)}}return d};Debug.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};Debug.Callee=function(){function Callee(p){this.callee_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Callee.prototype.callee_id=$util.emptyArray;Callee.prototype.player_id="";Callee.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.callee_id!=null&&m.callee_id.length){w.uint32(10).fork();for(var i=0;i<m.callee_id.length;++i)w.int32(m.callee_id[i]);w.ldelim()}if(m.player_id!=null&&m.hasOwnProperty("player_id"))w.uint32(18).string(m.player_id);return w};Callee.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug.Callee;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.callee_id&&m.callee_id.length))m.callee_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.callee_id.push(r.int32())}else m.callee_id.push(r.int32());break;case 2:m.player_id=r.string();break;default:r.skipType(t&7);break}}return m};Callee.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug.Callee)return d;var m=new $root.POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug.Callee;if(d.callee_id){if(!Array.isArray(d.callee_id))throw TypeError(".POGOProtos.Networking.Responses.Social.ListFriendStatusResponse.Debug.Callee.callee_id: array expected");m.callee_id=[];for(var i=0;i<d.callee_id.length;++i){m.callee_id[i]=d.callee_id[i]|0}}if(d.player_id!=null){m.player_id=String(d.player_id)}return m};Callee.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.callee_id=[]}if(o.defaults){d.player_id=""}if(m.callee_id&&m.callee_id.length){d.callee_id=[];for(var j=0;j<m.callee_id.length;++j){d.callee_id[j]=m.callee_id[j]}}if(m.player_id!=null&&m.hasOwnProperty("player_id")){d.player_id=m.player_id}return d};Callee.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Callee}();return Debug}();return ListFriendStatusResponse}();Social.ListIncomingFriendInvitesResponse=function(){function ListIncomingFriendInvitesResponse(p){this.invites=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListIncomingFriendInvitesResponse.prototype.result=0;ListIncomingFriendInvitesResponse.prototype.invites=$util.emptyArray;ListIncomingFriendInvitesResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.invites!=null&&m.invites.length){for(var i=0;i<m.invites.length;++i)$root.POGOProtos.Data.Friends.IncomingFriendInviteDisplay.encode(m.invites[i],w.uint32(18).fork()).ldelim()}return w};ListIncomingFriendInvitesResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.ListIncomingFriendInvitesResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.invites&&m.invites.length))m.invites=[];m.invites.push($root.POGOProtos.Data.Friends.IncomingFriendInviteDisplay.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};ListIncomingFriendInvitesResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.ListIncomingFriendInvitesResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.ListIncomingFriendInvitesResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break}if(d.invites){if(!Array.isArray(d.invites))throw TypeError(".POGOProtos.Networking.Responses.Social.ListIncomingFriendInvitesResponse.invites: array expected");m.invites=[];for(var i=0;i<d.invites.length;++i){if(typeof d.invites[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.Social.ListIncomingFriendInvitesResponse.invites: object expected");m.invites[i]=$root.POGOProtos.Data.Friends.IncomingFriendInviteDisplay.fromObject(d.invites[i])}}return m};ListIncomingFriendInvitesResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.invites=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.ListIncomingFriendInvitesResponse.Result[m.result]:m.result}if(m.invites&&m.invites.length){d.invites=[];for(var j=0;j<m.invites.length;++j){d.invites[j]=$root.POGOProtos.Data.Friends.IncomingFriendInviteDisplay.toObject(m.invites[j],o)}}return d};ListIncomingFriendInvitesResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListIncomingFriendInvitesResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;return values}();return ListIncomingFriendInvitesResponse}();Social.ListOutgoingFriendInvitesResponse=function(){function ListOutgoingFriendInvitesResponse(p){this.invites=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ListOutgoingFriendInvitesResponse.prototype.result=0;ListOutgoingFriendInvitesResponse.prototype.invites=$util.emptyArray;ListOutgoingFriendInvitesResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.invites!=null&&m.invites.length){for(var i=0;i<m.invites.length;++i)$root.POGOProtos.Data.Friends.OutgoingFriendInviteDisplay.encode(m.invites[i],w.uint32(18).fork()).ldelim()}return w};ListOutgoingFriendInvitesResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.ListOutgoingFriendInvitesResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:if(!(m.invites&&m.invites.length))m.invites=[];m.invites.push($root.POGOProtos.Data.Friends.OutgoingFriendInviteDisplay.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};ListOutgoingFriendInvitesResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.ListOutgoingFriendInvitesResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.ListOutgoingFriendInvitesResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break}if(d.invites){if(!Array.isArray(d.invites))throw TypeError(".POGOProtos.Networking.Responses.Social.ListOutgoingFriendInvitesResponse.invites: array expected");m.invites=[];for(var i=0;i<d.invites.length;++i){if(typeof d.invites[i]!=="object")throw TypeError(".POGOProtos.Networking.Responses.Social.ListOutgoingFriendInvitesResponse.invites: object expected");m.invites[i]=$root.POGOProtos.Data.Friends.OutgoingFriendInviteDisplay.fromObject(d.invites[i])}}return m};ListOutgoingFriendInvitesResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.invites=[]}if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.ListOutgoingFriendInvitesResponse.Result[m.result]:m.result}if(m.invites&&m.invites.length){d.invites=[];for(var j=0;j<m.invites.length;++j){d.invites[j]=$root.POGOProtos.Data.Friends.OutgoingFriendInviteDisplay.toObject(m.invites[j],o)}}return d};ListOutgoingFriendInvitesResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};ListOutgoingFriendInvitesResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;return values}();return ListOutgoingFriendInvitesResponse}();Social.RemoveFriendResponse=function(){function RemoveFriendResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}RemoveFriendResponse.prototype.result=0;RemoveFriendResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};RemoveFriendResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.RemoveFriendResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};RemoveFriendResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.RemoveFriendResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.RemoveFriendResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_PLAYER_DOES_NOT_EXIST_DELETED":case 2:m.result=2;break;case"ERROR_PLAYER_NOT_A_FRIEND":case 3:m.result=3;break}return m};RemoveFriendResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.RemoveFriendResponse.Result[m.result]:m.result}return d};RemoveFriendResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};RemoveFriendResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_PLAYER_DOES_NOT_EXIST_DELETED"]=2;values[valuesById[3]="ERROR_PLAYER_NOT_A_FRIEND"]=3;return values}();return RemoveFriendResponse}();Social.SearchPlayerResponse=function(){function SearchPlayerResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SearchPlayerResponse.prototype.result=0;SearchPlayerResponse.prototype.player=null;SearchPlayerResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.player!=null&&m.hasOwnProperty("player"))$root.POGOProtos.Data.Player.PlayerSummary.encode(m.player,w.uint32(18).fork()).ldelim();return w};SearchPlayerResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.SearchPlayerResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.player=$root.POGOProtos.Data.Player.PlayerSummary.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};SearchPlayerResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.SearchPlayerResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.SearchPlayerResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_PLAYER_NOT_FOUND":case 3:m.result=3;break}if(d.player!=null){if(typeof d.player!=="object")throw TypeError(".POGOProtos.Networking.Responses.Social.SearchPlayerResponse.player: object expected");m.player=$root.POGOProtos.Data.Player.PlayerSummary.fromObject(d.player)}return m};SearchPlayerResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.player=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.SearchPlayerResponse.Result[m.result]:m.result}if(m.player!=null&&m.hasOwnProperty("player")){d.player=$root.POGOProtos.Data.Player.PlayerSummary.toObject(m.player,o)}return d};SearchPlayerResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SearchPlayerResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_PLAYER_NOT_FOUND"]=3;return values}();return SearchPlayerResponse}();Social.SendFacebookFriendInviteResponse=function(){function SendFacebookFriendInviteResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SendFacebookFriendInviteResponse.prototype.result=0;SendFacebookFriendInviteResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};SendFacebookFriendInviteResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.SendFacebookFriendInviteResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};SendFacebookFriendInviteResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.SendFacebookFriendInviteResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.SendFacebookFriendInviteResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_PLAYER_NOT_FOUND":case 3:m.result=3;break;case"ERROR_PLAYER_OUTBOX_FULL":case 4:m.result=4;break;case"ERROR_PLAYER_INBOX_FULL":case 5:m.result=5;break;case"ERROR_SENDER_HAS_MAX_FRIENDS":case 6:m.result=6;break;case"ERROR_RECEIVER_HAS_MAX_FRIENDS":case 7:m.result=7;break;case"ERROR_ALREADY_A_FRIEND":case 8:m.result=8;break;case"ERROR_INVITE_ALREADY_SENT":case 9:m.result=9;break;case"ERROR_INVITE_ALREADY_RECEIVED":case 10:m.result=10;break;case"ERROR_CANNOT_SEND_INVITES_TO_YOURSELF":case 11:m.result=11;break;case"ERROR_FRIEND_CACHE_EXPIRED":case 12:m.result=12;break;case"ERROR_FRIEND_NOT_CACHED":case 13:m.result=13;break;case"ERROR_INVALID_SENDER_FACEBOOK_ID":case 14:m.result=14;break}return m};SendFacebookFriendInviteResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.SendFacebookFriendInviteResponse.Result[m.result]:m.result}return d};SendFacebookFriendInviteResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SendFacebookFriendInviteResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_PLAYER_NOT_FOUND"]=3;values[valuesById[4]="ERROR_PLAYER_OUTBOX_FULL"]=4;values[valuesById[5]="ERROR_PLAYER_INBOX_FULL"]=5;values[valuesById[6]="ERROR_SENDER_HAS_MAX_FRIENDS"]=6;values[valuesById[7]="ERROR_RECEIVER_HAS_MAX_FRIENDS"]=7;values[valuesById[8]="ERROR_ALREADY_A_FRIEND"]=8;values[valuesById[9]="ERROR_INVITE_ALREADY_SENT"]=9;values[valuesById[10]="ERROR_INVITE_ALREADY_RECEIVED"]=10;values[valuesById[11]="ERROR_CANNOT_SEND_INVITES_TO_YOURSELF"]=11;values[valuesById[12]="ERROR_FRIEND_CACHE_EXPIRED"]=12;values[valuesById[13]="ERROR_FRIEND_NOT_CACHED"]=13;values[valuesById[14]="ERROR_INVALID_SENDER_FACEBOOK_ID"]=14;return values}();return SendFacebookFriendInviteResponse}();Social.SendFriendInviteResponse=function(){function SendFriendInviteResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SendFriendInviteResponse.prototype.result=0;SendFriendInviteResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};SendFriendInviteResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.SendFriendInviteResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};SendFriendInviteResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.SendFriendInviteResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.SendFriendInviteResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_ALREADY_A_FRIEND":case 3:m.result=3;break;case"ERROR_PLAYER_DOES_NOT_EXIST_DELETED":case 4:m.result=4;break;case"ERROR_PLAYER_INBOX_FULL":case 5:m.result=5;break;case"ERROR_PLAYER_OUTBOX_FULL":case 6:m.result=6;break;case"ERROR_SENDER_HAS_MAX_FRIENDS":case 7:m.result=7;break;case"ERROR_INVITE_ALREADY_SENT":case 8:m.result=8;break;case"ERROR_CANNOT_SEND_INVITES_TO_YOURSELF":case 9:m.result=9;break;case"ERROR_INVITE_ALREADY_RECEIVED":case 10:m.result=10;break;case"ERROR_RECEIVER_HAS_MAX_FRIENDS":case 11:m.result=11;break}return m};SendFriendInviteResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.SendFriendInviteResponse.Result[m.result]:m.result}return d};SendFriendInviteResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SendFriendInviteResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_ALREADY_A_FRIEND"]=3;values[valuesById[4]="ERROR_PLAYER_DOES_NOT_EXIST_DELETED"]=4;values[valuesById[5]="ERROR_PLAYER_INBOX_FULL"]=5;values[valuesById[6]="ERROR_PLAYER_OUTBOX_FULL"]=6;values[valuesById[7]="ERROR_SENDER_HAS_MAX_FRIENDS"]=7;values[valuesById[8]="ERROR_INVITE_ALREADY_SENT"]=8;values[valuesById[9]="ERROR_CANNOT_SEND_INVITES_TO_YOURSELF"]=9;values[valuesById[10]="ERROR_INVITE_ALREADY_RECEIVED"]=10;values[valuesById[11]="ERROR_RECEIVER_HAS_MAX_FRIENDS"]=11;return values}();return SendFriendInviteResponse}();Social.UpdateFacebookStatusResponse=function(){function UpdateFacebookStatusResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateFacebookStatusResponse.prototype.result=0;UpdateFacebookStatusResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};UpdateFacebookStatusResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.UpdateFacebookStatusResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};UpdateFacebookStatusResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.UpdateFacebookStatusResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.UpdateFacebookStatusResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_PLAYER_NOT_FOUND":case 3:m.result=3;break;case"ERROR_FACEBOOK_API":case 4:m.result=4;break;case"ERROR_ALREADY_EXISTS":case 5:m.result=5;break}return m};UpdateFacebookStatusResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.Social.UpdateFacebookStatusResponse.Result[m.result]:m.result}return d};UpdateFacebookStatusResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateFacebookStatusResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_PLAYER_NOT_FOUND"]=3;values[valuesById[4]="ERROR_FACEBOOK_API"]=4;values[valuesById[5]="ERROR_ALREADY_EXISTS"]=5;return values}();return UpdateFacebookStatusResponse}();Social.UpdateNotificationResponse=function(){function UpdateNotificationResponse(p){this.notification_ids=[];this.create_timestamp_ms=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateNotificationResponse.prototype.notification_ids=$util.emptyArray;UpdateNotificationResponse.prototype.create_timestamp_ms=$util.emptyArray;UpdateNotificationResponse.prototype.state=0;UpdateNotificationResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.notification_ids!=null&&m.notification_ids.length){for(var i=0;i<m.notification_ids.length;++i)w.uint32(10).string(m.notification_ids[i])}if(m.create_timestamp_ms!=null&&m.create_timestamp_ms.length){w.uint32(18).fork();for(var i=0;i<m.create_timestamp_ms.length;++i)w.int64(m.create_timestamp_ms[i]);w.ldelim()}if(m.state!=null&&m.hasOwnProperty("state"))w.uint32(24).int32(m.state);return w};UpdateNotificationResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.Social.UpdateNotificationResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.notification_ids&&m.notification_ids.length))m.notification_ids=[];m.notification_ids.push(r.string());break;case 2:if(!(m.create_timestamp_ms&&m.create_timestamp_ms.length))m.create_timestamp_ms=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.create_timestamp_ms.push(r.int64())}else m.create_timestamp_ms.push(r.int64());break;case 3:m.state=r.int32();break;default:r.skipType(t&7);break}}return m};UpdateNotificationResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.Social.UpdateNotificationResponse)return d;var m=new $root.POGOProtos.Networking.Responses.Social.UpdateNotificationResponse;if(d.notification_ids){if(!Array.isArray(d.notification_ids))throw TypeError(".POGOProtos.Networking.Responses.Social.UpdateNotificationResponse.notification_ids: array expected");m.notification_ids=[];for(var i=0;i<d.notification_ids.length;++i){m.notification_ids[i]=String(d.notification_ids[i])}}if(d.create_timestamp_ms){if(!Array.isArray(d.create_timestamp_ms))throw TypeError(".POGOProtos.Networking.Responses.Social.UpdateNotificationResponse.create_timestamp_ms: array expected");m.create_timestamp_ms=[];for(var i=0;i<d.create_timestamp_ms.length;++i){if($util.Long)(m.create_timestamp_ms[i]=$util.Long.fromValue(d.create_timestamp_ms[i])).unsigned=false;else if(typeof d.create_timestamp_ms[i]==="string")m.create_timestamp_ms[i]=parseInt(d.create_timestamp_ms[i],10);else if(typeof d.create_timestamp_ms[i]==="number")m.create_timestamp_ms[i]=d.create_timestamp_ms[i];else if(typeof d.create_timestamp_ms[i]==="object")m.create_timestamp_ms[i]=new $util.LongBits(d.create_timestamp_ms[i].low>>>0,d.create_timestamp_ms[i].high>>>0).toNumber()}}switch(d.state){case"UNSET_STATE":case 0:m.state=0;break;case"VIEWED":case 1:m.state=1;break}return m};UpdateNotificationResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.notification_ids=[];d.create_timestamp_ms=[]}if(o.defaults){d.state=o.enums===String?"UNSET_STATE":0}if(m.notification_ids&&m.notification_ids.length){d.notification_ids=[];for(var j=0;j<m.notification_ids.length;++j){d.notification_ids[j]=m.notification_ids[j]}}if(m.create_timestamp_ms&&m.create_timestamp_ms.length){d.create_timestamp_ms=[];for(var j=0;j<m.create_timestamp_ms.length;++j){if(typeof m.create_timestamp_ms[j]==="number")d.create_timestamp_ms[j]=o.longs===String?String(m.create_timestamp_ms[j]):m.create_timestamp_ms[j];else d.create_timestamp_ms[j]=o.longs===String?$util.Long.prototype.toString.call(m.create_timestamp_ms[j]):o.longs===Number?new $util.LongBits(m.create_timestamp_ms[j].low>>>0,m.create_timestamp_ms[j].high>>>0).toNumber():m.create_timestamp_ms[j]}}if(m.state!=null&&m.hasOwnProperty("state")){d.state=o.enums===String?$root.POGOProtos.Enums.NotificationState[m.state]:m.state}return d};UpdateNotificationResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UpdateNotificationResponse}();return Social}();Responses.StartGymBattleResponse=function(){function StartGymBattleResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}StartGymBattleResponse.prototype.result=0;StartGymBattleResponse.prototype.battle_start_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;StartGymBattleResponse.prototype.battle_end_timestamp_ms=$util.Long?$util.Long.fromBits(0,0,false):0;StartGymBattleResponse.prototype.battle_id="";StartGymBattleResponse.prototype.defender=null;StartGymBattleResponse.prototype.battle_log=null;StartGymBattleResponse.prototype.attacker=null;StartGymBattleResponse.prototype.battle=null;StartGymBattleResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.battle_start_timestamp_ms!=null&&m.hasOwnProperty("battle_start_timestamp_ms"))w.uint32(16).int64(m.battle_start_timestamp_ms);if(m.battle_end_timestamp_ms!=null&&m.hasOwnProperty("battle_end_timestamp_ms"))w.uint32(24).int64(m.battle_end_timestamp_ms);if(m.battle_id!=null&&m.hasOwnProperty("battle_id"))w.uint32(34).string(m.battle_id);if(m.defender!=null&&m.hasOwnProperty("defender"))$root.POGOProtos.Data.Battle.BattleParticipant.encode(m.defender,w.uint32(42).fork()).ldelim();if(m.battle_log!=null&&m.hasOwnProperty("battle_log"))$root.POGOProtos.Data.Battle.BattleLog.encode(m.battle_log,w.uint32(50).fork()).ldelim();if(m.attacker!=null&&m.hasOwnProperty("attacker"))$root.POGOProtos.Data.Battle.BattleParticipant.encode(m.attacker,w.uint32(58).fork()).ldelim();if(m.battle!=null&&m.hasOwnProperty("battle"))$root.POGOProtos.Data.Battle.Battle.encode(m.battle,w.uint32(66).fork()).ldelim();return w};StartGymBattleResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.StartGymBattleResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.battle_start_timestamp_ms=r.int64();break;case 3:m.battle_end_timestamp_ms=r.int64();break;case 4:m.battle_id=r.string();break;case 5:m.defender=$root.POGOProtos.Data.Battle.BattleParticipant.decode(r,r.uint32());break;case 6:m.battle_log=$root.POGOProtos.Data.Battle.BattleLog.decode(r,r.uint32());break;case 7:m.attacker=$root.POGOProtos.Data.Battle.BattleParticipant.decode(r,r.uint32());break;case 8:m.battle=$root.POGOProtos.Data.Battle.Battle.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};StartGymBattleResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.StartGymBattleResponse)return d;var m=new $root.POGOProtos.Networking.Responses.StartGymBattleResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_GYM_NOT_FOUND":case 2:m.result=2;break;case"ERROR_GYM_NEUTRAL":case 3:m.result=3;break;case"ERROR_GYM_WRONG_TEAM":case 4:m.result=4;break;case"ERROR_GYM_EMPTY":case 5:m.result=5;break;case"ERROR_INVALID_DEFENDER":case 6:m.result=6;break;case"ERROR_TRAINING_INVALID_ATTACKER_COUNT":case 7:m.result=7;break;case"ERROR_ALL_POKEMON_FAINTED":case 8:m.result=8;break;case"ERROR_TOO_MANY_BATTLES":case 9:m.result=9;break;case"ERROR_TOO_MANY_PLAYERS":case 10:m.result=10;break;case"ERROR_GYM_BATTLE_LOCKOUT":case 11:m.result=11;break;case"ERROR_PLAYER_BELOW_MINIMUM_LEVEL":case 12:m.result=12;break;case"ERROR_NOT_IN_RANGE":case 13:m.result=13;break;case"ERROR_POI_INACCESSIBLE":case 14:m.result=14;break}if(d.battle_start_timestamp_ms!=null){if($util.Long)(m.battle_start_timestamp_ms=$util.Long.fromValue(d.battle_start_timestamp_ms)).unsigned=false;else if(typeof d.battle_start_timestamp_ms==="string")m.battle_start_timestamp_ms=parseInt(d.battle_start_timestamp_ms,10);else if(typeof d.battle_start_timestamp_ms==="number")m.battle_start_timestamp_ms=d.battle_start_timestamp_ms;else if(typeof d.battle_start_timestamp_ms==="object")m.battle_start_timestamp_ms=new $util.LongBits(d.battle_start_timestamp_ms.low>>>0,d.battle_start_timestamp_ms.high>>>0).toNumber()}if(d.battle_end_timestamp_ms!=null){if($util.Long)(m.battle_end_timestamp_ms=$util.Long.fromValue(d.battle_end_timestamp_ms)).unsigned=false;else if(typeof d.battle_end_timestamp_ms==="string")m.battle_end_timestamp_ms=parseInt(d.battle_end_timestamp_ms,10);else if(typeof d.battle_end_timestamp_ms==="number")m.battle_end_timestamp_ms=d.battle_end_timestamp_ms;else if(typeof d.battle_end_timestamp_ms==="object")m.battle_end_timestamp_ms=new $util.LongBits(d.battle_end_timestamp_ms.low>>>0,d.battle_end_timestamp_ms.high>>>0).toNumber()}if(d.battle_id!=null){m.battle_id=String(d.battle_id)}if(d.defender!=null){if(typeof d.defender!=="object")throw TypeError(".POGOProtos.Networking.Responses.StartGymBattleResponse.defender: object expected");m.defender=$root.POGOProtos.Data.Battle.BattleParticipant.fromObject(d.defender)}if(d.battle_log!=null){if(typeof d.battle_log!=="object")throw TypeError(".POGOProtos.Networking.Responses.StartGymBattleResponse.battle_log: object expected");m.battle_log=$root.POGOProtos.Data.Battle.BattleLog.fromObject(d.battle_log)}if(d.attacker!=null){if(typeof d.attacker!=="object")throw TypeError(".POGOProtos.Networking.Responses.StartGymBattleResponse.attacker: object expected");m.attacker=$root.POGOProtos.Data.Battle.BattleParticipant.fromObject(d.attacker)}if(d.battle!=null){if(typeof d.battle!=="object")throw TypeError(".POGOProtos.Networking.Responses.StartGymBattleResponse.battle: object expected");m.battle=$root.POGOProtos.Data.Battle.Battle.fromObject(d.battle)}return m};StartGymBattleResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;if($util.Long){var n=new $util.Long(0,0,false);d.battle_start_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.battle_start_timestamp_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.battle_end_timestamp_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.battle_end_timestamp_ms=o.longs===String?"0":0;d.battle_id="";d.defender=null;d.battle_log=null;d.attacker=null;d.battle=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.StartGymBattleResponse.Result[m.result]:m.result}if(m.battle_start_timestamp_ms!=null&&m.hasOwnProperty("battle_start_timestamp_ms")){if(typeof m.battle_start_timestamp_ms==="number")d.battle_start_timestamp_ms=o.longs===String?String(m.battle_start_timestamp_ms):m.battle_start_timestamp_ms;else d.battle_start_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.battle_start_timestamp_ms):o.longs===Number?new $util.LongBits(m.battle_start_timestamp_ms.low>>>0,m.battle_start_timestamp_ms.high>>>0).toNumber():m.battle_start_timestamp_ms}if(m.battle_end_timestamp_ms!=null&&m.hasOwnProperty("battle_end_timestamp_ms")){if(typeof m.battle_end_timestamp_ms==="number")d.battle_end_timestamp_ms=o.longs===String?String(m.battle_end_timestamp_ms):m.battle_end_timestamp_ms;else d.battle_end_timestamp_ms=o.longs===String?$util.Long.prototype.toString.call(m.battle_end_timestamp_ms):o.longs===Number?new $util.LongBits(m.battle_end_timestamp_ms.low>>>0,m.battle_end_timestamp_ms.high>>>0).toNumber():m.battle_end_timestamp_ms}if(m.battle_id!=null&&m.hasOwnProperty("battle_id")){d.battle_id=m.battle_id}if(m.defender!=null&&m.hasOwnProperty("defender")){d.defender=$root.POGOProtos.Data.Battle.BattleParticipant.toObject(m.defender,o)}if(m.battle_log!=null&&m.hasOwnProperty("battle_log")){d.battle_log=$root.POGOProtos.Data.Battle.BattleLog.toObject(m.battle_log,o)}if(m.attacker!=null&&m.hasOwnProperty("attacker")){d.attacker=$root.POGOProtos.Data.Battle.BattleParticipant.toObject(m.attacker,o)}if(m.battle!=null&&m.hasOwnProperty("battle")){d.battle=$root.POGOProtos.Data.Battle.Battle.toObject(m.battle,o)}return d};StartGymBattleResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};StartGymBattleResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_GYM_NOT_FOUND"]=2;values[valuesById[3]="ERROR_GYM_NEUTRAL"]=3;values[valuesById[4]="ERROR_GYM_WRONG_TEAM"]=4;values[valuesById[5]="ERROR_GYM_EMPTY"]=5;values[valuesById[6]="ERROR_INVALID_DEFENDER"]=6;values[valuesById[7]="ERROR_TRAINING_INVALID_ATTACKER_COUNT"]=7;values[valuesById[8]="ERROR_ALL_POKEMON_FAINTED"]=8;values[valuesById[9]="ERROR_TOO_MANY_BATTLES"]=9;values[valuesById[10]="ERROR_TOO_MANY_PLAYERS"]=10;values[valuesById[11]="ERROR_GYM_BATTLE_LOCKOUT"]=11;values[valuesById[12]="ERROR_PLAYER_BELOW_MINIMUM_LEVEL"]=12;values[valuesById[13]="ERROR_NOT_IN_RANGE"]=13;values[valuesById[14]="ERROR_POI_INACCESSIBLE"]=14;return values}();return StartGymBattleResponse}();Responses.StartRaidBattleResponse=function(){function StartRaidBattleResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}StartRaidBattleResponse.prototype.result=0;StartRaidBattleResponse.prototype.battle=null;StartRaidBattleResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.battle!=null&&m.hasOwnProperty("battle"))$root.POGOProtos.Data.Battle.Battle.encode(m.battle,w.uint32(18).fork()).ldelim();return w};StartRaidBattleResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.StartRaidBattleResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.battle=$root.POGOProtos.Data.Battle.Battle.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};StartRaidBattleResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.StartRaidBattleResponse)return d;var m=new $root.POGOProtos.Networking.Responses.StartRaidBattleResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_GYM_NOT_FOUND":case 2:m.result=2;break;case"ERROR_RAID_UNAVAILABLE":case 3:m.result=3;break;case"ERROR_RAID_COMPLETED":case 4:m.result=4;break;case"ERROR_INVALID_ATTACKERS":case 5:m.result=5;break;case"ERROR_PLAYER_BELOW_MINIMUM_LEVEL":case 6:m.result=6;break;case"ERROR_NOT_IN_RANGE":case 7:m.result=7;break;case"ERROR_POI_INACCESSIBLE":case 8:m.result=8;break;case"ERROR_LOBBY_NOT_FOUND":case 9:m.result=9;break;case"ERROR_NO_TICKET":case 10:m.result=10;break;case"ERROR_INVALID_SERVER":case 11:m.result=11;break;case"ERROR_NEVER_JOINED_BATTLE":case 12:m.result=12;break}if(d.battle!=null){if(typeof d.battle!=="object")throw TypeError(".POGOProtos.Networking.Responses.StartRaidBattleResponse.battle: object expected");m.battle=$root.POGOProtos.Data.Battle.Battle.fromObject(d.battle)}return m};StartRaidBattleResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.battle=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.StartRaidBattleResponse.Result[m.result]:m.result}if(m.battle!=null&&m.hasOwnProperty("battle")){d.battle=$root.POGOProtos.Data.Battle.Battle.toObject(m.battle,o)}return d};StartRaidBattleResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};StartRaidBattleResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_GYM_NOT_FOUND"]=2;values[valuesById[3]="ERROR_RAID_UNAVAILABLE"]=3;values[valuesById[4]="ERROR_RAID_COMPLETED"]=4;values[valuesById[5]="ERROR_INVALID_ATTACKERS"]=5;values[valuesById[6]="ERROR_PLAYER_BELOW_MINIMUM_LEVEL"]=6;values[valuesById[7]="ERROR_NOT_IN_RANGE"]=7;values[valuesById[8]="ERROR_POI_INACCESSIBLE"]=8;values[valuesById[9]="ERROR_LOBBY_NOT_FOUND"]=9;values[valuesById[10]="ERROR_NO_TICKET"]=10;values[valuesById[11]="ERROR_INVALID_SERVER"]=11;values[valuesById[12]="ERROR_NEVER_JOINED_BATTLE"]=12;return values}();return StartRaidBattleResponse}();Responses.StartTutorialActionResponse=function(){function StartTutorialActionResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}StartTutorialActionResponse.prototype.result=0;StartTutorialActionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);return w};StartTutorialActionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.StartTutorialActionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;default:r.skipType(t&7);break}}return m};StartTutorialActionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.StartTutorialActionResponse)return d;var m=new $root.POGOProtos.Networking.Responses.StartTutorialActionResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_PLAYER_ALREADY_STARTED_TUTORIAL":case 2:m.result=2;break;case"ERROR_FAILED_TO_START":case 3:m.result=3;break}return m};StartTutorialActionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.StartTutorialActionResponse.Result[m.result]:m.result}return d};StartTutorialActionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};StartTutorialActionResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_PLAYER_ALREADY_STARTED_TUTORIAL"]=2;values[valuesById[3]="ERROR_FAILED_TO_START"]=3;return values}();return StartTutorialActionResponse}();Responses.SubmitCombatChallengePokemonsResponse=function(){function SubmitCombatChallengePokemonsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SubmitCombatChallengePokemonsResponse.prototype.result=0;SubmitCombatChallengePokemonsResponse.prototype.challenge=null;SubmitCombatChallengePokemonsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.challenge!=null&&m.hasOwnProperty("challenge"))$root.POGOProtos.Data.Combat.CombatChallenge.encode(m.challenge,w.uint32(18).fork()).ldelim();return w};SubmitCombatChallengePokemonsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.SubmitCombatChallengePokemonsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.challenge=$root.POGOProtos.Data.Combat.CombatChallenge.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};SubmitCombatChallengePokemonsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.SubmitCombatChallengePokemonsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.SubmitCombatChallengePokemonsResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALID_CHALLENGE_STATE":case 2:m.result=2;break;case"ERROR_CHALLENGE_NOT_FOUND":case 3:m.result=3;break;case"ERROR_POKEMON_NOT_IN_INVENTORY":case 4:m.result=4;break;case"ERROR_NOT_ELIGIBLE_LEAGUE":case 5:m.result=5;break;case"ERROR_ALREADY_TIMEDOUT":case 6:m.result=6;break;case"ERROR_ALREADY_CANCELLED":case 7:m.result=7;break;case"ERROR_ACCESS_DENIED":case 8:m.result=8;break;case"ERROR_ALREADY_DECLINED":case 9:m.result=9;break}if(d.challenge!=null){if(typeof d.challenge!=="object")throw TypeError(".POGOProtos.Networking.Responses.SubmitCombatChallengePokemonsResponse.challenge: object expected");m.challenge=$root.POGOProtos.Data.Combat.CombatChallenge.fromObject(d.challenge)}return m};SubmitCombatChallengePokemonsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.challenge=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.SubmitCombatChallengePokemonsResponse.Result[m.result]:m.result}if(m.challenge!=null&&m.hasOwnProperty("challenge")){d.challenge=$root.POGOProtos.Data.Combat.CombatChallenge.toObject(m.challenge,o)}return d};SubmitCombatChallengePokemonsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};SubmitCombatChallengePokemonsResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_CHALLENGE_STATE"]=2;values[valuesById[3]="ERROR_CHALLENGE_NOT_FOUND"]=3;values[valuesById[4]="ERROR_POKEMON_NOT_IN_INVENTORY"]=4;values[valuesById[5]="ERROR_NOT_ELIGIBLE_LEAGUE"]=5;values[valuesById[6]="ERROR_ALREADY_TIMEDOUT"]=6;values[valuesById[7]="ERROR_ALREADY_CANCELLED"]=7;values[valuesById[8]="ERROR_ACCESS_DENIED"]=8;values[valuesById[9]="ERROR_ALREADY_DECLINED"]=9;return values}();return SubmitCombatChallengePokemonsResponse}();Responses.UnlockSpecialMoveResponse=function(){function UnlockSpecialMoveResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UnlockSpecialMoveResponse.prototype.result=0;UnlockSpecialMoveResponse.prototype.unlocked_pokemon=null;UnlockSpecialMoveResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.unlocked_pokemon!=null&&m.hasOwnProperty("unlocked_pokemon"))$root.POGOProtos.Data.PokemonData.encode(m.unlocked_pokemon,w.uint32(18).fork()).ldelim();return w};UnlockSpecialMoveResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UnlockSpecialMoveResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.unlocked_pokemon=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};UnlockSpecialMoveResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UnlockSpecialMoveResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UnlockSpecialMoveResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_POKEMON_NOT_FOUND":case 2:m.result=2;break;case"ERROR_UNLOCK_NOT_AVAILABLE":case 3:m.result=3;break;case"ERROR_ALREADY_UNLOCKED":case 4:m.result=4;break;case"ERROR_INSUFFICIENT_RESOURCES":case 5:m.result=5;break;case"ERROR_DISABLED":case 6:m.result=6;break}if(d.unlocked_pokemon!=null){if(typeof d.unlocked_pokemon!=="object")throw TypeError(".POGOProtos.Networking.Responses.UnlockSpecialMoveResponse.unlocked_pokemon: object expected");m.unlocked_pokemon=$root.POGOProtos.Data.PokemonData.fromObject(d.unlocked_pokemon)}return m};UnlockSpecialMoveResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.unlocked_pokemon=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.UnlockSpecialMoveResponse.Result[m.result]:m.result}if(m.unlocked_pokemon!=null&&m.hasOwnProperty("unlocked_pokemon")){d.unlocked_pokemon=$root.POGOProtos.Data.PokemonData.toObject(m.unlocked_pokemon,o)}return d};UnlockSpecialMoveResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UnlockSpecialMoveResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_POKEMON_NOT_FOUND"]=2;values[valuesById[3]="ERROR_UNLOCK_NOT_AVAILABLE"]=3;values[valuesById[4]="ERROR_ALREADY_UNLOCKED"]=4;values[valuesById[5]="ERROR_INSUFFICIENT_RESOURCES"]=5;values[valuesById[6]="ERROR_DISABLED"]=6;return values}();return UnlockSpecialMoveResponse}();Responses.UpdateCombatResponse=function(){function UpdateCombatResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateCombatResponse.prototype.result=0;UpdateCombatResponse.prototype.combat=null;UpdateCombatResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.combat!=null&&m.hasOwnProperty("combat"))$root.POGOProtos.Data.Combat.Combat.encode(m.combat,w.uint32(18).fork()).ldelim();return w};UpdateCombatResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UpdateCombatResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.combat=$root.POGOProtos.Data.Combat.Combat.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};UpdateCombatResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UpdateCombatResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UpdateCombatResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALID_COMBAT_STATE":case 2:m.result=2;break;case"ERROR_COMBAT_NOT_FOUND":case 3:m.result=3;break;case"ERROR_PLAYER_NOT_IN_COMBAT":case 4:m.result=4;break;case"ERROR_ILLEGAL_ACTION":case 5:m.result=5;break;case"ERROR_INVALID_SUBMIT_TIME":case 6:m.result=6;break;case"ERROR_PLAYER_IN_MINIGAME":case 7:m.result=7;break;case"ERROR_EXISTING_QUEUED_ATTACK":case 8:m.result=8;break;case"ERROR_INVALID_CHANGE_POKEMON":case 9:m.result=9;break;case"ERROR_INSUFFICIENT_ENERGY":case 10:m.result=10;break;case"ERROR_INVALID_MOVE":case 11:m.result=11;break;case"ERROR_INVALID_DURATION_TURNS":case 12:m.result=12;break;case"ERROR_INVALID_MINIGAME_STATE":case 13:m.result=13;break;case"ERROR_INVALID_QUICK_SWAP_POKEMON":case 14:m.result=14;break;case"ERROR_QUICK_SWAP_NOT_AVAILABLE":case 15:m.result=15;break}if(d.combat!=null){if(typeof d.combat!=="object")throw TypeError(".POGOProtos.Networking.Responses.UpdateCombatResponse.combat: object expected");m.combat=$root.POGOProtos.Data.Combat.Combat.fromObject(d.combat)}return m};UpdateCombatResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.combat=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.UpdateCombatResponse.Result[m.result]:m.result}if(m.combat!=null&&m.hasOwnProperty("combat")){d.combat=$root.POGOProtos.Data.Combat.Combat.toObject(m.combat,o)}return d};UpdateCombatResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateCombatResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_COMBAT_STATE"]=2;values[valuesById[3]="ERROR_COMBAT_NOT_FOUND"]=3;values[valuesById[4]="ERROR_PLAYER_NOT_IN_COMBAT"]=4;values[valuesById[5]="ERROR_ILLEGAL_ACTION"]=5;values[valuesById[6]="ERROR_INVALID_SUBMIT_TIME"]=6;values[valuesById[7]="ERROR_PLAYER_IN_MINIGAME"]=7;values[valuesById[8]="ERROR_EXISTING_QUEUED_ATTACK"]=8;values[valuesById[9]="ERROR_INVALID_CHANGE_POKEMON"]=9;values[valuesById[10]="ERROR_INSUFFICIENT_ENERGY"]=10;values[valuesById[11]="ERROR_INVALID_MOVE"]=11;values[valuesById[12]="ERROR_INVALID_DURATION_TURNS"]=12;values[valuesById[13]="ERROR_INVALID_MINIGAME_STATE"]=13;values[valuesById[14]="ERROR_INVALID_QUICK_SWAP_POKEMON"]=14;values[valuesById[15]="ERROR_QUICK_SWAP_NOT_AVAILABLE"]=15;return values}();return UpdateCombatResponse}();Responses.UpdateFitnessMetricsResponse=function(){function UpdateFitnessMetricsResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateFitnessMetricsResponse.prototype.status=0;UpdateFitnessMetricsResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);return w};UpdateFitnessMetricsResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UpdateFitnessMetricsResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;default:r.skipType(t&7);break}}return m};UpdateFitnessMetricsResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UpdateFitnessMetricsResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UpdateFitnessMetricsResponse;switch(d.status){case"UNSET":case 0:m.status=0;break;case"SUCCESS":case 1:m.status=1;break;case"ERROR_UNKNOWN":case 2:m.status=2;break}return m};UpdateFitnessMetricsResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"UNSET":0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.UpdateFitnessMetricsResponse.Status[m.status]:m.status}return d};UpdateFitnessMetricsResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateFitnessMetricsResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;return values}();return UpdateFitnessMetricsResponse}();Responses.UpdatePlayerLocationResponse=function(){function UpdatePlayerLocationResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdatePlayerLocationResponse.encode=function encode(m,w){if(!w)w=$Writer.create();return w};UpdatePlayerLocationResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UpdatePlayerLocationResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){default:r.skipType(t&7);break}}return m};UpdatePlayerLocationResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UpdatePlayerLocationResponse)return d;return new $root.POGOProtos.Networking.Responses.UpdatePlayerLocationResponse};UpdatePlayerLocationResponse.toObject=function toObject(){return{}};UpdatePlayerLocationResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UpdatePlayerLocationResponse}();Responses.UpdateTradingResponse=function(){function UpdateTradingResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpdateTradingResponse.prototype.result=0;UpdateTradingResponse.prototype.trading=null;UpdateTradingResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.trading!=null&&m.hasOwnProperty("trading"))$root.POGOProtos.Data.Trading.Trading.encode(m.trading,w.uint32(18).fork()).ldelim();return w};UpdateTradingResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UpdateTradingResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.trading=$root.POGOProtos.Data.Trading.Trading.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};UpdateTradingResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UpdateTradingResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UpdateTradingResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_UNKNOWN":case 2:m.result=2;break;case"ERROR_FRIEND_NOT_FOUND":case 3:m.result=3;break;case"ERROR_INVALID_PLAYER_ID":case 4:m.result=4;break;case"ERROR_INVALID_STATE":case 5:m.result=5;break;case"ERROR_STATE_HANDLER":case 6:m.result=6;break;case"ERROR_INVALID_POKEMON":case 7:m.result=7;break;case"ERROR_INSUFFICIENT_PAYMENT":case 8:m.result=8;break;case"ERROR_TRADING_EXPIRED":case 9:m.result=9;break;case"ERROR_TRADING_FINISHED":case 10:m.result=10;break}if(d.trading!=null){if(typeof d.trading!=="object")throw TypeError(".POGOProtos.Networking.Responses.UpdateTradingResponse.trading: object expected");m.trading=$root.POGOProtos.Data.Trading.Trading.fromObject(d.trading)}return m};UpdateTradingResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.trading=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.UpdateTradingResponse.Result[m.result]:m.result}if(m.trading!=null&&m.hasOwnProperty("trading")){d.trading=$root.POGOProtos.Data.Trading.Trading.toObject(m.trading,o)}return d};UpdateTradingResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpdateTradingResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_UNKNOWN"]=2;values[valuesById[3]="ERROR_FRIEND_NOT_FOUND"]=3;values[valuesById[4]="ERROR_INVALID_PLAYER_ID"]=4;values[valuesById[5]="ERROR_INVALID_STATE"]=5;values[valuesById[6]="ERROR_STATE_HANDLER"]=6;values[valuesById[7]="ERROR_INVALID_POKEMON"]=7;values[valuesById[8]="ERROR_INSUFFICIENT_PAYMENT"]=8;values[valuesById[9]="ERROR_TRADING_EXPIRED"]=9;values[valuesById[10]="ERROR_TRADING_FINISHED"]=10;return values}();return UpdateTradingResponse}();Responses.UpgradePokemonResponse=function(){function UpgradePokemonResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpgradePokemonResponse.prototype.result=0;UpgradePokemonResponse.prototype.upgraded_pokemon=null;UpgradePokemonResponse.prototype.next_upgraded_pokemon=null;UpgradePokemonResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.upgraded_pokemon!=null&&m.hasOwnProperty("upgraded_pokemon"))$root.POGOProtos.Data.PokemonData.encode(m.upgraded_pokemon,w.uint32(18).fork()).ldelim();if(m.next_upgraded_pokemon!=null&&m.hasOwnProperty("next_upgraded_pokemon"))$root.POGOProtos.Data.PokemonData.encode(m.next_upgraded_pokemon,w.uint32(26).fork()).ldelim();return w};UpgradePokemonResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UpgradePokemonResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.upgraded_pokemon=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;case 3:m.next_upgraded_pokemon=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};UpgradePokemonResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UpgradePokemonResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UpgradePokemonResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_POKEMON_NOT_FOUND":case 2:m.result=2;break;case"ERROR_INSUFFICIENT_RESOURCES":case 3:m.result=3;break;case"ERROR_UPGRADE_NOT_AVAILABLE":case 4:m.result=4;break;case"ERROR_POKEMON_IS_DEPLOYED":case 5:m.result=5;break}if(d.upgraded_pokemon!=null){if(typeof d.upgraded_pokemon!=="object")throw TypeError(".POGOProtos.Networking.Responses.UpgradePokemonResponse.upgraded_pokemon: object expected");m.upgraded_pokemon=$root.POGOProtos.Data.PokemonData.fromObject(d.upgraded_pokemon)}if(d.next_upgraded_pokemon!=null){if(typeof d.next_upgraded_pokemon!=="object")throw TypeError(".POGOProtos.Networking.Responses.UpgradePokemonResponse.next_upgraded_pokemon: object expected");m.next_upgraded_pokemon=$root.POGOProtos.Data.PokemonData.fromObject(d.next_upgraded_pokemon)}return m};UpgradePokemonResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.upgraded_pokemon=null;d.next_upgraded_pokemon=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.UpgradePokemonResponse.Result[m.result]:m.result}if(m.upgraded_pokemon!=null&&m.hasOwnProperty("upgraded_pokemon")){d.upgraded_pokemon=$root.POGOProtos.Data.PokemonData.toObject(m.upgraded_pokemon,o)}if(m.next_upgraded_pokemon!=null&&m.hasOwnProperty("next_upgraded_pokemon")){d.next_upgraded_pokemon=$root.POGOProtos.Data.PokemonData.toObject(m.next_upgraded_pokemon,o)}return d};UpgradePokemonResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UpgradePokemonResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_POKEMON_NOT_FOUND"]=2;values[valuesById[3]="ERROR_INSUFFICIENT_RESOURCES"]=3;values[valuesById[4]="ERROR_UPGRADE_NOT_AVAILABLE"]=4;values[valuesById[5]="ERROR_POKEMON_IS_DEPLOYED"]=5;return values}();return UpgradePokemonResponse}();Responses.UseIncenseResponse=function(){function UseIncenseResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseIncenseResponse.prototype.result=0;UseIncenseResponse.prototype.applied_incense=null;UseIncenseResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.applied_incense!=null&&m.hasOwnProperty("applied_incense"))$root.POGOProtos.Inventory.AppliedItem.encode(m.applied_incense,w.uint32(18).fork()).ldelim();return w};UseIncenseResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UseIncenseResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.applied_incense=$root.POGOProtos.Inventory.AppliedItem.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};UseIncenseResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UseIncenseResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UseIncenseResponse;switch(d.result){case"UNKNOWN":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"INCENSE_ALREADY_ACTIVE":case 2:m.result=2;break;case"NONE_IN_INVENTORY":case 3:m.result=3;break;case"LOCATION_UNSET":case 4:m.result=4;break}if(d.applied_incense!=null){if(typeof d.applied_incense!=="object")throw TypeError(".POGOProtos.Networking.Responses.UseIncenseResponse.applied_incense: object expected");m.applied_incense=$root.POGOProtos.Inventory.AppliedItem.fromObject(d.applied_incense)}return m};UseIncenseResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNKNOWN":0;d.applied_incense=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.UseIncenseResponse.Result[m.result]:m.result}if(m.applied_incense!=null&&m.hasOwnProperty("applied_incense")){d.applied_incense=$root.POGOProtos.Inventory.AppliedItem.toObject(m.applied_incense,o)}return d};UseIncenseResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UseIncenseResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNKNOWN"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="INCENSE_ALREADY_ACTIVE"]=2;values[valuesById[3]="NONE_IN_INVENTORY"]=3;values[valuesById[4]="LOCATION_UNSET"]=4;return values}();return UseIncenseResponse}();Responses.UseItemCaptureResponse=function(){function UseItemCaptureResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemCaptureResponse.prototype.success=false;UseItemCaptureResponse.prototype.item_capture_mult=0;UseItemCaptureResponse.prototype.item_flee_mult=0;UseItemCaptureResponse.prototype.stop_movement=false;UseItemCaptureResponse.prototype.stop_attack=false;UseItemCaptureResponse.prototype.target_max=false;UseItemCaptureResponse.prototype.target_slow=false;UseItemCaptureResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);if(m.item_capture_mult!=null&&m.hasOwnProperty("item_capture_mult"))w.uint32(17).double(m.item_capture_mult);if(m.item_flee_mult!=null&&m.hasOwnProperty("item_flee_mult"))w.uint32(25).double(m.item_flee_mult);if(m.stop_movement!=null&&m.hasOwnProperty("stop_movement"))w.uint32(32).bool(m.stop_movement);if(m.stop_attack!=null&&m.hasOwnProperty("stop_attack"))w.uint32(40).bool(m.stop_attack);if(m.target_max!=null&&m.hasOwnProperty("target_max"))w.uint32(48).bool(m.target_max);if(m.target_slow!=null&&m.hasOwnProperty("target_slow"))w.uint32(56).bool(m.target_slow);return w};UseItemCaptureResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UseItemCaptureResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;case 2:m.item_capture_mult=r.double();break;case 3:m.item_flee_mult=r.double();break;case 4:m.stop_movement=r.bool();break;case 5:m.stop_attack=r.bool();break;case 6:m.target_max=r.bool();break;case 7:m.target_slow=r.bool();break;default:r.skipType(t&7);break}}return m};UseItemCaptureResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UseItemCaptureResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UseItemCaptureResponse;if(d.success!=null){m.success=Boolean(d.success)}if(d.item_capture_mult!=null){m.item_capture_mult=Number(d.item_capture_mult)}if(d.item_flee_mult!=null){m.item_flee_mult=Number(d.item_flee_mult)}if(d.stop_movement!=null){m.stop_movement=Boolean(d.stop_movement)}if(d.stop_attack!=null){m.stop_attack=Boolean(d.stop_attack)}if(d.target_max!=null){m.target_max=Boolean(d.target_max)}if(d.target_slow!=null){m.target_slow=Boolean(d.target_slow)}return m};UseItemCaptureResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.success=false;d.item_capture_mult=0;d.item_flee_mult=0;d.stop_movement=false;d.stop_attack=false;d.target_max=false;d.target_slow=false}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}if(m.item_capture_mult!=null&&m.hasOwnProperty("item_capture_mult")){d.item_capture_mult=o.json&&!isFinite(m.item_capture_mult)?String(m.item_capture_mult):m.item_capture_mult}if(m.item_flee_mult!=null&&m.hasOwnProperty("item_flee_mult")){d.item_flee_mult=o.json&&!isFinite(m.item_flee_mult)?String(m.item_flee_mult):m.item_flee_mult}if(m.stop_movement!=null&&m.hasOwnProperty("stop_movement")){d.stop_movement=m.stop_movement}if(m.stop_attack!=null&&m.hasOwnProperty("stop_attack")){d.stop_attack=m.stop_attack}if(m.target_max!=null&&m.hasOwnProperty("target_max")){d.target_max=m.target_max}if(m.target_slow!=null&&m.hasOwnProperty("target_slow")){d.target_slow=m.target_slow}return d};UseItemCaptureResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UseItemCaptureResponse}();Responses.UseItemEggIncubatorResponse=function(){function UseItemEggIncubatorResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemEggIncubatorResponse.prototype.result=0;UseItemEggIncubatorResponse.prototype.egg_incubator=null;UseItemEggIncubatorResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.egg_incubator!=null&&m.hasOwnProperty("egg_incubator"))$root.POGOProtos.Inventory.EggIncubator.encode(m.egg_incubator,w.uint32(18).fork()).ldelim();return w};UseItemEggIncubatorResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UseItemEggIncubatorResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.egg_incubator=$root.POGOProtos.Inventory.EggIncubator.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};UseItemEggIncubatorResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UseItemEggIncubatorResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UseItemEggIncubatorResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INCUBATOR_NOT_FOUND":case 2:m.result=2;break;case"ERROR_POKEMON_EGG_NOT_FOUND":case 3:m.result=3;break;case"ERROR_POKEMON_ID_NOT_EGG":case 4:m.result=4;break;case"ERROR_INCUBATOR_ALREADY_IN_USE":case 5:m.result=5;break;case"ERROR_POKEMON_ALREADY_INCUBATING":case 6:m.result=6;break;case"ERROR_INCUBATOR_NO_USES_REMAINING":case 7:m.result=7;break}if(d.egg_incubator!=null){if(typeof d.egg_incubator!=="object")throw TypeError(".POGOProtos.Networking.Responses.UseItemEggIncubatorResponse.egg_incubator: object expected");m.egg_incubator=$root.POGOProtos.Inventory.EggIncubator.fromObject(d.egg_incubator)}return m};UseItemEggIncubatorResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.egg_incubator=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.UseItemEggIncubatorResponse.Result[m.result]:m.result}if(m.egg_incubator!=null&&m.hasOwnProperty("egg_incubator")){d.egg_incubator=$root.POGOProtos.Inventory.EggIncubator.toObject(m.egg_incubator,o)}return d};UseItemEggIncubatorResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UseItemEggIncubatorResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INCUBATOR_NOT_FOUND"]=2;values[valuesById[3]="ERROR_POKEMON_EGG_NOT_FOUND"]=3;values[valuesById[4]="ERROR_POKEMON_ID_NOT_EGG"]=4;values[valuesById[5]="ERROR_INCUBATOR_ALREADY_IN_USE"]=5;values[valuesById[6]="ERROR_POKEMON_ALREADY_INCUBATING"]=6;values[valuesById[7]="ERROR_INCUBATOR_NO_USES_REMAINING"]=7;return values}();return UseItemEggIncubatorResponse}();Responses.UseItemEncounterResponse=function(){function UseItemEncounterResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemEncounterResponse.prototype.status=0;UseItemEncounterResponse.prototype.capture_probability=null;UseItemEncounterResponse.prototype.active_item=0;UseItemEncounterResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.status!=null&&m.hasOwnProperty("status"))w.uint32(8).int32(m.status);if(m.capture_probability!=null&&m.hasOwnProperty("capture_probability"))$root.POGOProtos.Data.Capture.CaptureProbability.encode(m.capture_probability,w.uint32(18).fork()).ldelim();if(m.active_item!=null&&m.hasOwnProperty("active_item"))w.uint32(24).int32(m.active_item);return w};UseItemEncounterResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UseItemEncounterResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.status=r.int32();break;case 2:m.capture_probability=$root.POGOProtos.Data.Capture.CaptureProbability.decode(r,r.uint32());break;case 3:m.active_item=r.int32();break;default:r.skipType(t&7);break}}return m};UseItemEncounterResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UseItemEncounterResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UseItemEncounterResponse;switch(d.status){case"SUCCESS":case 0:m.status=0;break;case"ALREADY_COMPLETED":case 1:m.status=1;break;case"ACTIVE_ITEM_EXISTS":case 2:m.status=2;break;case"NO_ITEM_IN_INVENTORY":case 3:m.status=3;break;case"INVALID_ITEM_CATEGORY":case 4:m.status=4;break}if(d.capture_probability!=null){if(typeof d.capture_probability!=="object")throw TypeError(".POGOProtos.Networking.Responses.UseItemEncounterResponse.capture_probability: object expected");m.capture_probability=$root.POGOProtos.Data.Capture.CaptureProbability.fromObject(d.capture_probability)}switch(d.active_item){case"ITEM_UNKNOWN":case 0:m.active_item=0;break;case"ITEM_POKE_BALL":case 1:m.active_item=1;break;case"ITEM_GREAT_BALL":case 2:m.active_item=2;break;case"ITEM_ULTRA_BALL":case 3:m.active_item=3;break;case"ITEM_MASTER_BALL":case 4:m.active_item=4;break;case"ITEM_PREMIER_BALL":case 5:m.active_item=5;break;case"ITEM_POTION":case 101:m.active_item=101;break;case"ITEM_SUPER_POTION":case 102:m.active_item=102;break;case"ITEM_HYPER_POTION":case 103:m.active_item=103;break;case"ITEM_MAX_POTION":case 104:m.active_item=104;break;case"ITEM_REVIVE":case 201:m.active_item=201;break;case"ITEM_MAX_REVIVE":case 202:m.active_item=202;break;case"ITEM_LUCKY_EGG":case 301:m.active_item=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.active_item=401;break;case"ITEM_INCENSE_SPICY":case 402:m.active_item=402;break;case"ITEM_INCENSE_COOL":case 403:m.active_item=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.active_item=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.active_item=405;break;case"ITEM_TROY_DISK":case 501:m.active_item=501;break;case"ITEM_X_ATTACK":case 602:m.active_item=602;break;case"ITEM_X_DEFENSE":case 603:m.active_item=603;break;case"ITEM_X_MIRACLE":case 604:m.active_item=604;break;case"ITEM_RAZZ_BERRY":case 701:m.active_item=701;break;case"ITEM_BLUK_BERRY":case 702:m.active_item=702;break;case"ITEM_NANAB_BERRY":case 703:m.active_item=703;break;case"ITEM_WEPAR_BERRY":case 704:m.active_item=704;break;case"ITEM_PINAP_BERRY":case 705:m.active_item=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.active_item=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.active_item=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.active_item=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.active_item=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.active_item=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.active_item=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.active_item=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.active_item=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.active_item=1002;break;case"ITEM_SUN_STONE":case 1101:m.active_item=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.active_item=1102;break;case"ITEM_METAL_COAT":case 1103:m.active_item=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.active_item=1104;break;case"ITEM_UP_GRADE":case 1105:m.active_item=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.active_item=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.active_item=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.active_item=1202;break;case"ITEM_RARE_CANDY":case 1301:m.active_item=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.active_item=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.active_item=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.active_item=1403;break;case"ITEM_STAR_PIECE":case 1404:m.active_item=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.active_item=1405;break}return m};UseItemEncounterResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.status=o.enums===String?"SUCCESS":0;d.capture_probability=null;d.active_item=o.enums===String?"ITEM_UNKNOWN":0}if(m.status!=null&&m.hasOwnProperty("status")){d.status=o.enums===String?$root.POGOProtos.Networking.Responses.UseItemEncounterResponse.Status[m.status]:m.status}if(m.capture_probability!=null&&m.hasOwnProperty("capture_probability")){d.capture_probability=$root.POGOProtos.Data.Capture.CaptureProbability.toObject(m.capture_probability,o)}if(m.active_item!=null&&m.hasOwnProperty("active_item")){d.active_item=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.active_item]:m.active_item}return d};UseItemEncounterResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UseItemEncounterResponse.Status=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="SUCCESS"]=0;values[valuesById[1]="ALREADY_COMPLETED"]=1;values[valuesById[2]="ACTIVE_ITEM_EXISTS"]=2;values[valuesById[3]="NO_ITEM_IN_INVENTORY"]=3;values[valuesById[4]="INVALID_ITEM_CATEGORY"]=4;return values}();return UseItemEncounterResponse}();Responses.UseItemGymResponse=function(){function UseItemGymResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemGymResponse.prototype.result=0;UseItemGymResponse.prototype.updated_gp=$util.Long?$util.Long.fromBits(0,0,false):0;UseItemGymResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.updated_gp!=null&&m.hasOwnProperty("updated_gp"))w.uint32(16).int64(m.updated_gp);return w};UseItemGymResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UseItemGymResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.updated_gp=r.int64();break;default:r.skipType(t&7);break}}return m};UseItemGymResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UseItemGymResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UseItemGymResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_CANNOT_USE":case 2:m.result=2;break;case"ERROR_NOT_IN_RANGE":case 3:m.result=3;break}if(d.updated_gp!=null){if($util.Long)(m.updated_gp=$util.Long.fromValue(d.updated_gp)).unsigned=false;else if(typeof d.updated_gp==="string")m.updated_gp=parseInt(d.updated_gp,10);else if(typeof d.updated_gp==="number")m.updated_gp=d.updated_gp;else if(typeof d.updated_gp==="object")m.updated_gp=new $util.LongBits(d.updated_gp.low>>>0,d.updated_gp.high>>>0).toNumber()}return m};UseItemGymResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;if($util.Long){var n=new $util.Long(0,0,false);d.updated_gp=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.updated_gp=o.longs===String?"0":0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.UseItemGymResponse.Result[m.result]:m.result}if(m.updated_gp!=null&&m.hasOwnProperty("updated_gp")){if(typeof m.updated_gp==="number")d.updated_gp=o.longs===String?String(m.updated_gp):m.updated_gp;else d.updated_gp=o.longs===String?$util.Long.prototype.toString.call(m.updated_gp):o.longs===Number?new $util.LongBits(m.updated_gp.low>>>0,m.updated_gp.high>>>0).toNumber():m.updated_gp}return d};UseItemGymResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UseItemGymResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_CANNOT_USE"]=2;values[valuesById[3]="ERROR_NOT_IN_RANGE"]=3;return values}();return UseItemGymResponse}();Responses.UseItemMoveRerollResponse=function(){function UseItemMoveRerollResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemMoveRerollResponse.prototype.result=0;UseItemMoveRerollResponse.prototype.updated_pokemon=null;UseItemMoveRerollResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.updated_pokemon!=null&&m.hasOwnProperty("updated_pokemon"))$root.POGOProtos.Data.PokemonData.encode(m.updated_pokemon,w.uint32(18).fork()).ldelim();return w};UseItemMoveRerollResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UseItemMoveRerollResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.updated_pokemon=$root.POGOProtos.Data.PokemonData.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};UseItemMoveRerollResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UseItemMoveRerollResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UseItemMoveRerollResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"NO_POKEMON":case 2:m.result=2;break;case"NO_OTHER_MOVES":case 3:m.result=3;break;case"NO_PLAYER":case 4:m.result=4;break;case"WRONG_ITEM_TYPE":case 5:m.result=5;break;case"ITEM_NOT_IN_INVENTORY":case 6:m.result=6;break;case"INVALID_POKEMON":case 7:m.result=7;break;case"MOVE_LOCKED":case 8:m.result=8;break}if(d.updated_pokemon!=null){if(typeof d.updated_pokemon!=="object")throw TypeError(".POGOProtos.Networking.Responses.UseItemMoveRerollResponse.updated_pokemon: object expected");m.updated_pokemon=$root.POGOProtos.Data.PokemonData.fromObject(d.updated_pokemon)}return m};UseItemMoveRerollResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.updated_pokemon=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.UseItemMoveRerollResponse.Result[m.result]:m.result}if(m.updated_pokemon!=null&&m.hasOwnProperty("updated_pokemon")){d.updated_pokemon=$root.POGOProtos.Data.PokemonData.toObject(m.updated_pokemon,o)}return d};UseItemMoveRerollResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UseItemMoveRerollResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="NO_POKEMON"]=2;values[valuesById[3]="NO_OTHER_MOVES"]=3;values[valuesById[4]="NO_PLAYER"]=4;values[valuesById[5]="WRONG_ITEM_TYPE"]=5;values[valuesById[6]="ITEM_NOT_IN_INVENTORY"]=6;values[valuesById[7]="INVALID_POKEMON"]=7;values[valuesById[8]="MOVE_LOCKED"]=8;return values}();return UseItemMoveRerollResponse}();Responses.UseItemPotionResponse=function(){function UseItemPotionResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemPotionResponse.prototype.result=0;UseItemPotionResponse.prototype.stamina=0;UseItemPotionResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.stamina!=null&&m.hasOwnProperty("stamina"))w.uint32(16).int32(m.stamina);return w};UseItemPotionResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UseItemPotionResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.stamina=r.int32();break;default:r.skipType(t&7);break}}return m};UseItemPotionResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UseItemPotionResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UseItemPotionResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_NO_POKEMON":case 2:m.result=2;break;case"ERROR_CANNOT_USE":case 3:m.result=3;break;case"ERROR_DEPLOYED_TO_FORT":case 4:m.result=4;break}if(d.stamina!=null){m.stamina=d.stamina|0}return m};UseItemPotionResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.stamina=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.UseItemPotionResponse.Result[m.result]:m.result}if(m.stamina!=null&&m.hasOwnProperty("stamina")){d.stamina=m.stamina}return d};UseItemPotionResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UseItemPotionResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_NO_POKEMON"]=2;values[valuesById[3]="ERROR_CANNOT_USE"]=3;values[valuesById[4]="ERROR_DEPLOYED_TO_FORT"]=4;return values}();return UseItemPotionResponse}();Responses.UseItemRareCandyResponse=function(){function UseItemRareCandyResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemRareCandyResponse.prototype.result=0;UseItemRareCandyResponse.prototype.pokemon_id=0;UseItemRareCandyResponse.prototype.updated_candy_count=0;UseItemRareCandyResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(16).int32(m.pokemon_id);if(m.updated_candy_count!=null&&m.hasOwnProperty("updated_candy_count"))w.uint32(24).int32(m.updated_candy_count);return w};UseItemRareCandyResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UseItemRareCandyResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.pokemon_id=r.int32();break;case 3:m.updated_candy_count=r.int32();break;default:r.skipType(t&7);break}}return m};UseItemRareCandyResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UseItemRareCandyResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UseItemRareCandyResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"INVALID_POKEMON_ID":case 2:m.result=2;break;case"NO_PLAYER":case 3:m.result=3;break;case"WRONG_ITEM_TYPE":case 4:m.result=4;break;case"ITEM_NOT_IN_INVENTORY":case 5:m.result=5;break;case"NOT_ENOUGH_ITEMS":case 6:m.result=6;break}switch(d.pokemon_id){case"MISSINGNO":case 0:m.pokemon_id=0;break;case"BULBASAUR":case 1:m.pokemon_id=1;break;case"IVYSAUR":case 2:m.pokemon_id=2;break;case"VENUSAUR":case 3:m.pokemon_id=3;break;case"CHARMANDER":case 4:m.pokemon_id=4;break;case"CHARMELEON":case 5:m.pokemon_id=5;break;case"CHARIZARD":case 6:m.pokemon_id=6;break;case"SQUIRTLE":case 7:m.pokemon_id=7;break;case"WARTORTLE":case 8:m.pokemon_id=8;break;case"BLASTOISE":case 9:m.pokemon_id=9;break;case"CATERPIE":case 10:m.pokemon_id=10;break;case"METAPOD":case 11:m.pokemon_id=11;break;case"BUTTERFREE":case 12:m.pokemon_id=12;break;case"WEEDLE":case 13:m.pokemon_id=13;break;case"KAKUNA":case 14:m.pokemon_id=14;break;case"BEEDRILL":case 15:m.pokemon_id=15;break;case"PIDGEY":case 16:m.pokemon_id=16;break;case"PIDGEOTTO":case 17:m.pokemon_id=17;break;case"PIDGEOT":case 18:m.pokemon_id=18;break;case"RATTATA":case 19:m.pokemon_id=19;break;case"RATICATE":case 20:m.pokemon_id=20;break;case"SPEAROW":case 21:m.pokemon_id=21;break;case"FEAROW":case 22:m.pokemon_id=22;break;case"EKANS":case 23:m.pokemon_id=23;break;case"ARBOK":case 24:m.pokemon_id=24;break;case"PIKACHU":case 25:m.pokemon_id=25;break;case"RAICHU":case 26:m.pokemon_id=26;break;case"SANDSHREW":case 27:m.pokemon_id=27;break;case"SANDSLASH":case 28:m.pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_id=29;break;case"NIDORINA":case 30:m.pokemon_id=30;break;case"NIDOQUEEN":case 31:m.pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.pokemon_id=32;break;case"NIDORINO":case 33:m.pokemon_id=33;break;case"NIDOKING":case 34:m.pokemon_id=34;break;case"CLEFAIRY":case 35:m.pokemon_id=35;break;case"CLEFABLE":case 36:m.pokemon_id=36;break;case"VULPIX":case 37:m.pokemon_id=37;break;case"NINETALES":case 38:m.pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.pokemon_id=40;break;case"ZUBAT":case 41:m.pokemon_id=41;break;case"GOLBAT":case 42:m.pokemon_id=42;break;case"ODDISH":case 43:m.pokemon_id=43;break;case"GLOOM":case 44:m.pokemon_id=44;break;case"VILEPLUME":case 45:m.pokemon_id=45;break;case"PARAS":case 46:m.pokemon_id=46;break;case"PARASECT":case 47:m.pokemon_id=47;break;case"VENONAT":case 48:m.pokemon_id=48;break;case"VENOMOTH":case 49:m.pokemon_id=49;break;case"DIGLETT":case 50:m.pokemon_id=50;break;case"DUGTRIO":case 51:m.pokemon_id=51;break;case"MEOWTH":case 52:m.pokemon_id=52;break;case"PERSIAN":case 53:m.pokemon_id=53;break;case"PSYDUCK":case 54:m.pokemon_id=54;break;case"GOLDUCK":case 55:m.pokemon_id=55;break;case"MANKEY":case 56:m.pokemon_id=56;break;case"PRIMEAPE":case 57:m.pokemon_id=57;break;case"GROWLITHE":case 58:m.pokemon_id=58;break;case"ARCANINE":case 59:m.pokemon_id=59;break;case"POLIWAG":case 60:m.pokemon_id=60;break;case"POLIWHIRL":case 61:m.pokemon_id=61;break;case"POLIWRATH":case 62:m.pokemon_id=62;break;case"ABRA":case 63:m.pokemon_id=63;break;case"KADABRA":case 64:m.pokemon_id=64;break;case"ALAKAZAM":case 65:m.pokemon_id=65;break;case"MACHOP":case 66:m.pokemon_id=66;break;case"MACHOKE":case 67:m.pokemon_id=67;break;case"MACHAMP":case 68:m.pokemon_id=68;break;case"BELLSPROUT":case 69:m.pokemon_id=69;break;case"WEEPINBELL":case 70:m.pokemon_id=70;break;case"VICTREEBEL":case 71:m.pokemon_id=71;break;case"TENTACOOL":case 72:m.pokemon_id=72;break;case"TENTACRUEL":case 73:m.pokemon_id=73;break;case"GEODUDE":case 74:m.pokemon_id=74;break;case"GRAVELER":case 75:m.pokemon_id=75;break;case"GOLEM":case 76:m.pokemon_id=76;break;case"PONYTA":case 77:m.pokemon_id=77;break;case"RAPIDASH":case 78:m.pokemon_id=78;break;case"SLOWPOKE":case 79:m.pokemon_id=79;break;case"SLOWBRO":case 80:m.pokemon_id=80;break;case"MAGNEMITE":case 81:m.pokemon_id=81;break;case"MAGNETON":case 82:m.pokemon_id=82;break;case"FARFETCHD":case 83:m.pokemon_id=83;break;case"DODUO":case 84:m.pokemon_id=84;break;case"DODRIO":case 85:m.pokemon_id=85;break;case"SEEL":case 86:m.pokemon_id=86;break;case"DEWGONG":case 87:m.pokemon_id=87;break;case"GRIMER":case 88:m.pokemon_id=88;break;case"MUK":case 89:m.pokemon_id=89;break;case"SHELLDER":case 90:m.pokemon_id=90;break;case"CLOYSTER":case 91:m.pokemon_id=91;break;case"GASTLY":case 92:m.pokemon_id=92;break;case"HAUNTER":case 93:m.pokemon_id=93;break;case"GENGAR":case 94:m.pokemon_id=94;break;case"ONIX":case 95:m.pokemon_id=95;break;case"DROWZEE":case 96:m.pokemon_id=96;break;case"HYPNO":case 97:m.pokemon_id=97;break;case"KRABBY":case 98:m.pokemon_id=98;break;case"KINGLER":case 99:m.pokemon_id=99;break;case"VOLTORB":case 100:m.pokemon_id=100;break;case"ELECTRODE":case 101:m.pokemon_id=101;break;case"EXEGGCUTE":case 102:m.pokemon_id=102;break;case"EXEGGUTOR":case 103:m.pokemon_id=103;break;case"CUBONE":case 104:m.pokemon_id=104;break;case"MAROWAK":case 105:m.pokemon_id=105;break;case"HITMONLEE":case 106:m.pokemon_id=106;break;case"HITMONCHAN":case 107:m.pokemon_id=107;break;case"LICKITUNG":case 108:m.pokemon_id=108;break;case"KOFFING":case 109:m.pokemon_id=109;break;case"WEEZING":case 110:m.pokemon_id=110;break;case"RHYHORN":case 111:m.pokemon_id=111;break;case"RHYDON":case 112:m.pokemon_id=112;break;case"CHANSEY":case 113:m.pokemon_id=113;break;case"TANGELA":case 114:m.pokemon_id=114;break;case"KANGASKHAN":case 115:m.pokemon_id=115;break;case"HORSEA":case 116:m.pokemon_id=116;break;case"SEADRA":case 117:m.pokemon_id=117;break;case"GOLDEEN":case 118:m.pokemon_id=118;break;case"SEAKING":case 119:m.pokemon_id=119;break;case"STARYU":case 120:m.pokemon_id=120;break;case"STARMIE":case 121:m.pokemon_id=121;break;case"MR_MIME":case 122:m.pokemon_id=122;break;case"SCYTHER":case 123:m.pokemon_id=123;break;case"JYNX":case 124:m.pokemon_id=124;break;case"ELECTABUZZ":case 125:m.pokemon_id=125;break;case"MAGMAR":case 126:m.pokemon_id=126;break;case"PINSIR":case 127:m.pokemon_id=127;break;case"TAUROS":case 128:m.pokemon_id=128;break;case"MAGIKARP":case 129:m.pokemon_id=129;break;case"GYARADOS":case 130:m.pokemon_id=130;break;case"LAPRAS":case 131:m.pokemon_id=131;break;case"DITTO":case 132:m.pokemon_id=132;break;case"EEVEE":case 133:m.pokemon_id=133;break;case"VAPOREON":case 134:m.pokemon_id=134;break;case"JOLTEON":case 135:m.pokemon_id=135;break;case"FLAREON":case 136:m.pokemon_id=136;break;case"PORYGON":case 137:m.pokemon_id=137;break;case"OMANYTE":case 138:m.pokemon_id=138;break;case"OMASTAR":case 139:m.pokemon_id=139;break;case"KABUTO":case 140:m.pokemon_id=140;break;case"KABUTOPS":case 141:m.pokemon_id=141;break;case"AERODACTYL":case 142:m.pokemon_id=142;break;case"SNORLAX":case 143:m.pokemon_id=143;break;case"ARTICUNO":case 144:m.pokemon_id=144;break;case"ZAPDOS":case 145:m.pokemon_id=145;break;case"MOLTRES":case 146:m.pokemon_id=146;break;case"DRATINI":case 147:m.pokemon_id=147;break;case"DRAGONAIR":case 148:m.pokemon_id=148;break;case"DRAGONITE":case 149:m.pokemon_id=149;break;case"MEWTWO":case 150:m.pokemon_id=150;break;case"MEW":case 151:m.pokemon_id=151;break;case"CHIKORITA":case 152:m.pokemon_id=152;break;case"BAYLEEF":case 153:m.pokemon_id=153;break;case"MEGANIUM":case 154:m.pokemon_id=154;break;case"CYNDAQUIL":case 155:m.pokemon_id=155;break;case"QUILAVA":case 156:m.pokemon_id=156;break;case"TYPHLOSION":case 157:m.pokemon_id=157;break;case"TOTODILE":case 158:m.pokemon_id=158;break;case"CROCONAW":case 159:m.pokemon_id=159;break;case"FERALIGATR":case 160:m.pokemon_id=160;break;case"SENTRET":case 161:m.pokemon_id=161;break;case"FURRET":case 162:m.pokemon_id=162;break;case"HOOTHOOT":case 163:m.pokemon_id=163;break;case"NOCTOWL":case 164:m.pokemon_id=164;break;case"LEDYBA":case 165:m.pokemon_id=165;break;case"LEDIAN":case 166:m.pokemon_id=166;break;case"SPINARAK":case 167:m.pokemon_id=167;break;case"ARIADOS":case 168:m.pokemon_id=168;break;case"CROBAT":case 169:m.pokemon_id=169;break;case"CHINCHOU":case 170:m.pokemon_id=170;break;case"LANTURN":case 171:m.pokemon_id=171;break;case"PICHU":case 172:m.pokemon_id=172;break;case"CLEFFA":case 173:m.pokemon_id=173;break;case"IGGLYBUFF":case 174:m.pokemon_id=174;break;case"TOGEPI":case 175:m.pokemon_id=175;break;case"TOGETIC":case 176:m.pokemon_id=176;break;case"NATU":case 177:m.pokemon_id=177;break;case"XATU":case 178:m.pokemon_id=178;break;case"MAREEP":case 179:m.pokemon_id=179;break;case"FLAAFFY":case 180:m.pokemon_id=180;break;case"AMPHAROS":case 181:m.pokemon_id=181;break;case"BELLOSSOM":case 182:m.pokemon_id=182;break;case"MARILL":case 183:m.pokemon_id=183;break;case"AZUMARILL":case 184:m.pokemon_id=184;break;case"SUDOWOODO":case 185:m.pokemon_id=185;break;case"POLITOED":case 186:m.pokemon_id=186;break;case"HOPPIP":case 187:m.pokemon_id=187;break;case"SKIPLOOM":case 188:m.pokemon_id=188;break;case"JUMPLUFF":case 189:m.pokemon_id=189;break;case"AIPOM":case 190:m.pokemon_id=190;break;case"SUNKERN":case 191:m.pokemon_id=191;break;case"SUNFLORA":case 192:m.pokemon_id=192;break;case"YANMA":case 193:m.pokemon_id=193;break;case"WOOPER":case 194:m.pokemon_id=194;break;case"QUAGSIRE":case 195:m.pokemon_id=195;break;case"ESPEON":case 196:m.pokemon_id=196;break;case"UMBREON":case 197:m.pokemon_id=197;break;case"MURKROW":case 198:m.pokemon_id=198;break;case"SLOWKING":case 199:m.pokemon_id=199;break;case"MISDREAVUS":case 200:m.pokemon_id=200;break;case"UNOWN":case 201:m.pokemon_id=201;break;case"WOBBUFFET":case 202:m.pokemon_id=202;break;case"GIRAFARIG":case 203:m.pokemon_id=203;break;case"PINECO":case 204:m.pokemon_id=204;break;case"FORRETRESS":case 205:m.pokemon_id=205;break;case"DUNSPARCE":case 206:m.pokemon_id=206;break;case"GLIGAR":case 207:m.pokemon_id=207;break;case"STEELIX":case 208:m.pokemon_id=208;break;case"SNUBBULL":case 209:m.pokemon_id=209;break;case"GRANBULL":case 210:m.pokemon_id=210;break;case"QWILFISH":case 211:m.pokemon_id=211;break;case"SCIZOR":case 212:m.pokemon_id=212;break;case"SHUCKLE":case 213:m.pokemon_id=213;break;case"HERACROSS":case 214:m.pokemon_id=214;break;case"SNEASEL":case 215:m.pokemon_id=215;break;case"TEDDIURSA":case 216:m.pokemon_id=216;break;case"URSARING":case 217:m.pokemon_id=217;break;case"SLUGMA":case 218:m.pokemon_id=218;break;case"MAGCARGO":case 219:m.pokemon_id=219;break;case"SWINUB":case 220:m.pokemon_id=220;break;case"PILOSWINE":case 221:m.pokemon_id=221;break;case"CORSOLA":case 222:m.pokemon_id=222;break;case"REMORAID":case 223:m.pokemon_id=223;break;case"OCTILLERY":case 224:m.pokemon_id=224;break;case"DELIBIRD":case 225:m.pokemon_id=225;break;case"MANTINE":case 226:m.pokemon_id=226;break;case"SKARMORY":case 227:m.pokemon_id=227;break;case"HOUNDOUR":case 228:m.pokemon_id=228;break;case"HOUNDOOM":case 229:m.pokemon_id=229;break;case"KINGDRA":case 230:m.pokemon_id=230;break;case"PHANPY":case 231:m.pokemon_id=231;break;case"DONPHAN":case 232:m.pokemon_id=232;break;case"PORYGON2":case 233:m.pokemon_id=233;break;case"STANTLER":case 234:m.pokemon_id=234;break;case"SMEARGLE":case 235:m.pokemon_id=235;break;case"TYROGUE":case 236:m.pokemon_id=236;break;case"HITMONTOP":case 237:m.pokemon_id=237;break;case"SMOOCHUM":case 238:m.pokemon_id=238;break;case"ELEKID":case 239:m.pokemon_id=239;break;case"MAGBY":case 240:m.pokemon_id=240;break;case"MILTANK":case 241:m.pokemon_id=241;break;case"BLISSEY":case 242:m.pokemon_id=242;break;case"RAIKOU":case 243:m.pokemon_id=243;break;case"ENTEI":case 244:m.pokemon_id=244;break;case"SUICUNE":case 245:m.pokemon_id=245;break;case"LARVITAR":case 246:m.pokemon_id=246;break;case"PUPITAR":case 247:m.pokemon_id=247;break;case"TYRANITAR":case 248:m.pokemon_id=248;break;case"LUGIA":case 249:m.pokemon_id=249;break;case"HO_OH":case 250:m.pokemon_id=250;break;case"CELEBI":case 251:m.pokemon_id=251;break;case"TREECKO":case 252:m.pokemon_id=252;break;case"GROVYLE":case 253:m.pokemon_id=253;break;case"SCEPTILE":case 254:m.pokemon_id=254;break;case"TORCHIC":case 255:m.pokemon_id=255;break;case"COMBUSKEN":case 256:m.pokemon_id=256;break;case"BLAZIKEN":case 257:m.pokemon_id=257;break;case"MUDKIP":case 258:m.pokemon_id=258;break;case"MARSHTOMP":case 259:m.pokemon_id=259;break;case"SWAMPERT":case 260:m.pokemon_id=260;break;case"POOCHYENA":case 261:m.pokemon_id=261;break;case"MIGHTYENA":case 262:m.pokemon_id=262;break;case"ZIGZAGOON":case 263:m.pokemon_id=263;break;case"LINOONE":case 264:m.pokemon_id=264;break;case"WURMPLE":case 265:m.pokemon_id=265;break;case"SILCOON":case 266:m.pokemon_id=266;break;case"BEAUTIFLY":case 267:m.pokemon_id=267;break;case"CASCOON":case 268:m.pokemon_id=268;break;case"DUSTOX":case 269:m.pokemon_id=269;break;case"LOTAD":case 270:m.pokemon_id=270;break;case"LOMBRE":case 271:m.pokemon_id=271;break;case"LUDICOLO":case 272:m.pokemon_id=272;break;case"SEEDOT":case 273:m.pokemon_id=273;break;case"NUZLEAF":case 274:m.pokemon_id=274;break;case"SHIFTRY":case 275:m.pokemon_id=275;break;case"TAILLOW":case 276:m.pokemon_id=276;break;case"SWELLOW":case 277:m.pokemon_id=277;break;case"WINGULL":case 278:m.pokemon_id=278;break;case"PELIPPER":case 279:m.pokemon_id=279;break;case"RALTS":case 280:m.pokemon_id=280;break;case"KIRLIA":case 281:m.pokemon_id=281;break;case"GARDEVOIR":case 282:m.pokemon_id=282;break;case"SURSKIT":case 283:m.pokemon_id=283;break;case"MASQUERAIN":case 284:m.pokemon_id=284;break;case"SHROOMISH":case 285:m.pokemon_id=285;break;case"BRELOOM":case 286:m.pokemon_id=286;break;case"SLAKOTH":case 287:m.pokemon_id=287;break;case"VIGOROTH":case 288:m.pokemon_id=288;break;case"SLAKING":case 289:m.pokemon_id=289;break;case"NINCADA":case 290:m.pokemon_id=290;break;case"NINJASK":case 291:m.pokemon_id=291;break;case"SHEDINJA":case 292:m.pokemon_id=292;break;case"WHISMUR":case 293:m.pokemon_id=293;break;case"LOUDRED":case 294:m.pokemon_id=294;break;case"EXPLOUD":case 295:m.pokemon_id=295;break;case"MAKUHITA":case 296:m.pokemon_id=296;break;case"HARIYAMA":case 297:m.pokemon_id=297;break;case"AZURILL":case 298:m.pokemon_id=298;break;case"NOSEPASS":case 299:m.pokemon_id=299;break;case"SKITTY":case 300:m.pokemon_id=300;break;case"DELCATTY":case 301:m.pokemon_id=301;break;case"SABLEYE":case 302:m.pokemon_id=302;break;case"MAWILE":case 303:m.pokemon_id=303;break;case"ARON":case 304:m.pokemon_id=304;break;case"LAIRON":case 305:m.pokemon_id=305;break;case"AGGRON":case 306:m.pokemon_id=306;break;case"MEDITITE":case 307:m.pokemon_id=307;break;case"MEDICHAM":case 308:m.pokemon_id=308;break;case"ELECTRIKE":case 309:m.pokemon_id=309;break;case"MANECTRIC":case 310:m.pokemon_id=310;break;case"PLUSLE":case 311:m.pokemon_id=311;break;case"MINUN":case 312:m.pokemon_id=312;break;case"VOLBEAT":case 313:m.pokemon_id=313;break;case"ILLUMISE":case 314:m.pokemon_id=314;break;case"ROSELIA":case 315:m.pokemon_id=315;break;case"GULPIN":case 316:m.pokemon_id=316;break;case"SWALOT":case 317:m.pokemon_id=317;break;case"CARVANHA":case 318:m.pokemon_id=318;break;case"SHARPEDO":case 319:m.pokemon_id=319;break;case"WAILMER":case 320:m.pokemon_id=320;break;case"WAILORD":case 321:m.pokemon_id=321;break;case"NUMEL":case 322:m.pokemon_id=322;break;case"CAMERUPT":case 323:m.pokemon_id=323;break;case"TORKOAL":case 324:m.pokemon_id=324;break;case"SPOINK":case 325:m.pokemon_id=325;break;case"GRUMPIG":case 326:m.pokemon_id=326;break;case"SPINDA":case 327:m.pokemon_id=327;break;case"TRAPINCH":case 328:m.pokemon_id=328;break;case"VIBRAVA":case 329:m.pokemon_id=329;break;case"FLYGON":case 330:m.pokemon_id=330;break;case"CACNEA":case 331:m.pokemon_id=331;break;case"CACTURNE":case 332:m.pokemon_id=332;break;case"SWABLU":case 333:m.pokemon_id=333;break;case"ALTARIA":case 334:m.pokemon_id=334;break;case"ZANGOOSE":case 335:m.pokemon_id=335;break;case"SEVIPER":case 336:m.pokemon_id=336;break;case"LUNATONE":case 337:m.pokemon_id=337;break;case"SOLROCK":case 338:m.pokemon_id=338;break;case"BARBOACH":case 339:m.pokemon_id=339;break;case"WHISCASH":case 340:m.pokemon_id=340;break;case"CORPHISH":case 341:m.pokemon_id=341;break;case"CRAWDAUNT":case 342:m.pokemon_id=342;break;case"BALTOY":case 343:m.pokemon_id=343;break;case"CLAYDOL":case 344:m.pokemon_id=344;break;case"LILEEP":case 345:m.pokemon_id=345;break;case"CRADILY":case 346:m.pokemon_id=346;break;case"ANORITH":case 347:m.pokemon_id=347;break;case"ARMALDO":case 348:m.pokemon_id=348;break;case"FEEBAS":case 349:m.pokemon_id=349;break;case"MILOTIC":case 350:m.pokemon_id=350;break;case"CASTFORM":case 351:m.pokemon_id=351;break;case"KECLEON":case 352:m.pokemon_id=352;break;case"SHUPPET":case 353:m.pokemon_id=353;break;case"BANETTE":case 354:m.pokemon_id=354;break;case"DUSKULL":case 355:m.pokemon_id=355;break;case"DUSCLOPS":case 356:m.pokemon_id=356;break;case"TROPIUS":case 357:m.pokemon_id=357;break;case"CHIMECHO":case 358:m.pokemon_id=358;break;case"ABSOL":case 359:m.pokemon_id=359;break;case"WYNAUT":case 360:m.pokemon_id=360;break;case"SNORUNT":case 361:m.pokemon_id=361;break;case"GLALIE":case 362:m.pokemon_id=362;break;case"SPHEAL":case 363:m.pokemon_id=363;break;case"SEALEO":case 364:m.pokemon_id=364;break;case"WALREIN":case 365:m.pokemon_id=365;break;case"CLAMPERL":case 366:m.pokemon_id=366;break;case"HUNTAIL":case 367:m.pokemon_id=367;break;case"GOREBYSS":case 368:m.pokemon_id=368;break;case"RELICANTH":case 369:m.pokemon_id=369;break;case"LUVDISC":case 370:m.pokemon_id=370;break;case"BAGON":case 371:m.pokemon_id=371;break;case"SHELGON":case 372:m.pokemon_id=372;break;case"SALAMENCE":case 373:m.pokemon_id=373;break;case"BELDUM":case 374:m.pokemon_id=374;break;case"METANG":case 375:m.pokemon_id=375;break;case"METAGROSS":case 376:m.pokemon_id=376;break;case"REGIROCK":case 377:m.pokemon_id=377;break;case"REGICE":case 378:m.pokemon_id=378;break;case"REGISTEEL":case 379:m.pokemon_id=379;break;case"LATIAS":case 380:m.pokemon_id=380;break;case"LATIOS":case 381:m.pokemon_id=381;break;case"KYOGRE":case 382:m.pokemon_id=382;break;case"GROUDON":case 383:m.pokemon_id=383;break;case"RAYQUAZA":case 384:m.pokemon_id=384;break;case"JIRACHI":case 385:m.pokemon_id=385;break;case"DEOXYS":case 386:m.pokemon_id=386;break;case"TURTWIG":case 387:m.pokemon_id=387;break;case"GROTLE":case 388:m.pokemon_id=388;break;case"TORTERRA":case 389:m.pokemon_id=389;break;case"CHIMCHAR":case 390:m.pokemon_id=390;break;case"MONFERNO":case 391:m.pokemon_id=391;break;case"INFERNAPE":case 392:m.pokemon_id=392;break;case"PIPLUP":case 393:m.pokemon_id=393;break;case"PRINPLUP":case 394:m.pokemon_id=394;break;case"EMPOLEON":case 395:m.pokemon_id=395;break;case"STARLY":case 396:m.pokemon_id=396;break;case"STARAVIA":case 397:m.pokemon_id=397;break;case"STARAPTOR":case 398:m.pokemon_id=398;break;case"BIDOOF":case 399:m.pokemon_id=399;break;case"BIBAREL":case 400:m.pokemon_id=400;break;case"KRICKETOT":case 401:m.pokemon_id=401;break;case"KRICKETUNE":case 402:m.pokemon_id=402;break;case"SHINX":case 403:m.pokemon_id=403;break;case"LUXIO":case 404:m.pokemon_id=404;break;case"LUXRAY":case 405:m.pokemon_id=405;break;case"BUDEW":case 406:m.pokemon_id=406;break;case"ROSERADE":case 407:m.pokemon_id=407;break;case"CRANIDOS":case 408:m.pokemon_id=408;break;case"RAMPARDOS":case 409:m.pokemon_id=409;break;case"SHIELDON":case 410:m.pokemon_id=410;break;case"BASTIODON":case 411:m.pokemon_id=411;break;case"BURMY":case 412:m.pokemon_id=412;break;case"WORMADAM":case 413:m.pokemon_id=413;break;case"MOTHIM":case 414:m.pokemon_id=414;break;case"COMBEE":case 415:m.pokemon_id=415;break;case"VESPIQUEN":case 416:m.pokemon_id=416;break;case"PACHIRISU":case 417:m.pokemon_id=417;break;case"BUIZEL":case 418:m.pokemon_id=418;break;case"FLOATZEL":case 419:m.pokemon_id=419;break;case"CHERUBI":case 420:m.pokemon_id=420;break;case"CHERRIM":case 421:m.pokemon_id=421;break;case"SHELLOS":case 422:m.pokemon_id=422;break;case"GASTRODON":case 423:m.pokemon_id=423;break;case"AMBIPOM":case 424:m.pokemon_id=424;break;case"DRIFLOON":case 425:m.pokemon_id=425;break;case"DRIFBLIM":case 426:m.pokemon_id=426;break;case"BUNEARY":case 427:m.pokemon_id=427;break;case"LOPUNNY":case 428:m.pokemon_id=428;break;case"MISMAGIUS":case 429:m.pokemon_id=429;break;case"HONCHKROW":case 430:m.pokemon_id=430;break;case"GLAMEOW":case 431:m.pokemon_id=431;break;case"PURUGLY":case 432:m.pokemon_id=432;break;case"CHINGLING":case 433:m.pokemon_id=433;break;case"STUNKY":case 434:m.pokemon_id=434;break;case"SKUNTANK":case 435:m.pokemon_id=435;break;case"BRONZOR":case 436:m.pokemon_id=436;break;case"BRONZONG":case 437:m.pokemon_id=437;break;case"BONSLY":case 438:m.pokemon_id=438;break;case"MIME_JR":case 439:m.pokemon_id=439;break;case"HAPPINY":case 440:m.pokemon_id=440;break;case"CHATOT":case 441:m.pokemon_id=441;break;case"SPIRITOMB":case 442:m.pokemon_id=442;break;case"GIBLE":case 443:m.pokemon_id=443;break;case"GABITE":case 444:m.pokemon_id=444;break;case"GARCHOMP":case 445:m.pokemon_id=445;break;case"MUNCHLAX":case 446:m.pokemon_id=446;break;case"RIOLU":case 447:m.pokemon_id=447;break;case"LUCARIO":case 448:m.pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.pokemon_id=449;break;case"HIPPOWDON":case 450:m.pokemon_id=450;break;case"SKORUPI":case 451:m.pokemon_id=451;break;case"DRAPION":case 452:m.pokemon_id=452;break;case"CROAGUNK":case 453:m.pokemon_id=453;break;case"TOXICROAK":case 454:m.pokemon_id=454;break;case"CARNIVINE":case 455:m.pokemon_id=455;break;case"FINNEON":case 456:m.pokemon_id=456;break;case"LUMINEON":case 457:m.pokemon_id=457;break;case"MANTYKE":case 458:m.pokemon_id=458;break;case"SNOVER":case 459:m.pokemon_id=459;break;case"ABOMASNOW":case 460:m.pokemon_id=460;break;case"WEAVILE":case 461:m.pokemon_id=461;break;case"MAGNEZONE":case 462:m.pokemon_id=462;break;case"LICKILICKY":case 463:m.pokemon_id=463;break;case"RHYPERIOR":case 464:m.pokemon_id=464;break;case"TANGROWTH":case 465:m.pokemon_id=465;break;case"ELECTIVIRE":case 466:m.pokemon_id=466;break;case"MAGMORTAR":case 467:m.pokemon_id=467;break;case"TOGEKISS":case 468:m.pokemon_id=468;break;case"YANMEGA":case 469:m.pokemon_id=469;break;case"LEAFEON":case 470:m.pokemon_id=470;break;case"GLACEON":case 471:m.pokemon_id=471;break;case"GLISCOR":case 472:m.pokemon_id=472;break;case"MAMOSWINE":case 473:m.pokemon_id=473;break;case"PORYGON_Z":case 474:m.pokemon_id=474;break;case"GALLADE":case 475:m.pokemon_id=475;break;case"PROBOPASS":case 476:m.pokemon_id=476;break;case"DUSKNOIR":case 477:m.pokemon_id=477;break;case"FROSLASS":case 478:m.pokemon_id=478;break;case"ROTOM":case 479:m.pokemon_id=479;break;case"UXIE":case 480:m.pokemon_id=480;break;case"MESPRIT":case 481:m.pokemon_id=481;break;case"AZELF":case 482:m.pokemon_id=482;break;case"DIALGA":case 483:m.pokemon_id=483;break;case"PALKIA":case 484:m.pokemon_id=484;break;case"HEATRAN":case 485:m.pokemon_id=485;break;case"REGIGIGAS":case 486:m.pokemon_id=486;break;case"GIRATINA":case 487:m.pokemon_id=487;break;case"CRESSELIA":case 488:m.pokemon_id=488;break;case"PHIONE":case 489:m.pokemon_id=489;break;case"MANAPHY":case 490:m.pokemon_id=490;break;case"DARKRAI":case 491:m.pokemon_id=491;break;case"SHAYMIN":case 492:m.pokemon_id=492;break;case"ARCEUS":case 493:m.pokemon_id=493;break;case"MELTAN":case 808:m.pokemon_id=808;break;case"MELMETAL":case 809:m.pokemon_id=809;break}if(d.updated_candy_count!=null){m.updated_candy_count=d.updated_candy_count|0}return m};UseItemRareCandyResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.pokemon_id=o.enums===String?"MISSINGNO":0;d.updated_candy_count=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.UseItemRareCandyResponse.Result[m.result]:m.result}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){d.pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_id]:m.pokemon_id}if(m.updated_candy_count!=null&&m.hasOwnProperty("updated_candy_count")){d.updated_candy_count=m.updated_candy_count}return d};UseItemRareCandyResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UseItemRareCandyResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="INVALID_POKEMON_ID"]=2;values[valuesById[3]="NO_PLAYER"]=3;values[valuesById[4]="WRONG_ITEM_TYPE"]=4;values[valuesById[5]="ITEM_NOT_IN_INVENTORY"]=5;values[valuesById[6]="NOT_ENOUGH_ITEMS"]=6;return values}();return UseItemRareCandyResponse}();Responses.UseItemReviveResponse=function(){function UseItemReviveResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemReviveResponse.prototype.result=0;UseItemReviveResponse.prototype.stamina=0;UseItemReviveResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.stamina!=null&&m.hasOwnProperty("stamina"))w.uint32(16).int32(m.stamina);return w};UseItemReviveResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UseItemReviveResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.stamina=r.int32();break;default:r.skipType(t&7);break}}return m};UseItemReviveResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UseItemReviveResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UseItemReviveResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_NO_POKEMON":case 2:m.result=2;break;case"ERROR_CANNOT_USE":case 3:m.result=3;break;case"ERROR_DEPLOYED_TO_FORT":case 4:m.result=4;break}if(d.stamina!=null){m.stamina=d.stamina|0}return m};UseItemReviveResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.stamina=0}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.UseItemReviveResponse.Result[m.result]:m.result}if(m.stamina!=null&&m.hasOwnProperty("stamina")){d.stamina=m.stamina}return d};UseItemReviveResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UseItemReviveResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_NO_POKEMON"]=2;values[valuesById[3]="ERROR_CANNOT_USE"]=3;values[valuesById[4]="ERROR_DEPLOYED_TO_FORT"]=4;return values}();return UseItemReviveResponse}();Responses.UseItemStardustBoostResponse=function(){function UseItemStardustBoostResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemStardustBoostResponse.prototype.result=0;UseItemStardustBoostResponse.prototype.applied_items=null;UseItemStardustBoostResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.applied_items!=null&&m.hasOwnProperty("applied_items"))$root.POGOProtos.Inventory.AppliedItems.encode(m.applied_items,w.uint32(18).fork()).ldelim();return w};UseItemStardustBoostResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UseItemStardustBoostResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.applied_items=$root.POGOProtos.Inventory.AppliedItems.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};UseItemStardustBoostResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UseItemStardustBoostResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UseItemStardustBoostResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALID_ITEM_TYPE":case 2:m.result=2;break;case"ERROR_STARDUST_BOOST_ALREADY_ACTIVE":case 3:m.result=3;break;case"ERROR_NO_ITEMS_REMAINING":case 4:m.result=4;break;case"ERROR_LOCATION_UNSET":case 5:m.result=5;break}if(d.applied_items!=null){if(typeof d.applied_items!=="object")throw TypeError(".POGOProtos.Networking.Responses.UseItemStardustBoostResponse.applied_items: object expected");m.applied_items=$root.POGOProtos.Inventory.AppliedItems.fromObject(d.applied_items)}return m};UseItemStardustBoostResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.applied_items=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.UseItemStardustBoostResponse.Result[m.result]:m.result}if(m.applied_items!=null&&m.hasOwnProperty("applied_items")){d.applied_items=$root.POGOProtos.Inventory.AppliedItems.toObject(m.applied_items,o)}return d};UseItemStardustBoostResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UseItemStardustBoostResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_ITEM_TYPE"]=2;values[valuesById[3]="ERROR_STARDUST_BOOST_ALREADY_ACTIVE"]=3;values[valuesById[4]="ERROR_NO_ITEMS_REMAINING"]=4;values[valuesById[5]="ERROR_LOCATION_UNSET"]=5;return values}();return UseItemStardustBoostResponse}();Responses.UseItemXpBoostResponse=function(){function UseItemXpBoostResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UseItemXpBoostResponse.prototype.result=0;UseItemXpBoostResponse.prototype.applied_items=null;UseItemXpBoostResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.result!=null&&m.hasOwnProperty("result"))w.uint32(8).int32(m.result);if(m.applied_items!=null&&m.hasOwnProperty("applied_items"))$root.POGOProtos.Inventory.AppliedItems.encode(m.applied_items,w.uint32(18).fork()).ldelim();return w};UseItemXpBoostResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.UseItemXpBoostResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.result=r.int32();break;case 2:m.applied_items=$root.POGOProtos.Inventory.AppliedItems.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};UseItemXpBoostResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.UseItemXpBoostResponse)return d;var m=new $root.POGOProtos.Networking.Responses.UseItemXpBoostResponse;switch(d.result){case"UNSET":case 0:m.result=0;break;case"SUCCESS":case 1:m.result=1;break;case"ERROR_INVALID_ITEM_TYPE":case 2:m.result=2;break;case"ERROR_XP_BOOST_ALREADY_ACTIVE":case 3:m.result=3;break;case"ERROR_NO_ITEMS_REMAINING":case 4:m.result=4;break;case"ERROR_LOCATION_UNSET":case 5:m.result=5;break}if(d.applied_items!=null){if(typeof d.applied_items!=="object")throw TypeError(".POGOProtos.Networking.Responses.UseItemXpBoostResponse.applied_items: object expected");m.applied_items=$root.POGOProtos.Inventory.AppliedItems.fromObject(d.applied_items)}return m};UseItemXpBoostResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.result=o.enums===String?"UNSET":0;d.applied_items=null}if(m.result!=null&&m.hasOwnProperty("result")){d.result=o.enums===String?$root.POGOProtos.Networking.Responses.UseItemXpBoostResponse.Result[m.result]:m.result}if(m.applied_items!=null&&m.hasOwnProperty("applied_items")){d.applied_items=$root.POGOProtos.Inventory.AppliedItems.toObject(m.applied_items,o)}return d};UseItemXpBoostResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};UseItemXpBoostResponse.Result=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="UNSET"]=0;values[valuesById[1]="SUCCESS"]=1;values[valuesById[2]="ERROR_INVALID_ITEM_TYPE"]=2;values[valuesById[3]="ERROR_XP_BOOST_ALREADY_ACTIVE"]=3;values[valuesById[4]="ERROR_NO_ITEMS_REMAINING"]=4;values[valuesById[5]="ERROR_LOCATION_UNSET"]=5;return values}();return UseItemXpBoostResponse}();Responses.VerifyChallengeResponse=function(){function VerifyChallengeResponse(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}VerifyChallengeResponse.prototype.success=false;VerifyChallengeResponse.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.success!=null&&m.hasOwnProperty("success"))w.uint32(8).bool(m.success);return w};VerifyChallengeResponse.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Networking.Responses.VerifyChallengeResponse;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.success=r.bool();break;default:r.skipType(t&7);break}}return m};VerifyChallengeResponse.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Networking.Responses.VerifyChallengeResponse)return d;var m=new $root.POGOProtos.Networking.Responses.VerifyChallengeResponse;if(d.success!=null){m.success=Boolean(d.success)}return m};VerifyChallengeResponse.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.success=false}if(m.success!=null&&m.hasOwnProperty("success")){d.success=m.success}return d};VerifyChallengeResponse.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return VerifyChallengeResponse}();return Responses}();return Networking}();POGOProtos.Settings=function(){var Settings={};Settings.BackgroundModeClientSettings=function(){function BackgroundModeClientSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BackgroundModeClientSettings.prototype.maximum_sample_age_ms=$util.Long?$util.Long.fromBits(0,0,false):0;BackgroundModeClientSettings.prototype.accept_manual_fitness_samples=false;BackgroundModeClientSettings.prototype.minimum_location_accuracy_meters=0;BackgroundModeClientSettings.prototype.background_wake_up_interval_minutes=0;BackgroundModeClientSettings.prototype.max_upload_size_in_bytes=0;BackgroundModeClientSettings.prototype.min_enclosing_geofence_radius_m=0;BackgroundModeClientSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.maximum_sample_age_ms!=null&&m.hasOwnProperty("maximum_sample_age_ms"))w.uint32(8).int64(m.maximum_sample_age_ms);if(m.accept_manual_fitness_samples!=null&&m.hasOwnProperty("accept_manual_fitness_samples"))w.uint32(16).bool(m.accept_manual_fitness_samples);if(m.minimum_location_accuracy_meters!=null&&m.hasOwnProperty("minimum_location_accuracy_meters"))w.uint32(25).double(m.minimum_location_accuracy_meters);if(m.background_wake_up_interval_minutes!=null&&m.hasOwnProperty("background_wake_up_interval_minutes"))w.uint32(32).int32(m.background_wake_up_interval_minutes);if(m.max_upload_size_in_bytes!=null&&m.hasOwnProperty("max_upload_size_in_bytes"))w.uint32(40).int32(m.max_upload_size_in_bytes);if(m.min_enclosing_geofence_radius_m!=null&&m.hasOwnProperty("min_enclosing_geofence_radius_m"))w.uint32(49).double(m.min_enclosing_geofence_radius_m);return w};BackgroundModeClientSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.BackgroundModeClientSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.maximum_sample_age_ms=r.int64();break;case 2:m.accept_manual_fitness_samples=r.bool();break;case 3:m.minimum_location_accuracy_meters=r.double();break;case 4:m.background_wake_up_interval_minutes=r.int32();break;case 5:m.max_upload_size_in_bytes=r.int32();break;case 6:m.min_enclosing_geofence_radius_m=r.double();break;default:r.skipType(t&7);break}}return m};BackgroundModeClientSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.BackgroundModeClientSettings)return d;var m=new $root.POGOProtos.Settings.BackgroundModeClientSettings;if(d.maximum_sample_age_ms!=null){if($util.Long)(m.maximum_sample_age_ms=$util.Long.fromValue(d.maximum_sample_age_ms)).unsigned=false;else if(typeof d.maximum_sample_age_ms==="string")m.maximum_sample_age_ms=parseInt(d.maximum_sample_age_ms,10);else if(typeof d.maximum_sample_age_ms==="number")m.maximum_sample_age_ms=d.maximum_sample_age_ms;else if(typeof d.maximum_sample_age_ms==="object")m.maximum_sample_age_ms=new $util.LongBits(d.maximum_sample_age_ms.low>>>0,d.maximum_sample_age_ms.high>>>0).toNumber()}if(d.accept_manual_fitness_samples!=null){m.accept_manual_fitness_samples=Boolean(d.accept_manual_fitness_samples)}if(d.minimum_location_accuracy_meters!=null){m.minimum_location_accuracy_meters=Number(d.minimum_location_accuracy_meters)}if(d.background_wake_up_interval_minutes!=null){m.background_wake_up_interval_minutes=d.background_wake_up_interval_minutes|0}if(d.max_upload_size_in_bytes!=null){m.max_upload_size_in_bytes=d.max_upload_size_in_bytes|0}if(d.min_enclosing_geofence_radius_m!=null){m.min_enclosing_geofence_radius_m=Number(d.min_enclosing_geofence_radius_m)}return m};BackgroundModeClientSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.maximum_sample_age_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.maximum_sample_age_ms=o.longs===String?"0":0;d.accept_manual_fitness_samples=false;d.minimum_location_accuracy_meters=0;d.background_wake_up_interval_minutes=0;d.max_upload_size_in_bytes=0;d.min_enclosing_geofence_radius_m=0}if(m.maximum_sample_age_ms!=null&&m.hasOwnProperty("maximum_sample_age_ms")){if(typeof m.maximum_sample_age_ms==="number")d.maximum_sample_age_ms=o.longs===String?String(m.maximum_sample_age_ms):m.maximum_sample_age_ms;else d.maximum_sample_age_ms=o.longs===String?$util.Long.prototype.toString.call(m.maximum_sample_age_ms):o.longs===Number?new $util.LongBits(m.maximum_sample_age_ms.low>>>0,m.maximum_sample_age_ms.high>>>0).toNumber():m.maximum_sample_age_ms}if(m.accept_manual_fitness_samples!=null&&m.hasOwnProperty("accept_manual_fitness_samples")){d.accept_manual_fitness_samples=m.accept_manual_fitness_samples}if(m.minimum_location_accuracy_meters!=null&&m.hasOwnProperty("minimum_location_accuracy_meters")){d.minimum_location_accuracy_meters=o.json&&!isFinite(m.minimum_location_accuracy_meters)?String(m.minimum_location_accuracy_meters):m.minimum_location_accuracy_meters}if(m.background_wake_up_interval_minutes!=null&&m.hasOwnProperty("background_wake_up_interval_minutes")){d.background_wake_up_interval_minutes=m.background_wake_up_interval_minutes}if(m.max_upload_size_in_bytes!=null&&m.hasOwnProperty("max_upload_size_in_bytes")){d.max_upload_size_in_bytes=m.max_upload_size_in_bytes}if(m.min_enclosing_geofence_radius_m!=null&&m.hasOwnProperty("min_enclosing_geofence_radius_m")){d.min_enclosing_geofence_radius_m=o.json&&!isFinite(m.min_enclosing_geofence_radius_m)?String(m.min_enclosing_geofence_radius_m):m.min_enclosing_geofence_radius_m}return d};BackgroundModeClientSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BackgroundModeClientSettings}();Settings.BackgroundModeGlobalSettings=function(){function BackgroundModeGlobalSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BackgroundModeGlobalSettings.prototype.min_player_level_fitness=0;BackgroundModeGlobalSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.min_player_level_fitness!=null&&m.hasOwnProperty("min_player_level_fitness"))w.uint32(8).uint32(m.min_player_level_fitness);return w};BackgroundModeGlobalSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.BackgroundModeGlobalSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.min_player_level_fitness=r.uint32();break;default:r.skipType(t&7);break}}return m};BackgroundModeGlobalSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.BackgroundModeGlobalSettings)return d;var m=new $root.POGOProtos.Settings.BackgroundModeGlobalSettings;if(d.min_player_level_fitness!=null){m.min_player_level_fitness=d.min_player_level_fitness>>>0}return m};BackgroundModeGlobalSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.min_player_level_fitness=0}if(m.min_player_level_fitness!=null&&m.hasOwnProperty("min_player_level_fitness")){d.min_player_level_fitness=m.min_player_level_fitness}return d};BackgroundModeGlobalSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BackgroundModeGlobalSettings}();Settings.BelugaGlobalSettings=function(){function BelugaGlobalSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BelugaGlobalSettings.prototype.enable_beluga_transfer=false;BelugaGlobalSettings.prototype.max_num_pokemon_per_transfer=0;BelugaGlobalSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.enable_beluga_transfer!=null&&m.hasOwnProperty("enable_beluga_transfer"))w.uint32(8).bool(m.enable_beluga_transfer);if(m.max_num_pokemon_per_transfer!=null&&m.hasOwnProperty("max_num_pokemon_per_transfer"))w.uint32(16).int32(m.max_num_pokemon_per_transfer);return w};BelugaGlobalSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.BelugaGlobalSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.enable_beluga_transfer=r.bool();break;case 2:m.max_num_pokemon_per_transfer=r.int32();break;default:r.skipType(t&7);break}}return m};BelugaGlobalSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.BelugaGlobalSettings)return d;var m=new $root.POGOProtos.Settings.BelugaGlobalSettings;if(d.enable_beluga_transfer!=null){m.enable_beluga_transfer=Boolean(d.enable_beluga_transfer)}if(d.max_num_pokemon_per_transfer!=null){m.max_num_pokemon_per_transfer=d.max_num_pokemon_per_transfer|0}return m};BelugaGlobalSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.enable_beluga_transfer=false;d.max_num_pokemon_per_transfer=0}if(m.enable_beluga_transfer!=null&&m.hasOwnProperty("enable_beluga_transfer")){d.enable_beluga_transfer=m.enable_beluga_transfer}if(m.max_num_pokemon_per_transfer!=null&&m.hasOwnProperty("max_num_pokemon_per_transfer")){d.max_num_pokemon_per_transfer=m.max_num_pokemon_per_transfer}return d};BelugaGlobalSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BelugaGlobalSettings}();Settings.ClientPerformanceSettings=function(){function ClientPerformanceSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ClientPerformanceSettings.prototype.enable_local_disk_caching=false;ClientPerformanceSettings.prototype.max_number_local_battle_parties=0;ClientPerformanceSettings.prototype.multi_pokemon_battle_party_select=false;ClientPerformanceSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.enable_local_disk_caching!=null&&m.hasOwnProperty("enable_local_disk_caching"))w.uint32(8).bool(m.enable_local_disk_caching);if(m.max_number_local_battle_parties!=null&&m.hasOwnProperty("max_number_local_battle_parties"))w.uint32(16).int32(m.max_number_local_battle_parties);if(m.multi_pokemon_battle_party_select!=null&&m.hasOwnProperty("multi_pokemon_battle_party_select"))w.uint32(24).bool(m.multi_pokemon_battle_party_select);return w};ClientPerformanceSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.ClientPerformanceSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.enable_local_disk_caching=r.bool();break;case 2:m.max_number_local_battle_parties=r.int32();break;case 3:m.multi_pokemon_battle_party_select=r.bool();break;default:r.skipType(t&7);break}}return m};ClientPerformanceSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.ClientPerformanceSettings)return d;var m=new $root.POGOProtos.Settings.ClientPerformanceSettings;if(d.enable_local_disk_caching!=null){m.enable_local_disk_caching=Boolean(d.enable_local_disk_caching)}if(d.max_number_local_battle_parties!=null){m.max_number_local_battle_parties=d.max_number_local_battle_parties|0}if(d.multi_pokemon_battle_party_select!=null){m.multi_pokemon_battle_party_select=Boolean(d.multi_pokemon_battle_party_select)}return m};ClientPerformanceSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.enable_local_disk_caching=false;d.max_number_local_battle_parties=0;d.multi_pokemon_battle_party_select=false}if(m.enable_local_disk_caching!=null&&m.hasOwnProperty("enable_local_disk_caching")){d.enable_local_disk_caching=m.enable_local_disk_caching}if(m.max_number_local_battle_parties!=null&&m.hasOwnProperty("max_number_local_battle_parties")){d.max_number_local_battle_parties=m.max_number_local_battle_parties}if(m.multi_pokemon_battle_party_select!=null&&m.hasOwnProperty("multi_pokemon_battle_party_select")){d.multi_pokemon_battle_party_select=m.multi_pokemon_battle_party_select}return d};ClientPerformanceSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ClientPerformanceSettings}();Settings.CombatChallengeGlobalSettings=function(){function CombatChallengeGlobalSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatChallengeGlobalSettings.prototype.distance_check_override_friendship_level=0;CombatChallengeGlobalSettings.prototype.get_combat_challenge_polling_interval_sec=0;CombatChallengeGlobalSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.distance_check_override_friendship_level!=null&&m.hasOwnProperty("distance_check_override_friendship_level"))w.uint32(8).int32(m.distance_check_override_friendship_level);if(m.get_combat_challenge_polling_interval_sec!=null&&m.hasOwnProperty("get_combat_challenge_polling_interval_sec"))w.uint32(16).int32(m.get_combat_challenge_polling_interval_sec);return w};CombatChallengeGlobalSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.CombatChallengeGlobalSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.distance_check_override_friendship_level=r.int32();break;case 2:m.get_combat_challenge_polling_interval_sec=r.int32();break;default:r.skipType(t&7);break}}return m};CombatChallengeGlobalSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.CombatChallengeGlobalSettings)return d;var m=new $root.POGOProtos.Settings.CombatChallengeGlobalSettings;switch(d.distance_check_override_friendship_level){case"FRIENDSHIP_LEVEL_UNSET":case 0:m.distance_check_override_friendship_level=0;break;case"FRIENDSHIP_LEVEL_0":case 1:m.distance_check_override_friendship_level=1;break;case"FRIENDSHIP_LEVEL_1":case 2:m.distance_check_override_friendship_level=2;break;case"FRIENDSHIP_LEVEL_2":case 3:m.distance_check_override_friendship_level=3;break;case"FRIENDSHIP_LEVEL_3":case 4:m.distance_check_override_friendship_level=4;break;case"FRIENDSHIP_LEVEL_4":case 5:m.distance_check_override_friendship_level=5;break}if(d.get_combat_challenge_polling_interval_sec!=null){m.get_combat_challenge_polling_interval_sec=d.get_combat_challenge_polling_interval_sec|0}return m};CombatChallengeGlobalSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.distance_check_override_friendship_level=o.enums===String?"FRIENDSHIP_LEVEL_UNSET":0;d.get_combat_challenge_polling_interval_sec=0}if(m.distance_check_override_friendship_level!=null&&m.hasOwnProperty("distance_check_override_friendship_level")){d.distance_check_override_friendship_level=o.enums===String?$root.POGOProtos.Enums.FriendshipLevelMilestone[m.distance_check_override_friendship_level]:m.distance_check_override_friendship_level}if(m.get_combat_challenge_polling_interval_sec!=null&&m.hasOwnProperty("get_combat_challenge_polling_interval_sec")){d.get_combat_challenge_polling_interval_sec=m.get_combat_challenge_polling_interval_sec}return d};CombatChallengeGlobalSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatChallengeGlobalSettings}();Settings.CombatGlobalSettings=function(){function CombatGlobalSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatGlobalSettings.prototype.enable_combat=false;CombatGlobalSettings.prototype.maximum_daily_rewarded_battles=0;CombatGlobalSettings.prototype.enable_combat_stat_stages=false;CombatGlobalSettings.prototype.minimum_player_level=0;CombatGlobalSettings.prototype.maximum_daily_npc_rewarded_battles=0;CombatGlobalSettings.prototype.active_combat_update_interval_ms=0;CombatGlobalSettings.prototype.waiting_for_player_update_interval_ms=0;CombatGlobalSettings.prototype.ready_for_battle_update_interval_ms=0;CombatGlobalSettings.prototype.pre_move_submit_window_ms=0;CombatGlobalSettings.prototype.post_move_submit_window_ms=0;CombatGlobalSettings.prototype.enable_sockets=false;CombatGlobalSettings.prototype.enable_spin_minigame=false;CombatGlobalSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.enable_combat!=null&&m.hasOwnProperty("enable_combat"))w.uint32(8).bool(m.enable_combat);if(m.maximum_daily_rewarded_battles!=null&&m.hasOwnProperty("maximum_daily_rewarded_battles"))w.uint32(16).int32(m.maximum_daily_rewarded_battles);if(m.enable_combat_stat_stages!=null&&m.hasOwnProperty("enable_combat_stat_stages"))w.uint32(24).bool(m.enable_combat_stat_stages);if(m.minimum_player_level!=null&&m.hasOwnProperty("minimum_player_level"))w.uint32(32).uint32(m.minimum_player_level);if(m.maximum_daily_npc_rewarded_battles!=null&&m.hasOwnProperty("maximum_daily_npc_rewarded_battles"))w.uint32(40).int32(m.maximum_daily_npc_rewarded_battles);if(m.active_combat_update_interval_ms!=null&&m.hasOwnProperty("active_combat_update_interval_ms"))w.uint32(48).int32(m.active_combat_update_interval_ms);if(m.waiting_for_player_update_interval_ms!=null&&m.hasOwnProperty("waiting_for_player_update_interval_ms"))w.uint32(56).int32(m.waiting_for_player_update_interval_ms);if(m.ready_for_battle_update_interval_ms!=null&&m.hasOwnProperty("ready_for_battle_update_interval_ms"))w.uint32(64).int32(m.ready_for_battle_update_interval_ms);if(m.pre_move_submit_window_ms!=null&&m.hasOwnProperty("pre_move_submit_window_ms"))w.uint32(72).int32(m.pre_move_submit_window_ms);if(m.post_move_submit_window_ms!=null&&m.hasOwnProperty("post_move_submit_window_ms"))w.uint32(80).int32(m.post_move_submit_window_ms);if(m.enable_sockets!=null&&m.hasOwnProperty("enable_sockets"))w.uint32(88).bool(m.enable_sockets);if(m.enable_spin_minigame!=null&&m.hasOwnProperty("enable_spin_minigame"))w.uint32(96).bool(m.enable_spin_minigame);return w};CombatGlobalSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.CombatGlobalSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.enable_combat=r.bool();break;case 2:m.maximum_daily_rewarded_battles=r.int32();break;case 3:m.enable_combat_stat_stages=r.bool();break;case 4:m.minimum_player_level=r.uint32();break;case 5:m.maximum_daily_npc_rewarded_battles=r.int32();break;case 6:m.active_combat_update_interval_ms=r.int32();break;case 7:m.waiting_for_player_update_interval_ms=r.int32();break;case 8:m.ready_for_battle_update_interval_ms=r.int32();break;case 9:m.pre_move_submit_window_ms=r.int32();break;case 10:m.post_move_submit_window_ms=r.int32();break;case 11:m.enable_sockets=r.bool();break;case 12:m.enable_spin_minigame=r.bool();break;default:r.skipType(t&7);break}}return m};CombatGlobalSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.CombatGlobalSettings)return d;var m=new $root.POGOProtos.Settings.CombatGlobalSettings;if(d.enable_combat!=null){m.enable_combat=Boolean(d.enable_combat)}if(d.maximum_daily_rewarded_battles!=null){m.maximum_daily_rewarded_battles=d.maximum_daily_rewarded_battles|0}if(d.enable_combat_stat_stages!=null){m.enable_combat_stat_stages=Boolean(d.enable_combat_stat_stages)}if(d.minimum_player_level!=null){m.minimum_player_level=d.minimum_player_level>>>0}if(d.maximum_daily_npc_rewarded_battles!=null){m.maximum_daily_npc_rewarded_battles=d.maximum_daily_npc_rewarded_battles|0}if(d.active_combat_update_interval_ms!=null){m.active_combat_update_interval_ms=d.active_combat_update_interval_ms|0}if(d.waiting_for_player_update_interval_ms!=null){m.waiting_for_player_update_interval_ms=d.waiting_for_player_update_interval_ms|0}if(d.ready_for_battle_update_interval_ms!=null){m.ready_for_battle_update_interval_ms=d.ready_for_battle_update_interval_ms|0}if(d.pre_move_submit_window_ms!=null){m.pre_move_submit_window_ms=d.pre_move_submit_window_ms|0}if(d.post_move_submit_window_ms!=null){m.post_move_submit_window_ms=d.post_move_submit_window_ms|0}if(d.enable_sockets!=null){m.enable_sockets=Boolean(d.enable_sockets)}if(d.enable_spin_minigame!=null){m.enable_spin_minigame=Boolean(d.enable_spin_minigame)}return m};CombatGlobalSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.enable_combat=false;d.maximum_daily_rewarded_battles=0;d.enable_combat_stat_stages=false;d.minimum_player_level=0;d.maximum_daily_npc_rewarded_battles=0;d.active_combat_update_interval_ms=0;d.waiting_for_player_update_interval_ms=0;d.ready_for_battle_update_interval_ms=0;d.pre_move_submit_window_ms=0;d.post_move_submit_window_ms=0;d.enable_sockets=false;d.enable_spin_minigame=false}if(m.enable_combat!=null&&m.hasOwnProperty("enable_combat")){d.enable_combat=m.enable_combat}if(m.maximum_daily_rewarded_battles!=null&&m.hasOwnProperty("maximum_daily_rewarded_battles")){d.maximum_daily_rewarded_battles=m.maximum_daily_rewarded_battles}if(m.enable_combat_stat_stages!=null&&m.hasOwnProperty("enable_combat_stat_stages")){d.enable_combat_stat_stages=m.enable_combat_stat_stages}if(m.minimum_player_level!=null&&m.hasOwnProperty("minimum_player_level")){d.minimum_player_level=m.minimum_player_level}if(m.maximum_daily_npc_rewarded_battles!=null&&m.hasOwnProperty("maximum_daily_npc_rewarded_battles")){d.maximum_daily_npc_rewarded_battles=m.maximum_daily_npc_rewarded_battles}if(m.active_combat_update_interval_ms!=null&&m.hasOwnProperty("active_combat_update_interval_ms")){d.active_combat_update_interval_ms=m.active_combat_update_interval_ms}if(m.waiting_for_player_update_interval_ms!=null&&m.hasOwnProperty("waiting_for_player_update_interval_ms")){d.waiting_for_player_update_interval_ms=m.waiting_for_player_update_interval_ms}if(m.ready_for_battle_update_interval_ms!=null&&m.hasOwnProperty("ready_for_battle_update_interval_ms")){d.ready_for_battle_update_interval_ms=m.ready_for_battle_update_interval_ms}if(m.pre_move_submit_window_ms!=null&&m.hasOwnProperty("pre_move_submit_window_ms")){d.pre_move_submit_window_ms=m.pre_move_submit_window_ms}if(m.post_move_submit_window_ms!=null&&m.hasOwnProperty("post_move_submit_window_ms")){d.post_move_submit_window_ms=m.post_move_submit_window_ms}if(m.enable_sockets!=null&&m.hasOwnProperty("enable_sockets")){d.enable_sockets=m.enable_sockets}if(m.enable_spin_minigame!=null&&m.hasOwnProperty("enable_spin_minigame")){d.enable_spin_minigame=m.enable_spin_minigame}return d};CombatGlobalSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatGlobalSettings}();Settings.EventSettings=function(){function EventSettings(p){this.condolence_ribbon_country=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EventSettings.prototype.condolence_ribbon_country=$util.emptyArray;EventSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.condolence_ribbon_country!=null&&m.condolence_ribbon_country.length){for(var i=0;i<m.condolence_ribbon_country.length;++i)w.uint32(10).string(m.condolence_ribbon_country[i])}return w};EventSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.EventSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.condolence_ribbon_country&&m.condolence_ribbon_country.length))m.condolence_ribbon_country=[];m.condolence_ribbon_country.push(r.string());break;default:r.skipType(t&7);break}}return m};EventSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.EventSettings)return d;var m=new $root.POGOProtos.Settings.EventSettings;if(d.condolence_ribbon_country){if(!Array.isArray(d.condolence_ribbon_country))throw TypeError(".POGOProtos.Settings.EventSettings.condolence_ribbon_country: array expected");m.condolence_ribbon_country=[];for(var i=0;i<d.condolence_ribbon_country.length;++i){m.condolence_ribbon_country[i]=String(d.condolence_ribbon_country[i])}}return m};EventSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.condolence_ribbon_country=[]}if(m.condolence_ribbon_country&&m.condolence_ribbon_country.length){d.condolence_ribbon_country=[];for(var j=0;j<m.condolence_ribbon_country.length;++j){d.condolence_ribbon_country[j]=m.condolence_ribbon_country[j]}}return d};EventSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EventSettings}();Settings.FestivalSettings=function(){function FestivalSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FestivalSettings.prototype.festival_type=0;FestivalSettings.prototype.key="";FestivalSettings.prototype.vector="";FestivalSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.festival_type!=null&&m.hasOwnProperty("festival_type"))w.uint32(8).int32(m.festival_type);if(m.key!=null&&m.hasOwnProperty("key"))w.uint32(18).string(m.key);if(m.vector!=null&&m.hasOwnProperty("vector"))w.uint32(26).string(m.vector);return w};FestivalSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.FestivalSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.festival_type=r.int32();break;case 2:m.key=r.string();break;case 3:m.vector=r.string();break;default:r.skipType(t&7);break}}return m};FestivalSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.FestivalSettings)return d;var m=new $root.POGOProtos.Settings.FestivalSettings;switch(d.festival_type){case"NONE":case 0:m.festival_type=0;break;case"HALLOWEEN":case 1:m.festival_type=1;break;case"HOLIDAY":case 2:m.festival_type=2;break}if(d.key!=null){m.key=String(d.key)}if(d.vector!=null){m.vector=String(d.vector)}return m};FestivalSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.festival_type=o.enums===String?"NONE":0;d.key="";d.vector=""}if(m.festival_type!=null&&m.hasOwnProperty("festival_type")){d.festival_type=o.enums===String?$root.POGOProtos.Settings.FestivalSettings.FestivalType[m.festival_type]:m.festival_type}if(m.key!=null&&m.hasOwnProperty("key")){d.key=m.key}if(m.vector!=null&&m.hasOwnProperty("vector")){d.vector=m.vector}return d};FestivalSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FestivalSettings.FestivalType=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NONE"]=0;values[valuesById[1]="HALLOWEEN"]=1;values[valuesById[2]="HOLIDAY"]=2;return values}();return FestivalSettings}();Settings.FortSettings=function(){function FortSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FortSettings.prototype.interaction_range_meters=0;FortSettings.prototype.max_total_deployed_pokemon=0;FortSettings.prototype.max_player_deployed_pokemon=0;FortSettings.prototype.deploy_stamina_multiplier=0;FortSettings.prototype.deploy_attack_multiplier=0;FortSettings.prototype.far_interaction_range_meters=0;FortSettings.prototype.disable_gyms=false;FortSettings.prototype.max_same_pokemon_at_fort=0;FortSettings.prototype.max_player_total_deployed_pokemon=0;FortSettings.prototype.enable_hyperlinks_in_poi_descriptions=false;FortSettings.prototype.enable_right_to_left_text_display=false;FortSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.interaction_range_meters!=null&&m.hasOwnProperty("interaction_range_meters"))w.uint32(9).double(m.interaction_range_meters);if(m.max_total_deployed_pokemon!=null&&m.hasOwnProperty("max_total_deployed_pokemon"))w.uint32(16).int32(m.max_total_deployed_pokemon);if(m.max_player_deployed_pokemon!=null&&m.hasOwnProperty("max_player_deployed_pokemon"))w.uint32(24).int32(m.max_player_deployed_pokemon);if(m.deploy_stamina_multiplier!=null&&m.hasOwnProperty("deploy_stamina_multiplier"))w.uint32(33).double(m.deploy_stamina_multiplier);if(m.deploy_attack_multiplier!=null&&m.hasOwnProperty("deploy_attack_multiplier"))w.uint32(41).double(m.deploy_attack_multiplier);if(m.far_interaction_range_meters!=null&&m.hasOwnProperty("far_interaction_range_meters"))w.uint32(49).double(m.far_interaction_range_meters);if(m.disable_gyms!=null&&m.hasOwnProperty("disable_gyms"))w.uint32(56).bool(m.disable_gyms);if(m.max_same_pokemon_at_fort!=null&&m.hasOwnProperty("max_same_pokemon_at_fort"))w.uint32(64).int32(m.max_same_pokemon_at_fort);if(m.max_player_total_deployed_pokemon!=null&&m.hasOwnProperty("max_player_total_deployed_pokemon"))w.uint32(72).int32(m.max_player_total_deployed_pokemon);if(m.enable_hyperlinks_in_poi_descriptions!=null&&m.hasOwnProperty("enable_hyperlinks_in_poi_descriptions"))w.uint32(80).bool(m.enable_hyperlinks_in_poi_descriptions);if(m.enable_right_to_left_text_display!=null&&m.hasOwnProperty("enable_right_to_left_text_display"))w.uint32(88).bool(m.enable_right_to_left_text_display);return w};FortSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.FortSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.interaction_range_meters=r.double();break;case 2:m.max_total_deployed_pokemon=r.int32();break;case 3:m.max_player_deployed_pokemon=r.int32();break;case 4:m.deploy_stamina_multiplier=r.double();break;case 5:m.deploy_attack_multiplier=r.double();break;case 6:m.far_interaction_range_meters=r.double();break;case 7:m.disable_gyms=r.bool();break;case 8:m.max_same_pokemon_at_fort=r.int32();break;case 9:m.max_player_total_deployed_pokemon=r.int32();break;case 10:m.enable_hyperlinks_in_poi_descriptions=r.bool();break;case 11:m.enable_right_to_left_text_display=r.bool();break;default:r.skipType(t&7);break}}return m};FortSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.FortSettings)return d;var m=new $root.POGOProtos.Settings.FortSettings;if(d.interaction_range_meters!=null){m.interaction_range_meters=Number(d.interaction_range_meters)}if(d.max_total_deployed_pokemon!=null){m.max_total_deployed_pokemon=d.max_total_deployed_pokemon|0}if(d.max_player_deployed_pokemon!=null){m.max_player_deployed_pokemon=d.max_player_deployed_pokemon|0}if(d.deploy_stamina_multiplier!=null){m.deploy_stamina_multiplier=Number(d.deploy_stamina_multiplier)}if(d.deploy_attack_multiplier!=null){m.deploy_attack_multiplier=Number(d.deploy_attack_multiplier)}if(d.far_interaction_range_meters!=null){m.far_interaction_range_meters=Number(d.far_interaction_range_meters)}if(d.disable_gyms!=null){m.disable_gyms=Boolean(d.disable_gyms)}if(d.max_same_pokemon_at_fort!=null){m.max_same_pokemon_at_fort=d.max_same_pokemon_at_fort|0}if(d.max_player_total_deployed_pokemon!=null){m.max_player_total_deployed_pokemon=d.max_player_total_deployed_pokemon|0}if(d.enable_hyperlinks_in_poi_descriptions!=null){m.enable_hyperlinks_in_poi_descriptions=Boolean(d.enable_hyperlinks_in_poi_descriptions)}if(d.enable_right_to_left_text_display!=null){m.enable_right_to_left_text_display=Boolean(d.enable_right_to_left_text_display)}return m};FortSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.interaction_range_meters=0;d.max_total_deployed_pokemon=0;d.max_player_deployed_pokemon=0;d.deploy_stamina_multiplier=0;d.deploy_attack_multiplier=0;d.far_interaction_range_meters=0;d.disable_gyms=false;d.max_same_pokemon_at_fort=0;d.max_player_total_deployed_pokemon=0;d.enable_hyperlinks_in_poi_descriptions=false;d.enable_right_to_left_text_display=false}if(m.interaction_range_meters!=null&&m.hasOwnProperty("interaction_range_meters")){d.interaction_range_meters=o.json&&!isFinite(m.interaction_range_meters)?String(m.interaction_range_meters):m.interaction_range_meters}if(m.max_total_deployed_pokemon!=null&&m.hasOwnProperty("max_total_deployed_pokemon")){d.max_total_deployed_pokemon=m.max_total_deployed_pokemon}if(m.max_player_deployed_pokemon!=null&&m.hasOwnProperty("max_player_deployed_pokemon")){d.max_player_deployed_pokemon=m.max_player_deployed_pokemon}if(m.deploy_stamina_multiplier!=null&&m.hasOwnProperty("deploy_stamina_multiplier")){d.deploy_stamina_multiplier=o.json&&!isFinite(m.deploy_stamina_multiplier)?String(m.deploy_stamina_multiplier):m.deploy_stamina_multiplier}if(m.deploy_attack_multiplier!=null&&m.hasOwnProperty("deploy_attack_multiplier")){d.deploy_attack_multiplier=o.json&&!isFinite(m.deploy_attack_multiplier)?String(m.deploy_attack_multiplier):m.deploy_attack_multiplier}if(m.far_interaction_range_meters!=null&&m.hasOwnProperty("far_interaction_range_meters")){d.far_interaction_range_meters=o.json&&!isFinite(m.far_interaction_range_meters)?String(m.far_interaction_range_meters):m.far_interaction_range_meters}if(m.disable_gyms!=null&&m.hasOwnProperty("disable_gyms")){d.disable_gyms=m.disable_gyms}if(m.max_same_pokemon_at_fort!=null&&m.hasOwnProperty("max_same_pokemon_at_fort")){d.max_same_pokemon_at_fort=m.max_same_pokemon_at_fort}if(m.max_player_total_deployed_pokemon!=null&&m.hasOwnProperty("max_player_total_deployed_pokemon")){d.max_player_total_deployed_pokemon=m.max_player_total_deployed_pokemon}if(m.enable_hyperlinks_in_poi_descriptions!=null&&m.hasOwnProperty("enable_hyperlinks_in_poi_descriptions")){d.enable_hyperlinks_in_poi_descriptions=m.enable_hyperlinks_in_poi_descriptions}if(m.enable_right_to_left_text_display!=null&&m.hasOwnProperty("enable_right_to_left_text_display")){d.enable_right_to_left_text_display=m.enable_right_to_left_text_display}return d};FortSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FortSettings}();Settings.GlobalSettings=function(){function GlobalSettings(p){this.client_app_blacklist=[];this.additional_allowed_pokemon_ids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GlobalSettings.prototype.fort_settings=null;GlobalSettings.prototype.map_settings=null;GlobalSettings.prototype.level_settings=null;GlobalSettings.prototype.inventory_settings=null;GlobalSettings.prototype.minimum_client_version="";GlobalSettings.prototype.gps_settings=null;GlobalSettings.prototype.festival_settings=null;GlobalSettings.prototype.event_settings=null;GlobalSettings.prototype.max_pokemon_types=0;GlobalSettings.prototype.sfida_settings=null;GlobalSettings.prototype.news_settings=null;GlobalSettings.prototype.translation_settings=null;GlobalSettings.prototype.passcode_settings=null;GlobalSettings.prototype.notification_settings=null;GlobalSettings.prototype.client_app_blacklist=$util.emptyArray;GlobalSettings.prototype.client_perf_settings=null;GlobalSettings.prototype.news_global_settings=null;GlobalSettings.prototype.quest_global_settings=null;GlobalSettings.prototype.beluga_global_settings=null;GlobalSettings.prototype.telemetry_global_settings=null;GlobalSettings.prototype.login_settings=null;GlobalSettings.prototype.social_settings=null;GlobalSettings.prototype.trading_global_settings=null;GlobalSettings.prototype.additional_allowed_pokemon_ids=$util.emptyArray;GlobalSettings.prototype.upsight_logging_settings=null;GlobalSettings.prototype.combat_global_settings=null;GlobalSettings.prototype.third_move_settings=null;GlobalSettings.prototype.combat_challenge_global_settings=null;GlobalSettings.prototype.bgmode_global_settings=null;GlobalSettings.prototype.probe_settings=null;GlobalSettings.prototype.purchased_settings=null;GlobalSettings.prototype.helpshift_settings=null;GlobalSettings.prototype.poi_settings=null;GlobalSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.fort_settings!=null&&m.hasOwnProperty("fort_settings"))$root.POGOProtos.Settings.FortSettings.encode(m.fort_settings,w.uint32(18).fork()).ldelim();if(m.map_settings!=null&&m.hasOwnProperty("map_settings"))$root.POGOProtos.Settings.MapSettings.encode(m.map_settings,w.uint32(26).fork()).ldelim();if(m.level_settings!=null&&m.hasOwnProperty("level_settings"))$root.POGOProtos.Settings.LevelSettings.encode(m.level_settings,w.uint32(34).fork()).ldelim();if(m.inventory_settings!=null&&m.hasOwnProperty("inventory_settings"))$root.POGOProtos.Settings.InventorySettings.encode(m.inventory_settings,w.uint32(42).fork()).ldelim();if(m.minimum_client_version!=null&&m.hasOwnProperty("minimum_client_version"))w.uint32(50).string(m.minimum_client_version);if(m.gps_settings!=null&&m.hasOwnProperty("gps_settings"))$root.POGOProtos.Settings.GpsSettings.encode(m.gps_settings,w.uint32(58).fork()).ldelim();if(m.festival_settings!=null&&m.hasOwnProperty("festival_settings"))$root.POGOProtos.Settings.FestivalSettings.encode(m.festival_settings,w.uint32(66).fork()).ldelim();if(m.event_settings!=null&&m.hasOwnProperty("event_settings"))$root.POGOProtos.Settings.EventSettings.encode(m.event_settings,w.uint32(74).fork()).ldelim();if(m.max_pokemon_types!=null&&m.hasOwnProperty("max_pokemon_types"))w.uint32(80).int32(m.max_pokemon_types);if(m.sfida_settings!=null&&m.hasOwnProperty("sfida_settings"))$root.POGOProtos.Settings.SfidaSettings.encode(m.sfida_settings,w.uint32(90).fork()).ldelim();if(m.news_settings!=null&&m.hasOwnProperty("news_settings"))$root.POGOProtos.Settings.NewsSettings.encode(m.news_settings,w.uint32(98).fork()).ldelim();if(m.translation_settings!=null&&m.hasOwnProperty("translation_settings"))$root.POGOProtos.Settings.TranslationSettings.encode(m.translation_settings,w.uint32(106).fork()).ldelim();if(m.passcode_settings!=null&&m.hasOwnProperty("passcode_settings"))$root.POGOProtos.Settings.PasscodeSettings.encode(m.passcode_settings,w.uint32(114).fork()).ldelim();if(m.notification_settings!=null&&m.hasOwnProperty("notification_settings"))$root.POGOProtos.Settings.NotificationSettings.encode(m.notification_settings,w.uint32(122).fork()).ldelim();if(m.client_app_blacklist!=null&&m.client_app_blacklist.length){for(var i=0;i<m.client_app_blacklist.length;++i)w.uint32(130).string(m.client_app_blacklist[i])}if(m.client_perf_settings!=null&&m.hasOwnProperty("client_perf_settings"))$root.POGOProtos.Settings.ClientPerformanceSettings.encode(m.client_perf_settings,w.uint32(138).fork()).ldelim();if(m.news_global_settings!=null&&m.hasOwnProperty("news_global_settings"))$root.POGOProtos.Settings.NewsGlobalSettings.encode(m.news_global_settings,w.uint32(146).fork()).ldelim();if(m.quest_global_settings!=null&&m.hasOwnProperty("quest_global_settings"))$root.POGOProtos.Settings.QuestGlobalSettings.encode(m.quest_global_settings,w.uint32(154).fork()).ldelim();if(m.beluga_global_settings!=null&&m.hasOwnProperty("beluga_global_settings"))$root.POGOProtos.Settings.BelugaGlobalSettings.encode(m.beluga_global_settings,w.uint32(162).fork()).ldelim();if(m.telemetry_global_settings!=null&&m.hasOwnProperty("telemetry_global_settings"))$root.POGOProtos.Settings.TelemetryGlobalSettings.encode(m.telemetry_global_settings,w.uint32(170).fork()).ldelim();if(m.login_settings!=null&&m.hasOwnProperty("login_settings"))$root.POGOProtos.Settings.LoginSettings.encode(m.login_settings,w.uint32(178).fork()).ldelim();if(m.social_settings!=null&&m.hasOwnProperty("social_settings"))$root.POGOProtos.Settings.SocialClientSettings.encode(m.social_settings,w.uint32(186).fork()).ldelim();if(m.trading_global_settings!=null&&m.hasOwnProperty("trading_global_settings"))$root.POGOProtos.Settings.TradingGlobalSettings.encode(m.trading_global_settings,w.uint32(194).fork()).ldelim();if(m.additional_allowed_pokemon_ids!=null&&m.additional_allowed_pokemon_ids.length){w.uint32(202).fork();for(var i=0;i<m.additional_allowed_pokemon_ids.length;++i)w.int32(m.additional_allowed_pokemon_ids[i]);w.ldelim()}if(m.upsight_logging_settings!=null&&m.hasOwnProperty("upsight_logging_settings"))$root.POGOProtos.Settings.UpsightLoggingSettings.encode(m.upsight_logging_settings,w.uint32(210).fork()).ldelim();if(m.combat_global_settings!=null&&m.hasOwnProperty("combat_global_settings"))$root.POGOProtos.Settings.CombatGlobalSettings.encode(m.combat_global_settings,w.uint32(218).fork()).ldelim();if(m.third_move_settings!=null&&m.hasOwnProperty("third_move_settings"))$root.POGOProtos.Settings.ThirdMoveGlobalSettings.encode(m.third_move_settings,w.uint32(226).fork()).ldelim();if(m.combat_challenge_global_settings!=null&&m.hasOwnProperty("combat_challenge_global_settings"))$root.POGOProtos.Settings.CombatChallengeGlobalSettings.encode(m.combat_challenge_global_settings,w.uint32(234).fork()).ldelim();if(m.bgmode_global_settings!=null&&m.hasOwnProperty("bgmode_global_settings"))$root.POGOProtos.Settings.BackgroundModeGlobalSettings.encode(m.bgmode_global_settings,w.uint32(242).fork()).ldelim();if(m.probe_settings!=null&&m.hasOwnProperty("probe_settings"))$root.POGOProtos.Settings.ProbeSettings.encode(m.probe_settings,w.uint32(250).fork()).ldelim();if(m.purchased_settings!=null&&m.hasOwnProperty("purchased_settings"))$root.POGOProtos.Settings.PokecoinPurchaseDisplaySettings.encode(m.purchased_settings,w.uint32(258).fork()).ldelim();if(m.helpshift_settings!=null&&m.hasOwnProperty("helpshift_settings"))$root.POGOProtos.Settings.HelpshiftSettings.encode(m.helpshift_settings,w.uint32(266).fork()).ldelim();if(m.poi_settings!=null&&m.hasOwnProperty("poi_settings"))$root.POGOProtos.Settings.PoiGlobalSettings.encode(m.poi_settings,w.uint32(282).fork()).ldelim();return w};GlobalSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.GlobalSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 2:m.fort_settings=$root.POGOProtos.Settings.FortSettings.decode(r,r.uint32());break;case 3:m.map_settings=$root.POGOProtos.Settings.MapSettings.decode(r,r.uint32());break;case 4:m.level_settings=$root.POGOProtos.Settings.LevelSettings.decode(r,r.uint32());break;case 5:m.inventory_settings=$root.POGOProtos.Settings.InventorySettings.decode(r,r.uint32());break;case 6:m.minimum_client_version=r.string();break;case 7:m.gps_settings=$root.POGOProtos.Settings.GpsSettings.decode(r,r.uint32());break;case 8:m.festival_settings=$root.POGOProtos.Settings.FestivalSettings.decode(r,r.uint32());break;case 9:m.event_settings=$root.POGOProtos.Settings.EventSettings.decode(r,r.uint32());break;case 10:m.max_pokemon_types=r.int32();break;case 11:m.sfida_settings=$root.POGOProtos.Settings.SfidaSettings.decode(r,r.uint32());break;case 12:m.news_settings=$root.POGOProtos.Settings.NewsSettings.decode(r,r.uint32());break;case 13:m.translation_settings=$root.POGOProtos.Settings.TranslationSettings.decode(r,r.uint32());break;case 14:m.passcode_settings=$root.POGOProtos.Settings.PasscodeSettings.decode(r,r.uint32());break;case 15:m.notification_settings=$root.POGOProtos.Settings.NotificationSettings.decode(r,r.uint32());break;case 16:if(!(m.client_app_blacklist&&m.client_app_blacklist.length))m.client_app_blacklist=[];m.client_app_blacklist.push(r.string());break;case 17:m.client_perf_settings=$root.POGOProtos.Settings.ClientPerformanceSettings.decode(r,r.uint32());break;case 18:m.news_global_settings=$root.POGOProtos.Settings.NewsGlobalSettings.decode(r,r.uint32());break;case 19:m.quest_global_settings=$root.POGOProtos.Settings.QuestGlobalSettings.decode(r,r.uint32());break;case 20:m.beluga_global_settings=$root.POGOProtos.Settings.BelugaGlobalSettings.decode(r,r.uint32());break;case 21:m.telemetry_global_settings=$root.POGOProtos.Settings.TelemetryGlobalSettings.decode(r,r.uint32());break;case 22:m.login_settings=$root.POGOProtos.Settings.LoginSettings.decode(r,r.uint32());break;case 23:m.social_settings=$root.POGOProtos.Settings.SocialClientSettings.decode(r,r.uint32());break;case 24:m.trading_global_settings=$root.POGOProtos.Settings.TradingGlobalSettings.decode(r,r.uint32());break;case 25:if(!(m.additional_allowed_pokemon_ids&&m.additional_allowed_pokemon_ids.length))m.additional_allowed_pokemon_ids=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.additional_allowed_pokemon_ids.push(r.int32())}else m.additional_allowed_pokemon_ids.push(r.int32());break;case 26:m.upsight_logging_settings=$root.POGOProtos.Settings.UpsightLoggingSettings.decode(r,r.uint32());break;case 27:m.combat_global_settings=$root.POGOProtos.Settings.CombatGlobalSettings.decode(r,r.uint32());break;case 28:m.third_move_settings=$root.POGOProtos.Settings.ThirdMoveGlobalSettings.decode(r,r.uint32());break;case 29:m.combat_challenge_global_settings=$root.POGOProtos.Settings.CombatChallengeGlobalSettings.decode(r,r.uint32());break;case 30:m.bgmode_global_settings=$root.POGOProtos.Settings.BackgroundModeGlobalSettings.decode(r,r.uint32());break;case 31:m.probe_settings=$root.POGOProtos.Settings.ProbeSettings.decode(r,r.uint32());break;case 32:m.purchased_settings=$root.POGOProtos.Settings.PokecoinPurchaseDisplaySettings.decode(r,r.uint32());break;case 33:m.helpshift_settings=$root.POGOProtos.Settings.HelpshiftSettings.decode(r,r.uint32());break;case 35:m.poi_settings=$root.POGOProtos.Settings.PoiGlobalSettings.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GlobalSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.GlobalSettings)return d;var m=new $root.POGOProtos.Settings.GlobalSettings;if(d.fort_settings!=null){if(typeof d.fort_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.fort_settings: object expected");m.fort_settings=$root.POGOProtos.Settings.FortSettings.fromObject(d.fort_settings)}if(d.map_settings!=null){if(typeof d.map_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.map_settings: object expected");m.map_settings=$root.POGOProtos.Settings.MapSettings.fromObject(d.map_settings)}if(d.level_settings!=null){if(typeof d.level_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.level_settings: object expected");m.level_settings=$root.POGOProtos.Settings.LevelSettings.fromObject(d.level_settings)}if(d.inventory_settings!=null){if(typeof d.inventory_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.inventory_settings: object expected");m.inventory_settings=$root.POGOProtos.Settings.InventorySettings.fromObject(d.inventory_settings)}if(d.minimum_client_version!=null){m.minimum_client_version=String(d.minimum_client_version)}if(d.gps_settings!=null){if(typeof d.gps_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.gps_settings: object expected");m.gps_settings=$root.POGOProtos.Settings.GpsSettings.fromObject(d.gps_settings)}if(d.festival_settings!=null){if(typeof d.festival_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.festival_settings: object expected");m.festival_settings=$root.POGOProtos.Settings.FestivalSettings.fromObject(d.festival_settings)}if(d.event_settings!=null){if(typeof d.event_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.event_settings: object expected");m.event_settings=$root.POGOProtos.Settings.EventSettings.fromObject(d.event_settings)}if(d.max_pokemon_types!=null){m.max_pokemon_types=d.max_pokemon_types|0}if(d.sfida_settings!=null){if(typeof d.sfida_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.sfida_settings: object expected");m.sfida_settings=$root.POGOProtos.Settings.SfidaSettings.fromObject(d.sfida_settings)}if(d.news_settings!=null){if(typeof d.news_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.news_settings: object expected");m.news_settings=$root.POGOProtos.Settings.NewsSettings.fromObject(d.news_settings)}if(d.translation_settings!=null){if(typeof d.translation_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.translation_settings: object expected");m.translation_settings=$root.POGOProtos.Settings.TranslationSettings.fromObject(d.translation_settings)}if(d.passcode_settings!=null){if(typeof d.passcode_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.passcode_settings: object expected");m.passcode_settings=$root.POGOProtos.Settings.PasscodeSettings.fromObject(d.passcode_settings)}if(d.notification_settings!=null){if(typeof d.notification_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.notification_settings: object expected");m.notification_settings=$root.POGOProtos.Settings.NotificationSettings.fromObject(d.notification_settings)}if(d.client_app_blacklist){if(!Array.isArray(d.client_app_blacklist))throw TypeError(".POGOProtos.Settings.GlobalSettings.client_app_blacklist: array expected");m.client_app_blacklist=[];for(var i=0;i<d.client_app_blacklist.length;++i){m.client_app_blacklist[i]=String(d.client_app_blacklist[i])}}if(d.client_perf_settings!=null){if(typeof d.client_perf_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.client_perf_settings: object expected");m.client_perf_settings=$root.POGOProtos.Settings.ClientPerformanceSettings.fromObject(d.client_perf_settings)}if(d.news_global_settings!=null){if(typeof d.news_global_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.news_global_settings: object expected");m.news_global_settings=$root.POGOProtos.Settings.NewsGlobalSettings.fromObject(d.news_global_settings)}if(d.quest_global_settings!=null){if(typeof d.quest_global_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.quest_global_settings: object expected");m.quest_global_settings=$root.POGOProtos.Settings.QuestGlobalSettings.fromObject(d.quest_global_settings)}if(d.beluga_global_settings!=null){if(typeof d.beluga_global_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.beluga_global_settings: object expected");m.beluga_global_settings=$root.POGOProtos.Settings.BelugaGlobalSettings.fromObject(d.beluga_global_settings)}if(d.telemetry_global_settings!=null){if(typeof d.telemetry_global_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.telemetry_global_settings: object expected");m.telemetry_global_settings=$root.POGOProtos.Settings.TelemetryGlobalSettings.fromObject(d.telemetry_global_settings)}if(d.login_settings!=null){if(typeof d.login_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.login_settings: object expected");m.login_settings=$root.POGOProtos.Settings.LoginSettings.fromObject(d.login_settings)}if(d.social_settings!=null){if(typeof d.social_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.social_settings: object expected");m.social_settings=$root.POGOProtos.Settings.SocialClientSettings.fromObject(d.social_settings)}if(d.trading_global_settings!=null){if(typeof d.trading_global_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.trading_global_settings: object expected");m.trading_global_settings=$root.POGOProtos.Settings.TradingGlobalSettings.fromObject(d.trading_global_settings)}if(d.additional_allowed_pokemon_ids){if(!Array.isArray(d.additional_allowed_pokemon_ids))throw TypeError(".POGOProtos.Settings.GlobalSettings.additional_allowed_pokemon_ids: array expected");m.additional_allowed_pokemon_ids=[];for(var i=0;i<d.additional_allowed_pokemon_ids.length;++i){switch(d.additional_allowed_pokemon_ids[i]){default:case"MISSINGNO":case 0:m.additional_allowed_pokemon_ids[i]=0;break;case"BULBASAUR":case 1:m.additional_allowed_pokemon_ids[i]=1;break;case"IVYSAUR":case 2:m.additional_allowed_pokemon_ids[i]=2;break;case"VENUSAUR":case 3:m.additional_allowed_pokemon_ids[i]=3;break;case"CHARMANDER":case 4:m.additional_allowed_pokemon_ids[i]=4;break;case"CHARMELEON":case 5:m.additional_allowed_pokemon_ids[i]=5;break;case"CHARIZARD":case 6:m.additional_allowed_pokemon_ids[i]=6;break;case"SQUIRTLE":case 7:m.additional_allowed_pokemon_ids[i]=7;break;case"WARTORTLE":case 8:m.additional_allowed_pokemon_ids[i]=8;break;case"BLASTOISE":case 9:m.additional_allowed_pokemon_ids[i]=9;break;case"CATERPIE":case 10:m.additional_allowed_pokemon_ids[i]=10;break;case"METAPOD":case 11:m.additional_allowed_pokemon_ids[i]=11;break;case"BUTTERFREE":case 12:m.additional_allowed_pokemon_ids[i]=12;break;case"WEEDLE":case 13:m.additional_allowed_pokemon_ids[i]=13;break;case"KAKUNA":case 14:m.additional_allowed_pokemon_ids[i]=14;break;case"BEEDRILL":case 15:m.additional_allowed_pokemon_ids[i]=15;break;case"PIDGEY":case 16:m.additional_allowed_pokemon_ids[i]=16;break;case"PIDGEOTTO":case 17:m.additional_allowed_pokemon_ids[i]=17;break;case"PIDGEOT":case 18:m.additional_allowed_pokemon_ids[i]=18;break;case"RATTATA":case 19:m.additional_allowed_pokemon_ids[i]=19;break;case"RATICATE":case 20:m.additional_allowed_pokemon_ids[i]=20;break;case"SPEAROW":case 21:m.additional_allowed_pokemon_ids[i]=21;break;case"FEAROW":case 22:m.additional_allowed_pokemon_ids[i]=22;break;case"EKANS":case 23:m.additional_allowed_pokemon_ids[i]=23;break;case"ARBOK":case 24:m.additional_allowed_pokemon_ids[i]=24;break;case"PIKACHU":case 25:m.additional_allowed_pokemon_ids[i]=25;break;case"RAICHU":case 26:m.additional_allowed_pokemon_ids[i]=26;break;case"SANDSHREW":case 27:m.additional_allowed_pokemon_ids[i]=27;break;case"SANDSLASH":case 28:m.additional_allowed_pokemon_ids[i]=28;break;case"NIDORAN_FEMALE":case 29:m.additional_allowed_pokemon_ids[i]=29;break;case"NIDORINA":case 30:m.additional_allowed_pokemon_ids[i]=30;break;case"NIDOQUEEN":case 31:m.additional_allowed_pokemon_ids[i]=31;break;case"NIDORAN_MALE":case 32:m.additional_allowed_pokemon_ids[i]=32;break;case"NIDORINO":case 33:m.additional_allowed_pokemon_ids[i]=33;break;case"NIDOKING":case 34:m.additional_allowed_pokemon_ids[i]=34;break;case"CLEFAIRY":case 35:m.additional_allowed_pokemon_ids[i]=35;break;case"CLEFABLE":case 36:m.additional_allowed_pokemon_ids[i]=36;break;case"VULPIX":case 37:m.additional_allowed_pokemon_ids[i]=37;break;case"NINETALES":case 38:m.additional_allowed_pokemon_ids[i]=38;break;case"JIGGLYPUFF":case 39:m.additional_allowed_pokemon_ids[i]=39;break;case"WIGGLYTUFF":case 40:m.additional_allowed_pokemon_ids[i]=40;break;case"ZUBAT":case 41:m.additional_allowed_pokemon_ids[i]=41;break;case"GOLBAT":case 42:m.additional_allowed_pokemon_ids[i]=42;break;case"ODDISH":case 43:m.additional_allowed_pokemon_ids[i]=43;break;case"GLOOM":case 44:m.additional_allowed_pokemon_ids[i]=44;break;case"VILEPLUME":case 45:m.additional_allowed_pokemon_ids[i]=45;break;case"PARAS":case 46:m.additional_allowed_pokemon_ids[i]=46;break;case"PARASECT":case 47:m.additional_allowed_pokemon_ids[i]=47;break;case"VENONAT":case 48:m.additional_allowed_pokemon_ids[i]=48;break;case"VENOMOTH":case 49:m.additional_allowed_pokemon_ids[i]=49;break;case"DIGLETT":case 50:m.additional_allowed_pokemon_ids[i]=50;break;case"DUGTRIO":case 51:m.additional_allowed_pokemon_ids[i]=51;break;case"MEOWTH":case 52:m.additional_allowed_pokemon_ids[i]=52;break;case"PERSIAN":case 53:m.additional_allowed_pokemon_ids[i]=53;break;case"PSYDUCK":case 54:m.additional_allowed_pokemon_ids[i]=54;break;case"GOLDUCK":case 55:m.additional_allowed_pokemon_ids[i]=55;break;case"MANKEY":case 56:m.additional_allowed_pokemon_ids[i]=56;break;case"PRIMEAPE":case 57:m.additional_allowed_pokemon_ids[i]=57;break;case"GROWLITHE":case 58:m.additional_allowed_pokemon_ids[i]=58;break;case"ARCANINE":case 59:m.additional_allowed_pokemon_ids[i]=59;break;case"POLIWAG":case 60:m.additional_allowed_pokemon_ids[i]=60;break;case"POLIWHIRL":case 61:m.additional_allowed_pokemon_ids[i]=61;break;case"POLIWRATH":case 62:m.additional_allowed_pokemon_ids[i]=62;break;case"ABRA":case 63:m.additional_allowed_pokemon_ids[i]=63;break;case"KADABRA":case 64:m.additional_allowed_pokemon_ids[i]=64;break;case"ALAKAZAM":case 65:m.additional_allowed_pokemon_ids[i]=65;break;case"MACHOP":case 66:m.additional_allowed_pokemon_ids[i]=66;break;case"MACHOKE":case 67:m.additional_allowed_pokemon_ids[i]=67;break;case"MACHAMP":case 68:m.additional_allowed_pokemon_ids[i]=68;break;case"BELLSPROUT":case 69:m.additional_allowed_pokemon_ids[i]=69;break;case"WEEPINBELL":case 70:m.additional_allowed_pokemon_ids[i]=70;break;case"VICTREEBEL":case 71:m.additional_allowed_pokemon_ids[i]=71;break;case"TENTACOOL":case 72:m.additional_allowed_pokemon_ids[i]=72;break;case"TENTACRUEL":case 73:m.additional_allowed_pokemon_ids[i]=73;break;case"GEODUDE":case 74:m.additional_allowed_pokemon_ids[i]=74;break;case"GRAVELER":case 75:m.additional_allowed_pokemon_ids[i]=75;break;case"GOLEM":case 76:m.additional_allowed_pokemon_ids[i]=76;break;case"PONYTA":case 77:m.additional_allowed_pokemon_ids[i]=77;break;case"RAPIDASH":case 78:m.additional_allowed_pokemon_ids[i]=78;break;case"SLOWPOKE":case 79:m.additional_allowed_pokemon_ids[i]=79;break;case"SLOWBRO":case 80:m.additional_allowed_pokemon_ids[i]=80;break;case"MAGNEMITE":case 81:m.additional_allowed_pokemon_ids[i]=81;break;case"MAGNETON":case 82:m.additional_allowed_pokemon_ids[i]=82;break;case"FARFETCHD":case 83:m.additional_allowed_pokemon_ids[i]=83;break;case"DODUO":case 84:m.additional_allowed_pokemon_ids[i]=84;break;case"DODRIO":case 85:m.additional_allowed_pokemon_ids[i]=85;break;case"SEEL":case 86:m.additional_allowed_pokemon_ids[i]=86;break;case"DEWGONG":case 87:m.additional_allowed_pokemon_ids[i]=87;break;case"GRIMER":case 88:m.additional_allowed_pokemon_ids[i]=88;break;case"MUK":case 89:m.additional_allowed_pokemon_ids[i]=89;break;case"SHELLDER":case 90:m.additional_allowed_pokemon_ids[i]=90;break;case"CLOYSTER":case 91:m.additional_allowed_pokemon_ids[i]=91;break;case"GASTLY":case 92:m.additional_allowed_pokemon_ids[i]=92;break;case"HAUNTER":case 93:m.additional_allowed_pokemon_ids[i]=93;break;case"GENGAR":case 94:m.additional_allowed_pokemon_ids[i]=94;break;case"ONIX":case 95:m.additional_allowed_pokemon_ids[i]=95;break;case"DROWZEE":case 96:m.additional_allowed_pokemon_ids[i]=96;break;case"HYPNO":case 97:m.additional_allowed_pokemon_ids[i]=97;break;case"KRABBY":case 98:m.additional_allowed_pokemon_ids[i]=98;break;case"KINGLER":case 99:m.additional_allowed_pokemon_ids[i]=99;break;case"VOLTORB":case 100:m.additional_allowed_pokemon_ids[i]=100;break;case"ELECTRODE":case 101:m.additional_allowed_pokemon_ids[i]=101;break;case"EXEGGCUTE":case 102:m.additional_allowed_pokemon_ids[i]=102;break;case"EXEGGUTOR":case 103:m.additional_allowed_pokemon_ids[i]=103;break;case"CUBONE":case 104:m.additional_allowed_pokemon_ids[i]=104;break;case"MAROWAK":case 105:m.additional_allowed_pokemon_ids[i]=105;break;case"HITMONLEE":case 106:m.additional_allowed_pokemon_ids[i]=106;break;case"HITMONCHAN":case 107:m.additional_allowed_pokemon_ids[i]=107;break;case"LICKITUNG":case 108:m.additional_allowed_pokemon_ids[i]=108;break;case"KOFFING":case 109:m.additional_allowed_pokemon_ids[i]=109;break;case"WEEZING":case 110:m.additional_allowed_pokemon_ids[i]=110;break;case"RHYHORN":case 111:m.additional_allowed_pokemon_ids[i]=111;break;case"RHYDON":case 112:m.additional_allowed_pokemon_ids[i]=112;break;case"CHANSEY":case 113:m.additional_allowed_pokemon_ids[i]=113;break;case"TANGELA":case 114:m.additional_allowed_pokemon_ids[i]=114;break;case"KANGASKHAN":case 115:m.additional_allowed_pokemon_ids[i]=115;break;case"HORSEA":case 116:m.additional_allowed_pokemon_ids[i]=116;break;case"SEADRA":case 117:m.additional_allowed_pokemon_ids[i]=117;break;case"GOLDEEN":case 118:m.additional_allowed_pokemon_ids[i]=118;break;case"SEAKING":case 119:m.additional_allowed_pokemon_ids[i]=119;break;case"STARYU":case 120:m.additional_allowed_pokemon_ids[i]=120;break;case"STARMIE":case 121:m.additional_allowed_pokemon_ids[i]=121;break;case"MR_MIME":case 122:m.additional_allowed_pokemon_ids[i]=122;break;case"SCYTHER":case 123:m.additional_allowed_pokemon_ids[i]=123;break;case"JYNX":case 124:m.additional_allowed_pokemon_ids[i]=124;break;case"ELECTABUZZ":case 125:m.additional_allowed_pokemon_ids[i]=125;break;case"MAGMAR":case 126:m.additional_allowed_pokemon_ids[i]=126;break;case"PINSIR":case 127:m.additional_allowed_pokemon_ids[i]=127;break;case"TAUROS":case 128:m.additional_allowed_pokemon_ids[i]=128;break;case"MAGIKARP":case 129:m.additional_allowed_pokemon_ids[i]=129;break;case"GYARADOS":case 130:m.additional_allowed_pokemon_ids[i]=130;break;case"LAPRAS":case 131:m.additional_allowed_pokemon_ids[i]=131;break;case"DITTO":case 132:m.additional_allowed_pokemon_ids[i]=132;break;case"EEVEE":case 133:m.additional_allowed_pokemon_ids[i]=133;break;case"VAPOREON":case 134:m.additional_allowed_pokemon_ids[i]=134;break;case"JOLTEON":case 135:m.additional_allowed_pokemon_ids[i]=135;break;case"FLAREON":case 136:m.additional_allowed_pokemon_ids[i]=136;break;case"PORYGON":case 137:m.additional_allowed_pokemon_ids[i]=137;break;case"OMANYTE":case 138:m.additional_allowed_pokemon_ids[i]=138;break;case"OMASTAR":case 139:m.additional_allowed_pokemon_ids[i]=139;break;case"KABUTO":case 140:m.additional_allowed_pokemon_ids[i]=140;break;case"KABUTOPS":case 141:m.additional_allowed_pokemon_ids[i]=141;break;case"AERODACTYL":case 142:m.additional_allowed_pokemon_ids[i]=142;break;case"SNORLAX":case 143:m.additional_allowed_pokemon_ids[i]=143;break;case"ARTICUNO":case 144:m.additional_allowed_pokemon_ids[i]=144;break;case"ZAPDOS":case 145:m.additional_allowed_pokemon_ids[i]=145;break;case"MOLTRES":case 146:m.additional_allowed_pokemon_ids[i]=146;break;case"DRATINI":case 147:m.additional_allowed_pokemon_ids[i]=147;break;case"DRAGONAIR":case 148:m.additional_allowed_pokemon_ids[i]=148;break;case"DRAGONITE":case 149:m.additional_allowed_pokemon_ids[i]=149;break;case"MEWTWO":case 150:m.additional_allowed_pokemon_ids[i]=150;break;case"MEW":case 151:m.additional_allowed_pokemon_ids[i]=151;break;case"CHIKORITA":case 152:m.additional_allowed_pokemon_ids[i]=152;break;case"BAYLEEF":case 153:m.additional_allowed_pokemon_ids[i]=153;break;case"MEGANIUM":case 154:m.additional_allowed_pokemon_ids[i]=154;break;case"CYNDAQUIL":case 155:m.additional_allowed_pokemon_ids[i]=155;break;case"QUILAVA":case 156:m.additional_allowed_pokemon_ids[i]=156;break;case"TYPHLOSION":case 157:m.additional_allowed_pokemon_ids[i]=157;break;case"TOTODILE":case 158:m.additional_allowed_pokemon_ids[i]=158;break;case"CROCONAW":case 159:m.additional_allowed_pokemon_ids[i]=159;break;case"FERALIGATR":case 160:m.additional_allowed_pokemon_ids[i]=160;break;case"SENTRET":case 161:m.additional_allowed_pokemon_ids[i]=161;break;case"FURRET":case 162:m.additional_allowed_pokemon_ids[i]=162;break;case"HOOTHOOT":case 163:m.additional_allowed_pokemon_ids[i]=163;break;case"NOCTOWL":case 164:m.additional_allowed_pokemon_ids[i]=164;break;case"LEDYBA":case 165:m.additional_allowed_pokemon_ids[i]=165;break;case"LEDIAN":case 166:m.additional_allowed_pokemon_ids[i]=166;break;case"SPINARAK":case 167:m.additional_allowed_pokemon_ids[i]=167;break;case"ARIADOS":case 168:m.additional_allowed_pokemon_ids[i]=168;break;case"CROBAT":case 169:m.additional_allowed_pokemon_ids[i]=169;break;case"CHINCHOU":case 170:m.additional_allowed_pokemon_ids[i]=170;break;case"LANTURN":case 171:m.additional_allowed_pokemon_ids[i]=171;break;case"PICHU":case 172:m.additional_allowed_pokemon_ids[i]=172;break;case"CLEFFA":case 173:m.additional_allowed_pokemon_ids[i]=173;break;case"IGGLYBUFF":case 174:m.additional_allowed_pokemon_ids[i]=174;break;case"TOGEPI":case 175:m.additional_allowed_pokemon_ids[i]=175;break;case"TOGETIC":case 176:m.additional_allowed_pokemon_ids[i]=176;break;case"NATU":case 177:m.additional_allowed_pokemon_ids[i]=177;break;case"XATU":case 178:m.additional_allowed_pokemon_ids[i]=178;break;case"MAREEP":case 179:m.additional_allowed_pokemon_ids[i]=179;break;case"FLAAFFY":case 180:m.additional_allowed_pokemon_ids[i]=180;break;case"AMPHAROS":case 181:m.additional_allowed_pokemon_ids[i]=181;break;case"BELLOSSOM":case 182:m.additional_allowed_pokemon_ids[i]=182;break;case"MARILL":case 183:m.additional_allowed_pokemon_ids[i]=183;break;case"AZUMARILL":case 184:m.additional_allowed_pokemon_ids[i]=184;break;case"SUDOWOODO":case 185:m.additional_allowed_pokemon_ids[i]=185;break;case"POLITOED":case 186:m.additional_allowed_pokemon_ids[i]=186;break;case"HOPPIP":case 187:m.additional_allowed_pokemon_ids[i]=187;break;case"SKIPLOOM":case 188:m.additional_allowed_pokemon_ids[i]=188;break;case"JUMPLUFF":case 189:m.additional_allowed_pokemon_ids[i]=189;break;case"AIPOM":case 190:m.additional_allowed_pokemon_ids[i]=190;break;case"SUNKERN":case 191:m.additional_allowed_pokemon_ids[i]=191;break;case"SUNFLORA":case 192:m.additional_allowed_pokemon_ids[i]=192;break;case"YANMA":case 193:m.additional_allowed_pokemon_ids[i]=193;break;case"WOOPER":case 194:m.additional_allowed_pokemon_ids[i]=194;break;case"QUAGSIRE":case 195:m.additional_allowed_pokemon_ids[i]=195;break;case"ESPEON":case 196:m.additional_allowed_pokemon_ids[i]=196;break;case"UMBREON":case 197:m.additional_allowed_pokemon_ids[i]=197;break;case"MURKROW":case 198:m.additional_allowed_pokemon_ids[i]=198;break;case"SLOWKING":case 199:m.additional_allowed_pokemon_ids[i]=199;break;case"MISDREAVUS":case 200:m.additional_allowed_pokemon_ids[i]=200;break;case"UNOWN":case 201:m.additional_allowed_pokemon_ids[i]=201;break;case"WOBBUFFET":case 202:m.additional_allowed_pokemon_ids[i]=202;break;case"GIRAFARIG":case 203:m.additional_allowed_pokemon_ids[i]=203;break;case"PINECO":case 204:m.additional_allowed_pokemon_ids[i]=204;break;case"FORRETRESS":case 205:m.additional_allowed_pokemon_ids[i]=205;break;case"DUNSPARCE":case 206:m.additional_allowed_pokemon_ids[i]=206;break;case"GLIGAR":case 207:m.additional_allowed_pokemon_ids[i]=207;break;case"STEELIX":case 208:m.additional_allowed_pokemon_ids[i]=208;break;case"SNUBBULL":case 209:m.additional_allowed_pokemon_ids[i]=209;break;case"GRANBULL":case 210:m.additional_allowed_pokemon_ids[i]=210;break;case"QWILFISH":case 211:m.additional_allowed_pokemon_ids[i]=211;break;case"SCIZOR":case 212:m.additional_allowed_pokemon_ids[i]=212;break;case"SHUCKLE":case 213:m.additional_allowed_pokemon_ids[i]=213;break;case"HERACROSS":case 214:m.additional_allowed_pokemon_ids[i]=214;break;case"SNEASEL":case 215:m.additional_allowed_pokemon_ids[i]=215;break;case"TEDDIURSA":case 216:m.additional_allowed_pokemon_ids[i]=216;break;case"URSARING":case 217:m.additional_allowed_pokemon_ids[i]=217;break;case"SLUGMA":case 218:m.additional_allowed_pokemon_ids[i]=218;break;case"MAGCARGO":case 219:m.additional_allowed_pokemon_ids[i]=219;break;case"SWINUB":case 220:m.additional_allowed_pokemon_ids[i]=220;break;case"PILOSWINE":case 221:m.additional_allowed_pokemon_ids[i]=221;break;case"CORSOLA":case 222:m.additional_allowed_pokemon_ids[i]=222;break;case"REMORAID":case 223:m.additional_allowed_pokemon_ids[i]=223;break;case"OCTILLERY":case 224:m.additional_allowed_pokemon_ids[i]=224;break;case"DELIBIRD":case 225:m.additional_allowed_pokemon_ids[i]=225;break;case"MANTINE":case 226:m.additional_allowed_pokemon_ids[i]=226;break;case"SKARMORY":case 227:m.additional_allowed_pokemon_ids[i]=227;break;case"HOUNDOUR":case 228:m.additional_allowed_pokemon_ids[i]=228;break;case"HOUNDOOM":case 229:m.additional_allowed_pokemon_ids[i]=229;break;case"KINGDRA":case 230:m.additional_allowed_pokemon_ids[i]=230;break;case"PHANPY":case 231:m.additional_allowed_pokemon_ids[i]=231;break;case"DONPHAN":case 232:m.additional_allowed_pokemon_ids[i]=232;break;case"PORYGON2":case 233:m.additional_allowed_pokemon_ids[i]=233;break;case"STANTLER":case 234:m.additional_allowed_pokemon_ids[i]=234;break;case"SMEARGLE":case 235:m.additional_allowed_pokemon_ids[i]=235;break;case"TYROGUE":case 236:m.additional_allowed_pokemon_ids[i]=236;break;case"HITMONTOP":case 237:m.additional_allowed_pokemon_ids[i]=237;break;case"SMOOCHUM":case 238:m.additional_allowed_pokemon_ids[i]=238;break;case"ELEKID":case 239:m.additional_allowed_pokemon_ids[i]=239;break;case"MAGBY":case 240:m.additional_allowed_pokemon_ids[i]=240;break;case"MILTANK":case 241:m.additional_allowed_pokemon_ids[i]=241;break;case"BLISSEY":case 242:m.additional_allowed_pokemon_ids[i]=242;break;case"RAIKOU":case 243:m.additional_allowed_pokemon_ids[i]=243;break;case"ENTEI":case 244:m.additional_allowed_pokemon_ids[i]=244;break;case"SUICUNE":case 245:m.additional_allowed_pokemon_ids[i]=245;break;case"LARVITAR":case 246:m.additional_allowed_pokemon_ids[i]=246;break;case"PUPITAR":case 247:m.additional_allowed_pokemon_ids[i]=247;break;case"TYRANITAR":case 248:m.additional_allowed_pokemon_ids[i]=248;break;case"LUGIA":case 249:m.additional_allowed_pokemon_ids[i]=249;break;case"HO_OH":case 250:m.additional_allowed_pokemon_ids[i]=250;break;case"CELEBI":case 251:m.additional_allowed_pokemon_ids[i]=251;break;case"TREECKO":case 252:m.additional_allowed_pokemon_ids[i]=252;break;case"GROVYLE":case 253:m.additional_allowed_pokemon_ids[i]=253;break;case"SCEPTILE":case 254:m.additional_allowed_pokemon_ids[i]=254;break;case"TORCHIC":case 255:m.additional_allowed_pokemon_ids[i]=255;break;case"COMBUSKEN":case 256:m.additional_allowed_pokemon_ids[i]=256;break;case"BLAZIKEN":case 257:m.additional_allowed_pokemon_ids[i]=257;break;case"MUDKIP":case 258:m.additional_allowed_pokemon_ids[i]=258;break;case"MARSHTOMP":case 259:m.additional_allowed_pokemon_ids[i]=259;break;case"SWAMPERT":case 260:m.additional_allowed_pokemon_ids[i]=260;break;case"POOCHYENA":case 261:m.additional_allowed_pokemon_ids[i]=261;break;case"MIGHTYENA":case 262:m.additional_allowed_pokemon_ids[i]=262;break;case"ZIGZAGOON":case 263:m.additional_allowed_pokemon_ids[i]=263;break;case"LINOONE":case 264:m.additional_allowed_pokemon_ids[i]=264;break;case"WURMPLE":case 265:m.additional_allowed_pokemon_ids[i]=265;break;case"SILCOON":case 266:m.additional_allowed_pokemon_ids[i]=266;break;case"BEAUTIFLY":case 267:m.additional_allowed_pokemon_ids[i]=267;break;case"CASCOON":case 268:m.additional_allowed_pokemon_ids[i]=268;break;case"DUSTOX":case 269:m.additional_allowed_pokemon_ids[i]=269;break;case"LOTAD":case 270:m.additional_allowed_pokemon_ids[i]=270;break;case"LOMBRE":case 271:m.additional_allowed_pokemon_ids[i]=271;break;case"LUDICOLO":case 272:m.additional_allowed_pokemon_ids[i]=272;break;case"SEEDOT":case 273:m.additional_allowed_pokemon_ids[i]=273;break;case"NUZLEAF":case 274:m.additional_allowed_pokemon_ids[i]=274;break;case"SHIFTRY":case 275:m.additional_allowed_pokemon_ids[i]=275;break;case"TAILLOW":case 276:m.additional_allowed_pokemon_ids[i]=276;break;case"SWELLOW":case 277:m.additional_allowed_pokemon_ids[i]=277;break;case"WINGULL":case 278:m.additional_allowed_pokemon_ids[i]=278;break;case"PELIPPER":case 279:m.additional_allowed_pokemon_ids[i]=279;break;case"RALTS":case 280:m.additional_allowed_pokemon_ids[i]=280;break;case"KIRLIA":case 281:m.additional_allowed_pokemon_ids[i]=281;break;case"GARDEVOIR":case 282:m.additional_allowed_pokemon_ids[i]=282;break;case"SURSKIT":case 283:m.additional_allowed_pokemon_ids[i]=283;break;case"MASQUERAIN":case 284:m.additional_allowed_pokemon_ids[i]=284;break;case"SHROOMISH":case 285:m.additional_allowed_pokemon_ids[i]=285;break;case"BRELOOM":case 286:m.additional_allowed_pokemon_ids[i]=286;break;case"SLAKOTH":case 287:m.additional_allowed_pokemon_ids[i]=287;break;case"VIGOROTH":case 288:m.additional_allowed_pokemon_ids[i]=288;break;case"SLAKING":case 289:m.additional_allowed_pokemon_ids[i]=289;break;case"NINCADA":case 290:m.additional_allowed_pokemon_ids[i]=290;break;case"NINJASK":case 291:m.additional_allowed_pokemon_ids[i]=291;break;case"SHEDINJA":case 292:m.additional_allowed_pokemon_ids[i]=292;break;case"WHISMUR":case 293:m.additional_allowed_pokemon_ids[i]=293;break;case"LOUDRED":case 294:m.additional_allowed_pokemon_ids[i]=294;break;case"EXPLOUD":case 295:m.additional_allowed_pokemon_ids[i]=295;break;case"MAKUHITA":case 296:m.additional_allowed_pokemon_ids[i]=296;break;case"HARIYAMA":case 297:m.additional_allowed_pokemon_ids[i]=297;break;case"AZURILL":case 298:m.additional_allowed_pokemon_ids[i]=298;break;case"NOSEPASS":case 299:m.additional_allowed_pokemon_ids[i]=299;break;case"SKITTY":case 300:m.additional_allowed_pokemon_ids[i]=300;break;case"DELCATTY":case 301:m.additional_allowed_pokemon_ids[i]=301;break;case"SABLEYE":case 302:m.additional_allowed_pokemon_ids[i]=302;break;case"MAWILE":case 303:m.additional_allowed_pokemon_ids[i]=303;break;case"ARON":case 304:m.additional_allowed_pokemon_ids[i]=304;break;case"LAIRON":case 305:m.additional_allowed_pokemon_ids[i]=305;break;case"AGGRON":case 306:m.additional_allowed_pokemon_ids[i]=306;break;case"MEDITITE":case 307:m.additional_allowed_pokemon_ids[i]=307;break;case"MEDICHAM":case 308:m.additional_allowed_pokemon_ids[i]=308;break;case"ELECTRIKE":case 309:m.additional_allowed_pokemon_ids[i]=309;break;case"MANECTRIC":case 310:m.additional_allowed_pokemon_ids[i]=310;break;case"PLUSLE":case 311:m.additional_allowed_pokemon_ids[i]=311;break;case"MINUN":case 312:m.additional_allowed_pokemon_ids[i]=312;break;case"VOLBEAT":case 313:m.additional_allowed_pokemon_ids[i]=313;break;case"ILLUMISE":case 314:m.additional_allowed_pokemon_ids[i]=314;break;case"ROSELIA":case 315:m.additional_allowed_pokemon_ids[i]=315;break;case"GULPIN":case 316:m.additional_allowed_pokemon_ids[i]=316;break;case"SWALOT":case 317:m.additional_allowed_pokemon_ids[i]=317;break;case"CARVANHA":case 318:m.additional_allowed_pokemon_ids[i]=318;break;case"SHARPEDO":case 319:m.additional_allowed_pokemon_ids[i]=319;break;case"WAILMER":case 320:m.additional_allowed_pokemon_ids[i]=320;break;case"WAILORD":case 321:m.additional_allowed_pokemon_ids[i]=321;break;case"NUMEL":case 322:m.additional_allowed_pokemon_ids[i]=322;break;case"CAMERUPT":case 323:m.additional_allowed_pokemon_ids[i]=323;break;case"TORKOAL":case 324:m.additional_allowed_pokemon_ids[i]=324;break;case"SPOINK":case 325:m.additional_allowed_pokemon_ids[i]=325;break;case"GRUMPIG":case 326:m.additional_allowed_pokemon_ids[i]=326;break;case"SPINDA":case 327:m.additional_allowed_pokemon_ids[i]=327;break;case"TRAPINCH":case 328:m.additional_allowed_pokemon_ids[i]=328;break;case"VIBRAVA":case 329:m.additional_allowed_pokemon_ids[i]=329;break;case"FLYGON":case 330:m.additional_allowed_pokemon_ids[i]=330;break;case"CACNEA":case 331:m.additional_allowed_pokemon_ids[i]=331;break;case"CACTURNE":case 332:m.additional_allowed_pokemon_ids[i]=332;break;case"SWABLU":case 333:m.additional_allowed_pokemon_ids[i]=333;break;case"ALTARIA":case 334:m.additional_allowed_pokemon_ids[i]=334;break;case"ZANGOOSE":case 335:m.additional_allowed_pokemon_ids[i]=335;break;case"SEVIPER":case 336:m.additional_allowed_pokemon_ids[i]=336;break;case"LUNATONE":case 337:m.additional_allowed_pokemon_ids[i]=337;break;case"SOLROCK":case 338:m.additional_allowed_pokemon_ids[i]=338;break;case"BARBOACH":case 339:m.additional_allowed_pokemon_ids[i]=339;break;case"WHISCASH":case 340:m.additional_allowed_pokemon_ids[i]=340;break;case"CORPHISH":case 341:m.additional_allowed_pokemon_ids[i]=341;break;case"CRAWDAUNT":case 342:m.additional_allowed_pokemon_ids[i]=342;break;case"BALTOY":case 343:m.additional_allowed_pokemon_ids[i]=343;break;case"CLAYDOL":case 344:m.additional_allowed_pokemon_ids[i]=344;break;case"LILEEP":case 345:m.additional_allowed_pokemon_ids[i]=345;break;case"CRADILY":case 346:m.additional_allowed_pokemon_ids[i]=346;break;case"ANORITH":case 347:m.additional_allowed_pokemon_ids[i]=347;break;case"ARMALDO":case 348:m.additional_allowed_pokemon_ids[i]=348;break;case"FEEBAS":case 349:m.additional_allowed_pokemon_ids[i]=349;break;case"MILOTIC":case 350:m.additional_allowed_pokemon_ids[i]=350;break;case"CASTFORM":case 351:m.additional_allowed_pokemon_ids[i]=351;break;case"KECLEON":case 352:m.additional_allowed_pokemon_ids[i]=352;break;case"SHUPPET":case 353:m.additional_allowed_pokemon_ids[i]=353;break;case"BANETTE":case 354:m.additional_allowed_pokemon_ids[i]=354;break;case"DUSKULL":case 355:m.additional_allowed_pokemon_ids[i]=355;break;case"DUSCLOPS":case 356:m.additional_allowed_pokemon_ids[i]=356;break;case"TROPIUS":case 357:m.additional_allowed_pokemon_ids[i]=357;break;case"CHIMECHO":case 358:m.additional_allowed_pokemon_ids[i]=358;break;case"ABSOL":case 359:m.additional_allowed_pokemon_ids[i]=359;break;case"WYNAUT":case 360:m.additional_allowed_pokemon_ids[i]=360;break;case"SNORUNT":case 361:m.additional_allowed_pokemon_ids[i]=361;break;case"GLALIE":case 362:m.additional_allowed_pokemon_ids[i]=362;break;case"SPHEAL":case 363:m.additional_allowed_pokemon_ids[i]=363;break;case"SEALEO":case 364:m.additional_allowed_pokemon_ids[i]=364;break;case"WALREIN":case 365:m.additional_allowed_pokemon_ids[i]=365;break;case"CLAMPERL":case 366:m.additional_allowed_pokemon_ids[i]=366;break;case"HUNTAIL":case 367:m.additional_allowed_pokemon_ids[i]=367;break;case"GOREBYSS":case 368:m.additional_allowed_pokemon_ids[i]=368;break;case"RELICANTH":case 369:m.additional_allowed_pokemon_ids[i]=369;break;case"LUVDISC":case 370:m.additional_allowed_pokemon_ids[i]=370;break;case"BAGON":case 371:m.additional_allowed_pokemon_ids[i]=371;break;case"SHELGON":case 372:m.additional_allowed_pokemon_ids[i]=372;break;case"SALAMENCE":case 373:m.additional_allowed_pokemon_ids[i]=373;break;case"BELDUM":case 374:m.additional_allowed_pokemon_ids[i]=374;break;case"METANG":case 375:m.additional_allowed_pokemon_ids[i]=375;break;case"METAGROSS":case 376:m.additional_allowed_pokemon_ids[i]=376;break;case"REGIROCK":case 377:m.additional_allowed_pokemon_ids[i]=377;break;case"REGICE":case 378:m.additional_allowed_pokemon_ids[i]=378;break;case"REGISTEEL":case 379:m.additional_allowed_pokemon_ids[i]=379;break;case"LATIAS":case 380:m.additional_allowed_pokemon_ids[i]=380;break;case"LATIOS":case 381:m.additional_allowed_pokemon_ids[i]=381;break;case"KYOGRE":case 382:m.additional_allowed_pokemon_ids[i]=382;break;case"GROUDON":case 383:m.additional_allowed_pokemon_ids[i]=383;break;case"RAYQUAZA":case 384:m.additional_allowed_pokemon_ids[i]=384;break;case"JIRACHI":case 385:m.additional_allowed_pokemon_ids[i]=385;break;case"DEOXYS":case 386:m.additional_allowed_pokemon_ids[i]=386;break;case"TURTWIG":case 387:m.additional_allowed_pokemon_ids[i]=387;break;case"GROTLE":case 388:m.additional_allowed_pokemon_ids[i]=388;break;case"TORTERRA":case 389:m.additional_allowed_pokemon_ids[i]=389;break;case"CHIMCHAR":case 390:m.additional_allowed_pokemon_ids[i]=390;break;case"MONFERNO":case 391:m.additional_allowed_pokemon_ids[i]=391;break;case"INFERNAPE":case 392:m.additional_allowed_pokemon_ids[i]=392;break;case"PIPLUP":case 393:m.additional_allowed_pokemon_ids[i]=393;break;case"PRINPLUP":case 394:m.additional_allowed_pokemon_ids[i]=394;break;case"EMPOLEON":case 395:m.additional_allowed_pokemon_ids[i]=395;break;case"STARLY":case 396:m.additional_allowed_pokemon_ids[i]=396;break;case"STARAVIA":case 397:m.additional_allowed_pokemon_ids[i]=397;break;case"STARAPTOR":case 398:m.additional_allowed_pokemon_ids[i]=398;break;case"BIDOOF":case 399:m.additional_allowed_pokemon_ids[i]=399;break;case"BIBAREL":case 400:m.additional_allowed_pokemon_ids[i]=400;break;case"KRICKETOT":case 401:m.additional_allowed_pokemon_ids[i]=401;break;case"KRICKETUNE":case 402:m.additional_allowed_pokemon_ids[i]=402;break;case"SHINX":case 403:m.additional_allowed_pokemon_ids[i]=403;break;case"LUXIO":case 404:m.additional_allowed_pokemon_ids[i]=404;break;case"LUXRAY":case 405:m.additional_allowed_pokemon_ids[i]=405;break;case"BUDEW":case 406:m.additional_allowed_pokemon_ids[i]=406;break;case"ROSERADE":case 407:m.additional_allowed_pokemon_ids[i]=407;break;case"CRANIDOS":case 408:m.additional_allowed_pokemon_ids[i]=408;break;case"RAMPARDOS":case 409:m.additional_allowed_pokemon_ids[i]=409;break;case"SHIELDON":case 410:m.additional_allowed_pokemon_ids[i]=410;break;case"BASTIODON":case 411:m.additional_allowed_pokemon_ids[i]=411;break;case"BURMY":case 412:m.additional_allowed_pokemon_ids[i]=412;break;case"WORMADAM":case 413:m.additional_allowed_pokemon_ids[i]=413;break;case"MOTHIM":case 414:m.additional_allowed_pokemon_ids[i]=414;break;case"COMBEE":case 415:m.additional_allowed_pokemon_ids[i]=415;break;case"VESPIQUEN":case 416:m.additional_allowed_pokemon_ids[i]=416;break;case"PACHIRISU":case 417:m.additional_allowed_pokemon_ids[i]=417;break;case"BUIZEL":case 418:m.additional_allowed_pokemon_ids[i]=418;break;case"FLOATZEL":case 419:m.additional_allowed_pokemon_ids[i]=419;break;case"CHERUBI":case 420:m.additional_allowed_pokemon_ids[i]=420;break;case"CHERRIM":case 421:m.additional_allowed_pokemon_ids[i]=421;break;case"SHELLOS":case 422:m.additional_allowed_pokemon_ids[i]=422;break;case"GASTRODON":case 423:m.additional_allowed_pokemon_ids[i]=423;break;case"AMBIPOM":case 424:m.additional_allowed_pokemon_ids[i]=424;break;case"DRIFLOON":case 425:m.additional_allowed_pokemon_ids[i]=425;break;case"DRIFBLIM":case 426:m.additional_allowed_pokemon_ids[i]=426;break;case"BUNEARY":case 427:m.additional_allowed_pokemon_ids[i]=427;break;case"LOPUNNY":case 428:m.additional_allowed_pokemon_ids[i]=428;break;case"MISMAGIUS":case 429:m.additional_allowed_pokemon_ids[i]=429;break;case"HONCHKROW":case 430:m.additional_allowed_pokemon_ids[i]=430;break;case"GLAMEOW":case 431:m.additional_allowed_pokemon_ids[i]=431;break;case"PURUGLY":case 432:m.additional_allowed_pokemon_ids[i]=432;break;case"CHINGLING":case 433:m.additional_allowed_pokemon_ids[i]=433;break;case"STUNKY":case 434:m.additional_allowed_pokemon_ids[i]=434;break;case"SKUNTANK":case 435:m.additional_allowed_pokemon_ids[i]=435;break;case"BRONZOR":case 436:m.additional_allowed_pokemon_ids[i]=436;break;case"BRONZONG":case 437:m.additional_allowed_pokemon_ids[i]=437;break;case"BONSLY":case 438:m.additional_allowed_pokemon_ids[i]=438;break;case"MIME_JR":case 439:m.additional_allowed_pokemon_ids[i]=439;break;case"HAPPINY":case 440:m.additional_allowed_pokemon_ids[i]=440;break;case"CHATOT":case 441:m.additional_allowed_pokemon_ids[i]=441;break;case"SPIRITOMB":case 442:m.additional_allowed_pokemon_ids[i]=442;break;case"GIBLE":case 443:m.additional_allowed_pokemon_ids[i]=443;break;case"GABITE":case 444:m.additional_allowed_pokemon_ids[i]=444;break;case"GARCHOMP":case 445:m.additional_allowed_pokemon_ids[i]=445;break;case"MUNCHLAX":case 446:m.additional_allowed_pokemon_ids[i]=446;break;case"RIOLU":case 447:m.additional_allowed_pokemon_ids[i]=447;break;case"LUCARIO":case 448:m.additional_allowed_pokemon_ids[i]=448;break;case"HIPPOPOTAS":case 449:m.additional_allowed_pokemon_ids[i]=449;break;case"HIPPOWDON":case 450:m.additional_allowed_pokemon_ids[i]=450;break;case"SKORUPI":case 451:m.additional_allowed_pokemon_ids[i]=451;break;case"DRAPION":case 452:m.additional_allowed_pokemon_ids[i]=452;break;case"CROAGUNK":case 453:m.additional_allowed_pokemon_ids[i]=453;break;case"TOXICROAK":case 454:m.additional_allowed_pokemon_ids[i]=454;break;case"CARNIVINE":case 455:m.additional_allowed_pokemon_ids[i]=455;break;case"FINNEON":case 456:m.additional_allowed_pokemon_ids[i]=456;break;case"LUMINEON":case 457:m.additional_allowed_pokemon_ids[i]=457;break;case"MANTYKE":case 458:m.additional_allowed_pokemon_ids[i]=458;break;case"SNOVER":case 459:m.additional_allowed_pokemon_ids[i]=459;break;case"ABOMASNOW":case 460:m.additional_allowed_pokemon_ids[i]=460;break;case"WEAVILE":case 461:m.additional_allowed_pokemon_ids[i]=461;break;case"MAGNEZONE":case 462:m.additional_allowed_pokemon_ids[i]=462;break;case"LICKILICKY":case 463:m.additional_allowed_pokemon_ids[i]=463;break;case"RHYPERIOR":case 464:m.additional_allowed_pokemon_ids[i]=464;break;case"TANGROWTH":case 465:m.additional_allowed_pokemon_ids[i]=465;break;case"ELECTIVIRE":case 466:m.additional_allowed_pokemon_ids[i]=466;break;case"MAGMORTAR":case 467:m.additional_allowed_pokemon_ids[i]=467;break;case"TOGEKISS":case 468:m.additional_allowed_pokemon_ids[i]=468;break;case"YANMEGA":case 469:m.additional_allowed_pokemon_ids[i]=469;break;case"LEAFEON":case 470:m.additional_allowed_pokemon_ids[i]=470;break;case"GLACEON":case 471:m.additional_allowed_pokemon_ids[i]=471;break;case"GLISCOR":case 472:m.additional_allowed_pokemon_ids[i]=472;break;case"MAMOSWINE":case 473:m.additional_allowed_pokemon_ids[i]=473;break;case"PORYGON_Z":case 474:m.additional_allowed_pokemon_ids[i]=474;break;case"GALLADE":case 475:m.additional_allowed_pokemon_ids[i]=475;break;case"PROBOPASS":case 476:m.additional_allowed_pokemon_ids[i]=476;break;case"DUSKNOIR":case 477:m.additional_allowed_pokemon_ids[i]=477;break;case"FROSLASS":case 478:m.additional_allowed_pokemon_ids[i]=478;break;case"ROTOM":case 479:m.additional_allowed_pokemon_ids[i]=479;break;case"UXIE":case 480:m.additional_allowed_pokemon_ids[i]=480;break;case"MESPRIT":case 481:m.additional_allowed_pokemon_ids[i]=481;break;case"AZELF":case 482:m.additional_allowed_pokemon_ids[i]=482;break;case"DIALGA":case 483:m.additional_allowed_pokemon_ids[i]=483;break;case"PALKIA":case 484:m.additional_allowed_pokemon_ids[i]=484;break;case"HEATRAN":case 485:m.additional_allowed_pokemon_ids[i]=485;break;case"REGIGIGAS":case 486:m.additional_allowed_pokemon_ids[i]=486;break;case"GIRATINA":case 487:m.additional_allowed_pokemon_ids[i]=487;break;case"CRESSELIA":case 488:m.additional_allowed_pokemon_ids[i]=488;break;case"PHIONE":case 489:m.additional_allowed_pokemon_ids[i]=489;break;case"MANAPHY":case 490:m.additional_allowed_pokemon_ids[i]=490;break;case"DARKRAI":case 491:m.additional_allowed_pokemon_ids[i]=491;break;case"SHAYMIN":case 492:m.additional_allowed_pokemon_ids[i]=492;break;case"ARCEUS":case 493:m.additional_allowed_pokemon_ids[i]=493;break;case"MELTAN":case 808:m.additional_allowed_pokemon_ids[i]=808;break;case"MELMETAL":case 809:m.additional_allowed_pokemon_ids[i]=809;break}}}if(d.upsight_logging_settings!=null){if(typeof d.upsight_logging_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.upsight_logging_settings: object expected");m.upsight_logging_settings=$root.POGOProtos.Settings.UpsightLoggingSettings.fromObject(d.upsight_logging_settings)}if(d.combat_global_settings!=null){if(typeof d.combat_global_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.combat_global_settings: object expected");m.combat_global_settings=$root.POGOProtos.Settings.CombatGlobalSettings.fromObject(d.combat_global_settings)}if(d.third_move_settings!=null){if(typeof d.third_move_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.third_move_settings: object expected");m.third_move_settings=$root.POGOProtos.Settings.ThirdMoveGlobalSettings.fromObject(d.third_move_settings)}if(d.combat_challenge_global_settings!=null){if(typeof d.combat_challenge_global_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.combat_challenge_global_settings: object expected");m.combat_challenge_global_settings=$root.POGOProtos.Settings.CombatChallengeGlobalSettings.fromObject(d.combat_challenge_global_settings)}if(d.bgmode_global_settings!=null){if(typeof d.bgmode_global_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.bgmode_global_settings: object expected");m.bgmode_global_settings=$root.POGOProtos.Settings.BackgroundModeGlobalSettings.fromObject(d.bgmode_global_settings)}if(d.probe_settings!=null){if(typeof d.probe_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.probe_settings: object expected");m.probe_settings=$root.POGOProtos.Settings.ProbeSettings.fromObject(d.probe_settings)}if(d.purchased_settings!=null){if(typeof d.purchased_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.purchased_settings: object expected");m.purchased_settings=$root.POGOProtos.Settings.PokecoinPurchaseDisplaySettings.fromObject(d.purchased_settings)}if(d.helpshift_settings!=null){if(typeof d.helpshift_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.helpshift_settings: object expected");m.helpshift_settings=$root.POGOProtos.Settings.HelpshiftSettings.fromObject(d.helpshift_settings)}if(d.poi_settings!=null){if(typeof d.poi_settings!=="object")throw TypeError(".POGOProtos.Settings.GlobalSettings.poi_settings: object expected");m.poi_settings=$root.POGOProtos.Settings.PoiGlobalSettings.fromObject(d.poi_settings)}return m};GlobalSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.client_app_blacklist=[];d.additional_allowed_pokemon_ids=[]}if(o.defaults){d.fort_settings=null;d.map_settings=null;d.level_settings=null;d.inventory_settings=null;d.minimum_client_version="";d.gps_settings=null;d.festival_settings=null;d.event_settings=null;d.max_pokemon_types=0;d.sfida_settings=null;d.news_settings=null;d.translation_settings=null;d.passcode_settings=null;d.notification_settings=null;d.client_perf_settings=null;d.news_global_settings=null;d.quest_global_settings=null;d.beluga_global_settings=null;d.telemetry_global_settings=null;d.login_settings=null;d.social_settings=null;d.trading_global_settings=null;d.upsight_logging_settings=null;d.combat_global_settings=null;d.third_move_settings=null;d.combat_challenge_global_settings=null;d.bgmode_global_settings=null;d.probe_settings=null;d.purchased_settings=null;d.helpshift_settings=null;d.poi_settings=null}if(m.fort_settings!=null&&m.hasOwnProperty("fort_settings")){d.fort_settings=$root.POGOProtos.Settings.FortSettings.toObject(m.fort_settings,o)}if(m.map_settings!=null&&m.hasOwnProperty("map_settings")){d.map_settings=$root.POGOProtos.Settings.MapSettings.toObject(m.map_settings,o)}if(m.level_settings!=null&&m.hasOwnProperty("level_settings")){d.level_settings=$root.POGOProtos.Settings.LevelSettings.toObject(m.level_settings,o)}if(m.inventory_settings!=null&&m.hasOwnProperty("inventory_settings")){d.inventory_settings=$root.POGOProtos.Settings.InventorySettings.toObject(m.inventory_settings,o)}if(m.minimum_client_version!=null&&m.hasOwnProperty("minimum_client_version")){d.minimum_client_version=m.minimum_client_version}if(m.gps_settings!=null&&m.hasOwnProperty("gps_settings")){d.gps_settings=$root.POGOProtos.Settings.GpsSettings.toObject(m.gps_settings,o)}if(m.festival_settings!=null&&m.hasOwnProperty("festival_settings")){d.festival_settings=$root.POGOProtos.Settings.FestivalSettings.toObject(m.festival_settings,o)}if(m.event_settings!=null&&m.hasOwnProperty("event_settings")){d.event_settings=$root.POGOProtos.Settings.EventSettings.toObject(m.event_settings,o)}if(m.max_pokemon_types!=null&&m.hasOwnProperty("max_pokemon_types")){d.max_pokemon_types=m.max_pokemon_types}if(m.sfida_settings!=null&&m.hasOwnProperty("sfida_settings")){d.sfida_settings=$root.POGOProtos.Settings.SfidaSettings.toObject(m.sfida_settings,o)}if(m.news_settings!=null&&m.hasOwnProperty("news_settings")){d.news_settings=$root.POGOProtos.Settings.NewsSettings.toObject(m.news_settings,o)}if(m.translation_settings!=null&&m.hasOwnProperty("translation_settings")){d.translation_settings=$root.POGOProtos.Settings.TranslationSettings.toObject(m.translation_settings,o)}if(m.passcode_settings!=null&&m.hasOwnProperty("passcode_settings")){d.passcode_settings=$root.POGOProtos.Settings.PasscodeSettings.toObject(m.passcode_settings,o)}if(m.notification_settings!=null&&m.hasOwnProperty("notification_settings")){d.notification_settings=$root.POGOProtos.Settings.NotificationSettings.toObject(m.notification_settings,o)}if(m.client_app_blacklist&&m.client_app_blacklist.length){d.client_app_blacklist=[];for(var j=0;j<m.client_app_blacklist.length;++j){d.client_app_blacklist[j]=m.client_app_blacklist[j]}}if(m.client_perf_settings!=null&&m.hasOwnProperty("client_perf_settings")){d.client_perf_settings=$root.POGOProtos.Settings.ClientPerformanceSettings.toObject(m.client_perf_settings,o)}if(m.news_global_settings!=null&&m.hasOwnProperty("news_global_settings")){d.news_global_settings=$root.POGOProtos.Settings.NewsGlobalSettings.toObject(m.news_global_settings,o)}if(m.quest_global_settings!=null&&m.hasOwnProperty("quest_global_settings")){d.quest_global_settings=$root.POGOProtos.Settings.QuestGlobalSettings.toObject(m.quest_global_settings,o)}if(m.beluga_global_settings!=null&&m.hasOwnProperty("beluga_global_settings")){d.beluga_global_settings=$root.POGOProtos.Settings.BelugaGlobalSettings.toObject(m.beluga_global_settings,o)}if(m.telemetry_global_settings!=null&&m.hasOwnProperty("telemetry_global_settings")){d.telemetry_global_settings=$root.POGOProtos.Settings.TelemetryGlobalSettings.toObject(m.telemetry_global_settings,o)}if(m.login_settings!=null&&m.hasOwnProperty("login_settings")){d.login_settings=$root.POGOProtos.Settings.LoginSettings.toObject(m.login_settings,o)}if(m.social_settings!=null&&m.hasOwnProperty("social_settings")){d.social_settings=$root.POGOProtos.Settings.SocialClientSettings.toObject(m.social_settings,o)}if(m.trading_global_settings!=null&&m.hasOwnProperty("trading_global_settings")){d.trading_global_settings=$root.POGOProtos.Settings.TradingGlobalSettings.toObject(m.trading_global_settings,o)}if(m.additional_allowed_pokemon_ids&&m.additional_allowed_pokemon_ids.length){d.additional_allowed_pokemon_ids=[];for(var j=0;j<m.additional_allowed_pokemon_ids.length;++j){d.additional_allowed_pokemon_ids[j]=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.additional_allowed_pokemon_ids[j]]:m.additional_allowed_pokemon_ids[j]}}if(m.upsight_logging_settings!=null&&m.hasOwnProperty("upsight_logging_settings")){d.upsight_logging_settings=$root.POGOProtos.Settings.UpsightLoggingSettings.toObject(m.upsight_logging_settings,o)}if(m.combat_global_settings!=null&&m.hasOwnProperty("combat_global_settings")){d.combat_global_settings=$root.POGOProtos.Settings.CombatGlobalSettings.toObject(m.combat_global_settings,o)}if(m.third_move_settings!=null&&m.hasOwnProperty("third_move_settings")){d.third_move_settings=$root.POGOProtos.Settings.ThirdMoveGlobalSettings.toObject(m.third_move_settings,o)}if(m.combat_challenge_global_settings!=null&&m.hasOwnProperty("combat_challenge_global_settings")){d.combat_challenge_global_settings=$root.POGOProtos.Settings.CombatChallengeGlobalSettings.toObject(m.combat_challenge_global_settings,o)}if(m.bgmode_global_settings!=null&&m.hasOwnProperty("bgmode_global_settings")){d.bgmode_global_settings=$root.POGOProtos.Settings.BackgroundModeGlobalSettings.toObject(m.bgmode_global_settings,o)}if(m.probe_settings!=null&&m.hasOwnProperty("probe_settings")){d.probe_settings=$root.POGOProtos.Settings.ProbeSettings.toObject(m.probe_settings,o)}if(m.purchased_settings!=null&&m.hasOwnProperty("purchased_settings")){d.purchased_settings=$root.POGOProtos.Settings.PokecoinPurchaseDisplaySettings.toObject(m.purchased_settings,o)}if(m.helpshift_settings!=null&&m.hasOwnProperty("helpshift_settings")){d.helpshift_settings=$root.POGOProtos.Settings.HelpshiftSettings.toObject(m.helpshift_settings,o)}if(m.poi_settings!=null&&m.hasOwnProperty("poi_settings")){d.poi_settings=$root.POGOProtos.Settings.PoiGlobalSettings.toObject(m.poi_settings,o)}return d};GlobalSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GlobalSettings}();Settings.GpsSettings=function(){function GpsSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GpsSettings.prototype.driving_warning_speed_meters_per_second=0;GpsSettings.prototype.driving_warning_cooldown_minutes=0;GpsSettings.prototype.driving_speed_sample_interval_seconds=0;GpsSettings.prototype.driving_speed_sample_count=0;GpsSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.driving_warning_speed_meters_per_second!=null&&m.hasOwnProperty("driving_warning_speed_meters_per_second"))w.uint32(13).float(m.driving_warning_speed_meters_per_second);if(m.driving_warning_cooldown_minutes!=null&&m.hasOwnProperty("driving_warning_cooldown_minutes"))w.uint32(21).float(m.driving_warning_cooldown_minutes);if(m.driving_speed_sample_interval_seconds!=null&&m.hasOwnProperty("driving_speed_sample_interval_seconds"))w.uint32(29).float(m.driving_speed_sample_interval_seconds);if(m.driving_speed_sample_count!=null&&m.hasOwnProperty("driving_speed_sample_count"))w.uint32(32).int32(m.driving_speed_sample_count);return w};GpsSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.GpsSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.driving_warning_speed_meters_per_second=r.float();break;case 2:m.driving_warning_cooldown_minutes=r.float();break;case 3:m.driving_speed_sample_interval_seconds=r.float();break;case 4:m.driving_speed_sample_count=r.int32();break;default:r.skipType(t&7);break}}return m};GpsSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.GpsSettings)return d;var m=new $root.POGOProtos.Settings.GpsSettings;if(d.driving_warning_speed_meters_per_second!=null){m.driving_warning_speed_meters_per_second=Number(d.driving_warning_speed_meters_per_second)}if(d.driving_warning_cooldown_minutes!=null){m.driving_warning_cooldown_minutes=Number(d.driving_warning_cooldown_minutes)}if(d.driving_speed_sample_interval_seconds!=null){m.driving_speed_sample_interval_seconds=Number(d.driving_speed_sample_interval_seconds)}if(d.driving_speed_sample_count!=null){m.driving_speed_sample_count=d.driving_speed_sample_count|0}return m};GpsSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.driving_warning_speed_meters_per_second=0;d.driving_warning_cooldown_minutes=0;d.driving_speed_sample_interval_seconds=0;d.driving_speed_sample_count=0}if(m.driving_warning_speed_meters_per_second!=null&&m.hasOwnProperty("driving_warning_speed_meters_per_second")){d.driving_warning_speed_meters_per_second=o.json&&!isFinite(m.driving_warning_speed_meters_per_second)?String(m.driving_warning_speed_meters_per_second):m.driving_warning_speed_meters_per_second}if(m.driving_warning_cooldown_minutes!=null&&m.hasOwnProperty("driving_warning_cooldown_minutes")){d.driving_warning_cooldown_minutes=o.json&&!isFinite(m.driving_warning_cooldown_minutes)?String(m.driving_warning_cooldown_minutes):m.driving_warning_cooldown_minutes}if(m.driving_speed_sample_interval_seconds!=null&&m.hasOwnProperty("driving_speed_sample_interval_seconds")){d.driving_speed_sample_interval_seconds=o.json&&!isFinite(m.driving_speed_sample_interval_seconds)?String(m.driving_speed_sample_interval_seconds):m.driving_speed_sample_interval_seconds}if(m.driving_speed_sample_count!=null&&m.hasOwnProperty("driving_speed_sample_count")){d.driving_speed_sample_count=m.driving_speed_sample_count}return d};GpsSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GpsSettings}();Settings.HelpshiftSettings=function(){function HelpshiftSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}HelpshiftSettings.prototype.min_player_level=0;HelpshiftSettings.prototype.default_player_level=0;HelpshiftSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.min_player_level!=null&&m.hasOwnProperty("min_player_level"))w.uint32(8).uint32(m.min_player_level);if(m.default_player_level!=null&&m.hasOwnProperty("default_player_level"))w.uint32(16).uint32(m.default_player_level);return w};HelpshiftSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.HelpshiftSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.min_player_level=r.uint32();break;case 2:m.default_player_level=r.uint32();break;default:r.skipType(t&7);break}}return m};HelpshiftSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.HelpshiftSettings)return d;var m=new $root.POGOProtos.Settings.HelpshiftSettings;if(d.min_player_level!=null){m.min_player_level=d.min_player_level>>>0}if(d.default_player_level!=null){m.default_player_level=d.default_player_level>>>0}return m};HelpshiftSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.min_player_level=0;d.default_player_level=0}if(m.min_player_level!=null&&m.hasOwnProperty("min_player_level")){d.min_player_level=m.min_player_level}if(m.default_player_level!=null&&m.hasOwnProperty("default_player_level")){d.default_player_level=m.default_player_level}return d};HelpshiftSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return HelpshiftSettings}();Settings.InventorySettings=function(){function InventorySettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}InventorySettings.prototype.max_pokemon=0;InventorySettings.prototype.max_bag_items=0;InventorySettings.prototype.base_pokemon=0;InventorySettings.prototype.base_bag_items=0;InventorySettings.prototype.base_eggs=0;InventorySettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.max_pokemon!=null&&m.hasOwnProperty("max_pokemon"))w.uint32(8).int32(m.max_pokemon);if(m.max_bag_items!=null&&m.hasOwnProperty("max_bag_items"))w.uint32(16).int32(m.max_bag_items);if(m.base_pokemon!=null&&m.hasOwnProperty("base_pokemon"))w.uint32(24).int32(m.base_pokemon);if(m.base_bag_items!=null&&m.hasOwnProperty("base_bag_items"))w.uint32(32).int32(m.base_bag_items);if(m.base_eggs!=null&&m.hasOwnProperty("base_eggs"))w.uint32(40).int32(m.base_eggs);return w};InventorySettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.InventorySettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.max_pokemon=r.int32();break;case 2:m.max_bag_items=r.int32();break;case 3:m.base_pokemon=r.int32();break;case 4:m.base_bag_items=r.int32();break;case 5:m.base_eggs=r.int32();break;default:r.skipType(t&7);break}}return m};InventorySettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.InventorySettings)return d;var m=new $root.POGOProtos.Settings.InventorySettings;if(d.max_pokemon!=null){m.max_pokemon=d.max_pokemon|0}if(d.max_bag_items!=null){m.max_bag_items=d.max_bag_items|0}if(d.base_pokemon!=null){m.base_pokemon=d.base_pokemon|0}if(d.base_bag_items!=null){m.base_bag_items=d.base_bag_items|0}if(d.base_eggs!=null){m.base_eggs=d.base_eggs|0}return m};InventorySettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.max_pokemon=0;d.max_bag_items=0;d.base_pokemon=0;d.base_bag_items=0;d.base_eggs=0}if(m.max_pokemon!=null&&m.hasOwnProperty("max_pokemon")){d.max_pokemon=m.max_pokemon}if(m.max_bag_items!=null&&m.hasOwnProperty("max_bag_items")){d.max_bag_items=m.max_bag_items}if(m.base_pokemon!=null&&m.hasOwnProperty("base_pokemon")){d.base_pokemon=m.base_pokemon}if(m.base_bag_items!=null&&m.hasOwnProperty("base_bag_items")){d.base_bag_items=m.base_bag_items}if(m.base_eggs!=null&&m.hasOwnProperty("base_eggs")){d.base_eggs=m.base_eggs}return d};InventorySettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return InventorySettings}();Settings.LevelSettings=function(){function LevelSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LevelSettings.prototype.trainer_cp_modifier=0;LevelSettings.prototype.trainer_difficulty_modifier=0;LevelSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.trainer_cp_modifier!=null&&m.hasOwnProperty("trainer_cp_modifier"))w.uint32(17).double(m.trainer_cp_modifier);if(m.trainer_difficulty_modifier!=null&&m.hasOwnProperty("trainer_difficulty_modifier"))w.uint32(25).double(m.trainer_difficulty_modifier);return w};LevelSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.LevelSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 2:m.trainer_cp_modifier=r.double();break;case 3:m.trainer_difficulty_modifier=r.double();break;default:r.skipType(t&7);break}}return m};LevelSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.LevelSettings)return d;var m=new $root.POGOProtos.Settings.LevelSettings;if(d.trainer_cp_modifier!=null){m.trainer_cp_modifier=Number(d.trainer_cp_modifier)}if(d.trainer_difficulty_modifier!=null){m.trainer_difficulty_modifier=Number(d.trainer_difficulty_modifier)}return m};LevelSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.trainer_cp_modifier=0;d.trainer_difficulty_modifier=0}if(m.trainer_cp_modifier!=null&&m.hasOwnProperty("trainer_cp_modifier")){d.trainer_cp_modifier=o.json&&!isFinite(m.trainer_cp_modifier)?String(m.trainer_cp_modifier):m.trainer_cp_modifier}if(m.trainer_difficulty_modifier!=null&&m.hasOwnProperty("trainer_difficulty_modifier")){d.trainer_difficulty_modifier=o.json&&!isFinite(m.trainer_difficulty_modifier)?String(m.trainer_difficulty_modifier):m.trainer_difficulty_modifier}return d};LevelSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return LevelSettings}();Settings.LoginSettings=function(){function LoginSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LoginSettings.prototype.enable_multi_login_linking=false;LoginSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.enable_multi_login_linking!=null&&m.hasOwnProperty("enable_multi_login_linking"))w.uint32(8).bool(m.enable_multi_login_linking);return w};LoginSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.LoginSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.enable_multi_login_linking=r.bool();break;default:r.skipType(t&7);break}}return m};LoginSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.LoginSettings)return d;var m=new $root.POGOProtos.Settings.LoginSettings;if(d.enable_multi_login_linking!=null){m.enable_multi_login_linking=Boolean(d.enable_multi_login_linking)}return m};LoginSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.enable_multi_login_linking=false}if(m.enable_multi_login_linking!=null&&m.hasOwnProperty("enable_multi_login_linking")){d.enable_multi_login_linking=m.enable_multi_login_linking}return d};LoginSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return LoginSettings}();Settings.MapSettings=function(){function MapSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}MapSettings.prototype.pokemon_visible_range=0;MapSettings.prototype.poke_nav_range_meters=0;MapSettings.prototype.encounter_range_meters=0;MapSettings.prototype.get_map_objects_min_refresh_seconds=0;MapSettings.prototype.get_map_objects_max_refresh_seconds=0;MapSettings.prototype.get_map_objects_min_distance_meters=0;MapSettings.prototype.google_maps_api_key="";MapSettings.prototype.min_nearby_hide_sightings=0;MapSettings.prototype.enable_special_weather=false;MapSettings.prototype.special_weather_probability=0;MapSettings.prototype.google_maps_client_id="";MapSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_visible_range!=null&&m.hasOwnProperty("pokemon_visible_range"))w.uint32(9).double(m.pokemon_visible_range);if(m.poke_nav_range_meters!=null&&m.hasOwnProperty("poke_nav_range_meters"))w.uint32(17).double(m.poke_nav_range_meters);if(m.encounter_range_meters!=null&&m.hasOwnProperty("encounter_range_meters"))w.uint32(25).double(m.encounter_range_meters);if(m.get_map_objects_min_refresh_seconds!=null&&m.hasOwnProperty("get_map_objects_min_refresh_seconds"))w.uint32(37).float(m.get_map_objects_min_refresh_seconds);if(m.get_map_objects_max_refresh_seconds!=null&&m.hasOwnProperty("get_map_objects_max_refresh_seconds"))w.uint32(45).float(m.get_map_objects_max_refresh_seconds);if(m.get_map_objects_min_distance_meters!=null&&m.hasOwnProperty("get_map_objects_min_distance_meters"))w.uint32(53).float(m.get_map_objects_min_distance_meters);if(m.google_maps_api_key!=null&&m.hasOwnProperty("google_maps_api_key"))w.uint32(58).string(m.google_maps_api_key);if(m.min_nearby_hide_sightings!=null&&m.hasOwnProperty("min_nearby_hide_sightings"))w.uint32(64).int32(m.min_nearby_hide_sightings);if(m.enable_special_weather!=null&&m.hasOwnProperty("enable_special_weather"))w.uint32(72).bool(m.enable_special_weather);if(m.special_weather_probability!=null&&m.hasOwnProperty("special_weather_probability"))w.uint32(85).float(m.special_weather_probability);if(m.google_maps_client_id!=null&&m.hasOwnProperty("google_maps_client_id"))w.uint32(90).string(m.google_maps_client_id);return w};MapSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.MapSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_visible_range=r.double();break;case 2:m.poke_nav_range_meters=r.double();break;case 3:m.encounter_range_meters=r.double();break;case 4:m.get_map_objects_min_refresh_seconds=r.float();break;case 5:m.get_map_objects_max_refresh_seconds=r.float();break;case 6:m.get_map_objects_min_distance_meters=r.float();break;case 7:m.google_maps_api_key=r.string();break;case 8:m.min_nearby_hide_sightings=r.int32();break;case 9:m.enable_special_weather=r.bool();break;case 10:m.special_weather_probability=r.float();break;case 11:m.google_maps_client_id=r.string();break;default:r.skipType(t&7);break}}return m};MapSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.MapSettings)return d;var m=new $root.POGOProtos.Settings.MapSettings;if(d.pokemon_visible_range!=null){m.pokemon_visible_range=Number(d.pokemon_visible_range)}if(d.poke_nav_range_meters!=null){m.poke_nav_range_meters=Number(d.poke_nav_range_meters)}if(d.encounter_range_meters!=null){m.encounter_range_meters=Number(d.encounter_range_meters)}if(d.get_map_objects_min_refresh_seconds!=null){m.get_map_objects_min_refresh_seconds=Number(d.get_map_objects_min_refresh_seconds)}if(d.get_map_objects_max_refresh_seconds!=null){m.get_map_objects_max_refresh_seconds=Number(d.get_map_objects_max_refresh_seconds)}if(d.get_map_objects_min_distance_meters!=null){m.get_map_objects_min_distance_meters=Number(d.get_map_objects_min_distance_meters)}if(d.google_maps_api_key!=null){m.google_maps_api_key=String(d.google_maps_api_key)}if(d.min_nearby_hide_sightings!=null){m.min_nearby_hide_sightings=d.min_nearby_hide_sightings|0}if(d.enable_special_weather!=null){m.enable_special_weather=Boolean(d.enable_special_weather)}if(d.special_weather_probability!=null){m.special_weather_probability=Number(d.special_weather_probability)}if(d.google_maps_client_id!=null){m.google_maps_client_id=String(d.google_maps_client_id)}return m};MapSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon_visible_range=0;d.poke_nav_range_meters=0;d.encounter_range_meters=0;d.get_map_objects_min_refresh_seconds=0;d.get_map_objects_max_refresh_seconds=0;d.get_map_objects_min_distance_meters=0;d.google_maps_api_key="";d.min_nearby_hide_sightings=0;d.enable_special_weather=false;d.special_weather_probability=0;d.google_maps_client_id=""}if(m.pokemon_visible_range!=null&&m.hasOwnProperty("pokemon_visible_range")){d.pokemon_visible_range=o.json&&!isFinite(m.pokemon_visible_range)?String(m.pokemon_visible_range):m.pokemon_visible_range}if(m.poke_nav_range_meters!=null&&m.hasOwnProperty("poke_nav_range_meters")){d.poke_nav_range_meters=o.json&&!isFinite(m.poke_nav_range_meters)?String(m.poke_nav_range_meters):m.poke_nav_range_meters}if(m.encounter_range_meters!=null&&m.hasOwnProperty("encounter_range_meters")){d.encounter_range_meters=o.json&&!isFinite(m.encounter_range_meters)?String(m.encounter_range_meters):m.encounter_range_meters}if(m.get_map_objects_min_refresh_seconds!=null&&m.hasOwnProperty("get_map_objects_min_refresh_seconds")){d.get_map_objects_min_refresh_seconds=o.json&&!isFinite(m.get_map_objects_min_refresh_seconds)?String(m.get_map_objects_min_refresh_seconds):m.get_map_objects_min_refresh_seconds}if(m.get_map_objects_max_refresh_seconds!=null&&m.hasOwnProperty("get_map_objects_max_refresh_seconds")){d.get_map_objects_max_refresh_seconds=o.json&&!isFinite(m.get_map_objects_max_refresh_seconds)?String(m.get_map_objects_max_refresh_seconds):m.get_map_objects_max_refresh_seconds}if(m.get_map_objects_min_distance_meters!=null&&m.hasOwnProperty("get_map_objects_min_distance_meters")){d.get_map_objects_min_distance_meters=o.json&&!isFinite(m.get_map_objects_min_distance_meters)?String(m.get_map_objects_min_distance_meters):m.get_map_objects_min_distance_meters}if(m.google_maps_api_key!=null&&m.hasOwnProperty("google_maps_api_key")){d.google_maps_api_key=m.google_maps_api_key}if(m.min_nearby_hide_sightings!=null&&m.hasOwnProperty("min_nearby_hide_sightings")){d.min_nearby_hide_sightings=m.min_nearby_hide_sightings}if(m.enable_special_weather!=null&&m.hasOwnProperty("enable_special_weather")){d.enable_special_weather=m.enable_special_weather}if(m.special_weather_probability!=null&&m.hasOwnProperty("special_weather_probability")){d.special_weather_probability=o.json&&!isFinite(m.special_weather_probability)?String(m.special_weather_probability):m.special_weather_probability}if(m.google_maps_client_id!=null&&m.hasOwnProperty("google_maps_client_id")){d.google_maps_client_id=m.google_maps_client_id}return d};MapSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return MapSettings}();Settings.Master=function(){var Master={};Master.BackgroundModeSettings=function(){function BackgroundModeSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BackgroundModeSettings.prototype.weekly_fitness_goal_level1_distance_km=0;BackgroundModeSettings.prototype.weekly_fitness_goal_level2_distance_km=0;BackgroundModeSettings.prototype.weekly_fitness_goal_level3_distance_km=0;BackgroundModeSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.weekly_fitness_goal_level1_distance_km!=null&&m.hasOwnProperty("weekly_fitness_goal_level1_distance_km"))w.uint32(9).double(m.weekly_fitness_goal_level1_distance_km);if(m.weekly_fitness_goal_level2_distance_km!=null&&m.hasOwnProperty("weekly_fitness_goal_level2_distance_km"))w.uint32(17).double(m.weekly_fitness_goal_level2_distance_km);if(m.weekly_fitness_goal_level3_distance_km!=null&&m.hasOwnProperty("weekly_fitness_goal_level3_distance_km"))w.uint32(25).double(m.weekly_fitness_goal_level3_distance_km);return w};BackgroundModeSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.BackgroundModeSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.weekly_fitness_goal_level1_distance_km=r.double();break;case 2:m.weekly_fitness_goal_level2_distance_km=r.double();break;case 3:m.weekly_fitness_goal_level3_distance_km=r.double();break;default:r.skipType(t&7);break}}return m};BackgroundModeSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.BackgroundModeSettings)return d;var m=new $root.POGOProtos.Settings.Master.BackgroundModeSettings;if(d.weekly_fitness_goal_level1_distance_km!=null){m.weekly_fitness_goal_level1_distance_km=Number(d.weekly_fitness_goal_level1_distance_km)}if(d.weekly_fitness_goal_level2_distance_km!=null){m.weekly_fitness_goal_level2_distance_km=Number(d.weekly_fitness_goal_level2_distance_km)}if(d.weekly_fitness_goal_level3_distance_km!=null){m.weekly_fitness_goal_level3_distance_km=Number(d.weekly_fitness_goal_level3_distance_km)}return m};BackgroundModeSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.weekly_fitness_goal_level1_distance_km=0;d.weekly_fitness_goal_level2_distance_km=0;d.weekly_fitness_goal_level3_distance_km=0}if(m.weekly_fitness_goal_level1_distance_km!=null&&m.hasOwnProperty("weekly_fitness_goal_level1_distance_km")){d.weekly_fitness_goal_level1_distance_km=o.json&&!isFinite(m.weekly_fitness_goal_level1_distance_km)?String(m.weekly_fitness_goal_level1_distance_km):m.weekly_fitness_goal_level1_distance_km}if(m.weekly_fitness_goal_level2_distance_km!=null&&m.hasOwnProperty("weekly_fitness_goal_level2_distance_km")){d.weekly_fitness_goal_level2_distance_km=o.json&&!isFinite(m.weekly_fitness_goal_level2_distance_km)?String(m.weekly_fitness_goal_level2_distance_km):m.weekly_fitness_goal_level2_distance_km}if(m.weekly_fitness_goal_level3_distance_km!=null&&m.hasOwnProperty("weekly_fitness_goal_level3_distance_km")){d.weekly_fitness_goal_level3_distance_km=o.json&&!isFinite(m.weekly_fitness_goal_level3_distance_km)?String(m.weekly_fitness_goal_level3_distance_km):m.weekly_fitness_goal_level3_distance_km}return d};BackgroundModeSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BackgroundModeSettings}();Master.BadgeSettings=function(){function BadgeSettings(p){this.targets=[];this.capture_reward=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BadgeSettings.prototype.badge_type=0;BadgeSettings.prototype.badge_rank=0;BadgeSettings.prototype.targets=$util.emptyArray;BadgeSettings.prototype.capture_reward=$util.emptyArray;BadgeSettings.prototype.event_badge=false;BadgeSettings.prototype.event_badge_settings=null;BadgeSettings.prototype.combat_league_template_id="";BadgeSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.badge_type!=null&&m.hasOwnProperty("badge_type"))w.uint32(8).int32(m.badge_type);if(m.badge_rank!=null&&m.hasOwnProperty("badge_rank"))w.uint32(16).int32(m.badge_rank);if(m.targets!=null&&m.targets.length){w.uint32(26).fork();for(var i=0;i<m.targets.length;++i)w.int32(m.targets[i]);w.ldelim()}if(m.capture_reward!=null&&m.capture_reward.length){for(var i=0;i<m.capture_reward.length;++i)$root.POGOProtos.Data.Badge.BadgeCaptureReward.encode(m.capture_reward[i],w.uint32(34).fork()).ldelim()}if(m.event_badge!=null&&m.hasOwnProperty("event_badge"))w.uint32(40).bool(m.event_badge);if(m.event_badge_settings!=null&&m.hasOwnProperty("event_badge_settings"))$root.POGOProtos.Settings.Master.EventBadgeSettings.encode(m.event_badge_settings,w.uint32(50).fork()).ldelim();if(m.combat_league_template_id!=null&&m.hasOwnProperty("combat_league_template_id"))w.uint32(58).string(m.combat_league_template_id);return w};BadgeSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.BadgeSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.badge_type=r.int32();break;case 2:m.badge_rank=r.int32();break;case 3:if(!(m.targets&&m.targets.length))m.targets=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.targets.push(r.int32())}else m.targets.push(r.int32());break;case 4:if(!(m.capture_reward&&m.capture_reward.length))m.capture_reward=[];m.capture_reward.push($root.POGOProtos.Data.Badge.BadgeCaptureReward.decode(r,r.uint32()));break;case 5:m.event_badge=r.bool();break;case 6:m.event_badge_settings=$root.POGOProtos.Settings.Master.EventBadgeSettings.decode(r,r.uint32());break;case 7:m.combat_league_template_id=r.string();break;default:r.skipType(t&7);break}}return m};BadgeSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.BadgeSettings)return d;var m=new $root.POGOProtos.Settings.Master.BadgeSettings;switch(d.badge_type){case"BADGE_UNSET":case 0:m.badge_type=0;break;case"BADGE_TRAVEL_KM":case 1:m.badge_type=1;break;case"BADGE_POKEDEX_ENTRIES":case 2:m.badge_type=2;break;case"BADGE_CAPTURE_TOTAL":case 3:m.badge_type=3;break;case"BADGE_DEFEATED_FORT":case 4:m.badge_type=4;break;case"BADGE_EVOLVED_TOTAL":case 5:m.badge_type=5;break;case"BADGE_HATCHED_TOTAL":case 6:m.badge_type=6;break;case"BADGE_ENCOUNTERED_TOTAL":case 7:m.badge_type=7;break;case"BADGE_POKESTOPS_VISITED":case 8:m.badge_type=8;break;case"BADGE_UNIQUE_POKESTOPS":case 9:m.badge_type=9;break;case"BADGE_POKEBALL_THROWN":case 10:m.badge_type=10;break;case"BADGE_BIG_MAGIKARP":case 11:m.badge_type=11;break;case"BADGE_DEPLOYED_TOTAL":case 12:m.badge_type=12;break;case"BADGE_BATTLE_ATTACK_WON":case 13:m.badge_type=13;break;case"BADGE_BATTLE_TRAINING_WON":case 14:m.badge_type=14;break;case"BADGE_BATTLE_DEFEND_WON":case 15:m.badge_type=15;break;case"BADGE_PRESTIGE_RAISED":case 16:m.badge_type=16;break;case"BADGE_PRESTIGE_DROPPED":case 17:m.badge_type=17;break;case"BADGE_TYPE_NORMAL":case 18:m.badge_type=18;break;case"BADGE_TYPE_FIGHTING":case 19:m.badge_type=19;break;case"BADGE_TYPE_FLYING":case 20:m.badge_type=20;break;case"BADGE_TYPE_POISON":case 21:m.badge_type=21;break;case"BADGE_TYPE_GROUND":case 22:m.badge_type=22;break;case"BADGE_TYPE_ROCK":case 23:m.badge_type=23;break;case"BADGE_TYPE_BUG":case 24:m.badge_type=24;break;case"BADGE_TYPE_GHOST":case 25:m.badge_type=25;break;case"BADGE_TYPE_STEEL":case 26:m.badge_type=26;break;case"BADGE_TYPE_FIRE":case 27:m.badge_type=27;break;case"BADGE_TYPE_WATER":case 28:m.badge_type=28;break;case"BADGE_TYPE_GRASS":case 29:m.badge_type=29;break;case"BADGE_TYPE_ELECTRIC":case 30:m.badge_type=30;break;case"BADGE_TYPE_PSYCHIC":case 31:m.badge_type=31;break;case"BADGE_TYPE_ICE":case 32:m.badge_type=32;break;case"BADGE_TYPE_DRAGON":case 33:m.badge_type=33;break;case"BADGE_TYPE_DARK":case 34:m.badge_type=34;break;case"BADGE_TYPE_FAIRY":case 35:m.badge_type=35;break;case"BADGE_SMALL_RATTATA":case 36:m.badge_type=36;break;case"BADGE_PIKACHU":case 37:m.badge_type=37;break;case"BADGE_UNOWN":case 38:m.badge_type=38;break;case"BADGE_POKEDEX_ENTRIES_GEN2":case 39:m.badge_type=39;break;case"BADGE_RAID_BATTLE_WON":case 40:m.badge_type=40;break;case"BADGE_LEGENDARY_BATTLE_WON":case 41:m.badge_type=41;break;case"BADGE_BERRIES_FED":case 42:m.badge_type=42;break;case"BADGE_HOURS_DEFENDED":case 43:m.badge_type=43;break;case"BADGE_PLACE_HOLDER":case 44:m.badge_type=44;break;case"BADGE_POKEDEX_ENTRIES_GEN3":case 45:m.badge_type=45;break;case"BADGE_CHALLENGE_QUESTS":case 46:m.badge_type=46;break;case"BADGE_MEW_ENCOUNTER":case 47:m.badge_type=47;break;case"BADGE_MAX_LEVEL_FRIENDS":case 48:m.badge_type=48;break;case"BADGE_TRADING":case 49:m.badge_type=49;break;case"BADGE_TRADING_DISTANCE":case 50:m.badge_type=50;break;case"BADGE_POKEDEX_ENTRIES_GEN4":case 51:m.badge_type=51;break;case"BADGE_GREAT_LEAGUE":case 52:m.badge_type=52;break;case"BADGE_ULTRA_LEAGUE":case 53:m.badge_type=53;break;case"BADGE_MASTER_LEAGUE":case 54:m.badge_type=54;break;case"BADGE_EVENT_MIN":case 2e3:m.badge_type=2e3;break;case"BADGE_CHICAGO_FEST_JULY_2017":case 2001:m.badge_type=2001;break;case"BADGE_PIKACHU_OUTBREAK_YOKOHAMA_2017":case 2002:m.badge_type=2002;break;case"BADGE_SAFARI_ZONE_EUROPE_2017":case 2003:m.badge_type=2003;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_07":case 2004:m.badge_type=2004;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_14":case 2005:m.badge_type=2005;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_NORTH":case 2006:m.badge_type=2006;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_SOUTH":case 2007:m.badge_type=2007;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_NORTH":case 2008:m.badge_type=2008;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_SOUTH":case 2009:m.badge_type=2009;break;case"BADGE_APAC_PARTNER_JULY_2018_0":case 2010:m.badge_type=2010;break;case"BADGE_APAC_PARTNER_JULY_2018_1":case 2011:m.badge_type=2011;break;case"BADGE_APAC_PARTNER_JULY_2018_2":case 2012:m.badge_type=2012;break;case"BADGE_APAC_PARTNER_JULY_2018_3":case 2013:m.badge_type=2013;break;case"BADGE_APAC_PARTNER_JULY_2018_4":case 2014:m.badge_type=2014;break;case"BADGE_APAC_PARTNER_JULY_2018_5":case 2015:m.badge_type=2015;break;case"BADGE_APAC_PARTNER_JULY_2018_6":case 2016:m.badge_type=2016;break;case"BADGE_APAC_PARTNER_JULY_2018_7":case 2017:m.badge_type=2017;break;case"BADGE_APAC_PARTNER_JULY_2018_8":case 2018:m.badge_type=2018;break;case"BADGE_APAC_PARTNER_JULY_2018_9":case 2019:m.badge_type=2019;break;case"BADGE_YOKOSUKA_29_AUG_2018_MIKASA":case 2020:m.badge_type=2020;break;case"BADGE_YOKOSUKA_29_AUG_2018_VERNY":case 2021:m.badge_type=2021;break;case"BADGE_YOKOSUKA_29_AUG_2018_KURIHAMA":case 2022:m.badge_type=2022;break;case"BADGE_YOKOSUKA_30_AUG_2018_MIKASA":case 2023:m.badge_type=2023;break;case"BADGE_YOKOSUKA_30_AUG_2018_VERNY":case 2024:m.badge_type=2024;break;case"BADGE_YOKOSUKA_30_AUG_2018_KURIHAMA":case 2025:m.badge_type=2025;break;case"BADGE_YOKOSUKA_31_AUG_2018_MIKASA":case 2026:m.badge_type=2026;break;case"BADGE_YOKOSUKA_31_AUG_2018_VERNY":case 2027:m.badge_type=2027;break;case"BADGE_YOKOSUKA_31_AUG_2018_KURIHAMA":case 2028:m.badge_type=2028;break;case"BADGE_YOKOSUKA_1_SEP_2018_MIKASA":case 2029:m.badge_type=2029;break;case"BADGE_YOKOSUKA_1_SEP_2018_VERNY":case 2030:m.badge_type=2030;break;case"BADGE_YOKOSUKA_1_SEP_2018_KURIHAMA":case 2031:m.badge_type=2031;break;case"BADGE_YOKOSUKA_2_SEP_2018_MIKASA":case 2032:m.badge_type=2032;break;case"BADGE_YOKOSUKA_2_SEP_2018_VERNY":case 2033:m.badge_type=2033;break;case"BADGE_YOKOSUKA_2_SEP_2018_KURIHAMA":case 2034:m.badge_type=2034;break;case"BADGE_TOP_BANANA_1":case 2035:m.badge_type=2035;break;case"BADGE_TOP_BANANA_2":case 2036:m.badge_type=2036;break;case"BADGE_TOP_BANANA_3":case 2037:m.badge_type=2037;break}if(d.badge_rank!=null){m.badge_rank=d.badge_rank|0}if(d.targets){if(!Array.isArray(d.targets))throw TypeError(".POGOProtos.Settings.Master.BadgeSettings.targets: array expected");m.targets=[];for(var i=0;i<d.targets.length;++i){m.targets[i]=d.targets[i]|0}}if(d.capture_reward){if(!Array.isArray(d.capture_reward))throw TypeError(".POGOProtos.Settings.Master.BadgeSettings.capture_reward: array expected");m.capture_reward=[];for(var i=0;i<d.capture_reward.length;++i){if(typeof d.capture_reward[i]!=="object")throw TypeError(".POGOProtos.Settings.Master.BadgeSettings.capture_reward: object expected");m.capture_reward[i]=$root.POGOProtos.Data.Badge.BadgeCaptureReward.fromObject(d.capture_reward[i])}}if(d.event_badge!=null){m.event_badge=Boolean(d.event_badge)}if(d.event_badge_settings!=null){if(typeof d.event_badge_settings!=="object")throw TypeError(".POGOProtos.Settings.Master.BadgeSettings.event_badge_settings: object expected");m.event_badge_settings=$root.POGOProtos.Settings.Master.EventBadgeSettings.fromObject(d.event_badge_settings)}if(d.combat_league_template_id!=null){m.combat_league_template_id=String(d.combat_league_template_id)}return m};BadgeSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.targets=[];d.capture_reward=[]}if(o.defaults){d.badge_type=o.enums===String?"BADGE_UNSET":0;d.badge_rank=0;d.event_badge=false;d.event_badge_settings=null;d.combat_league_template_id=""}if(m.badge_type!=null&&m.hasOwnProperty("badge_type")){d.badge_type=o.enums===String?$root.POGOProtos.Enums.BadgeType[m.badge_type]:m.badge_type}if(m.badge_rank!=null&&m.hasOwnProperty("badge_rank")){d.badge_rank=m.badge_rank}if(m.targets&&m.targets.length){d.targets=[];for(var j=0;j<m.targets.length;++j){d.targets[j]=m.targets[j]}}if(m.capture_reward&&m.capture_reward.length){d.capture_reward=[];for(var j=0;j<m.capture_reward.length;++j){d.capture_reward[j]=$root.POGOProtos.Data.Badge.BadgeCaptureReward.toObject(m.capture_reward[j],o)}}if(m.event_badge!=null&&m.hasOwnProperty("event_badge")){d.event_badge=m.event_badge}if(m.event_badge_settings!=null&&m.hasOwnProperty("event_badge_settings")){d.event_badge_settings=$root.POGOProtos.Settings.Master.EventBadgeSettings.toObject(m.event_badge_settings,o)}if(m.combat_league_template_id!=null&&m.hasOwnProperty("combat_league_template_id")){d.combat_league_template_id=m.combat_league_template_id}return d};BadgeSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BadgeSettings}();Master.BelugaPokemonWhitelist=function(){function BelugaPokemonWhitelist(p){this.additional_pokemon_allowed=[];this.forms_allowed=[];this.costumes_allowed=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BelugaPokemonWhitelist.prototype.max_allowed_pokemon_pokedex_number=0;BelugaPokemonWhitelist.prototype.additional_pokemon_allowed=$util.emptyArray;BelugaPokemonWhitelist.prototype.forms_allowed=$util.emptyArray;BelugaPokemonWhitelist.prototype.costumes_allowed=$util.emptyArray;BelugaPokemonWhitelist.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.max_allowed_pokemon_pokedex_number!=null&&m.hasOwnProperty("max_allowed_pokemon_pokedex_number"))w.uint32(8).int32(m.max_allowed_pokemon_pokedex_number);if(m.additional_pokemon_allowed!=null&&m.additional_pokemon_allowed.length){w.uint32(18).fork();for(var i=0;i<m.additional_pokemon_allowed.length;++i)w.int32(m.additional_pokemon_allowed[i]);w.ldelim()}if(m.forms_allowed!=null&&m.forms_allowed.length){w.uint32(26).fork();for(var i=0;i<m.forms_allowed.length;++i)w.int32(m.forms_allowed[i]);w.ldelim()}if(m.costumes_allowed!=null&&m.costumes_allowed.length){w.uint32(34).fork();for(var i=0;i<m.costumes_allowed.length;++i)w.int32(m.costumes_allowed[i]);w.ldelim()}return w};BelugaPokemonWhitelist.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.BelugaPokemonWhitelist;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.max_allowed_pokemon_pokedex_number=r.int32();break;case 2:if(!(m.additional_pokemon_allowed&&m.additional_pokemon_allowed.length))m.additional_pokemon_allowed=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.additional_pokemon_allowed.push(r.int32())}else m.additional_pokemon_allowed.push(r.int32());break;case 3:if(!(m.forms_allowed&&m.forms_allowed.length))m.forms_allowed=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.forms_allowed.push(r.int32())}else m.forms_allowed.push(r.int32());break;case 4:if(!(m.costumes_allowed&&m.costumes_allowed.length))m.costumes_allowed=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.costumes_allowed.push(r.int32())}else m.costumes_allowed.push(r.int32());break;default:r.skipType(t&7);break}}return m};BelugaPokemonWhitelist.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.BelugaPokemonWhitelist)return d;var m=new $root.POGOProtos.Settings.Master.BelugaPokemonWhitelist;if(d.max_allowed_pokemon_pokedex_number!=null){m.max_allowed_pokemon_pokedex_number=d.max_allowed_pokemon_pokedex_number|0}if(d.additional_pokemon_allowed){if(!Array.isArray(d.additional_pokemon_allowed))throw TypeError(".POGOProtos.Settings.Master.BelugaPokemonWhitelist.additional_pokemon_allowed: array expected");m.additional_pokemon_allowed=[];for(var i=0;i<d.additional_pokemon_allowed.length;++i){switch(d.additional_pokemon_allowed[i]){default:case"MISSINGNO":case 0:m.additional_pokemon_allowed[i]=0;break;case"BULBASAUR":case 1:m.additional_pokemon_allowed[i]=1;break;case"IVYSAUR":case 2:m.additional_pokemon_allowed[i]=2;break;case"VENUSAUR":case 3:m.additional_pokemon_allowed[i]=3;break;case"CHARMANDER":case 4:m.additional_pokemon_allowed[i]=4;break;case"CHARMELEON":case 5:m.additional_pokemon_allowed[i]=5;break;case"CHARIZARD":case 6:m.additional_pokemon_allowed[i]=6;break;case"SQUIRTLE":case 7:m.additional_pokemon_allowed[i]=7;break;case"WARTORTLE":case 8:m.additional_pokemon_allowed[i]=8;break;case"BLASTOISE":case 9:m.additional_pokemon_allowed[i]=9;break;case"CATERPIE":case 10:m.additional_pokemon_allowed[i]=10;break;case"METAPOD":case 11:m.additional_pokemon_allowed[i]=11;break;case"BUTTERFREE":case 12:m.additional_pokemon_allowed[i]=12;break;case"WEEDLE":case 13:m.additional_pokemon_allowed[i]=13;break;case"KAKUNA":case 14:m.additional_pokemon_allowed[i]=14;break;case"BEEDRILL":case 15:m.additional_pokemon_allowed[i]=15;break;case"PIDGEY":case 16:m.additional_pokemon_allowed[i]=16;break;case"PIDGEOTTO":case 17:m.additional_pokemon_allowed[i]=17;break;case"PIDGEOT":case 18:m.additional_pokemon_allowed[i]=18;break;case"RATTATA":case 19:m.additional_pokemon_allowed[i]=19;break;case"RATICATE":case 20:m.additional_pokemon_allowed[i]=20;break;case"SPEAROW":case 21:m.additional_pokemon_allowed[i]=21;break;case"FEAROW":case 22:m.additional_pokemon_allowed[i]=22;break;case"EKANS":case 23:m.additional_pokemon_allowed[i]=23;break;case"ARBOK":case 24:m.additional_pokemon_allowed[i]=24;break;case"PIKACHU":case 25:m.additional_pokemon_allowed[i]=25;break;case"RAICHU":case 26:m.additional_pokemon_allowed[i]=26;break;case"SANDSHREW":case 27:m.additional_pokemon_allowed[i]=27;break;case"SANDSLASH":case 28:m.additional_pokemon_allowed[i]=28;break;case"NIDORAN_FEMALE":case 29:m.additional_pokemon_allowed[i]=29;break;case"NIDORINA":case 30:m.additional_pokemon_allowed[i]=30;break;case"NIDOQUEEN":case 31:m.additional_pokemon_allowed[i]=31;break;case"NIDORAN_MALE":case 32:m.additional_pokemon_allowed[i]=32;break;case"NIDORINO":case 33:m.additional_pokemon_allowed[i]=33;break;case"NIDOKING":case 34:m.additional_pokemon_allowed[i]=34;break;case"CLEFAIRY":case 35:m.additional_pokemon_allowed[i]=35;break;case"CLEFABLE":case 36:m.additional_pokemon_allowed[i]=36;break;case"VULPIX":case 37:m.additional_pokemon_allowed[i]=37;break;case"NINETALES":case 38:m.additional_pokemon_allowed[i]=38;break;case"JIGGLYPUFF":case 39:m.additional_pokemon_allowed[i]=39;break;case"WIGGLYTUFF":case 40:m.additional_pokemon_allowed[i]=40;break;case"ZUBAT":case 41:m.additional_pokemon_allowed[i]=41;break;case"GOLBAT":case 42:m.additional_pokemon_allowed[i]=42;break;case"ODDISH":case 43:m.additional_pokemon_allowed[i]=43;break;case"GLOOM":case 44:m.additional_pokemon_allowed[i]=44;break;case"VILEPLUME":case 45:m.additional_pokemon_allowed[i]=45;break;case"PARAS":case 46:m.additional_pokemon_allowed[i]=46;break;case"PARASECT":case 47:m.additional_pokemon_allowed[i]=47;break;case"VENONAT":case 48:m.additional_pokemon_allowed[i]=48;break;case"VENOMOTH":case 49:m.additional_pokemon_allowed[i]=49;break;case"DIGLETT":case 50:m.additional_pokemon_allowed[i]=50;break;case"DUGTRIO":case 51:m.additional_pokemon_allowed[i]=51;break;case"MEOWTH":case 52:m.additional_pokemon_allowed[i]=52;break;case"PERSIAN":case 53:m.additional_pokemon_allowed[i]=53;break;case"PSYDUCK":case 54:m.additional_pokemon_allowed[i]=54;break;case"GOLDUCK":case 55:m.additional_pokemon_allowed[i]=55;break;case"MANKEY":case 56:m.additional_pokemon_allowed[i]=56;break;case"PRIMEAPE":case 57:m.additional_pokemon_allowed[i]=57;break;case"GROWLITHE":case 58:m.additional_pokemon_allowed[i]=58;break;case"ARCANINE":case 59:m.additional_pokemon_allowed[i]=59;break;case"POLIWAG":case 60:m.additional_pokemon_allowed[i]=60;break;case"POLIWHIRL":case 61:m.additional_pokemon_allowed[i]=61;break;case"POLIWRATH":case 62:m.additional_pokemon_allowed[i]=62;break;case"ABRA":case 63:m.additional_pokemon_allowed[i]=63;break;case"KADABRA":case 64:m.additional_pokemon_allowed[i]=64;break;case"ALAKAZAM":case 65:m.additional_pokemon_allowed[i]=65;break;case"MACHOP":case 66:m.additional_pokemon_allowed[i]=66;break;case"MACHOKE":case 67:m.additional_pokemon_allowed[i]=67;break;case"MACHAMP":case 68:m.additional_pokemon_allowed[i]=68;break;case"BELLSPROUT":case 69:m.additional_pokemon_allowed[i]=69;break;case"WEEPINBELL":case 70:m.additional_pokemon_allowed[i]=70;break;case"VICTREEBEL":case 71:m.additional_pokemon_allowed[i]=71;break;case"TENTACOOL":case 72:m.additional_pokemon_allowed[i]=72;break;case"TENTACRUEL":case 73:m.additional_pokemon_allowed[i]=73;break;case"GEODUDE":case 74:m.additional_pokemon_allowed[i]=74;break;case"GRAVELER":case 75:m.additional_pokemon_allowed[i]=75;break;case"GOLEM":case 76:m.additional_pokemon_allowed[i]=76;break;case"PONYTA":case 77:m.additional_pokemon_allowed[i]=77;break;case"RAPIDASH":case 78:m.additional_pokemon_allowed[i]=78;break;case"SLOWPOKE":case 79:m.additional_pokemon_allowed[i]=79;break;case"SLOWBRO":case 80:m.additional_pokemon_allowed[i]=80;break;case"MAGNEMITE":case 81:m.additional_pokemon_allowed[i]=81;break;case"MAGNETON":case 82:m.additional_pokemon_allowed[i]=82;break;case"FARFETCHD":case 83:m.additional_pokemon_allowed[i]=83;break;case"DODUO":case 84:m.additional_pokemon_allowed[i]=84;break;case"DODRIO":case 85:m.additional_pokemon_allowed[i]=85;break;case"SEEL":case 86:m.additional_pokemon_allowed[i]=86;break;case"DEWGONG":case 87:m.additional_pokemon_allowed[i]=87;break;case"GRIMER":case 88:m.additional_pokemon_allowed[i]=88;break;case"MUK":case 89:m.additional_pokemon_allowed[i]=89;break;case"SHELLDER":case 90:m.additional_pokemon_allowed[i]=90;break;case"CLOYSTER":case 91:m.additional_pokemon_allowed[i]=91;break;case"GASTLY":case 92:m.additional_pokemon_allowed[i]=92;break;case"HAUNTER":case 93:m.additional_pokemon_allowed[i]=93;break;case"GENGAR":case 94:m.additional_pokemon_allowed[i]=94;break;case"ONIX":case 95:m.additional_pokemon_allowed[i]=95;break;case"DROWZEE":case 96:m.additional_pokemon_allowed[i]=96;break;case"HYPNO":case 97:m.additional_pokemon_allowed[i]=97;break;case"KRABBY":case 98:m.additional_pokemon_allowed[i]=98;break;case"KINGLER":case 99:m.additional_pokemon_allowed[i]=99;break;case"VOLTORB":case 100:m.additional_pokemon_allowed[i]=100;break;case"ELECTRODE":case 101:m.additional_pokemon_allowed[i]=101;break;case"EXEGGCUTE":case 102:m.additional_pokemon_allowed[i]=102;break;case"EXEGGUTOR":case 103:m.additional_pokemon_allowed[i]=103;break;case"CUBONE":case 104:m.additional_pokemon_allowed[i]=104;break;case"MAROWAK":case 105:m.additional_pokemon_allowed[i]=105;break;case"HITMONLEE":case 106:m.additional_pokemon_allowed[i]=106;break;case"HITMONCHAN":case 107:m.additional_pokemon_allowed[i]=107;break;case"LICKITUNG":case 108:m.additional_pokemon_allowed[i]=108;break;case"KOFFING":case 109:m.additional_pokemon_allowed[i]=109;break;case"WEEZING":case 110:m.additional_pokemon_allowed[i]=110;break;case"RHYHORN":case 111:m.additional_pokemon_allowed[i]=111;break;case"RHYDON":case 112:m.additional_pokemon_allowed[i]=112;break;case"CHANSEY":case 113:m.additional_pokemon_allowed[i]=113;break;case"TANGELA":case 114:m.additional_pokemon_allowed[i]=114;break;case"KANGASKHAN":case 115:m.additional_pokemon_allowed[i]=115;break;case"HORSEA":case 116:m.additional_pokemon_allowed[i]=116;break;case"SEADRA":case 117:m.additional_pokemon_allowed[i]=117;break;case"GOLDEEN":case 118:m.additional_pokemon_allowed[i]=118;break;case"SEAKING":case 119:m.additional_pokemon_allowed[i]=119;break;case"STARYU":case 120:m.additional_pokemon_allowed[i]=120;break;case"STARMIE":case 121:m.additional_pokemon_allowed[i]=121;break;case"MR_MIME":case 122:m.additional_pokemon_allowed[i]=122;break;case"SCYTHER":case 123:m.additional_pokemon_allowed[i]=123;break;case"JYNX":case 124:m.additional_pokemon_allowed[i]=124;break;case"ELECTABUZZ":case 125:m.additional_pokemon_allowed[i]=125;break;case"MAGMAR":case 126:m.additional_pokemon_allowed[i]=126;break;case"PINSIR":case 127:m.additional_pokemon_allowed[i]=127;break;case"TAUROS":case 128:m.additional_pokemon_allowed[i]=128;break;case"MAGIKARP":case 129:m.additional_pokemon_allowed[i]=129;break;case"GYARADOS":case 130:m.additional_pokemon_allowed[i]=130;break;case"LAPRAS":case 131:m.additional_pokemon_allowed[i]=131;break;case"DITTO":case 132:m.additional_pokemon_allowed[i]=132;break;case"EEVEE":case 133:m.additional_pokemon_allowed[i]=133;break;case"VAPOREON":case 134:m.additional_pokemon_allowed[i]=134;break;case"JOLTEON":case 135:m.additional_pokemon_allowed[i]=135;break;case"FLAREON":case 136:m.additional_pokemon_allowed[i]=136;break;case"PORYGON":case 137:m.additional_pokemon_allowed[i]=137;break;case"OMANYTE":case 138:m.additional_pokemon_allowed[i]=138;break;case"OMASTAR":case 139:m.additional_pokemon_allowed[i]=139;break;case"KABUTO":case 140:m.additional_pokemon_allowed[i]=140;break;case"KABUTOPS":case 141:m.additional_pokemon_allowed[i]=141;break;case"AERODACTYL":case 142:m.additional_pokemon_allowed[i]=142;break;case"SNORLAX":case 143:m.additional_pokemon_allowed[i]=143;break;case"ARTICUNO":case 144:m.additional_pokemon_allowed[i]=144;break;case"ZAPDOS":case 145:m.additional_pokemon_allowed[i]=145;break;case"MOLTRES":case 146:m.additional_pokemon_allowed[i]=146;break;case"DRATINI":case 147:m.additional_pokemon_allowed[i]=147;break;case"DRAGONAIR":case 148:m.additional_pokemon_allowed[i]=148;break;case"DRAGONITE":case 149:m.additional_pokemon_allowed[i]=149;break;case"MEWTWO":case 150:m.additional_pokemon_allowed[i]=150;break;case"MEW":case 151:m.additional_pokemon_allowed[i]=151;break;case"CHIKORITA":case 152:m.additional_pokemon_allowed[i]=152;break;case"BAYLEEF":case 153:m.additional_pokemon_allowed[i]=153;break;case"MEGANIUM":case 154:m.additional_pokemon_allowed[i]=154;break;case"CYNDAQUIL":case 155:m.additional_pokemon_allowed[i]=155;break;case"QUILAVA":case 156:m.additional_pokemon_allowed[i]=156;break;case"TYPHLOSION":case 157:m.additional_pokemon_allowed[i]=157;break;case"TOTODILE":case 158:m.additional_pokemon_allowed[i]=158;break;case"CROCONAW":case 159:m.additional_pokemon_allowed[i]=159;break;case"FERALIGATR":case 160:m.additional_pokemon_allowed[i]=160;break;case"SENTRET":case 161:m.additional_pokemon_allowed[i]=161;break;case"FURRET":case 162:m.additional_pokemon_allowed[i]=162;break;case"HOOTHOOT":case 163:m.additional_pokemon_allowed[i]=163;break;case"NOCTOWL":case 164:m.additional_pokemon_allowed[i]=164;break;case"LEDYBA":case 165:m.additional_pokemon_allowed[i]=165;break;case"LEDIAN":case 166:m.additional_pokemon_allowed[i]=166;break;case"SPINARAK":case 167:m.additional_pokemon_allowed[i]=167;break;case"ARIADOS":case 168:m.additional_pokemon_allowed[i]=168;break;case"CROBAT":case 169:m.additional_pokemon_allowed[i]=169;break;case"CHINCHOU":case 170:m.additional_pokemon_allowed[i]=170;break;case"LANTURN":case 171:m.additional_pokemon_allowed[i]=171;break;case"PICHU":case 172:m.additional_pokemon_allowed[i]=172;break;case"CLEFFA":case 173:m.additional_pokemon_allowed[i]=173;break;case"IGGLYBUFF":case 174:m.additional_pokemon_allowed[i]=174;break;case"TOGEPI":case 175:m.additional_pokemon_allowed[i]=175;break;case"TOGETIC":case 176:m.additional_pokemon_allowed[i]=176;break;case"NATU":case 177:m.additional_pokemon_allowed[i]=177;break;case"XATU":case 178:m.additional_pokemon_allowed[i]=178;break;case"MAREEP":case 179:m.additional_pokemon_allowed[i]=179;break;case"FLAAFFY":case 180:m.additional_pokemon_allowed[i]=180;break;case"AMPHAROS":case 181:m.additional_pokemon_allowed[i]=181;break;case"BELLOSSOM":case 182:m.additional_pokemon_allowed[i]=182;break;case"MARILL":case 183:m.additional_pokemon_allowed[i]=183;break;case"AZUMARILL":case 184:m.additional_pokemon_allowed[i]=184;break;case"SUDOWOODO":case 185:m.additional_pokemon_allowed[i]=185;break;case"POLITOED":case 186:m.additional_pokemon_allowed[i]=186;break;case"HOPPIP":case 187:m.additional_pokemon_allowed[i]=187;break;case"SKIPLOOM":case 188:m.additional_pokemon_allowed[i]=188;break;case"JUMPLUFF":case 189:m.additional_pokemon_allowed[i]=189;break;case"AIPOM":case 190:m.additional_pokemon_allowed[i]=190;break;case"SUNKERN":case 191:m.additional_pokemon_allowed[i]=191;break;case"SUNFLORA":case 192:m.additional_pokemon_allowed[i]=192;break;case"YANMA":case 193:m.additional_pokemon_allowed[i]=193;break;case"WOOPER":case 194:m.additional_pokemon_allowed[i]=194;break;case"QUAGSIRE":case 195:m.additional_pokemon_allowed[i]=195;break;case"ESPEON":case 196:m.additional_pokemon_allowed[i]=196;break;case"UMBREON":case 197:m.additional_pokemon_allowed[i]=197;break;case"MURKROW":case 198:m.additional_pokemon_allowed[i]=198;break;case"SLOWKING":case 199:m.additional_pokemon_allowed[i]=199;break;case"MISDREAVUS":case 200:m.additional_pokemon_allowed[i]=200;break;case"UNOWN":case 201:m.additional_pokemon_allowed[i]=201;break;case"WOBBUFFET":case 202:m.additional_pokemon_allowed[i]=202;break;case"GIRAFARIG":case 203:m.additional_pokemon_allowed[i]=203;break;case"PINECO":case 204:m.additional_pokemon_allowed[i]=204;break;case"FORRETRESS":case 205:m.additional_pokemon_allowed[i]=205;break;case"DUNSPARCE":case 206:m.additional_pokemon_allowed[i]=206;break;case"GLIGAR":case 207:m.additional_pokemon_allowed[i]=207;break;case"STEELIX":case 208:m.additional_pokemon_allowed[i]=208;break;case"SNUBBULL":case 209:m.additional_pokemon_allowed[i]=209;break;case"GRANBULL":case 210:m.additional_pokemon_allowed[i]=210;break;case"QWILFISH":case 211:m.additional_pokemon_allowed[i]=211;break;case"SCIZOR":case 212:m.additional_pokemon_allowed[i]=212;break;case"SHUCKLE":case 213:m.additional_pokemon_allowed[i]=213;break;case"HERACROSS":case 214:m.additional_pokemon_allowed[i]=214;break;case"SNEASEL":case 215:m.additional_pokemon_allowed[i]=215;break;case"TEDDIURSA":case 216:m.additional_pokemon_allowed[i]=216;break;case"URSARING":case 217:m.additional_pokemon_allowed[i]=217;break;case"SLUGMA":case 218:m.additional_pokemon_allowed[i]=218;break;case"MAGCARGO":case 219:m.additional_pokemon_allowed[i]=219;break;case"SWINUB":case 220:m.additional_pokemon_allowed[i]=220;break;case"PILOSWINE":case 221:m.additional_pokemon_allowed[i]=221;break;case"CORSOLA":case 222:m.additional_pokemon_allowed[i]=222;break;case"REMORAID":case 223:m.additional_pokemon_allowed[i]=223;break;case"OCTILLERY":case 224:m.additional_pokemon_allowed[i]=224;break;case"DELIBIRD":case 225:m.additional_pokemon_allowed[i]=225;break;case"MANTINE":case 226:m.additional_pokemon_allowed[i]=226;break;case"SKARMORY":case 227:m.additional_pokemon_allowed[i]=227;break;case"HOUNDOUR":case 228:m.additional_pokemon_allowed[i]=228;break;case"HOUNDOOM":case 229:m.additional_pokemon_allowed[i]=229;break;case"KINGDRA":case 230:m.additional_pokemon_allowed[i]=230;break;case"PHANPY":case 231:m.additional_pokemon_allowed[i]=231;break;case"DONPHAN":case 232:m.additional_pokemon_allowed[i]=232;break;case"PORYGON2":case 233:m.additional_pokemon_allowed[i]=233;break;case"STANTLER":case 234:m.additional_pokemon_allowed[i]=234;break;case"SMEARGLE":case 235:m.additional_pokemon_allowed[i]=235;break;case"TYROGUE":case 236:m.additional_pokemon_allowed[i]=236;break;case"HITMONTOP":case 237:m.additional_pokemon_allowed[i]=237;break;case"SMOOCHUM":case 238:m.additional_pokemon_allowed[i]=238;break;case"ELEKID":case 239:m.additional_pokemon_allowed[i]=239;break;case"MAGBY":case 240:m.additional_pokemon_allowed[i]=240;break;case"MILTANK":case 241:m.additional_pokemon_allowed[i]=241;break;case"BLISSEY":case 242:m.additional_pokemon_allowed[i]=242;break;case"RAIKOU":case 243:m.additional_pokemon_allowed[i]=243;break;case"ENTEI":case 244:m.additional_pokemon_allowed[i]=244;break;case"SUICUNE":case 245:m.additional_pokemon_allowed[i]=245;break;case"LARVITAR":case 246:m.additional_pokemon_allowed[i]=246;break;case"PUPITAR":case 247:m.additional_pokemon_allowed[i]=247;break;case"TYRANITAR":case 248:m.additional_pokemon_allowed[i]=248;break;case"LUGIA":case 249:m.additional_pokemon_allowed[i]=249;break;case"HO_OH":case 250:m.additional_pokemon_allowed[i]=250;break;case"CELEBI":case 251:m.additional_pokemon_allowed[i]=251;break;case"TREECKO":case 252:m.additional_pokemon_allowed[i]=252;break;case"GROVYLE":case 253:m.additional_pokemon_allowed[i]=253;break;case"SCEPTILE":case 254:m.additional_pokemon_allowed[i]=254;break;case"TORCHIC":case 255:m.additional_pokemon_allowed[i]=255;break;case"COMBUSKEN":case 256:m.additional_pokemon_allowed[i]=256;break;case"BLAZIKEN":case 257:m.additional_pokemon_allowed[i]=257;break;case"MUDKIP":case 258:m.additional_pokemon_allowed[i]=258;break;case"MARSHTOMP":case 259:m.additional_pokemon_allowed[i]=259;break;case"SWAMPERT":case 260:m.additional_pokemon_allowed[i]=260;break;case"POOCHYENA":case 261:m.additional_pokemon_allowed[i]=261;break;case"MIGHTYENA":case 262:m.additional_pokemon_allowed[i]=262;break;case"ZIGZAGOON":case 263:m.additional_pokemon_allowed[i]=263;break;case"LINOONE":case 264:m.additional_pokemon_allowed[i]=264;break;case"WURMPLE":case 265:m.additional_pokemon_allowed[i]=265;break;case"SILCOON":case 266:m.additional_pokemon_allowed[i]=266;break;case"BEAUTIFLY":case 267:m.additional_pokemon_allowed[i]=267;break;case"CASCOON":case 268:m.additional_pokemon_allowed[i]=268;break;case"DUSTOX":case 269:m.additional_pokemon_allowed[i]=269;break;case"LOTAD":case 270:m.additional_pokemon_allowed[i]=270;break;case"LOMBRE":case 271:m.additional_pokemon_allowed[i]=271;break;case"LUDICOLO":case 272:m.additional_pokemon_allowed[i]=272;break;case"SEEDOT":case 273:m.additional_pokemon_allowed[i]=273;break;case"NUZLEAF":case 274:m.additional_pokemon_allowed[i]=274;break;case"SHIFTRY":case 275:m.additional_pokemon_allowed[i]=275;break;case"TAILLOW":case 276:m.additional_pokemon_allowed[i]=276;break;case"SWELLOW":case 277:m.additional_pokemon_allowed[i]=277;break;case"WINGULL":case 278:m.additional_pokemon_allowed[i]=278;break;case"PELIPPER":case 279:m.additional_pokemon_allowed[i]=279;break;case"RALTS":case 280:m.additional_pokemon_allowed[i]=280;break;case"KIRLIA":case 281:m.additional_pokemon_allowed[i]=281;break;case"GARDEVOIR":case 282:m.additional_pokemon_allowed[i]=282;break;case"SURSKIT":case 283:m.additional_pokemon_allowed[i]=283;break;case"MASQUERAIN":case 284:m.additional_pokemon_allowed[i]=284;break;case"SHROOMISH":case 285:m.additional_pokemon_allowed[i]=285;break;case"BRELOOM":case 286:m.additional_pokemon_allowed[i]=286;break;case"SLAKOTH":case 287:m.additional_pokemon_allowed[i]=287;break;case"VIGOROTH":case 288:m.additional_pokemon_allowed[i]=288;break;case"SLAKING":case 289:m.additional_pokemon_allowed[i]=289;break;case"NINCADA":case 290:m.additional_pokemon_allowed[i]=290;break;case"NINJASK":case 291:m.additional_pokemon_allowed[i]=291;break;case"SHEDINJA":case 292:m.additional_pokemon_allowed[i]=292;break;case"WHISMUR":case 293:m.additional_pokemon_allowed[i]=293;break;case"LOUDRED":case 294:m.additional_pokemon_allowed[i]=294;break;case"EXPLOUD":case 295:m.additional_pokemon_allowed[i]=295;break;case"MAKUHITA":case 296:m.additional_pokemon_allowed[i]=296;break;case"HARIYAMA":case 297:m.additional_pokemon_allowed[i]=297;break;case"AZURILL":case 298:m.additional_pokemon_allowed[i]=298;break;case"NOSEPASS":case 299:m.additional_pokemon_allowed[i]=299;break;case"SKITTY":case 300:m.additional_pokemon_allowed[i]=300;break;case"DELCATTY":case 301:m.additional_pokemon_allowed[i]=301;break;case"SABLEYE":case 302:m.additional_pokemon_allowed[i]=302;break;case"MAWILE":case 303:m.additional_pokemon_allowed[i]=303;break;case"ARON":case 304:m.additional_pokemon_allowed[i]=304;break;case"LAIRON":case 305:m.additional_pokemon_allowed[i]=305;break;case"AGGRON":case 306:m.additional_pokemon_allowed[i]=306;break;case"MEDITITE":case 307:m.additional_pokemon_allowed[i]=307;break;case"MEDICHAM":case 308:m.additional_pokemon_allowed[i]=308;break;case"ELECTRIKE":case 309:m.additional_pokemon_allowed[i]=309;break;case"MANECTRIC":case 310:m.additional_pokemon_allowed[i]=310;break;case"PLUSLE":case 311:m.additional_pokemon_allowed[i]=311;break;case"MINUN":case 312:m.additional_pokemon_allowed[i]=312;break;case"VOLBEAT":case 313:m.additional_pokemon_allowed[i]=313;break;case"ILLUMISE":case 314:m.additional_pokemon_allowed[i]=314;break;case"ROSELIA":case 315:m.additional_pokemon_allowed[i]=315;break;case"GULPIN":case 316:m.additional_pokemon_allowed[i]=316;break;case"SWALOT":case 317:m.additional_pokemon_allowed[i]=317;break;case"CARVANHA":case 318:m.additional_pokemon_allowed[i]=318;break;case"SHARPEDO":case 319:m.additional_pokemon_allowed[i]=319;break;case"WAILMER":case 320:m.additional_pokemon_allowed[i]=320;break;case"WAILORD":case 321:m.additional_pokemon_allowed[i]=321;break;case"NUMEL":case 322:m.additional_pokemon_allowed[i]=322;break;case"CAMERUPT":case 323:m.additional_pokemon_allowed[i]=323;break;case"TORKOAL":case 324:m.additional_pokemon_allowed[i]=324;break;case"SPOINK":case 325:m.additional_pokemon_allowed[i]=325;break;case"GRUMPIG":case 326:m.additional_pokemon_allowed[i]=326;break;case"SPINDA":case 327:m.additional_pokemon_allowed[i]=327;break;case"TRAPINCH":case 328:m.additional_pokemon_allowed[i]=328;break;case"VIBRAVA":case 329:m.additional_pokemon_allowed[i]=329;break;case"FLYGON":case 330:m.additional_pokemon_allowed[i]=330;break;case"CACNEA":case 331:m.additional_pokemon_allowed[i]=331;break;case"CACTURNE":case 332:m.additional_pokemon_allowed[i]=332;break;case"SWABLU":case 333:m.additional_pokemon_allowed[i]=333;break;case"ALTARIA":case 334:m.additional_pokemon_allowed[i]=334;break;case"ZANGOOSE":case 335:m.additional_pokemon_allowed[i]=335;break;case"SEVIPER":case 336:m.additional_pokemon_allowed[i]=336;break;case"LUNATONE":case 337:m.additional_pokemon_allowed[i]=337;break;case"SOLROCK":case 338:m.additional_pokemon_allowed[i]=338;break;case"BARBOACH":case 339:m.additional_pokemon_allowed[i]=339;break;case"WHISCASH":case 340:m.additional_pokemon_allowed[i]=340;break;case"CORPHISH":case 341:m.additional_pokemon_allowed[i]=341;break;case"CRAWDAUNT":case 342:m.additional_pokemon_allowed[i]=342;break;case"BALTOY":case 343:m.additional_pokemon_allowed[i]=343;break;case"CLAYDOL":case 344:m.additional_pokemon_allowed[i]=344;break;case"LILEEP":case 345:m.additional_pokemon_allowed[i]=345;break;case"CRADILY":case 346:m.additional_pokemon_allowed[i]=346;break;case"ANORITH":case 347:m.additional_pokemon_allowed[i]=347;break;case"ARMALDO":case 348:m.additional_pokemon_allowed[i]=348;break;case"FEEBAS":case 349:m.additional_pokemon_allowed[i]=349;break;case"MILOTIC":case 350:m.additional_pokemon_allowed[i]=350;break;case"CASTFORM":case 351:m.additional_pokemon_allowed[i]=351;break;case"KECLEON":case 352:m.additional_pokemon_allowed[i]=352;break;case"SHUPPET":case 353:m.additional_pokemon_allowed[i]=353;break;case"BANETTE":case 354:m.additional_pokemon_allowed[i]=354;break;case"DUSKULL":case 355:m.additional_pokemon_allowed[i]=355;break;case"DUSCLOPS":case 356:m.additional_pokemon_allowed[i]=356;break;case"TROPIUS":case 357:m.additional_pokemon_allowed[i]=357;break;case"CHIMECHO":case 358:m.additional_pokemon_allowed[i]=358;break;case"ABSOL":case 359:m.additional_pokemon_allowed[i]=359;break;case"WYNAUT":case 360:m.additional_pokemon_allowed[i]=360;break;case"SNORUNT":case 361:m.additional_pokemon_allowed[i]=361;break;case"GLALIE":case 362:m.additional_pokemon_allowed[i]=362;break;case"SPHEAL":case 363:m.additional_pokemon_allowed[i]=363;break;case"SEALEO":case 364:m.additional_pokemon_allowed[i]=364;break;case"WALREIN":case 365:m.additional_pokemon_allowed[i]=365;break;case"CLAMPERL":case 366:m.additional_pokemon_allowed[i]=366;break;case"HUNTAIL":case 367:m.additional_pokemon_allowed[i]=367;break;case"GOREBYSS":case 368:m.additional_pokemon_allowed[i]=368;break;case"RELICANTH":case 369:m.additional_pokemon_allowed[i]=369;break;case"LUVDISC":case 370:m.additional_pokemon_allowed[i]=370;break;case"BAGON":case 371:m.additional_pokemon_allowed[i]=371;break;case"SHELGON":case 372:m.additional_pokemon_allowed[i]=372;break;case"SALAMENCE":case 373:m.additional_pokemon_allowed[i]=373;break;case"BELDUM":case 374:m.additional_pokemon_allowed[i]=374;break;case"METANG":case 375:m.additional_pokemon_allowed[i]=375;break;case"METAGROSS":case 376:m.additional_pokemon_allowed[i]=376;break;case"REGIROCK":case 377:m.additional_pokemon_allowed[i]=377;break;case"REGICE":case 378:m.additional_pokemon_allowed[i]=378;break;case"REGISTEEL":case 379:m.additional_pokemon_allowed[i]=379;break;case"LATIAS":case 380:m.additional_pokemon_allowed[i]=380;break;case"LATIOS":case 381:m.additional_pokemon_allowed[i]=381;break;case"KYOGRE":case 382:m.additional_pokemon_allowed[i]=382;break;case"GROUDON":case 383:m.additional_pokemon_allowed[i]=383;break;case"RAYQUAZA":case 384:m.additional_pokemon_allowed[i]=384;break;case"JIRACHI":case 385:m.additional_pokemon_allowed[i]=385;break;case"DEOXYS":case 386:m.additional_pokemon_allowed[i]=386;break;case"TURTWIG":case 387:m.additional_pokemon_allowed[i]=387;break;case"GROTLE":case 388:m.additional_pokemon_allowed[i]=388;break;case"TORTERRA":case 389:m.additional_pokemon_allowed[i]=389;break;case"CHIMCHAR":case 390:m.additional_pokemon_allowed[i]=390;break;case"MONFERNO":case 391:m.additional_pokemon_allowed[i]=391;break;case"INFERNAPE":case 392:m.additional_pokemon_allowed[i]=392;break;case"PIPLUP":case 393:m.additional_pokemon_allowed[i]=393;break;case"PRINPLUP":case 394:m.additional_pokemon_allowed[i]=394;break;case"EMPOLEON":case 395:m.additional_pokemon_allowed[i]=395;break;case"STARLY":case 396:m.additional_pokemon_allowed[i]=396;break;case"STARAVIA":case 397:m.additional_pokemon_allowed[i]=397;break;case"STARAPTOR":case 398:m.additional_pokemon_allowed[i]=398;break;case"BIDOOF":case 399:m.additional_pokemon_allowed[i]=399;break;case"BIBAREL":case 400:m.additional_pokemon_allowed[i]=400;break;case"KRICKETOT":case 401:m.additional_pokemon_allowed[i]=401;break;case"KRICKETUNE":case 402:m.additional_pokemon_allowed[i]=402;break;case"SHINX":case 403:m.additional_pokemon_allowed[i]=403;break;case"LUXIO":case 404:m.additional_pokemon_allowed[i]=404;break;case"LUXRAY":case 405:m.additional_pokemon_allowed[i]=405;break;case"BUDEW":case 406:m.additional_pokemon_allowed[i]=406;break;case"ROSERADE":case 407:m.additional_pokemon_allowed[i]=407;break;case"CRANIDOS":case 408:m.additional_pokemon_allowed[i]=408;break;case"RAMPARDOS":case 409:m.additional_pokemon_allowed[i]=409;break;case"SHIELDON":case 410:m.additional_pokemon_allowed[i]=410;break;case"BASTIODON":case 411:m.additional_pokemon_allowed[i]=411;break;case"BURMY":case 412:m.additional_pokemon_allowed[i]=412;break;case"WORMADAM":case 413:m.additional_pokemon_allowed[i]=413;break;case"MOTHIM":case 414:m.additional_pokemon_allowed[i]=414;break;case"COMBEE":case 415:m.additional_pokemon_allowed[i]=415;break;case"VESPIQUEN":case 416:m.additional_pokemon_allowed[i]=416;break;case"PACHIRISU":case 417:m.additional_pokemon_allowed[i]=417;break;case"BUIZEL":case 418:m.additional_pokemon_allowed[i]=418;break;case"FLOATZEL":case 419:m.additional_pokemon_allowed[i]=419;break;case"CHERUBI":case 420:m.additional_pokemon_allowed[i]=420;break;case"CHERRIM":case 421:m.additional_pokemon_allowed[i]=421;break;case"SHELLOS":case 422:m.additional_pokemon_allowed[i]=422;break;case"GASTRODON":case 423:m.additional_pokemon_allowed[i]=423;break;case"AMBIPOM":case 424:m.additional_pokemon_allowed[i]=424;break;case"DRIFLOON":case 425:m.additional_pokemon_allowed[i]=425;break;case"DRIFBLIM":case 426:m.additional_pokemon_allowed[i]=426;break;case"BUNEARY":case 427:m.additional_pokemon_allowed[i]=427;break;case"LOPUNNY":case 428:m.additional_pokemon_allowed[i]=428;break;case"MISMAGIUS":case 429:m.additional_pokemon_allowed[i]=429;break;case"HONCHKROW":case 430:m.additional_pokemon_allowed[i]=430;break;case"GLAMEOW":case 431:m.additional_pokemon_allowed[i]=431;break;case"PURUGLY":case 432:m.additional_pokemon_allowed[i]=432;break;case"CHINGLING":case 433:m.additional_pokemon_allowed[i]=433;break;case"STUNKY":case 434:m.additional_pokemon_allowed[i]=434;break;case"SKUNTANK":case 435:m.additional_pokemon_allowed[i]=435;break;case"BRONZOR":case 436:m.additional_pokemon_allowed[i]=436;break;case"BRONZONG":case 437:m.additional_pokemon_allowed[i]=437;break;case"BONSLY":case 438:m.additional_pokemon_allowed[i]=438;break;case"MIME_JR":case 439:m.additional_pokemon_allowed[i]=439;break;case"HAPPINY":case 440:m.additional_pokemon_allowed[i]=440;break;case"CHATOT":case 441:m.additional_pokemon_allowed[i]=441;break;case"SPIRITOMB":case 442:m.additional_pokemon_allowed[i]=442;break;case"GIBLE":case 443:m.additional_pokemon_allowed[i]=443;break;case"GABITE":case 444:m.additional_pokemon_allowed[i]=444;break;case"GARCHOMP":case 445:m.additional_pokemon_allowed[i]=445;break;case"MUNCHLAX":case 446:m.additional_pokemon_allowed[i]=446;break;case"RIOLU":case 447:m.additional_pokemon_allowed[i]=447;break;case"LUCARIO":case 448:m.additional_pokemon_allowed[i]=448;break;case"HIPPOPOTAS":case 449:m.additional_pokemon_allowed[i]=449;break;case"HIPPOWDON":case 450:m.additional_pokemon_allowed[i]=450;break;case"SKORUPI":case 451:m.additional_pokemon_allowed[i]=451;break;case"DRAPION":case 452:m.additional_pokemon_allowed[i]=452;break;case"CROAGUNK":case 453:m.additional_pokemon_allowed[i]=453;break;case"TOXICROAK":case 454:m.additional_pokemon_allowed[i]=454;break;case"CARNIVINE":case 455:m.additional_pokemon_allowed[i]=455;break;case"FINNEON":case 456:m.additional_pokemon_allowed[i]=456;break;case"LUMINEON":case 457:m.additional_pokemon_allowed[i]=457;break;case"MANTYKE":case 458:m.additional_pokemon_allowed[i]=458;break;case"SNOVER":case 459:m.additional_pokemon_allowed[i]=459;break;case"ABOMASNOW":case 460:m.additional_pokemon_allowed[i]=460;break;case"WEAVILE":case 461:m.additional_pokemon_allowed[i]=461;break;case"MAGNEZONE":case 462:m.additional_pokemon_allowed[i]=462;break;case"LICKILICKY":case 463:m.additional_pokemon_allowed[i]=463;break;case"RHYPERIOR":case 464:m.additional_pokemon_allowed[i]=464;break;case"TANGROWTH":case 465:m.additional_pokemon_allowed[i]=465;break;case"ELECTIVIRE":case 466:m.additional_pokemon_allowed[i]=466;break;case"MAGMORTAR":case 467:m.additional_pokemon_allowed[i]=467;break;case"TOGEKISS":case 468:m.additional_pokemon_allowed[i]=468;break;case"YANMEGA":case 469:m.additional_pokemon_allowed[i]=469;break;case"LEAFEON":case 470:m.additional_pokemon_allowed[i]=470;break;case"GLACEON":case 471:m.additional_pokemon_allowed[i]=471;break;case"GLISCOR":case 472:m.additional_pokemon_allowed[i]=472;break;case"MAMOSWINE":case 473:m.additional_pokemon_allowed[i]=473;break;case"PORYGON_Z":case 474:m.additional_pokemon_allowed[i]=474;break;case"GALLADE":case 475:m.additional_pokemon_allowed[i]=475;break;case"PROBOPASS":case 476:m.additional_pokemon_allowed[i]=476;break;case"DUSKNOIR":case 477:m.additional_pokemon_allowed[i]=477;break;case"FROSLASS":case 478:m.additional_pokemon_allowed[i]=478;break;case"ROTOM":case 479:m.additional_pokemon_allowed[i]=479;break;case"UXIE":case 480:m.additional_pokemon_allowed[i]=480;break;case"MESPRIT":case 481:m.additional_pokemon_allowed[i]=481;break;case"AZELF":case 482:m.additional_pokemon_allowed[i]=482;break;case"DIALGA":case 483:m.additional_pokemon_allowed[i]=483;break;case"PALKIA":case 484:m.additional_pokemon_allowed[i]=484;break;case"HEATRAN":case 485:m.additional_pokemon_allowed[i]=485;break;case"REGIGIGAS":case 486:m.additional_pokemon_allowed[i]=486;break;case"GIRATINA":case 487:m.additional_pokemon_allowed[i]=487;break;case"CRESSELIA":case 488:m.additional_pokemon_allowed[i]=488;break;case"PHIONE":case 489:m.additional_pokemon_allowed[i]=489;break;case"MANAPHY":case 490:m.additional_pokemon_allowed[i]=490;break;case"DARKRAI":case 491:m.additional_pokemon_allowed[i]=491;break;case"SHAYMIN":case 492:m.additional_pokemon_allowed[i]=492;break;case"ARCEUS":case 493:m.additional_pokemon_allowed[i]=493;break;case"MELTAN":case 808:m.additional_pokemon_allowed[i]=808;break;case"MELMETAL":case 809:m.additional_pokemon_allowed[i]=809;break}}}if(d.forms_allowed){if(!Array.isArray(d.forms_allowed))throw TypeError(".POGOProtos.Settings.Master.BelugaPokemonWhitelist.forms_allowed: array expected");m.forms_allowed=[];for(var i=0;i<d.forms_allowed.length;++i){switch(d.forms_allowed[i]){default:case"FORM_UNSET":case 0:m.forms_allowed[i]=0;break;case"UNOWN_A":case 1:m.forms_allowed[i]=1;break;case"UNOWN_B":case 2:m.forms_allowed[i]=2;break;case"UNOWN_C":case 3:m.forms_allowed[i]=3;break;case"UNOWN_D":case 4:m.forms_allowed[i]=4;break;case"UNOWN_E":case 5:m.forms_allowed[i]=5;break;case"UNOWN_F":case 6:m.forms_allowed[i]=6;break;case"UNOWN_G":case 7:m.forms_allowed[i]=7;break;case"UNOWN_H":case 8:m.forms_allowed[i]=8;break;case"UNOWN_I":case 9:m.forms_allowed[i]=9;break;case"UNOWN_J":case 10:m.forms_allowed[i]=10;break;case"UNOWN_K":case 11:m.forms_allowed[i]=11;break;case"UNOWN_L":case 12:m.forms_allowed[i]=12;break;case"UNOWN_M":case 13:m.forms_allowed[i]=13;break;case"UNOWN_N":case 14:m.forms_allowed[i]=14;break;case"UNOWN_O":case 15:m.forms_allowed[i]=15;break;case"UNOWN_P":case 16:m.forms_allowed[i]=16;break;case"UNOWN_Q":case 17:m.forms_allowed[i]=17;break;case"UNOWN_R":case 18:m.forms_allowed[i]=18;break;case"UNOWN_S":case 19:m.forms_allowed[i]=19;break;case"UNOWN_T":case 20:m.forms_allowed[i]=20;break;case"UNOWN_U":case 21:m.forms_allowed[i]=21;break;case"UNOWN_V":case 22:m.forms_allowed[i]=22;break;case"UNOWN_W":case 23:m.forms_allowed[i]=23;break;case"UNOWN_X":case 24:m.forms_allowed[i]=24;break;case"UNOWN_Y":case 25:m.forms_allowed[i]=25;break;case"UNOWN_Z":case 26:m.forms_allowed[i]=26;break;case"UNOWN_EXCLAMATION_POINT":case 27:m.forms_allowed[i]=27;break;case"UNOWN_QUESTION_MARK":case 28:m.forms_allowed[i]=28;break;case"CASTFORM_NORMAL":case 29:m.forms_allowed[i]=29;break;case"CASTFORM_SUNNY":case 30:m.forms_allowed[i]=30;break;case"CASTFORM_RAINY":case 31:m.forms_allowed[i]=31;break;case"CASTFORM_SNOWY":case 32:m.forms_allowed[i]=32;break;case"DEOXYS_NORMAL":case 33:m.forms_allowed[i]=33;break;case"DEOXYS_ATTACK":case 34:m.forms_allowed[i]=34;break;case"DEOXYS_DEFENSE":case 35:m.forms_allowed[i]=35;break;case"DEOXYS_SPEED":case 36:m.forms_allowed[i]=36;break;case"SPINDA_00":case 37:m.forms_allowed[i]=37;break;case"SPINDA_01":case 38:m.forms_allowed[i]=38;break;case"SPINDA_02":case 39:m.forms_allowed[i]=39;break;case"SPINDA_03":case 40:m.forms_allowed[i]=40;break;case"SPINDA_04":case 41:m.forms_allowed[i]=41;break;case"SPINDA_05":case 42:m.forms_allowed[i]=42;break;case"SPINDA_06":case 43:m.forms_allowed[i]=43;break;case"SPINDA_07":case 44:m.forms_allowed[i]=44;break;case"RATTATA_NORMAL":case 45:m.forms_allowed[i]=45;break;case"RATTATA_ALOLA":case 46:m.forms_allowed[i]=46;break;case"RATICATE_NORMAL":case 47:m.forms_allowed[i]=47;break;case"RATICATE_ALOLA":case 48:m.forms_allowed[i]=48;break;case"RAICHU_NORMAL":case 49:m.forms_allowed[i]=49;break;case"RAICHU_ALOLA":case 50:m.forms_allowed[i]=50;break;case"SANDSHREW_NORMAL":case 51:m.forms_allowed[i]=51;break;case"SANDSHREW_ALOLA":case 52:m.forms_allowed[i]=52;break;case"SANDSLASH_NORMAL":case 53:m.forms_allowed[i]=53;break;case"SANDSLASH_ALOLA":case 54:m.forms_allowed[i]=54;break;case"VULPIX_NORMAL":case 55:m.forms_allowed[i]=55;break;case"VULPIX_ALOLA":case 56:m.forms_allowed[i]=56;break;case"NINETALES_NORMAL":case 57:m.forms_allowed[i]=57;break;case"NINETALES_ALOLA":case 58:m.forms_allowed[i]=58;break;case"DIGLETT_NORMAL":case 59:m.forms_allowed[i]=59;break;case"DIGLETT_ALOLA":case 60:m.forms_allowed[i]=60;break;case"DUGTRIO_NORMAL":case 61:m.forms_allowed[i]=61;break;case"DUGTRIO_ALOLA":case 62:m.forms_allowed[i]=62;break;case"MEOWTH_NORMAL":case 63:m.forms_allowed[i]=63;break;case"MEOWTH_ALOLA":case 64:m.forms_allowed[i]=64;break;case"PERSIAN_NORMAL":case 65:m.forms_allowed[i]=65;break;case"PERSIAN_ALOLA":case 66:m.forms_allowed[i]=66;break;case"GEODUDE_NORMAL":case 67:m.forms_allowed[i]=67;break;case"GEODUDE_ALOLA":case 68:m.forms_allowed[i]=68;break;case"GRAVELER_NORMAL":case 69:m.forms_allowed[i]=69;break;case"GRAVELER_ALOLA":case 70:m.forms_allowed[i]=70;break;case"GOLEM_NORMAL":case 71:m.forms_allowed[i]=71;break;case"GOLEM_ALOLA":case 72:m.forms_allowed[i]=72;break;case"GRIMER_NORMAL":case 73:m.forms_allowed[i]=73;break;case"GRIMER_ALOLA":case 74:m.forms_allowed[i]=74;break;case"MUK_NORMAL":case 75:m.forms_allowed[i]=75;break;case"MUK_ALOLA":case 76:m.forms_allowed[i]=76;break;case"EXEGGUTOR_NORMAL":case 77:m.forms_allowed[i]=77;break;case"EXEGGUTOR_ALOLA":case 78:m.forms_allowed[i]=78;break;case"MAROWAK_NORMAL":case 79:m.forms_allowed[i]=79;break;case"MAROWAK_ALOLA":case 80:m.forms_allowed[i]=80;break;case"ROTOM_NORMAL":case 81:m.forms_allowed[i]=81;break;case"ROTOM_FROST":case 82:m.forms_allowed[i]=82;break;case"ROTOM_FAN":case 83:m.forms_allowed[i]=83;break;case"ROTOM_MOW":case 84:m.forms_allowed[i]=84;break;case"ROTOM_WASH":case 85:m.forms_allowed[i]=85;break;case"ROTOM_HEAT":case 86:m.forms_allowed[i]=86;break;case"WORMADAM_PLANT":case 87:m.forms_allowed[i]=87;break;case"WORMADAM_SANDY":case 88:m.forms_allowed[i]=88;break;case"WORMADAM_TRASH":case 89:m.forms_allowed[i]=89;break;case"GIRATINA_ALTERED":case 90:m.forms_allowed[i]=90;break;case"GIRATINA_ORIGIN":case 91:m.forms_allowed[i]=91;break;case"SHAYMIN_SKY":case 92:m.forms_allowed[i]=92;break;case"SHAYMIN_LAND":case 93:m.forms_allowed[i]=93;break;case"CHERRIM_OVERCAST":case 94:m.forms_allowed[i]=94;break;case"CHERRIM_SUNNY":case 95:m.forms_allowed[i]=95;break;case"SHELLOS_WEST_SEA":case 96:m.forms_allowed[i]=96;break;case"SHELLOS_EAST_SEA":case 97:m.forms_allowed[i]=97;break;case"GASTRODON_WEST_SEA":case 98:m.forms_allowed[i]=98;break;case"GASTRODON_EAST_SEA":case 99:m.forms_allowed[i]=99;break;case"ARCEUS_NORMAL":case 100:m.forms_allowed[i]=100;break;case"ARCEUS_FIGHTING":case 101:m.forms_allowed[i]=101;break;case"ARCEUS_FLYING":case 102:m.forms_allowed[i]=102;break;case"ARCEUS_POISON":case 103:m.forms_allowed[i]=103;break;case"ARCEUS_GROUND":case 104:m.forms_allowed[i]=104;break;case"ARCEUS_ROCK":case 105:m.forms_allowed[i]=105;break;case"ARCEUS_BUG":case 106:m.forms_allowed[i]=106;break;case"ARCEUS_GHOST":case 107:m.forms_allowed[i]=107;break;case"ARCEUS_STEEL":case 108:m.forms_allowed[i]=108;break;case"ARCEUS_FIRE":case 109:m.forms_allowed[i]=109;break;case"ARCEUS_WATER":case 110:m.forms_allowed[i]=110;break;case"ARCEUS_GRASS":case 111:m.forms_allowed[i]=111;break;case"ARCEUS_ELECTRIC":case 112:m.forms_allowed[i]=112;break;case"ARCEUS_PSYCHIC":case 113:m.forms_allowed[i]=113;break;case"ARCEUS_ICE":case 114:m.forms_allowed[i]=114;break;case"ARCEUS_DRAGON":case 115:m.forms_allowed[i]=115;break;case"ARCEUS_DARK":case 116:m.forms_allowed[i]=116;break;case"ARCEUS_FAIRY":case 117:m.forms_allowed[i]=117;break;case"BURMY_PLANT":case 118:m.forms_allowed[i]=118;break;case"BURMY_SANDY":case 119:m.forms_allowed[i]=119;break;case"BURMY_TRASH":case 120:m.forms_allowed[i]=120;break}}}if(d.costumes_allowed){if(!Array.isArray(d.costumes_allowed))throw TypeError(".POGOProtos.Settings.Master.BelugaPokemonWhitelist.costumes_allowed: array expected");m.costumes_allowed=[];for(var i=0;i<d.costumes_allowed.length;++i){switch(d.costumes_allowed[i]){default:case"COSTUME_UNSET":case 0:m.costumes_allowed[i]=0;break;case"HOLIDAY_2016":case 1:m.costumes_allowed[i]=1;break;case"ANNIVERSARY":case 2:m.costumes_allowed[i]=2;break;case"ONE_YEAR_ANNIVERSARY":case 3:m.costumes_allowed[i]=3;break;case"HALLOWEEN_2017":case 4:m.costumes_allowed[i]=4;break;case"SUMMER_2018":case 5:m.costumes_allowed[i]=5;break;case"FALL_2018":case 6:m.costumes_allowed[i]=6;break;case"NOVEMBER_2018":case 7:m.costumes_allowed[i]=7;break;case"WINTER_2018":case 8:m.costumes_allowed[i]=8;break}}}return m};BelugaPokemonWhitelist.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.additional_pokemon_allowed=[];d.forms_allowed=[];d.costumes_allowed=[]}if(o.defaults){d.max_allowed_pokemon_pokedex_number=0}if(m.max_allowed_pokemon_pokedex_number!=null&&m.hasOwnProperty("max_allowed_pokemon_pokedex_number")){d.max_allowed_pokemon_pokedex_number=m.max_allowed_pokemon_pokedex_number}if(m.additional_pokemon_allowed&&m.additional_pokemon_allowed.length){d.additional_pokemon_allowed=[];for(var j=0;j<m.additional_pokemon_allowed.length;++j){d.additional_pokemon_allowed[j]=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.additional_pokemon_allowed[j]]:m.additional_pokemon_allowed[j]}}if(m.forms_allowed&&m.forms_allowed.length){d.forms_allowed=[];for(var j=0;j<m.forms_allowed.length;++j){d.forms_allowed[j]=o.enums===String?$root.POGOProtos.Enums.Form[m.forms_allowed[j]]:m.forms_allowed[j]}}if(m.costumes_allowed&&m.costumes_allowed.length){d.costumes_allowed=[];for(var j=0;j<m.costumes_allowed.length;++j){d.costumes_allowed[j]=o.enums===String?$root.POGOProtos.Enums.Costume[m.costumes_allowed[j]]:m.costumes_allowed[j]}}return d};BelugaPokemonWhitelist.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BelugaPokemonWhitelist}();Master.CameraSettings=function(){function CameraSettings(p){this.interpolation=[];this.target_type=[];this.ease_in_speed=[];this.ease_out_speed=[];this.duration_seconds=[];this.wait_seconds=[];this.transition_seconds=[];this.angle_degree=[];this.angle_offset_degree=[];this.pitch_degree=[];this.pitch_offset_degree=[];this.roll_degree=[];this.distance_meters=[];this.height_percent=[];this.vert_ctr_ratio=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CameraSettings.prototype.next_camera="";CameraSettings.prototype.interpolation=$util.emptyArray;CameraSettings.prototype.target_type=$util.emptyArray;CameraSettings.prototype.ease_in_speed=$util.emptyArray;CameraSettings.prototype.ease_out_speed=$util.emptyArray;CameraSettings.prototype.duration_seconds=$util.emptyArray;CameraSettings.prototype.wait_seconds=$util.emptyArray;CameraSettings.prototype.transition_seconds=$util.emptyArray;CameraSettings.prototype.angle_degree=$util.emptyArray;CameraSettings.prototype.angle_offset_degree=$util.emptyArray;CameraSettings.prototype.pitch_degree=$util.emptyArray;CameraSettings.prototype.pitch_offset_degree=$util.emptyArray;CameraSettings.prototype.roll_degree=$util.emptyArray;CameraSettings.prototype.distance_meters=$util.emptyArray;CameraSettings.prototype.height_percent=$util.emptyArray;CameraSettings.prototype.vert_ctr_ratio=$util.emptyArray;CameraSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.next_camera!=null&&m.hasOwnProperty("next_camera"))w.uint32(10).string(m.next_camera);if(m.interpolation!=null&&m.interpolation.length){w.uint32(18).fork();for(var i=0;i<m.interpolation.length;++i)w.int32(m.interpolation[i]);w.ldelim()}if(m.target_type!=null&&m.target_type.length){w.uint32(26).fork();for(var i=0;i<m.target_type.length;++i)w.int32(m.target_type[i]);w.ldelim()}if(m.ease_in_speed!=null&&m.ease_in_speed.length){w.uint32(34).fork();for(var i=0;i<m.ease_in_speed.length;++i)w.float(m.ease_in_speed[i]);w.ldelim()}if(m.ease_out_speed!=null&&m.ease_out_speed.length){w.uint32(42).fork();for(var i=0;i<m.ease_out_speed.length;++i)w.float(m.ease_out_speed[i]);w.ldelim()}if(m.duration_seconds!=null&&m.duration_seconds.length){w.uint32(50).fork();for(var i=0;i<m.duration_seconds.length;++i)w.float(m.duration_seconds[i]);w.ldelim()}if(m.wait_seconds!=null&&m.wait_seconds.length){w.uint32(58).fork();for(var i=0;i<m.wait_seconds.length;++i)w.float(m.wait_seconds[i]);w.ldelim()}if(m.transition_seconds!=null&&m.transition_seconds.length){w.uint32(66).fork();for(var i=0;i<m.transition_seconds.length;++i)w.float(m.transition_seconds[i]);w.ldelim()}if(m.angle_degree!=null&&m.angle_degree.length){w.uint32(74).fork();for(var i=0;i<m.angle_degree.length;++i)w.float(m.angle_degree[i]);w.ldelim()}if(m.angle_offset_degree!=null&&m.angle_offset_degree.length){w.uint32(82).fork();for(var i=0;i<m.angle_offset_degree.length;++i)w.float(m.angle_offset_degree[i]);w.ldelim()}if(m.pitch_degree!=null&&m.pitch_degree.length){w.uint32(90).fork();for(var i=0;i<m.pitch_degree.length;++i)w.float(m.pitch_degree[i]);w.ldelim()}if(m.pitch_offset_degree!=null&&m.pitch_offset_degree.length){w.uint32(98).fork();for(var i=0;i<m.pitch_offset_degree.length;++i)w.float(m.pitch_offset_degree[i]);w.ldelim()}if(m.roll_degree!=null&&m.roll_degree.length){w.uint32(106).fork();for(var i=0;i<m.roll_degree.length;++i)w.float(m.roll_degree[i]);w.ldelim()}if(m.distance_meters!=null&&m.distance_meters.length){w.uint32(114).fork();for(var i=0;i<m.distance_meters.length;++i)w.float(m.distance_meters[i]);w.ldelim()}if(m.height_percent!=null&&m.height_percent.length){w.uint32(122).fork();for(var i=0;i<m.height_percent.length;++i)w.float(m.height_percent[i]);w.ldelim()}if(m.vert_ctr_ratio!=null&&m.vert_ctr_ratio.length){w.uint32(130).fork();for(var i=0;i<m.vert_ctr_ratio.length;++i)w.float(m.vert_ctr_ratio[i]);w.ldelim()}return w};CameraSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.CameraSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.next_camera=r.string();break;case 2:if(!(m.interpolation&&m.interpolation.length))m.interpolation=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.interpolation.push(r.int32())}else m.interpolation.push(r.int32());break;case 3:if(!(m.target_type&&m.target_type.length))m.target_type=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.target_type.push(r.int32())}else m.target_type.push(r.int32());break;case 4:if(!(m.ease_in_speed&&m.ease_in_speed.length))m.ease_in_speed=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.ease_in_speed.push(r.float())}else m.ease_in_speed.push(r.float());break;case 5:if(!(m.ease_out_speed&&m.ease_out_speed.length))m.ease_out_speed=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.ease_out_speed.push(r.float())}else m.ease_out_speed.push(r.float());break;case 6:if(!(m.duration_seconds&&m.duration_seconds.length))m.duration_seconds=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.duration_seconds.push(r.float())}else m.duration_seconds.push(r.float());break;case 7:if(!(m.wait_seconds&&m.wait_seconds.length))m.wait_seconds=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.wait_seconds.push(r.float())}else m.wait_seconds.push(r.float());break;case 8:if(!(m.transition_seconds&&m.transition_seconds.length))m.transition_seconds=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.transition_seconds.push(r.float())}else m.transition_seconds.push(r.float());break;case 9:if(!(m.angle_degree&&m.angle_degree.length))m.angle_degree=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.angle_degree.push(r.float())}else m.angle_degree.push(r.float());break;case 10:if(!(m.angle_offset_degree&&m.angle_offset_degree.length))m.angle_offset_degree=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.angle_offset_degree.push(r.float())}else m.angle_offset_degree.push(r.float());break;case 11:if(!(m.pitch_degree&&m.pitch_degree.length))m.pitch_degree=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.pitch_degree.push(r.float())}else m.pitch_degree.push(r.float());break;case 12:if(!(m.pitch_offset_degree&&m.pitch_offset_degree.length))m.pitch_offset_degree=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.pitch_offset_degree.push(r.float())}else m.pitch_offset_degree.push(r.float());break;case 13:if(!(m.roll_degree&&m.roll_degree.length))m.roll_degree=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.roll_degree.push(r.float())}else m.roll_degree.push(r.float());break;case 14:if(!(m.distance_meters&&m.distance_meters.length))m.distance_meters=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.distance_meters.push(r.float())}else m.distance_meters.push(r.float());break;case 15:if(!(m.height_percent&&m.height_percent.length))m.height_percent=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.height_percent.push(r.float())}else m.height_percent.push(r.float());break;case 16:if(!(m.vert_ctr_ratio&&m.vert_ctr_ratio.length))m.vert_ctr_ratio=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.vert_ctr_ratio.push(r.float())}else m.vert_ctr_ratio.push(r.float());break;default:r.skipType(t&7);break}}return m};CameraSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.CameraSettings)return d;var m=new $root.POGOProtos.Settings.Master.CameraSettings;if(d.next_camera!=null){m.next_camera=String(d.next_camera)}if(d.interpolation){if(!Array.isArray(d.interpolation))throw TypeError(".POGOProtos.Settings.Master.CameraSettings.interpolation: array expected");m.interpolation=[];for(var i=0;i<d.interpolation.length;++i){switch(d.interpolation[i]){default:case"CAM_INTERP_CUT":case 0:m.interpolation[i]=0;break;case"CAM_INTERP_LINEAR":case 1:m.interpolation[i]=1;break;case"CAM_INTERP_SMOOTH":case 2:m.interpolation[i]=2;break;case"CAM_INTERP_SMOOTH_ROT_LINEAR_MOVE":case 3:m.interpolation[i]=3;break;case"CAM_INTERP_DEPENDS":case 4:m.interpolation[i]=4;break}}}if(d.target_type){if(!Array.isArray(d.target_type))throw TypeError(".POGOProtos.Settings.Master.CameraSettings.target_type: array expected");m.target_type=[];for(var i=0;i<d.target_type.length;++i){switch(d.target_type[i]){default:case"CAM_TARGET_ATTACKER":case 0:m.target_type[i]=0;break;case"CAM_TARGET_ATTACKER_EDGE":case 1:m.target_type[i]=1;break;case"CAM_TARGET_ATTACKER_GROUND":case 2:m.target_type[i]=2;break;case"CAM_TARGET_DEFENDER":case 3:m.target_type[i]=3;break;case"CAM_TARGET_DEFENDER_EDGE":case 4:m.target_type[i]=4;break;case"CAM_TARGET_DEFENDER_GROUND":case 5:m.target_type[i]=5;break;case"CAM_TARGET_ATTACKER_DEFENDER":case 6:m.target_type[i]=6;break;case"CAM_TARGET_ATTACKER_DEFENDER_EDGE":case 7:m.target_type[i]=7;break;case"CAM_TARGET_DEFENDER_ATTACKER":case 8:m.target_type[i]=8;break;case"CAM_TARGET_DEFENDER_ATTACKER_EDGE":case 9:m.target_type[i]=9;break;case"CAM_TARGET_ATTACKER_DEFENDER_MIRROR":case 11:m.target_type[i]=11;break;case"CAM_TARGET_SHOULDER_ATTACKER_DEFENDER":case 12:m.target_type[i]=12;break;case"CAM_TARGET_SHOULDER_ATTACKER_DEFENDER_MIRROR":case 13:m.target_type[i]=13;break;case"CAM_TARGET_ATTACKER_DEFENDER_WORLD":case 14:m.target_type[i]=14;break}}}if(d.ease_in_speed){if(!Array.isArray(d.ease_in_speed))throw TypeError(".POGOProtos.Settings.Master.CameraSettings.ease_in_speed: array expected");m.ease_in_speed=[];for(var i=0;i<d.ease_in_speed.length;++i){m.ease_in_speed[i]=Number(d.ease_in_speed[i])}}if(d.ease_out_speed){if(!Array.isArray(d.ease_out_speed))throw TypeError(".POGOProtos.Settings.Master.CameraSettings.ease_out_speed: array expected");m.ease_out_speed=[];for(var i=0;i<d.ease_out_speed.length;++i){m.ease_out_speed[i]=Number(d.ease_out_speed[i])}}if(d.duration_seconds){if(!Array.isArray(d.duration_seconds))throw TypeError(".POGOProtos.Settings.Master.CameraSettings.duration_seconds: array expected");m.duration_seconds=[];for(var i=0;i<d.duration_seconds.length;++i){m.duration_seconds[i]=Number(d.duration_seconds[i])}}if(d.wait_seconds){if(!Array.isArray(d.wait_seconds))throw TypeError(".POGOProtos.Settings.Master.CameraSettings.wait_seconds: array expected");m.wait_seconds=[];for(var i=0;i<d.wait_seconds.length;++i){m.wait_seconds[i]=Number(d.wait_seconds[i])}}if(d.transition_seconds){if(!Array.isArray(d.transition_seconds))throw TypeError(".POGOProtos.Settings.Master.CameraSettings.transition_seconds: array expected");m.transition_seconds=[];for(var i=0;i<d.transition_seconds.length;++i){m.transition_seconds[i]=Number(d.transition_seconds[i])}}if(d.angle_degree){if(!Array.isArray(d.angle_degree))throw TypeError(".POGOProtos.Settings.Master.CameraSettings.angle_degree: array expected");m.angle_degree=[];for(var i=0;i<d.angle_degree.length;++i){m.angle_degree[i]=Number(d.angle_degree[i])}}if(d.angle_offset_degree){if(!Array.isArray(d.angle_offset_degree))throw TypeError(".POGOProtos.Settings.Master.CameraSettings.angle_offset_degree: array expected");m.angle_offset_degree=[];for(var i=0;i<d.angle_offset_degree.length;++i){m.angle_offset_degree[i]=Number(d.angle_offset_degree[i])}}if(d.pitch_degree){if(!Array.isArray(d.pitch_degree))throw TypeError(".POGOProtos.Settings.Master.CameraSettings.pitch_degree: array expected");m.pitch_degree=[];for(var i=0;i<d.pitch_degree.length;++i){m.pitch_degree[i]=Number(d.pitch_degree[i])}}if(d.pitch_offset_degree){if(!Array.isArray(d.pitch_offset_degree))throw TypeError(".POGOProtos.Settings.Master.CameraSettings.pitch_offset_degree: array expected");m.pitch_offset_degree=[];for(var i=0;i<d.pitch_offset_degree.length;++i){m.pitch_offset_degree[i]=Number(d.pitch_offset_degree[i])}}if(d.roll_degree){if(!Array.isArray(d.roll_degree))throw TypeError(".POGOProtos.Settings.Master.CameraSettings.roll_degree: array expected");m.roll_degree=[];for(var i=0;i<d.roll_degree.length;++i){m.roll_degree[i]=Number(d.roll_degree[i])}}if(d.distance_meters){if(!Array.isArray(d.distance_meters))throw TypeError(".POGOProtos.Settings.Master.CameraSettings.distance_meters: array expected");m.distance_meters=[];for(var i=0;i<d.distance_meters.length;++i){m.distance_meters[i]=Number(d.distance_meters[i])}}if(d.height_percent){if(!Array.isArray(d.height_percent))throw TypeError(".POGOProtos.Settings.Master.CameraSettings.height_percent: array expected");m.height_percent=[];for(var i=0;i<d.height_percent.length;++i){m.height_percent[i]=Number(d.height_percent[i])}}if(d.vert_ctr_ratio){if(!Array.isArray(d.vert_ctr_ratio))throw TypeError(".POGOProtos.Settings.Master.CameraSettings.vert_ctr_ratio: array expected");m.vert_ctr_ratio=[];for(var i=0;i<d.vert_ctr_ratio.length;++i){m.vert_ctr_ratio[i]=Number(d.vert_ctr_ratio[i])}}return m};CameraSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.interpolation=[];d.target_type=[];d.ease_in_speed=[];d.ease_out_speed=[];d.duration_seconds=[];d.wait_seconds=[];d.transition_seconds=[];d.angle_degree=[];d.angle_offset_degree=[];d.pitch_degree=[];d.pitch_offset_degree=[];d.roll_degree=[];d.distance_meters=[];d.height_percent=[];d.vert_ctr_ratio=[]}if(o.defaults){d.next_camera=""}if(m.next_camera!=null&&m.hasOwnProperty("next_camera")){d.next_camera=m.next_camera}if(m.interpolation&&m.interpolation.length){d.interpolation=[];for(var j=0;j<m.interpolation.length;++j){d.interpolation[j]=o.enums===String?$root.POGOProtos.Enums.CameraInterpolation[m.interpolation[j]]:m.interpolation[j]}}if(m.target_type&&m.target_type.length){d.target_type=[];for(var j=0;j<m.target_type.length;++j){d.target_type[j]=o.enums===String?$root.POGOProtos.Enums.CameraTarget[m.target_type[j]]:m.target_type[j]}}if(m.ease_in_speed&&m.ease_in_speed.length){d.ease_in_speed=[];for(var j=0;j<m.ease_in_speed.length;++j){d.ease_in_speed[j]=o.json&&!isFinite(m.ease_in_speed[j])?String(m.ease_in_speed[j]):m.ease_in_speed[j]}}if(m.ease_out_speed&&m.ease_out_speed.length){d.ease_out_speed=[];for(var j=0;j<m.ease_out_speed.length;++j){d.ease_out_speed[j]=o.json&&!isFinite(m.ease_out_speed[j])?String(m.ease_out_speed[j]):m.ease_out_speed[j]}}if(m.duration_seconds&&m.duration_seconds.length){d.duration_seconds=[];for(var j=0;j<m.duration_seconds.length;++j){d.duration_seconds[j]=o.json&&!isFinite(m.duration_seconds[j])?String(m.duration_seconds[j]):m.duration_seconds[j]}}if(m.wait_seconds&&m.wait_seconds.length){d.wait_seconds=[];for(var j=0;j<m.wait_seconds.length;++j){d.wait_seconds[j]=o.json&&!isFinite(m.wait_seconds[j])?String(m.wait_seconds[j]):m.wait_seconds[j]}}if(m.transition_seconds&&m.transition_seconds.length){d.transition_seconds=[];for(var j=0;j<m.transition_seconds.length;++j){d.transition_seconds[j]=o.json&&!isFinite(m.transition_seconds[j])?String(m.transition_seconds[j]):m.transition_seconds[j]}}if(m.angle_degree&&m.angle_degree.length){d.angle_degree=[];for(var j=0;j<m.angle_degree.length;++j){d.angle_degree[j]=o.json&&!isFinite(m.angle_degree[j])?String(m.angle_degree[j]):m.angle_degree[j]}}if(m.angle_offset_degree&&m.angle_offset_degree.length){d.angle_offset_degree=[];for(var j=0;j<m.angle_offset_degree.length;++j){d.angle_offset_degree[j]=o.json&&!isFinite(m.angle_offset_degree[j])?String(m.angle_offset_degree[j]):m.angle_offset_degree[j]}}if(m.pitch_degree&&m.pitch_degree.length){d.pitch_degree=[];for(var j=0;j<m.pitch_degree.length;++j){d.pitch_degree[j]=o.json&&!isFinite(m.pitch_degree[j])?String(m.pitch_degree[j]):m.pitch_degree[j]}}if(m.pitch_offset_degree&&m.pitch_offset_degree.length){d.pitch_offset_degree=[];for(var j=0;j<m.pitch_offset_degree.length;++j){d.pitch_offset_degree[j]=o.json&&!isFinite(m.pitch_offset_degree[j])?String(m.pitch_offset_degree[j]):m.pitch_offset_degree[j]}}if(m.roll_degree&&m.roll_degree.length){d.roll_degree=[];for(var j=0;j<m.roll_degree.length;++j){d.roll_degree[j]=o.json&&!isFinite(m.roll_degree[j])?String(m.roll_degree[j]):m.roll_degree[j]}}if(m.distance_meters&&m.distance_meters.length){d.distance_meters=[];for(var j=0;j<m.distance_meters.length;++j){d.distance_meters[j]=o.json&&!isFinite(m.distance_meters[j])?String(m.distance_meters[j]):m.distance_meters[j]}}if(m.height_percent&&m.height_percent.length){d.height_percent=[];for(var j=0;j<m.height_percent.length;++j){d.height_percent[j]=o.json&&!isFinite(m.height_percent[j])?String(m.height_percent[j]):m.height_percent[j]}}if(m.vert_ctr_ratio&&m.vert_ctr_ratio.length){d.vert_ctr_ratio=[];for(var j=0;j<m.vert_ctr_ratio.length;++j){d.vert_ctr_ratio[j]=o.json&&!isFinite(m.vert_ctr_ratio[j])?String(m.vert_ctr_ratio[j]):m.vert_ctr_ratio[j]}}return d};CameraSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CameraSettings}();Master.CombatLeague=function(){function CombatLeague(p){this.unlock_condition=[];this.pokemon_condition=[];this.banned_pokemon=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatLeague.prototype.title="";CombatLeague.prototype.enabled=false;CombatLeague.prototype.unlock_condition=$util.emptyArray;CombatLeague.prototype.pokemon_condition=$util.emptyArray;CombatLeague.prototype.icon_url="";CombatLeague.prototype.pokemon_count=0;CombatLeague.prototype.banned_pokemon=$util.emptyArray;CombatLeague.prototype.badge_type=0;CombatLeague.prototype.minigame_defense_chance_limit=0;CombatLeague.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.title!=null&&m.hasOwnProperty("title"))w.uint32(10).string(m.title);if(m.enabled!=null&&m.hasOwnProperty("enabled"))w.uint32(16).bool(m.enabled);if(m.unlock_condition!=null&&m.unlock_condition.length){for(var i=0;i<m.unlock_condition.length;++i)$root.POGOProtos.Data.Combat.UnlockCondition.encode(m.unlock_condition[i],w.uint32(26).fork()).ldelim()}if(m.pokemon_condition!=null&&m.pokemon_condition.length){for(var i=0;i<m.pokemon_condition.length;++i)$root.POGOProtos.Data.Combat.PokemonCondition.encode(m.pokemon_condition[i],w.uint32(34).fork()).ldelim()}if(m.icon_url!=null&&m.hasOwnProperty("icon_url"))w.uint32(42).string(m.icon_url);if(m.pokemon_count!=null&&m.hasOwnProperty("pokemon_count"))w.uint32(48).int32(m.pokemon_count);if(m.banned_pokemon!=null&&m.banned_pokemon.length){w.uint32(58).fork();for(var i=0;i<m.banned_pokemon.length;++i)w.int32(m.banned_pokemon[i]);w.ldelim()}if(m.badge_type!=null&&m.hasOwnProperty("badge_type"))w.uint32(64).int32(m.badge_type);if(m.minigame_defense_chance_limit!=null&&m.hasOwnProperty("minigame_defense_chance_limit"))w.uint32(72).int32(m.minigame_defense_chance_limit);return w};CombatLeague.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.CombatLeague;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.title=r.string();break;case 2:m.enabled=r.bool();break;case 3:if(!(m.unlock_condition&&m.unlock_condition.length))m.unlock_condition=[];m.unlock_condition.push($root.POGOProtos.Data.Combat.UnlockCondition.decode(r,r.uint32()));break;case 4:if(!(m.pokemon_condition&&m.pokemon_condition.length))m.pokemon_condition=[];m.pokemon_condition.push($root.POGOProtos.Data.Combat.PokemonCondition.decode(r,r.uint32()));break;case 5:m.icon_url=r.string();break;case 6:m.pokemon_count=r.int32();break;case 7:if(!(m.banned_pokemon&&m.banned_pokemon.length))m.banned_pokemon=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.banned_pokemon.push(r.int32())}else m.banned_pokemon.push(r.int32());break;case 8:m.badge_type=r.int32();break;case 9:m.minigame_defense_chance_limit=r.int32();break;default:r.skipType(t&7);break}}return m};CombatLeague.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.CombatLeague)return d;var m=new $root.POGOProtos.Settings.Master.CombatLeague;if(d.title!=null){m.title=String(d.title)}if(d.enabled!=null){m.enabled=Boolean(d.enabled)}if(d.unlock_condition){if(!Array.isArray(d.unlock_condition))throw TypeError(".POGOProtos.Settings.Master.CombatLeague.unlock_condition: array expected");m.unlock_condition=[];for(var i=0;i<d.unlock_condition.length;++i){if(typeof d.unlock_condition[i]!=="object")throw TypeError(".POGOProtos.Settings.Master.CombatLeague.unlock_condition: object expected");m.unlock_condition[i]=$root.POGOProtos.Data.Combat.UnlockCondition.fromObject(d.unlock_condition[i])}}if(d.pokemon_condition){if(!Array.isArray(d.pokemon_condition))throw TypeError(".POGOProtos.Settings.Master.CombatLeague.pokemon_condition: array expected");m.pokemon_condition=[];for(var i=0;i<d.pokemon_condition.length;++i){if(typeof d.pokemon_condition[i]!=="object")throw TypeError(".POGOProtos.Settings.Master.CombatLeague.pokemon_condition: object expected");m.pokemon_condition[i]=$root.POGOProtos.Data.Combat.PokemonCondition.fromObject(d.pokemon_condition[i])}}if(d.icon_url!=null){m.icon_url=String(d.icon_url)}if(d.pokemon_count!=null){m.pokemon_count=d.pokemon_count|0}if(d.banned_pokemon){if(!Array.isArray(d.banned_pokemon))throw TypeError(".POGOProtos.Settings.Master.CombatLeague.banned_pokemon: array expected");m.banned_pokemon=[];for(var i=0;i<d.banned_pokemon.length;++i){switch(d.banned_pokemon[i]){default:case"MISSINGNO":case 0:m.banned_pokemon[i]=0;break;case"BULBASAUR":case 1:m.banned_pokemon[i]=1;break;case"IVYSAUR":case 2:m.banned_pokemon[i]=2;break;case"VENUSAUR":case 3:m.banned_pokemon[i]=3;break;case"CHARMANDER":case 4:m.banned_pokemon[i]=4;break;case"CHARMELEON":case 5:m.banned_pokemon[i]=5;break;case"CHARIZARD":case 6:m.banned_pokemon[i]=6;break;case"SQUIRTLE":case 7:m.banned_pokemon[i]=7;break;case"WARTORTLE":case 8:m.banned_pokemon[i]=8;break;case"BLASTOISE":case 9:m.banned_pokemon[i]=9;break;case"CATERPIE":case 10:m.banned_pokemon[i]=10;break;case"METAPOD":case 11:m.banned_pokemon[i]=11;break;case"BUTTERFREE":case 12:m.banned_pokemon[i]=12;break;case"WEEDLE":case 13:m.banned_pokemon[i]=13;break;case"KAKUNA":case 14:m.banned_pokemon[i]=14;break;case"BEEDRILL":case 15:m.banned_pokemon[i]=15;break;case"PIDGEY":case 16:m.banned_pokemon[i]=16;break;case"PIDGEOTTO":case 17:m.banned_pokemon[i]=17;break;case"PIDGEOT":case 18:m.banned_pokemon[i]=18;break;case"RATTATA":case 19:m.banned_pokemon[i]=19;break;case"RATICATE":case 20:m.banned_pokemon[i]=20;break;case"SPEAROW":case 21:m.banned_pokemon[i]=21;break;case"FEAROW":case 22:m.banned_pokemon[i]=22;break;case"EKANS":case 23:m.banned_pokemon[i]=23;break;case"ARBOK":case 24:m.banned_pokemon[i]=24;break;case"PIKACHU":case 25:m.banned_pokemon[i]=25;break;case"RAICHU":case 26:m.banned_pokemon[i]=26;break;case"SANDSHREW":case 27:m.banned_pokemon[i]=27;break;case"SANDSLASH":case 28:m.banned_pokemon[i]=28;break;case"NIDORAN_FEMALE":case 29:m.banned_pokemon[i]=29;break;case"NIDORINA":case 30:m.banned_pokemon[i]=30;break;case"NIDOQUEEN":case 31:m.banned_pokemon[i]=31;break;case"NIDORAN_MALE":case 32:m.banned_pokemon[i]=32;break;case"NIDORINO":case 33:m.banned_pokemon[i]=33;break;case"NIDOKING":case 34:m.banned_pokemon[i]=34;break;case"CLEFAIRY":case 35:m.banned_pokemon[i]=35;break;case"CLEFABLE":case 36:m.banned_pokemon[i]=36;break;case"VULPIX":case 37:m.banned_pokemon[i]=37;break;case"NINETALES":case 38:m.banned_pokemon[i]=38;break;case"JIGGLYPUFF":case 39:m.banned_pokemon[i]=39;break;case"WIGGLYTUFF":case 40:m.banned_pokemon[i]=40;break;case"ZUBAT":case 41:m.banned_pokemon[i]=41;break;case"GOLBAT":case 42:m.banned_pokemon[i]=42;break;case"ODDISH":case 43:m.banned_pokemon[i]=43;break;case"GLOOM":case 44:m.banned_pokemon[i]=44;break;case"VILEPLUME":case 45:m.banned_pokemon[i]=45;break;case"PARAS":case 46:m.banned_pokemon[i]=46;break;case"PARASECT":case 47:m.banned_pokemon[i]=47;break;case"VENONAT":case 48:m.banned_pokemon[i]=48;break;case"VENOMOTH":case 49:m.banned_pokemon[i]=49;break;case"DIGLETT":case 50:m.banned_pokemon[i]=50;break;case"DUGTRIO":case 51:m.banned_pokemon[i]=51;break;case"MEOWTH":case 52:m.banned_pokemon[i]=52;break;case"PERSIAN":case 53:m.banned_pokemon[i]=53;break;case"PSYDUCK":case 54:m.banned_pokemon[i]=54;break;case"GOLDUCK":case 55:m.banned_pokemon[i]=55;break;case"MANKEY":case 56:m.banned_pokemon[i]=56;break;case"PRIMEAPE":case 57:m.banned_pokemon[i]=57;break;case"GROWLITHE":case 58:m.banned_pokemon[i]=58;break;case"ARCANINE":case 59:m.banned_pokemon[i]=59;break;case"POLIWAG":case 60:m.banned_pokemon[i]=60;break;case"POLIWHIRL":case 61:m.banned_pokemon[i]=61;break;case"POLIWRATH":case 62:m.banned_pokemon[i]=62;break;case"ABRA":case 63:m.banned_pokemon[i]=63;break;case"KADABRA":case 64:m.banned_pokemon[i]=64;break;case"ALAKAZAM":case 65:m.banned_pokemon[i]=65;break;case"MACHOP":case 66:m.banned_pokemon[i]=66;break;case"MACHOKE":case 67:m.banned_pokemon[i]=67;break;case"MACHAMP":case 68:m.banned_pokemon[i]=68;break;case"BELLSPROUT":case 69:m.banned_pokemon[i]=69;break;case"WEEPINBELL":case 70:m.banned_pokemon[i]=70;break;case"VICTREEBEL":case 71:m.banned_pokemon[i]=71;break;case"TENTACOOL":case 72:m.banned_pokemon[i]=72;break;case"TENTACRUEL":case 73:m.banned_pokemon[i]=73;break;case"GEODUDE":case 74:m.banned_pokemon[i]=74;break;case"GRAVELER":case 75:m.banned_pokemon[i]=75;break;case"GOLEM":case 76:m.banned_pokemon[i]=76;break;case"PONYTA":case 77:m.banned_pokemon[i]=77;break;case"RAPIDASH":case 78:m.banned_pokemon[i]=78;break;case"SLOWPOKE":case 79:m.banned_pokemon[i]=79;break;case"SLOWBRO":case 80:m.banned_pokemon[i]=80;break;case"MAGNEMITE":case 81:m.banned_pokemon[i]=81;break;case"MAGNETON":case 82:m.banned_pokemon[i]=82;break;case"FARFETCHD":case 83:m.banned_pokemon[i]=83;break;case"DODUO":case 84:m.banned_pokemon[i]=84;break;case"DODRIO":case 85:m.banned_pokemon[i]=85;break;case"SEEL":case 86:m.banned_pokemon[i]=86;break;case"DEWGONG":case 87:m.banned_pokemon[i]=87;break;case"GRIMER":case 88:m.banned_pokemon[i]=88;break;case"MUK":case 89:m.banned_pokemon[i]=89;break;case"SHELLDER":case 90:m.banned_pokemon[i]=90;break;case"CLOYSTER":case 91:m.banned_pokemon[i]=91;break;case"GASTLY":case 92:m.banned_pokemon[i]=92;break;case"HAUNTER":case 93:m.banned_pokemon[i]=93;break;case"GENGAR":case 94:m.banned_pokemon[i]=94;break;case"ONIX":case 95:m.banned_pokemon[i]=95;break;case"DROWZEE":case 96:m.banned_pokemon[i]=96;break;case"HYPNO":case 97:m.banned_pokemon[i]=97;break;case"KRABBY":case 98:m.banned_pokemon[i]=98;break;case"KINGLER":case 99:m.banned_pokemon[i]=99;break;case"VOLTORB":case 100:m.banned_pokemon[i]=100;break;case"ELECTRODE":case 101:m.banned_pokemon[i]=101;break;case"EXEGGCUTE":case 102:m.banned_pokemon[i]=102;break;case"EXEGGUTOR":case 103:m.banned_pokemon[i]=103;break;case"CUBONE":case 104:m.banned_pokemon[i]=104;break;case"MAROWAK":case 105:m.banned_pokemon[i]=105;break;case"HITMONLEE":case 106:m.banned_pokemon[i]=106;break;case"HITMONCHAN":case 107:m.banned_pokemon[i]=107;break;case"LICKITUNG":case 108:m.banned_pokemon[i]=108;break;case"KOFFING":case 109:m.banned_pokemon[i]=109;break;case"WEEZING":case 110:m.banned_pokemon[i]=110;break;case"RHYHORN":case 111:m.banned_pokemon[i]=111;break;case"RHYDON":case 112:m.banned_pokemon[i]=112;break;case"CHANSEY":case 113:m.banned_pokemon[i]=113;break;case"TANGELA":case 114:m.banned_pokemon[i]=114;break;case"KANGASKHAN":case 115:m.banned_pokemon[i]=115;break;case"HORSEA":case 116:m.banned_pokemon[i]=116;break;case"SEADRA":case 117:m.banned_pokemon[i]=117;break;case"GOLDEEN":case 118:m.banned_pokemon[i]=118;break;case"SEAKING":case 119:m.banned_pokemon[i]=119;break;case"STARYU":case 120:m.banned_pokemon[i]=120;break;case"STARMIE":case 121:m.banned_pokemon[i]=121;break;case"MR_MIME":case 122:m.banned_pokemon[i]=122;break;case"SCYTHER":case 123:m.banned_pokemon[i]=123;break;case"JYNX":case 124:m.banned_pokemon[i]=124;break;case"ELECTABUZZ":case 125:m.banned_pokemon[i]=125;break;case"MAGMAR":case 126:m.banned_pokemon[i]=126;break;case"PINSIR":case 127:m.banned_pokemon[i]=127;break;case"TAUROS":case 128:m.banned_pokemon[i]=128;break;case"MAGIKARP":case 129:m.banned_pokemon[i]=129;break;case"GYARADOS":case 130:m.banned_pokemon[i]=130;break;case"LAPRAS":case 131:m.banned_pokemon[i]=131;break;case"DITTO":case 132:m.banned_pokemon[i]=132;break;case"EEVEE":case 133:m.banned_pokemon[i]=133;break;case"VAPOREON":case 134:m.banned_pokemon[i]=134;break;case"JOLTEON":case 135:m.banned_pokemon[i]=135;break;case"FLAREON":case 136:m.banned_pokemon[i]=136;break;case"PORYGON":case 137:m.banned_pokemon[i]=137;break;case"OMANYTE":case 138:m.banned_pokemon[i]=138;break;case"OMASTAR":case 139:m.banned_pokemon[i]=139;break;case"KABUTO":case 140:m.banned_pokemon[i]=140;break;case"KABUTOPS":case 141:m.banned_pokemon[i]=141;break;case"AERODACTYL":case 142:m.banned_pokemon[i]=142;break;case"SNORLAX":case 143:m.banned_pokemon[i]=143;break;case"ARTICUNO":case 144:m.banned_pokemon[i]=144;break;case"ZAPDOS":case 145:m.banned_pokemon[i]=145;break;case"MOLTRES":case 146:m.banned_pokemon[i]=146;break;case"DRATINI":case 147:m.banned_pokemon[i]=147;break;case"DRAGONAIR":case 148:m.banned_pokemon[i]=148;break;case"DRAGONITE":case 149:m.banned_pokemon[i]=149;break;case"MEWTWO":case 150:m.banned_pokemon[i]=150;break;case"MEW":case 151:m.banned_pokemon[i]=151;break;case"CHIKORITA":case 152:m.banned_pokemon[i]=152;break;case"BAYLEEF":case 153:m.banned_pokemon[i]=153;break;case"MEGANIUM":case 154:m.banned_pokemon[i]=154;break;case"CYNDAQUIL":case 155:m.banned_pokemon[i]=155;break;case"QUILAVA":case 156:m.banned_pokemon[i]=156;break;case"TYPHLOSION":case 157:m.banned_pokemon[i]=157;break;case"TOTODILE":case 158:m.banned_pokemon[i]=158;break;case"CROCONAW":case 159:m.banned_pokemon[i]=159;break;case"FERALIGATR":case 160:m.banned_pokemon[i]=160;break;case"SENTRET":case 161:m.banned_pokemon[i]=161;break;case"FURRET":case 162:m.banned_pokemon[i]=162;break;case"HOOTHOOT":case 163:m.banned_pokemon[i]=163;break;case"NOCTOWL":case 164:m.banned_pokemon[i]=164;break;case"LEDYBA":case 165:m.banned_pokemon[i]=165;break;case"LEDIAN":case 166:m.banned_pokemon[i]=166;break;case"SPINARAK":case 167:m.banned_pokemon[i]=167;break;case"ARIADOS":case 168:m.banned_pokemon[i]=168;break;case"CROBAT":case 169:m.banned_pokemon[i]=169;break;case"CHINCHOU":case 170:m.banned_pokemon[i]=170;break;case"LANTURN":case 171:m.banned_pokemon[i]=171;break;case"PICHU":case 172:m.banned_pokemon[i]=172;break;case"CLEFFA":case 173:m.banned_pokemon[i]=173;break;case"IGGLYBUFF":case 174:m.banned_pokemon[i]=174;break;case"TOGEPI":case 175:m.banned_pokemon[i]=175;break;case"TOGETIC":case 176:m.banned_pokemon[i]=176;break;case"NATU":case 177:m.banned_pokemon[i]=177;break;case"XATU":case 178:m.banned_pokemon[i]=178;break;case"MAREEP":case 179:m.banned_pokemon[i]=179;break;case"FLAAFFY":case 180:m.banned_pokemon[i]=180;break;case"AMPHAROS":case 181:m.banned_pokemon[i]=181;break;case"BELLOSSOM":case 182:m.banned_pokemon[i]=182;break;case"MARILL":case 183:m.banned_pokemon[i]=183;break;case"AZUMARILL":case 184:m.banned_pokemon[i]=184;break;case"SUDOWOODO":case 185:m.banned_pokemon[i]=185;break;case"POLITOED":case 186:m.banned_pokemon[i]=186;break;case"HOPPIP":case 187:m.banned_pokemon[i]=187;break;case"SKIPLOOM":case 188:m.banned_pokemon[i]=188;break;case"JUMPLUFF":case 189:m.banned_pokemon[i]=189;break;case"AIPOM":case 190:m.banned_pokemon[i]=190;break;case"SUNKERN":case 191:m.banned_pokemon[i]=191;break;case"SUNFLORA":case 192:m.banned_pokemon[i]=192;break;case"YANMA":case 193:m.banned_pokemon[i]=193;break;case"WOOPER":case 194:m.banned_pokemon[i]=194;break;case"QUAGSIRE":case 195:m.banned_pokemon[i]=195;break;case"ESPEON":case 196:m.banned_pokemon[i]=196;break;case"UMBREON":case 197:m.banned_pokemon[i]=197;break;case"MURKROW":case 198:m.banned_pokemon[i]=198;break;case"SLOWKING":case 199:m.banned_pokemon[i]=199;break;case"MISDREAVUS":case 200:m.banned_pokemon[i]=200;break;case"UNOWN":case 201:m.banned_pokemon[i]=201;break;case"WOBBUFFET":case 202:m.banned_pokemon[i]=202;break;case"GIRAFARIG":case 203:m.banned_pokemon[i]=203;break;case"PINECO":case 204:m.banned_pokemon[i]=204;break;case"FORRETRESS":case 205:m.banned_pokemon[i]=205;break;case"DUNSPARCE":case 206:m.banned_pokemon[i]=206;break;case"GLIGAR":case 207:m.banned_pokemon[i]=207;break;case"STEELIX":case 208:m.banned_pokemon[i]=208;break;case"SNUBBULL":case 209:m.banned_pokemon[i]=209;break;case"GRANBULL":case 210:m.banned_pokemon[i]=210;break;case"QWILFISH":case 211:m.banned_pokemon[i]=211;break;case"SCIZOR":case 212:m.banned_pokemon[i]=212;break;case"SHUCKLE":case 213:m.banned_pokemon[i]=213;break;case"HERACROSS":case 214:m.banned_pokemon[i]=214;break;case"SNEASEL":case 215:m.banned_pokemon[i]=215;break;case"TEDDIURSA":case 216:m.banned_pokemon[i]=216;break;case"URSARING":case 217:m.banned_pokemon[i]=217;break;case"SLUGMA":case 218:m.banned_pokemon[i]=218;break;case"MAGCARGO":case 219:m.banned_pokemon[i]=219;break;case"SWINUB":case 220:m.banned_pokemon[i]=220;break;case"PILOSWINE":case 221:m.banned_pokemon[i]=221;break;case"CORSOLA":case 222:m.banned_pokemon[i]=222;break;case"REMORAID":case 223:m.banned_pokemon[i]=223;break;case"OCTILLERY":case 224:m.banned_pokemon[i]=224;break;case"DELIBIRD":case 225:m.banned_pokemon[i]=225;break;case"MANTINE":case 226:m.banned_pokemon[i]=226;break;case"SKARMORY":case 227:m.banned_pokemon[i]=227;break;case"HOUNDOUR":case 228:m.banned_pokemon[i]=228;break;case"HOUNDOOM":case 229:m.banned_pokemon[i]=229;break;case"KINGDRA":case 230:m.banned_pokemon[i]=230;break;case"PHANPY":case 231:m.banned_pokemon[i]=231;break;case"DONPHAN":case 232:m.banned_pokemon[i]=232;break;case"PORYGON2":case 233:m.banned_pokemon[i]=233;break;case"STANTLER":case 234:m.banned_pokemon[i]=234;break;case"SMEARGLE":case 235:m.banned_pokemon[i]=235;break;case"TYROGUE":case 236:m.banned_pokemon[i]=236;break;case"HITMONTOP":case 237:m.banned_pokemon[i]=237;break;case"SMOOCHUM":case 238:m.banned_pokemon[i]=238;break;case"ELEKID":case 239:m.banned_pokemon[i]=239;break;case"MAGBY":case 240:m.banned_pokemon[i]=240;break;case"MILTANK":case 241:m.banned_pokemon[i]=241;break;case"BLISSEY":case 242:m.banned_pokemon[i]=242;break;case"RAIKOU":case 243:m.banned_pokemon[i]=243;break;case"ENTEI":case 244:m.banned_pokemon[i]=244;break;case"SUICUNE":case 245:m.banned_pokemon[i]=245;break;case"LARVITAR":case 246:m.banned_pokemon[i]=246;break;case"PUPITAR":case 247:m.banned_pokemon[i]=247;break;case"TYRANITAR":case 248:m.banned_pokemon[i]=248;break;case"LUGIA":case 249:m.banned_pokemon[i]=249;break;case"HO_OH":case 250:m.banned_pokemon[i]=250;break;case"CELEBI":case 251:m.banned_pokemon[i]=251;break;case"TREECKO":case 252:m.banned_pokemon[i]=252;break;case"GROVYLE":case 253:m.banned_pokemon[i]=253;break;case"SCEPTILE":case 254:m.banned_pokemon[i]=254;break;case"TORCHIC":case 255:m.banned_pokemon[i]=255;break;case"COMBUSKEN":case 256:m.banned_pokemon[i]=256;break;case"BLAZIKEN":case 257:m.banned_pokemon[i]=257;break;case"MUDKIP":case 258:m.banned_pokemon[i]=258;break;case"MARSHTOMP":case 259:m.banned_pokemon[i]=259;break;case"SWAMPERT":case 260:m.banned_pokemon[i]=260;break;case"POOCHYENA":case 261:m.banned_pokemon[i]=261;break;case"MIGHTYENA":case 262:m.banned_pokemon[i]=262;break;case"ZIGZAGOON":case 263:m.banned_pokemon[i]=263;break;case"LINOONE":case 264:m.banned_pokemon[i]=264;break;case"WURMPLE":case 265:m.banned_pokemon[i]=265;break;case"SILCOON":case 266:m.banned_pokemon[i]=266;break;case"BEAUTIFLY":case 267:m.banned_pokemon[i]=267;break;case"CASCOON":case 268:m.banned_pokemon[i]=268;break;case"DUSTOX":case 269:m.banned_pokemon[i]=269;break;case"LOTAD":case 270:m.banned_pokemon[i]=270;break;case"LOMBRE":case 271:m.banned_pokemon[i]=271;break;case"LUDICOLO":case 272:m.banned_pokemon[i]=272;break;case"SEEDOT":case 273:m.banned_pokemon[i]=273;break;case"NUZLEAF":case 274:m.banned_pokemon[i]=274;break;case"SHIFTRY":case 275:m.banned_pokemon[i]=275;break;case"TAILLOW":case 276:m.banned_pokemon[i]=276;break;case"SWELLOW":case 277:m.banned_pokemon[i]=277;break;case"WINGULL":case 278:m.banned_pokemon[i]=278;break;case"PELIPPER":case 279:m.banned_pokemon[i]=279;break;case"RALTS":case 280:m.banned_pokemon[i]=280;break;case"KIRLIA":case 281:m.banned_pokemon[i]=281;break;case"GARDEVOIR":case 282:m.banned_pokemon[i]=282;break;case"SURSKIT":case 283:m.banned_pokemon[i]=283;break;case"MASQUERAIN":case 284:m.banned_pokemon[i]=284;break;case"SHROOMISH":case 285:m.banned_pokemon[i]=285;break;case"BRELOOM":case 286:m.banned_pokemon[i]=286;break;case"SLAKOTH":case 287:m.banned_pokemon[i]=287;break;case"VIGOROTH":case 288:m.banned_pokemon[i]=288;break;case"SLAKING":case 289:m.banned_pokemon[i]=289;break;case"NINCADA":case 290:m.banned_pokemon[i]=290;break;case"NINJASK":case 291:m.banned_pokemon[i]=291;break;case"SHEDINJA":case 292:m.banned_pokemon[i]=292;break;case"WHISMUR":case 293:m.banned_pokemon[i]=293;break;case"LOUDRED":case 294:m.banned_pokemon[i]=294;break;case"EXPLOUD":case 295:m.banned_pokemon[i]=295;break;case"MAKUHITA":case 296:m.banned_pokemon[i]=296;break;case"HARIYAMA":case 297:m.banned_pokemon[i]=297;break;case"AZURILL":case 298:m.banned_pokemon[i]=298;break;case"NOSEPASS":case 299:m.banned_pokemon[i]=299;break;case"SKITTY":case 300:m.banned_pokemon[i]=300;break;case"DELCATTY":case 301:m.banned_pokemon[i]=301;break;case"SABLEYE":case 302:m.banned_pokemon[i]=302;break;case"MAWILE":case 303:m.banned_pokemon[i]=303;break;case"ARON":case 304:m.banned_pokemon[i]=304;break;case"LAIRON":case 305:m.banned_pokemon[i]=305;break;case"AGGRON":case 306:m.banned_pokemon[i]=306;break;case"MEDITITE":case 307:m.banned_pokemon[i]=307;break;case"MEDICHAM":case 308:m.banned_pokemon[i]=308;break;case"ELECTRIKE":case 309:m.banned_pokemon[i]=309;break;case"MANECTRIC":case 310:m.banned_pokemon[i]=310;break;case"PLUSLE":case 311:m.banned_pokemon[i]=311;break;case"MINUN":case 312:m.banned_pokemon[i]=312;break;case"VOLBEAT":case 313:m.banned_pokemon[i]=313;break;case"ILLUMISE":case 314:m.banned_pokemon[i]=314;break;case"ROSELIA":case 315:m.banned_pokemon[i]=315;break;case"GULPIN":case 316:m.banned_pokemon[i]=316;break;case"SWALOT":case 317:m.banned_pokemon[i]=317;break;case"CARVANHA":case 318:m.banned_pokemon[i]=318;break;case"SHARPEDO":case 319:m.banned_pokemon[i]=319;break;case"WAILMER":case 320:m.banned_pokemon[i]=320;break;case"WAILORD":case 321:m.banned_pokemon[i]=321;break;case"NUMEL":case 322:m.banned_pokemon[i]=322;break;case"CAMERUPT":case 323:m.banned_pokemon[i]=323;break;case"TORKOAL":case 324:m.banned_pokemon[i]=324;break;case"SPOINK":case 325:m.banned_pokemon[i]=325;break;case"GRUMPIG":case 326:m.banned_pokemon[i]=326;break;case"SPINDA":case 327:m.banned_pokemon[i]=327;break;case"TRAPINCH":case 328:m.banned_pokemon[i]=328;break;case"VIBRAVA":case 329:m.banned_pokemon[i]=329;break;case"FLYGON":case 330:m.banned_pokemon[i]=330;break;case"CACNEA":case 331:m.banned_pokemon[i]=331;break;case"CACTURNE":case 332:m.banned_pokemon[i]=332;break;case"SWABLU":case 333:m.banned_pokemon[i]=333;break;case"ALTARIA":case 334:m.banned_pokemon[i]=334;break;case"ZANGOOSE":case 335:m.banned_pokemon[i]=335;break;case"SEVIPER":case 336:m.banned_pokemon[i]=336;break;case"LUNATONE":case 337:m.banned_pokemon[i]=337;break;case"SOLROCK":case 338:m.banned_pokemon[i]=338;break;case"BARBOACH":case 339:m.banned_pokemon[i]=339;break;case"WHISCASH":case 340:m.banned_pokemon[i]=340;break;case"CORPHISH":case 341:m.banned_pokemon[i]=341;break;case"CRAWDAUNT":case 342:m.banned_pokemon[i]=342;break;case"BALTOY":case 343:m.banned_pokemon[i]=343;break;case"CLAYDOL":case 344:m.banned_pokemon[i]=344;break;case"LILEEP":case 345:m.banned_pokemon[i]=345;break;case"CRADILY":case 346:m.banned_pokemon[i]=346;break;case"ANORITH":case 347:m.banned_pokemon[i]=347;break;case"ARMALDO":case 348:m.banned_pokemon[i]=348;break;case"FEEBAS":case 349:m.banned_pokemon[i]=349;break;case"MILOTIC":case 350:m.banned_pokemon[i]=350;break;case"CASTFORM":case 351:m.banned_pokemon[i]=351;break;case"KECLEON":case 352:m.banned_pokemon[i]=352;break;case"SHUPPET":case 353:m.banned_pokemon[i]=353;break;case"BANETTE":case 354:m.banned_pokemon[i]=354;break;case"DUSKULL":case 355:m.banned_pokemon[i]=355;break;case"DUSCLOPS":case 356:m.banned_pokemon[i]=356;break;case"TROPIUS":case 357:m.banned_pokemon[i]=357;break;case"CHIMECHO":case 358:m.banned_pokemon[i]=358;break;case"ABSOL":case 359:m.banned_pokemon[i]=359;break;case"WYNAUT":case 360:m.banned_pokemon[i]=360;break;case"SNORUNT":case 361:m.banned_pokemon[i]=361;break;case"GLALIE":case 362:m.banned_pokemon[i]=362;break;case"SPHEAL":case 363:m.banned_pokemon[i]=363;break;case"SEALEO":case 364:m.banned_pokemon[i]=364;break;case"WALREIN":case 365:m.banned_pokemon[i]=365;break;case"CLAMPERL":case 366:m.banned_pokemon[i]=366;break;case"HUNTAIL":case 367:m.banned_pokemon[i]=367;break;case"GOREBYSS":case 368:m.banned_pokemon[i]=368;break;case"RELICANTH":case 369:m.banned_pokemon[i]=369;break;case"LUVDISC":case 370:m.banned_pokemon[i]=370;break;case"BAGON":case 371:m.banned_pokemon[i]=371;break;case"SHELGON":case 372:m.banned_pokemon[i]=372;break;case"SALAMENCE":case 373:m.banned_pokemon[i]=373;break;case"BELDUM":case 374:m.banned_pokemon[i]=374;break;case"METANG":case 375:m.banned_pokemon[i]=375;break;case"METAGROSS":case 376:m.banned_pokemon[i]=376;break;case"REGIROCK":case 377:m.banned_pokemon[i]=377;break;case"REGICE":case 378:m.banned_pokemon[i]=378;break;case"REGISTEEL":case 379:m.banned_pokemon[i]=379;break;case"LATIAS":case 380:m.banned_pokemon[i]=380;break;case"LATIOS":case 381:m.banned_pokemon[i]=381;break;case"KYOGRE":case 382:m.banned_pokemon[i]=382;break;case"GROUDON":case 383:m.banned_pokemon[i]=383;break;case"RAYQUAZA":case 384:m.banned_pokemon[i]=384;break;case"JIRACHI":case 385:m.banned_pokemon[i]=385;break;case"DEOXYS":case 386:m.banned_pokemon[i]=386;break;case"TURTWIG":case 387:m.banned_pokemon[i]=387;break;case"GROTLE":case 388:m.banned_pokemon[i]=388;break;case"TORTERRA":case 389:m.banned_pokemon[i]=389;break;case"CHIMCHAR":case 390:m.banned_pokemon[i]=390;break;case"MONFERNO":case 391:m.banned_pokemon[i]=391;break;case"INFERNAPE":case 392:m.banned_pokemon[i]=392;break;case"PIPLUP":case 393:m.banned_pokemon[i]=393;break;case"PRINPLUP":case 394:m.banned_pokemon[i]=394;break;case"EMPOLEON":case 395:m.banned_pokemon[i]=395;break;case"STARLY":case 396:m.banned_pokemon[i]=396;break;case"STARAVIA":case 397:m.banned_pokemon[i]=397;break;case"STARAPTOR":case 398:m.banned_pokemon[i]=398;break;case"BIDOOF":case 399:m.banned_pokemon[i]=399;break;case"BIBAREL":case 400:m.banned_pokemon[i]=400;break;case"KRICKETOT":case 401:m.banned_pokemon[i]=401;break;case"KRICKETUNE":case 402:m.banned_pokemon[i]=402;break;case"SHINX":case 403:m.banned_pokemon[i]=403;break;case"LUXIO":case 404:m.banned_pokemon[i]=404;break;case"LUXRAY":case 405:m.banned_pokemon[i]=405;break;case"BUDEW":case 406:m.banned_pokemon[i]=406;break;case"ROSERADE":case 407:m.banned_pokemon[i]=407;break;case"CRANIDOS":case 408:m.banned_pokemon[i]=408;break;case"RAMPARDOS":case 409:m.banned_pokemon[i]=409;break;case"SHIELDON":case 410:m.banned_pokemon[i]=410;break;case"BASTIODON":case 411:m.banned_pokemon[i]=411;break;case"BURMY":case 412:m.banned_pokemon[i]=412;break;case"WORMADAM":case 413:m.banned_pokemon[i]=413;break;case"MOTHIM":case 414:m.banned_pokemon[i]=414;break;case"COMBEE":case 415:m.banned_pokemon[i]=415;break;case"VESPIQUEN":case 416:m.banned_pokemon[i]=416;break;case"PACHIRISU":case 417:m.banned_pokemon[i]=417;break;case"BUIZEL":case 418:m.banned_pokemon[i]=418;break;case"FLOATZEL":case 419:m.banned_pokemon[i]=419;break;case"CHERUBI":case 420:m.banned_pokemon[i]=420;break;case"CHERRIM":case 421:m.banned_pokemon[i]=421;break;case"SHELLOS":case 422:m.banned_pokemon[i]=422;break;case"GASTRODON":case 423:m.banned_pokemon[i]=423;break;case"AMBIPOM":case 424:m.banned_pokemon[i]=424;break;case"DRIFLOON":case 425:m.banned_pokemon[i]=425;break;case"DRIFBLIM":case 426:m.banned_pokemon[i]=426;break;case"BUNEARY":case 427:m.banned_pokemon[i]=427;break;case"LOPUNNY":case 428:m.banned_pokemon[i]=428;break;case"MISMAGIUS":case 429:m.banned_pokemon[i]=429;break;case"HONCHKROW":case 430:m.banned_pokemon[i]=430;break;case"GLAMEOW":case 431:m.banned_pokemon[i]=431;break;case"PURUGLY":case 432:m.banned_pokemon[i]=432;break;case"CHINGLING":case 433:m.banned_pokemon[i]=433;break;case"STUNKY":case 434:m.banned_pokemon[i]=434;break;case"SKUNTANK":case 435:m.banned_pokemon[i]=435;break;case"BRONZOR":case 436:m.banned_pokemon[i]=436;break;case"BRONZONG":case 437:m.banned_pokemon[i]=437;break;case"BONSLY":case 438:m.banned_pokemon[i]=438;break;case"MIME_JR":case 439:m.banned_pokemon[i]=439;break;case"HAPPINY":case 440:m.banned_pokemon[i]=440;break;case"CHATOT":case 441:m.banned_pokemon[i]=441;break;case"SPIRITOMB":case 442:m.banned_pokemon[i]=442;break;case"GIBLE":case 443:m.banned_pokemon[i]=443;break;case"GABITE":case 444:m.banned_pokemon[i]=444;break;case"GARCHOMP":case 445:m.banned_pokemon[i]=445;break;case"MUNCHLAX":case 446:m.banned_pokemon[i]=446;break;case"RIOLU":case 447:m.banned_pokemon[i]=447;break;case"LUCARIO":case 448:m.banned_pokemon[i]=448;break;case"HIPPOPOTAS":case 449:m.banned_pokemon[i]=449;break;case"HIPPOWDON":case 450:m.banned_pokemon[i]=450;break;case"SKORUPI":case 451:m.banned_pokemon[i]=451;break;case"DRAPION":case 452:m.banned_pokemon[i]=452;break;case"CROAGUNK":case 453:m.banned_pokemon[i]=453;break;case"TOXICROAK":case 454:m.banned_pokemon[i]=454;break;case"CARNIVINE":case 455:m.banned_pokemon[i]=455;break;case"FINNEON":case 456:m.banned_pokemon[i]=456;break;case"LUMINEON":case 457:m.banned_pokemon[i]=457;break;case"MANTYKE":case 458:m.banned_pokemon[i]=458;break;case"SNOVER":case 459:m.banned_pokemon[i]=459;break;case"ABOMASNOW":case 460:m.banned_pokemon[i]=460;break;case"WEAVILE":case 461:m.banned_pokemon[i]=461;break;case"MAGNEZONE":case 462:m.banned_pokemon[i]=462;break;case"LICKILICKY":case 463:m.banned_pokemon[i]=463;break;case"RHYPERIOR":case 464:m.banned_pokemon[i]=464;break;case"TANGROWTH":case 465:m.banned_pokemon[i]=465;break;case"ELECTIVIRE":case 466:m.banned_pokemon[i]=466;break;case"MAGMORTAR":case 467:m.banned_pokemon[i]=467;break;case"TOGEKISS":case 468:m.banned_pokemon[i]=468;break;case"YANMEGA":case 469:m.banned_pokemon[i]=469;break;case"LEAFEON":case 470:m.banned_pokemon[i]=470;break;case"GLACEON":case 471:m.banned_pokemon[i]=471;break;case"GLISCOR":case 472:m.banned_pokemon[i]=472;break;case"MAMOSWINE":case 473:m.banned_pokemon[i]=473;break;case"PORYGON_Z":case 474:m.banned_pokemon[i]=474;break;case"GALLADE":case 475:m.banned_pokemon[i]=475;break;case"PROBOPASS":case 476:m.banned_pokemon[i]=476;break;case"DUSKNOIR":case 477:m.banned_pokemon[i]=477;break;case"FROSLASS":case 478:m.banned_pokemon[i]=478;break;case"ROTOM":case 479:m.banned_pokemon[i]=479;break;case"UXIE":case 480:m.banned_pokemon[i]=480;break;case"MESPRIT":case 481:m.banned_pokemon[i]=481;break;case"AZELF":case 482:m.banned_pokemon[i]=482;break;case"DIALGA":case 483:m.banned_pokemon[i]=483;break;case"PALKIA":case 484:m.banned_pokemon[i]=484;break;case"HEATRAN":case 485:m.banned_pokemon[i]=485;break;case"REGIGIGAS":case 486:m.banned_pokemon[i]=486;break;case"GIRATINA":case 487:m.banned_pokemon[i]=487;break;case"CRESSELIA":case 488:m.banned_pokemon[i]=488;break;case"PHIONE":case 489:m.banned_pokemon[i]=489;break;case"MANAPHY":case 490:m.banned_pokemon[i]=490;break;case"DARKRAI":case 491:m.banned_pokemon[i]=491;break;case"SHAYMIN":case 492:m.banned_pokemon[i]=492;break;case"ARCEUS":case 493:m.banned_pokemon[i]=493;break;case"MELTAN":case 808:m.banned_pokemon[i]=808;break;case"MELMETAL":case 809:m.banned_pokemon[i]=809;break}}}switch(d.badge_type){case"BADGE_UNSET":case 0:m.badge_type=0;break;case"BADGE_TRAVEL_KM":case 1:m.badge_type=1;break;case"BADGE_POKEDEX_ENTRIES":case 2:m.badge_type=2;break;case"BADGE_CAPTURE_TOTAL":case 3:m.badge_type=3;break;case"BADGE_DEFEATED_FORT":case 4:m.badge_type=4;break;case"BADGE_EVOLVED_TOTAL":case 5:m.badge_type=5;break;case"BADGE_HATCHED_TOTAL":case 6:m.badge_type=6;break;case"BADGE_ENCOUNTERED_TOTAL":case 7:m.badge_type=7;break;case"BADGE_POKESTOPS_VISITED":case 8:m.badge_type=8;break;case"BADGE_UNIQUE_POKESTOPS":case 9:m.badge_type=9;break;case"BADGE_POKEBALL_THROWN":case 10:m.badge_type=10;break;case"BADGE_BIG_MAGIKARP":case 11:m.badge_type=11;break;case"BADGE_DEPLOYED_TOTAL":case 12:m.badge_type=12;break;case"BADGE_BATTLE_ATTACK_WON":case 13:m.badge_type=13;break;case"BADGE_BATTLE_TRAINING_WON":case 14:m.badge_type=14;break;case"BADGE_BATTLE_DEFEND_WON":case 15:m.badge_type=15;break;case"BADGE_PRESTIGE_RAISED":case 16:m.badge_type=16;break;case"BADGE_PRESTIGE_DROPPED":case 17:m.badge_type=17;break;case"BADGE_TYPE_NORMAL":case 18:m.badge_type=18;break;case"BADGE_TYPE_FIGHTING":case 19:m.badge_type=19;break;case"BADGE_TYPE_FLYING":case 20:m.badge_type=20;break;case"BADGE_TYPE_POISON":case 21:m.badge_type=21;break;case"BADGE_TYPE_GROUND":case 22:m.badge_type=22;break;case"BADGE_TYPE_ROCK":case 23:m.badge_type=23;break;case"BADGE_TYPE_BUG":case 24:m.badge_type=24;break;case"BADGE_TYPE_GHOST":case 25:m.badge_type=25;break;case"BADGE_TYPE_STEEL":case 26:m.badge_type=26;break;case"BADGE_TYPE_FIRE":case 27:m.badge_type=27;break;case"BADGE_TYPE_WATER":case 28:m.badge_type=28;break;case"BADGE_TYPE_GRASS":case 29:m.badge_type=29;break;case"BADGE_TYPE_ELECTRIC":case 30:m.badge_type=30;break;case"BADGE_TYPE_PSYCHIC":case 31:m.badge_type=31;break;case"BADGE_TYPE_ICE":case 32:m.badge_type=32;break;case"BADGE_TYPE_DRAGON":case 33:m.badge_type=33;break;case"BADGE_TYPE_DARK":case 34:m.badge_type=34;break;case"BADGE_TYPE_FAIRY":case 35:m.badge_type=35;break;case"BADGE_SMALL_RATTATA":case 36:m.badge_type=36;break;case"BADGE_PIKACHU":case 37:m.badge_type=37;break;case"BADGE_UNOWN":case 38:m.badge_type=38;break;case"BADGE_POKEDEX_ENTRIES_GEN2":case 39:m.badge_type=39;break;case"BADGE_RAID_BATTLE_WON":case 40:m.badge_type=40;break;case"BADGE_LEGENDARY_BATTLE_WON":case 41:m.badge_type=41;break;case"BADGE_BERRIES_FED":case 42:m.badge_type=42;break;case"BADGE_HOURS_DEFENDED":case 43:m.badge_type=43;break;case"BADGE_PLACE_HOLDER":case 44:m.badge_type=44;break;case"BADGE_POKEDEX_ENTRIES_GEN3":case 45:m.badge_type=45;break;case"BADGE_CHALLENGE_QUESTS":case 46:m.badge_type=46;break;case"BADGE_MEW_ENCOUNTER":case 47:m.badge_type=47;break;case"BADGE_MAX_LEVEL_FRIENDS":case 48:m.badge_type=48;break;case"BADGE_TRADING":case 49:m.badge_type=49;break;case"BADGE_TRADING_DISTANCE":case 50:m.badge_type=50;break;case"BADGE_POKEDEX_ENTRIES_GEN4":case 51:m.badge_type=51;break;case"BADGE_GREAT_LEAGUE":case 52:m.badge_type=52;break;case"BADGE_ULTRA_LEAGUE":case 53:m.badge_type=53;break;case"BADGE_MASTER_LEAGUE":case 54:m.badge_type=54;break;case"BADGE_EVENT_MIN":case 2e3:m.badge_type=2e3;break;case"BADGE_CHICAGO_FEST_JULY_2017":case 2001:m.badge_type=2001;break;case"BADGE_PIKACHU_OUTBREAK_YOKOHAMA_2017":case 2002:m.badge_type=2002;break;case"BADGE_SAFARI_ZONE_EUROPE_2017":case 2003:m.badge_type=2003;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_07":case 2004:m.badge_type=2004;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_14":case 2005:m.badge_type=2005;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_NORTH":case 2006:m.badge_type=2006;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_SOUTH":case 2007:m.badge_type=2007;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_NORTH":case 2008:m.badge_type=2008;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_SOUTH":case 2009:m.badge_type=2009;break;case"BADGE_APAC_PARTNER_JULY_2018_0":case 2010:m.badge_type=2010;break;case"BADGE_APAC_PARTNER_JULY_2018_1":case 2011:m.badge_type=2011;break;case"BADGE_APAC_PARTNER_JULY_2018_2":case 2012:m.badge_type=2012;break;case"BADGE_APAC_PARTNER_JULY_2018_3":case 2013:m.badge_type=2013;break;case"BADGE_APAC_PARTNER_JULY_2018_4":case 2014:m.badge_type=2014;break;case"BADGE_APAC_PARTNER_JULY_2018_5":case 2015:m.badge_type=2015;break;case"BADGE_APAC_PARTNER_JULY_2018_6":case 2016:m.badge_type=2016;break;case"BADGE_APAC_PARTNER_JULY_2018_7":case 2017:m.badge_type=2017;break;case"BADGE_APAC_PARTNER_JULY_2018_8":case 2018:m.badge_type=2018;break;case"BADGE_APAC_PARTNER_JULY_2018_9":case 2019:m.badge_type=2019;break;case"BADGE_YOKOSUKA_29_AUG_2018_MIKASA":case 2020:m.badge_type=2020;break;case"BADGE_YOKOSUKA_29_AUG_2018_VERNY":case 2021:m.badge_type=2021;break;case"BADGE_YOKOSUKA_29_AUG_2018_KURIHAMA":case 2022:m.badge_type=2022;break;case"BADGE_YOKOSUKA_30_AUG_2018_MIKASA":case 2023:m.badge_type=2023;break;case"BADGE_YOKOSUKA_30_AUG_2018_VERNY":case 2024:m.badge_type=2024;break;case"BADGE_YOKOSUKA_30_AUG_2018_KURIHAMA":case 2025:m.badge_type=2025;break;case"BADGE_YOKOSUKA_31_AUG_2018_MIKASA":case 2026:m.badge_type=2026;break;case"BADGE_YOKOSUKA_31_AUG_2018_VERNY":case 2027:m.badge_type=2027;break;case"BADGE_YOKOSUKA_31_AUG_2018_KURIHAMA":case 2028:m.badge_type=2028;break;case"BADGE_YOKOSUKA_1_SEP_2018_MIKASA":case 2029:m.badge_type=2029;break;case"BADGE_YOKOSUKA_1_SEP_2018_VERNY":case 2030:m.badge_type=2030;break;case"BADGE_YOKOSUKA_1_SEP_2018_KURIHAMA":case 2031:m.badge_type=2031;break;case"BADGE_YOKOSUKA_2_SEP_2018_MIKASA":case 2032:m.badge_type=2032;break;case"BADGE_YOKOSUKA_2_SEP_2018_VERNY":case 2033:m.badge_type=2033;break;case"BADGE_YOKOSUKA_2_SEP_2018_KURIHAMA":case 2034:m.badge_type=2034;break;case"BADGE_TOP_BANANA_1":case 2035:m.badge_type=2035;break;case"BADGE_TOP_BANANA_2":case 2036:m.badge_type=2036;break;case"BADGE_TOP_BANANA_3":case 2037:m.badge_type=2037;break}if(d.minigame_defense_chance_limit!=null){m.minigame_defense_chance_limit=d.minigame_defense_chance_limit|0}return m};CombatLeague.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.unlock_condition=[];d.pokemon_condition=[];d.banned_pokemon=[]}if(o.defaults){d.title="";d.enabled=false;d.icon_url="";d.pokemon_count=0;d.badge_type=o.enums===String?"BADGE_UNSET":0;d.minigame_defense_chance_limit=0}if(m.title!=null&&m.hasOwnProperty("title")){d.title=m.title}if(m.enabled!=null&&m.hasOwnProperty("enabled")){d.enabled=m.enabled}if(m.unlock_condition&&m.unlock_condition.length){d.unlock_condition=[];for(var j=0;j<m.unlock_condition.length;++j){d.unlock_condition[j]=$root.POGOProtos.Data.Combat.UnlockCondition.toObject(m.unlock_condition[j],o)}}if(m.pokemon_condition&&m.pokemon_condition.length){d.pokemon_condition=[];for(var j=0;j<m.pokemon_condition.length;++j){d.pokemon_condition[j]=$root.POGOProtos.Data.Combat.PokemonCondition.toObject(m.pokemon_condition[j],o)}}if(m.icon_url!=null&&m.hasOwnProperty("icon_url")){d.icon_url=m.icon_url}if(m.pokemon_count!=null&&m.hasOwnProperty("pokemon_count")){d.pokemon_count=m.pokemon_count}if(m.banned_pokemon&&m.banned_pokemon.length){d.banned_pokemon=[];for(var j=0;j<m.banned_pokemon.length;++j){d.banned_pokemon[j]=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.banned_pokemon[j]]:m.banned_pokemon[j]}}if(m.badge_type!=null&&m.hasOwnProperty("badge_type")){d.badge_type=o.enums===String?$root.POGOProtos.Enums.BadgeType[m.badge_type]:m.badge_type}if(m.minigame_defense_chance_limit!=null&&m.hasOwnProperty("minigame_defense_chance_limit")){d.minigame_defense_chance_limit=m.minigame_defense_chance_limit}return d};CombatLeague.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatLeague}();Master.CombatLeagueSettings=function(){function CombatLeagueSettings(p){this.combat_league_template_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatLeagueSettings.prototype.combat_league_template_id=$util.emptyArray;CombatLeagueSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.combat_league_template_id!=null&&m.combat_league_template_id.length){for(var i=0;i<m.combat_league_template_id.length;++i)w.uint32(10).string(m.combat_league_template_id[i])}return w};CombatLeagueSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.CombatLeagueSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.combat_league_template_id&&m.combat_league_template_id.length))m.combat_league_template_id=[];m.combat_league_template_id.push(r.string());break;default:r.skipType(t&7);break}}return m};CombatLeagueSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.CombatLeagueSettings)return d;var m=new $root.POGOProtos.Settings.Master.CombatLeagueSettings;if(d.combat_league_template_id){if(!Array.isArray(d.combat_league_template_id))throw TypeError(".POGOProtos.Settings.Master.CombatLeagueSettings.combat_league_template_id: array expected");m.combat_league_template_id=[];for(var i=0;i<d.combat_league_template_id.length;++i){m.combat_league_template_id[i]=String(d.combat_league_template_id[i])}}return m};CombatLeagueSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.combat_league_template_id=[]}if(m.combat_league_template_id&&m.combat_league_template_id.length){d.combat_league_template_id=[];for(var j=0;j<m.combat_league_template_id.length;++j){d.combat_league_template_id[j]=m.combat_league_template_id[j]}}return d};CombatLeagueSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatLeagueSettings}();Master.CombatMoveSettings=function(){function CombatMoveSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatMoveSettings.prototype.unique_id=0;CombatMoveSettings.prototype.type=0;CombatMoveSettings.prototype.power=0;CombatMoveSettings.prototype.vfx_name="";CombatMoveSettings.prototype.duration_turns=0;CombatMoveSettings.prototype.energy_delta=0;CombatMoveSettings.prototype.buffs=null;CombatMoveSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.unique_id!=null&&m.hasOwnProperty("unique_id"))w.uint32(8).int32(m.unique_id);if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(16).int32(m.type);if(m.power!=null&&m.hasOwnProperty("power"))w.uint32(29).float(m.power);if(m.vfx_name!=null&&m.hasOwnProperty("vfx_name"))w.uint32(34).string(m.vfx_name);if(m.duration_turns!=null&&m.hasOwnProperty("duration_turns"))w.uint32(40).int32(m.duration_turns);if(m.energy_delta!=null&&m.hasOwnProperty("energy_delta"))w.uint32(48).int32(m.energy_delta);if(m.buffs!=null&&m.hasOwnProperty("buffs"))$root.POGOProtos.Data.Combat.CombatMoveBuffs.encode(m.buffs,w.uint32(58).fork()).ldelim();return w};CombatMoveSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.CombatMoveSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.unique_id=r.int32();break;case 2:m.type=r.int32();break;case 3:m.power=r.float();break;case 4:m.vfx_name=r.string();break;case 5:m.duration_turns=r.int32();break;case 6:m.energy_delta=r.int32();break;case 7:m.buffs=$root.POGOProtos.Data.Combat.CombatMoveBuffs.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};CombatMoveSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.CombatMoveSettings)return d;var m=new $root.POGOProtos.Settings.Master.CombatMoveSettings;switch(d.unique_id){case"MOVE_UNSET":case 0:m.unique_id=0;break;case"THUNDER_SHOCK":case 1:m.unique_id=1;break;case"QUICK_ATTACK":case 2:m.unique_id=2;break;case"SCRATCH":case 3:m.unique_id=3;break;case"EMBER":case 4:m.unique_id=4;break;case"VINE_WHIP":case 5:m.unique_id=5;break;case"TACKLE":case 6:m.unique_id=6;break;case"RAZOR_LEAF":case 7:m.unique_id=7;break;case"TAKE_DOWN":case 8:m.unique_id=8;break;case"WATER_GUN":case 9:m.unique_id=9;break;case"BITE":case 10:m.unique_id=10;break;case"POUND":case 11:m.unique_id=11;break;case"DOUBLE_SLAP":case 12:m.unique_id=12;break;case"WRAP":case 13:m.unique_id=13;break;case"HYPER_BEAM":case 14:m.unique_id=14;break;case"LICK":case 15:m.unique_id=15;break;case"DARK_PULSE":case 16:m.unique_id=16;break;case"SMOG":case 17:m.unique_id=17;break;case"SLUDGE":case 18:m.unique_id=18;break;case"METAL_CLAW":case 19:m.unique_id=19;break;case"VICE_GRIP":case 20:m.unique_id=20;break;case"FLAME_WHEEL":case 21:m.unique_id=21;break;case"MEGAHORN":case 22:m.unique_id=22;break;case"WING_ATTACK":case 23:m.unique_id=23;break;case"FLAMETHROWER":case 24:m.unique_id=24;break;case"SUCKER_PUNCH":case 25:m.unique_id=25;break;case"DIG":case 26:m.unique_id=26;break;case"LOW_KICK":case 27:m.unique_id=27;break;case"CROSS_CHOP":case 28:m.unique_id=28;break;case"PSYCHO_CUT":case 29:m.unique_id=29;break;case"PSYBEAM":case 30:m.unique_id=30;break;case"EARTHQUAKE":case 31:m.unique_id=31;break;case"STONE_EDGE":case 32:m.unique_id=32;break;case"ICE_PUNCH":case 33:m.unique_id=33;break;case"HEART_STAMP":case 34:m.unique_id=34;break;case"DISCHARGE":case 35:m.unique_id=35;break;case"FLASH_CANNON":case 36:m.unique_id=36;break;case"PECK":case 37:m.unique_id=37;break;case"DRILL_PECK":case 38:m.unique_id=38;break;case"ICE_BEAM":case 39:m.unique_id=39;break;case"BLIZZARD":case 40:m.unique_id=40;break;case"AIR_SLASH":case 41:m.unique_id=41;break;case"HEAT_WAVE":case 42:m.unique_id=42;break;case"TWINEEDLE":case 43:m.unique_id=43;break;case"POISON_JAB":case 44:m.unique_id=44;break;case"AERIAL_ACE":case 45:m.unique_id=45;break;case"DRILL_RUN":case 46:m.unique_id=46;break;case"PETAL_BLIZZARD":case 47:m.unique_id=47;break;case"MEGA_DRAIN":case 48:m.unique_id=48;break;case"BUG_BUZZ":case 49:m.unique_id=49;break;case"POISON_FANG":case 50:m.unique_id=50;break;case"NIGHT_SLASH":case 51:m.unique_id=51;break;case"SLASH":case 52:m.unique_id=52;break;case"BUBBLE_BEAM":case 53:m.unique_id=53;break;case"SUBMISSION":case 54:m.unique_id=54;break;case"KARATE_CHOP":case 55:m.unique_id=55;break;case"LOW_SWEEP":case 56:m.unique_id=56;break;case"AQUA_JET":case 57:m.unique_id=57;break;case"AQUA_TAIL":case 58:m.unique_id=58;break;case"SEED_BOMB":case 59:m.unique_id=59;break;case"PSYSHOCK":case 60:m.unique_id=60;break;case"ROCK_THROW":case 61:m.unique_id=61;break;case"ANCIENT_POWER":case 62:m.unique_id=62;break;case"ROCK_TOMB":case 63:m.unique_id=63;break;case"ROCK_SLIDE":case 64:m.unique_id=64;break;case"POWER_GEM":case 65:m.unique_id=65;break;case"SHADOW_SNEAK":case 66:m.unique_id=66;break;case"SHADOW_PUNCH":case 67:m.unique_id=67;break;case"SHADOW_CLAW":case 68:m.unique_id=68;break;case"OMINOUS_WIND":case 69:m.unique_id=69;break;case"SHADOW_BALL":case 70:m.unique_id=70;break;case"BULLET_PUNCH":case 71:m.unique_id=71;break;case"MAGNET_BOMB":case 72:m.unique_id=72;break;case"STEEL_WING":case 73:m.unique_id=73;break;case"IRON_HEAD":case 74:m.unique_id=74;break;case"PARABOLIC_CHARGE":case 75:m.unique_id=75;break;case"SPARK":case 76:m.unique_id=76;break;case"THUNDER_PUNCH":case 77:m.unique_id=77;break;case"THUNDER":case 78:m.unique_id=78;break;case"THUNDERBOLT":case 79:m.unique_id=79;break;case"TWISTER":case 80:m.unique_id=80;break;case"DRAGON_BREATH":case 81:m.unique_id=81;break;case"DRAGON_PULSE":case 82:m.unique_id=82;break;case"DRAGON_CLAW":case 83:m.unique_id=83;break;case"DISARMING_VOICE":case 84:m.unique_id=84;break;case"DRAINING_KISS":case 85:m.unique_id=85;break;case"DAZZLING_GLEAM":case 86:m.unique_id=86;break;case"MOONBLAST":case 87:m.unique_id=87;break;case"PLAY_ROUGH":case 88:m.unique_id=88;break;case"CROSS_POISON":case 89:m.unique_id=89;break;case"SLUDGE_BOMB":case 90:m.unique_id=90;break;case"SLUDGE_WAVE":case 91:m.unique_id=91;break;case"GUNK_SHOT":case 92:m.unique_id=92;break;case"MUD_SHOT":case 93:m.unique_id=93;break;case"BONE_CLUB":case 94:m.unique_id=94;break;case"BULLDOZE":case 95:m.unique_id=95;break;case"MUD_BOMB":case 96:m.unique_id=96;break;case"FURY_CUTTER":case 97:m.unique_id=97;break;case"BUG_BITE":case 98:m.unique_id=98;break;case"SIGNAL_BEAM":case 99:m.unique_id=99;break;case"X_SCISSOR":case 100:m.unique_id=100;break;case"FLAME_CHARGE":case 101:m.unique_id=101;break;case"FLAME_BURST":case 102:m.unique_id=102;break;case"FIRE_BLAST":case 103:m.unique_id=103;break;case"BRINE":case 104:m.unique_id=104;break;case"WATER_PULSE":case 105:m.unique_id=105;break;case"SCALD":case 106:m.unique_id=106;break;case"HYDRO_PUMP":case 107:m.unique_id=107;break;case"PSYCHIC":case 108:m.unique_id=108;break;case"PSYSTRIKE":case 109:m.unique_id=109;break;case"ICE_SHARD":case 110:m.unique_id=110;break;case"ICY_WIND":case 111:m.unique_id=111;break;case"FROST_BREATH":case 112:m.unique_id=112;break;case"ABSORB":case 113:m.unique_id=113;break;case"GIGA_DRAIN":case 114:m.unique_id=114;break;case"FIRE_PUNCH":case 115:m.unique_id=115;break;case"SOLAR_BEAM":case 116:m.unique_id=116;break;case"LEAF_BLADE":case 117:m.unique_id=117;break;case"POWER_WHIP":case 118:m.unique_id=118;break;case"SPLASH":case 119:m.unique_id=119;break;case"ACID":case 120:m.unique_id=120;break;case"AIR_CUTTER":case 121:m.unique_id=121;break;case"HURRICANE":case 122:m.unique_id=122;break;case"BRICK_BREAK":case 123:m.unique_id=123;break;case"CUT":case 124:m.unique_id=124;break;case"SWIFT":case 125:m.unique_id=125;break;case"HORN_ATTACK":case 126:m.unique_id=126;break;case"STOMP":case 127:m.unique_id=127;break;case"HEADBUTT":case 128:m.unique_id=128;break;case"HYPER_FANG":case 129:m.unique_id=129;break;case"SLAM":case 130:m.unique_id=130;break;case"BODY_SLAM":case 131:m.unique_id=131;break;case"REST":case 132:m.unique_id=132;break;case"STRUGGLE":case 133:m.unique_id=133;break;case"SCALD_BLASTOISE":case 134:m.unique_id=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.unique_id=135;break;case"WRAP_GREEN":case 136:m.unique_id=136;break;case"WRAP_PINK":case 137:m.unique_id=137;break;case"FURY_CUTTER_FAST":case 200:m.unique_id=200;break;case"BUG_BITE_FAST":case 201:m.unique_id=201;break;case"BITE_FAST":case 202:m.unique_id=202;break;case"SUCKER_PUNCH_FAST":case 203:m.unique_id=203;break;case"DRAGON_BREATH_FAST":case 204:m.unique_id=204;break;case"THUNDER_SHOCK_FAST":case 205:m.unique_id=205;break;case"SPARK_FAST":case 206:m.unique_id=206;break;case"LOW_KICK_FAST":case 207:m.unique_id=207;break;case"KARATE_CHOP_FAST":case 208:m.unique_id=208;break;case"EMBER_FAST":case 209:m.unique_id=209;break;case"WING_ATTACK_FAST":case 210:m.unique_id=210;break;case"PECK_FAST":case 211:m.unique_id=211;break;case"LICK_FAST":case 212:m.unique_id=212;break;case"SHADOW_CLAW_FAST":case 213:m.unique_id=213;break;case"VINE_WHIP_FAST":case 214:m.unique_id=214;break;case"RAZOR_LEAF_FAST":case 215:m.unique_id=215;break;case"MUD_SHOT_FAST":case 216:m.unique_id=216;break;case"ICE_SHARD_FAST":case 217:m.unique_id=217;break;case"FROST_BREATH_FAST":case 218:m.unique_id=218;break;case"QUICK_ATTACK_FAST":case 219:m.unique_id=219;break;case"SCRATCH_FAST":case 220:m.unique_id=220;break;case"TACKLE_FAST":case 221:m.unique_id=221;break;case"POUND_FAST":case 222:m.unique_id=222;break;case"CUT_FAST":case 223:m.unique_id=223;break;case"POISON_JAB_FAST":case 224:m.unique_id=224;break;case"ACID_FAST":case 225:m.unique_id=225;break;case"PSYCHO_CUT_FAST":case 226:m.unique_id=226;break;case"ROCK_THROW_FAST":case 227:m.unique_id=227;break;case"METAL_CLAW_FAST":case 228:m.unique_id=228;break;case"BULLET_PUNCH_FAST":case 229:m.unique_id=229;break;case"WATER_GUN_FAST":case 230:m.unique_id=230;break;case"SPLASH_FAST":case 231:m.unique_id=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.unique_id=232;break;case"MUD_SLAP_FAST":case 233:m.unique_id=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.unique_id=234;break;case"CONFUSION_FAST":case 235:m.unique_id=235;break;case"POISON_STING_FAST":case 236:m.unique_id=236;break;case"BUBBLE_FAST":case 237:m.unique_id=237;break;case"FEINT_ATTACK_FAST":case 238:m.unique_id=238;break;case"STEEL_WING_FAST":case 239:m.unique_id=239;break;case"FIRE_FANG_FAST":case 240:m.unique_id=240;break;case"ROCK_SMASH_FAST":case 241:m.unique_id=241;break;case"TRANSFORM_FAST":case 242:m.unique_id=242;break;case"COUNTER_FAST":case 243:m.unique_id=243;break;case"POWDER_SNOW_FAST":case 244:m.unique_id=244;break;case"CLOSE_COMBAT":case 245:m.unique_id=245;break;case"DYNAMIC_PUNCH":case 246:m.unique_id=246;break;case"FOCUS_BLAST":case 247:m.unique_id=247;break;case"AURORA_BEAM":case 248:m.unique_id=248;break;case"CHARGE_BEAM_FAST":case 249:m.unique_id=249;break;case"VOLT_SWITCH_FAST":case 250:m.unique_id=250;break;case"WILD_CHARGE":case 251:m.unique_id=251;break;case"ZAP_CANNON":case 252:m.unique_id=252;break;case"DRAGON_TAIL_FAST":case 253:m.unique_id=253;break;case"AVALANCHE":case 254:m.unique_id=254;break;case"AIR_SLASH_FAST":case 255:m.unique_id=255;break;case"BRAVE_BIRD":case 256:m.unique_id=256;break;case"SKY_ATTACK":case 257:m.unique_id=257;break;case"SAND_TOMB":case 258:m.unique_id=258;break;case"ROCK_BLAST":case 259:m.unique_id=259;break;case"INFESTATION_FAST":case 260:m.unique_id=260;break;case"STRUGGLE_BUG_FAST":case 261:m.unique_id=261;break;case"SILVER_WIND":case 262:m.unique_id=262;break;case"ASTONISH_FAST":case 263:m.unique_id=263;break;case"HEX_FAST":case 264:m.unique_id=264;break;case"NIGHT_SHADE":case 265:m.unique_id=265;break;case"IRON_TAIL_FAST":case 266:m.unique_id=266;break;case"GYRO_BALL":case 267:m.unique_id=267;break;case"HEAVY_SLAM":case 268:m.unique_id=268;break;case"FIRE_SPIN_FAST":case 269:m.unique_id=269;break;case"OVERHEAT":case 270:m.unique_id=270;break;case"BULLET_SEED_FAST":case 271:m.unique_id=271;break;case"GRASS_KNOT":case 272:m.unique_id=272;break;case"ENERGY_BALL":case 273:m.unique_id=273;break;case"EXTRASENSORY_FAST":case 274:m.unique_id=274;break;case"FUTURESIGHT":case 275:m.unique_id=275;break;case"MIRROR_COAT":case 276:m.unique_id=276;break;case"OUTRAGE":case 277:m.unique_id=277;break;case"SNARL_FAST":case 278:m.unique_id=278;break;case"CRUNCH":case 279:m.unique_id=279;break;case"FOUL_PLAY":case 280:m.unique_id=280;break;case"HIDDEN_POWER_FAST":case 281:m.unique_id=281;break;case"TAKE_DOWN_FAST":case 282:m.unique_id=282;break;case"WATERFALL_FAST":case 283:m.unique_id=283;break;case"SURF":case 284:m.unique_id=284;break;case"DRACO_METEOR":case 285:m.unique_id=285;break;case"DOOM_DESIRE":case 286:m.unique_id=286;break;case"YAWN_FAST":case 287:m.unique_id=287;break;case"PSYCHO_BOOST":case 288:m.unique_id=288;break;case"ORIGIN_PULSE":case 289:m.unique_id=289;break;case"PRECIPICE_BLADES":case 290:m.unique_id=290;break;case"PRESENT_FAST":case 291:m.unique_id=291;break;case"WEATHER_BALL_FIRE":case 292:m.unique_id=292;break;case"WEATHER_BALL_ICE":case 293:m.unique_id=293;break;case"WEATHER_BALL_ROCK":case 294:m.unique_id=294;break;case"WEATHER_BALL_WATER":case 295:m.unique_id=295;break;case"FRENZY_PLANT":case 296:m.unique_id=296;break;case"SMACK_DOWN_FAST":case 297:m.unique_id=297;break;case"BLAST_BURN":case 298:m.unique_id=298;break;case"HYDRO_CANNON":case 299:m.unique_id=299;break;case"LAST_RESORT":case 300:m.unique_id=300;break;case"METEOR_MASH":case 301:m.unique_id=301;break;case"SKULL_BASH":case 302:m.unique_id=302;break;case"ACID_SPRAY":case 303:m.unique_id=303;break;case"EARTH_POWER":case 304:m.unique_id=304;break;case"CRABHAMMER":case 305:m.unique_id=305;break;case"LUNGE":case 306:m.unique_id=306;break;case"CRUSH_CLAW":case 307:m.unique_id=307;break;case"OCTAZOOKA":case 308:m.unique_id=308;break;case"MIRROR_SHOT":case 309:m.unique_id=309;break;case"SUPER_POWER":case 310:m.unique_id=310;break;case"FELL_STINGER":case 311:m.unique_id=311;break;case"LEAF_TORNADO":case 312:m.unique_id=312;break;case"LEECH_LIFE":case 313:m.unique_id=313;break;case"DRAIN_PUNCH":case 314:m.unique_id=314;break;case"SHADOW_BONE":case 315:m.unique_id=315;break;case"MUDDY_WATER":case 316:m.unique_id=316;break;case"BLAZE_KICK":case 317:m.unique_id=317;break;case"RAZOR_SHELL":case 318:m.unique_id=318;break;case"POWER_UP_PUNCH":case 319:m.unique_id=319;break}switch(d.type){case"POKEMON_TYPE_NONE":case 0:m.type=0;break;case"POKEMON_TYPE_NORMAL":case 1:m.type=1;break;case"POKEMON_TYPE_FIGHTING":case 2:m.type=2;break;case"POKEMON_TYPE_FLYING":case 3:m.type=3;break;case"POKEMON_TYPE_POISON":case 4:m.type=4;break;case"POKEMON_TYPE_GROUND":case 5:m.type=5;break;case"POKEMON_TYPE_ROCK":case 6:m.type=6;break;case"POKEMON_TYPE_BUG":case 7:m.type=7;break;case"POKEMON_TYPE_GHOST":case 8:m.type=8;break;case"POKEMON_TYPE_STEEL":case 9:m.type=9;break;case"POKEMON_TYPE_FIRE":case 10:m.type=10;break;case"POKEMON_TYPE_WATER":case 11:m.type=11;break;case"POKEMON_TYPE_GRASS":case 12:m.type=12;break;case"POKEMON_TYPE_ELECTRIC":case 13:m.type=13;break;case"POKEMON_TYPE_PSYCHIC":case 14:m.type=14;break;case"POKEMON_TYPE_ICE":case 15:m.type=15;break;case"POKEMON_TYPE_DRAGON":case 16:m.type=16;break;case"POKEMON_TYPE_DARK":case 17:m.type=17;break;case"POKEMON_TYPE_FAIRY":case 18:m.type=18;break}if(d.power!=null){m.power=Number(d.power)}if(d.vfx_name!=null){m.vfx_name=String(d.vfx_name)}if(d.duration_turns!=null){m.duration_turns=d.duration_turns|0}if(d.energy_delta!=null){m.energy_delta=d.energy_delta|0}if(d.buffs!=null){if(typeof d.buffs!=="object")throw TypeError(".POGOProtos.Settings.Master.CombatMoveSettings.buffs: object expected");m.buffs=$root.POGOProtos.Data.Combat.CombatMoveBuffs.fromObject(d.buffs)}return m};CombatMoveSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.unique_id=o.enums===String?"MOVE_UNSET":0;d.type=o.enums===String?"POKEMON_TYPE_NONE":0;d.power=0;d.vfx_name="";d.duration_turns=0;d.energy_delta=0;d.buffs=null}if(m.unique_id!=null&&m.hasOwnProperty("unique_id")){d.unique_id=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.unique_id]:m.unique_id}if(m.type!=null&&m.hasOwnProperty("type")){d.type=o.enums===String?$root.POGOProtos.Enums.PokemonType[m.type]:m.type}if(m.power!=null&&m.hasOwnProperty("power")){d.power=o.json&&!isFinite(m.power)?String(m.power):m.power}if(m.vfx_name!=null&&m.hasOwnProperty("vfx_name")){d.vfx_name=m.vfx_name}if(m.duration_turns!=null&&m.hasOwnProperty("duration_turns")){d.duration_turns=m.duration_turns}if(m.energy_delta!=null&&m.hasOwnProperty("energy_delta")){d.energy_delta=m.energy_delta}if(m.buffs!=null&&m.hasOwnProperty("buffs")){d.buffs=$root.POGOProtos.Data.Combat.CombatMoveBuffs.toObject(m.buffs,o)}return d};CombatMoveSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatMoveSettings}();Master.CombatNpcPersonality=function(){function CombatNpcPersonality(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatNpcPersonality.prototype.personality_name="";CombatNpcPersonality.prototype.super_effective_chance=0;CombatNpcPersonality.prototype.special_chance=0;CombatNpcPersonality.prototype.defensive_minimum_score=0;CombatNpcPersonality.prototype.defensive_maximum_score=0;CombatNpcPersonality.prototype.offensive_minimum_score=0;CombatNpcPersonality.prototype.offensive_maximum_score=0;CombatNpcPersonality.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.personality_name!=null&&m.hasOwnProperty("personality_name"))w.uint32(10).string(m.personality_name);if(m.super_effective_chance!=null&&m.hasOwnProperty("super_effective_chance"))w.uint32(21).float(m.super_effective_chance);if(m.special_chance!=null&&m.hasOwnProperty("special_chance"))w.uint32(29).float(m.special_chance);if(m.defensive_minimum_score!=null&&m.hasOwnProperty("defensive_minimum_score"))w.uint32(37).float(m.defensive_minimum_score);if(m.defensive_maximum_score!=null&&m.hasOwnProperty("defensive_maximum_score"))w.uint32(45).float(m.defensive_maximum_score);if(m.offensive_minimum_score!=null&&m.hasOwnProperty("offensive_minimum_score"))w.uint32(53).float(m.offensive_minimum_score);if(m.offensive_maximum_score!=null&&m.hasOwnProperty("offensive_maximum_score"))w.uint32(61).float(m.offensive_maximum_score);return w};CombatNpcPersonality.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.CombatNpcPersonality;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.personality_name=r.string();break;case 2:m.super_effective_chance=r.float();break;case 3:m.special_chance=r.float();break;case 4:m.defensive_minimum_score=r.float();break;case 5:m.defensive_maximum_score=r.float();break;case 6:m.offensive_minimum_score=r.float();break;case 7:m.offensive_maximum_score=r.float();break;default:r.skipType(t&7);break}}return m};CombatNpcPersonality.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.CombatNpcPersonality)return d;var m=new $root.POGOProtos.Settings.Master.CombatNpcPersonality;if(d.personality_name!=null){m.personality_name=String(d.personality_name)}if(d.super_effective_chance!=null){m.super_effective_chance=Number(d.super_effective_chance)}if(d.special_chance!=null){m.special_chance=Number(d.special_chance)}if(d.defensive_minimum_score!=null){m.defensive_minimum_score=Number(d.defensive_minimum_score)}if(d.defensive_maximum_score!=null){m.defensive_maximum_score=Number(d.defensive_maximum_score)}if(d.offensive_minimum_score!=null){m.offensive_minimum_score=Number(d.offensive_minimum_score)}if(d.offensive_maximum_score!=null){m.offensive_maximum_score=Number(d.offensive_maximum_score)}return m};CombatNpcPersonality.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.personality_name="";d.super_effective_chance=0;d.special_chance=0;d.defensive_minimum_score=0;d.defensive_maximum_score=0;d.offensive_minimum_score=0;d.offensive_maximum_score=0}if(m.personality_name!=null&&m.hasOwnProperty("personality_name")){d.personality_name=m.personality_name}if(m.super_effective_chance!=null&&m.hasOwnProperty("super_effective_chance")){d.super_effective_chance=o.json&&!isFinite(m.super_effective_chance)?String(m.super_effective_chance):m.super_effective_chance}if(m.special_chance!=null&&m.hasOwnProperty("special_chance")){d.special_chance=o.json&&!isFinite(m.special_chance)?String(m.special_chance):m.special_chance}if(m.defensive_minimum_score!=null&&m.hasOwnProperty("defensive_minimum_score")){d.defensive_minimum_score=o.json&&!isFinite(m.defensive_minimum_score)?String(m.defensive_minimum_score):m.defensive_minimum_score}if(m.defensive_maximum_score!=null&&m.hasOwnProperty("defensive_maximum_score")){d.defensive_maximum_score=o.json&&!isFinite(m.defensive_maximum_score)?String(m.defensive_maximum_score):m.defensive_maximum_score}if(m.offensive_minimum_score!=null&&m.hasOwnProperty("offensive_minimum_score")){d.offensive_minimum_score=o.json&&!isFinite(m.offensive_minimum_score)?String(m.offensive_minimum_score):m.offensive_minimum_score}if(m.offensive_maximum_score!=null&&m.hasOwnProperty("offensive_maximum_score")){d.offensive_maximum_score=o.json&&!isFinite(m.offensive_maximum_score)?String(m.offensive_maximum_score):m.offensive_maximum_score}return d};CombatNpcPersonality.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatNpcPersonality}();Master.CombatNpcTrainer=function(){function CombatNpcTrainer(p){this.available_pokemon=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatNpcTrainer.prototype.trainer_name="";CombatNpcTrainer.prototype.combat_league_template_id="";CombatNpcTrainer.prototype.combat_personality_id="";CombatNpcTrainer.prototype.win_loot_table_id="";CombatNpcTrainer.prototype.lose_loot_table_id="";CombatNpcTrainer.prototype.avatar=null;CombatNpcTrainer.prototype.available_pokemon=$util.emptyArray;CombatNpcTrainer.prototype.trainer_title="";CombatNpcTrainer.prototype.trainer_quote="";CombatNpcTrainer.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.trainer_name!=null&&m.hasOwnProperty("trainer_name"))w.uint32(10).string(m.trainer_name);if(m.combat_league_template_id!=null&&m.hasOwnProperty("combat_league_template_id"))w.uint32(18).string(m.combat_league_template_id);if(m.combat_personality_id!=null&&m.hasOwnProperty("combat_personality_id"))w.uint32(26).string(m.combat_personality_id);if(m.win_loot_table_id!=null&&m.hasOwnProperty("win_loot_table_id"))w.uint32(34).string(m.win_loot_table_id);if(m.lose_loot_table_id!=null&&m.hasOwnProperty("lose_loot_table_id"))w.uint32(42).string(m.lose_loot_table_id);if(m.avatar!=null&&m.hasOwnProperty("avatar"))$root.POGOProtos.Data.Player.PlayerAvatar.encode(m.avatar,w.uint32(58).fork()).ldelim();if(m.available_pokemon!=null&&m.available_pokemon.length){for(var i=0;i<m.available_pokemon.length;++i)$root.POGOProtos.Data.NpcPokemon.encode(m.available_pokemon[i],w.uint32(66).fork()).ldelim()}if(m.trainer_title!=null&&m.hasOwnProperty("trainer_title"))w.uint32(74).string(m.trainer_title);if(m.trainer_quote!=null&&m.hasOwnProperty("trainer_quote"))w.uint32(82).string(m.trainer_quote);return w};CombatNpcTrainer.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.CombatNpcTrainer;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.trainer_name=r.string();break;case 2:m.combat_league_template_id=r.string();break;case 3:m.combat_personality_id=r.string();break;case 4:m.win_loot_table_id=r.string();break;case 5:m.lose_loot_table_id=r.string();break;case 7:m.avatar=$root.POGOProtos.Data.Player.PlayerAvatar.decode(r,r.uint32());break;case 8:if(!(m.available_pokemon&&m.available_pokemon.length))m.available_pokemon=[];m.available_pokemon.push($root.POGOProtos.Data.NpcPokemon.decode(r,r.uint32()));break;case 9:m.trainer_title=r.string();break;case 10:m.trainer_quote=r.string();break;default:r.skipType(t&7);break}}return m};CombatNpcTrainer.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.CombatNpcTrainer)return d;var m=new $root.POGOProtos.Settings.Master.CombatNpcTrainer;if(d.trainer_name!=null){m.trainer_name=String(d.trainer_name)}if(d.combat_league_template_id!=null){m.combat_league_template_id=String(d.combat_league_template_id)}if(d.combat_personality_id!=null){m.combat_personality_id=String(d.combat_personality_id)}if(d.win_loot_table_id!=null){m.win_loot_table_id=String(d.win_loot_table_id)}if(d.lose_loot_table_id!=null){m.lose_loot_table_id=String(d.lose_loot_table_id)}if(d.avatar!=null){if(typeof d.avatar!=="object")throw TypeError(".POGOProtos.Settings.Master.CombatNpcTrainer.avatar: object expected");m.avatar=$root.POGOProtos.Data.Player.PlayerAvatar.fromObject(d.avatar)}if(d.available_pokemon){if(!Array.isArray(d.available_pokemon))throw TypeError(".POGOProtos.Settings.Master.CombatNpcTrainer.available_pokemon: array expected");m.available_pokemon=[];for(var i=0;i<d.available_pokemon.length;++i){if(typeof d.available_pokemon[i]!=="object")throw TypeError(".POGOProtos.Settings.Master.CombatNpcTrainer.available_pokemon: object expected");m.available_pokemon[i]=$root.POGOProtos.Data.NpcPokemon.fromObject(d.available_pokemon[i])}}if(d.trainer_title!=null){m.trainer_title=String(d.trainer_title)}if(d.trainer_quote!=null){m.trainer_quote=String(d.trainer_quote)}return m};CombatNpcTrainer.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.available_pokemon=[]}if(o.defaults){d.trainer_name="";d.combat_league_template_id="";d.combat_personality_id="";d.win_loot_table_id="";d.lose_loot_table_id="";d.avatar=null;d.trainer_title="";d.trainer_quote=""}if(m.trainer_name!=null&&m.hasOwnProperty("trainer_name")){d.trainer_name=m.trainer_name}if(m.combat_league_template_id!=null&&m.hasOwnProperty("combat_league_template_id")){d.combat_league_template_id=m.combat_league_template_id}if(m.combat_personality_id!=null&&m.hasOwnProperty("combat_personality_id")){d.combat_personality_id=m.combat_personality_id}if(m.win_loot_table_id!=null&&m.hasOwnProperty("win_loot_table_id")){d.win_loot_table_id=m.win_loot_table_id}if(m.lose_loot_table_id!=null&&m.hasOwnProperty("lose_loot_table_id")){d.lose_loot_table_id=m.lose_loot_table_id}if(m.avatar!=null&&m.hasOwnProperty("avatar")){d.avatar=$root.POGOProtos.Data.Player.PlayerAvatar.toObject(m.avatar,o)}if(m.available_pokemon&&m.available_pokemon.length){d.available_pokemon=[];for(var j=0;j<m.available_pokemon.length;++j){d.available_pokemon[j]=$root.POGOProtos.Data.NpcPokemon.toObject(m.available_pokemon[j],o)}}if(m.trainer_title!=null&&m.hasOwnProperty("trainer_title")){d.trainer_title=m.trainer_title}if(m.trainer_quote!=null&&m.hasOwnProperty("trainer_quote")){d.trainer_quote=m.trainer_quote}return d};CombatNpcTrainer.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatNpcTrainer}();Master.CombatSettings=function(){function CombatSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatSettings.prototype.round_duration_seconds=0;CombatSettings.prototype.turn_duration_seconds=0;CombatSettings.prototype.minigame_duration_seconds=0;CombatSettings.prototype.same_type_attack_bonus_multiplier=0;CombatSettings.prototype.fast_attack_bonus_multiplier=0;CombatSettings.prototype.charge_attack_bonus_multiplier=0;CombatSettings.prototype.defense_bonus_multiplier=0;CombatSettings.prototype.minigame_bonus_base_multiplier=0;CombatSettings.prototype.minigame_bonus_variable_multiplier=0;CombatSettings.prototype.max_energy=0;CombatSettings.prototype.defender_minigame_multiplier=0;CombatSettings.prototype.change_pokemon_duration_seconds=0;CombatSettings.prototype.minigame_submit_score_duration_seconds=0;CombatSettings.prototype.quick_swap_combat_start_available_seconds=0;CombatSettings.prototype.quick_swap_cooldown_duration_seconds=0;CombatSettings.prototype.offensive_input_challenge_settings=null;CombatSettings.prototype.defensive_input_challenge_settings=null;CombatSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.round_duration_seconds!=null&&m.hasOwnProperty("round_duration_seconds"))w.uint32(13).float(m.round_duration_seconds);if(m.turn_duration_seconds!=null&&m.hasOwnProperty("turn_duration_seconds"))w.uint32(21).float(m.turn_duration_seconds);if(m.minigame_duration_seconds!=null&&m.hasOwnProperty("minigame_duration_seconds"))w.uint32(29).float(m.minigame_duration_seconds);if(m.same_type_attack_bonus_multiplier!=null&&m.hasOwnProperty("same_type_attack_bonus_multiplier"))w.uint32(37).float(m.same_type_attack_bonus_multiplier);if(m.fast_attack_bonus_multiplier!=null&&m.hasOwnProperty("fast_attack_bonus_multiplier"))w.uint32(45).float(m.fast_attack_bonus_multiplier);if(m.charge_attack_bonus_multiplier!=null&&m.hasOwnProperty("charge_attack_bonus_multiplier"))w.uint32(53).float(m.charge_attack_bonus_multiplier);if(m.defense_bonus_multiplier!=null&&m.hasOwnProperty("defense_bonus_multiplier"))w.uint32(61).float(m.defense_bonus_multiplier);if(m.minigame_bonus_base_multiplier!=null&&m.hasOwnProperty("minigame_bonus_base_multiplier"))w.uint32(69).float(m.minigame_bonus_base_multiplier);if(m.minigame_bonus_variable_multiplier!=null&&m.hasOwnProperty("minigame_bonus_variable_multiplier"))w.uint32(77).float(m.minigame_bonus_variable_multiplier);if(m.max_energy!=null&&m.hasOwnProperty("max_energy"))w.uint32(80).int32(m.max_energy);if(m.defender_minigame_multiplier!=null&&m.hasOwnProperty("defender_minigame_multiplier"))w.uint32(93).float(m.defender_minigame_multiplier);if(m.change_pokemon_duration_seconds!=null&&m.hasOwnProperty("change_pokemon_duration_seconds"))w.uint32(101).float(m.change_pokemon_duration_seconds);if(m.minigame_submit_score_duration_seconds!=null&&m.hasOwnProperty("minigame_submit_score_duration_seconds"))w.uint32(109).float(m.minigame_submit_score_duration_seconds);if(m.quick_swap_combat_start_available_seconds!=null&&m.hasOwnProperty("quick_swap_combat_start_available_seconds"))w.uint32(117).float(m.quick_swap_combat_start_available_seconds);if(m.quick_swap_cooldown_duration_seconds!=null&&m.hasOwnProperty("quick_swap_cooldown_duration_seconds"))w.uint32(125).float(m.quick_swap_cooldown_duration_seconds);if(m.offensive_input_challenge_settings!=null&&m.hasOwnProperty("offensive_input_challenge_settings"))$root.POGOProtos.Settings.Master.CombatSettings.CombatOffensiveInputChallengeSettings.encode(m.offensive_input_challenge_settings,w.uint32(130).fork()).ldelim();if(m.defensive_input_challenge_settings!=null&&m.hasOwnProperty("defensive_input_challenge_settings"))$root.POGOProtos.Settings.Master.CombatSettings.CombatDefensiveInputChallengeSettings.encode(m.defensive_input_challenge_settings,w.uint32(138).fork()).ldelim();return w};CombatSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.CombatSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.round_duration_seconds=r.float();break;case 2:m.turn_duration_seconds=r.float();break;case 3:m.minigame_duration_seconds=r.float();break;case 4:m.same_type_attack_bonus_multiplier=r.float();break;case 5:m.fast_attack_bonus_multiplier=r.float();break;case 6:m.charge_attack_bonus_multiplier=r.float();break;case 7:m.defense_bonus_multiplier=r.float();break;case 8:m.minigame_bonus_base_multiplier=r.float();break;case 9:m.minigame_bonus_variable_multiplier=r.float();break;case 10:m.max_energy=r.int32();break;case 11:m.defender_minigame_multiplier=r.float();break;case 12:m.change_pokemon_duration_seconds=r.float();break;case 13:m.minigame_submit_score_duration_seconds=r.float();break;case 14:m.quick_swap_combat_start_available_seconds=r.float();break;case 15:m.quick_swap_cooldown_duration_seconds=r.float();break;case 16:m.offensive_input_challenge_settings=$root.POGOProtos.Settings.Master.CombatSettings.CombatOffensiveInputChallengeSettings.decode(r,r.uint32());break;case 17:m.defensive_input_challenge_settings=$root.POGOProtos.Settings.Master.CombatSettings.CombatDefensiveInputChallengeSettings.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};CombatSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.CombatSettings)return d;var m=new $root.POGOProtos.Settings.Master.CombatSettings;if(d.round_duration_seconds!=null){m.round_duration_seconds=Number(d.round_duration_seconds)}if(d.turn_duration_seconds!=null){m.turn_duration_seconds=Number(d.turn_duration_seconds)}if(d.minigame_duration_seconds!=null){m.minigame_duration_seconds=Number(d.minigame_duration_seconds)}if(d.same_type_attack_bonus_multiplier!=null){m.same_type_attack_bonus_multiplier=Number(d.same_type_attack_bonus_multiplier)}if(d.fast_attack_bonus_multiplier!=null){m.fast_attack_bonus_multiplier=Number(d.fast_attack_bonus_multiplier)}if(d.charge_attack_bonus_multiplier!=null){m.charge_attack_bonus_multiplier=Number(d.charge_attack_bonus_multiplier)}if(d.defense_bonus_multiplier!=null){m.defense_bonus_multiplier=Number(d.defense_bonus_multiplier)}if(d.minigame_bonus_base_multiplier!=null){m.minigame_bonus_base_multiplier=Number(d.minigame_bonus_base_multiplier)}if(d.minigame_bonus_variable_multiplier!=null){m.minigame_bonus_variable_multiplier=Number(d.minigame_bonus_variable_multiplier)}if(d.max_energy!=null){m.max_energy=d.max_energy|0}if(d.defender_minigame_multiplier!=null){m.defender_minigame_multiplier=Number(d.defender_minigame_multiplier)}if(d.change_pokemon_duration_seconds!=null){m.change_pokemon_duration_seconds=Number(d.change_pokemon_duration_seconds)}if(d.minigame_submit_score_duration_seconds!=null){m.minigame_submit_score_duration_seconds=Number(d.minigame_submit_score_duration_seconds)}if(d.quick_swap_combat_start_available_seconds!=null){m.quick_swap_combat_start_available_seconds=Number(d.quick_swap_combat_start_available_seconds)}if(d.quick_swap_cooldown_duration_seconds!=null){m.quick_swap_cooldown_duration_seconds=Number(d.quick_swap_cooldown_duration_seconds)}if(d.offensive_input_challenge_settings!=null){if(typeof d.offensive_input_challenge_settings!=="object")throw TypeError(".POGOProtos.Settings.Master.CombatSettings.offensive_input_challenge_settings: object expected");m.offensive_input_challenge_settings=$root.POGOProtos.Settings.Master.CombatSettings.CombatOffensiveInputChallengeSettings.fromObject(d.offensive_input_challenge_settings)}if(d.defensive_input_challenge_settings!=null){if(typeof d.defensive_input_challenge_settings!=="object")throw TypeError(".POGOProtos.Settings.Master.CombatSettings.defensive_input_challenge_settings: object expected");m.defensive_input_challenge_settings=$root.POGOProtos.Settings.Master.CombatSettings.CombatDefensiveInputChallengeSettings.fromObject(d.defensive_input_challenge_settings)}return m};CombatSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.round_duration_seconds=0;d.turn_duration_seconds=0;d.minigame_duration_seconds=0;d.same_type_attack_bonus_multiplier=0;d.fast_attack_bonus_multiplier=0;d.charge_attack_bonus_multiplier=0;d.defense_bonus_multiplier=0;d.minigame_bonus_base_multiplier=0;d.minigame_bonus_variable_multiplier=0;d.max_energy=0;d.defender_minigame_multiplier=0;d.change_pokemon_duration_seconds=0;d.minigame_submit_score_duration_seconds=0;d.quick_swap_combat_start_available_seconds=0;d.quick_swap_cooldown_duration_seconds=0;d.offensive_input_challenge_settings=null;d.defensive_input_challenge_settings=null}if(m.round_duration_seconds!=null&&m.hasOwnProperty("round_duration_seconds")){d.round_duration_seconds=o.json&&!isFinite(m.round_duration_seconds)?String(m.round_duration_seconds):m.round_duration_seconds}if(m.turn_duration_seconds!=null&&m.hasOwnProperty("turn_duration_seconds")){d.turn_duration_seconds=o.json&&!isFinite(m.turn_duration_seconds)?String(m.turn_duration_seconds):m.turn_duration_seconds}if(m.minigame_duration_seconds!=null&&m.hasOwnProperty("minigame_duration_seconds")){d.minigame_duration_seconds=o.json&&!isFinite(m.minigame_duration_seconds)?String(m.minigame_duration_seconds):m.minigame_duration_seconds}if(m.same_type_attack_bonus_multiplier!=null&&m.hasOwnProperty("same_type_attack_bonus_multiplier")){d.same_type_attack_bonus_multiplier=o.json&&!isFinite(m.same_type_attack_bonus_multiplier)?String(m.same_type_attack_bonus_multiplier):m.same_type_attack_bonus_multiplier}if(m.fast_attack_bonus_multiplier!=null&&m.hasOwnProperty("fast_attack_bonus_multiplier")){d.fast_attack_bonus_multiplier=o.json&&!isFinite(m.fast_attack_bonus_multiplier)?String(m.fast_attack_bonus_multiplier):m.fast_attack_bonus_multiplier}if(m.charge_attack_bonus_multiplier!=null&&m.hasOwnProperty("charge_attack_bonus_multiplier")){d.charge_attack_bonus_multiplier=o.json&&!isFinite(m.charge_attack_bonus_multiplier)?String(m.charge_attack_bonus_multiplier):m.charge_attack_bonus_multiplier}if(m.defense_bonus_multiplier!=null&&m.hasOwnProperty("defense_bonus_multiplier")){d.defense_bonus_multiplier=o.json&&!isFinite(m.defense_bonus_multiplier)?String(m.defense_bonus_multiplier):m.defense_bonus_multiplier}if(m.minigame_bonus_base_multiplier!=null&&m.hasOwnProperty("minigame_bonus_base_multiplier")){d.minigame_bonus_base_multiplier=o.json&&!isFinite(m.minigame_bonus_base_multiplier)?String(m.minigame_bonus_base_multiplier):m.minigame_bonus_base_multiplier}if(m.minigame_bonus_variable_multiplier!=null&&m.hasOwnProperty("minigame_bonus_variable_multiplier")){d.minigame_bonus_variable_multiplier=o.json&&!isFinite(m.minigame_bonus_variable_multiplier)?String(m.minigame_bonus_variable_multiplier):m.minigame_bonus_variable_multiplier}if(m.max_energy!=null&&m.hasOwnProperty("max_energy")){d.max_energy=m.max_energy}if(m.defender_minigame_multiplier!=null&&m.hasOwnProperty("defender_minigame_multiplier")){d.defender_minigame_multiplier=o.json&&!isFinite(m.defender_minigame_multiplier)?String(m.defender_minigame_multiplier):m.defender_minigame_multiplier}if(m.change_pokemon_duration_seconds!=null&&m.hasOwnProperty("change_pokemon_duration_seconds")){d.change_pokemon_duration_seconds=o.json&&!isFinite(m.change_pokemon_duration_seconds)?String(m.change_pokemon_duration_seconds):m.change_pokemon_duration_seconds}if(m.minigame_submit_score_duration_seconds!=null&&m.hasOwnProperty("minigame_submit_score_duration_seconds")){d.minigame_submit_score_duration_seconds=o.json&&!isFinite(m.minigame_submit_score_duration_seconds)?String(m.minigame_submit_score_duration_seconds):m.minigame_submit_score_duration_seconds}if(m.quick_swap_combat_start_available_seconds!=null&&m.hasOwnProperty("quick_swap_combat_start_available_seconds")){d.quick_swap_combat_start_available_seconds=o.json&&!isFinite(m.quick_swap_combat_start_available_seconds)?String(m.quick_swap_combat_start_available_seconds):m.quick_swap_combat_start_available_seconds}if(m.quick_swap_cooldown_duration_seconds!=null&&m.hasOwnProperty("quick_swap_cooldown_duration_seconds")){d.quick_swap_cooldown_duration_seconds=o.json&&!isFinite(m.quick_swap_cooldown_duration_seconds)?String(m.quick_swap_cooldown_duration_seconds):m.quick_swap_cooldown_duration_seconds}if(m.offensive_input_challenge_settings!=null&&m.hasOwnProperty("offensive_input_challenge_settings")){d.offensive_input_challenge_settings=$root.POGOProtos.Settings.Master.CombatSettings.CombatOffensiveInputChallengeSettings.toObject(m.offensive_input_challenge_settings,o)}if(m.defensive_input_challenge_settings!=null&&m.hasOwnProperty("defensive_input_challenge_settings")){d.defensive_input_challenge_settings=$root.POGOProtos.Settings.Master.CombatSettings.CombatDefensiveInputChallengeSettings.toObject(m.defensive_input_challenge_settings,o)}return d};CombatSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};CombatSettings.CombatOffensiveInputChallengeSettings=function(){function CombatOffensiveInputChallengeSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatOffensiveInputChallengeSettings.prototype.score_per_tap=0;CombatOffensiveInputChallengeSettings.prototype.score_decay_per_second=0;CombatOffensiveInputChallengeSettings.prototype.max_score=0;CombatOffensiveInputChallengeSettings.prototype.high_score_additional_decay_per_second=0;CombatOffensiveInputChallengeSettings.prototype.max_time_additional_decay_per_second=0;CombatOffensiveInputChallengeSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.score_per_tap!=null&&m.hasOwnProperty("score_per_tap"))w.uint32(13).float(m.score_per_tap);if(m.score_decay_per_second!=null&&m.hasOwnProperty("score_decay_per_second"))w.uint32(21).float(m.score_decay_per_second);if(m.max_score!=null&&m.hasOwnProperty("max_score"))w.uint32(29).float(m.max_score);if(m.high_score_additional_decay_per_second!=null&&m.hasOwnProperty("high_score_additional_decay_per_second"))w.uint32(37).float(m.high_score_additional_decay_per_second);if(m.max_time_additional_decay_per_second!=null&&m.hasOwnProperty("max_time_additional_decay_per_second"))w.uint32(45).float(m.max_time_additional_decay_per_second);return w};CombatOffensiveInputChallengeSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.CombatSettings.CombatOffensiveInputChallengeSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.score_per_tap=r.float();break;case 2:m.score_decay_per_second=r.float();break;case 3:m.max_score=r.float();break;case 4:m.high_score_additional_decay_per_second=r.float();break;case 5:m.max_time_additional_decay_per_second=r.float();break;default:r.skipType(t&7);break}}return m};CombatOffensiveInputChallengeSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.CombatSettings.CombatOffensiveInputChallengeSettings)return d;var m=new $root.POGOProtos.Settings.Master.CombatSettings.CombatOffensiveInputChallengeSettings;if(d.score_per_tap!=null){m.score_per_tap=Number(d.score_per_tap)}if(d.score_decay_per_second!=null){m.score_decay_per_second=Number(d.score_decay_per_second)}if(d.max_score!=null){m.max_score=Number(d.max_score)}if(d.high_score_additional_decay_per_second!=null){m.high_score_additional_decay_per_second=Number(d.high_score_additional_decay_per_second)}if(d.max_time_additional_decay_per_second!=null){m.max_time_additional_decay_per_second=Number(d.max_time_additional_decay_per_second)}return m};CombatOffensiveInputChallengeSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.score_per_tap=0;d.score_decay_per_second=0;d.max_score=0;d.high_score_additional_decay_per_second=0;d.max_time_additional_decay_per_second=0}if(m.score_per_tap!=null&&m.hasOwnProperty("score_per_tap")){d.score_per_tap=o.json&&!isFinite(m.score_per_tap)?String(m.score_per_tap):m.score_per_tap}if(m.score_decay_per_second!=null&&m.hasOwnProperty("score_decay_per_second")){d.score_decay_per_second=o.json&&!isFinite(m.score_decay_per_second)?String(m.score_decay_per_second):m.score_decay_per_second}if(m.max_score!=null&&m.hasOwnProperty("max_score")){d.max_score=o.json&&!isFinite(m.max_score)?String(m.max_score):m.max_score}if(m.high_score_additional_decay_per_second!=null&&m.hasOwnProperty("high_score_additional_decay_per_second")){d.high_score_additional_decay_per_second=o.json&&!isFinite(m.high_score_additional_decay_per_second)?String(m.high_score_additional_decay_per_second):m.high_score_additional_decay_per_second}if(m.max_time_additional_decay_per_second!=null&&m.hasOwnProperty("max_time_additional_decay_per_second")){d.max_time_additional_decay_per_second=o.json&&!isFinite(m.max_time_additional_decay_per_second)?String(m.max_time_additional_decay_per_second):m.max_time_additional_decay_per_second}return d};CombatOffensiveInputChallengeSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatOffensiveInputChallengeSettings}();CombatSettings.CombatDefensiveInputChallengeSettings=function(){function CombatDefensiveInputChallengeSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatDefensiveInputChallengeSettings.prototype.full_rotations_for_max_score=0;CombatDefensiveInputChallengeSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.full_rotations_for_max_score!=null&&m.hasOwnProperty("full_rotations_for_max_score"))w.uint32(13).float(m.full_rotations_for_max_score);return w};CombatDefensiveInputChallengeSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.CombatSettings.CombatDefensiveInputChallengeSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.full_rotations_for_max_score=r.float();break;default:r.skipType(t&7);break}}return m};CombatDefensiveInputChallengeSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.CombatSettings.CombatDefensiveInputChallengeSettings)return d;var m=new $root.POGOProtos.Settings.Master.CombatSettings.CombatDefensiveInputChallengeSettings;if(d.full_rotations_for_max_score!=null){m.full_rotations_for_max_score=Number(d.full_rotations_for_max_score)}return m};CombatDefensiveInputChallengeSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.full_rotations_for_max_score=0}if(m.full_rotations_for_max_score!=null&&m.hasOwnProperty("full_rotations_for_max_score")){d.full_rotations_for_max_score=o.json&&!isFinite(m.full_rotations_for_max_score)?String(m.full_rotations_for_max_score):m.full_rotations_for_max_score}return d};CombatDefensiveInputChallengeSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatDefensiveInputChallengeSettings}();return CombatSettings}();Master.CombatStatStageSettings=function(){function CombatStatStageSettings(p){this.attack_buff_multiplier=[];this.defense_buff_multiplier=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CombatStatStageSettings.prototype.minimum_stat_stage=0;CombatStatStageSettings.prototype.maximum_stat_stage=0;CombatStatStageSettings.prototype.attack_buff_multiplier=$util.emptyArray;CombatStatStageSettings.prototype.defense_buff_multiplier=$util.emptyArray;CombatStatStageSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.minimum_stat_stage!=null&&m.hasOwnProperty("minimum_stat_stage"))w.uint32(8).int32(m.minimum_stat_stage);if(m.maximum_stat_stage!=null&&m.hasOwnProperty("maximum_stat_stage"))w.uint32(16).int32(m.maximum_stat_stage);if(m.attack_buff_multiplier!=null&&m.attack_buff_multiplier.length){w.uint32(26).fork();for(var i=0;i<m.attack_buff_multiplier.length;++i)w.float(m.attack_buff_multiplier[i]);w.ldelim()}if(m.defense_buff_multiplier!=null&&m.defense_buff_multiplier.length){w.uint32(34).fork();for(var i=0;i<m.defense_buff_multiplier.length;++i)w.float(m.defense_buff_multiplier[i]);w.ldelim()}return w};CombatStatStageSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.CombatStatStageSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.minimum_stat_stage=r.int32();break;case 2:m.maximum_stat_stage=r.int32();break;case 3:if(!(m.attack_buff_multiplier&&m.attack_buff_multiplier.length))m.attack_buff_multiplier=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.attack_buff_multiplier.push(r.float())}else m.attack_buff_multiplier.push(r.float());break;case 4:if(!(m.defense_buff_multiplier&&m.defense_buff_multiplier.length))m.defense_buff_multiplier=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.defense_buff_multiplier.push(r.float())}else m.defense_buff_multiplier.push(r.float());break;default:r.skipType(t&7);break}}return m};CombatStatStageSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.CombatStatStageSettings)return d;var m=new $root.POGOProtos.Settings.Master.CombatStatStageSettings;if(d.minimum_stat_stage!=null){m.minimum_stat_stage=d.minimum_stat_stage|0}if(d.maximum_stat_stage!=null){m.maximum_stat_stage=d.maximum_stat_stage|0}if(d.attack_buff_multiplier){if(!Array.isArray(d.attack_buff_multiplier))throw TypeError(".POGOProtos.Settings.Master.CombatStatStageSettings.attack_buff_multiplier: array expected");m.attack_buff_multiplier=[];for(var i=0;i<d.attack_buff_multiplier.length;++i){m.attack_buff_multiplier[i]=Number(d.attack_buff_multiplier[i])}}if(d.defense_buff_multiplier){if(!Array.isArray(d.defense_buff_multiplier))throw TypeError(".POGOProtos.Settings.Master.CombatStatStageSettings.defense_buff_multiplier: array expected");m.defense_buff_multiplier=[];for(var i=0;i<d.defense_buff_multiplier.length;++i){m.defense_buff_multiplier[i]=Number(d.defense_buff_multiplier[i])}}return m};CombatStatStageSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.attack_buff_multiplier=[];d.defense_buff_multiplier=[]}if(o.defaults){d.minimum_stat_stage=0;d.maximum_stat_stage=0}if(m.minimum_stat_stage!=null&&m.hasOwnProperty("minimum_stat_stage")){d.minimum_stat_stage=m.minimum_stat_stage}if(m.maximum_stat_stage!=null&&m.hasOwnProperty("maximum_stat_stage")){d.maximum_stat_stage=m.maximum_stat_stage}if(m.attack_buff_multiplier&&m.attack_buff_multiplier.length){d.attack_buff_multiplier=[];for(var j=0;j<m.attack_buff_multiplier.length;++j){d.attack_buff_multiplier[j]=o.json&&!isFinite(m.attack_buff_multiplier[j])?String(m.attack_buff_multiplier[j]):m.attack_buff_multiplier[j]}}if(m.defense_buff_multiplier&&m.defense_buff_multiplier.length){d.defense_buff_multiplier=[];for(var j=0;j<m.defense_buff_multiplier.length;++j){d.defense_buff_multiplier[j]=o.json&&!isFinite(m.defense_buff_multiplier[j])?String(m.defense_buff_multiplier[j]):m.defense_buff_multiplier[j]}}return d};CombatStatStageSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CombatStatStageSettings}();Master.EncounterSettings=function(){function EncounterSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EncounterSettings.prototype.spin_bonus_threshold=0;EncounterSettings.prototype.excellent_throw_threshold=0;EncounterSettings.prototype.great_throw_threshold=0;EncounterSettings.prototype.nice_throw_threshold=0;EncounterSettings.prototype.milestone_threshold=0;EncounterSettings.prototype.ar_plus_mode_enabled=false;EncounterSettings.prototype.ar_close_proximity_threshold=0;EncounterSettings.prototype.ar_low_awareness_threshold=0;EncounterSettings.prototype.ar_close_proximity_multiplier=0;EncounterSettings.prototype.ar_awareness_penalty_threshold=0;EncounterSettings.prototype.ar_low_awareness_max_multiplier=0;EncounterSettings.prototype.ar_high_awareness_min_penalty_multiplier=0;EncounterSettings.prototype.ar_plus_attempts_until_flee_max=0;EncounterSettings.prototype.ar_plus_attempts_until_flee_infinite=0;EncounterSettings.prototype.escaped_bonus_multiplier_max=0;EncounterSettings.prototype.escaped_bonus_multiplier_by_excellent_throw=0;EncounterSettings.prototype.escaped_bonus_multiplier_by_great_throw=0;EncounterSettings.prototype.escaped_bonus_multiplier_by_nice_throw=0;EncounterSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.spin_bonus_threshold!=null&&m.hasOwnProperty("spin_bonus_threshold"))w.uint32(13).float(m.spin_bonus_threshold);if(m.excellent_throw_threshold!=null&&m.hasOwnProperty("excellent_throw_threshold"))w.uint32(21).float(m.excellent_throw_threshold);if(m.great_throw_threshold!=null&&m.hasOwnProperty("great_throw_threshold"))w.uint32(29).float(m.great_throw_threshold);if(m.nice_throw_threshold!=null&&m.hasOwnProperty("nice_throw_threshold"))w.uint32(37).float(m.nice_throw_threshold);if(m.milestone_threshold!=null&&m.hasOwnProperty("milestone_threshold"))w.uint32(40).int32(m.milestone_threshold);if(m.ar_plus_mode_enabled!=null&&m.hasOwnProperty("ar_plus_mode_enabled"))w.uint32(48).bool(m.ar_plus_mode_enabled);if(m.ar_close_proximity_threshold!=null&&m.hasOwnProperty("ar_close_proximity_threshold"))w.uint32(61).float(m.ar_close_proximity_threshold);if(m.ar_low_awareness_threshold!=null&&m.hasOwnProperty("ar_low_awareness_threshold"))w.uint32(69).float(m.ar_low_awareness_threshold);if(m.ar_close_proximity_multiplier!=null&&m.hasOwnProperty("ar_close_proximity_multiplier"))w.uint32(77).float(m.ar_close_proximity_multiplier);if(m.ar_awareness_penalty_threshold!=null&&m.hasOwnProperty("ar_awareness_penalty_threshold"))w.uint32(85).float(m.ar_awareness_penalty_threshold);if(m.ar_low_awareness_max_multiplier!=null&&m.hasOwnProperty("ar_low_awareness_max_multiplier"))w.uint32(93).float(m.ar_low_awareness_max_multiplier);if(m.ar_high_awareness_min_penalty_multiplier!=null&&m.hasOwnProperty("ar_high_awareness_min_penalty_multiplier"))w.uint32(101).float(m.ar_high_awareness_min_penalty_multiplier);if(m.ar_plus_attempts_until_flee_max!=null&&m.hasOwnProperty("ar_plus_attempts_until_flee_max"))w.uint32(104).int32(m.ar_plus_attempts_until_flee_max);if(m.ar_plus_attempts_until_flee_infinite!=null&&m.hasOwnProperty("ar_plus_attempts_until_flee_infinite"))w.uint32(112).int32(m.ar_plus_attempts_until_flee_infinite);if(m.escaped_bonus_multiplier_max!=null&&m.hasOwnProperty("escaped_bonus_multiplier_max"))w.uint32(125).float(m.escaped_bonus_multiplier_max);if(m.escaped_bonus_multiplier_by_excellent_throw!=null&&m.hasOwnProperty("escaped_bonus_multiplier_by_excellent_throw"))w.uint32(133).float(m.escaped_bonus_multiplier_by_excellent_throw);if(m.escaped_bonus_multiplier_by_great_throw!=null&&m.hasOwnProperty("escaped_bonus_multiplier_by_great_throw"))w.uint32(141).float(m.escaped_bonus_multiplier_by_great_throw);if(m.escaped_bonus_multiplier_by_nice_throw!=null&&m.hasOwnProperty("escaped_bonus_multiplier_by_nice_throw"))w.uint32(149).float(m.escaped_bonus_multiplier_by_nice_throw);return w};EncounterSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.EncounterSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.spin_bonus_threshold=r.float();break;case 2:m.excellent_throw_threshold=r.float();break;case 3:m.great_throw_threshold=r.float();break;case 4:m.nice_throw_threshold=r.float();break;case 5:m.milestone_threshold=r.int32();break;case 6:m.ar_plus_mode_enabled=r.bool();break;case 7:m.ar_close_proximity_threshold=r.float();break;case 8:m.ar_low_awareness_threshold=r.float();break;case 9:m.ar_close_proximity_multiplier=r.float();break;case 10:m.ar_awareness_penalty_threshold=r.float();break;case 11:m.ar_low_awareness_max_multiplier=r.float();break;case 12:m.ar_high_awareness_min_penalty_multiplier=r.float();break;case 13:m.ar_plus_attempts_until_flee_max=r.int32();break;case 14:m.ar_plus_attempts_until_flee_infinite=r.int32();break;case 15:m.escaped_bonus_multiplier_max=r.float();break;case 16:m.escaped_bonus_multiplier_by_excellent_throw=r.float();break;case 17:m.escaped_bonus_multiplier_by_great_throw=r.float();break;case 18:m.escaped_bonus_multiplier_by_nice_throw=r.float();break;default:r.skipType(t&7);break}}return m};EncounterSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.EncounterSettings)return d;var m=new $root.POGOProtos.Settings.Master.EncounterSettings;if(d.spin_bonus_threshold!=null){m.spin_bonus_threshold=Number(d.spin_bonus_threshold)}if(d.excellent_throw_threshold!=null){m.excellent_throw_threshold=Number(d.excellent_throw_threshold)}if(d.great_throw_threshold!=null){m.great_throw_threshold=Number(d.great_throw_threshold)}if(d.nice_throw_threshold!=null){m.nice_throw_threshold=Number(d.nice_throw_threshold)}if(d.milestone_threshold!=null){m.milestone_threshold=d.milestone_threshold|0}if(d.ar_plus_mode_enabled!=null){m.ar_plus_mode_enabled=Boolean(d.ar_plus_mode_enabled)}if(d.ar_close_proximity_threshold!=null){m.ar_close_proximity_threshold=Number(d.ar_close_proximity_threshold)}if(d.ar_low_awareness_threshold!=null){m.ar_low_awareness_threshold=Number(d.ar_low_awareness_threshold)}if(d.ar_close_proximity_multiplier!=null){m.ar_close_proximity_multiplier=Number(d.ar_close_proximity_multiplier)}if(d.ar_awareness_penalty_threshold!=null){m.ar_awareness_penalty_threshold=Number(d.ar_awareness_penalty_threshold)}if(d.ar_low_awareness_max_multiplier!=null){m.ar_low_awareness_max_multiplier=Number(d.ar_low_awareness_max_multiplier)}if(d.ar_high_awareness_min_penalty_multiplier!=null){m.ar_high_awareness_min_penalty_multiplier=Number(d.ar_high_awareness_min_penalty_multiplier)}if(d.ar_plus_attempts_until_flee_max!=null){m.ar_plus_attempts_until_flee_max=d.ar_plus_attempts_until_flee_max|0}if(d.ar_plus_attempts_until_flee_infinite!=null){m.ar_plus_attempts_until_flee_infinite=d.ar_plus_attempts_until_flee_infinite|0}if(d.escaped_bonus_multiplier_max!=null){m.escaped_bonus_multiplier_max=Number(d.escaped_bonus_multiplier_max)}if(d.escaped_bonus_multiplier_by_excellent_throw!=null){m.escaped_bonus_multiplier_by_excellent_throw=Number(d.escaped_bonus_multiplier_by_excellent_throw)}if(d.escaped_bonus_multiplier_by_great_throw!=null){m.escaped_bonus_multiplier_by_great_throw=Number(d.escaped_bonus_multiplier_by_great_throw)}if(d.escaped_bonus_multiplier_by_nice_throw!=null){m.escaped_bonus_multiplier_by_nice_throw=Number(d.escaped_bonus_multiplier_by_nice_throw)}return m};EncounterSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.spin_bonus_threshold=0;d.excellent_throw_threshold=0;d.great_throw_threshold=0;d.nice_throw_threshold=0;d.milestone_threshold=0;d.ar_plus_mode_enabled=false;d.ar_close_proximity_threshold=0;d.ar_low_awareness_threshold=0;d.ar_close_proximity_multiplier=0;d.ar_awareness_penalty_threshold=0;d.ar_low_awareness_max_multiplier=0;d.ar_high_awareness_min_penalty_multiplier=0;d.ar_plus_attempts_until_flee_max=0;d.ar_plus_attempts_until_flee_infinite=0;d.escaped_bonus_multiplier_max=0;d.escaped_bonus_multiplier_by_excellent_throw=0;d.escaped_bonus_multiplier_by_great_throw=0;d.escaped_bonus_multiplier_by_nice_throw=0}if(m.spin_bonus_threshold!=null&&m.hasOwnProperty("spin_bonus_threshold")){d.spin_bonus_threshold=o.json&&!isFinite(m.spin_bonus_threshold)?String(m.spin_bonus_threshold):m.spin_bonus_threshold}if(m.excellent_throw_threshold!=null&&m.hasOwnProperty("excellent_throw_threshold")){d.excellent_throw_threshold=o.json&&!isFinite(m.excellent_throw_threshold)?String(m.excellent_throw_threshold):m.excellent_throw_threshold}if(m.great_throw_threshold!=null&&m.hasOwnProperty("great_throw_threshold")){d.great_throw_threshold=o.json&&!isFinite(m.great_throw_threshold)?String(m.great_throw_threshold):m.great_throw_threshold}if(m.nice_throw_threshold!=null&&m.hasOwnProperty("nice_throw_threshold")){d.nice_throw_threshold=o.json&&!isFinite(m.nice_throw_threshold)?String(m.nice_throw_threshold):m.nice_throw_threshold}if(m.milestone_threshold!=null&&m.hasOwnProperty("milestone_threshold")){d.milestone_threshold=m.milestone_threshold}if(m.ar_plus_mode_enabled!=null&&m.hasOwnProperty("ar_plus_mode_enabled")){d.ar_plus_mode_enabled=m.ar_plus_mode_enabled}if(m.ar_close_proximity_threshold!=null&&m.hasOwnProperty("ar_close_proximity_threshold")){d.ar_close_proximity_threshold=o.json&&!isFinite(m.ar_close_proximity_threshold)?String(m.ar_close_proximity_threshold):m.ar_close_proximity_threshold}if(m.ar_low_awareness_threshold!=null&&m.hasOwnProperty("ar_low_awareness_threshold")){d.ar_low_awareness_threshold=o.json&&!isFinite(m.ar_low_awareness_threshold)?String(m.ar_low_awareness_threshold):m.ar_low_awareness_threshold}if(m.ar_close_proximity_multiplier!=null&&m.hasOwnProperty("ar_close_proximity_multiplier")){d.ar_close_proximity_multiplier=o.json&&!isFinite(m.ar_close_proximity_multiplier)?String(m.ar_close_proximity_multiplier):m.ar_close_proximity_multiplier}if(m.ar_awareness_penalty_threshold!=null&&m.hasOwnProperty("ar_awareness_penalty_threshold")){d.ar_awareness_penalty_threshold=o.json&&!isFinite(m.ar_awareness_penalty_threshold)?String(m.ar_awareness_penalty_threshold):m.ar_awareness_penalty_threshold}if(m.ar_low_awareness_max_multiplier!=null&&m.hasOwnProperty("ar_low_awareness_max_multiplier")){d.ar_low_awareness_max_multiplier=o.json&&!isFinite(m.ar_low_awareness_max_multiplier)?String(m.ar_low_awareness_max_multiplier):m.ar_low_awareness_max_multiplier}if(m.ar_high_awareness_min_penalty_multiplier!=null&&m.hasOwnProperty("ar_high_awareness_min_penalty_multiplier")){d.ar_high_awareness_min_penalty_multiplier=o.json&&!isFinite(m.ar_high_awareness_min_penalty_multiplier)?String(m.ar_high_awareness_min_penalty_multiplier):m.ar_high_awareness_min_penalty_multiplier}if(m.ar_plus_attempts_until_flee_max!=null&&m.hasOwnProperty("ar_plus_attempts_until_flee_max")){d.ar_plus_attempts_until_flee_max=m.ar_plus_attempts_until_flee_max}if(m.ar_plus_attempts_until_flee_infinite!=null&&m.hasOwnProperty("ar_plus_attempts_until_flee_infinite")){d.ar_plus_attempts_until_flee_infinite=m.ar_plus_attempts_until_flee_infinite}if(m.escaped_bonus_multiplier_max!=null&&m.hasOwnProperty("escaped_bonus_multiplier_max")){d.escaped_bonus_multiplier_max=o.json&&!isFinite(m.escaped_bonus_multiplier_max)?String(m.escaped_bonus_multiplier_max):m.escaped_bonus_multiplier_max}if(m.escaped_bonus_multiplier_by_excellent_throw!=null&&m.hasOwnProperty("escaped_bonus_multiplier_by_excellent_throw")){d.escaped_bonus_multiplier_by_excellent_throw=o.json&&!isFinite(m.escaped_bonus_multiplier_by_excellent_throw)?String(m.escaped_bonus_multiplier_by_excellent_throw):m.escaped_bonus_multiplier_by_excellent_throw}if(m.escaped_bonus_multiplier_by_great_throw!=null&&m.hasOwnProperty("escaped_bonus_multiplier_by_great_throw")){d.escaped_bonus_multiplier_by_great_throw=o.json&&!isFinite(m.escaped_bonus_multiplier_by_great_throw)?String(m.escaped_bonus_multiplier_by_great_throw):m.escaped_bonus_multiplier_by_great_throw}if(m.escaped_bonus_multiplier_by_nice_throw!=null&&m.hasOwnProperty("escaped_bonus_multiplier_by_nice_throw")){d.escaped_bonus_multiplier_by_nice_throw=o.json&&!isFinite(m.escaped_bonus_multiplier_by_nice_throw)?String(m.escaped_bonus_multiplier_by_nice_throw):m.escaped_bonus_multiplier_by_nice_throw}return d};EncounterSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EncounterSettings}();Master.EquippedBadgeSettings=function(){function EquippedBadgeSettings(p){this.catch_probability_bonus=[];this.flee_probability_bonus=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EquippedBadgeSettings.prototype.equip_badge_cooldown_ms=$util.Long?$util.Long.fromBits(0,0,false):0;EquippedBadgeSettings.prototype.catch_probability_bonus=$util.emptyArray;EquippedBadgeSettings.prototype.flee_probability_bonus=$util.emptyArray;EquippedBadgeSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.equip_badge_cooldown_ms!=null&&m.hasOwnProperty("equip_badge_cooldown_ms"))w.uint32(8).int64(m.equip_badge_cooldown_ms);if(m.catch_probability_bonus!=null&&m.catch_probability_bonus.length){w.uint32(18).fork();for(var i=0;i<m.catch_probability_bonus.length;++i)w.float(m.catch_probability_bonus[i]);w.ldelim()}if(m.flee_probability_bonus!=null&&m.flee_probability_bonus.length){w.uint32(26).fork();for(var i=0;i<m.flee_probability_bonus.length;++i)w.float(m.flee_probability_bonus[i]);w.ldelim()}return w};EquippedBadgeSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.EquippedBadgeSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.equip_badge_cooldown_ms=r.int64();break;case 2:if(!(m.catch_probability_bonus&&m.catch_probability_bonus.length))m.catch_probability_bonus=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.catch_probability_bonus.push(r.float())}else m.catch_probability_bonus.push(r.float());break;case 3:if(!(m.flee_probability_bonus&&m.flee_probability_bonus.length))m.flee_probability_bonus=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.flee_probability_bonus.push(r.float())}else m.flee_probability_bonus.push(r.float());break;default:r.skipType(t&7);break}}return m};EquippedBadgeSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.EquippedBadgeSettings)return d;var m=new $root.POGOProtos.Settings.Master.EquippedBadgeSettings;if(d.equip_badge_cooldown_ms!=null){if($util.Long)(m.equip_badge_cooldown_ms=$util.Long.fromValue(d.equip_badge_cooldown_ms)).unsigned=false;else if(typeof d.equip_badge_cooldown_ms==="string")m.equip_badge_cooldown_ms=parseInt(d.equip_badge_cooldown_ms,10);else if(typeof d.equip_badge_cooldown_ms==="number")m.equip_badge_cooldown_ms=d.equip_badge_cooldown_ms;else if(typeof d.equip_badge_cooldown_ms==="object")m.equip_badge_cooldown_ms=new $util.LongBits(d.equip_badge_cooldown_ms.low>>>0,d.equip_badge_cooldown_ms.high>>>0).toNumber()}if(d.catch_probability_bonus){if(!Array.isArray(d.catch_probability_bonus))throw TypeError(".POGOProtos.Settings.Master.EquippedBadgeSettings.catch_probability_bonus: array expected");m.catch_probability_bonus=[];for(var i=0;i<d.catch_probability_bonus.length;++i){m.catch_probability_bonus[i]=Number(d.catch_probability_bonus[i])}}if(d.flee_probability_bonus){if(!Array.isArray(d.flee_probability_bonus))throw TypeError(".POGOProtos.Settings.Master.EquippedBadgeSettings.flee_probability_bonus: array expected");m.flee_probability_bonus=[];for(var i=0;i<d.flee_probability_bonus.length;++i){m.flee_probability_bonus[i]=Number(d.flee_probability_bonus[i])}}return m};EquippedBadgeSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.catch_probability_bonus=[];d.flee_probability_bonus=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.equip_badge_cooldown_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.equip_badge_cooldown_ms=o.longs===String?"0":0}if(m.equip_badge_cooldown_ms!=null&&m.hasOwnProperty("equip_badge_cooldown_ms")){if(typeof m.equip_badge_cooldown_ms==="number")d.equip_badge_cooldown_ms=o.longs===String?String(m.equip_badge_cooldown_ms):m.equip_badge_cooldown_ms;else d.equip_badge_cooldown_ms=o.longs===String?$util.Long.prototype.toString.call(m.equip_badge_cooldown_ms):o.longs===Number?new $util.LongBits(m.equip_badge_cooldown_ms.low>>>0,m.equip_badge_cooldown_ms.high>>>0).toNumber():m.equip_badge_cooldown_ms}if(m.catch_probability_bonus&&m.catch_probability_bonus.length){d.catch_probability_bonus=[];for(var j=0;j<m.catch_probability_bonus.length;++j){d.catch_probability_bonus[j]=o.json&&!isFinite(m.catch_probability_bonus[j])?String(m.catch_probability_bonus[j]):m.catch_probability_bonus[j]}}if(m.flee_probability_bonus&&m.flee_probability_bonus.length){d.flee_probability_bonus=[];for(var j=0;j<m.flee_probability_bonus.length;++j){d.flee_probability_bonus[j]=o.json&&!isFinite(m.flee_probability_bonus[j])?String(m.flee_probability_bonus[j]):m.flee_probability_bonus[j]}}return d};EquippedBadgeSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EquippedBadgeSettings}();Master.EventBadgeSettings=function(){function EventBadgeSettings(p){this.mutually_exclusive_badges=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EventBadgeSettings.prototype.valid_from_ms=$util.Long?$util.Long.fromBits(0,0,false):0;EventBadgeSettings.prototype.valid_to_ms=$util.Long?$util.Long.fromBits(0,0,false):0;EventBadgeSettings.prototype.mutually_exclusive_badges=$util.emptyArray;EventBadgeSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.valid_from_ms!=null&&m.hasOwnProperty("valid_from_ms"))w.uint32(8).int64(m.valid_from_ms);if(m.valid_to_ms!=null&&m.hasOwnProperty("valid_to_ms"))w.uint32(16).int64(m.valid_to_ms);if(m.mutually_exclusive_badges!=null&&m.mutually_exclusive_badges.length){w.uint32(26).fork();for(var i=0;i<m.mutually_exclusive_badges.length;++i)w.int32(m.mutually_exclusive_badges[i]);w.ldelim()}return w};EventBadgeSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.EventBadgeSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.valid_from_ms=r.int64();break;case 2:m.valid_to_ms=r.int64();break;case 3:if(!(m.mutually_exclusive_badges&&m.mutually_exclusive_badges.length))m.mutually_exclusive_badges=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.mutually_exclusive_badges.push(r.int32())}else m.mutually_exclusive_badges.push(r.int32());break;default:r.skipType(t&7);break}}return m};EventBadgeSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.EventBadgeSettings)return d;var m=new $root.POGOProtos.Settings.Master.EventBadgeSettings;if(d.valid_from_ms!=null){if($util.Long)(m.valid_from_ms=$util.Long.fromValue(d.valid_from_ms)).unsigned=false;else if(typeof d.valid_from_ms==="string")m.valid_from_ms=parseInt(d.valid_from_ms,10);else if(typeof d.valid_from_ms==="number")m.valid_from_ms=d.valid_from_ms;else if(typeof d.valid_from_ms==="object")m.valid_from_ms=new $util.LongBits(d.valid_from_ms.low>>>0,d.valid_from_ms.high>>>0).toNumber()}if(d.valid_to_ms!=null){if($util.Long)(m.valid_to_ms=$util.Long.fromValue(d.valid_to_ms)).unsigned=false;else if(typeof d.valid_to_ms==="string")m.valid_to_ms=parseInt(d.valid_to_ms,10);else if(typeof d.valid_to_ms==="number")m.valid_to_ms=d.valid_to_ms;else if(typeof d.valid_to_ms==="object")m.valid_to_ms=new $util.LongBits(d.valid_to_ms.low>>>0,d.valid_to_ms.high>>>0).toNumber()}if(d.mutually_exclusive_badges){if(!Array.isArray(d.mutually_exclusive_badges))throw TypeError(".POGOProtos.Settings.Master.EventBadgeSettings.mutually_exclusive_badges: array expected");m.mutually_exclusive_badges=[];for(var i=0;i<d.mutually_exclusive_badges.length;++i){switch(d.mutually_exclusive_badges[i]){default:case"BADGE_UNSET":case 0:m.mutually_exclusive_badges[i]=0;break;case"BADGE_TRAVEL_KM":case 1:m.mutually_exclusive_badges[i]=1;break;case"BADGE_POKEDEX_ENTRIES":case 2:m.mutually_exclusive_badges[i]=2;break;case"BADGE_CAPTURE_TOTAL":case 3:m.mutually_exclusive_badges[i]=3;break;case"BADGE_DEFEATED_FORT":case 4:m.mutually_exclusive_badges[i]=4;break;case"BADGE_EVOLVED_TOTAL":case 5:m.mutually_exclusive_badges[i]=5;break;case"BADGE_HATCHED_TOTAL":case 6:m.mutually_exclusive_badges[i]=6;break;case"BADGE_ENCOUNTERED_TOTAL":case 7:m.mutually_exclusive_badges[i]=7;break;case"BADGE_POKESTOPS_VISITED":case 8:m.mutually_exclusive_badges[i]=8;break;case"BADGE_UNIQUE_POKESTOPS":case 9:m.mutually_exclusive_badges[i]=9;break;case"BADGE_POKEBALL_THROWN":case 10:m.mutually_exclusive_badges[i]=10;break;case"BADGE_BIG_MAGIKARP":case 11:m.mutually_exclusive_badges[i]=11;break;case"BADGE_DEPLOYED_TOTAL":case 12:m.mutually_exclusive_badges[i]=12;break;case"BADGE_BATTLE_ATTACK_WON":case 13:m.mutually_exclusive_badges[i]=13;break;case"BADGE_BATTLE_TRAINING_WON":case 14:m.mutually_exclusive_badges[i]=14;break;case"BADGE_BATTLE_DEFEND_WON":case 15:m.mutually_exclusive_badges[i]=15;break;case"BADGE_PRESTIGE_RAISED":case 16:m.mutually_exclusive_badges[i]=16;break;case"BADGE_PRESTIGE_DROPPED":case 17:m.mutually_exclusive_badges[i]=17;break;case"BADGE_TYPE_NORMAL":case 18:m.mutually_exclusive_badges[i]=18;break;case"BADGE_TYPE_FIGHTING":case 19:m.mutually_exclusive_badges[i]=19;break;case"BADGE_TYPE_FLYING":case 20:m.mutually_exclusive_badges[i]=20;break;case"BADGE_TYPE_POISON":case 21:m.mutually_exclusive_badges[i]=21;break;case"BADGE_TYPE_GROUND":case 22:m.mutually_exclusive_badges[i]=22;break;case"BADGE_TYPE_ROCK":case 23:m.mutually_exclusive_badges[i]=23;break;case"BADGE_TYPE_BUG":case 24:m.mutually_exclusive_badges[i]=24;break;case"BADGE_TYPE_GHOST":case 25:m.mutually_exclusive_badges[i]=25;break;case"BADGE_TYPE_STEEL":case 26:m.mutually_exclusive_badges[i]=26;break;case"BADGE_TYPE_FIRE":case 27:m.mutually_exclusive_badges[i]=27;break;case"BADGE_TYPE_WATER":case 28:m.mutually_exclusive_badges[i]=28;break;case"BADGE_TYPE_GRASS":case 29:m.mutually_exclusive_badges[i]=29;break;case"BADGE_TYPE_ELECTRIC":case 30:m.mutually_exclusive_badges[i]=30;break;case"BADGE_TYPE_PSYCHIC":case 31:m.mutually_exclusive_badges[i]=31;break;case"BADGE_TYPE_ICE":case 32:m.mutually_exclusive_badges[i]=32;break;case"BADGE_TYPE_DRAGON":case 33:m.mutually_exclusive_badges[i]=33;break;case"BADGE_TYPE_DARK":case 34:m.mutually_exclusive_badges[i]=34;break;case"BADGE_TYPE_FAIRY":case 35:m.mutually_exclusive_badges[i]=35;break;case"BADGE_SMALL_RATTATA":case 36:m.mutually_exclusive_badges[i]=36;break;case"BADGE_PIKACHU":case 37:m.mutually_exclusive_badges[i]=37;break;case"BADGE_UNOWN":case 38:m.mutually_exclusive_badges[i]=38;break;case"BADGE_POKEDEX_ENTRIES_GEN2":case 39:m.mutually_exclusive_badges[i]=39;break;case"BADGE_RAID_BATTLE_WON":case 40:m.mutually_exclusive_badges[i]=40;break;case"BADGE_LEGENDARY_BATTLE_WON":case 41:m.mutually_exclusive_badges[i]=41;break;case"BADGE_BERRIES_FED":case 42:m.mutually_exclusive_badges[i]=42;break;case"BADGE_HOURS_DEFENDED":case 43:m.mutually_exclusive_badges[i]=43;break;case"BADGE_PLACE_HOLDER":case 44:m.mutually_exclusive_badges[i]=44;break;case"BADGE_POKEDEX_ENTRIES_GEN3":case 45:m.mutually_exclusive_badges[i]=45;break;case"BADGE_CHALLENGE_QUESTS":case 46:m.mutually_exclusive_badges[i]=46;break;case"BADGE_MEW_ENCOUNTER":case 47:m.mutually_exclusive_badges[i]=47;break;case"BADGE_MAX_LEVEL_FRIENDS":case 48:m.mutually_exclusive_badges[i]=48;break;case"BADGE_TRADING":case 49:m.mutually_exclusive_badges[i]=49;break;case"BADGE_TRADING_DISTANCE":case 50:m.mutually_exclusive_badges[i]=50;break;case"BADGE_POKEDEX_ENTRIES_GEN4":case 51:m.mutually_exclusive_badges[i]=51;break;case"BADGE_GREAT_LEAGUE":case 52:m.mutually_exclusive_badges[i]=52;break;case"BADGE_ULTRA_LEAGUE":case 53:m.mutually_exclusive_badges[i]=53;break;case"BADGE_MASTER_LEAGUE":case 54:m.mutually_exclusive_badges[i]=54;break;case"BADGE_EVENT_MIN":case 2e3:m.mutually_exclusive_badges[i]=2e3;break;case"BADGE_CHICAGO_FEST_JULY_2017":case 2001:m.mutually_exclusive_badges[i]=2001;break;case"BADGE_PIKACHU_OUTBREAK_YOKOHAMA_2017":case 2002:m.mutually_exclusive_badges[i]=2002;break;case"BADGE_SAFARI_ZONE_EUROPE_2017":case 2003:m.mutually_exclusive_badges[i]=2003;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_07":case 2004:m.mutually_exclusive_badges[i]=2004;break;case"BADGE_SAFARI_ZONE_EUROPE_2017_10_14":case 2005:m.mutually_exclusive_badges[i]=2005;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_NORTH":case 2006:m.mutually_exclusive_badges[i]=2006;break;case"BADGE_CHICAGO_FEST_JULY_2018_SAT_SOUTH":case 2007:m.mutually_exclusive_badges[i]=2007;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_NORTH":case 2008:m.mutually_exclusive_badges[i]=2008;break;case"BADGE_CHICAGO_FEST_JULY_2018_SUN_SOUTH":case 2009:m.mutually_exclusive_badges[i]=2009;break;case"BADGE_APAC_PARTNER_JULY_2018_0":case 2010:m.mutually_exclusive_badges[i]=2010;break;case"BADGE_APAC_PARTNER_JULY_2018_1":case 2011:m.mutually_exclusive_badges[i]=2011;break;case"BADGE_APAC_PARTNER_JULY_2018_2":case 2012:m.mutually_exclusive_badges[i]=2012;break;case"BADGE_APAC_PARTNER_JULY_2018_3":case 2013:m.mutually_exclusive_badges[i]=2013;break;case"BADGE_APAC_PARTNER_JULY_2018_4":case 2014:m.mutually_exclusive_badges[i]=2014;break;case"BADGE_APAC_PARTNER_JULY_2018_5":case 2015:m.mutually_exclusive_badges[i]=2015;break;case"BADGE_APAC_PARTNER_JULY_2018_6":case 2016:m.mutually_exclusive_badges[i]=2016;break;case"BADGE_APAC_PARTNER_JULY_2018_7":case 2017:m.mutually_exclusive_badges[i]=2017;break;case"BADGE_APAC_PARTNER_JULY_2018_8":case 2018:m.mutually_exclusive_badges[i]=2018;break;case"BADGE_APAC_PARTNER_JULY_2018_9":case 2019:m.mutually_exclusive_badges[i]=2019;break;case"BADGE_YOKOSUKA_29_AUG_2018_MIKASA":case 2020:m.mutually_exclusive_badges[i]=2020;break;case"BADGE_YOKOSUKA_29_AUG_2018_VERNY":case 2021:m.mutually_exclusive_badges[i]=2021;break;case"BADGE_YOKOSUKA_29_AUG_2018_KURIHAMA":case 2022:m.mutually_exclusive_badges[i]=2022;break;case"BADGE_YOKOSUKA_30_AUG_2018_MIKASA":case 2023:m.mutually_exclusive_badges[i]=2023;break;case"BADGE_YOKOSUKA_30_AUG_2018_VERNY":case 2024:m.mutually_exclusive_badges[i]=2024;break;case"BADGE_YOKOSUKA_30_AUG_2018_KURIHAMA":case 2025:m.mutually_exclusive_badges[i]=2025;break;case"BADGE_YOKOSUKA_31_AUG_2018_MIKASA":case 2026:m.mutually_exclusive_badges[i]=2026;break;case"BADGE_YOKOSUKA_31_AUG_2018_VERNY":case 2027:m.mutually_exclusive_badges[i]=2027;break;case"BADGE_YOKOSUKA_31_AUG_2018_KURIHAMA":case 2028:m.mutually_exclusive_badges[i]=2028;break;case"BADGE_YOKOSUKA_1_SEP_2018_MIKASA":case 2029:m.mutually_exclusive_badges[i]=2029;break;case"BADGE_YOKOSUKA_1_SEP_2018_VERNY":case 2030:m.mutually_exclusive_badges[i]=2030;break;case"BADGE_YOKOSUKA_1_SEP_2018_KURIHAMA":case 2031:m.mutually_exclusive_badges[i]=2031;break;case"BADGE_YOKOSUKA_2_SEP_2018_MIKASA":case 2032:m.mutually_exclusive_badges[i]=2032;break;case"BADGE_YOKOSUKA_2_SEP_2018_VERNY":case 2033:m.mutually_exclusive_badges[i]=2033;break;case"BADGE_YOKOSUKA_2_SEP_2018_KURIHAMA":case 2034:m.mutually_exclusive_badges[i]=2034;break;case"BADGE_TOP_BANANA_1":case 2035:m.mutually_exclusive_badges[i]=2035;break;case"BADGE_TOP_BANANA_2":case 2036:m.mutually_exclusive_badges[i]=2036;break;case"BADGE_TOP_BANANA_3":case 2037:m.mutually_exclusive_badges[i]=2037;break}}}return m};EventBadgeSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.mutually_exclusive_badges=[]}if(o.defaults){if($util.Long){var n=new $util.Long(0,0,false);d.valid_from_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.valid_from_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.valid_to_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.valid_to_ms=o.longs===String?"0":0}if(m.valid_from_ms!=null&&m.hasOwnProperty("valid_from_ms")){if(typeof m.valid_from_ms==="number")d.valid_from_ms=o.longs===String?String(m.valid_from_ms):m.valid_from_ms;else d.valid_from_ms=o.longs===String?$util.Long.prototype.toString.call(m.valid_from_ms):o.longs===Number?new $util.LongBits(m.valid_from_ms.low>>>0,m.valid_from_ms.high>>>0).toNumber():m.valid_from_ms}if(m.valid_to_ms!=null&&m.hasOwnProperty("valid_to_ms")){if(typeof m.valid_to_ms==="number")d.valid_to_ms=o.longs===String?String(m.valid_to_ms):m.valid_to_ms;else d.valid_to_ms=o.longs===String?$util.Long.prototype.toString.call(m.valid_to_ms):o.longs===Number?new $util.LongBits(m.valid_to_ms.low>>>0,m.valid_to_ms.high>>>0).toNumber():m.valid_to_ms}if(m.mutually_exclusive_badges&&m.mutually_exclusive_badges.length){d.mutually_exclusive_badges=[];for(var j=0;j<m.mutually_exclusive_badges.length;++j){d.mutually_exclusive_badges[j]=o.enums===String?$root.POGOProtos.Enums.BadgeType[m.mutually_exclusive_badges[j]]:m.mutually_exclusive_badges[j]}}return d};EventBadgeSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EventBadgeSettings}();Master.ExRaidSettings=function(){function ExRaidSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ExRaidSettings.prototype.minimum_ex_raid_share_level=0;ExRaidSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.minimum_ex_raid_share_level!=null&&m.hasOwnProperty("minimum_ex_raid_share_level"))w.uint32(8).int32(m.minimum_ex_raid_share_level);return w};ExRaidSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.ExRaidSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.minimum_ex_raid_share_level=r.int32();break;default:r.skipType(t&7);break}}return m};ExRaidSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.ExRaidSettings)return d;var m=new $root.POGOProtos.Settings.Master.ExRaidSettings;switch(d.minimum_ex_raid_share_level){case"FRIENDSHIP_LEVEL_UNSET":case 0:m.minimum_ex_raid_share_level=0;break;case"FRIENDSHIP_LEVEL_0":case 1:m.minimum_ex_raid_share_level=1;break;case"FRIENDSHIP_LEVEL_1":case 2:m.minimum_ex_raid_share_level=2;break;case"FRIENDSHIP_LEVEL_2":case 3:m.minimum_ex_raid_share_level=3;break;case"FRIENDSHIP_LEVEL_3":case 4:m.minimum_ex_raid_share_level=4;break;case"FRIENDSHIP_LEVEL_4":case 5:m.minimum_ex_raid_share_level=5;break}return m};ExRaidSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.minimum_ex_raid_share_level=o.enums===String?"FRIENDSHIP_LEVEL_UNSET":0}if(m.minimum_ex_raid_share_level!=null&&m.hasOwnProperty("minimum_ex_raid_share_level")){d.minimum_ex_raid_share_level=o.enums===String?$root.POGOProtos.Enums.FriendshipLevelMilestone[m.minimum_ex_raid_share_level]:m.minimum_ex_raid_share_level}return d};ExRaidSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ExRaidSettings}();Master.FormSettings=function(){function FormSettings(p){this.forms=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FormSettings.prototype.pokemon=0;FormSettings.prototype.forms=$util.emptyArray;FormSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon!=null&&m.hasOwnProperty("pokemon"))w.uint32(8).int32(m.pokemon);if(m.forms!=null&&m.forms.length){for(var i=0;i<m.forms.length;++i)$root.POGOProtos.Settings.Master.FormSettings.Form.encode(m.forms[i],w.uint32(18).fork()).ldelim()}return w};FormSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.FormSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon=r.int32();break;case 2:if(!(m.forms&&m.forms.length))m.forms=[];m.forms.push($root.POGOProtos.Settings.Master.FormSettings.Form.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};FormSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.FormSettings)return d;var m=new $root.POGOProtos.Settings.Master.FormSettings;switch(d.pokemon){case"MISSINGNO":case 0:m.pokemon=0;break;case"BULBASAUR":case 1:m.pokemon=1;break;case"IVYSAUR":case 2:m.pokemon=2;break;case"VENUSAUR":case 3:m.pokemon=3;break;case"CHARMANDER":case 4:m.pokemon=4;break;case"CHARMELEON":case 5:m.pokemon=5;break;case"CHARIZARD":case 6:m.pokemon=6;break;case"SQUIRTLE":case 7:m.pokemon=7;break;case"WARTORTLE":case 8:m.pokemon=8;break;case"BLASTOISE":case 9:m.pokemon=9;break;case"CATERPIE":case 10:m.pokemon=10;break;case"METAPOD":case 11:m.pokemon=11;break;case"BUTTERFREE":case 12:m.pokemon=12;break;case"WEEDLE":case 13:m.pokemon=13;break;case"KAKUNA":case 14:m.pokemon=14;break;case"BEEDRILL":case 15:m.pokemon=15;break;case"PIDGEY":case 16:m.pokemon=16;break;case"PIDGEOTTO":case 17:m.pokemon=17;break;case"PIDGEOT":case 18:m.pokemon=18;break;case"RATTATA":case 19:m.pokemon=19;break;case"RATICATE":case 20:m.pokemon=20;break;case"SPEAROW":case 21:m.pokemon=21;break;case"FEAROW":case 22:m.pokemon=22;break;case"EKANS":case 23:m.pokemon=23;break;case"ARBOK":case 24:m.pokemon=24;break;case"PIKACHU":case 25:m.pokemon=25;break;case"RAICHU":case 26:m.pokemon=26;break;case"SANDSHREW":case 27:m.pokemon=27;break;case"SANDSLASH":case 28:m.pokemon=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon=29;break;case"NIDORINA":case 30:m.pokemon=30;break;case"NIDOQUEEN":case 31:m.pokemon=31;break;case"NIDORAN_MALE":case 32:m.pokemon=32;break;case"NIDORINO":case 33:m.pokemon=33;break;case"NIDOKING":case 34:m.pokemon=34;break;case"CLEFAIRY":case 35:m.pokemon=35;break;case"CLEFABLE":case 36:m.pokemon=36;break;case"VULPIX":case 37:m.pokemon=37;break;case"NINETALES":case 38:m.pokemon=38;break;case"JIGGLYPUFF":case 39:m.pokemon=39;break;case"WIGGLYTUFF":case 40:m.pokemon=40;break;case"ZUBAT":case 41:m.pokemon=41;break;case"GOLBAT":case 42:m.pokemon=42;break;case"ODDISH":case 43:m.pokemon=43;break;case"GLOOM":case 44:m.pokemon=44;break;case"VILEPLUME":case 45:m.pokemon=45;break;case"PARAS":case 46:m.pokemon=46;break;case"PARASECT":case 47:m.pokemon=47;break;case"VENONAT":case 48:m.pokemon=48;break;case"VENOMOTH":case 49:m.pokemon=49;break;case"DIGLETT":case 50:m.pokemon=50;break;case"DUGTRIO":case 51:m.pokemon=51;break;case"MEOWTH":case 52:m.pokemon=52;break;case"PERSIAN":case 53:m.pokemon=53;break;case"PSYDUCK":case 54:m.pokemon=54;break;case"GOLDUCK":case 55:m.pokemon=55;break;case"MANKEY":case 56:m.pokemon=56;break;case"PRIMEAPE":case 57:m.pokemon=57;break;case"GROWLITHE":case 58:m.pokemon=58;break;case"ARCANINE":case 59:m.pokemon=59;break;case"POLIWAG":case 60:m.pokemon=60;break;case"POLIWHIRL":case 61:m.pokemon=61;break;case"POLIWRATH":case 62:m.pokemon=62;break;case"ABRA":case 63:m.pokemon=63;break;case"KADABRA":case 64:m.pokemon=64;break;case"ALAKAZAM":case 65:m.pokemon=65;break;case"MACHOP":case 66:m.pokemon=66;break;case"MACHOKE":case 67:m.pokemon=67;break;case"MACHAMP":case 68:m.pokemon=68;break;case"BELLSPROUT":case 69:m.pokemon=69;break;case"WEEPINBELL":case 70:m.pokemon=70;break;case"VICTREEBEL":case 71:m.pokemon=71;break;case"TENTACOOL":case 72:m.pokemon=72;break;case"TENTACRUEL":case 73:m.pokemon=73;break;case"GEODUDE":case 74:m.pokemon=74;break;case"GRAVELER":case 75:m.pokemon=75;break;case"GOLEM":case 76:m.pokemon=76;break;case"PONYTA":case 77:m.pokemon=77;break;case"RAPIDASH":case 78:m.pokemon=78;break;case"SLOWPOKE":case 79:m.pokemon=79;break;case"SLOWBRO":case 80:m.pokemon=80;break;case"MAGNEMITE":case 81:m.pokemon=81;break;case"MAGNETON":case 82:m.pokemon=82;break;case"FARFETCHD":case 83:m.pokemon=83;break;case"DODUO":case 84:m.pokemon=84;break;case"DODRIO":case 85:m.pokemon=85;break;case"SEEL":case 86:m.pokemon=86;break;case"DEWGONG":case 87:m.pokemon=87;break;case"GRIMER":case 88:m.pokemon=88;break;case"MUK":case 89:m.pokemon=89;break;case"SHELLDER":case 90:m.pokemon=90;break;case"CLOYSTER":case 91:m.pokemon=91;break;case"GASTLY":case 92:m.pokemon=92;break;case"HAUNTER":case 93:m.pokemon=93;break;case"GENGAR":case 94:m.pokemon=94;break;case"ONIX":case 95:m.pokemon=95;break;case"DROWZEE":case 96:m.pokemon=96;break;case"HYPNO":case 97:m.pokemon=97;break;case"KRABBY":case 98:m.pokemon=98;break;case"KINGLER":case 99:m.pokemon=99;break;case"VOLTORB":case 100:m.pokemon=100;break;case"ELECTRODE":case 101:m.pokemon=101;break;case"EXEGGCUTE":case 102:m.pokemon=102;break;case"EXEGGUTOR":case 103:m.pokemon=103;break;case"CUBONE":case 104:m.pokemon=104;break;case"MAROWAK":case 105:m.pokemon=105;break;case"HITMONLEE":case 106:m.pokemon=106;break;case"HITMONCHAN":case 107:m.pokemon=107;break;case"LICKITUNG":case 108:m.pokemon=108;break;case"KOFFING":case 109:m.pokemon=109;break;case"WEEZING":case 110:m.pokemon=110;break;case"RHYHORN":case 111:m.pokemon=111;break;case"RHYDON":case 112:m.pokemon=112;break;case"CHANSEY":case 113:m.pokemon=113;break;case"TANGELA":case 114:m.pokemon=114;break;case"KANGASKHAN":case 115:m.pokemon=115;break;case"HORSEA":case 116:m.pokemon=116;break;case"SEADRA":case 117:m.pokemon=117;break;case"GOLDEEN":case 118:m.pokemon=118;break;case"SEAKING":case 119:m.pokemon=119;break;case"STARYU":case 120:m.pokemon=120;break;case"STARMIE":case 121:m.pokemon=121;break;case"MR_MIME":case 122:m.pokemon=122;break;case"SCYTHER":case 123:m.pokemon=123;break;case"JYNX":case 124:m.pokemon=124;break;case"ELECTABUZZ":case 125:m.pokemon=125;break;case"MAGMAR":case 126:m.pokemon=126;break;case"PINSIR":case 127:m.pokemon=127;break;case"TAUROS":case 128:m.pokemon=128;break;case"MAGIKARP":case 129:m.pokemon=129;break;case"GYARADOS":case 130:m.pokemon=130;break;case"LAPRAS":case 131:m.pokemon=131;break;case"DITTO":case 132:m.pokemon=132;break;case"EEVEE":case 133:m.pokemon=133;break;case"VAPOREON":case 134:m.pokemon=134;break;case"JOLTEON":case 135:m.pokemon=135;break;case"FLAREON":case 136:m.pokemon=136;break;case"PORYGON":case 137:m.pokemon=137;break;case"OMANYTE":case 138:m.pokemon=138;break;case"OMASTAR":case 139:m.pokemon=139;break;case"KABUTO":case 140:m.pokemon=140;break;case"KABUTOPS":case 141:m.pokemon=141;break;case"AERODACTYL":case 142:m.pokemon=142;break;case"SNORLAX":case 143:m.pokemon=143;break;case"ARTICUNO":case 144:m.pokemon=144;break;case"ZAPDOS":case 145:m.pokemon=145;break;case"MOLTRES":case 146:m.pokemon=146;break;case"DRATINI":case 147:m.pokemon=147;break;case"DRAGONAIR":case 148:m.pokemon=148;break;case"DRAGONITE":case 149:m.pokemon=149;break;case"MEWTWO":case 150:m.pokemon=150;break;case"MEW":case 151:m.pokemon=151;break;case"CHIKORITA":case 152:m.pokemon=152;break;case"BAYLEEF":case 153:m.pokemon=153;break;case"MEGANIUM":case 154:m.pokemon=154;break;case"CYNDAQUIL":case 155:m.pokemon=155;break;case"QUILAVA":case 156:m.pokemon=156;break;case"TYPHLOSION":case 157:m.pokemon=157;break;case"TOTODILE":case 158:m.pokemon=158;break;case"CROCONAW":case 159:m.pokemon=159;break;case"FERALIGATR":case 160:m.pokemon=160;break;case"SENTRET":case 161:m.pokemon=161;break;case"FURRET":case 162:m.pokemon=162;break;case"HOOTHOOT":case 163:m.pokemon=163;break;case"NOCTOWL":case 164:m.pokemon=164;break;case"LEDYBA":case 165:m.pokemon=165;break;case"LEDIAN":case 166:m.pokemon=166;break;case"SPINARAK":case 167:m.pokemon=167;break;case"ARIADOS":case 168:m.pokemon=168;break;case"CROBAT":case 169:m.pokemon=169;break;case"CHINCHOU":case 170:m.pokemon=170;break;case"LANTURN":case 171:m.pokemon=171;break;case"PICHU":case 172:m.pokemon=172;break;case"CLEFFA":case 173:m.pokemon=173;break;case"IGGLYBUFF":case 174:m.pokemon=174;break;case"TOGEPI":case 175:m.pokemon=175;break;case"TOGETIC":case 176:m.pokemon=176;break;case"NATU":case 177:m.pokemon=177;break;case"XATU":case 178:m.pokemon=178;break;case"MAREEP":case 179:m.pokemon=179;break;case"FLAAFFY":case 180:m.pokemon=180;break;case"AMPHAROS":case 181:m.pokemon=181;break;case"BELLOSSOM":case 182:m.pokemon=182;break;case"MARILL":case 183:m.pokemon=183;break;case"AZUMARILL":case 184:m.pokemon=184;break;case"SUDOWOODO":case 185:m.pokemon=185;break;case"POLITOED":case 186:m.pokemon=186;break;case"HOPPIP":case 187:m.pokemon=187;break;case"SKIPLOOM":case 188:m.pokemon=188;break;case"JUMPLUFF":case 189:m.pokemon=189;break;case"AIPOM":case 190:m.pokemon=190;break;case"SUNKERN":case 191:m.pokemon=191;break;case"SUNFLORA":case 192:m.pokemon=192;break;case"YANMA":case 193:m.pokemon=193;break;case"WOOPER":case 194:m.pokemon=194;break;case"QUAGSIRE":case 195:m.pokemon=195;break;case"ESPEON":case 196:m.pokemon=196;break;case"UMBREON":case 197:m.pokemon=197;break;case"MURKROW":case 198:m.pokemon=198;break;case"SLOWKING":case 199:m.pokemon=199;break;case"MISDREAVUS":case 200:m.pokemon=200;break;case"UNOWN":case 201:m.pokemon=201;break;case"WOBBUFFET":case 202:m.pokemon=202;break;case"GIRAFARIG":case 203:m.pokemon=203;break;case"PINECO":case 204:m.pokemon=204;break;case"FORRETRESS":case 205:m.pokemon=205;break;case"DUNSPARCE":case 206:m.pokemon=206;break;case"GLIGAR":case 207:m.pokemon=207;break;case"STEELIX":case 208:m.pokemon=208;break;case"SNUBBULL":case 209:m.pokemon=209;break;case"GRANBULL":case 210:m.pokemon=210;break;case"QWILFISH":case 211:m.pokemon=211;break;case"SCIZOR":case 212:m.pokemon=212;break;case"SHUCKLE":case 213:m.pokemon=213;break;case"HERACROSS":case 214:m.pokemon=214;break;case"SNEASEL":case 215:m.pokemon=215;break;case"TEDDIURSA":case 216:m.pokemon=216;break;case"URSARING":case 217:m.pokemon=217;break;case"SLUGMA":case 218:m.pokemon=218;break;case"MAGCARGO":case 219:m.pokemon=219;break;case"SWINUB":case 220:m.pokemon=220;break;case"PILOSWINE":case 221:m.pokemon=221;break;case"CORSOLA":case 222:m.pokemon=222;break;case"REMORAID":case 223:m.pokemon=223;break;case"OCTILLERY":case 224:m.pokemon=224;break;case"DELIBIRD":case 225:m.pokemon=225;break;case"MANTINE":case 226:m.pokemon=226;break;case"SKARMORY":case 227:m.pokemon=227;break;case"HOUNDOUR":case 228:m.pokemon=228;break;case"HOUNDOOM":case 229:m.pokemon=229;break;case"KINGDRA":case 230:m.pokemon=230;break;case"PHANPY":case 231:m.pokemon=231;break;case"DONPHAN":case 232:m.pokemon=232;break;case"PORYGON2":case 233:m.pokemon=233;break;case"STANTLER":case 234:m.pokemon=234;break;case"SMEARGLE":case 235:m.pokemon=235;break;case"TYROGUE":case 236:m.pokemon=236;break;case"HITMONTOP":case 237:m.pokemon=237;break;case"SMOOCHUM":case 238:m.pokemon=238;break;case"ELEKID":case 239:m.pokemon=239;break;case"MAGBY":case 240:m.pokemon=240;break;case"MILTANK":case 241:m.pokemon=241;break;case"BLISSEY":case 242:m.pokemon=242;break;case"RAIKOU":case 243:m.pokemon=243;break;case"ENTEI":case 244:m.pokemon=244;break;case"SUICUNE":case 245:m.pokemon=245;break;case"LARVITAR":case 246:m.pokemon=246;break;case"PUPITAR":case 247:m.pokemon=247;break;case"TYRANITAR":case 248:m.pokemon=248;break;case"LUGIA":case 249:m.pokemon=249;break;case"HO_OH":case 250:m.pokemon=250;break;case"CELEBI":case 251:m.pokemon=251;break;case"TREECKO":case 252:m.pokemon=252;break;case"GROVYLE":case 253:m.pokemon=253;break;case"SCEPTILE":case 254:m.pokemon=254;break;case"TORCHIC":case 255:m.pokemon=255;break;case"COMBUSKEN":case 256:m.pokemon=256;break;case"BLAZIKEN":case 257:m.pokemon=257;break;case"MUDKIP":case 258:m.pokemon=258;break;case"MARSHTOMP":case 259:m.pokemon=259;break;case"SWAMPERT":case 260:m.pokemon=260;break;case"POOCHYENA":case 261:m.pokemon=261;break;case"MIGHTYENA":case 262:m.pokemon=262;break;case"ZIGZAGOON":case 263:m.pokemon=263;break;case"LINOONE":case 264:m.pokemon=264;break;case"WURMPLE":case 265:m.pokemon=265;break;case"SILCOON":case 266:m.pokemon=266;break;case"BEAUTIFLY":case 267:m.pokemon=267;break;case"CASCOON":case 268:m.pokemon=268;break;case"DUSTOX":case 269:m.pokemon=269;break;case"LOTAD":case 270:m.pokemon=270;break;case"LOMBRE":case 271:m.pokemon=271;break;case"LUDICOLO":case 272:m.pokemon=272;break;case"SEEDOT":case 273:m.pokemon=273;break;case"NUZLEAF":case 274:m.pokemon=274;break;case"SHIFTRY":case 275:m.pokemon=275;break;case"TAILLOW":case 276:m.pokemon=276;break;case"SWELLOW":case 277:m.pokemon=277;break;case"WINGULL":case 278:m.pokemon=278;break;case"PELIPPER":case 279:m.pokemon=279;break;case"RALTS":case 280:m.pokemon=280;break;case"KIRLIA":case 281:m.pokemon=281;break;case"GARDEVOIR":case 282:m.pokemon=282;break;case"SURSKIT":case 283:m.pokemon=283;break;case"MASQUERAIN":case 284:m.pokemon=284;break;case"SHROOMISH":case 285:m.pokemon=285;break;case"BRELOOM":case 286:m.pokemon=286;break;case"SLAKOTH":case 287:m.pokemon=287;break;case"VIGOROTH":case 288:m.pokemon=288;break;case"SLAKING":case 289:m.pokemon=289;break;case"NINCADA":case 290:m.pokemon=290;break;case"NINJASK":case 291:m.pokemon=291;break;case"SHEDINJA":case 292:m.pokemon=292;break;case"WHISMUR":case 293:m.pokemon=293;break;case"LOUDRED":case 294:m.pokemon=294;break;case"EXPLOUD":case 295:m.pokemon=295;break;case"MAKUHITA":case 296:m.pokemon=296;break;case"HARIYAMA":case 297:m.pokemon=297;break;case"AZURILL":case 298:m.pokemon=298;break;case"NOSEPASS":case 299:m.pokemon=299;break;case"SKITTY":case 300:m.pokemon=300;break;case"DELCATTY":case 301:m.pokemon=301;break;case"SABLEYE":case 302:m.pokemon=302;break;case"MAWILE":case 303:m.pokemon=303;break;case"ARON":case 304:m.pokemon=304;break;case"LAIRON":case 305:m.pokemon=305;break;case"AGGRON":case 306:m.pokemon=306;break;case"MEDITITE":case 307:m.pokemon=307;break;case"MEDICHAM":case 308:m.pokemon=308;break;case"ELECTRIKE":case 309:m.pokemon=309;break;case"MANECTRIC":case 310:m.pokemon=310;break;case"PLUSLE":case 311:m.pokemon=311;break;case"MINUN":case 312:m.pokemon=312;break;case"VOLBEAT":case 313:m.pokemon=313;break;case"ILLUMISE":case 314:m.pokemon=314;break;case"ROSELIA":case 315:m.pokemon=315;break;case"GULPIN":case 316:m.pokemon=316;break;case"SWALOT":case 317:m.pokemon=317;break;case"CARVANHA":case 318:m.pokemon=318;break;case"SHARPEDO":case 319:m.pokemon=319;break;case"WAILMER":case 320:m.pokemon=320;break;case"WAILORD":case 321:m.pokemon=321;break;case"NUMEL":case 322:m.pokemon=322;break;case"CAMERUPT":case 323:m.pokemon=323;break;case"TORKOAL":case 324:m.pokemon=324;break;case"SPOINK":case 325:m.pokemon=325;break;case"GRUMPIG":case 326:m.pokemon=326;break;case"SPINDA":case 327:m.pokemon=327;break;case"TRAPINCH":case 328:m.pokemon=328;break;case"VIBRAVA":case 329:m.pokemon=329;break;case"FLYGON":case 330:m.pokemon=330;break;case"CACNEA":case 331:m.pokemon=331;break;case"CACTURNE":case 332:m.pokemon=332;break;case"SWABLU":case 333:m.pokemon=333;break;case"ALTARIA":case 334:m.pokemon=334;break;case"ZANGOOSE":case 335:m.pokemon=335;break;case"SEVIPER":case 336:m.pokemon=336;break;case"LUNATONE":case 337:m.pokemon=337;break;case"SOLROCK":case 338:m.pokemon=338;break;case"BARBOACH":case 339:m.pokemon=339;break;case"WHISCASH":case 340:m.pokemon=340;break;case"CORPHISH":case 341:m.pokemon=341;break;case"CRAWDAUNT":case 342:m.pokemon=342;break;case"BALTOY":case 343:m.pokemon=343;break;case"CLAYDOL":case 344:m.pokemon=344;break;case"LILEEP":case 345:m.pokemon=345;break;case"CRADILY":case 346:m.pokemon=346;break;case"ANORITH":case 347:m.pokemon=347;break;case"ARMALDO":case 348:m.pokemon=348;break;case"FEEBAS":case 349:m.pokemon=349;break;case"MILOTIC":case 350:m.pokemon=350;break;case"CASTFORM":case 351:m.pokemon=351;break;case"KECLEON":case 352:m.pokemon=352;break;case"SHUPPET":case 353:m.pokemon=353;break;case"BANETTE":case 354:m.pokemon=354;break;case"DUSKULL":case 355:m.pokemon=355;break;case"DUSCLOPS":case 356:m.pokemon=356;break;case"TROPIUS":case 357:m.pokemon=357;break;case"CHIMECHO":case 358:m.pokemon=358;break;case"ABSOL":case 359:m.pokemon=359;break;case"WYNAUT":case 360:m.pokemon=360;break;case"SNORUNT":case 361:m.pokemon=361;break;case"GLALIE":case 362:m.pokemon=362;break;case"SPHEAL":case 363:m.pokemon=363;break;case"SEALEO":case 364:m.pokemon=364;break;case"WALREIN":case 365:m.pokemon=365;break;case"CLAMPERL":case 366:m.pokemon=366;break;case"HUNTAIL":case 367:m.pokemon=367;break;case"GOREBYSS":case 368:m.pokemon=368;break;case"RELICANTH":case 369:m.pokemon=369;break;case"LUVDISC":case 370:m.pokemon=370;break;case"BAGON":case 371:m.pokemon=371;break;case"SHELGON":case 372:m.pokemon=372;break;case"SALAMENCE":case 373:m.pokemon=373;break;case"BELDUM":case 374:m.pokemon=374;break;case"METANG":case 375:m.pokemon=375;break;case"METAGROSS":case 376:m.pokemon=376;break;case"REGIROCK":case 377:m.pokemon=377;break;case"REGICE":case 378:m.pokemon=378;break;case"REGISTEEL":case 379:m.pokemon=379;break;case"LATIAS":case 380:m.pokemon=380;break;case"LATIOS":case 381:m.pokemon=381;break;case"KYOGRE":case 382:m.pokemon=382;break;case"GROUDON":case 383:m.pokemon=383;break;case"RAYQUAZA":case 384:m.pokemon=384;break;case"JIRACHI":case 385:m.pokemon=385;break;case"DEOXYS":case 386:m.pokemon=386;break;case"TURTWIG":case 387:m.pokemon=387;break;case"GROTLE":case 388:m.pokemon=388;break;case"TORTERRA":case 389:m.pokemon=389;break;case"CHIMCHAR":case 390:m.pokemon=390;break;case"MONFERNO":case 391:m.pokemon=391;break;case"INFERNAPE":case 392:m.pokemon=392;break;case"PIPLUP":case 393:m.pokemon=393;break;case"PRINPLUP":case 394:m.pokemon=394;break;case"EMPOLEON":case 395:m.pokemon=395;break;case"STARLY":case 396:m.pokemon=396;break;case"STARAVIA":case 397:m.pokemon=397;break;case"STARAPTOR":case 398:m.pokemon=398;break;case"BIDOOF":case 399:m.pokemon=399;break;case"BIBAREL":case 400:m.pokemon=400;break;case"KRICKETOT":case 401:m.pokemon=401;break;case"KRICKETUNE":case 402:m.pokemon=402;break;case"SHINX":case 403:m.pokemon=403;break;case"LUXIO":case 404:m.pokemon=404;break;case"LUXRAY":case 405:m.pokemon=405;break;case"BUDEW":case 406:m.pokemon=406;break;case"ROSERADE":case 407:m.pokemon=407;break;case"CRANIDOS":case 408:m.pokemon=408;break;case"RAMPARDOS":case 409:m.pokemon=409;break;case"SHIELDON":case 410:m.pokemon=410;break;case"BASTIODON":case 411:m.pokemon=411;break;case"BURMY":case 412:m.pokemon=412;break;case"WORMADAM":case 413:m.pokemon=413;break;case"MOTHIM":case 414:m.pokemon=414;break;case"COMBEE":case 415:m.pokemon=415;break;case"VESPIQUEN":case 416:m.pokemon=416;break;case"PACHIRISU":case 417:m.pokemon=417;break;case"BUIZEL":case 418:m.pokemon=418;break;case"FLOATZEL":case 419:m.pokemon=419;break;case"CHERUBI":case 420:m.pokemon=420;break;case"CHERRIM":case 421:m.pokemon=421;break;case"SHELLOS":case 422:m.pokemon=422;break;case"GASTRODON":case 423:m.pokemon=423;break;case"AMBIPOM":case 424:m.pokemon=424;break;case"DRIFLOON":case 425:m.pokemon=425;break;case"DRIFBLIM":case 426:m.pokemon=426;break;case"BUNEARY":case 427:m.pokemon=427;break;case"LOPUNNY":case 428:m.pokemon=428;break;case"MISMAGIUS":case 429:m.pokemon=429;break;case"HONCHKROW":case 430:m.pokemon=430;break;case"GLAMEOW":case 431:m.pokemon=431;break;case"PURUGLY":case 432:m.pokemon=432;break;case"CHINGLING":case 433:m.pokemon=433;break;case"STUNKY":case 434:m.pokemon=434;break;case"SKUNTANK":case 435:m.pokemon=435;break;case"BRONZOR":case 436:m.pokemon=436;break;case"BRONZONG":case 437:m.pokemon=437;break;case"BONSLY":case 438:m.pokemon=438;break;case"MIME_JR":case 439:m.pokemon=439;break;case"HAPPINY":case 440:m.pokemon=440;break;case"CHATOT":case 441:m.pokemon=441;break;case"SPIRITOMB":case 442:m.pokemon=442;break;case"GIBLE":case 443:m.pokemon=443;break;case"GABITE":case 444:m.pokemon=444;break;case"GARCHOMP":case 445:m.pokemon=445;break;case"MUNCHLAX":case 446:m.pokemon=446;break;case"RIOLU":case 447:m.pokemon=447;break;case"LUCARIO":case 448:m.pokemon=448;break;case"HIPPOPOTAS":case 449:m.pokemon=449;break;case"HIPPOWDON":case 450:m.pokemon=450;break;case"SKORUPI":case 451:m.pokemon=451;break;case"DRAPION":case 452:m.pokemon=452;break;case"CROAGUNK":case 453:m.pokemon=453;break;case"TOXICROAK":case 454:m.pokemon=454;break;case"CARNIVINE":case 455:m.pokemon=455;break;case"FINNEON":case 456:m.pokemon=456;break;case"LUMINEON":case 457:m.pokemon=457;break;case"MANTYKE":case 458:m.pokemon=458;break;case"SNOVER":case 459:m.pokemon=459;break;case"ABOMASNOW":case 460:m.pokemon=460;break;case"WEAVILE":case 461:m.pokemon=461;break;case"MAGNEZONE":case 462:m.pokemon=462;break;case"LICKILICKY":case 463:m.pokemon=463;break;case"RHYPERIOR":case 464:m.pokemon=464;break;case"TANGROWTH":case 465:m.pokemon=465;break;case"ELECTIVIRE":case 466:m.pokemon=466;break;case"MAGMORTAR":case 467:m.pokemon=467;break;case"TOGEKISS":case 468:m.pokemon=468;break;case"YANMEGA":case 469:m.pokemon=469;break;case"LEAFEON":case 470:m.pokemon=470;break;case"GLACEON":case 471:m.pokemon=471;break;case"GLISCOR":case 472:m.pokemon=472;break;case"MAMOSWINE":case 473:m.pokemon=473;break;case"PORYGON_Z":case 474:m.pokemon=474;break;case"GALLADE":case 475:m.pokemon=475;break;case"PROBOPASS":case 476:m.pokemon=476;break;case"DUSKNOIR":case 477:m.pokemon=477;break;case"FROSLASS":case 478:m.pokemon=478;break;case"ROTOM":case 479:m.pokemon=479;break;case"UXIE":case 480:m.pokemon=480;break;case"MESPRIT":case 481:m.pokemon=481;break;case"AZELF":case 482:m.pokemon=482;break;case"DIALGA":case 483:m.pokemon=483;break;case"PALKIA":case 484:m.pokemon=484;break;case"HEATRAN":case 485:m.pokemon=485;break;case"REGIGIGAS":case 486:m.pokemon=486;break;case"GIRATINA":case 487:m.pokemon=487;break;case"CRESSELIA":case 488:m.pokemon=488;break;case"PHIONE":case 489:m.pokemon=489;break;case"MANAPHY":case 490:m.pokemon=490;break;case"DARKRAI":case 491:m.pokemon=491;break;case"SHAYMIN":case 492:m.pokemon=492;break;case"ARCEUS":case 493:m.pokemon=493;break;case"MELTAN":case 808:m.pokemon=808;break;case"MELMETAL":case 809:m.pokemon=809;break}if(d.forms){if(!Array.isArray(d.forms))throw TypeError(".POGOProtos.Settings.Master.FormSettings.forms: array expected");m.forms=[];for(var i=0;i<d.forms.length;++i){if(typeof d.forms[i]!=="object")throw TypeError(".POGOProtos.Settings.Master.FormSettings.forms: object expected");m.forms[i]=$root.POGOProtos.Settings.Master.FormSettings.Form.fromObject(d.forms[i])}}return m};FormSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.forms=[]}if(o.defaults){d.pokemon=o.enums===String?"MISSINGNO":0}if(m.pokemon!=null&&m.hasOwnProperty("pokemon")){d.pokemon=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon]:m.pokemon}if(m.forms&&m.forms.length){d.forms=[];for(var j=0;j<m.forms.length;++j){d.forms[j]=$root.POGOProtos.Settings.Master.FormSettings.Form.toObject(m.forms[j],o)}}return d};FormSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};FormSettings.Form=function(){function Form(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}Form.prototype.form=0;Form.prototype.asset_bundle_value=0;Form.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.form!=null&&m.hasOwnProperty("form"))w.uint32(8).int32(m.form);if(m.asset_bundle_value!=null&&m.hasOwnProperty("asset_bundle_value"))w.uint32(16).int32(m.asset_bundle_value);return w};Form.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.FormSettings.Form;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.form=r.int32();break;case 2:m.asset_bundle_value=r.int32();break;default:r.skipType(t&7);break}}return m};Form.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.FormSettings.Form)return d;var m=new $root.POGOProtos.Settings.Master.FormSettings.Form;switch(d.form){case"FORM_UNSET":case 0:m.form=0;break;case"UNOWN_A":case 1:m.form=1;break;case"UNOWN_B":case 2:m.form=2;break;case"UNOWN_C":case 3:m.form=3;break;case"UNOWN_D":case 4:m.form=4;break;case"UNOWN_E":case 5:m.form=5;break;case"UNOWN_F":case 6:m.form=6;break;case"UNOWN_G":case 7:m.form=7;break;case"UNOWN_H":case 8:m.form=8;break;case"UNOWN_I":case 9:m.form=9;break;case"UNOWN_J":case 10:m.form=10;break;case"UNOWN_K":case 11:m.form=11;break;case"UNOWN_L":case 12:m.form=12;break;case"UNOWN_M":case 13:m.form=13;break;case"UNOWN_N":case 14:m.form=14;break;case"UNOWN_O":case 15:m.form=15;break;case"UNOWN_P":case 16:m.form=16;break;case"UNOWN_Q":case 17:m.form=17;break;case"UNOWN_R":case 18:m.form=18;break;case"UNOWN_S":case 19:m.form=19;break;case"UNOWN_T":case 20:m.form=20;break;case"UNOWN_U":case 21:m.form=21;break;case"UNOWN_V":case 22:m.form=22;break;case"UNOWN_W":case 23:m.form=23;break;case"UNOWN_X":case 24:m.form=24;break;case"UNOWN_Y":case 25:m.form=25;break;case"UNOWN_Z":case 26:m.form=26;break;case"UNOWN_EXCLAMATION_POINT":case 27:m.form=27;break;case"UNOWN_QUESTION_MARK":case 28:m.form=28;break;case"CASTFORM_NORMAL":case 29:m.form=29;break;case"CASTFORM_SUNNY":case 30:m.form=30;break;case"CASTFORM_RAINY":case 31:m.form=31;break;case"CASTFORM_SNOWY":case 32:m.form=32;break;case"DEOXYS_NORMAL":case 33:m.form=33;break;case"DEOXYS_ATTACK":case 34:m.form=34;break;case"DEOXYS_DEFENSE":case 35:m.form=35;break;case"DEOXYS_SPEED":case 36:m.form=36;break;case"SPINDA_00":case 37:m.form=37;break;case"SPINDA_01":case 38:m.form=38;break;case"SPINDA_02":case 39:m.form=39;break;case"SPINDA_03":case 40:m.form=40;break;case"SPINDA_04":case 41:m.form=41;break;case"SPINDA_05":case 42:m.form=42;break;case"SPINDA_06":case 43:m.form=43;break;case"SPINDA_07":case 44:m.form=44;break;case"RATTATA_NORMAL":case 45:m.form=45;break;case"RATTATA_ALOLA":case 46:m.form=46;break;case"RATICATE_NORMAL":case 47:m.form=47;break;case"RATICATE_ALOLA":case 48:m.form=48;break;case"RAICHU_NORMAL":case 49:m.form=49;break;case"RAICHU_ALOLA":case 50:m.form=50;break;case"SANDSHREW_NORMAL":case 51:m.form=51;break;case"SANDSHREW_ALOLA":case 52:m.form=52;break;case"SANDSLASH_NORMAL":case 53:m.form=53;break;case"SANDSLASH_ALOLA":case 54:m.form=54;break;case"VULPIX_NORMAL":case 55:m.form=55;break;case"VULPIX_ALOLA":case 56:m.form=56;break;case"NINETALES_NORMAL":case 57:m.form=57;break;case"NINETALES_ALOLA":case 58:m.form=58;break;case"DIGLETT_NORMAL":case 59:m.form=59;break;case"DIGLETT_ALOLA":case 60:m.form=60;break;case"DUGTRIO_NORMAL":case 61:m.form=61;break;case"DUGTRIO_ALOLA":case 62:m.form=62;break;case"MEOWTH_NORMAL":case 63:m.form=63;break;case"MEOWTH_ALOLA":case 64:m.form=64;break;case"PERSIAN_NORMAL":case 65:m.form=65;break;case"PERSIAN_ALOLA":case 66:m.form=66;break;case"GEODUDE_NORMAL":case 67:m.form=67;break;case"GEODUDE_ALOLA":case 68:m.form=68;break;case"GRAVELER_NORMAL":case 69:m.form=69;break;case"GRAVELER_ALOLA":case 70:m.form=70;break;case"GOLEM_NORMAL":case 71:m.form=71;break;case"GOLEM_ALOLA":case 72:m.form=72;break;case"GRIMER_NORMAL":case 73:m.form=73;break;case"GRIMER_ALOLA":case 74:m.form=74;break;case"MUK_NORMAL":case 75:m.form=75;break;case"MUK_ALOLA":case 76:m.form=76;break;case"EXEGGUTOR_NORMAL":case 77:m.form=77;break;case"EXEGGUTOR_ALOLA":case 78:m.form=78;break;case"MAROWAK_NORMAL":case 79:m.form=79;break;case"MAROWAK_ALOLA":case 80:m.form=80;break;case"ROTOM_NORMAL":case 81:m.form=81;break;case"ROTOM_FROST":case 82:m.form=82;break;case"ROTOM_FAN":case 83:m.form=83;break;case"ROTOM_MOW":case 84:m.form=84;break;case"ROTOM_WASH":case 85:m.form=85;break;case"ROTOM_HEAT":case 86:m.form=86;break;case"WORMADAM_PLANT":case 87:m.form=87;break;case"WORMADAM_SANDY":case 88:m.form=88;break;case"WORMADAM_TRASH":case 89:m.form=89;break;case"GIRATINA_ALTERED":case 90:m.form=90;break;case"GIRATINA_ORIGIN":case 91:m.form=91;break;case"SHAYMIN_SKY":case 92:m.form=92;break;case"SHAYMIN_LAND":case 93:m.form=93;break;case"CHERRIM_OVERCAST":case 94:m.form=94;break;case"CHERRIM_SUNNY":case 95:m.form=95;break;case"SHELLOS_WEST_SEA":case 96:m.form=96;break;case"SHELLOS_EAST_SEA":case 97:m.form=97;break;case"GASTRODON_WEST_SEA":case 98:m.form=98;break;case"GASTRODON_EAST_SEA":case 99:m.form=99;break;case"ARCEUS_NORMAL":case 100:m.form=100;break;case"ARCEUS_FIGHTING":case 101:m.form=101;break;case"ARCEUS_FLYING":case 102:m.form=102;break;case"ARCEUS_POISON":case 103:m.form=103;break;case"ARCEUS_GROUND":case 104:m.form=104;break;case"ARCEUS_ROCK":case 105:m.form=105;break;case"ARCEUS_BUG":case 106:m.form=106;break;case"ARCEUS_GHOST":case 107:m.form=107;break;case"ARCEUS_STEEL":case 108:m.form=108;break;case"ARCEUS_FIRE":case 109:m.form=109;break;case"ARCEUS_WATER":case 110:m.form=110;break;case"ARCEUS_GRASS":case 111:m.form=111;break;case"ARCEUS_ELECTRIC":case 112:m.form=112;break;case"ARCEUS_PSYCHIC":case 113:m.form=113;break;case"ARCEUS_ICE":case 114:m.form=114;break;case"ARCEUS_DRAGON":case 115:m.form=115;break;case"ARCEUS_DARK":case 116:m.form=116;break;case"ARCEUS_FAIRY":case 117:m.form=117;break;case"BURMY_PLANT":case 118:m.form=118;break;case"BURMY_SANDY":case 119:m.form=119;break;case"BURMY_TRASH":case 120:m.form=120;break}if(d.asset_bundle_value!=null){m.asset_bundle_value=d.asset_bundle_value|0}return m};Form.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.form=o.enums===String?"FORM_UNSET":0;d.asset_bundle_value=0}if(m.form!=null&&m.hasOwnProperty("form")){d.form=o.enums===String?$root.POGOProtos.Enums.Form[m.form]:m.form}if(m.asset_bundle_value!=null&&m.hasOwnProperty("asset_bundle_value")){d.asset_bundle_value=m.asset_bundle_value}return d};Form.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return Form}();return FormSettings}();Master.FriendshipLevelMilestoneSettings=function(){function FriendshipLevelMilestoneSettings(p){this.unlocked_trading=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FriendshipLevelMilestoneSettings.prototype.min_points_to_reach=0;FriendshipLevelMilestoneSettings.prototype.milestone_xp_reward=0;FriendshipLevelMilestoneSettings.prototype.attack_bonus_percentage=0;FriendshipLevelMilestoneSettings.prototype.raid_ball_bonus=0;FriendshipLevelMilestoneSettings.prototype.unlocked_trading=$util.emptyArray;FriendshipLevelMilestoneSettings.prototype.trading_discount=0;FriendshipLevelMilestoneSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.min_points_to_reach!=null&&m.hasOwnProperty("min_points_to_reach"))w.uint32(8).int32(m.min_points_to_reach);if(m.milestone_xp_reward!=null&&m.hasOwnProperty("milestone_xp_reward"))w.uint32(16).int32(m.milestone_xp_reward);if(m.attack_bonus_percentage!=null&&m.hasOwnProperty("attack_bonus_percentage"))w.uint32(29).float(m.attack_bonus_percentage);if(m.raid_ball_bonus!=null&&m.hasOwnProperty("raid_ball_bonus"))w.uint32(32).int32(m.raid_ball_bonus);if(m.unlocked_trading!=null&&m.unlocked_trading.length){w.uint32(42).fork();for(var i=0;i<m.unlocked_trading.length;++i)w.int32(m.unlocked_trading[i]);w.ldelim()}if(m.trading_discount!=null&&m.hasOwnProperty("trading_discount"))w.uint32(53).float(m.trading_discount);return w};FriendshipLevelMilestoneSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.FriendshipLevelMilestoneSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.min_points_to_reach=r.int32();break;case 2:m.milestone_xp_reward=r.int32();break;case 3:m.attack_bonus_percentage=r.float();break;case 4:m.raid_ball_bonus=r.int32();break;case 5:if(!(m.unlocked_trading&&m.unlocked_trading.length))m.unlocked_trading=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.unlocked_trading.push(r.int32())}else m.unlocked_trading.push(r.int32());break;case 6:m.trading_discount=r.float();break;default:r.skipType(t&7);break}}return m};FriendshipLevelMilestoneSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.FriendshipLevelMilestoneSettings)return d;var m=new $root.POGOProtos.Settings.Master.FriendshipLevelMilestoneSettings;if(d.min_points_to_reach!=null){m.min_points_to_reach=d.min_points_to_reach|0}if(d.milestone_xp_reward!=null){m.milestone_xp_reward=d.milestone_xp_reward|0}if(d.attack_bonus_percentage!=null){m.attack_bonus_percentage=Number(d.attack_bonus_percentage)}if(d.raid_ball_bonus!=null){m.raid_ball_bonus=d.raid_ball_bonus|0}if(d.unlocked_trading){if(!Array.isArray(d.unlocked_trading))throw TypeError(".POGOProtos.Settings.Master.FriendshipLevelMilestoneSettings.unlocked_trading: array expected");m.unlocked_trading=[];for(var i=0;i<d.unlocked_trading.length;++i){switch(d.unlocked_trading[i]){default:case"UNSET_POKEMON_TRADING":case 0:m.unlocked_trading[i]=0;break;case"REGULAR_IN_POKEDEX":case 1:m.unlocked_trading[i]=1;break;case"SPECIAL_IN_POKEDEX":case 2:m.unlocked_trading[i]=2;break;case"REGULAR_NON_POKEDEX":case 3:m.unlocked_trading[i]=3;break;case"REGIONAL_NON_POKEDEX":case 4:m.unlocked_trading[i]=4;break;case"FORM_NON_POKEDEX":case 5:m.unlocked_trading[i]=5;break;case"LEGENDARY_NON_POKEDEX":case 6:m.unlocked_trading[i]=6;break;case"SHINY_NON_POKEDEX":case 7:m.unlocked_trading[i]=7;break}}}if(d.trading_discount!=null){m.trading_discount=Number(d.trading_discount)}return m};FriendshipLevelMilestoneSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.unlocked_trading=[]}if(o.defaults){d.min_points_to_reach=0;d.milestone_xp_reward=0;d.attack_bonus_percentage=0;d.raid_ball_bonus=0;d.trading_discount=0}if(m.min_points_to_reach!=null&&m.hasOwnProperty("min_points_to_reach")){d.min_points_to_reach=m.min_points_to_reach}if(m.milestone_xp_reward!=null&&m.hasOwnProperty("milestone_xp_reward")){d.milestone_xp_reward=m.milestone_xp_reward}if(m.attack_bonus_percentage!=null&&m.hasOwnProperty("attack_bonus_percentage")){d.attack_bonus_percentage=o.json&&!isFinite(m.attack_bonus_percentage)?String(m.attack_bonus_percentage):m.attack_bonus_percentage}if(m.raid_ball_bonus!=null&&m.hasOwnProperty("raid_ball_bonus")){d.raid_ball_bonus=m.raid_ball_bonus}if(m.unlocked_trading&&m.unlocked_trading.length){d.unlocked_trading=[];for(var j=0;j<m.unlocked_trading.length;++j){d.unlocked_trading[j]=o.enums===String?$root.POGOProtos.Enums.PokemonTradingType[m.unlocked_trading[j]]:m.unlocked_trading[j]}}if(m.trading_discount!=null&&m.hasOwnProperty("trading_discount")){d.trading_discount=o.json&&!isFinite(m.trading_discount)?String(m.trading_discount):m.trading_discount}return d};FriendshipLevelMilestoneSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FriendshipLevelMilestoneSettings}();Master.GenderSettings=function(){function GenderSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GenderSettings.prototype.pokemon=0;GenderSettings.prototype.gender=null;GenderSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon!=null&&m.hasOwnProperty("pokemon"))w.uint32(8).int32(m.pokemon);if(m.gender!=null&&m.hasOwnProperty("gender"))$root.POGOProtos.Settings.Master.Pokemon.PokemonGenderSettings.encode(m.gender,w.uint32(18).fork()).ldelim();return w};GenderSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.GenderSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon=r.int32();break;case 2:m.gender=$root.POGOProtos.Settings.Master.Pokemon.PokemonGenderSettings.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};GenderSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.GenderSettings)return d;var m=new $root.POGOProtos.Settings.Master.GenderSettings;switch(d.pokemon){case"MISSINGNO":case 0:m.pokemon=0;break;case"BULBASAUR":case 1:m.pokemon=1;break;case"IVYSAUR":case 2:m.pokemon=2;break;case"VENUSAUR":case 3:m.pokemon=3;break;case"CHARMANDER":case 4:m.pokemon=4;break;case"CHARMELEON":case 5:m.pokemon=5;break;case"CHARIZARD":case 6:m.pokemon=6;break;case"SQUIRTLE":case 7:m.pokemon=7;break;case"WARTORTLE":case 8:m.pokemon=8;break;case"BLASTOISE":case 9:m.pokemon=9;break;case"CATERPIE":case 10:m.pokemon=10;break;case"METAPOD":case 11:m.pokemon=11;break;case"BUTTERFREE":case 12:m.pokemon=12;break;case"WEEDLE":case 13:m.pokemon=13;break;case"KAKUNA":case 14:m.pokemon=14;break;case"BEEDRILL":case 15:m.pokemon=15;break;case"PIDGEY":case 16:m.pokemon=16;break;case"PIDGEOTTO":case 17:m.pokemon=17;break;case"PIDGEOT":case 18:m.pokemon=18;break;case"RATTATA":case 19:m.pokemon=19;break;case"RATICATE":case 20:m.pokemon=20;break;case"SPEAROW":case 21:m.pokemon=21;break;case"FEAROW":case 22:m.pokemon=22;break;case"EKANS":case 23:m.pokemon=23;break;case"ARBOK":case 24:m.pokemon=24;break;case"PIKACHU":case 25:m.pokemon=25;break;case"RAICHU":case 26:m.pokemon=26;break;case"SANDSHREW":case 27:m.pokemon=27;break;case"SANDSLASH":case 28:m.pokemon=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon=29;break;case"NIDORINA":case 30:m.pokemon=30;break;case"NIDOQUEEN":case 31:m.pokemon=31;break;case"NIDORAN_MALE":case 32:m.pokemon=32;break;case"NIDORINO":case 33:m.pokemon=33;break;case"NIDOKING":case 34:m.pokemon=34;break;case"CLEFAIRY":case 35:m.pokemon=35;break;case"CLEFABLE":case 36:m.pokemon=36;break;case"VULPIX":case 37:m.pokemon=37;break;case"NINETALES":case 38:m.pokemon=38;break;case"JIGGLYPUFF":case 39:m.pokemon=39;break;case"WIGGLYTUFF":case 40:m.pokemon=40;break;case"ZUBAT":case 41:m.pokemon=41;break;case"GOLBAT":case 42:m.pokemon=42;break;case"ODDISH":case 43:m.pokemon=43;break;case"GLOOM":case 44:m.pokemon=44;break;case"VILEPLUME":case 45:m.pokemon=45;break;case"PARAS":case 46:m.pokemon=46;break;case"PARASECT":case 47:m.pokemon=47;break;case"VENONAT":case 48:m.pokemon=48;break;case"VENOMOTH":case 49:m.pokemon=49;break;case"DIGLETT":case 50:m.pokemon=50;break;case"DUGTRIO":case 51:m.pokemon=51;break;case"MEOWTH":case 52:m.pokemon=52;break;case"PERSIAN":case 53:m.pokemon=53;break;case"PSYDUCK":case 54:m.pokemon=54;break;case"GOLDUCK":case 55:m.pokemon=55;break;case"MANKEY":case 56:m.pokemon=56;break;case"PRIMEAPE":case 57:m.pokemon=57;break;case"GROWLITHE":case 58:m.pokemon=58;break;case"ARCANINE":case 59:m.pokemon=59;break;case"POLIWAG":case 60:m.pokemon=60;break;case"POLIWHIRL":case 61:m.pokemon=61;break;case"POLIWRATH":case 62:m.pokemon=62;break;case"ABRA":case 63:m.pokemon=63;break;case"KADABRA":case 64:m.pokemon=64;break;case"ALAKAZAM":case 65:m.pokemon=65;break;case"MACHOP":case 66:m.pokemon=66;break;case"MACHOKE":case 67:m.pokemon=67;break;case"MACHAMP":case 68:m.pokemon=68;break;case"BELLSPROUT":case 69:m.pokemon=69;break;case"WEEPINBELL":case 70:m.pokemon=70;break;case"VICTREEBEL":case 71:m.pokemon=71;break;case"TENTACOOL":case 72:m.pokemon=72;break;case"TENTACRUEL":case 73:m.pokemon=73;break;case"GEODUDE":case 74:m.pokemon=74;break;case"GRAVELER":case 75:m.pokemon=75;break;case"GOLEM":case 76:m.pokemon=76;break;case"PONYTA":case 77:m.pokemon=77;break;case"RAPIDASH":case 78:m.pokemon=78;break;case"SLOWPOKE":case 79:m.pokemon=79;break;case"SLOWBRO":case 80:m.pokemon=80;break;case"MAGNEMITE":case 81:m.pokemon=81;break;case"MAGNETON":case 82:m.pokemon=82;break;case"FARFETCHD":case 83:m.pokemon=83;break;case"DODUO":case 84:m.pokemon=84;break;case"DODRIO":case 85:m.pokemon=85;break;case"SEEL":case 86:m.pokemon=86;break;case"DEWGONG":case 87:m.pokemon=87;break;case"GRIMER":case 88:m.pokemon=88;break;case"MUK":case 89:m.pokemon=89;break;case"SHELLDER":case 90:m.pokemon=90;break;case"CLOYSTER":case 91:m.pokemon=91;break;case"GASTLY":case 92:m.pokemon=92;break;case"HAUNTER":case 93:m.pokemon=93;break;case"GENGAR":case 94:m.pokemon=94;break;case"ONIX":case 95:m.pokemon=95;break;case"DROWZEE":case 96:m.pokemon=96;break;case"HYPNO":case 97:m.pokemon=97;break;case"KRABBY":case 98:m.pokemon=98;break;case"KINGLER":case 99:m.pokemon=99;break;case"VOLTORB":case 100:m.pokemon=100;break;case"ELECTRODE":case 101:m.pokemon=101;break;case"EXEGGCUTE":case 102:m.pokemon=102;break;case"EXEGGUTOR":case 103:m.pokemon=103;break;case"CUBONE":case 104:m.pokemon=104;break;case"MAROWAK":case 105:m.pokemon=105;break;case"HITMONLEE":case 106:m.pokemon=106;break;case"HITMONCHAN":case 107:m.pokemon=107;break;case"LICKITUNG":case 108:m.pokemon=108;break;case"KOFFING":case 109:m.pokemon=109;break;case"WEEZING":case 110:m.pokemon=110;break;case"RHYHORN":case 111:m.pokemon=111;break;case"RHYDON":case 112:m.pokemon=112;break;case"CHANSEY":case 113:m.pokemon=113;break;case"TANGELA":case 114:m.pokemon=114;break;case"KANGASKHAN":case 115:m.pokemon=115;break;case"HORSEA":case 116:m.pokemon=116;break;case"SEADRA":case 117:m.pokemon=117;break;case"GOLDEEN":case 118:m.pokemon=118;break;case"SEAKING":case 119:m.pokemon=119;break;case"STARYU":case 120:m.pokemon=120;break;case"STARMIE":case 121:m.pokemon=121;break;case"MR_MIME":case 122:m.pokemon=122;break;case"SCYTHER":case 123:m.pokemon=123;break;case"JYNX":case 124:m.pokemon=124;break;case"ELECTABUZZ":case 125:m.pokemon=125;break;case"MAGMAR":case 126:m.pokemon=126;break;case"PINSIR":case 127:m.pokemon=127;break;case"TAUROS":case 128:m.pokemon=128;break;case"MAGIKARP":case 129:m.pokemon=129;break;case"GYARADOS":case 130:m.pokemon=130;break;case"LAPRAS":case 131:m.pokemon=131;break;case"DITTO":case 132:m.pokemon=132;break;case"EEVEE":case 133:m.pokemon=133;break;case"VAPOREON":case 134:m.pokemon=134;break;case"JOLTEON":case 135:m.pokemon=135;break;case"FLAREON":case 136:m.pokemon=136;break;case"PORYGON":case 137:m.pokemon=137;break;case"OMANYTE":case 138:m.pokemon=138;break;case"OMASTAR":case 139:m.pokemon=139;break;case"KABUTO":case 140:m.pokemon=140;break;case"KABUTOPS":case 141:m.pokemon=141;break;case"AERODACTYL":case 142:m.pokemon=142;break;case"SNORLAX":case 143:m.pokemon=143;break;case"ARTICUNO":case 144:m.pokemon=144;break;case"ZAPDOS":case 145:m.pokemon=145;break;case"MOLTRES":case 146:m.pokemon=146;break;case"DRATINI":case 147:m.pokemon=147;break;case"DRAGONAIR":case 148:m.pokemon=148;break;case"DRAGONITE":case 149:m.pokemon=149;break;case"MEWTWO":case 150:m.pokemon=150;break;case"MEW":case 151:m.pokemon=151;break;case"CHIKORITA":case 152:m.pokemon=152;break;case"BAYLEEF":case 153:m.pokemon=153;break;case"MEGANIUM":case 154:m.pokemon=154;break;case"CYNDAQUIL":case 155:m.pokemon=155;break;case"QUILAVA":case 156:m.pokemon=156;break;case"TYPHLOSION":case 157:m.pokemon=157;break;case"TOTODILE":case 158:m.pokemon=158;break;case"CROCONAW":case 159:m.pokemon=159;break;case"FERALIGATR":case 160:m.pokemon=160;break;case"SENTRET":case 161:m.pokemon=161;break;case"FURRET":case 162:m.pokemon=162;break;case"HOOTHOOT":case 163:m.pokemon=163;break;case"NOCTOWL":case 164:m.pokemon=164;break;case"LEDYBA":case 165:m.pokemon=165;break;case"LEDIAN":case 166:m.pokemon=166;break;case"SPINARAK":case 167:m.pokemon=167;break;case"ARIADOS":case 168:m.pokemon=168;break;case"CROBAT":case 169:m.pokemon=169;break;case"CHINCHOU":case 170:m.pokemon=170;break;case"LANTURN":case 171:m.pokemon=171;break;case"PICHU":case 172:m.pokemon=172;break;case"CLEFFA":case 173:m.pokemon=173;break;case"IGGLYBUFF":case 174:m.pokemon=174;break;case"TOGEPI":case 175:m.pokemon=175;break;case"TOGETIC":case 176:m.pokemon=176;break;case"NATU":case 177:m.pokemon=177;break;case"XATU":case 178:m.pokemon=178;break;case"MAREEP":case 179:m.pokemon=179;break;case"FLAAFFY":case 180:m.pokemon=180;break;case"AMPHAROS":case 181:m.pokemon=181;break;case"BELLOSSOM":case 182:m.pokemon=182;break;case"MARILL":case 183:m.pokemon=183;break;case"AZUMARILL":case 184:m.pokemon=184;break;case"SUDOWOODO":case 185:m.pokemon=185;break;case"POLITOED":case 186:m.pokemon=186;break;case"HOPPIP":case 187:m.pokemon=187;break;case"SKIPLOOM":case 188:m.pokemon=188;break;case"JUMPLUFF":case 189:m.pokemon=189;break;case"AIPOM":case 190:m.pokemon=190;break;case"SUNKERN":case 191:m.pokemon=191;break;case"SUNFLORA":case 192:m.pokemon=192;break;case"YANMA":case 193:m.pokemon=193;break;case"WOOPER":case 194:m.pokemon=194;break;case"QUAGSIRE":case 195:m.pokemon=195;break;case"ESPEON":case 196:m.pokemon=196;break;case"UMBREON":case 197:m.pokemon=197;break;case"MURKROW":case 198:m.pokemon=198;break;case"SLOWKING":case 199:m.pokemon=199;break;case"MISDREAVUS":case 200:m.pokemon=200;break;case"UNOWN":case 201:m.pokemon=201;break;case"WOBBUFFET":case 202:m.pokemon=202;break;case"GIRAFARIG":case 203:m.pokemon=203;break;case"PINECO":case 204:m.pokemon=204;break;case"FORRETRESS":case 205:m.pokemon=205;break;case"DUNSPARCE":case 206:m.pokemon=206;break;case"GLIGAR":case 207:m.pokemon=207;break;case"STEELIX":case 208:m.pokemon=208;break;case"SNUBBULL":case 209:m.pokemon=209;break;case"GRANBULL":case 210:m.pokemon=210;break;case"QWILFISH":case 211:m.pokemon=211;break;case"SCIZOR":case 212:m.pokemon=212;break;case"SHUCKLE":case 213:m.pokemon=213;break;case"HERACROSS":case 214:m.pokemon=214;break;case"SNEASEL":case 215:m.pokemon=215;break;case"TEDDIURSA":case 216:m.pokemon=216;break;case"URSARING":case 217:m.pokemon=217;break;case"SLUGMA":case 218:m.pokemon=218;break;case"MAGCARGO":case 219:m.pokemon=219;break;case"SWINUB":case 220:m.pokemon=220;break;case"PILOSWINE":case 221:m.pokemon=221;break;case"CORSOLA":case 222:m.pokemon=222;break;case"REMORAID":case 223:m.pokemon=223;break;case"OCTILLERY":case 224:m.pokemon=224;break;case"DELIBIRD":case 225:m.pokemon=225;break;case"MANTINE":case 226:m.pokemon=226;break;case"SKARMORY":case 227:m.pokemon=227;break;case"HOUNDOUR":case 228:m.pokemon=228;break;case"HOUNDOOM":case 229:m.pokemon=229;break;case"KINGDRA":case 230:m.pokemon=230;break;case"PHANPY":case 231:m.pokemon=231;break;case"DONPHAN":case 232:m.pokemon=232;break;case"PORYGON2":case 233:m.pokemon=233;break;case"STANTLER":case 234:m.pokemon=234;break;case"SMEARGLE":case 235:m.pokemon=235;break;case"TYROGUE":case 236:m.pokemon=236;break;case"HITMONTOP":case 237:m.pokemon=237;break;case"SMOOCHUM":case 238:m.pokemon=238;break;case"ELEKID":case 239:m.pokemon=239;break;case"MAGBY":case 240:m.pokemon=240;break;case"MILTANK":case 241:m.pokemon=241;break;case"BLISSEY":case 242:m.pokemon=242;break;case"RAIKOU":case 243:m.pokemon=243;break;case"ENTEI":case 244:m.pokemon=244;break;case"SUICUNE":case 245:m.pokemon=245;break;case"LARVITAR":case 246:m.pokemon=246;break;case"PUPITAR":case 247:m.pokemon=247;break;case"TYRANITAR":case 248:m.pokemon=248;break;case"LUGIA":case 249:m.pokemon=249;break;case"HO_OH":case 250:m.pokemon=250;break;case"CELEBI":case 251:m.pokemon=251;break;case"TREECKO":case 252:m.pokemon=252;break;case"GROVYLE":case 253:m.pokemon=253;break;case"SCEPTILE":case 254:m.pokemon=254;break;case"TORCHIC":case 255:m.pokemon=255;break;case"COMBUSKEN":case 256:m.pokemon=256;break;case"BLAZIKEN":case 257:m.pokemon=257;break;case"MUDKIP":case 258:m.pokemon=258;break;case"MARSHTOMP":case 259:m.pokemon=259;break;case"SWAMPERT":case 260:m.pokemon=260;break;case"POOCHYENA":case 261:m.pokemon=261;break;case"MIGHTYENA":case 262:m.pokemon=262;break;case"ZIGZAGOON":case 263:m.pokemon=263;break;case"LINOONE":case 264:m.pokemon=264;break;case"WURMPLE":case 265:m.pokemon=265;break;case"SILCOON":case 266:m.pokemon=266;break;case"BEAUTIFLY":case 267:m.pokemon=267;break;case"CASCOON":case 268:m.pokemon=268;break;case"DUSTOX":case 269:m.pokemon=269;break;case"LOTAD":case 270:m.pokemon=270;break;case"LOMBRE":case 271:m.pokemon=271;break;case"LUDICOLO":case 272:m.pokemon=272;break;case"SEEDOT":case 273:m.pokemon=273;break;case"NUZLEAF":case 274:m.pokemon=274;break;case"SHIFTRY":case 275:m.pokemon=275;break;case"TAILLOW":case 276:m.pokemon=276;break;case"SWELLOW":case 277:m.pokemon=277;break;case"WINGULL":case 278:m.pokemon=278;break;case"PELIPPER":case 279:m.pokemon=279;break;case"RALTS":case 280:m.pokemon=280;break;case"KIRLIA":case 281:m.pokemon=281;break;case"GARDEVOIR":case 282:m.pokemon=282;break;case"SURSKIT":case 283:m.pokemon=283;break;case"MASQUERAIN":case 284:m.pokemon=284;break;case"SHROOMISH":case 285:m.pokemon=285;break;case"BRELOOM":case 286:m.pokemon=286;break;case"SLAKOTH":case 287:m.pokemon=287;break;case"VIGOROTH":case 288:m.pokemon=288;break;case"SLAKING":case 289:m.pokemon=289;break;case"NINCADA":case 290:m.pokemon=290;break;case"NINJASK":case 291:m.pokemon=291;break;case"SHEDINJA":case 292:m.pokemon=292;break;case"WHISMUR":case 293:m.pokemon=293;break;case"LOUDRED":case 294:m.pokemon=294;break;case"EXPLOUD":case 295:m.pokemon=295;break;case"MAKUHITA":case 296:m.pokemon=296;break;case"HARIYAMA":case 297:m.pokemon=297;break;case"AZURILL":case 298:m.pokemon=298;break;case"NOSEPASS":case 299:m.pokemon=299;break;case"SKITTY":case 300:m.pokemon=300;break;case"DELCATTY":case 301:m.pokemon=301;break;case"SABLEYE":case 302:m.pokemon=302;break;case"MAWILE":case 303:m.pokemon=303;break;case"ARON":case 304:m.pokemon=304;break;case"LAIRON":case 305:m.pokemon=305;break;case"AGGRON":case 306:m.pokemon=306;break;case"MEDITITE":case 307:m.pokemon=307;break;case"MEDICHAM":case 308:m.pokemon=308;break;case"ELECTRIKE":case 309:m.pokemon=309;break;case"MANECTRIC":case 310:m.pokemon=310;break;case"PLUSLE":case 311:m.pokemon=311;break;case"MINUN":case 312:m.pokemon=312;break;case"VOLBEAT":case 313:m.pokemon=313;break;case"ILLUMISE":case 314:m.pokemon=314;break;case"ROSELIA":case 315:m.pokemon=315;break;case"GULPIN":case 316:m.pokemon=316;break;case"SWALOT":case 317:m.pokemon=317;break;case"CARVANHA":case 318:m.pokemon=318;break;case"SHARPEDO":case 319:m.pokemon=319;break;case"WAILMER":case 320:m.pokemon=320;break;case"WAILORD":case 321:m.pokemon=321;break;case"NUMEL":case 322:m.pokemon=322;break;case"CAMERUPT":case 323:m.pokemon=323;break;case"TORKOAL":case 324:m.pokemon=324;break;case"SPOINK":case 325:m.pokemon=325;break;case"GRUMPIG":case 326:m.pokemon=326;break;case"SPINDA":case 327:m.pokemon=327;break;case"TRAPINCH":case 328:m.pokemon=328;break;case"VIBRAVA":case 329:m.pokemon=329;break;case"FLYGON":case 330:m.pokemon=330;break;case"CACNEA":case 331:m.pokemon=331;break;case"CACTURNE":case 332:m.pokemon=332;break;case"SWABLU":case 333:m.pokemon=333;break;case"ALTARIA":case 334:m.pokemon=334;break;case"ZANGOOSE":case 335:m.pokemon=335;break;case"SEVIPER":case 336:m.pokemon=336;break;case"LUNATONE":case 337:m.pokemon=337;break;case"SOLROCK":case 338:m.pokemon=338;break;case"BARBOACH":case 339:m.pokemon=339;break;case"WHISCASH":case 340:m.pokemon=340;break;case"CORPHISH":case 341:m.pokemon=341;break;case"CRAWDAUNT":case 342:m.pokemon=342;break;case"BALTOY":case 343:m.pokemon=343;break;case"CLAYDOL":case 344:m.pokemon=344;break;case"LILEEP":case 345:m.pokemon=345;break;case"CRADILY":case 346:m.pokemon=346;break;case"ANORITH":case 347:m.pokemon=347;break;case"ARMALDO":case 348:m.pokemon=348;break;case"FEEBAS":case 349:m.pokemon=349;break;case"MILOTIC":case 350:m.pokemon=350;break;case"CASTFORM":case 351:m.pokemon=351;break;case"KECLEON":case 352:m.pokemon=352;break;case"SHUPPET":case 353:m.pokemon=353;break;case"BANETTE":case 354:m.pokemon=354;break;case"DUSKULL":case 355:m.pokemon=355;break;case"DUSCLOPS":case 356:m.pokemon=356;break;case"TROPIUS":case 357:m.pokemon=357;break;case"CHIMECHO":case 358:m.pokemon=358;break;case"ABSOL":case 359:m.pokemon=359;break;case"WYNAUT":case 360:m.pokemon=360;break;case"SNORUNT":case 361:m.pokemon=361;break;case"GLALIE":case 362:m.pokemon=362;break;case"SPHEAL":case 363:m.pokemon=363;break;case"SEALEO":case 364:m.pokemon=364;break;case"WALREIN":case 365:m.pokemon=365;break;case"CLAMPERL":case 366:m.pokemon=366;break;case"HUNTAIL":case 367:m.pokemon=367;break;case"GOREBYSS":case 368:m.pokemon=368;break;case"RELICANTH":case 369:m.pokemon=369;break;case"LUVDISC":case 370:m.pokemon=370;break;case"BAGON":case 371:m.pokemon=371;break;case"SHELGON":case 372:m.pokemon=372;break;case"SALAMENCE":case 373:m.pokemon=373;break;case"BELDUM":case 374:m.pokemon=374;break;case"METANG":case 375:m.pokemon=375;break;case"METAGROSS":case 376:m.pokemon=376;break;case"REGIROCK":case 377:m.pokemon=377;break;case"REGICE":case 378:m.pokemon=378;break;case"REGISTEEL":case 379:m.pokemon=379;break;case"LATIAS":case 380:m.pokemon=380;break;case"LATIOS":case 381:m.pokemon=381;break;case"KYOGRE":case 382:m.pokemon=382;break;case"GROUDON":case 383:m.pokemon=383;break;case"RAYQUAZA":case 384:m.pokemon=384;break;case"JIRACHI":case 385:m.pokemon=385;break;case"DEOXYS":case 386:m.pokemon=386;break;case"TURTWIG":case 387:m.pokemon=387;break;case"GROTLE":case 388:m.pokemon=388;break;case"TORTERRA":case 389:m.pokemon=389;break;case"CHIMCHAR":case 390:m.pokemon=390;break;case"MONFERNO":case 391:m.pokemon=391;break;case"INFERNAPE":case 392:m.pokemon=392;break;case"PIPLUP":case 393:m.pokemon=393;break;case"PRINPLUP":case 394:m.pokemon=394;break;case"EMPOLEON":case 395:m.pokemon=395;break;case"STARLY":case 396:m.pokemon=396;break;case"STARAVIA":case 397:m.pokemon=397;break;case"STARAPTOR":case 398:m.pokemon=398;break;case"BIDOOF":case 399:m.pokemon=399;break;case"BIBAREL":case 400:m.pokemon=400;break;case"KRICKETOT":case 401:m.pokemon=401;break;case"KRICKETUNE":case 402:m.pokemon=402;break;case"SHINX":case 403:m.pokemon=403;break;case"LUXIO":case 404:m.pokemon=404;break;case"LUXRAY":case 405:m.pokemon=405;break;case"BUDEW":case 406:m.pokemon=406;break;case"ROSERADE":case 407:m.pokemon=407;break;case"CRANIDOS":case 408:m.pokemon=408;break;case"RAMPARDOS":case 409:m.pokemon=409;break;case"SHIELDON":case 410:m.pokemon=410;break;case"BASTIODON":case 411:m.pokemon=411;break;case"BURMY":case 412:m.pokemon=412;break;case"WORMADAM":case 413:m.pokemon=413;break;case"MOTHIM":case 414:m.pokemon=414;break;case"COMBEE":case 415:m.pokemon=415;break;case"VESPIQUEN":case 416:m.pokemon=416;break;case"PACHIRISU":case 417:m.pokemon=417;break;case"BUIZEL":case 418:m.pokemon=418;break;case"FLOATZEL":case 419:m.pokemon=419;break;case"CHERUBI":case 420:m.pokemon=420;break;case"CHERRIM":case 421:m.pokemon=421;break;case"SHELLOS":case 422:m.pokemon=422;break;case"GASTRODON":case 423:m.pokemon=423;break;case"AMBIPOM":case 424:m.pokemon=424;break;case"DRIFLOON":case 425:m.pokemon=425;break;case"DRIFBLIM":case 426:m.pokemon=426;break;case"BUNEARY":case 427:m.pokemon=427;break;case"LOPUNNY":case 428:m.pokemon=428;break;case"MISMAGIUS":case 429:m.pokemon=429;break;case"HONCHKROW":case 430:m.pokemon=430;break;case"GLAMEOW":case 431:m.pokemon=431;break;case"PURUGLY":case 432:m.pokemon=432;break;case"CHINGLING":case 433:m.pokemon=433;break;case"STUNKY":case 434:m.pokemon=434;break;case"SKUNTANK":case 435:m.pokemon=435;break;case"BRONZOR":case 436:m.pokemon=436;break;case"BRONZONG":case 437:m.pokemon=437;break;case"BONSLY":case 438:m.pokemon=438;break;case"MIME_JR":case 439:m.pokemon=439;break;case"HAPPINY":case 440:m.pokemon=440;break;case"CHATOT":case 441:m.pokemon=441;break;case"SPIRITOMB":case 442:m.pokemon=442;break;case"GIBLE":case 443:m.pokemon=443;break;case"GABITE":case 444:m.pokemon=444;break;case"GARCHOMP":case 445:m.pokemon=445;break;case"MUNCHLAX":case 446:m.pokemon=446;break;case"RIOLU":case 447:m.pokemon=447;break;case"LUCARIO":case 448:m.pokemon=448;break;case"HIPPOPOTAS":case 449:m.pokemon=449;break;case"HIPPOWDON":case 450:m.pokemon=450;break;case"SKORUPI":case 451:m.pokemon=451;break;case"DRAPION":case 452:m.pokemon=452;break;case"CROAGUNK":case 453:m.pokemon=453;break;case"TOXICROAK":case 454:m.pokemon=454;break;case"CARNIVINE":case 455:m.pokemon=455;break;case"FINNEON":case 456:m.pokemon=456;break;case"LUMINEON":case 457:m.pokemon=457;break;case"MANTYKE":case 458:m.pokemon=458;break;case"SNOVER":case 459:m.pokemon=459;break;case"ABOMASNOW":case 460:m.pokemon=460;break;case"WEAVILE":case 461:m.pokemon=461;break;case"MAGNEZONE":case 462:m.pokemon=462;break;case"LICKILICKY":case 463:m.pokemon=463;break;case"RHYPERIOR":case 464:m.pokemon=464;break;case"TANGROWTH":case 465:m.pokemon=465;break;case"ELECTIVIRE":case 466:m.pokemon=466;break;case"MAGMORTAR":case 467:m.pokemon=467;break;case"TOGEKISS":case 468:m.pokemon=468;break;case"YANMEGA":case 469:m.pokemon=469;break;case"LEAFEON":case 470:m.pokemon=470;break;case"GLACEON":case 471:m.pokemon=471;break;case"GLISCOR":case 472:m.pokemon=472;break;case"MAMOSWINE":case 473:m.pokemon=473;break;case"PORYGON_Z":case 474:m.pokemon=474;break;case"GALLADE":case 475:m.pokemon=475;break;case"PROBOPASS":case 476:m.pokemon=476;break;case"DUSKNOIR":case 477:m.pokemon=477;break;case"FROSLASS":case 478:m.pokemon=478;break;case"ROTOM":case 479:m.pokemon=479;break;case"UXIE":case 480:m.pokemon=480;break;case"MESPRIT":case 481:m.pokemon=481;break;case"AZELF":case 482:m.pokemon=482;break;case"DIALGA":case 483:m.pokemon=483;break;case"PALKIA":case 484:m.pokemon=484;break;case"HEATRAN":case 485:m.pokemon=485;break;case"REGIGIGAS":case 486:m.pokemon=486;break;case"GIRATINA":case 487:m.pokemon=487;break;case"CRESSELIA":case 488:m.pokemon=488;break;case"PHIONE":case 489:m.pokemon=489;break;case"MANAPHY":case 490:m.pokemon=490;break;case"DARKRAI":case 491:m.pokemon=491;break;case"SHAYMIN":case 492:m.pokemon=492;break;case"ARCEUS":case 493:m.pokemon=493;break;case"MELTAN":case 808:m.pokemon=808;break;case"MELMETAL":case 809:m.pokemon=809;break}if(d.gender!=null){if(typeof d.gender!=="object")throw TypeError(".POGOProtos.Settings.Master.GenderSettings.gender: object expected");m.gender=$root.POGOProtos.Settings.Master.Pokemon.PokemonGenderSettings.fromObject(d.gender)}return m};GenderSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon=o.enums===String?"MISSINGNO":0;d.gender=null}if(m.pokemon!=null&&m.hasOwnProperty("pokemon")){d.pokemon=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon]:m.pokemon}if(m.gender!=null&&m.hasOwnProperty("gender")){d.gender=$root.POGOProtos.Settings.Master.Pokemon.PokemonGenderSettings.toObject(m.gender,o)}return d};GenderSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GenderSettings}();Master.GymBadgeGmtSettings=function(){function GymBadgeGmtSettings(p){this.target=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymBadgeGmtSettings.prototype.target=$util.emptyArray;GymBadgeGmtSettings.prototype.battle_winning_score_per_defender_cp=0;GymBadgeGmtSettings.prototype.gym_defending_score_per_minute=0;GymBadgeGmtSettings.prototype.berry_feeding_score=0;GymBadgeGmtSettings.prototype.pokemon_deploy_score=0;GymBadgeGmtSettings.prototype.raid_battle_winning_score=0;GymBadgeGmtSettings.prototype.lose_all_battles_score=0;GymBadgeGmtSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.target!=null&&m.target.length){w.uint32(10).fork();for(var i=0;i<m.target.length;++i)w.int32(m.target[i]);w.ldelim()}if(m.battle_winning_score_per_defender_cp!=null&&m.hasOwnProperty("battle_winning_score_per_defender_cp"))w.uint32(21).float(m.battle_winning_score_per_defender_cp);if(m.gym_defending_score_per_minute!=null&&m.hasOwnProperty("gym_defending_score_per_minute"))w.uint32(29).float(m.gym_defending_score_per_minute);if(m.berry_feeding_score!=null&&m.hasOwnProperty("berry_feeding_score"))w.uint32(32).int32(m.berry_feeding_score);if(m.pokemon_deploy_score!=null&&m.hasOwnProperty("pokemon_deploy_score"))w.uint32(40).int32(m.pokemon_deploy_score);if(m.raid_battle_winning_score!=null&&m.hasOwnProperty("raid_battle_winning_score"))w.uint32(48).int32(m.raid_battle_winning_score);if(m.lose_all_battles_score!=null&&m.hasOwnProperty("lose_all_battles_score"))w.uint32(56).int32(m.lose_all_battles_score);return w};GymBadgeGmtSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.GymBadgeGmtSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.target&&m.target.length))m.target=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.target.push(r.int32())}else m.target.push(r.int32());break;case 2:m.battle_winning_score_per_defender_cp=r.float();break;case 3:m.gym_defending_score_per_minute=r.float();break;case 4:m.berry_feeding_score=r.int32();break;case 5:m.pokemon_deploy_score=r.int32();break;case 6:m.raid_battle_winning_score=r.int32();break;case 7:m.lose_all_battles_score=r.int32();break;default:r.skipType(t&7);break}}return m};GymBadgeGmtSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.GymBadgeGmtSettings)return d;var m=new $root.POGOProtos.Settings.Master.GymBadgeGmtSettings;if(d.target){if(!Array.isArray(d.target))throw TypeError(".POGOProtos.Settings.Master.GymBadgeGmtSettings.target: array expected");m.target=[];for(var i=0;i<d.target.length;++i){m.target[i]=d.target[i]|0}}if(d.battle_winning_score_per_defender_cp!=null){m.battle_winning_score_per_defender_cp=Number(d.battle_winning_score_per_defender_cp)}if(d.gym_defending_score_per_minute!=null){m.gym_defending_score_per_minute=Number(d.gym_defending_score_per_minute)}if(d.berry_feeding_score!=null){m.berry_feeding_score=d.berry_feeding_score|0}if(d.pokemon_deploy_score!=null){m.pokemon_deploy_score=d.pokemon_deploy_score|0}if(d.raid_battle_winning_score!=null){m.raid_battle_winning_score=d.raid_battle_winning_score|0}if(d.lose_all_battles_score!=null){m.lose_all_battles_score=d.lose_all_battles_score|0}return m};GymBadgeGmtSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.target=[]}if(o.defaults){d.battle_winning_score_per_defender_cp=0;d.gym_defending_score_per_minute=0;d.berry_feeding_score=0;d.pokemon_deploy_score=0;d.raid_battle_winning_score=0;d.lose_all_battles_score=0}if(m.target&&m.target.length){d.target=[];for(var j=0;j<m.target.length;++j){d.target[j]=m.target[j]}}if(m.battle_winning_score_per_defender_cp!=null&&m.hasOwnProperty("battle_winning_score_per_defender_cp")){d.battle_winning_score_per_defender_cp=o.json&&!isFinite(m.battle_winning_score_per_defender_cp)?String(m.battle_winning_score_per_defender_cp):m.battle_winning_score_per_defender_cp}if(m.gym_defending_score_per_minute!=null&&m.hasOwnProperty("gym_defending_score_per_minute")){d.gym_defending_score_per_minute=o.json&&!isFinite(m.gym_defending_score_per_minute)?String(m.gym_defending_score_per_minute):m.gym_defending_score_per_minute}if(m.berry_feeding_score!=null&&m.hasOwnProperty("berry_feeding_score")){d.berry_feeding_score=m.berry_feeding_score}if(m.pokemon_deploy_score!=null&&m.hasOwnProperty("pokemon_deploy_score")){d.pokemon_deploy_score=m.pokemon_deploy_score}if(m.raid_battle_winning_score!=null&&m.hasOwnProperty("raid_battle_winning_score")){d.raid_battle_winning_score=m.raid_battle_winning_score}if(m.lose_all_battles_score!=null&&m.hasOwnProperty("lose_all_battles_score")){d.lose_all_battles_score=m.lose_all_battles_score}return d};GymBadgeGmtSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GymBadgeGmtSettings}();Master.GymBattleSettings=function(){function GymBattleSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymBattleSettings.prototype.energy_per_sec=0;GymBattleSettings.prototype.dodge_energy_cost=0;GymBattleSettings.prototype.retarget_seconds=0;GymBattleSettings.prototype.enemy_attack_interval=0;GymBattleSettings.prototype.attack_server_interval=0;GymBattleSettings.prototype.round_duration_seconds=0;GymBattleSettings.prototype.bonus_time_per_ally_seconds=0;GymBattleSettings.prototype.maximum_attackers_per_battle=0;GymBattleSettings.prototype.same_type_attack_bonus_multiplier=0;GymBattleSettings.prototype.maximum_energy=0;GymBattleSettings.prototype.energy_delta_per_health_lost=0;GymBattleSettings.prototype.dodge_duration_ms=0;GymBattleSettings.prototype.minimum_player_level=0;GymBattleSettings.prototype.swap_duration_ms=0;GymBattleSettings.prototype.dodge_damage_reduction_percent=0;GymBattleSettings.prototype.minimum_raid_player_level=0;GymBattleSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.energy_per_sec!=null&&m.hasOwnProperty("energy_per_sec"))w.uint32(13).float(m.energy_per_sec);if(m.dodge_energy_cost!=null&&m.hasOwnProperty("dodge_energy_cost"))w.uint32(21).float(m.dodge_energy_cost);if(m.retarget_seconds!=null&&m.hasOwnProperty("retarget_seconds"))w.uint32(29).float(m.retarget_seconds);if(m.enemy_attack_interval!=null&&m.hasOwnProperty("enemy_attack_interval"))w.uint32(37).float(m.enemy_attack_interval);if(m.attack_server_interval!=null&&m.hasOwnProperty("attack_server_interval"))w.uint32(45).float(m.attack_server_interval);if(m.round_duration_seconds!=null&&m.hasOwnProperty("round_duration_seconds"))w.uint32(53).float(m.round_duration_seconds);if(m.bonus_time_per_ally_seconds!=null&&m.hasOwnProperty("bonus_time_per_ally_seconds"))w.uint32(61).float(m.bonus_time_per_ally_seconds);if(m.maximum_attackers_per_battle!=null&&m.hasOwnProperty("maximum_attackers_per_battle"))w.uint32(64).int32(m.maximum_attackers_per_battle);if(m.same_type_attack_bonus_multiplier!=null&&m.hasOwnProperty("same_type_attack_bonus_multiplier"))w.uint32(77).float(m.same_type_attack_bonus_multiplier);if(m.maximum_energy!=null&&m.hasOwnProperty("maximum_energy"))w.uint32(80).int32(m.maximum_energy);if(m.energy_delta_per_health_lost!=null&&m.hasOwnProperty("energy_delta_per_health_lost"))w.uint32(93).float(m.energy_delta_per_health_lost);if(m.dodge_duration_ms!=null&&m.hasOwnProperty("dodge_duration_ms"))w.uint32(96).int32(m.dodge_duration_ms);if(m.minimum_player_level!=null&&m.hasOwnProperty("minimum_player_level"))w.uint32(104).int32(m.minimum_player_level);if(m.swap_duration_ms!=null&&m.hasOwnProperty("swap_duration_ms"))w.uint32(112).int32(m.swap_duration_ms);if(m.dodge_damage_reduction_percent!=null&&m.hasOwnProperty("dodge_damage_reduction_percent"))w.uint32(125).float(m.dodge_damage_reduction_percent);if(m.minimum_raid_player_level!=null&&m.hasOwnProperty("minimum_raid_player_level"))w.uint32(128).int32(m.minimum_raid_player_level);return w};GymBattleSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.GymBattleSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.energy_per_sec=r.float();break;case 2:m.dodge_energy_cost=r.float();break;case 3:m.retarget_seconds=r.float();break;case 4:m.enemy_attack_interval=r.float();break;case 5:m.attack_server_interval=r.float();break;case 6:m.round_duration_seconds=r.float();break;case 7:m.bonus_time_per_ally_seconds=r.float();break;case 8:m.maximum_attackers_per_battle=r.int32();break;case 9:m.same_type_attack_bonus_multiplier=r.float();break;case 10:m.maximum_energy=r.int32();break;case 11:m.energy_delta_per_health_lost=r.float();break;case 12:m.dodge_duration_ms=r.int32();break;case 13:m.minimum_player_level=r.int32();break;case 14:m.swap_duration_ms=r.int32();break;case 15:m.dodge_damage_reduction_percent=r.float();break;case 16:m.minimum_raid_player_level=r.int32();break;default:r.skipType(t&7);break}}return m};GymBattleSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.GymBattleSettings)return d;var m=new $root.POGOProtos.Settings.Master.GymBattleSettings;if(d.energy_per_sec!=null){m.energy_per_sec=Number(d.energy_per_sec)}if(d.dodge_energy_cost!=null){m.dodge_energy_cost=Number(d.dodge_energy_cost)}if(d.retarget_seconds!=null){m.retarget_seconds=Number(d.retarget_seconds)}if(d.enemy_attack_interval!=null){m.enemy_attack_interval=Number(d.enemy_attack_interval)}if(d.attack_server_interval!=null){m.attack_server_interval=Number(d.attack_server_interval)}if(d.round_duration_seconds!=null){m.round_duration_seconds=Number(d.round_duration_seconds)}if(d.bonus_time_per_ally_seconds!=null){m.bonus_time_per_ally_seconds=Number(d.bonus_time_per_ally_seconds)}if(d.maximum_attackers_per_battle!=null){m.maximum_attackers_per_battle=d.maximum_attackers_per_battle|0}if(d.same_type_attack_bonus_multiplier!=null){m.same_type_attack_bonus_multiplier=Number(d.same_type_attack_bonus_multiplier)}if(d.maximum_energy!=null){m.maximum_energy=d.maximum_energy|0}if(d.energy_delta_per_health_lost!=null){m.energy_delta_per_health_lost=Number(d.energy_delta_per_health_lost)}if(d.dodge_duration_ms!=null){m.dodge_duration_ms=d.dodge_duration_ms|0}if(d.minimum_player_level!=null){m.minimum_player_level=d.minimum_player_level|0}if(d.swap_duration_ms!=null){m.swap_duration_ms=d.swap_duration_ms|0}if(d.dodge_damage_reduction_percent!=null){m.dodge_damage_reduction_percent=Number(d.dodge_damage_reduction_percent)}if(d.minimum_raid_player_level!=null){m.minimum_raid_player_level=d.minimum_raid_player_level|0}return m};GymBattleSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.energy_per_sec=0;d.dodge_energy_cost=0;d.retarget_seconds=0;d.enemy_attack_interval=0;d.attack_server_interval=0;d.round_duration_seconds=0;d.bonus_time_per_ally_seconds=0;d.maximum_attackers_per_battle=0;d.same_type_attack_bonus_multiplier=0;d.maximum_energy=0;d.energy_delta_per_health_lost=0;d.dodge_duration_ms=0;d.minimum_player_level=0;d.swap_duration_ms=0;d.dodge_damage_reduction_percent=0;d.minimum_raid_player_level=0}if(m.energy_per_sec!=null&&m.hasOwnProperty("energy_per_sec")){d.energy_per_sec=o.json&&!isFinite(m.energy_per_sec)?String(m.energy_per_sec):m.energy_per_sec}if(m.dodge_energy_cost!=null&&m.hasOwnProperty("dodge_energy_cost")){d.dodge_energy_cost=o.json&&!isFinite(m.dodge_energy_cost)?String(m.dodge_energy_cost):m.dodge_energy_cost}if(m.retarget_seconds!=null&&m.hasOwnProperty("retarget_seconds")){d.retarget_seconds=o.json&&!isFinite(m.retarget_seconds)?String(m.retarget_seconds):m.retarget_seconds}if(m.enemy_attack_interval!=null&&m.hasOwnProperty("enemy_attack_interval")){d.enemy_attack_interval=o.json&&!isFinite(m.enemy_attack_interval)?String(m.enemy_attack_interval):m.enemy_attack_interval}if(m.attack_server_interval!=null&&m.hasOwnProperty("attack_server_interval")){d.attack_server_interval=o.json&&!isFinite(m.attack_server_interval)?String(m.attack_server_interval):m.attack_server_interval}if(m.round_duration_seconds!=null&&m.hasOwnProperty("round_duration_seconds")){d.round_duration_seconds=o.json&&!isFinite(m.round_duration_seconds)?String(m.round_duration_seconds):m.round_duration_seconds}if(m.bonus_time_per_ally_seconds!=null&&m.hasOwnProperty("bonus_time_per_ally_seconds")){d.bonus_time_per_ally_seconds=o.json&&!isFinite(m.bonus_time_per_ally_seconds)?String(m.bonus_time_per_ally_seconds):m.bonus_time_per_ally_seconds}if(m.maximum_attackers_per_battle!=null&&m.hasOwnProperty("maximum_attackers_per_battle")){d.maximum_attackers_per_battle=m.maximum_attackers_per_battle}if(m.same_type_attack_bonus_multiplier!=null&&m.hasOwnProperty("same_type_attack_bonus_multiplier")){d.same_type_attack_bonus_multiplier=o.json&&!isFinite(m.same_type_attack_bonus_multiplier)?String(m.same_type_attack_bonus_multiplier):m.same_type_attack_bonus_multiplier}if(m.maximum_energy!=null&&m.hasOwnProperty("maximum_energy")){d.maximum_energy=m.maximum_energy}if(m.energy_delta_per_health_lost!=null&&m.hasOwnProperty("energy_delta_per_health_lost")){d.energy_delta_per_health_lost=o.json&&!isFinite(m.energy_delta_per_health_lost)?String(m.energy_delta_per_health_lost):m.energy_delta_per_health_lost}if(m.dodge_duration_ms!=null&&m.hasOwnProperty("dodge_duration_ms")){d.dodge_duration_ms=m.dodge_duration_ms}if(m.minimum_player_level!=null&&m.hasOwnProperty("minimum_player_level")){d.minimum_player_level=m.minimum_player_level}if(m.swap_duration_ms!=null&&m.hasOwnProperty("swap_duration_ms")){d.swap_duration_ms=m.swap_duration_ms}if(m.dodge_damage_reduction_percent!=null&&m.hasOwnProperty("dodge_damage_reduction_percent")){d.dodge_damage_reduction_percent=o.json&&!isFinite(m.dodge_damage_reduction_percent)?String(m.dodge_damage_reduction_percent):m.dodge_damage_reduction_percent}if(m.minimum_raid_player_level!=null&&m.hasOwnProperty("minimum_raid_player_level")){d.minimum_raid_player_level=m.minimum_raid_player_level}return d};GymBattleSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GymBattleSettings}();Master.GymLevelSettings=function(){function GymLevelSettings(p){this.required_experience=[];this.leader_slots=[];this.trainer_slots=[];this.search_roll_bonus=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}GymLevelSettings.prototype.required_experience=$util.emptyArray;GymLevelSettings.prototype.leader_slots=$util.emptyArray;GymLevelSettings.prototype.trainer_slots=$util.emptyArray;GymLevelSettings.prototype.search_roll_bonus=$util.emptyArray;GymLevelSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.required_experience!=null&&m.required_experience.length){w.uint32(10).fork();for(var i=0;i<m.required_experience.length;++i)w.int32(m.required_experience[i]);w.ldelim()}if(m.leader_slots!=null&&m.leader_slots.length){w.uint32(18).fork();for(var i=0;i<m.leader_slots.length;++i)w.int32(m.leader_slots[i]);w.ldelim()}if(m.trainer_slots!=null&&m.trainer_slots.length){w.uint32(26).fork();for(var i=0;i<m.trainer_slots.length;++i)w.int32(m.trainer_slots[i]);w.ldelim()}if(m.search_roll_bonus!=null&&m.search_roll_bonus.length){w.uint32(34).fork();for(var i=0;i<m.search_roll_bonus.length;++i)w.int32(m.search_roll_bonus[i]);w.ldelim()}return w};GymLevelSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.GymLevelSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.required_experience&&m.required_experience.length))m.required_experience=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.required_experience.push(r.int32())}else m.required_experience.push(r.int32());break;case 2:if(!(m.leader_slots&&m.leader_slots.length))m.leader_slots=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.leader_slots.push(r.int32())}else m.leader_slots.push(r.int32());break;case 3:if(!(m.trainer_slots&&m.trainer_slots.length))m.trainer_slots=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.trainer_slots.push(r.int32())}else m.trainer_slots.push(r.int32());break;case 4:if(!(m.search_roll_bonus&&m.search_roll_bonus.length))m.search_roll_bonus=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.search_roll_bonus.push(r.int32())}else m.search_roll_bonus.push(r.int32());break;default:r.skipType(t&7);break}}return m};GymLevelSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.GymLevelSettings)return d;var m=new $root.POGOProtos.Settings.Master.GymLevelSettings;if(d.required_experience){if(!Array.isArray(d.required_experience))throw TypeError(".POGOProtos.Settings.Master.GymLevelSettings.required_experience: array expected");m.required_experience=[];for(var i=0;i<d.required_experience.length;++i){m.required_experience[i]=d.required_experience[i]|0}}if(d.leader_slots){if(!Array.isArray(d.leader_slots))throw TypeError(".POGOProtos.Settings.Master.GymLevelSettings.leader_slots: array expected");m.leader_slots=[];for(var i=0;i<d.leader_slots.length;++i){m.leader_slots[i]=d.leader_slots[i]|0}}if(d.trainer_slots){if(!Array.isArray(d.trainer_slots))throw TypeError(".POGOProtos.Settings.Master.GymLevelSettings.trainer_slots: array expected");m.trainer_slots=[];for(var i=0;i<d.trainer_slots.length;++i){m.trainer_slots[i]=d.trainer_slots[i]|0}}if(d.search_roll_bonus){if(!Array.isArray(d.search_roll_bonus))throw TypeError(".POGOProtos.Settings.Master.GymLevelSettings.search_roll_bonus: array expected");m.search_roll_bonus=[];for(var i=0;i<d.search_roll_bonus.length;++i){m.search_roll_bonus[i]=d.search_roll_bonus[i]|0}}return m};GymLevelSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.required_experience=[];d.leader_slots=[];d.trainer_slots=[];d.search_roll_bonus=[]}if(m.required_experience&&m.required_experience.length){d.required_experience=[];for(var j=0;j<m.required_experience.length;++j){d.required_experience[j]=m.required_experience[j]}}if(m.leader_slots&&m.leader_slots.length){d.leader_slots=[];for(var j=0;j<m.leader_slots.length;++j){d.leader_slots[j]=m.leader_slots[j]}}if(m.trainer_slots&&m.trainer_slots.length){d.trainer_slots=[];for(var j=0;j<m.trainer_slots.length;++j){d.trainer_slots[j]=m.trainer_slots[j]}}if(m.search_roll_bonus&&m.search_roll_bonus.length){d.search_roll_bonus=[];for(var j=0;j<m.search_roll_bonus.length;++j){d.search_roll_bonus[j]=m.search_roll_bonus[j]}}return d};GymLevelSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return GymLevelSettings}();Master.IapItemCategoryDisplay=function(){function IapItemCategoryDisplay(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}IapItemCategoryDisplay.prototype.category=0;IapItemCategoryDisplay.prototype.name="";IapItemCategoryDisplay.prototype.hidden=false;IapItemCategoryDisplay.prototype.sort_order=0;IapItemCategoryDisplay.prototype.banner_enabled=false;IapItemCategoryDisplay.prototype.banner_title="";IapItemCategoryDisplay.prototype.image_url="";IapItemCategoryDisplay.prototype.description="";IapItemCategoryDisplay.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.category!=null&&m.hasOwnProperty("category"))w.uint32(8).int32(m.category);if(m.name!=null&&m.hasOwnProperty("name"))w.uint32(18).string(m.name);if(m.hidden!=null&&m.hasOwnProperty("hidden"))w.uint32(24).bool(m.hidden);if(m.sort_order!=null&&m.hasOwnProperty("sort_order"))w.uint32(32).int32(m.sort_order);if(m.banner_enabled!=null&&m.hasOwnProperty("banner_enabled"))w.uint32(40).bool(m.banner_enabled);if(m.banner_title!=null&&m.hasOwnProperty("banner_title"))w.uint32(50).string(m.banner_title);if(m.image_url!=null&&m.hasOwnProperty("image_url"))w.uint32(58).string(m.image_url);if(m.description!=null&&m.hasOwnProperty("description"))w.uint32(66).string(m.description);return w};IapItemCategoryDisplay.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.IapItemCategoryDisplay;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.category=r.int32();break;case 2:m.name=r.string();break;case 3:m.hidden=r.bool();break;case 4:m.sort_order=r.int32();break;case 5:m.banner_enabled=r.bool();break;case 6:m.banner_title=r.string();break;case 7:m.image_url=r.string();break;case 8:m.description=r.string();break;default:r.skipType(t&7);break}}return m};IapItemCategoryDisplay.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.IapItemCategoryDisplay)return d;var m=new $root.POGOProtos.Settings.Master.IapItemCategoryDisplay;switch(d.category){case"IAP_CATEGORY_NONE":case 0:m.category=0;break;case"IAP_CATEGORY_BUNDLE":case 1:m.category=1;break;case"IAP_CATEGORY_ITEMS":case 2:m.category=2;break;case"IAP_CATEGORY_UPGRADES":case 3:m.category=3;break;case"IAP_CATEGORY_POKECOINS":case 4:m.category=4;break;case"IAP_CATEGORY_AVATAR":case 5:m.category=5;break;case"IAP_CATEGORY_AVATAR_STORE_LINK":case 6:m.category=6;break}if(d.name!=null){m.name=String(d.name)}if(d.hidden!=null){m.hidden=Boolean(d.hidden)}if(d.sort_order!=null){m.sort_order=d.sort_order|0}if(d.banner_enabled!=null){m.banner_enabled=Boolean(d.banner_enabled)}if(d.banner_title!=null){m.banner_title=String(d.banner_title)}if(d.image_url!=null){m.image_url=String(d.image_url)}if(d.description!=null){m.description=String(d.description)}return m};IapItemCategoryDisplay.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.category=o.enums===String?"IAP_CATEGORY_NONE":0;d.name="";d.hidden=false;d.sort_order=0;d.banner_enabled=false;d.banner_title="";d.image_url="";d.description=""}if(m.category!=null&&m.hasOwnProperty("category")){d.category=o.enums===String?$root.POGOProtos.Enums.HoloIapItemCategory[m.category]:m.category}if(m.name!=null&&m.hasOwnProperty("name")){d.name=m.name}if(m.hidden!=null&&m.hasOwnProperty("hidden")){d.hidden=m.hidden}if(m.sort_order!=null&&m.hasOwnProperty("sort_order")){d.sort_order=m.sort_order}if(m.banner_enabled!=null&&m.hasOwnProperty("banner_enabled")){d.banner_enabled=m.banner_enabled}if(m.banner_title!=null&&m.hasOwnProperty("banner_title")){d.banner_title=m.banner_title}if(m.image_url!=null&&m.hasOwnProperty("image_url")){d.image_url=m.image_url}if(m.description!=null&&m.hasOwnProperty("description")){d.description=m.description}return d};IapItemCategoryDisplay.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return IapItemCategoryDisplay}();Master.IapItemDisplay=function(){function IapItemDisplay(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}IapItemDisplay.prototype.sku="";IapItemDisplay.prototype.category=0;IapItemDisplay.prototype.sort_order=0;IapItemDisplay.prototype.hidden=false;IapItemDisplay.prototype.sale=false;IapItemDisplay.prototype.sprite_id="";IapItemDisplay.prototype.title="";IapItemDisplay.prototype.description="";IapItemDisplay.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.sku!=null&&m.hasOwnProperty("sku"))w.uint32(10).string(m.sku);if(m.category!=null&&m.hasOwnProperty("category"))w.uint32(16).int32(m.category);if(m.sort_order!=null&&m.hasOwnProperty("sort_order"))w.uint32(24).int32(m.sort_order);if(m.hidden!=null&&m.hasOwnProperty("hidden"))w.uint32(48).bool(m.hidden);if(m.sale!=null&&m.hasOwnProperty("sale"))w.uint32(56).bool(m.sale);if(m.sprite_id!=null&&m.hasOwnProperty("sprite_id"))w.uint32(66).string(m.sprite_id);if(m.title!=null&&m.hasOwnProperty("title"))w.uint32(74).string(m.title);if(m.description!=null&&m.hasOwnProperty("description"))w.uint32(82).string(m.description);return w};IapItemDisplay.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.IapItemDisplay;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.sku=r.string();break;case 2:m.category=r.int32();break;case 3:m.sort_order=r.int32();break;case 6:m.hidden=r.bool();break;case 7:m.sale=r.bool();break;case 8:m.sprite_id=r.string();break;case 9:m.title=r.string();break;case 10:m.description=r.string();break;default:r.skipType(t&7);break}}return m};IapItemDisplay.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.IapItemDisplay)return d;var m=new $root.POGOProtos.Settings.Master.IapItemDisplay;if(d.sku!=null){m.sku=String(d.sku)}switch(d.category){case"IAP_CATEGORY_NONE":case 0:m.category=0;break;case"IAP_CATEGORY_BUNDLE":case 1:m.category=1;break;case"IAP_CATEGORY_ITEMS":case 2:m.category=2;break;case"IAP_CATEGORY_UPGRADES":case 3:m.category=3;break;case"IAP_CATEGORY_POKECOINS":case 4:m.category=4;break;case"IAP_CATEGORY_AVATAR":case 5:m.category=5;break;case"IAP_CATEGORY_AVATAR_STORE_LINK":case 6:m.category=6;break}if(d.sort_order!=null){m.sort_order=d.sort_order|0}if(d.hidden!=null){m.hidden=Boolean(d.hidden)}if(d.sale!=null){m.sale=Boolean(d.sale)}if(d.sprite_id!=null){m.sprite_id=String(d.sprite_id)}if(d.title!=null){m.title=String(d.title)}if(d.description!=null){m.description=String(d.description)}return m};IapItemDisplay.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.sku="";d.category=o.enums===String?"IAP_CATEGORY_NONE":0;d.sort_order=0;d.hidden=false;d.sale=false;d.sprite_id="";d.title="";d.description=""}if(m.sku!=null&&m.hasOwnProperty("sku")){d.sku=m.sku}if(m.category!=null&&m.hasOwnProperty("category")){d.category=o.enums===String?$root.POGOProtos.Enums.HoloIapItemCategory[m.category]:m.category}if(m.sort_order!=null&&m.hasOwnProperty("sort_order")){d.sort_order=m.sort_order}if(m.hidden!=null&&m.hasOwnProperty("hidden")){d.hidden=m.hidden}if(m.sale!=null&&m.hasOwnProperty("sale")){d.sale=m.sale}if(m.sprite_id!=null&&m.hasOwnProperty("sprite_id")){d.sprite_id=m.sprite_id}if(m.title!=null&&m.hasOwnProperty("title")){d.title=m.title}if(m.description!=null&&m.hasOwnProperty("description")){d.description=m.description}return d};IapItemDisplay.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return IapItemDisplay}();Master.IapSettings=function(){function IapSettings(p){this.daily_defender_bonus_per_pokemon=[];this.daily_defender_bonus_currency=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}IapSettings.prototype.daily_bonus_coins=0;IapSettings.prototype.daily_defender_bonus_per_pokemon=$util.emptyArray;IapSettings.prototype.daily_defender_bonus_max_defenders=0;IapSettings.prototype.daily_defender_bonus_currency=$util.emptyArray;IapSettings.prototype.min_time_between_claims_ms=$util.Long?$util.Long.fromBits(0,0,false):0;IapSettings.prototype.daily_bonus_enabled=false;IapSettings.prototype.daily_defender_bonus_enabled=false;IapSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.daily_bonus_coins!=null&&m.hasOwnProperty("daily_bonus_coins"))w.uint32(8).int32(m.daily_bonus_coins);if(m.daily_defender_bonus_per_pokemon!=null&&m.daily_defender_bonus_per_pokemon.length){w.uint32(18).fork();for(var i=0;i<m.daily_defender_bonus_per_pokemon.length;++i)w.int32(m.daily_defender_bonus_per_pokemon[i]);w.ldelim()}if(m.daily_defender_bonus_max_defenders!=null&&m.hasOwnProperty("daily_defender_bonus_max_defenders"))w.uint32(24).int32(m.daily_defender_bonus_max_defenders);if(m.daily_defender_bonus_currency!=null&&m.daily_defender_bonus_currency.length){for(var i=0;i<m.daily_defender_bonus_currency.length;++i)w.uint32(34).string(m.daily_defender_bonus_currency[i])}if(m.min_time_between_claims_ms!=null&&m.hasOwnProperty("min_time_between_claims_ms"))w.uint32(40).int64(m.min_time_between_claims_ms);if(m.daily_bonus_enabled!=null&&m.hasOwnProperty("daily_bonus_enabled"))w.uint32(48).bool(m.daily_bonus_enabled);if(m.daily_defender_bonus_enabled!=null&&m.hasOwnProperty("daily_defender_bonus_enabled"))w.uint32(56).bool(m.daily_defender_bonus_enabled);return w};IapSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.IapSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.daily_bonus_coins=r.int32();break;case 2:if(!(m.daily_defender_bonus_per_pokemon&&m.daily_defender_bonus_per_pokemon.length))m.daily_defender_bonus_per_pokemon=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.daily_defender_bonus_per_pokemon.push(r.int32())}else m.daily_defender_bonus_per_pokemon.push(r.int32());break;case 3:m.daily_defender_bonus_max_defenders=r.int32();break;case 4:if(!(m.daily_defender_bonus_currency&&m.daily_defender_bonus_currency.length))m.daily_defender_bonus_currency=[];m.daily_defender_bonus_currency.push(r.string());break;case 5:m.min_time_between_claims_ms=r.int64();break;case 6:m.daily_bonus_enabled=r.bool();break;case 7:m.daily_defender_bonus_enabled=r.bool();break;default:r.skipType(t&7);break}}return m};IapSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.IapSettings)return d;var m=new $root.POGOProtos.Settings.Master.IapSettings;if(d.daily_bonus_coins!=null){m.daily_bonus_coins=d.daily_bonus_coins|0}if(d.daily_defender_bonus_per_pokemon){if(!Array.isArray(d.daily_defender_bonus_per_pokemon))throw TypeError(".POGOProtos.Settings.Master.IapSettings.daily_defender_bonus_per_pokemon: array expected");m.daily_defender_bonus_per_pokemon=[];for(var i=0;i<d.daily_defender_bonus_per_pokemon.length;++i){m.daily_defender_bonus_per_pokemon[i]=d.daily_defender_bonus_per_pokemon[i]|0}}if(d.daily_defender_bonus_max_defenders!=null){m.daily_defender_bonus_max_defenders=d.daily_defender_bonus_max_defenders|0}if(d.daily_defender_bonus_currency){if(!Array.isArray(d.daily_defender_bonus_currency))throw TypeError(".POGOProtos.Settings.Master.IapSettings.daily_defender_bonus_currency: array expected");m.daily_defender_bonus_currency=[];for(var i=0;i<d.daily_defender_bonus_currency.length;++i){m.daily_defender_bonus_currency[i]=String(d.daily_defender_bonus_currency[i])}}if(d.min_time_between_claims_ms!=null){if($util.Long)(m.min_time_between_claims_ms=$util.Long.fromValue(d.min_time_between_claims_ms)).unsigned=false;else if(typeof d.min_time_between_claims_ms==="string")m.min_time_between_claims_ms=parseInt(d.min_time_between_claims_ms,10);else if(typeof d.min_time_between_claims_ms==="number")m.min_time_between_claims_ms=d.min_time_between_claims_ms;else if(typeof d.min_time_between_claims_ms==="object")m.min_time_between_claims_ms=new $util.LongBits(d.min_time_between_claims_ms.low>>>0,d.min_time_between_claims_ms.high>>>0).toNumber()}if(d.daily_bonus_enabled!=null){m.daily_bonus_enabled=Boolean(d.daily_bonus_enabled)}if(d.daily_defender_bonus_enabled!=null){m.daily_defender_bonus_enabled=Boolean(d.daily_defender_bonus_enabled)}return m};IapSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.daily_defender_bonus_per_pokemon=[];d.daily_defender_bonus_currency=[]}if(o.defaults){d.daily_bonus_coins=0;d.daily_defender_bonus_max_defenders=0;if($util.Long){var n=new $util.Long(0,0,false);d.min_time_between_claims_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.min_time_between_claims_ms=o.longs===String?"0":0;d.daily_bonus_enabled=false;d.daily_defender_bonus_enabled=false}if(m.daily_bonus_coins!=null&&m.hasOwnProperty("daily_bonus_coins")){d.daily_bonus_coins=m.daily_bonus_coins}if(m.daily_defender_bonus_per_pokemon&&m.daily_defender_bonus_per_pokemon.length){d.daily_defender_bonus_per_pokemon=[];for(var j=0;j<m.daily_defender_bonus_per_pokemon.length;++j){d.daily_defender_bonus_per_pokemon[j]=m.daily_defender_bonus_per_pokemon[j]}}if(m.daily_defender_bonus_max_defenders!=null&&m.hasOwnProperty("daily_defender_bonus_max_defenders")){d.daily_defender_bonus_max_defenders=m.daily_defender_bonus_max_defenders}if(m.daily_defender_bonus_currency&&m.daily_defender_bonus_currency.length){d.daily_defender_bonus_currency=[];for(var j=0;j<m.daily_defender_bonus_currency.length;++j){d.daily_defender_bonus_currency[j]=m.daily_defender_bonus_currency[j]}}if(m.min_time_between_claims_ms!=null&&m.hasOwnProperty("min_time_between_claims_ms")){if(typeof m.min_time_between_claims_ms==="number")d.min_time_between_claims_ms=o.longs===String?String(m.min_time_between_claims_ms):m.min_time_between_claims_ms;else d.min_time_between_claims_ms=o.longs===String?$util.Long.prototype.toString.call(m.min_time_between_claims_ms):o.longs===Number?new $util.LongBits(m.min_time_between_claims_ms.low>>>0,m.min_time_between_claims_ms.high>>>0).toNumber():m.min_time_between_claims_ms}if(m.daily_bonus_enabled!=null&&m.hasOwnProperty("daily_bonus_enabled")){d.daily_bonus_enabled=m.daily_bonus_enabled}if(m.daily_defender_bonus_enabled!=null&&m.hasOwnProperty("daily_defender_bonus_enabled")){d.daily_defender_bonus_enabled=m.daily_defender_bonus_enabled}return d};IapSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return IapSettings}();Master.Item=function(){var Item={};Item.BattleAttributes=function(){function BattleAttributes(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}BattleAttributes.prototype.sta_percent=0;BattleAttributes.prototype.atk_percent=0;BattleAttributes.prototype.def_percent=0;BattleAttributes.prototype.duration_s=0;BattleAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.sta_percent!=null&&m.hasOwnProperty("sta_percent"))w.uint32(13).float(m.sta_percent);if(m.atk_percent!=null&&m.hasOwnProperty("atk_percent"))w.uint32(21).float(m.atk_percent);if(m.def_percent!=null&&m.hasOwnProperty("def_percent"))w.uint32(29).float(m.def_percent);if(m.duration_s!=null&&m.hasOwnProperty("duration_s"))w.uint32(37).float(m.duration_s);return w};BattleAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Item.BattleAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.sta_percent=r.float();break;case 2:m.atk_percent=r.float();break;case 3:m.def_percent=r.float();break;case 4:m.duration_s=r.float();break;default:r.skipType(t&7);break}}return m};BattleAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Item.BattleAttributes)return d;var m=new $root.POGOProtos.Settings.Master.Item.BattleAttributes;if(d.sta_percent!=null){m.sta_percent=Number(d.sta_percent)}if(d.atk_percent!=null){m.atk_percent=Number(d.atk_percent)}if(d.def_percent!=null){m.def_percent=Number(d.def_percent)}if(d.duration_s!=null){m.duration_s=Number(d.duration_s)}return m};BattleAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.sta_percent=0;d.atk_percent=0;d.def_percent=0;d.duration_s=0}if(m.sta_percent!=null&&m.hasOwnProperty("sta_percent")){d.sta_percent=o.json&&!isFinite(m.sta_percent)?String(m.sta_percent):m.sta_percent}if(m.atk_percent!=null&&m.hasOwnProperty("atk_percent")){d.atk_percent=o.json&&!isFinite(m.atk_percent)?String(m.atk_percent):m.atk_percent}if(m.def_percent!=null&&m.hasOwnProperty("def_percent")){d.def_percent=o.json&&!isFinite(m.def_percent)?String(m.def_percent):m.def_percent}if(m.duration_s!=null&&m.hasOwnProperty("duration_s")){d.duration_s=o.json&&!isFinite(m.duration_s)?String(m.duration_s):m.duration_s}return d};BattleAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return BattleAttributes}();Item.EggIncubatorAttributes=function(){function EggIncubatorAttributes(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EggIncubatorAttributes.prototype.incubator_type=0;EggIncubatorAttributes.prototype.uses=0;EggIncubatorAttributes.prototype.distance_multiplier=0;EggIncubatorAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.incubator_type!=null&&m.hasOwnProperty("incubator_type"))w.uint32(8).int32(m.incubator_type);if(m.uses!=null&&m.hasOwnProperty("uses"))w.uint32(16).int32(m.uses);if(m.distance_multiplier!=null&&m.hasOwnProperty("distance_multiplier"))w.uint32(29).float(m.distance_multiplier);return w};EggIncubatorAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Item.EggIncubatorAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.incubator_type=r.int32();break;case 2:m.uses=r.int32();break;case 3:m.distance_multiplier=r.float();break;default:r.skipType(t&7);break}}return m};EggIncubatorAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Item.EggIncubatorAttributes)return d;var m=new $root.POGOProtos.Settings.Master.Item.EggIncubatorAttributes;switch(d.incubator_type){case"INCUBATOR_UNSET":case 0:m.incubator_type=0;break;case"INCUBATOR_DISTANCE":case 1:m.incubator_type=1;break}if(d.uses!=null){m.uses=d.uses|0}if(d.distance_multiplier!=null){m.distance_multiplier=Number(d.distance_multiplier)}return m};EggIncubatorAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.incubator_type=o.enums===String?"INCUBATOR_UNSET":0;d.uses=0;d.distance_multiplier=0}if(m.incubator_type!=null&&m.hasOwnProperty("incubator_type")){d.incubator_type=o.enums===String?$root.POGOProtos.Inventory.EggIncubatorType[m.incubator_type]:m.incubator_type}if(m.uses!=null&&m.hasOwnProperty("uses")){d.uses=m.uses}if(m.distance_multiplier!=null&&m.hasOwnProperty("distance_multiplier")){d.distance_multiplier=o.json&&!isFinite(m.distance_multiplier)?String(m.distance_multiplier):m.distance_multiplier}return d};EggIncubatorAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EggIncubatorAttributes}();Item.ExperienceBoostAttributes=function(){function ExperienceBoostAttributes(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ExperienceBoostAttributes.prototype.xp_multiplier=0;ExperienceBoostAttributes.prototype.boost_duration_ms=0;ExperienceBoostAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.xp_multiplier!=null&&m.hasOwnProperty("xp_multiplier"))w.uint32(13).float(m.xp_multiplier);if(m.boost_duration_ms!=null&&m.hasOwnProperty("boost_duration_ms"))w.uint32(16).int32(m.boost_duration_ms);return w};ExperienceBoostAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Item.ExperienceBoostAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.xp_multiplier=r.float();break;case 2:m.boost_duration_ms=r.int32();break;default:r.skipType(t&7);break}}return m};ExperienceBoostAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Item.ExperienceBoostAttributes)return d;var m=new $root.POGOProtos.Settings.Master.Item.ExperienceBoostAttributes;if(d.xp_multiplier!=null){m.xp_multiplier=Number(d.xp_multiplier)}if(d.boost_duration_ms!=null){m.boost_duration_ms=d.boost_duration_ms|0}return m};ExperienceBoostAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.xp_multiplier=0;d.boost_duration_ms=0}if(m.xp_multiplier!=null&&m.hasOwnProperty("xp_multiplier")){d.xp_multiplier=o.json&&!isFinite(m.xp_multiplier)?String(m.xp_multiplier):m.xp_multiplier}if(m.boost_duration_ms!=null&&m.hasOwnProperty("boost_duration_ms")){d.boost_duration_ms=m.boost_duration_ms}return d};ExperienceBoostAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ExperienceBoostAttributes}();Item.FoodAttributes=function(){function FoodAttributes(p){this.item_effect=[];this.item_effect_percent=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FoodAttributes.prototype.item_effect=$util.emptyArray;FoodAttributes.prototype.item_effect_percent=$util.emptyArray;FoodAttributes.prototype.growth_percent=0;FoodAttributes.prototype.berry_multiplier=0;FoodAttributes.prototype.remote_berry_multiplier=0;FoodAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_effect!=null&&m.item_effect.length){w.uint32(10).fork();for(var i=0;i<m.item_effect.length;++i)w.int32(m.item_effect[i]);w.ldelim()}if(m.item_effect_percent!=null&&m.item_effect_percent.length){w.uint32(18).fork();for(var i=0;i<m.item_effect_percent.length;++i)w.float(m.item_effect_percent[i]);w.ldelim()}if(m.growth_percent!=null&&m.hasOwnProperty("growth_percent"))w.uint32(29).float(m.growth_percent);if(m.berry_multiplier!=null&&m.hasOwnProperty("berry_multiplier"))w.uint32(37).float(m.berry_multiplier);if(m.remote_berry_multiplier!=null&&m.hasOwnProperty("remote_berry_multiplier"))w.uint32(45).float(m.remote_berry_multiplier);return w};FoodAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Item.FoodAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.item_effect&&m.item_effect.length))m.item_effect=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.item_effect.push(r.int32())}else m.item_effect.push(r.int32());break;case 2:if(!(m.item_effect_percent&&m.item_effect_percent.length))m.item_effect_percent=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.item_effect_percent.push(r.float())}else m.item_effect_percent.push(r.float());break;case 3:m.growth_percent=r.float();break;case 4:m.berry_multiplier=r.float();break;case 5:m.remote_berry_multiplier=r.float();break;default:r.skipType(t&7);break}}return m};FoodAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Item.FoodAttributes)return d;var m=new $root.POGOProtos.Settings.Master.Item.FoodAttributes;if(d.item_effect){if(!Array.isArray(d.item_effect))throw TypeError(".POGOProtos.Settings.Master.Item.FoodAttributes.item_effect: array expected");m.item_effect=[];for(var i=0;i<d.item_effect.length;++i){switch(d.item_effect[i]){default:case"ITEM_EFFECT_NONE":case 0:m.item_effect[i]=0;break;case"ITEM_EFFECT_CAP_NO_FLEE":case 1e3:m.item_effect[i]=1e3;break;case"ITEM_EFFECT_CAP_NO_MOVEMENT":case 1002:m.item_effect[i]=1002;break;case"ITEM_EFFECT_CAP_NO_THREAT":case 1003:m.item_effect[i]=1003;break;case"ITEM_EFFECT_CAP_TARGET_MAX":case 1004:m.item_effect[i]=1004;break;case"ITEM_EFFECT_CAP_TARGET_SLOW":case 1005:m.item_effect[i]=1005;break;case"ITEM_EFFECT_CAP_CHANCE_NIGHT":case 1006:m.item_effect[i]=1006;break;case"ITEM_EFFECT_CAP_CHANCE_TRAINER":case 1007:m.item_effect[i]=1007;break;case"ITEM_EFFECT_CAP_CHANCE_FIRST_THROW":case 1008:m.item_effect[i]=1008;break;case"ITEM_EFFECT_CAP_CHANCE_LEGEND":case 1009:m.item_effect[i]=1009;break;case"ITEM_EFFECT_CAP_CHANCE_HEAVY":case 1010:m.item_effect[i]=1010;break;case"ITEM_EFFECT_CAP_CHANCE_REPEAT":case 1011:m.item_effect[i]=1011;break;case"ITEM_EFFECT_CAP_CHANCE_MULTI_THROW":case 1012:m.item_effect[i]=1012;break;case"ITEM_EFFECT_CAP_CHANCE_ALWAYS":case 1013:m.item_effect[i]=1013;break;case"ITEM_EFFECT_CAP_CHANCE_SINGLE_THROW":case 1014:m.item_effect[i]=1014;break;case"ITEM_EFFECT_CANDY_AWARD":case 1015:m.item_effect[i]=1015;break;case"ITEM_EFFECT_FULL_MOTIVATION":case 1016:m.item_effect[i]=1016;break}}}if(d.item_effect_percent){if(!Array.isArray(d.item_effect_percent))throw TypeError(".POGOProtos.Settings.Master.Item.FoodAttributes.item_effect_percent: array expected");m.item_effect_percent=[];for(var i=0;i<d.item_effect_percent.length;++i){m.item_effect_percent[i]=Number(d.item_effect_percent[i])}}if(d.growth_percent!=null){m.growth_percent=Number(d.growth_percent)}if(d.berry_multiplier!=null){m.berry_multiplier=Number(d.berry_multiplier)}if(d.remote_berry_multiplier!=null){m.remote_berry_multiplier=Number(d.remote_berry_multiplier)}return m};FoodAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.item_effect=[];d.item_effect_percent=[]}if(o.defaults){d.growth_percent=0;d.berry_multiplier=0;d.remote_berry_multiplier=0}if(m.item_effect&&m.item_effect.length){d.item_effect=[];for(var j=0;j<m.item_effect.length;++j){d.item_effect[j]=o.enums===String?$root.POGOProtos.Enums.ItemEffect[m.item_effect[j]]:m.item_effect[j]}}if(m.item_effect_percent&&m.item_effect_percent.length){d.item_effect_percent=[];for(var j=0;j<m.item_effect_percent.length;++j){d.item_effect_percent[j]=o.json&&!isFinite(m.item_effect_percent[j])?String(m.item_effect_percent[j]):m.item_effect_percent[j]}}if(m.growth_percent!=null&&m.hasOwnProperty("growth_percent")){d.growth_percent=o.json&&!isFinite(m.growth_percent)?String(m.growth_percent):m.growth_percent}if(m.berry_multiplier!=null&&m.hasOwnProperty("berry_multiplier")){d.berry_multiplier=o.json&&!isFinite(m.berry_multiplier)?String(m.berry_multiplier):m.berry_multiplier}if(m.remote_berry_multiplier!=null&&m.hasOwnProperty("remote_berry_multiplier")){d.remote_berry_multiplier=o.json&&!isFinite(m.remote_berry_multiplier)?String(m.remote_berry_multiplier):m.remote_berry_multiplier}return d};FoodAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FoodAttributes}();Item.FortModifierAttributes=function(){function FortModifierAttributes(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}FortModifierAttributes.prototype.modifier_lifetime_seconds=0;FortModifierAttributes.prototype.troy_disk_num_pokemon_spawned=0;FortModifierAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.modifier_lifetime_seconds!=null&&m.hasOwnProperty("modifier_lifetime_seconds"))w.uint32(8).int32(m.modifier_lifetime_seconds);if(m.troy_disk_num_pokemon_spawned!=null&&m.hasOwnProperty("troy_disk_num_pokemon_spawned"))w.uint32(16).int32(m.troy_disk_num_pokemon_spawned);return w};FortModifierAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Item.FortModifierAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.modifier_lifetime_seconds=r.int32();break;case 2:m.troy_disk_num_pokemon_spawned=r.int32();break;default:r.skipType(t&7);break}}return m};FortModifierAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Item.FortModifierAttributes)return d;var m=new $root.POGOProtos.Settings.Master.Item.FortModifierAttributes;if(d.modifier_lifetime_seconds!=null){m.modifier_lifetime_seconds=d.modifier_lifetime_seconds|0}if(d.troy_disk_num_pokemon_spawned!=null){m.troy_disk_num_pokemon_spawned=d.troy_disk_num_pokemon_spawned|0}return m};FortModifierAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.modifier_lifetime_seconds=0;d.troy_disk_num_pokemon_spawned=0}if(m.modifier_lifetime_seconds!=null&&m.hasOwnProperty("modifier_lifetime_seconds")){d.modifier_lifetime_seconds=m.modifier_lifetime_seconds}if(m.troy_disk_num_pokemon_spawned!=null&&m.hasOwnProperty("troy_disk_num_pokemon_spawned")){d.troy_disk_num_pokemon_spawned=m.troy_disk_num_pokemon_spawned}return d};FortModifierAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return FortModifierAttributes}();Item.IncenseAttributes=function(){function IncenseAttributes(p){this.pokemon_type=[];this.spawn_table=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}IncenseAttributes.prototype.incense_lifetime_seconds=0;IncenseAttributes.prototype.pokemon_type=$util.emptyArray;IncenseAttributes.prototype.pokemon_incense_type_probability=0;IncenseAttributes.prototype.standing_time_between_encounters_seconds=0;IncenseAttributes.prototype.moving_time_between_encounter_seconds=0;IncenseAttributes.prototype.distance_required_for_shorter_interval_meters=0;IncenseAttributes.prototype.pokemon_attracted_length_sec=0;IncenseAttributes.prototype.spawn_table=$util.emptyArray;IncenseAttributes.prototype.spawn_table_probability=0;IncenseAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.incense_lifetime_seconds!=null&&m.hasOwnProperty("incense_lifetime_seconds"))w.uint32(8).int32(m.incense_lifetime_seconds);if(m.pokemon_type!=null&&m.pokemon_type.length){w.uint32(18).fork();for(var i=0;i<m.pokemon_type.length;++i)w.int32(m.pokemon_type[i]);w.ldelim()}if(m.pokemon_incense_type_probability!=null&&m.hasOwnProperty("pokemon_incense_type_probability"))w.uint32(29).float(m.pokemon_incense_type_probability);if(m.standing_time_between_encounters_seconds!=null&&m.hasOwnProperty("standing_time_between_encounters_seconds"))w.uint32(32).int32(m.standing_time_between_encounters_seconds);if(m.moving_time_between_encounter_seconds!=null&&m.hasOwnProperty("moving_time_between_encounter_seconds"))w.uint32(40).int32(m.moving_time_between_encounter_seconds);if(m.distance_required_for_shorter_interval_meters!=null&&m.hasOwnProperty("distance_required_for_shorter_interval_meters"))w.uint32(48).int32(m.distance_required_for_shorter_interval_meters);if(m.pokemon_attracted_length_sec!=null&&m.hasOwnProperty("pokemon_attracted_length_sec"))w.uint32(56).int32(m.pokemon_attracted_length_sec);if(m.spawn_table!=null&&m.spawn_table.length){for(var i=0;i<m.spawn_table.length;++i)$root.POGOProtos.Settings.Master.Item.IncenseAttributes.IncensedPokemon.encode(m.spawn_table[i],w.uint32(66).fork()).ldelim()}if(m.spawn_table_probability!=null&&m.hasOwnProperty("spawn_table_probability"))w.uint32(77).float(m.spawn_table_probability);return w};IncenseAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Item.IncenseAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.incense_lifetime_seconds=r.int32();break;case 2:if(!(m.pokemon_type&&m.pokemon_type.length))m.pokemon_type=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.pokemon_type.push(r.int32())}else m.pokemon_type.push(r.int32());break;case 3:m.pokemon_incense_type_probability=r.float();break;case 4:m.standing_time_between_encounters_seconds=r.int32();break;case 5:m.moving_time_between_encounter_seconds=r.int32();break;case 6:m.distance_required_for_shorter_interval_meters=r.int32();break;case 7:m.pokemon_attracted_length_sec=r.int32();break;case 8:if(!(m.spawn_table&&m.spawn_table.length))m.spawn_table=[];m.spawn_table.push($root.POGOProtos.Settings.Master.Item.IncenseAttributes.IncensedPokemon.decode(r,r.uint32()));break;case 9:m.spawn_table_probability=r.float();break;default:r.skipType(t&7);break}}return m};IncenseAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Item.IncenseAttributes)return d;var m=new $root.POGOProtos.Settings.Master.Item.IncenseAttributes;if(d.incense_lifetime_seconds!=null){m.incense_lifetime_seconds=d.incense_lifetime_seconds|0}if(d.pokemon_type){if(!Array.isArray(d.pokemon_type))throw TypeError(".POGOProtos.Settings.Master.Item.IncenseAttributes.pokemon_type: array expected");m.pokemon_type=[];for(var i=0;i<d.pokemon_type.length;++i){switch(d.pokemon_type[i]){default:case"POKEMON_TYPE_NONE":case 0:m.pokemon_type[i]=0;break;case"POKEMON_TYPE_NORMAL":case 1:m.pokemon_type[i]=1;break;case"POKEMON_TYPE_FIGHTING":case 2:m.pokemon_type[i]=2;break;case"POKEMON_TYPE_FLYING":case 3:m.pokemon_type[i]=3;break;case"POKEMON_TYPE_POISON":case 4:m.pokemon_type[i]=4;break;case"POKEMON_TYPE_GROUND":case 5:m.pokemon_type[i]=5;break;case"POKEMON_TYPE_ROCK":case 6:m.pokemon_type[i]=6;break;case"POKEMON_TYPE_BUG":case 7:m.pokemon_type[i]=7;break;case"POKEMON_TYPE_GHOST":case 8:m.pokemon_type[i]=8;break;case"POKEMON_TYPE_STEEL":case 9:m.pokemon_type[i]=9;break;case"POKEMON_TYPE_FIRE":case 10:m.pokemon_type[i]=10;break;case"POKEMON_TYPE_WATER":case 11:m.pokemon_type[i]=11;break;case"POKEMON_TYPE_GRASS":case 12:m.pokemon_type[i]=12;break;case"POKEMON_TYPE_ELECTRIC":case 13:m.pokemon_type[i]=13;break;case"POKEMON_TYPE_PSYCHIC":case 14:m.pokemon_type[i]=14;break;case"POKEMON_TYPE_ICE":case 15:m.pokemon_type[i]=15;break;case"POKEMON_TYPE_DRAGON":case 16:m.pokemon_type[i]=16;break;case"POKEMON_TYPE_DARK":case 17:m.pokemon_type[i]=17;break;case"POKEMON_TYPE_FAIRY":case 18:m.pokemon_type[i]=18;break}}}if(d.pokemon_incense_type_probability!=null){m.pokemon_incense_type_probability=Number(d.pokemon_incense_type_probability)}if(d.standing_time_between_encounters_seconds!=null){m.standing_time_between_encounters_seconds=d.standing_time_between_encounters_seconds|0}if(d.moving_time_between_encounter_seconds!=null){m.moving_time_between_encounter_seconds=d.moving_time_between_encounter_seconds|0}if(d.distance_required_for_shorter_interval_meters!=null){m.distance_required_for_shorter_interval_meters=d.distance_required_for_shorter_interval_meters|0}if(d.pokemon_attracted_length_sec!=null){m.pokemon_attracted_length_sec=d.pokemon_attracted_length_sec|0}if(d.spawn_table){if(!Array.isArray(d.spawn_table))throw TypeError(".POGOProtos.Settings.Master.Item.IncenseAttributes.spawn_table: array expected");m.spawn_table=[];for(var i=0;i<d.spawn_table.length;++i){if(typeof d.spawn_table[i]!=="object")throw TypeError(".POGOProtos.Settings.Master.Item.IncenseAttributes.spawn_table: object expected");m.spawn_table[i]=$root.POGOProtos.Settings.Master.Item.IncenseAttributes.IncensedPokemon.fromObject(d.spawn_table[i])}}if(d.spawn_table_probability!=null){m.spawn_table_probability=Number(d.spawn_table_probability)}return m};IncenseAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.pokemon_type=[];d.spawn_table=[]}if(o.defaults){d.incense_lifetime_seconds=0;d.pokemon_incense_type_probability=0;d.standing_time_between_encounters_seconds=0;d.moving_time_between_encounter_seconds=0;d.distance_required_for_shorter_interval_meters=0;d.pokemon_attracted_length_sec=0;d.spawn_table_probability=0}if(m.incense_lifetime_seconds!=null&&m.hasOwnProperty("incense_lifetime_seconds")){d.incense_lifetime_seconds=m.incense_lifetime_seconds}if(m.pokemon_type&&m.pokemon_type.length){d.pokemon_type=[];for(var j=0;j<m.pokemon_type.length;++j){d.pokemon_type[j]=o.enums===String?$root.POGOProtos.Enums.PokemonType[m.pokemon_type[j]]:m.pokemon_type[j]}}if(m.pokemon_incense_type_probability!=null&&m.hasOwnProperty("pokemon_incense_type_probability")){d.pokemon_incense_type_probability=o.json&&!isFinite(m.pokemon_incense_type_probability)?String(m.pokemon_incense_type_probability):m.pokemon_incense_type_probability}if(m.standing_time_between_encounters_seconds!=null&&m.hasOwnProperty("standing_time_between_encounters_seconds")){d.standing_time_between_encounters_seconds=m.standing_time_between_encounters_seconds}if(m.moving_time_between_encounter_seconds!=null&&m.hasOwnProperty("moving_time_between_encounter_seconds")){d.moving_time_between_encounter_seconds=m.moving_time_between_encounter_seconds}if(m.distance_required_for_shorter_interval_meters!=null&&m.hasOwnProperty("distance_required_for_shorter_interval_meters")){d.distance_required_for_shorter_interval_meters=m.distance_required_for_shorter_interval_meters}if(m.pokemon_attracted_length_sec!=null&&m.hasOwnProperty("pokemon_attracted_length_sec")){d.pokemon_attracted_length_sec=m.pokemon_attracted_length_sec}if(m.spawn_table&&m.spawn_table.length){d.spawn_table=[];for(var j=0;j<m.spawn_table.length;++j){d.spawn_table[j]=$root.POGOProtos.Settings.Master.Item.IncenseAttributes.IncensedPokemon.toObject(m.spawn_table[j],o)}}if(m.spawn_table_probability!=null&&m.hasOwnProperty("spawn_table_probability")){d.spawn_table_probability=o.json&&!isFinite(m.spawn_table_probability)?String(m.spawn_table_probability):m.spawn_table_probability}return d};IncenseAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};IncenseAttributes.IncensedPokemon=function(){function IncensedPokemon(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}IncensedPokemon.prototype.pokemon_id=0;IncensedPokemon.prototype.weight=0;IncensedPokemon.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(8).int32(m.pokemon_id);if(m.weight!=null&&m.hasOwnProperty("weight"))w.uint32(21).float(m.weight);return w};IncensedPokemon.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Item.IncenseAttributes.IncensedPokemon;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.int32();break;case 2:m.weight=r.float();break;default:r.skipType(t&7);break}}return m};IncensedPokemon.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Item.IncenseAttributes.IncensedPokemon)return d;var m=new $root.POGOProtos.Settings.Master.Item.IncenseAttributes.IncensedPokemon;switch(d.pokemon_id){case"MISSINGNO":case 0:m.pokemon_id=0;break;case"BULBASAUR":case 1:m.pokemon_id=1;break;case"IVYSAUR":case 2:m.pokemon_id=2;break;case"VENUSAUR":case 3:m.pokemon_id=3;break;case"CHARMANDER":case 4:m.pokemon_id=4;break;case"CHARMELEON":case 5:m.pokemon_id=5;break;case"CHARIZARD":case 6:m.pokemon_id=6;break;case"SQUIRTLE":case 7:m.pokemon_id=7;break;case"WARTORTLE":case 8:m.pokemon_id=8;break;case"BLASTOISE":case 9:m.pokemon_id=9;break;case"CATERPIE":case 10:m.pokemon_id=10;break;case"METAPOD":case 11:m.pokemon_id=11;break;case"BUTTERFREE":case 12:m.pokemon_id=12;break;case"WEEDLE":case 13:m.pokemon_id=13;break;case"KAKUNA":case 14:m.pokemon_id=14;break;case"BEEDRILL":case 15:m.pokemon_id=15;break;case"PIDGEY":case 16:m.pokemon_id=16;break;case"PIDGEOTTO":case 17:m.pokemon_id=17;break;case"PIDGEOT":case 18:m.pokemon_id=18;break;case"RATTATA":case 19:m.pokemon_id=19;break;case"RATICATE":case 20:m.pokemon_id=20;break;case"SPEAROW":case 21:m.pokemon_id=21;break;case"FEAROW":case 22:m.pokemon_id=22;break;case"EKANS":case 23:m.pokemon_id=23;break;case"ARBOK":case 24:m.pokemon_id=24;break;case"PIKACHU":case 25:m.pokemon_id=25;break;case"RAICHU":case 26:m.pokemon_id=26;break;case"SANDSHREW":case 27:m.pokemon_id=27;break;case"SANDSLASH":case 28:m.pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_id=29;break;case"NIDORINA":case 30:m.pokemon_id=30;break;case"NIDOQUEEN":case 31:m.pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.pokemon_id=32;break;case"NIDORINO":case 33:m.pokemon_id=33;break;case"NIDOKING":case 34:m.pokemon_id=34;break;case"CLEFAIRY":case 35:m.pokemon_id=35;break;case"CLEFABLE":case 36:m.pokemon_id=36;break;case"VULPIX":case 37:m.pokemon_id=37;break;case"NINETALES":case 38:m.pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.pokemon_id=40;break;case"ZUBAT":case 41:m.pokemon_id=41;break;case"GOLBAT":case 42:m.pokemon_id=42;break;case"ODDISH":case 43:m.pokemon_id=43;break;case"GLOOM":case 44:m.pokemon_id=44;break;case"VILEPLUME":case 45:m.pokemon_id=45;break;case"PARAS":case 46:m.pokemon_id=46;break;case"PARASECT":case 47:m.pokemon_id=47;break;case"VENONAT":case 48:m.pokemon_id=48;break;case"VENOMOTH":case 49:m.pokemon_id=49;break;case"DIGLETT":case 50:m.pokemon_id=50;break;case"DUGTRIO":case 51:m.pokemon_id=51;break;case"MEOWTH":case 52:m.pokemon_id=52;break;case"PERSIAN":case 53:m.pokemon_id=53;break;case"PSYDUCK":case 54:m.pokemon_id=54;break;case"GOLDUCK":case 55:m.pokemon_id=55;break;case"MANKEY":case 56:m.pokemon_id=56;break;case"PRIMEAPE":case 57:m.pokemon_id=57;break;case"GROWLITHE":case 58:m.pokemon_id=58;break;case"ARCANINE":case 59:m.pokemon_id=59;break;case"POLIWAG":case 60:m.pokemon_id=60;break;case"POLIWHIRL":case 61:m.pokemon_id=61;break;case"POLIWRATH":case 62:m.pokemon_id=62;break;case"ABRA":case 63:m.pokemon_id=63;break;case"KADABRA":case 64:m.pokemon_id=64;break;case"ALAKAZAM":case 65:m.pokemon_id=65;break;case"MACHOP":case 66:m.pokemon_id=66;break;case"MACHOKE":case 67:m.pokemon_id=67;break;case"MACHAMP":case 68:m.pokemon_id=68;break;case"BELLSPROUT":case 69:m.pokemon_id=69;break;case"WEEPINBELL":case 70:m.pokemon_id=70;break;case"VICTREEBEL":case 71:m.pokemon_id=71;break;case"TENTACOOL":case 72:m.pokemon_id=72;break;case"TENTACRUEL":case 73:m.pokemon_id=73;break;case"GEODUDE":case 74:m.pokemon_id=74;break;case"GRAVELER":case 75:m.pokemon_id=75;break;case"GOLEM":case 76:m.pokemon_id=76;break;case"PONYTA":case 77:m.pokemon_id=77;break;case"RAPIDASH":case 78:m.pokemon_id=78;break;case"SLOWPOKE":case 79:m.pokemon_id=79;break;case"SLOWBRO":case 80:m.pokemon_id=80;break;case"MAGNEMITE":case 81:m.pokemon_id=81;break;case"MAGNETON":case 82:m.pokemon_id=82;break;case"FARFETCHD":case 83:m.pokemon_id=83;break;case"DODUO":case 84:m.pokemon_id=84;break;case"DODRIO":case 85:m.pokemon_id=85;break;case"SEEL":case 86:m.pokemon_id=86;break;case"DEWGONG":case 87:m.pokemon_id=87;break;case"GRIMER":case 88:m.pokemon_id=88;break;case"MUK":case 89:m.pokemon_id=89;break;case"SHELLDER":case 90:m.pokemon_id=90;break;case"CLOYSTER":case 91:m.pokemon_id=91;break;case"GASTLY":case 92:m.pokemon_id=92;break;case"HAUNTER":case 93:m.pokemon_id=93;break;case"GENGAR":case 94:m.pokemon_id=94;break;case"ONIX":case 95:m.pokemon_id=95;break;case"DROWZEE":case 96:m.pokemon_id=96;break;case"HYPNO":case 97:m.pokemon_id=97;break;case"KRABBY":case 98:m.pokemon_id=98;break;case"KINGLER":case 99:m.pokemon_id=99;break;case"VOLTORB":case 100:m.pokemon_id=100;break;case"ELECTRODE":case 101:m.pokemon_id=101;break;case"EXEGGCUTE":case 102:m.pokemon_id=102;break;case"EXEGGUTOR":case 103:m.pokemon_id=103;break;case"CUBONE":case 104:m.pokemon_id=104;break;case"MAROWAK":case 105:m.pokemon_id=105;break;case"HITMONLEE":case 106:m.pokemon_id=106;break;case"HITMONCHAN":case 107:m.pokemon_id=107;break;case"LICKITUNG":case 108:m.pokemon_id=108;break;case"KOFFING":case 109:m.pokemon_id=109;break;case"WEEZING":case 110:m.pokemon_id=110;break;case"RHYHORN":case 111:m.pokemon_id=111;break;case"RHYDON":case 112:m.pokemon_id=112;break;case"CHANSEY":case 113:m.pokemon_id=113;break;case"TANGELA":case 114:m.pokemon_id=114;break;case"KANGASKHAN":case 115:m.pokemon_id=115;break;case"HORSEA":case 116:m.pokemon_id=116;break;case"SEADRA":case 117:m.pokemon_id=117;break;case"GOLDEEN":case 118:m.pokemon_id=118;break;case"SEAKING":case 119:m.pokemon_id=119;break;case"STARYU":case 120:m.pokemon_id=120;break;case"STARMIE":case 121:m.pokemon_id=121;break;case"MR_MIME":case 122:m.pokemon_id=122;break;case"SCYTHER":case 123:m.pokemon_id=123;break;case"JYNX":case 124:m.pokemon_id=124;break;case"ELECTABUZZ":case 125:m.pokemon_id=125;break;case"MAGMAR":case 126:m.pokemon_id=126;break;case"PINSIR":case 127:m.pokemon_id=127;break;case"TAUROS":case 128:m.pokemon_id=128;break;case"MAGIKARP":case 129:m.pokemon_id=129;break;case"GYARADOS":case 130:m.pokemon_id=130;break;case"LAPRAS":case 131:m.pokemon_id=131;break;case"DITTO":case 132:m.pokemon_id=132;break;case"EEVEE":case 133:m.pokemon_id=133;break;case"VAPOREON":case 134:m.pokemon_id=134;break;case"JOLTEON":case 135:m.pokemon_id=135;break;case"FLAREON":case 136:m.pokemon_id=136;break;case"PORYGON":case 137:m.pokemon_id=137;break;case"OMANYTE":case 138:m.pokemon_id=138;break;case"OMASTAR":case 139:m.pokemon_id=139;break;case"KABUTO":case 140:m.pokemon_id=140;break;case"KABUTOPS":case 141:m.pokemon_id=141;break;case"AERODACTYL":case 142:m.pokemon_id=142;break;case"SNORLAX":case 143:m.pokemon_id=143;break;case"ARTICUNO":case 144:m.pokemon_id=144;break;case"ZAPDOS":case 145:m.pokemon_id=145;break;case"MOLTRES":case 146:m.pokemon_id=146;break;case"DRATINI":case 147:m.pokemon_id=147;break;case"DRAGONAIR":case 148:m.pokemon_id=148;break;case"DRAGONITE":case 149:m.pokemon_id=149;break;case"MEWTWO":case 150:m.pokemon_id=150;break;case"MEW":case 151:m.pokemon_id=151;break;case"CHIKORITA":case 152:m.pokemon_id=152;break;case"BAYLEEF":case 153:m.pokemon_id=153;break;case"MEGANIUM":case 154:m.pokemon_id=154;break;case"CYNDAQUIL":case 155:m.pokemon_id=155;break;case"QUILAVA":case 156:m.pokemon_id=156;break;case"TYPHLOSION":case 157:m.pokemon_id=157;break;case"TOTODILE":case 158:m.pokemon_id=158;break;case"CROCONAW":case 159:m.pokemon_id=159;break;case"FERALIGATR":case 160:m.pokemon_id=160;break;case"SENTRET":case 161:m.pokemon_id=161;break;case"FURRET":case 162:m.pokemon_id=162;break;case"HOOTHOOT":case 163:m.pokemon_id=163;break;case"NOCTOWL":case 164:m.pokemon_id=164;break;case"LEDYBA":case 165:m.pokemon_id=165;break;case"LEDIAN":case 166:m.pokemon_id=166;break;case"SPINARAK":case 167:m.pokemon_id=167;break;case"ARIADOS":case 168:m.pokemon_id=168;break;case"CROBAT":case 169:m.pokemon_id=169;break;case"CHINCHOU":case 170:m.pokemon_id=170;break;case"LANTURN":case 171:m.pokemon_id=171;break;case"PICHU":case 172:m.pokemon_id=172;break;case"CLEFFA":case 173:m.pokemon_id=173;break;case"IGGLYBUFF":case 174:m.pokemon_id=174;break;case"TOGEPI":case 175:m.pokemon_id=175;break;case"TOGETIC":case 176:m.pokemon_id=176;break;case"NATU":case 177:m.pokemon_id=177;break;case"XATU":case 178:m.pokemon_id=178;break;case"MAREEP":case 179:m.pokemon_id=179;break;case"FLAAFFY":case 180:m.pokemon_id=180;break;case"AMPHAROS":case 181:m.pokemon_id=181;break;case"BELLOSSOM":case 182:m.pokemon_id=182;break;case"MARILL":case 183:m.pokemon_id=183;break;case"AZUMARILL":case 184:m.pokemon_id=184;break;case"SUDOWOODO":case 185:m.pokemon_id=185;break;case"POLITOED":case 186:m.pokemon_id=186;break;case"HOPPIP":case 187:m.pokemon_id=187;break;case"SKIPLOOM":case 188:m.pokemon_id=188;break;case"JUMPLUFF":case 189:m.pokemon_id=189;break;case"AIPOM":case 190:m.pokemon_id=190;break;case"SUNKERN":case 191:m.pokemon_id=191;break;case"SUNFLORA":case 192:m.pokemon_id=192;break;case"YANMA":case 193:m.pokemon_id=193;break;case"WOOPER":case 194:m.pokemon_id=194;break;case"QUAGSIRE":case 195:m.pokemon_id=195;break;case"ESPEON":case 196:m.pokemon_id=196;break;case"UMBREON":case 197:m.pokemon_id=197;break;case"MURKROW":case 198:m.pokemon_id=198;break;case"SLOWKING":case 199:m.pokemon_id=199;break;case"MISDREAVUS":case 200:m.pokemon_id=200;break;case"UNOWN":case 201:m.pokemon_id=201;break;case"WOBBUFFET":case 202:m.pokemon_id=202;break;case"GIRAFARIG":case 203:m.pokemon_id=203;break;case"PINECO":case 204:m.pokemon_id=204;break;case"FORRETRESS":case 205:m.pokemon_id=205;break;case"DUNSPARCE":case 206:m.pokemon_id=206;break;case"GLIGAR":case 207:m.pokemon_id=207;break;case"STEELIX":case 208:m.pokemon_id=208;break;case"SNUBBULL":case 209:m.pokemon_id=209;break;case"GRANBULL":case 210:m.pokemon_id=210;break;case"QWILFISH":case 211:m.pokemon_id=211;break;case"SCIZOR":case 212:m.pokemon_id=212;break;case"SHUCKLE":case 213:m.pokemon_id=213;break;case"HERACROSS":case 214:m.pokemon_id=214;break;case"SNEASEL":case 215:m.pokemon_id=215;break;case"TEDDIURSA":case 216:m.pokemon_id=216;break;case"URSARING":case 217:m.pokemon_id=217;break;case"SLUGMA":case 218:m.pokemon_id=218;break;case"MAGCARGO":case 219:m.pokemon_id=219;break;case"SWINUB":case 220:m.pokemon_id=220;break;case"PILOSWINE":case 221:m.pokemon_id=221;break;case"CORSOLA":case 222:m.pokemon_id=222;break;case"REMORAID":case 223:m.pokemon_id=223;break;case"OCTILLERY":case 224:m.pokemon_id=224;break;case"DELIBIRD":case 225:m.pokemon_id=225;break;case"MANTINE":case 226:m.pokemon_id=226;break;case"SKARMORY":case 227:m.pokemon_id=227;break;case"HOUNDOUR":case 228:m.pokemon_id=228;break;case"HOUNDOOM":case 229:m.pokemon_id=229;break;case"KINGDRA":case 230:m.pokemon_id=230;break;case"PHANPY":case 231:m.pokemon_id=231;break;case"DONPHAN":case 232:m.pokemon_id=232;break;case"PORYGON2":case 233:m.pokemon_id=233;break;case"STANTLER":case 234:m.pokemon_id=234;break;case"SMEARGLE":case 235:m.pokemon_id=235;break;case"TYROGUE":case 236:m.pokemon_id=236;break;case"HITMONTOP":case 237:m.pokemon_id=237;break;case"SMOOCHUM":case 238:m.pokemon_id=238;break;case"ELEKID":case 239:m.pokemon_id=239;break;case"MAGBY":case 240:m.pokemon_id=240;break;case"MILTANK":case 241:m.pokemon_id=241;break;case"BLISSEY":case 242:m.pokemon_id=242;break;case"RAIKOU":case 243:m.pokemon_id=243;break;case"ENTEI":case 244:m.pokemon_id=244;break;case"SUICUNE":case 245:m.pokemon_id=245;break;case"LARVITAR":case 246:m.pokemon_id=246;break;case"PUPITAR":case 247:m.pokemon_id=247;break;case"TYRANITAR":case 248:m.pokemon_id=248;break;case"LUGIA":case 249:m.pokemon_id=249;break;case"HO_OH":case 250:m.pokemon_id=250;break;case"CELEBI":case 251:m.pokemon_id=251;break;case"TREECKO":case 252:m.pokemon_id=252;break;case"GROVYLE":case 253:m.pokemon_id=253;break;case"SCEPTILE":case 254:m.pokemon_id=254;break;case"TORCHIC":case 255:m.pokemon_id=255;break;case"COMBUSKEN":case 256:m.pokemon_id=256;break;case"BLAZIKEN":case 257:m.pokemon_id=257;break;case"MUDKIP":case 258:m.pokemon_id=258;break;case"MARSHTOMP":case 259:m.pokemon_id=259;break;case"SWAMPERT":case 260:m.pokemon_id=260;break;case"POOCHYENA":case 261:m.pokemon_id=261;break;case"MIGHTYENA":case 262:m.pokemon_id=262;break;case"ZIGZAGOON":case 263:m.pokemon_id=263;break;case"LINOONE":case 264:m.pokemon_id=264;break;case"WURMPLE":case 265:m.pokemon_id=265;break;case"SILCOON":case 266:m.pokemon_id=266;break;case"BEAUTIFLY":case 267:m.pokemon_id=267;break;case"CASCOON":case 268:m.pokemon_id=268;break;case"DUSTOX":case 269:m.pokemon_id=269;break;case"LOTAD":case 270:m.pokemon_id=270;break;case"LOMBRE":case 271:m.pokemon_id=271;break;case"LUDICOLO":case 272:m.pokemon_id=272;break;case"SEEDOT":case 273:m.pokemon_id=273;break;case"NUZLEAF":case 274:m.pokemon_id=274;break;case"SHIFTRY":case 275:m.pokemon_id=275;break;case"TAILLOW":case 276:m.pokemon_id=276;break;case"SWELLOW":case 277:m.pokemon_id=277;break;case"WINGULL":case 278:m.pokemon_id=278;break;case"PELIPPER":case 279:m.pokemon_id=279;break;case"RALTS":case 280:m.pokemon_id=280;break;case"KIRLIA":case 281:m.pokemon_id=281;break;case"GARDEVOIR":case 282:m.pokemon_id=282;break;case"SURSKIT":case 283:m.pokemon_id=283;break;case"MASQUERAIN":case 284:m.pokemon_id=284;break;case"SHROOMISH":case 285:m.pokemon_id=285;break;case"BRELOOM":case 286:m.pokemon_id=286;break;case"SLAKOTH":case 287:m.pokemon_id=287;break;case"VIGOROTH":case 288:m.pokemon_id=288;break;case"SLAKING":case 289:m.pokemon_id=289;break;case"NINCADA":case 290:m.pokemon_id=290;break;case"NINJASK":case 291:m.pokemon_id=291;break;case"SHEDINJA":case 292:m.pokemon_id=292;break;case"WHISMUR":case 293:m.pokemon_id=293;break;case"LOUDRED":case 294:m.pokemon_id=294;break;case"EXPLOUD":case 295:m.pokemon_id=295;break;case"MAKUHITA":case 296:m.pokemon_id=296;break;case"HARIYAMA":case 297:m.pokemon_id=297;break;case"AZURILL":case 298:m.pokemon_id=298;break;case"NOSEPASS":case 299:m.pokemon_id=299;break;case"SKITTY":case 300:m.pokemon_id=300;break;case"DELCATTY":case 301:m.pokemon_id=301;break;case"SABLEYE":case 302:m.pokemon_id=302;break;case"MAWILE":case 303:m.pokemon_id=303;break;case"ARON":case 304:m.pokemon_id=304;break;case"LAIRON":case 305:m.pokemon_id=305;break;case"AGGRON":case 306:m.pokemon_id=306;break;case"MEDITITE":case 307:m.pokemon_id=307;break;case"MEDICHAM":case 308:m.pokemon_id=308;break;case"ELECTRIKE":case 309:m.pokemon_id=309;break;case"MANECTRIC":case 310:m.pokemon_id=310;break;case"PLUSLE":case 311:m.pokemon_id=311;break;case"MINUN":case 312:m.pokemon_id=312;break;case"VOLBEAT":case 313:m.pokemon_id=313;break;case"ILLUMISE":case 314:m.pokemon_id=314;break;case"ROSELIA":case 315:m.pokemon_id=315;break;case"GULPIN":case 316:m.pokemon_id=316;break;case"SWALOT":case 317:m.pokemon_id=317;break;case"CARVANHA":case 318:m.pokemon_id=318;break;case"SHARPEDO":case 319:m.pokemon_id=319;break;case"WAILMER":case 320:m.pokemon_id=320;break;case"WAILORD":case 321:m.pokemon_id=321;break;case"NUMEL":case 322:m.pokemon_id=322;break;case"CAMERUPT":case 323:m.pokemon_id=323;break;case"TORKOAL":case 324:m.pokemon_id=324;break;case"SPOINK":case 325:m.pokemon_id=325;break;case"GRUMPIG":case 326:m.pokemon_id=326;break;case"SPINDA":case 327:m.pokemon_id=327;break;case"TRAPINCH":case 328:m.pokemon_id=328;break;case"VIBRAVA":case 329:m.pokemon_id=329;break;case"FLYGON":case 330:m.pokemon_id=330;break;case"CACNEA":case 331:m.pokemon_id=331;break;case"CACTURNE":case 332:m.pokemon_id=332;break;case"SWABLU":case 333:m.pokemon_id=333;break;case"ALTARIA":case 334:m.pokemon_id=334;break;case"ZANGOOSE":case 335:m.pokemon_id=335;break;case"SEVIPER":case 336:m.pokemon_id=336;break;case"LUNATONE":case 337:m.pokemon_id=337;break;case"SOLROCK":case 338:m.pokemon_id=338;break;case"BARBOACH":case 339:m.pokemon_id=339;break;case"WHISCASH":case 340:m.pokemon_id=340;break;case"CORPHISH":case 341:m.pokemon_id=341;break;case"CRAWDAUNT":case 342:m.pokemon_id=342;break;case"BALTOY":case 343:m.pokemon_id=343;break;case"CLAYDOL":case 344:m.pokemon_id=344;break;case"LILEEP":case 345:m.pokemon_id=345;break;case"CRADILY":case 346:m.pokemon_id=346;break;case"ANORITH":case 347:m.pokemon_id=347;break;case"ARMALDO":case 348:m.pokemon_id=348;break;case"FEEBAS":case 349:m.pokemon_id=349;break;case"MILOTIC":case 350:m.pokemon_id=350;break;case"CASTFORM":case 351:m.pokemon_id=351;break;case"KECLEON":case 352:m.pokemon_id=352;break;case"SHUPPET":case 353:m.pokemon_id=353;break;case"BANETTE":case 354:m.pokemon_id=354;break;case"DUSKULL":case 355:m.pokemon_id=355;break;case"DUSCLOPS":case 356:m.pokemon_id=356;break;case"TROPIUS":case 357:m.pokemon_id=357;break;case"CHIMECHO":case 358:m.pokemon_id=358;break;case"ABSOL":case 359:m.pokemon_id=359;break;case"WYNAUT":case 360:m.pokemon_id=360;break;case"SNORUNT":case 361:m.pokemon_id=361;break;case"GLALIE":case 362:m.pokemon_id=362;break;case"SPHEAL":case 363:m.pokemon_id=363;break;case"SEALEO":case 364:m.pokemon_id=364;break;case"WALREIN":case 365:m.pokemon_id=365;break;case"CLAMPERL":case 366:m.pokemon_id=366;break;case"HUNTAIL":case 367:m.pokemon_id=367;break;case"GOREBYSS":case 368:m.pokemon_id=368;break;case"RELICANTH":case 369:m.pokemon_id=369;break;case"LUVDISC":case 370:m.pokemon_id=370;break;case"BAGON":case 371:m.pokemon_id=371;break;case"SHELGON":case 372:m.pokemon_id=372;break;case"SALAMENCE":case 373:m.pokemon_id=373;break;case"BELDUM":case 374:m.pokemon_id=374;break;case"METANG":case 375:m.pokemon_id=375;break;case"METAGROSS":case 376:m.pokemon_id=376;break;case"REGIROCK":case 377:m.pokemon_id=377;break;case"REGICE":case 378:m.pokemon_id=378;break;case"REGISTEEL":case 379:m.pokemon_id=379;break;case"LATIAS":case 380:m.pokemon_id=380;break;case"LATIOS":case 381:m.pokemon_id=381;break;case"KYOGRE":case 382:m.pokemon_id=382;break;case"GROUDON":case 383:m.pokemon_id=383;break;case"RAYQUAZA":case 384:m.pokemon_id=384;break;case"JIRACHI":case 385:m.pokemon_id=385;break;case"DEOXYS":case 386:m.pokemon_id=386;break;case"TURTWIG":case 387:m.pokemon_id=387;break;case"GROTLE":case 388:m.pokemon_id=388;break;case"TORTERRA":case 389:m.pokemon_id=389;break;case"CHIMCHAR":case 390:m.pokemon_id=390;break;case"MONFERNO":case 391:m.pokemon_id=391;break;case"INFERNAPE":case 392:m.pokemon_id=392;break;case"PIPLUP":case 393:m.pokemon_id=393;break;case"PRINPLUP":case 394:m.pokemon_id=394;break;case"EMPOLEON":case 395:m.pokemon_id=395;break;case"STARLY":case 396:m.pokemon_id=396;break;case"STARAVIA":case 397:m.pokemon_id=397;break;case"STARAPTOR":case 398:m.pokemon_id=398;break;case"BIDOOF":case 399:m.pokemon_id=399;break;case"BIBAREL":case 400:m.pokemon_id=400;break;case"KRICKETOT":case 401:m.pokemon_id=401;break;case"KRICKETUNE":case 402:m.pokemon_id=402;break;case"SHINX":case 403:m.pokemon_id=403;break;case"LUXIO":case 404:m.pokemon_id=404;break;case"LUXRAY":case 405:m.pokemon_id=405;break;case"BUDEW":case 406:m.pokemon_id=406;break;case"ROSERADE":case 407:m.pokemon_id=407;break;case"CRANIDOS":case 408:m.pokemon_id=408;break;case"RAMPARDOS":case 409:m.pokemon_id=409;break;case"SHIELDON":case 410:m.pokemon_id=410;break;case"BASTIODON":case 411:m.pokemon_id=411;break;case"BURMY":case 412:m.pokemon_id=412;break;case"WORMADAM":case 413:m.pokemon_id=413;break;case"MOTHIM":case 414:m.pokemon_id=414;break;case"COMBEE":case 415:m.pokemon_id=415;break;case"VESPIQUEN":case 416:m.pokemon_id=416;break;case"PACHIRISU":case 417:m.pokemon_id=417;break;case"BUIZEL":case 418:m.pokemon_id=418;break;case"FLOATZEL":case 419:m.pokemon_id=419;break;case"CHERUBI":case 420:m.pokemon_id=420;break;case"CHERRIM":case 421:m.pokemon_id=421;break;case"SHELLOS":case 422:m.pokemon_id=422;break;case"GASTRODON":case 423:m.pokemon_id=423;break;case"AMBIPOM":case 424:m.pokemon_id=424;break;case"DRIFLOON":case 425:m.pokemon_id=425;break;case"DRIFBLIM":case 426:m.pokemon_id=426;break;case"BUNEARY":case 427:m.pokemon_id=427;break;case"LOPUNNY":case 428:m.pokemon_id=428;break;case"MISMAGIUS":case 429:m.pokemon_id=429;break;case"HONCHKROW":case 430:m.pokemon_id=430;break;case"GLAMEOW":case 431:m.pokemon_id=431;break;case"PURUGLY":case 432:m.pokemon_id=432;break;case"CHINGLING":case 433:m.pokemon_id=433;break;case"STUNKY":case 434:m.pokemon_id=434;break;case"SKUNTANK":case 435:m.pokemon_id=435;break;case"BRONZOR":case 436:m.pokemon_id=436;break;case"BRONZONG":case 437:m.pokemon_id=437;break;case"BONSLY":case 438:m.pokemon_id=438;break;case"MIME_JR":case 439:m.pokemon_id=439;break;case"HAPPINY":case 440:m.pokemon_id=440;break;case"CHATOT":case 441:m.pokemon_id=441;break;case"SPIRITOMB":case 442:m.pokemon_id=442;break;case"GIBLE":case 443:m.pokemon_id=443;break;case"GABITE":case 444:m.pokemon_id=444;break;case"GARCHOMP":case 445:m.pokemon_id=445;break;case"MUNCHLAX":case 446:m.pokemon_id=446;break;case"RIOLU":case 447:m.pokemon_id=447;break;case"LUCARIO":case 448:m.pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.pokemon_id=449;break;case"HIPPOWDON":case 450:m.pokemon_id=450;break;case"SKORUPI":case 451:m.pokemon_id=451;break;case"DRAPION":case 452:m.pokemon_id=452;break;case"CROAGUNK":case 453:m.pokemon_id=453;break;case"TOXICROAK":case 454:m.pokemon_id=454;break;case"CARNIVINE":case 455:m.pokemon_id=455;break;case"FINNEON":case 456:m.pokemon_id=456;break;case"LUMINEON":case 457:m.pokemon_id=457;break;case"MANTYKE":case 458:m.pokemon_id=458;break;case"SNOVER":case 459:m.pokemon_id=459;break;case"ABOMASNOW":case 460:m.pokemon_id=460;break;case"WEAVILE":case 461:m.pokemon_id=461;break;case"MAGNEZONE":case 462:m.pokemon_id=462;break;case"LICKILICKY":case 463:m.pokemon_id=463;break;case"RHYPERIOR":case 464:m.pokemon_id=464;break;case"TANGROWTH":case 465:m.pokemon_id=465;break;case"ELECTIVIRE":case 466:m.pokemon_id=466;break;case"MAGMORTAR":case 467:m.pokemon_id=467;break;case"TOGEKISS":case 468:m.pokemon_id=468;break;case"YANMEGA":case 469:m.pokemon_id=469;break;case"LEAFEON":case 470:m.pokemon_id=470;break;case"GLACEON":case 471:m.pokemon_id=471;break;case"GLISCOR":case 472:m.pokemon_id=472;break;case"MAMOSWINE":case 473:m.pokemon_id=473;break;case"PORYGON_Z":case 474:m.pokemon_id=474;break;case"GALLADE":case 475:m.pokemon_id=475;break;case"PROBOPASS":case 476:m.pokemon_id=476;break;case"DUSKNOIR":case 477:m.pokemon_id=477;break;case"FROSLASS":case 478:m.pokemon_id=478;break;case"ROTOM":case 479:m.pokemon_id=479;break;case"UXIE":case 480:m.pokemon_id=480;break;case"MESPRIT":case 481:m.pokemon_id=481;break;case"AZELF":case 482:m.pokemon_id=482;break;case"DIALGA":case 483:m.pokemon_id=483;break;case"PALKIA":case 484:m.pokemon_id=484;break;case"HEATRAN":case 485:m.pokemon_id=485;break;case"REGIGIGAS":case 486:m.pokemon_id=486;break;case"GIRATINA":case 487:m.pokemon_id=487;break;case"CRESSELIA":case 488:m.pokemon_id=488;break;case"PHIONE":case 489:m.pokemon_id=489;break;case"MANAPHY":case 490:m.pokemon_id=490;break;case"DARKRAI":case 491:m.pokemon_id=491;break;case"SHAYMIN":case 492:m.pokemon_id=492;break;case"ARCEUS":case 493:m.pokemon_id=493;break;case"MELTAN":case 808:m.pokemon_id=808;break;case"MELMETAL":case 809:m.pokemon_id=809;break}if(d.weight!=null){m.weight=Number(d.weight)}return m};IncensedPokemon.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon_id=o.enums===String?"MISSINGNO":0;d.weight=0}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){d.pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_id]:m.pokemon_id}if(m.weight!=null&&m.hasOwnProperty("weight")){d.weight=o.json&&!isFinite(m.weight)?String(m.weight):m.weight}return d};IncensedPokemon.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return IncensedPokemon}();return IncenseAttributes}();Item.InventoryUpgradeAttributes=function(){function InventoryUpgradeAttributes(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}InventoryUpgradeAttributes.prototype.additional_storage=0;InventoryUpgradeAttributes.prototype.upgrade_type=0;InventoryUpgradeAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.additional_storage!=null&&m.hasOwnProperty("additional_storage"))w.uint32(8).int32(m.additional_storage);if(m.upgrade_type!=null&&m.hasOwnProperty("upgrade_type"))w.uint32(16).int32(m.upgrade_type);return w};InventoryUpgradeAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Item.InventoryUpgradeAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.additional_storage=r.int32();break;case 2:m.upgrade_type=r.int32();break;default:r.skipType(t&7);break}}return m};InventoryUpgradeAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Item.InventoryUpgradeAttributes)return d;var m=new $root.POGOProtos.Settings.Master.Item.InventoryUpgradeAttributes;if(d.additional_storage!=null){m.additional_storage=d.additional_storage|0}switch(d.upgrade_type){case"UPGRADE_UNSET":case 0:m.upgrade_type=0;break;case"INCREASE_ITEM_STORAGE":case 1:m.upgrade_type=1;break;case"INCREASE_POKEMON_STORAGE":case 2:m.upgrade_type=2;break}return m};InventoryUpgradeAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.additional_storage=0;d.upgrade_type=o.enums===String?"UPGRADE_UNSET":0}if(m.additional_storage!=null&&m.hasOwnProperty("additional_storage")){d.additional_storage=m.additional_storage}if(m.upgrade_type!=null&&m.hasOwnProperty("upgrade_type")){d.upgrade_type=o.enums===String?$root.POGOProtos.Inventory.InventoryUpgradeType[m.upgrade_type]:m.upgrade_type}return d};InventoryUpgradeAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return InventoryUpgradeAttributes}();Item.PokeballAttributes=function(){function PokeballAttributes(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokeballAttributes.prototype.item_effect=0;PokeballAttributes.prototype.capture_multi=0;PokeballAttributes.prototype.capture_multi_effect=0;PokeballAttributes.prototype.item_effect_mod=0;PokeballAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_effect!=null&&m.hasOwnProperty("item_effect"))w.uint32(8).int32(m.item_effect);if(m.capture_multi!=null&&m.hasOwnProperty("capture_multi"))w.uint32(21).float(m.capture_multi);if(m.capture_multi_effect!=null&&m.hasOwnProperty("capture_multi_effect"))w.uint32(29).float(m.capture_multi_effect);if(m.item_effect_mod!=null&&m.hasOwnProperty("item_effect_mod"))w.uint32(37).float(m.item_effect_mod);return w};PokeballAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Item.PokeballAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_effect=r.int32();break;case 2:m.capture_multi=r.float();break;case 3:m.capture_multi_effect=r.float();break;case 4:m.item_effect_mod=r.float();break;default:r.skipType(t&7);break}}return m};PokeballAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Item.PokeballAttributes)return d;var m=new $root.POGOProtos.Settings.Master.Item.PokeballAttributes;switch(d.item_effect){case"ITEM_EFFECT_NONE":case 0:m.item_effect=0;break;case"ITEM_EFFECT_CAP_NO_FLEE":case 1e3:m.item_effect=1e3;break;case"ITEM_EFFECT_CAP_NO_MOVEMENT":case 1002:m.item_effect=1002;break;case"ITEM_EFFECT_CAP_NO_THREAT":case 1003:m.item_effect=1003;break;case"ITEM_EFFECT_CAP_TARGET_MAX":case 1004:m.item_effect=1004;break;case"ITEM_EFFECT_CAP_TARGET_SLOW":case 1005:m.item_effect=1005;break;case"ITEM_EFFECT_CAP_CHANCE_NIGHT":case 1006:m.item_effect=1006;break;case"ITEM_EFFECT_CAP_CHANCE_TRAINER":case 1007:m.item_effect=1007;break;case"ITEM_EFFECT_CAP_CHANCE_FIRST_THROW":case 1008:m.item_effect=1008;break;case"ITEM_EFFECT_CAP_CHANCE_LEGEND":case 1009:m.item_effect=1009;break;case"ITEM_EFFECT_CAP_CHANCE_HEAVY":case 1010:m.item_effect=1010;break;case"ITEM_EFFECT_CAP_CHANCE_REPEAT":case 1011:m.item_effect=1011;break;case"ITEM_EFFECT_CAP_CHANCE_MULTI_THROW":case 1012:m.item_effect=1012;break;case"ITEM_EFFECT_CAP_CHANCE_ALWAYS":case 1013:m.item_effect=1013;break;case"ITEM_EFFECT_CAP_CHANCE_SINGLE_THROW":case 1014:m.item_effect=1014;break;case"ITEM_EFFECT_CANDY_AWARD":case 1015:m.item_effect=1015;break;case"ITEM_EFFECT_FULL_MOTIVATION":case 1016:m.item_effect=1016;break}if(d.capture_multi!=null){m.capture_multi=Number(d.capture_multi)}if(d.capture_multi_effect!=null){m.capture_multi_effect=Number(d.capture_multi_effect)}if(d.item_effect_mod!=null){m.item_effect_mod=Number(d.item_effect_mod)}return m};PokeballAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_effect=o.enums===String?"ITEM_EFFECT_NONE":0;d.capture_multi=0;d.capture_multi_effect=0;d.item_effect_mod=0}if(m.item_effect!=null&&m.hasOwnProperty("item_effect")){d.item_effect=o.enums===String?$root.POGOProtos.Enums.ItemEffect[m.item_effect]:m.item_effect}if(m.capture_multi!=null&&m.hasOwnProperty("capture_multi")){d.capture_multi=o.json&&!isFinite(m.capture_multi)?String(m.capture_multi):m.capture_multi}if(m.capture_multi_effect!=null&&m.hasOwnProperty("capture_multi_effect")){d.capture_multi_effect=o.json&&!isFinite(m.capture_multi_effect)?String(m.capture_multi_effect):m.capture_multi_effect}if(m.item_effect_mod!=null&&m.hasOwnProperty("item_effect_mod")){d.item_effect_mod=o.json&&!isFinite(m.item_effect_mod)?String(m.item_effect_mod):m.item_effect_mod}return d};PokeballAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokeballAttributes}();Item.PotionAttributes=function(){function PotionAttributes(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PotionAttributes.prototype.sta_percent=0;PotionAttributes.prototype.sta_amount=0;PotionAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.sta_percent!=null&&m.hasOwnProperty("sta_percent"))w.uint32(13).float(m.sta_percent);if(m.sta_amount!=null&&m.hasOwnProperty("sta_amount"))w.uint32(16).int32(m.sta_amount);return w};PotionAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Item.PotionAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.sta_percent=r.float();break;case 2:m.sta_amount=r.int32();break;default:r.skipType(t&7);break}}return m};PotionAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Item.PotionAttributes)return d;var m=new $root.POGOProtos.Settings.Master.Item.PotionAttributes;if(d.sta_percent!=null){m.sta_percent=Number(d.sta_percent)}if(d.sta_amount!=null){m.sta_amount=d.sta_amount|0}return m};PotionAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.sta_percent=0;d.sta_amount=0}if(m.sta_percent!=null&&m.hasOwnProperty("sta_percent")){d.sta_percent=o.json&&!isFinite(m.sta_percent)?String(m.sta_percent):m.sta_percent}if(m.sta_amount!=null&&m.hasOwnProperty("sta_amount")){d.sta_amount=m.sta_amount}return d};PotionAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PotionAttributes}();Item.ReviveAttributes=function(){function ReviveAttributes(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ReviveAttributes.prototype.sta_percent=0;ReviveAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.sta_percent!=null&&m.hasOwnProperty("sta_percent"))w.uint32(13).float(m.sta_percent);return w};ReviveAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Item.ReviveAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.sta_percent=r.float();break;default:r.skipType(t&7);break}}return m};ReviveAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Item.ReviveAttributes)return d;var m=new $root.POGOProtos.Settings.Master.Item.ReviveAttributes;if(d.sta_percent!=null){m.sta_percent=Number(d.sta_percent)}return m};ReviveAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.sta_percent=0}if(m.sta_percent!=null&&m.hasOwnProperty("sta_percent")){d.sta_percent=o.json&&!isFinite(m.sta_percent)?String(m.sta_percent):m.sta_percent}return d};ReviveAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ReviveAttributes}();Item.StardustBoostAttributes=function(){function StardustBoostAttributes(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}StardustBoostAttributes.prototype.stardust_multiplier=0;StardustBoostAttributes.prototype.boost_duration_ms=0;StardustBoostAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.stardust_multiplier!=null&&m.hasOwnProperty("stardust_multiplier"))w.uint32(13).float(m.stardust_multiplier);if(m.boost_duration_ms!=null&&m.hasOwnProperty("boost_duration_ms"))w.uint32(16).int32(m.boost_duration_ms);return w};StardustBoostAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Item.StardustBoostAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.stardust_multiplier=r.float();break;case 2:m.boost_duration_ms=r.int32();break;default:r.skipType(t&7);break}}return m};StardustBoostAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Item.StardustBoostAttributes)return d;var m=new $root.POGOProtos.Settings.Master.Item.StardustBoostAttributes;if(d.stardust_multiplier!=null){m.stardust_multiplier=Number(d.stardust_multiplier)}if(d.boost_duration_ms!=null){m.boost_duration_ms=d.boost_duration_ms|0}return m};StardustBoostAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.stardust_multiplier=0;d.boost_duration_ms=0}if(m.stardust_multiplier!=null&&m.hasOwnProperty("stardust_multiplier")){d.stardust_multiplier=o.json&&!isFinite(m.stardust_multiplier)?String(m.stardust_multiplier):m.stardust_multiplier}if(m.boost_duration_ms!=null&&m.hasOwnProperty("boost_duration_ms")){d.boost_duration_ms=m.boost_duration_ms}return d};StardustBoostAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return StardustBoostAttributes}();return Item}();Master.ItemSettings=function(){function ItemSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ItemSettings.prototype.item_id=0;ItemSettings.prototype.item_type=0;ItemSettings.prototype.category=0;ItemSettings.prototype.drop_freq=0;ItemSettings.prototype.drop_trainer_level=0;ItemSettings.prototype.pokeball=null;ItemSettings.prototype.potion=null;ItemSettings.prototype.revive=null;ItemSettings.prototype.battle=null;ItemSettings.prototype.food=null;ItemSettings.prototype.inventory_upgrade=null;ItemSettings.prototype.xp_boost=null;ItemSettings.prototype.incense=null;ItemSettings.prototype.egg_incubator=null;ItemSettings.prototype.fort_modifier=null;ItemSettings.prototype.stardust_boost=null;ItemSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.item_id!=null&&m.hasOwnProperty("item_id"))w.uint32(8).int32(m.item_id);if(m.item_type!=null&&m.hasOwnProperty("item_type"))w.uint32(16).int32(m.item_type);if(m.category!=null&&m.hasOwnProperty("category"))w.uint32(24).int32(m.category);if(m.drop_freq!=null&&m.hasOwnProperty("drop_freq"))w.uint32(37).float(m.drop_freq);if(m.drop_trainer_level!=null&&m.hasOwnProperty("drop_trainer_level"))w.uint32(40).int32(m.drop_trainer_level);if(m.pokeball!=null&&m.hasOwnProperty("pokeball"))$root.POGOProtos.Settings.Master.Item.PokeballAttributes.encode(m.pokeball,w.uint32(50).fork()).ldelim();if(m.potion!=null&&m.hasOwnProperty("potion"))$root.POGOProtos.Settings.Master.Item.PotionAttributes.encode(m.potion,w.uint32(58).fork()).ldelim();if(m.revive!=null&&m.hasOwnProperty("revive"))$root.POGOProtos.Settings.Master.Item.ReviveAttributes.encode(m.revive,w.uint32(66).fork()).ldelim();if(m.battle!=null&&m.hasOwnProperty("battle"))$root.POGOProtos.Settings.Master.Item.BattleAttributes.encode(m.battle,w.uint32(74).fork()).ldelim();if(m.food!=null&&m.hasOwnProperty("food"))$root.POGOProtos.Settings.Master.Item.FoodAttributes.encode(m.food,w.uint32(82).fork()).ldelim();if(m.inventory_upgrade!=null&&m.hasOwnProperty("inventory_upgrade"))$root.POGOProtos.Settings.Master.Item.InventoryUpgradeAttributes.encode(m.inventory_upgrade,w.uint32(90).fork()).ldelim();if(m.xp_boost!=null&&m.hasOwnProperty("xp_boost"))$root.POGOProtos.Settings.Master.Item.ExperienceBoostAttributes.encode(m.xp_boost,w.uint32(98).fork()).ldelim();if(m.incense!=null&&m.hasOwnProperty("incense"))$root.POGOProtos.Settings.Master.Item.IncenseAttributes.encode(m.incense,w.uint32(106).fork()).ldelim();if(m.egg_incubator!=null&&m.hasOwnProperty("egg_incubator"))$root.POGOProtos.Settings.Master.Item.EggIncubatorAttributes.encode(m.egg_incubator,w.uint32(114).fork()).ldelim();if(m.fort_modifier!=null&&m.hasOwnProperty("fort_modifier"))$root.POGOProtos.Settings.Master.Item.FortModifierAttributes.encode(m.fort_modifier,w.uint32(122).fork()).ldelim();if(m.stardust_boost!=null&&m.hasOwnProperty("stardust_boost"))$root.POGOProtos.Settings.Master.Item.StardustBoostAttributes.encode(m.stardust_boost,w.uint32(130).fork()).ldelim();return w};ItemSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.ItemSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.item_id=r.int32();break;case 2:m.item_type=r.int32();break;case 3:m.category=r.int32();break;case 4:m.drop_freq=r.float();break;case 5:m.drop_trainer_level=r.int32();break;case 6:m.pokeball=$root.POGOProtos.Settings.Master.Item.PokeballAttributes.decode(r,r.uint32());break;case 7:m.potion=$root.POGOProtos.Settings.Master.Item.PotionAttributes.decode(r,r.uint32());break;case 8:m.revive=$root.POGOProtos.Settings.Master.Item.ReviveAttributes.decode(r,r.uint32());break;case 9:m.battle=$root.POGOProtos.Settings.Master.Item.BattleAttributes.decode(r,r.uint32());break;case 10:m.food=$root.POGOProtos.Settings.Master.Item.FoodAttributes.decode(r,r.uint32());break;case 11:m.inventory_upgrade=$root.POGOProtos.Settings.Master.Item.InventoryUpgradeAttributes.decode(r,r.uint32());break;case 12:m.xp_boost=$root.POGOProtos.Settings.Master.Item.ExperienceBoostAttributes.decode(r,r.uint32());break;case 13:m.incense=$root.POGOProtos.Settings.Master.Item.IncenseAttributes.decode(r,r.uint32());break;case 14:m.egg_incubator=$root.POGOProtos.Settings.Master.Item.EggIncubatorAttributes.decode(r,r.uint32());break;case 15:m.fort_modifier=$root.POGOProtos.Settings.Master.Item.FortModifierAttributes.decode(r,r.uint32());break;case 16:m.stardust_boost=$root.POGOProtos.Settings.Master.Item.StardustBoostAttributes.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};ItemSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.ItemSettings)return d;var m=new $root.POGOProtos.Settings.Master.ItemSettings;switch(d.item_id){case"ITEM_UNKNOWN":case 0:m.item_id=0;break;case"ITEM_POKE_BALL":case 1:m.item_id=1;break;case"ITEM_GREAT_BALL":case 2:m.item_id=2;break;case"ITEM_ULTRA_BALL":case 3:m.item_id=3;break;case"ITEM_MASTER_BALL":case 4:m.item_id=4;break;case"ITEM_PREMIER_BALL":case 5:m.item_id=5;break;case"ITEM_POTION":case 101:m.item_id=101;break;case"ITEM_SUPER_POTION":case 102:m.item_id=102;break;case"ITEM_HYPER_POTION":case 103:m.item_id=103;break;case"ITEM_MAX_POTION":case 104:m.item_id=104;break;case"ITEM_REVIVE":case 201:m.item_id=201;break;case"ITEM_MAX_REVIVE":case 202:m.item_id=202;break;case"ITEM_LUCKY_EGG":case 301:m.item_id=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.item_id=401;break;case"ITEM_INCENSE_SPICY":case 402:m.item_id=402;break;case"ITEM_INCENSE_COOL":case 403:m.item_id=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.item_id=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.item_id=405;break;case"ITEM_TROY_DISK":case 501:m.item_id=501;break;case"ITEM_X_ATTACK":case 602:m.item_id=602;break;case"ITEM_X_DEFENSE":case 603:m.item_id=603;break;case"ITEM_X_MIRACLE":case 604:m.item_id=604;break;case"ITEM_RAZZ_BERRY":case 701:m.item_id=701;break;case"ITEM_BLUK_BERRY":case 702:m.item_id=702;break;case"ITEM_NANAB_BERRY":case 703:m.item_id=703;break;case"ITEM_WEPAR_BERRY":case 704:m.item_id=704;break;case"ITEM_PINAP_BERRY":case 705:m.item_id=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.item_id=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.item_id=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.item_id=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.item_id=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.item_id=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.item_id=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.item_id=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.item_id=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.item_id=1002;break;case"ITEM_SUN_STONE":case 1101:m.item_id=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.item_id=1102;break;case"ITEM_METAL_COAT":case 1103:m.item_id=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.item_id=1104;break;case"ITEM_UP_GRADE":case 1105:m.item_id=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.item_id=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.item_id=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.item_id=1202;break;case"ITEM_RARE_CANDY":case 1301:m.item_id=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.item_id=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.item_id=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.item_id=1403;break;case"ITEM_STAR_PIECE":case 1404:m.item_id=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.item_id=1405;break}switch(d.item_type){case"ITEM_TYPE_NONE":case 0:m.item_type=0;break;case"ITEM_TYPE_POKEBALL":case 1:m.item_type=1;break;case"ITEM_TYPE_POTION":case 2:m.item_type=2;break;case"ITEM_TYPE_REVIVE":case 3:m.item_type=3;break;case"ITEM_TYPE_MAP":case 4:m.item_type=4;break;case"ITEM_TYPE_BATTLE":case 5:m.item_type=5;break;case"ITEM_TYPE_FOOD":case 6:m.item_type=6;break;case"ITEM_TYPE_CAMERA":case 7:m.item_type=7;break;case"ITEM_TYPE_DISK":case 8:m.item_type=8;break;case"ITEM_TYPE_INCUBATOR":case 9:m.item_type=9;break;case"ITEM_TYPE_INCENSE":case 10:m.item_type=10;break;case"ITEM_TYPE_XP_BOOST":case 11:m.item_type=11;break;case"ITEM_TYPE_INVENTORY_UPGRADE":case 12:m.item_type=12;break;case"ITEM_TYPE_EVOLUTION_REQUIREMENT":case 13:m.item_type=13;break;case"ITEM_TYPE_MOVE_REROLL":case 14:m.item_type=14;break;case"ITEM_TYPE_CANDY":case 15:m.item_type=15;break;case"ITEM_TYPE_RAID_TICKET":case 16:m.item_type=16;break;case"ITEM_TYPE_STARDUST_BOOST":case 17:m.item_type=17;break;case"ITEM_TYPE_FRIEND_GIFT_BOX":case 18:m.item_type=18;break}switch(d.category){case"ITEM_CATEGORY_NONE":case 0:m.category=0;break;case"ITEM_CATEGORY_POKEBALL":case 1:m.category=1;break;case"ITEM_CATEGORY_FOOD":case 2:m.category=2;break;case"ITEM_CATEGORY_MEDICINE":case 3:m.category=3;break;case"ITEM_CATEGORY_BOOST":case 4:m.category=4;break;case"ITEM_CATEGORY_UTILITES":case 5:m.category=5;break;case"ITEM_CATEGORY_CAMERA":case 6:m.category=6;break;case"ITEM_CATEGORY_DISK":case 7:m.category=7;break;case"ITEM_CATEGORY_INCUBATOR":case 8:m.category=8;break;case"ITEM_CATEGORY_INCENSE":case 9:m.category=9;break;case"ITEM_CATEGORY_XP_BOOST":case 10:m.category=10;break;case"ITEM_CATEGORY_INVENTORY_UPGRADE":case 11:m.category=11;break;case"ITEM_CATEGORY_EVOLUTION_REQUIREMENT":case 12:m.category=12;break;case"ITEM_CATEGORY_MOVE_REROLL":case 13:m.category=13;break;case"ITEM_CATEGORY_CANDY":case 14:m.category=14;break;case"ITEM_CATEGORY_RAID_TICKET":case 15:m.category=15;break;case"ITEM_CATEGORY_STARDUST_BOOST":case 16:m.category=16;break;case"ITEM_CATEGORY_FRIEND_GIFT_BOX":case 17:m.category=17;break}if(d.drop_freq!=null){m.drop_freq=Number(d.drop_freq)}if(d.drop_trainer_level!=null){m.drop_trainer_level=d.drop_trainer_level|0}if(d.pokeball!=null){if(typeof d.pokeball!=="object")throw TypeError(".POGOProtos.Settings.Master.ItemSettings.pokeball: object expected");m.pokeball=$root.POGOProtos.Settings.Master.Item.PokeballAttributes.fromObject(d.pokeball)}if(d.potion!=null){if(typeof d.potion!=="object")throw TypeError(".POGOProtos.Settings.Master.ItemSettings.potion: object expected");m.potion=$root.POGOProtos.Settings.Master.Item.PotionAttributes.fromObject(d.potion)}if(d.revive!=null){if(typeof d.revive!=="object")throw TypeError(".POGOProtos.Settings.Master.ItemSettings.revive: object expected");m.revive=$root.POGOProtos.Settings.Master.Item.ReviveAttributes.fromObject(d.revive)}if(d.battle!=null){if(typeof d.battle!=="object")throw TypeError(".POGOProtos.Settings.Master.ItemSettings.battle: object expected");m.battle=$root.POGOProtos.Settings.Master.Item.BattleAttributes.fromObject(d.battle)}if(d.food!=null){if(typeof d.food!=="object")throw TypeError(".POGOProtos.Settings.Master.ItemSettings.food: object expected");m.food=$root.POGOProtos.Settings.Master.Item.FoodAttributes.fromObject(d.food)}if(d.inventory_upgrade!=null){if(typeof d.inventory_upgrade!=="object")throw TypeError(".POGOProtos.Settings.Master.ItemSettings.inventory_upgrade: object expected");m.inventory_upgrade=$root.POGOProtos.Settings.Master.Item.InventoryUpgradeAttributes.fromObject(d.inventory_upgrade)}if(d.xp_boost!=null){if(typeof d.xp_boost!=="object")throw TypeError(".POGOProtos.Settings.Master.ItemSettings.xp_boost: object expected");m.xp_boost=$root.POGOProtos.Settings.Master.Item.ExperienceBoostAttributes.fromObject(d.xp_boost)}if(d.incense!=null){if(typeof d.incense!=="object")throw TypeError(".POGOProtos.Settings.Master.ItemSettings.incense: object expected");m.incense=$root.POGOProtos.Settings.Master.Item.IncenseAttributes.fromObject(d.incense)}if(d.egg_incubator!=null){if(typeof d.egg_incubator!=="object")throw TypeError(".POGOProtos.Settings.Master.ItemSettings.egg_incubator: object expected");m.egg_incubator=$root.POGOProtos.Settings.Master.Item.EggIncubatorAttributes.fromObject(d.egg_incubator)}if(d.fort_modifier!=null){if(typeof d.fort_modifier!=="object")throw TypeError(".POGOProtos.Settings.Master.ItemSettings.fort_modifier: object expected");m.fort_modifier=$root.POGOProtos.Settings.Master.Item.FortModifierAttributes.fromObject(d.fort_modifier)}if(d.stardust_boost!=null){if(typeof d.stardust_boost!=="object")throw TypeError(".POGOProtos.Settings.Master.ItemSettings.stardust_boost: object expected");m.stardust_boost=$root.POGOProtos.Settings.Master.Item.StardustBoostAttributes.fromObject(d.stardust_boost)}return m};ItemSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.item_id=o.enums===String?"ITEM_UNKNOWN":0;d.item_type=o.enums===String?"ITEM_TYPE_NONE":0;d.category=o.enums===String?"ITEM_CATEGORY_NONE":0;d.drop_freq=0;d.drop_trainer_level=0;d.pokeball=null;d.potion=null;d.revive=null;d.battle=null;d.food=null;d.inventory_upgrade=null;d.xp_boost=null;d.incense=null;d.egg_incubator=null;d.fort_modifier=null;d.stardust_boost=null}if(m.item_id!=null&&m.hasOwnProperty("item_id")){d.item_id=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.item_id]:m.item_id}if(m.item_type!=null&&m.hasOwnProperty("item_type")){d.item_type=o.enums===String?$root.POGOProtos.Inventory.Item.ItemType[m.item_type]:m.item_type}if(m.category!=null&&m.hasOwnProperty("category")){d.category=o.enums===String?$root.POGOProtos.Enums.ItemCategory[m.category]:m.category}if(m.drop_freq!=null&&m.hasOwnProperty("drop_freq")){d.drop_freq=o.json&&!isFinite(m.drop_freq)?String(m.drop_freq):m.drop_freq}if(m.drop_trainer_level!=null&&m.hasOwnProperty("drop_trainer_level")){d.drop_trainer_level=m.drop_trainer_level}if(m.pokeball!=null&&m.hasOwnProperty("pokeball")){d.pokeball=$root.POGOProtos.Settings.Master.Item.PokeballAttributes.toObject(m.pokeball,o)}if(m.potion!=null&&m.hasOwnProperty("potion")){d.potion=$root.POGOProtos.Settings.Master.Item.PotionAttributes.toObject(m.potion,o)}if(m.revive!=null&&m.hasOwnProperty("revive")){d.revive=$root.POGOProtos.Settings.Master.Item.ReviveAttributes.toObject(m.revive,o)}if(m.battle!=null&&m.hasOwnProperty("battle")){d.battle=$root.POGOProtos.Settings.Master.Item.BattleAttributes.toObject(m.battle,o)}if(m.food!=null&&m.hasOwnProperty("food")){d.food=$root.POGOProtos.Settings.Master.Item.FoodAttributes.toObject(m.food,o)}if(m.inventory_upgrade!=null&&m.hasOwnProperty("inventory_upgrade")){d.inventory_upgrade=$root.POGOProtos.Settings.Master.Item.InventoryUpgradeAttributes.toObject(m.inventory_upgrade,o)}if(m.xp_boost!=null&&m.hasOwnProperty("xp_boost")){d.xp_boost=$root.POGOProtos.Settings.Master.Item.ExperienceBoostAttributes.toObject(m.xp_boost,o)}if(m.incense!=null&&m.hasOwnProperty("incense")){d.incense=$root.POGOProtos.Settings.Master.Item.IncenseAttributes.toObject(m.incense,o)}if(m.egg_incubator!=null&&m.hasOwnProperty("egg_incubator")){d.egg_incubator=$root.POGOProtos.Settings.Master.Item.EggIncubatorAttributes.toObject(m.egg_incubator,o)}if(m.fort_modifier!=null&&m.hasOwnProperty("fort_modifier")){d.fort_modifier=$root.POGOProtos.Settings.Master.Item.FortModifierAttributes.toObject(m.fort_modifier,o)}if(m.stardust_boost!=null&&m.hasOwnProperty("stardust_boost")){d.stardust_boost=$root.POGOProtos.Settings.Master.Item.StardustBoostAttributes.toObject(m.stardust_boost,o)}return d};ItemSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ItemSettings}();Master.LuckyPokemonSettings=function(){function LuckyPokemonSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}LuckyPokemonSettings.prototype.power_up_stardust_discount_percent=0;LuckyPokemonSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.power_up_stardust_discount_percent!=null&&m.hasOwnProperty("power_up_stardust_discount_percent"))w.uint32(13).float(m.power_up_stardust_discount_percent);return w};LuckyPokemonSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.LuckyPokemonSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.power_up_stardust_discount_percent=r.float();break;default:r.skipType(t&7);break}}return m};LuckyPokemonSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.LuckyPokemonSettings)return d;var m=new $root.POGOProtos.Settings.Master.LuckyPokemonSettings;if(d.power_up_stardust_discount_percent!=null){m.power_up_stardust_discount_percent=Number(d.power_up_stardust_discount_percent)}return m};LuckyPokemonSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.power_up_stardust_discount_percent=0}if(m.power_up_stardust_discount_percent!=null&&m.hasOwnProperty("power_up_stardust_discount_percent")){d.power_up_stardust_discount_percent=o.json&&!isFinite(m.power_up_stardust_discount_percent)?String(m.power_up_stardust_discount_percent):m.power_up_stardust_discount_percent}return d};LuckyPokemonSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return LuckyPokemonSettings}();Master.MoveSequenceSettings=function(){function MoveSequenceSettings(p){this.sequence=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}MoveSequenceSettings.prototype.sequence=$util.emptyArray;MoveSequenceSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.sequence!=null&&m.sequence.length){for(var i=0;i<m.sequence.length;++i)w.uint32(10).string(m.sequence[i])}return w};MoveSequenceSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.MoveSequenceSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.sequence&&m.sequence.length))m.sequence=[];m.sequence.push(r.string());break;default:r.skipType(t&7);break}}return m};MoveSequenceSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.MoveSequenceSettings)return d;var m=new $root.POGOProtos.Settings.Master.MoveSequenceSettings;if(d.sequence){if(!Array.isArray(d.sequence))throw TypeError(".POGOProtos.Settings.Master.MoveSequenceSettings.sequence: array expected");m.sequence=[];for(var i=0;i<d.sequence.length;++i){m.sequence[i]=String(d.sequence[i])}}return m};MoveSequenceSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.sequence=[]}if(m.sequence&&m.sequence.length){d.sequence=[];for(var j=0;j<m.sequence.length;++j){d.sequence[j]=m.sequence[j]}}return d};MoveSequenceSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return MoveSequenceSettings}();Master.MoveSettings=function(){function MoveSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}MoveSettings.prototype.movement_id=0;MoveSettings.prototype.animation_id=0;MoveSettings.prototype.pokemon_type=0;MoveSettings.prototype.power=0;MoveSettings.prototype.accuracy_chance=0;MoveSettings.prototype.critical_chance=0;MoveSettings.prototype.heal_scalar=0;MoveSettings.prototype.stamina_loss_scalar=0;MoveSettings.prototype.trainer_level_min=0;MoveSettings.prototype.trainer_level_max=0;MoveSettings.prototype.vfx_name="";MoveSettings.prototype.duration_ms=0;MoveSettings.prototype.damage_window_start_ms=0;MoveSettings.prototype.damage_window_end_ms=0;MoveSettings.prototype.energy_delta=0;MoveSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.movement_id!=null&&m.hasOwnProperty("movement_id"))w.uint32(8).int32(m.movement_id);if(m.animation_id!=null&&m.hasOwnProperty("animation_id"))w.uint32(16).int32(m.animation_id);if(m.pokemon_type!=null&&m.hasOwnProperty("pokemon_type"))w.uint32(24).int32(m.pokemon_type);if(m.power!=null&&m.hasOwnProperty("power"))w.uint32(37).float(m.power);if(m.accuracy_chance!=null&&m.hasOwnProperty("accuracy_chance"))w.uint32(45).float(m.accuracy_chance);if(m.critical_chance!=null&&m.hasOwnProperty("critical_chance"))w.uint32(53).float(m.critical_chance);if(m.heal_scalar!=null&&m.hasOwnProperty("heal_scalar"))w.uint32(61).float(m.heal_scalar);if(m.stamina_loss_scalar!=null&&m.hasOwnProperty("stamina_loss_scalar"))w.uint32(69).float(m.stamina_loss_scalar);if(m.trainer_level_min!=null&&m.hasOwnProperty("trainer_level_min"))w.uint32(72).int32(m.trainer_level_min);if(m.trainer_level_max!=null&&m.hasOwnProperty("trainer_level_max"))w.uint32(80).int32(m.trainer_level_max);if(m.vfx_name!=null&&m.hasOwnProperty("vfx_name"))w.uint32(90).string(m.vfx_name);if(m.duration_ms!=null&&m.hasOwnProperty("duration_ms"))w.uint32(96).int32(m.duration_ms);if(m.damage_window_start_ms!=null&&m.hasOwnProperty("damage_window_start_ms"))w.uint32(104).int32(m.damage_window_start_ms);if(m.damage_window_end_ms!=null&&m.hasOwnProperty("damage_window_end_ms"))w.uint32(112).int32(m.damage_window_end_ms);if(m.energy_delta!=null&&m.hasOwnProperty("energy_delta"))w.uint32(120).int32(m.energy_delta);return w};MoveSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.MoveSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.movement_id=r.int32();break;case 2:m.animation_id=r.int32();break;case 3:m.pokemon_type=r.int32();break;case 4:m.power=r.float();break;case 5:m.accuracy_chance=r.float();break;case 6:m.critical_chance=r.float();break;case 7:m.heal_scalar=r.float();break;case 8:m.stamina_loss_scalar=r.float();break;case 9:m.trainer_level_min=r.int32();break;case 10:m.trainer_level_max=r.int32();break;case 11:m.vfx_name=r.string();break;case 12:m.duration_ms=r.int32();break;case 13:m.damage_window_start_ms=r.int32();break;case 14:m.damage_window_end_ms=r.int32();break;case 15:m.energy_delta=r.int32();break;default:r.skipType(t&7);break}}return m};MoveSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.MoveSettings)return d;var m=new $root.POGOProtos.Settings.Master.MoveSettings;switch(d.movement_id){case"MOVE_UNSET":case 0:m.movement_id=0;break;case"THUNDER_SHOCK":case 1:m.movement_id=1;break;case"QUICK_ATTACK":case 2:m.movement_id=2;break;case"SCRATCH":case 3:m.movement_id=3;break;case"EMBER":case 4:m.movement_id=4;break;case"VINE_WHIP":case 5:m.movement_id=5;break;case"TACKLE":case 6:m.movement_id=6;break;case"RAZOR_LEAF":case 7:m.movement_id=7;break;case"TAKE_DOWN":case 8:m.movement_id=8;break;case"WATER_GUN":case 9:m.movement_id=9;break;case"BITE":case 10:m.movement_id=10;break;case"POUND":case 11:m.movement_id=11;break;case"DOUBLE_SLAP":case 12:m.movement_id=12;break;case"WRAP":case 13:m.movement_id=13;break;case"HYPER_BEAM":case 14:m.movement_id=14;break;case"LICK":case 15:m.movement_id=15;break;case"DARK_PULSE":case 16:m.movement_id=16;break;case"SMOG":case 17:m.movement_id=17;break;case"SLUDGE":case 18:m.movement_id=18;break;case"METAL_CLAW":case 19:m.movement_id=19;break;case"VICE_GRIP":case 20:m.movement_id=20;break;case"FLAME_WHEEL":case 21:m.movement_id=21;break;case"MEGAHORN":case 22:m.movement_id=22;break;case"WING_ATTACK":case 23:m.movement_id=23;break;case"FLAMETHROWER":case 24:m.movement_id=24;break;case"SUCKER_PUNCH":case 25:m.movement_id=25;break;case"DIG":case 26:m.movement_id=26;break;case"LOW_KICK":case 27:m.movement_id=27;break;case"CROSS_CHOP":case 28:m.movement_id=28;break;case"PSYCHO_CUT":case 29:m.movement_id=29;break;case"PSYBEAM":case 30:m.movement_id=30;break;case"EARTHQUAKE":case 31:m.movement_id=31;break;case"STONE_EDGE":case 32:m.movement_id=32;break;case"ICE_PUNCH":case 33:m.movement_id=33;break;case"HEART_STAMP":case 34:m.movement_id=34;break;case"DISCHARGE":case 35:m.movement_id=35;break;case"FLASH_CANNON":case 36:m.movement_id=36;break;case"PECK":case 37:m.movement_id=37;break;case"DRILL_PECK":case 38:m.movement_id=38;break;case"ICE_BEAM":case 39:m.movement_id=39;break;case"BLIZZARD":case 40:m.movement_id=40;break;case"AIR_SLASH":case 41:m.movement_id=41;break;case"HEAT_WAVE":case 42:m.movement_id=42;break;case"TWINEEDLE":case 43:m.movement_id=43;break;case"POISON_JAB":case 44:m.movement_id=44;break;case"AERIAL_ACE":case 45:m.movement_id=45;break;case"DRILL_RUN":case 46:m.movement_id=46;break;case"PETAL_BLIZZARD":case 47:m.movement_id=47;break;case"MEGA_DRAIN":case 48:m.movement_id=48;break;case"BUG_BUZZ":case 49:m.movement_id=49;break;case"POISON_FANG":case 50:m.movement_id=50;break;case"NIGHT_SLASH":case 51:m.movement_id=51;break;case"SLASH":case 52:m.movement_id=52;break;case"BUBBLE_BEAM":case 53:m.movement_id=53;break;case"SUBMISSION":case 54:m.movement_id=54;break;case"KARATE_CHOP":case 55:m.movement_id=55;break;case"LOW_SWEEP":case 56:m.movement_id=56;break;case"AQUA_JET":case 57:m.movement_id=57;break;case"AQUA_TAIL":case 58:m.movement_id=58;break;case"SEED_BOMB":case 59:m.movement_id=59;break;case"PSYSHOCK":case 60:m.movement_id=60;break;case"ROCK_THROW":case 61:m.movement_id=61;break;case"ANCIENT_POWER":case 62:m.movement_id=62;break;case"ROCK_TOMB":case 63:m.movement_id=63;break;case"ROCK_SLIDE":case 64:m.movement_id=64;break;case"POWER_GEM":case 65:m.movement_id=65;break;case"SHADOW_SNEAK":case 66:m.movement_id=66;break;case"SHADOW_PUNCH":case 67:m.movement_id=67;break;case"SHADOW_CLAW":case 68:m.movement_id=68;break;case"OMINOUS_WIND":case 69:m.movement_id=69;break;case"SHADOW_BALL":case 70:m.movement_id=70;break;case"BULLET_PUNCH":case 71:m.movement_id=71;break;case"MAGNET_BOMB":case 72:m.movement_id=72;break;case"STEEL_WING":case 73:m.movement_id=73;break;case"IRON_HEAD":case 74:m.movement_id=74;break;case"PARABOLIC_CHARGE":case 75:m.movement_id=75;break;case"SPARK":case 76:m.movement_id=76;break;case"THUNDER_PUNCH":case 77:m.movement_id=77;break;case"THUNDER":case 78:m.movement_id=78;break;case"THUNDERBOLT":case 79:m.movement_id=79;break;case"TWISTER":case 80:m.movement_id=80;break;case"DRAGON_BREATH":case 81:m.movement_id=81;break;case"DRAGON_PULSE":case 82:m.movement_id=82;break;case"DRAGON_CLAW":case 83:m.movement_id=83;break;case"DISARMING_VOICE":case 84:m.movement_id=84;break;case"DRAINING_KISS":case 85:m.movement_id=85;break;case"DAZZLING_GLEAM":case 86:m.movement_id=86;break;case"MOONBLAST":case 87:m.movement_id=87;break;case"PLAY_ROUGH":case 88:m.movement_id=88;break;case"CROSS_POISON":case 89:m.movement_id=89;break;case"SLUDGE_BOMB":case 90:m.movement_id=90;break;case"SLUDGE_WAVE":case 91:m.movement_id=91;break;case"GUNK_SHOT":case 92:m.movement_id=92;break;case"MUD_SHOT":case 93:m.movement_id=93;break;case"BONE_CLUB":case 94:m.movement_id=94;break;case"BULLDOZE":case 95:m.movement_id=95;break;case"MUD_BOMB":case 96:m.movement_id=96;break;case"FURY_CUTTER":case 97:m.movement_id=97;break;case"BUG_BITE":case 98:m.movement_id=98;break;case"SIGNAL_BEAM":case 99:m.movement_id=99;break;case"X_SCISSOR":case 100:m.movement_id=100;break;case"FLAME_CHARGE":case 101:m.movement_id=101;break;case"FLAME_BURST":case 102:m.movement_id=102;break;case"FIRE_BLAST":case 103:m.movement_id=103;break;case"BRINE":case 104:m.movement_id=104;break;case"WATER_PULSE":case 105:m.movement_id=105;break;case"SCALD":case 106:m.movement_id=106;break;case"HYDRO_PUMP":case 107:m.movement_id=107;break;case"PSYCHIC":case 108:m.movement_id=108;break;case"PSYSTRIKE":case 109:m.movement_id=109;break;case"ICE_SHARD":case 110:m.movement_id=110;break;case"ICY_WIND":case 111:m.movement_id=111;break;case"FROST_BREATH":case 112:m.movement_id=112;break;case"ABSORB":case 113:m.movement_id=113;break;case"GIGA_DRAIN":case 114:m.movement_id=114;break;case"FIRE_PUNCH":case 115:m.movement_id=115;break;case"SOLAR_BEAM":case 116:m.movement_id=116;break;case"LEAF_BLADE":case 117:m.movement_id=117;break;case"POWER_WHIP":case 118:m.movement_id=118;break;case"SPLASH":case 119:m.movement_id=119;break;case"ACID":case 120:m.movement_id=120;break;case"AIR_CUTTER":case 121:m.movement_id=121;break;case"HURRICANE":case 122:m.movement_id=122;break;case"BRICK_BREAK":case 123:m.movement_id=123;break;case"CUT":case 124:m.movement_id=124;break;case"SWIFT":case 125:m.movement_id=125;break;case"HORN_ATTACK":case 126:m.movement_id=126;break;case"STOMP":case 127:m.movement_id=127;break;case"HEADBUTT":case 128:m.movement_id=128;break;case"HYPER_FANG":case 129:m.movement_id=129;break;case"SLAM":case 130:m.movement_id=130;break;case"BODY_SLAM":case 131:m.movement_id=131;break;case"REST":case 132:m.movement_id=132;break;case"STRUGGLE":case 133:m.movement_id=133;break;case"SCALD_BLASTOISE":case 134:m.movement_id=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.movement_id=135;break;case"WRAP_GREEN":case 136:m.movement_id=136;break;case"WRAP_PINK":case 137:m.movement_id=137;break;case"FURY_CUTTER_FAST":case 200:m.movement_id=200;break;case"BUG_BITE_FAST":case 201:m.movement_id=201;break;case"BITE_FAST":case 202:m.movement_id=202;break;case"SUCKER_PUNCH_FAST":case 203:m.movement_id=203;break;case"DRAGON_BREATH_FAST":case 204:m.movement_id=204;break;case"THUNDER_SHOCK_FAST":case 205:m.movement_id=205;break;case"SPARK_FAST":case 206:m.movement_id=206;break;case"LOW_KICK_FAST":case 207:m.movement_id=207;break;case"KARATE_CHOP_FAST":case 208:m.movement_id=208;break;case"EMBER_FAST":case 209:m.movement_id=209;break;case"WING_ATTACK_FAST":case 210:m.movement_id=210;break;case"PECK_FAST":case 211:m.movement_id=211;break;case"LICK_FAST":case 212:m.movement_id=212;break;case"SHADOW_CLAW_FAST":case 213:m.movement_id=213;break;case"VINE_WHIP_FAST":case 214:m.movement_id=214;break;case"RAZOR_LEAF_FAST":case 215:m.movement_id=215;break;case"MUD_SHOT_FAST":case 216:m.movement_id=216;break;case"ICE_SHARD_FAST":case 217:m.movement_id=217;break;case"FROST_BREATH_FAST":case 218:m.movement_id=218;break;case"QUICK_ATTACK_FAST":case 219:m.movement_id=219;break;case"SCRATCH_FAST":case 220:m.movement_id=220;break;case"TACKLE_FAST":case 221:m.movement_id=221;break;case"POUND_FAST":case 222:m.movement_id=222;break;case"CUT_FAST":case 223:m.movement_id=223;break;case"POISON_JAB_FAST":case 224:m.movement_id=224;break;case"ACID_FAST":case 225:m.movement_id=225;break;case"PSYCHO_CUT_FAST":case 226:m.movement_id=226;break;case"ROCK_THROW_FAST":case 227:m.movement_id=227;break;case"METAL_CLAW_FAST":case 228:m.movement_id=228;break;case"BULLET_PUNCH_FAST":case 229:m.movement_id=229;break;case"WATER_GUN_FAST":case 230:m.movement_id=230;break;case"SPLASH_FAST":case 231:m.movement_id=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.movement_id=232;break;case"MUD_SLAP_FAST":case 233:m.movement_id=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.movement_id=234;break;case"CONFUSION_FAST":case 235:m.movement_id=235;break;case"POISON_STING_FAST":case 236:m.movement_id=236;break;case"BUBBLE_FAST":case 237:m.movement_id=237;break;case"FEINT_ATTACK_FAST":case 238:m.movement_id=238;break;case"STEEL_WING_FAST":case 239:m.movement_id=239;break;case"FIRE_FANG_FAST":case 240:m.movement_id=240;break;case"ROCK_SMASH_FAST":case 241:m.movement_id=241;break;case"TRANSFORM_FAST":case 242:m.movement_id=242;break;case"COUNTER_FAST":case 243:m.movement_id=243;break;case"POWDER_SNOW_FAST":case 244:m.movement_id=244;break;case"CLOSE_COMBAT":case 245:m.movement_id=245;break;case"DYNAMIC_PUNCH":case 246:m.movement_id=246;break;case"FOCUS_BLAST":case 247:m.movement_id=247;break;case"AURORA_BEAM":case 248:m.movement_id=248;break;case"CHARGE_BEAM_FAST":case 249:m.movement_id=249;break;case"VOLT_SWITCH_FAST":case 250:m.movement_id=250;break;case"WILD_CHARGE":case 251:m.movement_id=251;break;case"ZAP_CANNON":case 252:m.movement_id=252;break;case"DRAGON_TAIL_FAST":case 253:m.movement_id=253;break;case"AVALANCHE":case 254:m.movement_id=254;break;case"AIR_SLASH_FAST":case 255:m.movement_id=255;break;case"BRAVE_BIRD":case 256:m.movement_id=256;break;case"SKY_ATTACK":case 257:m.movement_id=257;break;case"SAND_TOMB":case 258:m.movement_id=258;break;case"ROCK_BLAST":case 259:m.movement_id=259;break;case"INFESTATION_FAST":case 260:m.movement_id=260;break;case"STRUGGLE_BUG_FAST":case 261:m.movement_id=261;break;case"SILVER_WIND":case 262:m.movement_id=262;break;case"ASTONISH_FAST":case 263:m.movement_id=263;break;case"HEX_FAST":case 264:m.movement_id=264;break;case"NIGHT_SHADE":case 265:m.movement_id=265;break;case"IRON_TAIL_FAST":case 266:m.movement_id=266;break;case"GYRO_BALL":case 267:m.movement_id=267;break;case"HEAVY_SLAM":case 268:m.movement_id=268;break;case"FIRE_SPIN_FAST":case 269:m.movement_id=269;break;case"OVERHEAT":case 270:m.movement_id=270;break;case"BULLET_SEED_FAST":case 271:m.movement_id=271;break;case"GRASS_KNOT":case 272:m.movement_id=272;break;case"ENERGY_BALL":case 273:m.movement_id=273;break;case"EXTRASENSORY_FAST":case 274:m.movement_id=274;break;case"FUTURESIGHT":case 275:m.movement_id=275;break;case"MIRROR_COAT":case 276:m.movement_id=276;break;case"OUTRAGE":case 277:m.movement_id=277;break;case"SNARL_FAST":case 278:m.movement_id=278;break;case"CRUNCH":case 279:m.movement_id=279;break;case"FOUL_PLAY":case 280:m.movement_id=280;break;case"HIDDEN_POWER_FAST":case 281:m.movement_id=281;break;case"TAKE_DOWN_FAST":case 282:m.movement_id=282;break;case"WATERFALL_FAST":case 283:m.movement_id=283;break;case"SURF":case 284:m.movement_id=284;break;case"DRACO_METEOR":case 285:m.movement_id=285;break;case"DOOM_DESIRE":case 286:m.movement_id=286;break;case"YAWN_FAST":case 287:m.movement_id=287;break;case"PSYCHO_BOOST":case 288:m.movement_id=288;break;case"ORIGIN_PULSE":case 289:m.movement_id=289;break;case"PRECIPICE_BLADES":case 290:m.movement_id=290;break;case"PRESENT_FAST":case 291:m.movement_id=291;break;case"WEATHER_BALL_FIRE":case 292:m.movement_id=292;break;case"WEATHER_BALL_ICE":case 293:m.movement_id=293;break;case"WEATHER_BALL_ROCK":case 294:m.movement_id=294;break;case"WEATHER_BALL_WATER":case 295:m.movement_id=295;break;case"FRENZY_PLANT":case 296:m.movement_id=296;break;case"SMACK_DOWN_FAST":case 297:m.movement_id=297;break;case"BLAST_BURN":case 298:m.movement_id=298;break;case"HYDRO_CANNON":case 299:m.movement_id=299;break;case"LAST_RESORT":case 300:m.movement_id=300;break;case"METEOR_MASH":case 301:m.movement_id=301;break;case"SKULL_BASH":case 302:m.movement_id=302;break;case"ACID_SPRAY":case 303:m.movement_id=303;break;case"EARTH_POWER":case 304:m.movement_id=304;break;case"CRABHAMMER":case 305:m.movement_id=305;break;case"LUNGE":case 306:m.movement_id=306;break;case"CRUSH_CLAW":case 307:m.movement_id=307;break;case"OCTAZOOKA":case 308:m.movement_id=308;break;case"MIRROR_SHOT":case 309:m.movement_id=309;break;case"SUPER_POWER":case 310:m.movement_id=310;break;case"FELL_STINGER":case 311:m.movement_id=311;break;case"LEAF_TORNADO":case 312:m.movement_id=312;break;case"LEECH_LIFE":case 313:m.movement_id=313;break;case"DRAIN_PUNCH":case 314:m.movement_id=314;break;case"SHADOW_BONE":case 315:m.movement_id=315;break;case"MUDDY_WATER":case 316:m.movement_id=316;break;case"BLAZE_KICK":case 317:m.movement_id=317;break;case"RAZOR_SHELL":case 318:m.movement_id=318;break;case"POWER_UP_PUNCH":case 319:m.movement_id=319;break}if(d.animation_id!=null){m.animation_id=d.animation_id|0}switch(d.pokemon_type){case"POKEMON_TYPE_NONE":case 0:m.pokemon_type=0;break;case"POKEMON_TYPE_NORMAL":case 1:m.pokemon_type=1;break;case"POKEMON_TYPE_FIGHTING":case 2:m.pokemon_type=2;break;case"POKEMON_TYPE_FLYING":case 3:m.pokemon_type=3;break;case"POKEMON_TYPE_POISON":case 4:m.pokemon_type=4;break;case"POKEMON_TYPE_GROUND":case 5:m.pokemon_type=5;break;case"POKEMON_TYPE_ROCK":case 6:m.pokemon_type=6;break;case"POKEMON_TYPE_BUG":case 7:m.pokemon_type=7;break;case"POKEMON_TYPE_GHOST":case 8:m.pokemon_type=8;break;case"POKEMON_TYPE_STEEL":case 9:m.pokemon_type=9;break;case"POKEMON_TYPE_FIRE":case 10:m.pokemon_type=10;break;case"POKEMON_TYPE_WATER":case 11:m.pokemon_type=11;break;case"POKEMON_TYPE_GRASS":case 12:m.pokemon_type=12;break;case"POKEMON_TYPE_ELECTRIC":case 13:m.pokemon_type=13;break;case"POKEMON_TYPE_PSYCHIC":case 14:m.pokemon_type=14;break;case"POKEMON_TYPE_ICE":case 15:m.pokemon_type=15;break;case"POKEMON_TYPE_DRAGON":case 16:m.pokemon_type=16;break;case"POKEMON_TYPE_DARK":case 17:m.pokemon_type=17;break;case"POKEMON_TYPE_FAIRY":case 18:m.pokemon_type=18;break}if(d.power!=null){m.power=Number(d.power)}if(d.accuracy_chance!=null){m.accuracy_chance=Number(d.accuracy_chance)}if(d.critical_chance!=null){m.critical_chance=Number(d.critical_chance)}if(d.heal_scalar!=null){m.heal_scalar=Number(d.heal_scalar)}if(d.stamina_loss_scalar!=null){m.stamina_loss_scalar=Number(d.stamina_loss_scalar)}if(d.trainer_level_min!=null){m.trainer_level_min=d.trainer_level_min|0}if(d.trainer_level_max!=null){m.trainer_level_max=d.trainer_level_max|0}if(d.vfx_name!=null){m.vfx_name=String(d.vfx_name)}if(d.duration_ms!=null){m.duration_ms=d.duration_ms|0}if(d.damage_window_start_ms!=null){m.damage_window_start_ms=d.damage_window_start_ms|0}if(d.damage_window_end_ms!=null){m.damage_window_end_ms=d.damage_window_end_ms|0}if(d.energy_delta!=null){m.energy_delta=d.energy_delta|0}return m};MoveSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.movement_id=o.enums===String?"MOVE_UNSET":0;d.animation_id=0;d.pokemon_type=o.enums===String?"POKEMON_TYPE_NONE":0;d.power=0;d.accuracy_chance=0;d.critical_chance=0;d.heal_scalar=0;d.stamina_loss_scalar=0;d.trainer_level_min=0;d.trainer_level_max=0;d.vfx_name="";d.duration_ms=0;d.damage_window_start_ms=0;d.damage_window_end_ms=0;d.energy_delta=0}if(m.movement_id!=null&&m.hasOwnProperty("movement_id")){d.movement_id=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.movement_id]:m.movement_id}if(m.animation_id!=null&&m.hasOwnProperty("animation_id")){d.animation_id=m.animation_id}if(m.pokemon_type!=null&&m.hasOwnProperty("pokemon_type")){d.pokemon_type=o.enums===String?$root.POGOProtos.Enums.PokemonType[m.pokemon_type]:m.pokemon_type}if(m.power!=null&&m.hasOwnProperty("power")){d.power=o.json&&!isFinite(m.power)?String(m.power):m.power}if(m.accuracy_chance!=null&&m.hasOwnProperty("accuracy_chance")){d.accuracy_chance=o.json&&!isFinite(m.accuracy_chance)?String(m.accuracy_chance):m.accuracy_chance}if(m.critical_chance!=null&&m.hasOwnProperty("critical_chance")){d.critical_chance=o.json&&!isFinite(m.critical_chance)?String(m.critical_chance):m.critical_chance}if(m.heal_scalar!=null&&m.hasOwnProperty("heal_scalar")){d.heal_scalar=o.json&&!isFinite(m.heal_scalar)?String(m.heal_scalar):m.heal_scalar}if(m.stamina_loss_scalar!=null&&m.hasOwnProperty("stamina_loss_scalar")){d.stamina_loss_scalar=o.json&&!isFinite(m.stamina_loss_scalar)?String(m.stamina_loss_scalar):m.stamina_loss_scalar}if(m.trainer_level_min!=null&&m.hasOwnProperty("trainer_level_min")){d.trainer_level_min=m.trainer_level_min}if(m.trainer_level_max!=null&&m.hasOwnProperty("trainer_level_max")){d.trainer_level_max=m.trainer_level_max}if(m.vfx_name!=null&&m.hasOwnProperty("vfx_name")){d.vfx_name=m.vfx_name}if(m.duration_ms!=null&&m.hasOwnProperty("duration_ms")){d.duration_ms=m.duration_ms}if(m.damage_window_start_ms!=null&&m.hasOwnProperty("damage_window_start_ms")){d.damage_window_start_ms=m.damage_window_start_ms}if(m.damage_window_end_ms!=null&&m.hasOwnProperty("damage_window_end_ms")){d.damage_window_end_ms=m.damage_window_end_ms}if(m.energy_delta!=null&&m.hasOwnProperty("energy_delta")){d.energy_delta=m.energy_delta}return d};MoveSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return MoveSettings}();Master.OnboardingSettings=function(){function OnboardingSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OnboardingSettings.prototype.skip_avatar_customization=false;OnboardingSettings.prototype.disable_initial_ar_prompt=false;OnboardingSettings.prototype.ar_prompt_player_level=0;OnboardingSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.skip_avatar_customization!=null&&m.hasOwnProperty("skip_avatar_customization"))w.uint32(8).bool(m.skip_avatar_customization);if(m.disable_initial_ar_prompt!=null&&m.hasOwnProperty("disable_initial_ar_prompt"))w.uint32(16).bool(m.disable_initial_ar_prompt);if(m.ar_prompt_player_level!=null&&m.hasOwnProperty("ar_prompt_player_level"))w.uint32(24).uint32(m.ar_prompt_player_level);return w};OnboardingSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.OnboardingSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.skip_avatar_customization=r.bool();break;case 2:m.disable_initial_ar_prompt=r.bool();break;case 3:m.ar_prompt_player_level=r.uint32();break;default:r.skipType(t&7);break}}return m};OnboardingSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.OnboardingSettings)return d;var m=new $root.POGOProtos.Settings.Master.OnboardingSettings;if(d.skip_avatar_customization!=null){m.skip_avatar_customization=Boolean(d.skip_avatar_customization)}if(d.disable_initial_ar_prompt!=null){m.disable_initial_ar_prompt=Boolean(d.disable_initial_ar_prompt)}if(d.ar_prompt_player_level!=null){m.ar_prompt_player_level=d.ar_prompt_player_level>>>0}return m};OnboardingSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.skip_avatar_customization=false;d.disable_initial_ar_prompt=false;d.ar_prompt_player_level=0}if(m.skip_avatar_customization!=null&&m.hasOwnProperty("skip_avatar_customization")){d.skip_avatar_customization=m.skip_avatar_customization}if(m.disable_initial_ar_prompt!=null&&m.hasOwnProperty("disable_initial_ar_prompt")){d.disable_initial_ar_prompt=m.disable_initial_ar_prompt}if(m.ar_prompt_player_level!=null&&m.hasOwnProperty("ar_prompt_player_level")){d.ar_prompt_player_level=m.ar_prompt_player_level}return d};OnboardingSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return OnboardingSettings}();Master.OnboardingV2Settings=function(){function OnboardingV2Settings(p){this.pokedex_id=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}OnboardingV2Settings.prototype.enable_onboarding_v2=false;OnboardingV2Settings.prototype.pokedex_id=$util.emptyArray;OnboardingV2Settings.prototype.onboarding_egg_pokemon=0;OnboardingV2Settings.prototype.egg_km_until_hatch=0;OnboardingV2Settings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.enable_onboarding_v2!=null&&m.hasOwnProperty("enable_onboarding_v2"))w.uint32(8).bool(m.enable_onboarding_v2);if(m.pokedex_id!=null&&m.pokedex_id.length){w.uint32(18).fork();for(var i=0;i<m.pokedex_id.length;++i)w.int32(m.pokedex_id[i]);w.ldelim()}if(m.onboarding_egg_pokemon!=null&&m.hasOwnProperty("onboarding_egg_pokemon"))w.uint32(24).int32(m.onboarding_egg_pokemon);if(m.egg_km_until_hatch!=null&&m.hasOwnProperty("egg_km_until_hatch"))w.uint32(32).int32(m.egg_km_until_hatch);return w};OnboardingV2Settings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.OnboardingV2Settings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.enable_onboarding_v2=r.bool();break;case 2:if(!(m.pokedex_id&&m.pokedex_id.length))m.pokedex_id=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.pokedex_id.push(r.int32())}else m.pokedex_id.push(r.int32());break;case 3:m.onboarding_egg_pokemon=r.int32();break;case 4:m.egg_km_until_hatch=r.int32();break;default:r.skipType(t&7);break}}return m};OnboardingV2Settings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.OnboardingV2Settings)return d;var m=new $root.POGOProtos.Settings.Master.OnboardingV2Settings;if(d.enable_onboarding_v2!=null){m.enable_onboarding_v2=Boolean(d.enable_onboarding_v2)}if(d.pokedex_id){if(!Array.isArray(d.pokedex_id))throw TypeError(".POGOProtos.Settings.Master.OnboardingV2Settings.pokedex_id: array expected");m.pokedex_id=[];for(var i=0;i<d.pokedex_id.length;++i){switch(d.pokedex_id[i]){default:case"MISSINGNO":case 0:m.pokedex_id[i]=0;break;case"BULBASAUR":case 1:m.pokedex_id[i]=1;break;case"IVYSAUR":case 2:m.pokedex_id[i]=2;break;case"VENUSAUR":case 3:m.pokedex_id[i]=3;break;case"CHARMANDER":case 4:m.pokedex_id[i]=4;break;case"CHARMELEON":case 5:m.pokedex_id[i]=5;break;case"CHARIZARD":case 6:m.pokedex_id[i]=6;break;case"SQUIRTLE":case 7:m.pokedex_id[i]=7;break;case"WARTORTLE":case 8:m.pokedex_id[i]=8;break;case"BLASTOISE":case 9:m.pokedex_id[i]=9;break;case"CATERPIE":case 10:m.pokedex_id[i]=10;break;case"METAPOD":case 11:m.pokedex_id[i]=11;break;case"BUTTERFREE":case 12:m.pokedex_id[i]=12;break;case"WEEDLE":case 13:m.pokedex_id[i]=13;break;case"KAKUNA":case 14:m.pokedex_id[i]=14;break;case"BEEDRILL":case 15:m.pokedex_id[i]=15;break;case"PIDGEY":case 16:m.pokedex_id[i]=16;break;case"PIDGEOTTO":case 17:m.pokedex_id[i]=17;break;case"PIDGEOT":case 18:m.pokedex_id[i]=18;break;case"RATTATA":case 19:m.pokedex_id[i]=19;break;case"RATICATE":case 20:m.pokedex_id[i]=20;break;case"SPEAROW":case 21:m.pokedex_id[i]=21;break;case"FEAROW":case 22:m.pokedex_id[i]=22;break;case"EKANS":case 23:m.pokedex_id[i]=23;break;case"ARBOK":case 24:m.pokedex_id[i]=24;break;case"PIKACHU":case 25:m.pokedex_id[i]=25;break;case"RAICHU":case 26:m.pokedex_id[i]=26;break;case"SANDSHREW":case 27:m.pokedex_id[i]=27;break;case"SANDSLASH":case 28:m.pokedex_id[i]=28;break;case"NIDORAN_FEMALE":case 29:m.pokedex_id[i]=29;break;case"NIDORINA":case 30:m.pokedex_id[i]=30;break;case"NIDOQUEEN":case 31:m.pokedex_id[i]=31;break;case"NIDORAN_MALE":case 32:m.pokedex_id[i]=32;break;case"NIDORINO":case 33:m.pokedex_id[i]=33;break;case"NIDOKING":case 34:m.pokedex_id[i]=34;break;case"CLEFAIRY":case 35:m.pokedex_id[i]=35;break;case"CLEFABLE":case 36:m.pokedex_id[i]=36;break;case"VULPIX":case 37:m.pokedex_id[i]=37;break;case"NINETALES":case 38:m.pokedex_id[i]=38;break;case"JIGGLYPUFF":case 39:m.pokedex_id[i]=39;break;case"WIGGLYTUFF":case 40:m.pokedex_id[i]=40;break;case"ZUBAT":case 41:m.pokedex_id[i]=41;break;case"GOLBAT":case 42:m.pokedex_id[i]=42;break;case"ODDISH":case 43:m.pokedex_id[i]=43;break;case"GLOOM":case 44:m.pokedex_id[i]=44;break;case"VILEPLUME":case 45:m.pokedex_id[i]=45;break;case"PARAS":case 46:m.pokedex_id[i]=46;break;case"PARASECT":case 47:m.pokedex_id[i]=47;break;case"VENONAT":case 48:m.pokedex_id[i]=48;break;case"VENOMOTH":case 49:m.pokedex_id[i]=49;break;case"DIGLETT":case 50:m.pokedex_id[i]=50;break;case"DUGTRIO":case 51:m.pokedex_id[i]=51;break;case"MEOWTH":case 52:m.pokedex_id[i]=52;break;case"PERSIAN":case 53:m.pokedex_id[i]=53;break;case"PSYDUCK":case 54:m.pokedex_id[i]=54;break;case"GOLDUCK":case 55:m.pokedex_id[i]=55;break;case"MANKEY":case 56:m.pokedex_id[i]=56;break;case"PRIMEAPE":case 57:m.pokedex_id[i]=57;break;case"GROWLITHE":case 58:m.pokedex_id[i]=58;break;case"ARCANINE":case 59:m.pokedex_id[i]=59;break;case"POLIWAG":case 60:m.pokedex_id[i]=60;break;case"POLIWHIRL":case 61:m.pokedex_id[i]=61;break;case"POLIWRATH":case 62:m.pokedex_id[i]=62;break;case"ABRA":case 63:m.pokedex_id[i]=63;break;case"KADABRA":case 64:m.pokedex_id[i]=64;break;case"ALAKAZAM":case 65:m.pokedex_id[i]=65;break;case"MACHOP":case 66:m.pokedex_id[i]=66;break;case"MACHOKE":case 67:m.pokedex_id[i]=67;break;case"MACHAMP":case 68:m.pokedex_id[i]=68;break;case"BELLSPROUT":case 69:m.pokedex_id[i]=69;break;case"WEEPINBELL":case 70:m.pokedex_id[i]=70;break;case"VICTREEBEL":case 71:m.pokedex_id[i]=71;break;case"TENTACOOL":case 72:m.pokedex_id[i]=72;break;case"TENTACRUEL":case 73:m.pokedex_id[i]=73;break;case"GEODUDE":case 74:m.pokedex_id[i]=74;break;case"GRAVELER":case 75:m.pokedex_id[i]=75;break;case"GOLEM":case 76:m.pokedex_id[i]=76;break;case"PONYTA":case 77:m.pokedex_id[i]=77;break;case"RAPIDASH":case 78:m.pokedex_id[i]=78;break;case"SLOWPOKE":case 79:m.pokedex_id[i]=79;break;case"SLOWBRO":case 80:m.pokedex_id[i]=80;break;case"MAGNEMITE":case 81:m.pokedex_id[i]=81;break;case"MAGNETON":case 82:m.pokedex_id[i]=82;break;case"FARFETCHD":case 83:m.pokedex_id[i]=83;break;case"DODUO":case 84:m.pokedex_id[i]=84;break;case"DODRIO":case 85:m.pokedex_id[i]=85;break;case"SEEL":case 86:m.pokedex_id[i]=86;break;case"DEWGONG":case 87:m.pokedex_id[i]=87;break;case"GRIMER":case 88:m.pokedex_id[i]=88;break;case"MUK":case 89:m.pokedex_id[i]=89;break;case"SHELLDER":case 90:m.pokedex_id[i]=90;break;case"CLOYSTER":case 91:m.pokedex_id[i]=91;break;case"GASTLY":case 92:m.pokedex_id[i]=92;break;case"HAUNTER":case 93:m.pokedex_id[i]=93;break;case"GENGAR":case 94:m.pokedex_id[i]=94;break;case"ONIX":case 95:m.pokedex_id[i]=95;break;case"DROWZEE":case 96:m.pokedex_id[i]=96;break;case"HYPNO":case 97:m.pokedex_id[i]=97;break;case"KRABBY":case 98:m.pokedex_id[i]=98;break;case"KINGLER":case 99:m.pokedex_id[i]=99;break;case"VOLTORB":case 100:m.pokedex_id[i]=100;break;case"ELECTRODE":case 101:m.pokedex_id[i]=101;break;case"EXEGGCUTE":case 102:m.pokedex_id[i]=102;break;case"EXEGGUTOR":case 103:m.pokedex_id[i]=103;break;case"CUBONE":case 104:m.pokedex_id[i]=104;break;case"MAROWAK":case 105:m.pokedex_id[i]=105;break;case"HITMONLEE":case 106:m.pokedex_id[i]=106;break;case"HITMONCHAN":case 107:m.pokedex_id[i]=107;break;case"LICKITUNG":case 108:m.pokedex_id[i]=108;break;case"KOFFING":case 109:m.pokedex_id[i]=109;break;case"WEEZING":case 110:m.pokedex_id[i]=110;break;case"RHYHORN":case 111:m.pokedex_id[i]=111;break;case"RHYDON":case 112:m.pokedex_id[i]=112;break;case"CHANSEY":case 113:m.pokedex_id[i]=113;break;case"TANGELA":case 114:m.pokedex_id[i]=114;break;case"KANGASKHAN":case 115:m.pokedex_id[i]=115;break;case"HORSEA":case 116:m.pokedex_id[i]=116;break;case"SEADRA":case 117:m.pokedex_id[i]=117;break;case"GOLDEEN":case 118:m.pokedex_id[i]=118;break;case"SEAKING":case 119:m.pokedex_id[i]=119;break;case"STARYU":case 120:m.pokedex_id[i]=120;break;case"STARMIE":case 121:m.pokedex_id[i]=121;break;case"MR_MIME":case 122:m.pokedex_id[i]=122;break;case"SCYTHER":case 123:m.pokedex_id[i]=123;break;case"JYNX":case 124:m.pokedex_id[i]=124;break;case"ELECTABUZZ":case 125:m.pokedex_id[i]=125;break;case"MAGMAR":case 126:m.pokedex_id[i]=126;break;case"PINSIR":case 127:m.pokedex_id[i]=127;break;case"TAUROS":case 128:m.pokedex_id[i]=128;break;case"MAGIKARP":case 129:m.pokedex_id[i]=129;break;case"GYARADOS":case 130:m.pokedex_id[i]=130;break;case"LAPRAS":case 131:m.pokedex_id[i]=131;break;case"DITTO":case 132:m.pokedex_id[i]=132;break;case"EEVEE":case 133:m.pokedex_id[i]=133;break;case"VAPOREON":case 134:m.pokedex_id[i]=134;break;case"JOLTEON":case 135:m.pokedex_id[i]=135;break;case"FLAREON":case 136:m.pokedex_id[i]=136;break;case"PORYGON":case 137:m.pokedex_id[i]=137;break;case"OMANYTE":case 138:m.pokedex_id[i]=138;break;case"OMASTAR":case 139:m.pokedex_id[i]=139;break;case"KABUTO":case 140:m.pokedex_id[i]=140;break;case"KABUTOPS":case 141:m.pokedex_id[i]=141;break;case"AERODACTYL":case 142:m.pokedex_id[i]=142;break;case"SNORLAX":case 143:m.pokedex_id[i]=143;break;case"ARTICUNO":case 144:m.pokedex_id[i]=144;break;case"ZAPDOS":case 145:m.pokedex_id[i]=145;break;case"MOLTRES":case 146:m.pokedex_id[i]=146;break;case"DRATINI":case 147:m.pokedex_id[i]=147;break;case"DRAGONAIR":case 148:m.pokedex_id[i]=148;break;case"DRAGONITE":case 149:m.pokedex_id[i]=149;break;case"MEWTWO":case 150:m.pokedex_id[i]=150;break;case"MEW":case 151:m.pokedex_id[i]=151;break;case"CHIKORITA":case 152:m.pokedex_id[i]=152;break;case"BAYLEEF":case 153:m.pokedex_id[i]=153;break;case"MEGANIUM":case 154:m.pokedex_id[i]=154;break;case"CYNDAQUIL":case 155:m.pokedex_id[i]=155;break;case"QUILAVA":case 156:m.pokedex_id[i]=156;break;case"TYPHLOSION":case 157:m.pokedex_id[i]=157;break;case"TOTODILE":case 158:m.pokedex_id[i]=158;break;case"CROCONAW":case 159:m.pokedex_id[i]=159;break;case"FERALIGATR":case 160:m.pokedex_id[i]=160;break;case"SENTRET":case 161:m.pokedex_id[i]=161;break;case"FURRET":case 162:m.pokedex_id[i]=162;break;case"HOOTHOOT":case 163:m.pokedex_id[i]=163;break;case"NOCTOWL":case 164:m.pokedex_id[i]=164;break;case"LEDYBA":case 165:m.pokedex_id[i]=165;break;case"LEDIAN":case 166:m.pokedex_id[i]=166;break;case"SPINARAK":case 167:m.pokedex_id[i]=167;break;case"ARIADOS":case 168:m.pokedex_id[i]=168;break;case"CROBAT":case 169:m.pokedex_id[i]=169;break;case"CHINCHOU":case 170:m.pokedex_id[i]=170;break;case"LANTURN":case 171:m.pokedex_id[i]=171;break;case"PICHU":case 172:m.pokedex_id[i]=172;break;case"CLEFFA":case 173:m.pokedex_id[i]=173;break;case"IGGLYBUFF":case 174:m.pokedex_id[i]=174;break;case"TOGEPI":case 175:m.pokedex_id[i]=175;break;case"TOGETIC":case 176:m.pokedex_id[i]=176;break;case"NATU":case 177:m.pokedex_id[i]=177;break;case"XATU":case 178:m.pokedex_id[i]=178;break;case"MAREEP":case 179:m.pokedex_id[i]=179;break;case"FLAAFFY":case 180:m.pokedex_id[i]=180;break;case"AMPHAROS":case 181:m.pokedex_id[i]=181;break;case"BELLOSSOM":case 182:m.pokedex_id[i]=182;break;case"MARILL":case 183:m.pokedex_id[i]=183;break;case"AZUMARILL":case 184:m.pokedex_id[i]=184;break;case"SUDOWOODO":case 185:m.pokedex_id[i]=185;break;case"POLITOED":case 186:m.pokedex_id[i]=186;break;case"HOPPIP":case 187:m.pokedex_id[i]=187;break;case"SKIPLOOM":case 188:m.pokedex_id[i]=188;break;case"JUMPLUFF":case 189:m.pokedex_id[i]=189;break;case"AIPOM":case 190:m.pokedex_id[i]=190;break;case"SUNKERN":case 191:m.pokedex_id[i]=191;break;case"SUNFLORA":case 192:m.pokedex_id[i]=192;break;case"YANMA":case 193:m.pokedex_id[i]=193;break;case"WOOPER":case 194:m.pokedex_id[i]=194;break;case"QUAGSIRE":case 195:m.pokedex_id[i]=195;break;case"ESPEON":case 196:m.pokedex_id[i]=196;break;case"UMBREON":case 197:m.pokedex_id[i]=197;break;case"MURKROW":case 198:m.pokedex_id[i]=198;break;case"SLOWKING":case 199:m.pokedex_id[i]=199;break;case"MISDREAVUS":case 200:m.pokedex_id[i]=200;break;case"UNOWN":case 201:m.pokedex_id[i]=201;break;case"WOBBUFFET":case 202:m.pokedex_id[i]=202;break;case"GIRAFARIG":case 203:m.pokedex_id[i]=203;break;case"PINECO":case 204:m.pokedex_id[i]=204;break;case"FORRETRESS":case 205:m.pokedex_id[i]=205;break;case"DUNSPARCE":case 206:m.pokedex_id[i]=206;break;case"GLIGAR":case 207:m.pokedex_id[i]=207;break;case"STEELIX":case 208:m.pokedex_id[i]=208;break;case"SNUBBULL":case 209:m.pokedex_id[i]=209;break;case"GRANBULL":case 210:m.pokedex_id[i]=210;break;case"QWILFISH":case 211:m.pokedex_id[i]=211;break;case"SCIZOR":case 212:m.pokedex_id[i]=212;break;case"SHUCKLE":case 213:m.pokedex_id[i]=213;break;case"HERACROSS":case 214:m.pokedex_id[i]=214;break;case"SNEASEL":case 215:m.pokedex_id[i]=215;break;case"TEDDIURSA":case 216:m.pokedex_id[i]=216;break;case"URSARING":case 217:m.pokedex_id[i]=217;break;case"SLUGMA":case 218:m.pokedex_id[i]=218;break;case"MAGCARGO":case 219:m.pokedex_id[i]=219;break;case"SWINUB":case 220:m.pokedex_id[i]=220;break;case"PILOSWINE":case 221:m.pokedex_id[i]=221;break;case"CORSOLA":case 222:m.pokedex_id[i]=222;break;case"REMORAID":case 223:m.pokedex_id[i]=223;break;case"OCTILLERY":case 224:m.pokedex_id[i]=224;break;case"DELIBIRD":case 225:m.pokedex_id[i]=225;break;case"MANTINE":case 226:m.pokedex_id[i]=226;break;case"SKARMORY":case 227:m.pokedex_id[i]=227;break;case"HOUNDOUR":case 228:m.pokedex_id[i]=228;break;case"HOUNDOOM":case 229:m.pokedex_id[i]=229;break;case"KINGDRA":case 230:m.pokedex_id[i]=230;break;case"PHANPY":case 231:m.pokedex_id[i]=231;break;case"DONPHAN":case 232:m.pokedex_id[i]=232;break;case"PORYGON2":case 233:m.pokedex_id[i]=233;break;case"STANTLER":case 234:m.pokedex_id[i]=234;break;case"SMEARGLE":case 235:m.pokedex_id[i]=235;break;case"TYROGUE":case 236:m.pokedex_id[i]=236;break;case"HITMONTOP":case 237:m.pokedex_id[i]=237;break;case"SMOOCHUM":case 238:m.pokedex_id[i]=238;break;case"ELEKID":case 239:m.pokedex_id[i]=239;break;case"MAGBY":case 240:m.pokedex_id[i]=240;break;case"MILTANK":case 241:m.pokedex_id[i]=241;break;case"BLISSEY":case 242:m.pokedex_id[i]=242;break;case"RAIKOU":case 243:m.pokedex_id[i]=243;break;case"ENTEI":case 244:m.pokedex_id[i]=244;break;case"SUICUNE":case 245:m.pokedex_id[i]=245;break;case"LARVITAR":case 246:m.pokedex_id[i]=246;break;case"PUPITAR":case 247:m.pokedex_id[i]=247;break;case"TYRANITAR":case 248:m.pokedex_id[i]=248;break;case"LUGIA":case 249:m.pokedex_id[i]=249;break;case"HO_OH":case 250:m.pokedex_id[i]=250;break;case"CELEBI":case 251:m.pokedex_id[i]=251;break;case"TREECKO":case 252:m.pokedex_id[i]=252;break;case"GROVYLE":case 253:m.pokedex_id[i]=253;break;case"SCEPTILE":case 254:m.pokedex_id[i]=254;break;case"TORCHIC":case 255:m.pokedex_id[i]=255;break;case"COMBUSKEN":case 256:m.pokedex_id[i]=256;break;case"BLAZIKEN":case 257:m.pokedex_id[i]=257;break;case"MUDKIP":case 258:m.pokedex_id[i]=258;break;case"MARSHTOMP":case 259:m.pokedex_id[i]=259;break;case"SWAMPERT":case 260:m.pokedex_id[i]=260;break;case"POOCHYENA":case 261:m.pokedex_id[i]=261;break;case"MIGHTYENA":case 262:m.pokedex_id[i]=262;break;case"ZIGZAGOON":case 263:m.pokedex_id[i]=263;break;case"LINOONE":case 264:m.pokedex_id[i]=264;break;case"WURMPLE":case 265:m.pokedex_id[i]=265;break;case"SILCOON":case 266:m.pokedex_id[i]=266;break;case"BEAUTIFLY":case 267:m.pokedex_id[i]=267;break;case"CASCOON":case 268:m.pokedex_id[i]=268;break;case"DUSTOX":case 269:m.pokedex_id[i]=269;break;case"LOTAD":case 270:m.pokedex_id[i]=270;break;case"LOMBRE":case 271:m.pokedex_id[i]=271;break;case"LUDICOLO":case 272:m.pokedex_id[i]=272;break;case"SEEDOT":case 273:m.pokedex_id[i]=273;break;case"NUZLEAF":case 274:m.pokedex_id[i]=274;break;case"SHIFTRY":case 275:m.pokedex_id[i]=275;break;case"TAILLOW":case 276:m.pokedex_id[i]=276;break;case"SWELLOW":case 277:m.pokedex_id[i]=277;break;case"WINGULL":case 278:m.pokedex_id[i]=278;break;case"PELIPPER":case 279:m.pokedex_id[i]=279;break;case"RALTS":case 280:m.pokedex_id[i]=280;break;case"KIRLIA":case 281:m.pokedex_id[i]=281;break;case"GARDEVOIR":case 282:m.pokedex_id[i]=282;break;case"SURSKIT":case 283:m.pokedex_id[i]=283;break;case"MASQUERAIN":case 284:m.pokedex_id[i]=284;break;case"SHROOMISH":case 285:m.pokedex_id[i]=285;break;case"BRELOOM":case 286:m.pokedex_id[i]=286;break;case"SLAKOTH":case 287:m.pokedex_id[i]=287;break;case"VIGOROTH":case 288:m.pokedex_id[i]=288;break;case"SLAKING":case 289:m.pokedex_id[i]=289;break;case"NINCADA":case 290:m.pokedex_id[i]=290;break;case"NINJASK":case 291:m.pokedex_id[i]=291;break;case"SHEDINJA":case 292:m.pokedex_id[i]=292;break;case"WHISMUR":case 293:m.pokedex_id[i]=293;break;case"LOUDRED":case 294:m.pokedex_id[i]=294;break;case"EXPLOUD":case 295:m.pokedex_id[i]=295;break;case"MAKUHITA":case 296:m.pokedex_id[i]=296;break;case"HARIYAMA":case 297:m.pokedex_id[i]=297;break;case"AZURILL":case 298:m.pokedex_id[i]=298;break;case"NOSEPASS":case 299:m.pokedex_id[i]=299;break;case"SKITTY":case 300:m.pokedex_id[i]=300;break;case"DELCATTY":case 301:m.pokedex_id[i]=301;break;case"SABLEYE":case 302:m.pokedex_id[i]=302;break;case"MAWILE":case 303:m.pokedex_id[i]=303;break;case"ARON":case 304:m.pokedex_id[i]=304;break;case"LAIRON":case 305:m.pokedex_id[i]=305;break;case"AGGRON":case 306:m.pokedex_id[i]=306;break;case"MEDITITE":case 307:m.pokedex_id[i]=307;break;case"MEDICHAM":case 308:m.pokedex_id[i]=308;break;case"ELECTRIKE":case 309:m.pokedex_id[i]=309;break;case"MANECTRIC":case 310:m.pokedex_id[i]=310;break;case"PLUSLE":case 311:m.pokedex_id[i]=311;break;case"MINUN":case 312:m.pokedex_id[i]=312;break;case"VOLBEAT":case 313:m.pokedex_id[i]=313;break;case"ILLUMISE":case 314:m.pokedex_id[i]=314;break;case"ROSELIA":case 315:m.pokedex_id[i]=315;break;case"GULPIN":case 316:m.pokedex_id[i]=316;break;case"SWALOT":case 317:m.pokedex_id[i]=317;break;case"CARVANHA":case 318:m.pokedex_id[i]=318;break;case"SHARPEDO":case 319:m.pokedex_id[i]=319;break;case"WAILMER":case 320:m.pokedex_id[i]=320;break;case"WAILORD":case 321:m.pokedex_id[i]=321;break;case"NUMEL":case 322:m.pokedex_id[i]=322;break;case"CAMERUPT":case 323:m.pokedex_id[i]=323;break;case"TORKOAL":case 324:m.pokedex_id[i]=324;break;case"SPOINK":case 325:m.pokedex_id[i]=325;break;case"GRUMPIG":case 326:m.pokedex_id[i]=326;break;case"SPINDA":case 327:m.pokedex_id[i]=327;break;case"TRAPINCH":case 328:m.pokedex_id[i]=328;break;case"VIBRAVA":case 329:m.pokedex_id[i]=329;break;case"FLYGON":case 330:m.pokedex_id[i]=330;break;case"CACNEA":case 331:m.pokedex_id[i]=331;break;case"CACTURNE":case 332:m.pokedex_id[i]=332;break;case"SWABLU":case 333:m.pokedex_id[i]=333;break;case"ALTARIA":case 334:m.pokedex_id[i]=334;break;case"ZANGOOSE":case 335:m.pokedex_id[i]=335;break;case"SEVIPER":case 336:m.pokedex_id[i]=336;break;case"LUNATONE":case 337:m.pokedex_id[i]=337;break;case"SOLROCK":case 338:m.pokedex_id[i]=338;break;case"BARBOACH":case 339:m.pokedex_id[i]=339;break;case"WHISCASH":case 340:m.pokedex_id[i]=340;break;case"CORPHISH":case 341:m.pokedex_id[i]=341;break;case"CRAWDAUNT":case 342:m.pokedex_id[i]=342;break;case"BALTOY":case 343:m.pokedex_id[i]=343;break;case"CLAYDOL":case 344:m.pokedex_id[i]=344;break;case"LILEEP":case 345:m.pokedex_id[i]=345;break;case"CRADILY":case 346:m.pokedex_id[i]=346;break;case"ANORITH":case 347:m.pokedex_id[i]=347;break;case"ARMALDO":case 348:m.pokedex_id[i]=348;break;case"FEEBAS":case 349:m.pokedex_id[i]=349;break;case"MILOTIC":case 350:m.pokedex_id[i]=350;break;case"CASTFORM":case 351:m.pokedex_id[i]=351;break;case"KECLEON":case 352:m.pokedex_id[i]=352;break;case"SHUPPET":case 353:m.pokedex_id[i]=353;break;case"BANETTE":case 354:m.pokedex_id[i]=354;break;case"DUSKULL":case 355:m.pokedex_id[i]=355;break;case"DUSCLOPS":case 356:m.pokedex_id[i]=356;break;case"TROPIUS":case 357:m.pokedex_id[i]=357;break;case"CHIMECHO":case 358:m.pokedex_id[i]=358;break;case"ABSOL":case 359:m.pokedex_id[i]=359;break;case"WYNAUT":case 360:m.pokedex_id[i]=360;break;case"SNORUNT":case 361:m.pokedex_id[i]=361;break;case"GLALIE":case 362:m.pokedex_id[i]=362;break;case"SPHEAL":case 363:m.pokedex_id[i]=363;break;case"SEALEO":case 364:m.pokedex_id[i]=364;break;case"WALREIN":case 365:m.pokedex_id[i]=365;break;case"CLAMPERL":case 366:m.pokedex_id[i]=366;break;case"HUNTAIL":case 367:m.pokedex_id[i]=367;break;case"GOREBYSS":case 368:m.pokedex_id[i]=368;break;case"RELICANTH":case 369:m.pokedex_id[i]=369;break;case"LUVDISC":case 370:m.pokedex_id[i]=370;break;case"BAGON":case 371:m.pokedex_id[i]=371;break;case"SHELGON":case 372:m.pokedex_id[i]=372;break;case"SALAMENCE":case 373:m.pokedex_id[i]=373;break;case"BELDUM":case 374:m.pokedex_id[i]=374;break;case"METANG":case 375:m.pokedex_id[i]=375;break;case"METAGROSS":case 376:m.pokedex_id[i]=376;break;case"REGIROCK":case 377:m.pokedex_id[i]=377;break;case"REGICE":case 378:m.pokedex_id[i]=378;break;case"REGISTEEL":case 379:m.pokedex_id[i]=379;break;case"LATIAS":case 380:m.pokedex_id[i]=380;break;case"LATIOS":case 381:m.pokedex_id[i]=381;break;case"KYOGRE":case 382:m.pokedex_id[i]=382;break;case"GROUDON":case 383:m.pokedex_id[i]=383;break;case"RAYQUAZA":case 384:m.pokedex_id[i]=384;break;case"JIRACHI":case 385:m.pokedex_id[i]=385;break;case"DEOXYS":case 386:m.pokedex_id[i]=386;break;case"TURTWIG":case 387:m.pokedex_id[i]=387;break;case"GROTLE":case 388:m.pokedex_id[i]=388;break;case"TORTERRA":case 389:m.pokedex_id[i]=389;break;case"CHIMCHAR":case 390:m.pokedex_id[i]=390;break;case"MONFERNO":case 391:m.pokedex_id[i]=391;break;case"INFERNAPE":case 392:m.pokedex_id[i]=392;break;case"PIPLUP":case 393:m.pokedex_id[i]=393;break;case"PRINPLUP":case 394:m.pokedex_id[i]=394;break;case"EMPOLEON":case 395:m.pokedex_id[i]=395;break;case"STARLY":case 396:m.pokedex_id[i]=396;break;case"STARAVIA":case 397:m.pokedex_id[i]=397;break;case"STARAPTOR":case 398:m.pokedex_id[i]=398;break;case"BIDOOF":case 399:m.pokedex_id[i]=399;break;case"BIBAREL":case 400:m.pokedex_id[i]=400;break;case"KRICKETOT":case 401:m.pokedex_id[i]=401;break;case"KRICKETUNE":case 402:m.pokedex_id[i]=402;break;case"SHINX":case 403:m.pokedex_id[i]=403;break;case"LUXIO":case 404:m.pokedex_id[i]=404;break;case"LUXRAY":case 405:m.pokedex_id[i]=405;break;case"BUDEW":case 406:m.pokedex_id[i]=406;break;case"ROSERADE":case 407:m.pokedex_id[i]=407;break;case"CRANIDOS":case 408:m.pokedex_id[i]=408;break;case"RAMPARDOS":case 409:m.pokedex_id[i]=409;break;case"SHIELDON":case 410:m.pokedex_id[i]=410;break;case"BASTIODON":case 411:m.pokedex_id[i]=411;break;case"BURMY":case 412:m.pokedex_id[i]=412;break;case"WORMADAM":case 413:m.pokedex_id[i]=413;break;case"MOTHIM":case 414:m.pokedex_id[i]=414;break;case"COMBEE":case 415:m.pokedex_id[i]=415;break;case"VESPIQUEN":case 416:m.pokedex_id[i]=416;break;case"PACHIRISU":case 417:m.pokedex_id[i]=417;break;case"BUIZEL":case 418:m.pokedex_id[i]=418;break;case"FLOATZEL":case 419:m.pokedex_id[i]=419;break;case"CHERUBI":case 420:m.pokedex_id[i]=420;break;case"CHERRIM":case 421:m.pokedex_id[i]=421;break;case"SHELLOS":case 422:m.pokedex_id[i]=422;break;case"GASTRODON":case 423:m.pokedex_id[i]=423;break;case"AMBIPOM":case 424:m.pokedex_id[i]=424;break;case"DRIFLOON":case 425:m.pokedex_id[i]=425;break;case"DRIFBLIM":case 426:m.pokedex_id[i]=426;break;case"BUNEARY":case 427:m.pokedex_id[i]=427;break;case"LOPUNNY":case 428:m.pokedex_id[i]=428;break;case"MISMAGIUS":case 429:m.pokedex_id[i]=429;break;case"HONCHKROW":case 430:m.pokedex_id[i]=430;break;case"GLAMEOW":case 431:m.pokedex_id[i]=431;break;case"PURUGLY":case 432:m.pokedex_id[i]=432;break;case"CHINGLING":case 433:m.pokedex_id[i]=433;break;case"STUNKY":case 434:m.pokedex_id[i]=434;break;case"SKUNTANK":case 435:m.pokedex_id[i]=435;break;case"BRONZOR":case 436:m.pokedex_id[i]=436;break;case"BRONZONG":case 437:m.pokedex_id[i]=437;break;case"BONSLY":case 438:m.pokedex_id[i]=438;break;case"MIME_JR":case 439:m.pokedex_id[i]=439;break;case"HAPPINY":case 440:m.pokedex_id[i]=440;break;case"CHATOT":case 441:m.pokedex_id[i]=441;break;case"SPIRITOMB":case 442:m.pokedex_id[i]=442;break;case"GIBLE":case 443:m.pokedex_id[i]=443;break;case"GABITE":case 444:m.pokedex_id[i]=444;break;case"GARCHOMP":case 445:m.pokedex_id[i]=445;break;case"MUNCHLAX":case 446:m.pokedex_id[i]=446;break;case"RIOLU":case 447:m.pokedex_id[i]=447;break;case"LUCARIO":case 448:m.pokedex_id[i]=448;break;case"HIPPOPOTAS":case 449:m.pokedex_id[i]=449;break;case"HIPPOWDON":case 450:m.pokedex_id[i]=450;break;case"SKORUPI":case 451:m.pokedex_id[i]=451;break;case"DRAPION":case 452:m.pokedex_id[i]=452;break;case"CROAGUNK":case 453:m.pokedex_id[i]=453;break;case"TOXICROAK":case 454:m.pokedex_id[i]=454;break;case"CARNIVINE":case 455:m.pokedex_id[i]=455;break;case"FINNEON":case 456:m.pokedex_id[i]=456;break;case"LUMINEON":case 457:m.pokedex_id[i]=457;break;case"MANTYKE":case 458:m.pokedex_id[i]=458;break;case"SNOVER":case 459:m.pokedex_id[i]=459;break;case"ABOMASNOW":case 460:m.pokedex_id[i]=460;break;case"WEAVILE":case 461:m.pokedex_id[i]=461;break;case"MAGNEZONE":case 462:m.pokedex_id[i]=462;break;case"LICKILICKY":case 463:m.pokedex_id[i]=463;break;case"RHYPERIOR":case 464:m.pokedex_id[i]=464;break;case"TANGROWTH":case 465:m.pokedex_id[i]=465;break;case"ELECTIVIRE":case 466:m.pokedex_id[i]=466;break;case"MAGMORTAR":case 467:m.pokedex_id[i]=467;break;case"TOGEKISS":case 468:m.pokedex_id[i]=468;break;case"YANMEGA":case 469:m.pokedex_id[i]=469;break;case"LEAFEON":case 470:m.pokedex_id[i]=470;break;case"GLACEON":case 471:m.pokedex_id[i]=471;break;case"GLISCOR":case 472:m.pokedex_id[i]=472;break;case"MAMOSWINE":case 473:m.pokedex_id[i]=473;break;case"PORYGON_Z":case 474:m.pokedex_id[i]=474;break;case"GALLADE":case 475:m.pokedex_id[i]=475;break;case"PROBOPASS":case 476:m.pokedex_id[i]=476;break;case"DUSKNOIR":case 477:m.pokedex_id[i]=477;break;case"FROSLASS":case 478:m.pokedex_id[i]=478;break;case"ROTOM":case 479:m.pokedex_id[i]=479;break;case"UXIE":case 480:m.pokedex_id[i]=480;break;case"MESPRIT":case 481:m.pokedex_id[i]=481;break;case"AZELF":case 482:m.pokedex_id[i]=482;break;case"DIALGA":case 483:m.pokedex_id[i]=483;break;case"PALKIA":case 484:m.pokedex_id[i]=484;break;case"HEATRAN":case 485:m.pokedex_id[i]=485;break;case"REGIGIGAS":case 486:m.pokedex_id[i]=486;break;case"GIRATINA":case 487:m.pokedex_id[i]=487;break;case"CRESSELIA":case 488:m.pokedex_id[i]=488;break;case"PHIONE":case 489:m.pokedex_id[i]=489;break;case"MANAPHY":case 490:m.pokedex_id[i]=490;break;case"DARKRAI":case 491:m.pokedex_id[i]=491;break;case"SHAYMIN":case 492:m.pokedex_id[i]=492;break;case"ARCEUS":case 493:m.pokedex_id[i]=493;break;case"MELTAN":case 808:m.pokedex_id[i]=808;break;case"MELMETAL":case 809:m.pokedex_id[i]=809;break}}}switch(d.onboarding_egg_pokemon){case"MISSINGNO":case 0:m.onboarding_egg_pokemon=0;break;case"BULBASAUR":case 1:m.onboarding_egg_pokemon=1;break;case"IVYSAUR":case 2:m.onboarding_egg_pokemon=2;break;case"VENUSAUR":case 3:m.onboarding_egg_pokemon=3;break;case"CHARMANDER":case 4:m.onboarding_egg_pokemon=4;break;case"CHARMELEON":case 5:m.onboarding_egg_pokemon=5;break;case"CHARIZARD":case 6:m.onboarding_egg_pokemon=6;break;case"SQUIRTLE":case 7:m.onboarding_egg_pokemon=7;break;case"WARTORTLE":case 8:m.onboarding_egg_pokemon=8;break;case"BLASTOISE":case 9:m.onboarding_egg_pokemon=9;break;case"CATERPIE":case 10:m.onboarding_egg_pokemon=10;break;case"METAPOD":case 11:m.onboarding_egg_pokemon=11;break;case"BUTTERFREE":case 12:m.onboarding_egg_pokemon=12;break;case"WEEDLE":case 13:m.onboarding_egg_pokemon=13;break;case"KAKUNA":case 14:m.onboarding_egg_pokemon=14;break;case"BEEDRILL":case 15:m.onboarding_egg_pokemon=15;break;case"PIDGEY":case 16:m.onboarding_egg_pokemon=16;break;case"PIDGEOTTO":case 17:m.onboarding_egg_pokemon=17;break;case"PIDGEOT":case 18:m.onboarding_egg_pokemon=18;break;case"RATTATA":case 19:m.onboarding_egg_pokemon=19;break;case"RATICATE":case 20:m.onboarding_egg_pokemon=20;break;case"SPEAROW":case 21:m.onboarding_egg_pokemon=21;break;case"FEAROW":case 22:m.onboarding_egg_pokemon=22;break;case"EKANS":case 23:m.onboarding_egg_pokemon=23;break;case"ARBOK":case 24:m.onboarding_egg_pokemon=24;break;case"PIKACHU":case 25:m.onboarding_egg_pokemon=25;break;case"RAICHU":case 26:m.onboarding_egg_pokemon=26;break;case"SANDSHREW":case 27:m.onboarding_egg_pokemon=27;break;case"SANDSLASH":case 28:m.onboarding_egg_pokemon=28;break;case"NIDORAN_FEMALE":case 29:m.onboarding_egg_pokemon=29;break;case"NIDORINA":case 30:m.onboarding_egg_pokemon=30;break;case"NIDOQUEEN":case 31:m.onboarding_egg_pokemon=31;break;case"NIDORAN_MALE":case 32:m.onboarding_egg_pokemon=32;break;case"NIDORINO":case 33:m.onboarding_egg_pokemon=33;break;case"NIDOKING":case 34:m.onboarding_egg_pokemon=34;break;case"CLEFAIRY":case 35:m.onboarding_egg_pokemon=35;break;case"CLEFABLE":case 36:m.onboarding_egg_pokemon=36;break;case"VULPIX":case 37:m.onboarding_egg_pokemon=37;break;case"NINETALES":case 38:m.onboarding_egg_pokemon=38;break;case"JIGGLYPUFF":case 39:m.onboarding_egg_pokemon=39;break;case"WIGGLYTUFF":case 40:m.onboarding_egg_pokemon=40;break;case"ZUBAT":case 41:m.onboarding_egg_pokemon=41;break;case"GOLBAT":case 42:m.onboarding_egg_pokemon=42;break;case"ODDISH":case 43:m.onboarding_egg_pokemon=43;break;case"GLOOM":case 44:m.onboarding_egg_pokemon=44;break;case"VILEPLUME":case 45:m.onboarding_egg_pokemon=45;break;case"PARAS":case 46:m.onboarding_egg_pokemon=46;break;case"PARASECT":case 47:m.onboarding_egg_pokemon=47;break;case"VENONAT":case 48:m.onboarding_egg_pokemon=48;break;case"VENOMOTH":case 49:m.onboarding_egg_pokemon=49;break;case"DIGLETT":case 50:m.onboarding_egg_pokemon=50;break;case"DUGTRIO":case 51:m.onboarding_egg_pokemon=51;break;case"MEOWTH":case 52:m.onboarding_egg_pokemon=52;break;case"PERSIAN":case 53:m.onboarding_egg_pokemon=53;break;case"PSYDUCK":case 54:m.onboarding_egg_pokemon=54;break;case"GOLDUCK":case 55:m.onboarding_egg_pokemon=55;break;case"MANKEY":case 56:m.onboarding_egg_pokemon=56;break;case"PRIMEAPE":case 57:m.onboarding_egg_pokemon=57;break;case"GROWLITHE":case 58:m.onboarding_egg_pokemon=58;break;case"ARCANINE":case 59:m.onboarding_egg_pokemon=59;break;case"POLIWAG":case 60:m.onboarding_egg_pokemon=60;break;case"POLIWHIRL":case 61:m.onboarding_egg_pokemon=61;break;case"POLIWRATH":case 62:m.onboarding_egg_pokemon=62;break;case"ABRA":case 63:m.onboarding_egg_pokemon=63;break;case"KADABRA":case 64:m.onboarding_egg_pokemon=64;break;case"ALAKAZAM":case 65:m.onboarding_egg_pokemon=65;break;case"MACHOP":case 66:m.onboarding_egg_pokemon=66;break;case"MACHOKE":case 67:m.onboarding_egg_pokemon=67;break;case"MACHAMP":case 68:m.onboarding_egg_pokemon=68;break;case"BELLSPROUT":case 69:m.onboarding_egg_pokemon=69;break;case"WEEPINBELL":case 70:m.onboarding_egg_pokemon=70;break;case"VICTREEBEL":case 71:m.onboarding_egg_pokemon=71;break;case"TENTACOOL":case 72:m.onboarding_egg_pokemon=72;break;case"TENTACRUEL":case 73:m.onboarding_egg_pokemon=73;break;case"GEODUDE":case 74:m.onboarding_egg_pokemon=74;break;case"GRAVELER":case 75:m.onboarding_egg_pokemon=75;break;case"GOLEM":case 76:m.onboarding_egg_pokemon=76;break;case"PONYTA":case 77:m.onboarding_egg_pokemon=77;break;case"RAPIDASH":case 78:m.onboarding_egg_pokemon=78;break;case"SLOWPOKE":case 79:m.onboarding_egg_pokemon=79;break;case"SLOWBRO":case 80:m.onboarding_egg_pokemon=80;break;case"MAGNEMITE":case 81:m.onboarding_egg_pokemon=81;break;case"MAGNETON":case 82:m.onboarding_egg_pokemon=82;break;case"FARFETCHD":case 83:m.onboarding_egg_pokemon=83;break;case"DODUO":case 84:m.onboarding_egg_pokemon=84;break;case"DODRIO":case 85:m.onboarding_egg_pokemon=85;break;case"SEEL":case 86:m.onboarding_egg_pokemon=86;break;case"DEWGONG":case 87:m.onboarding_egg_pokemon=87;break;case"GRIMER":case 88:m.onboarding_egg_pokemon=88;break;case"MUK":case 89:m.onboarding_egg_pokemon=89;break;case"SHELLDER":case 90:m.onboarding_egg_pokemon=90;break;case"CLOYSTER":case 91:m.onboarding_egg_pokemon=91;break;case"GASTLY":case 92:m.onboarding_egg_pokemon=92;break;case"HAUNTER":case 93:m.onboarding_egg_pokemon=93;break;case"GENGAR":case 94:m.onboarding_egg_pokemon=94;break;case"ONIX":case 95:m.onboarding_egg_pokemon=95;break;case"DROWZEE":case 96:m.onboarding_egg_pokemon=96;break;case"HYPNO":case 97:m.onboarding_egg_pokemon=97;break;case"KRABBY":case 98:m.onboarding_egg_pokemon=98;break;case"KINGLER":case 99:m.onboarding_egg_pokemon=99;break;case"VOLTORB":case 100:m.onboarding_egg_pokemon=100;break;case"ELECTRODE":case 101:m.onboarding_egg_pokemon=101;break;case"EXEGGCUTE":case 102:m.onboarding_egg_pokemon=102;break;case"EXEGGUTOR":case 103:m.onboarding_egg_pokemon=103;break;case"CUBONE":case 104:m.onboarding_egg_pokemon=104;break;case"MAROWAK":case 105:m.onboarding_egg_pokemon=105;break;case"HITMONLEE":case 106:m.onboarding_egg_pokemon=106;break;case"HITMONCHAN":case 107:m.onboarding_egg_pokemon=107;break;case"LICKITUNG":case 108:m.onboarding_egg_pokemon=108;break;case"KOFFING":case 109:m.onboarding_egg_pokemon=109;break;case"WEEZING":case 110:m.onboarding_egg_pokemon=110;break;case"RHYHORN":case 111:m.onboarding_egg_pokemon=111;break;case"RHYDON":case 112:m.onboarding_egg_pokemon=112;break;case"CHANSEY":case 113:m.onboarding_egg_pokemon=113;break;case"TANGELA":case 114:m.onboarding_egg_pokemon=114;break;case"KANGASKHAN":case 115:m.onboarding_egg_pokemon=115;break;case"HORSEA":case 116:m.onboarding_egg_pokemon=116;break;case"SEADRA":case 117:m.onboarding_egg_pokemon=117;break;case"GOLDEEN":case 118:m.onboarding_egg_pokemon=118;break;case"SEAKING":case 119:m.onboarding_egg_pokemon=119;break;case"STARYU":case 120:m.onboarding_egg_pokemon=120;break;case"STARMIE":case 121:m.onboarding_egg_pokemon=121;break;case"MR_MIME":case 122:m.onboarding_egg_pokemon=122;break;case"SCYTHER":case 123:m.onboarding_egg_pokemon=123;break;case"JYNX":case 124:m.onboarding_egg_pokemon=124;break;case"ELECTABUZZ":case 125:m.onboarding_egg_pokemon=125;break;case"MAGMAR":case 126:m.onboarding_egg_pokemon=126;break;case"PINSIR":case 127:m.onboarding_egg_pokemon=127;break;case"TAUROS":case 128:m.onboarding_egg_pokemon=128;break;case"MAGIKARP":case 129:m.onboarding_egg_pokemon=129;break;case"GYARADOS":case 130:m.onboarding_egg_pokemon=130;break;case"LAPRAS":case 131:m.onboarding_egg_pokemon=131;break;case"DITTO":case 132:m.onboarding_egg_pokemon=132;break;case"EEVEE":case 133:m.onboarding_egg_pokemon=133;break;case"VAPOREON":case 134:m.onboarding_egg_pokemon=134;break;case"JOLTEON":case 135:m.onboarding_egg_pokemon=135;break;case"FLAREON":case 136:m.onboarding_egg_pokemon=136;break;case"PORYGON":case 137:m.onboarding_egg_pokemon=137;break;case"OMANYTE":case 138:m.onboarding_egg_pokemon=138;break;case"OMASTAR":case 139:m.onboarding_egg_pokemon=139;break;case"KABUTO":case 140:m.onboarding_egg_pokemon=140;break;case"KABUTOPS":case 141:m.onboarding_egg_pokemon=141;break;case"AERODACTYL":case 142:m.onboarding_egg_pokemon=142;break;case"SNORLAX":case 143:m.onboarding_egg_pokemon=143;break;case"ARTICUNO":case 144:m.onboarding_egg_pokemon=144;break;case"ZAPDOS":case 145:m.onboarding_egg_pokemon=145;break;case"MOLTRES":case 146:m.onboarding_egg_pokemon=146;break;case"DRATINI":case 147:m.onboarding_egg_pokemon=147;break;case"DRAGONAIR":case 148:m.onboarding_egg_pokemon=148;break;case"DRAGONITE":case 149:m.onboarding_egg_pokemon=149;break;case"MEWTWO":case 150:m.onboarding_egg_pokemon=150;break;case"MEW":case 151:m.onboarding_egg_pokemon=151;break;case"CHIKORITA":case 152:m.onboarding_egg_pokemon=152;break;case"BAYLEEF":case 153:m.onboarding_egg_pokemon=153;break;case"MEGANIUM":case 154:m.onboarding_egg_pokemon=154;break;case"CYNDAQUIL":case 155:m.onboarding_egg_pokemon=155;break;case"QUILAVA":case 156:m.onboarding_egg_pokemon=156;break;case"TYPHLOSION":case 157:m.onboarding_egg_pokemon=157;break;case"TOTODILE":case 158:m.onboarding_egg_pokemon=158;break;case"CROCONAW":case 159:m.onboarding_egg_pokemon=159;break;case"FERALIGATR":case 160:m.onboarding_egg_pokemon=160;break;case"SENTRET":case 161:m.onboarding_egg_pokemon=161;break;case"FURRET":case 162:m.onboarding_egg_pokemon=162;break;case"HOOTHOOT":case 163:m.onboarding_egg_pokemon=163;break;case"NOCTOWL":case 164:m.onboarding_egg_pokemon=164;break;case"LEDYBA":case 165:m.onboarding_egg_pokemon=165;break;case"LEDIAN":case 166:m.onboarding_egg_pokemon=166;break;case"SPINARAK":case 167:m.onboarding_egg_pokemon=167;break;case"ARIADOS":case 168:m.onboarding_egg_pokemon=168;break;case"CROBAT":case 169:m.onboarding_egg_pokemon=169;break;case"CHINCHOU":case 170:m.onboarding_egg_pokemon=170;break;case"LANTURN":case 171:m.onboarding_egg_pokemon=171;break;case"PICHU":case 172:m.onboarding_egg_pokemon=172;break;case"CLEFFA":case 173:m.onboarding_egg_pokemon=173;break;case"IGGLYBUFF":case 174:m.onboarding_egg_pokemon=174;break;case"TOGEPI":case 175:m.onboarding_egg_pokemon=175;break;case"TOGETIC":case 176:m.onboarding_egg_pokemon=176;break;case"NATU":case 177:m.onboarding_egg_pokemon=177;break;case"XATU":case 178:m.onboarding_egg_pokemon=178;break;case"MAREEP":case 179:m.onboarding_egg_pokemon=179;break;case"FLAAFFY":case 180:m.onboarding_egg_pokemon=180;break;case"AMPHAROS":case 181:m.onboarding_egg_pokemon=181;break;case"BELLOSSOM":case 182:m.onboarding_egg_pokemon=182;break;case"MARILL":case 183:m.onboarding_egg_pokemon=183;break;case"AZUMARILL":case 184:m.onboarding_egg_pokemon=184;break;case"SUDOWOODO":case 185:m.onboarding_egg_pokemon=185;break;case"POLITOED":case 186:m.onboarding_egg_pokemon=186;break;case"HOPPIP":case 187:m.onboarding_egg_pokemon=187;break;case"SKIPLOOM":case 188:m.onboarding_egg_pokemon=188;break;case"JUMPLUFF":case 189:m.onboarding_egg_pokemon=189;break;case"AIPOM":case 190:m.onboarding_egg_pokemon=190;break;case"SUNKERN":case 191:m.onboarding_egg_pokemon=191;break;case"SUNFLORA":case 192:m.onboarding_egg_pokemon=192;break;case"YANMA":case 193:m.onboarding_egg_pokemon=193;break;case"WOOPER":case 194:m.onboarding_egg_pokemon=194;break;case"QUAGSIRE":case 195:m.onboarding_egg_pokemon=195;break;case"ESPEON":case 196:m.onboarding_egg_pokemon=196;break;case"UMBREON":case 197:m.onboarding_egg_pokemon=197;break;case"MURKROW":case 198:m.onboarding_egg_pokemon=198;break;case"SLOWKING":case 199:m.onboarding_egg_pokemon=199;break;case"MISDREAVUS":case 200:m.onboarding_egg_pokemon=200;break;case"UNOWN":case 201:m.onboarding_egg_pokemon=201;break;case"WOBBUFFET":case 202:m.onboarding_egg_pokemon=202;break;case"GIRAFARIG":case 203:m.onboarding_egg_pokemon=203;break;case"PINECO":case 204:m.onboarding_egg_pokemon=204;break;case"FORRETRESS":case 205:m.onboarding_egg_pokemon=205;break;case"DUNSPARCE":case 206:m.onboarding_egg_pokemon=206;break;case"GLIGAR":case 207:m.onboarding_egg_pokemon=207;break;case"STEELIX":case 208:m.onboarding_egg_pokemon=208;break;case"SNUBBULL":case 209:m.onboarding_egg_pokemon=209;break;case"GRANBULL":case 210:m.onboarding_egg_pokemon=210;break;case"QWILFISH":case 211:m.onboarding_egg_pokemon=211;break;case"SCIZOR":case 212:m.onboarding_egg_pokemon=212;break;case"SHUCKLE":case 213:m.onboarding_egg_pokemon=213;break;case"HERACROSS":case 214:m.onboarding_egg_pokemon=214;break;case"SNEASEL":case 215:m.onboarding_egg_pokemon=215;break;case"TEDDIURSA":case 216:m.onboarding_egg_pokemon=216;break;case"URSARING":case 217:m.onboarding_egg_pokemon=217;break;case"SLUGMA":case 218:m.onboarding_egg_pokemon=218;break;case"MAGCARGO":case 219:m.onboarding_egg_pokemon=219;break;case"SWINUB":case 220:m.onboarding_egg_pokemon=220;break;case"PILOSWINE":case 221:m.onboarding_egg_pokemon=221;break;case"CORSOLA":case 222:m.onboarding_egg_pokemon=222;break;case"REMORAID":case 223:m.onboarding_egg_pokemon=223;break;case"OCTILLERY":case 224:m.onboarding_egg_pokemon=224;break;case"DELIBIRD":case 225:m.onboarding_egg_pokemon=225;break;case"MANTINE":case 226:m.onboarding_egg_pokemon=226;break;case"SKARMORY":case 227:m.onboarding_egg_pokemon=227;break;case"HOUNDOUR":case 228:m.onboarding_egg_pokemon=228;break;case"HOUNDOOM":case 229:m.onboarding_egg_pokemon=229;break;case"KINGDRA":case 230:m.onboarding_egg_pokemon=230;break;case"PHANPY":case 231:m.onboarding_egg_pokemon=231;break;case"DONPHAN":case 232:m.onboarding_egg_pokemon=232;break;case"PORYGON2":case 233:m.onboarding_egg_pokemon=233;break;case"STANTLER":case 234:m.onboarding_egg_pokemon=234;break;case"SMEARGLE":case 235:m.onboarding_egg_pokemon=235;break;case"TYROGUE":case 236:m.onboarding_egg_pokemon=236;break;case"HITMONTOP":case 237:m.onboarding_egg_pokemon=237;break;case"SMOOCHUM":case 238:m.onboarding_egg_pokemon=238;break;case"ELEKID":case 239:m.onboarding_egg_pokemon=239;break;case"MAGBY":case 240:m.onboarding_egg_pokemon=240;break;case"MILTANK":case 241:m.onboarding_egg_pokemon=241;break;case"BLISSEY":case 242:m.onboarding_egg_pokemon=242;break;case"RAIKOU":case 243:m.onboarding_egg_pokemon=243;break;case"ENTEI":case 244:m.onboarding_egg_pokemon=244;break;case"SUICUNE":case 245:m.onboarding_egg_pokemon=245;break;case"LARVITAR":case 246:m.onboarding_egg_pokemon=246;break;case"PUPITAR":case 247:m.onboarding_egg_pokemon=247;break;case"TYRANITAR":case 248:m.onboarding_egg_pokemon=248;break;case"LUGIA":case 249:m.onboarding_egg_pokemon=249;break;case"HO_OH":case 250:m.onboarding_egg_pokemon=250;break;case"CELEBI":case 251:m.onboarding_egg_pokemon=251;break;case"TREECKO":case 252:m.onboarding_egg_pokemon=252;break;case"GROVYLE":case 253:m.onboarding_egg_pokemon=253;break;case"SCEPTILE":case 254:m.onboarding_egg_pokemon=254;break;case"TORCHIC":case 255:m.onboarding_egg_pokemon=255;break;case"COMBUSKEN":case 256:m.onboarding_egg_pokemon=256;break;case"BLAZIKEN":case 257:m.onboarding_egg_pokemon=257;break;case"MUDKIP":case 258:m.onboarding_egg_pokemon=258;break;case"MARSHTOMP":case 259:m.onboarding_egg_pokemon=259;break;case"SWAMPERT":case 260:m.onboarding_egg_pokemon=260;break;case"POOCHYENA":case 261:m.onboarding_egg_pokemon=261;break;case"MIGHTYENA":case 262:m.onboarding_egg_pokemon=262;break;case"ZIGZAGOON":case 263:m.onboarding_egg_pokemon=263;break;case"LINOONE":case 264:m.onboarding_egg_pokemon=264;break;case"WURMPLE":case 265:m.onboarding_egg_pokemon=265;break;case"SILCOON":case 266:m.onboarding_egg_pokemon=266;break;case"BEAUTIFLY":case 267:m.onboarding_egg_pokemon=267;break;case"CASCOON":case 268:m.onboarding_egg_pokemon=268;break;case"DUSTOX":case 269:m.onboarding_egg_pokemon=269;break;case"LOTAD":case 270:m.onboarding_egg_pokemon=270;break;case"LOMBRE":case 271:m.onboarding_egg_pokemon=271;break;case"LUDICOLO":case 272:m.onboarding_egg_pokemon=272;break;case"SEEDOT":case 273:m.onboarding_egg_pokemon=273;break;case"NUZLEAF":case 274:m.onboarding_egg_pokemon=274;break;case"SHIFTRY":case 275:m.onboarding_egg_pokemon=275;break;case"TAILLOW":case 276:m.onboarding_egg_pokemon=276;break;case"SWELLOW":case 277:m.onboarding_egg_pokemon=277;break;case"WINGULL":case 278:m.onboarding_egg_pokemon=278;break;case"PELIPPER":case 279:m.onboarding_egg_pokemon=279;break;case"RALTS":case 280:m.onboarding_egg_pokemon=280;break;case"KIRLIA":case 281:m.onboarding_egg_pokemon=281;break;case"GARDEVOIR":case 282:m.onboarding_egg_pokemon=282;break;case"SURSKIT":case 283:m.onboarding_egg_pokemon=283;break;case"MASQUERAIN":case 284:m.onboarding_egg_pokemon=284;break;case"SHROOMISH":case 285:m.onboarding_egg_pokemon=285;break;case"BRELOOM":case 286:m.onboarding_egg_pokemon=286;break;case"SLAKOTH":case 287:m.onboarding_egg_pokemon=287;break;case"VIGOROTH":case 288:m.onboarding_egg_pokemon=288;break;case"SLAKING":case 289:m.onboarding_egg_pokemon=289;break;case"NINCADA":case 290:m.onboarding_egg_pokemon=290;break;case"NINJASK":case 291:m.onboarding_egg_pokemon=291;break;case"SHEDINJA":case 292:m.onboarding_egg_pokemon=292;break;case"WHISMUR":case 293:m.onboarding_egg_pokemon=293;break;case"LOUDRED":case 294:m.onboarding_egg_pokemon=294;break;case"EXPLOUD":case 295:m.onboarding_egg_pokemon=295;break;case"MAKUHITA":case 296:m.onboarding_egg_pokemon=296;break;case"HARIYAMA":case 297:m.onboarding_egg_pokemon=297;break;case"AZURILL":case 298:m.onboarding_egg_pokemon=298;break;case"NOSEPASS":case 299:m.onboarding_egg_pokemon=299;break;case"SKITTY":case 300:m.onboarding_egg_pokemon=300;break;case"DELCATTY":case 301:m.onboarding_egg_pokemon=301;break;case"SABLEYE":case 302:m.onboarding_egg_pokemon=302;break;case"MAWILE":case 303:m.onboarding_egg_pokemon=303;break;case"ARON":case 304:m.onboarding_egg_pokemon=304;break;case"LAIRON":case 305:m.onboarding_egg_pokemon=305;break;case"AGGRON":case 306:m.onboarding_egg_pokemon=306;break;case"MEDITITE":case 307:m.onboarding_egg_pokemon=307;break;case"MEDICHAM":case 308:m.onboarding_egg_pokemon=308;break;case"ELECTRIKE":case 309:m.onboarding_egg_pokemon=309;break;case"MANECTRIC":case 310:m.onboarding_egg_pokemon=310;break;case"PLUSLE":case 311:m.onboarding_egg_pokemon=311;break;case"MINUN":case 312:m.onboarding_egg_pokemon=312;break;case"VOLBEAT":case 313:m.onboarding_egg_pokemon=313;break;case"ILLUMISE":case 314:m.onboarding_egg_pokemon=314;break;case"ROSELIA":case 315:m.onboarding_egg_pokemon=315;break;case"GULPIN":case 316:m.onboarding_egg_pokemon=316;break;case"SWALOT":case 317:m.onboarding_egg_pokemon=317;break;case"CARVANHA":case 318:m.onboarding_egg_pokemon=318;break;case"SHARPEDO":case 319:m.onboarding_egg_pokemon=319;break;case"WAILMER":case 320:m.onboarding_egg_pokemon=320;break;case"WAILORD":case 321:m.onboarding_egg_pokemon=321;break;case"NUMEL":case 322:m.onboarding_egg_pokemon=322;break;case"CAMERUPT":case 323:m.onboarding_egg_pokemon=323;break;case"TORKOAL":case 324:m.onboarding_egg_pokemon=324;break;case"SPOINK":case 325:m.onboarding_egg_pokemon=325;break;case"GRUMPIG":case 326:m.onboarding_egg_pokemon=326;break;case"SPINDA":case 327:m.onboarding_egg_pokemon=327;break;case"TRAPINCH":case 328:m.onboarding_egg_pokemon=328;break;case"VIBRAVA":case 329:m.onboarding_egg_pokemon=329;break;case"FLYGON":case 330:m.onboarding_egg_pokemon=330;break;case"CACNEA":case 331:m.onboarding_egg_pokemon=331;break;case"CACTURNE":case 332:m.onboarding_egg_pokemon=332;break;case"SWABLU":case 333:m.onboarding_egg_pokemon=333;break;case"ALTARIA":case 334:m.onboarding_egg_pokemon=334;break;case"ZANGOOSE":case 335:m.onboarding_egg_pokemon=335;break;case"SEVIPER":case 336:m.onboarding_egg_pokemon=336;break;case"LUNATONE":case 337:m.onboarding_egg_pokemon=337;break;case"SOLROCK":case 338:m.onboarding_egg_pokemon=338;break;case"BARBOACH":case 339:m.onboarding_egg_pokemon=339;break;case"WHISCASH":case 340:m.onboarding_egg_pokemon=340;break;case"CORPHISH":case 341:m.onboarding_egg_pokemon=341;break;case"CRAWDAUNT":case 342:m.onboarding_egg_pokemon=342;break;case"BALTOY":case 343:m.onboarding_egg_pokemon=343;break;case"CLAYDOL":case 344:m.onboarding_egg_pokemon=344;break;case"LILEEP":case 345:m.onboarding_egg_pokemon=345;break;case"CRADILY":case 346:m.onboarding_egg_pokemon=346;break;case"ANORITH":case 347:m.onboarding_egg_pokemon=347;break;case"ARMALDO":case 348:m.onboarding_egg_pokemon=348;break;case"FEEBAS":case 349:m.onboarding_egg_pokemon=349;break;case"MILOTIC":case 350:m.onboarding_egg_pokemon=350;break;case"CASTFORM":case 351:m.onboarding_egg_pokemon=351;break;case"KECLEON":case 352:m.onboarding_egg_pokemon=352;break;case"SHUPPET":case 353:m.onboarding_egg_pokemon=353;break;case"BANETTE":case 354:m.onboarding_egg_pokemon=354;break;case"DUSKULL":case 355:m.onboarding_egg_pokemon=355;break;case"DUSCLOPS":case 356:m.onboarding_egg_pokemon=356;break;case"TROPIUS":case 357:m.onboarding_egg_pokemon=357;break;case"CHIMECHO":case 358:m.onboarding_egg_pokemon=358;break;case"ABSOL":case 359:m.onboarding_egg_pokemon=359;break;case"WYNAUT":case 360:m.onboarding_egg_pokemon=360;break;case"SNORUNT":case 361:m.onboarding_egg_pokemon=361;break;case"GLALIE":case 362:m.onboarding_egg_pokemon=362;break;case"SPHEAL":case 363:m.onboarding_egg_pokemon=363;break;case"SEALEO":case 364:m.onboarding_egg_pokemon=364;break;case"WALREIN":case 365:m.onboarding_egg_pokemon=365;break;case"CLAMPERL":case 366:m.onboarding_egg_pokemon=366;break;case"HUNTAIL":case 367:m.onboarding_egg_pokemon=367;break;case"GOREBYSS":case 368:m.onboarding_egg_pokemon=368;break;case"RELICANTH":case 369:m.onboarding_egg_pokemon=369;break;case"LUVDISC":case 370:m.onboarding_egg_pokemon=370;break;case"BAGON":case 371:m.onboarding_egg_pokemon=371;break;case"SHELGON":case 372:m.onboarding_egg_pokemon=372;break;case"SALAMENCE":case 373:m.onboarding_egg_pokemon=373;break;case"BELDUM":case 374:m.onboarding_egg_pokemon=374;break;case"METANG":case 375:m.onboarding_egg_pokemon=375;break;case"METAGROSS":case 376:m.onboarding_egg_pokemon=376;break;case"REGIROCK":case 377:m.onboarding_egg_pokemon=377;break;case"REGICE":case 378:m.onboarding_egg_pokemon=378;break;case"REGISTEEL":case 379:m.onboarding_egg_pokemon=379;break;case"LATIAS":case 380:m.onboarding_egg_pokemon=380;break;case"LATIOS":case 381:m.onboarding_egg_pokemon=381;break;case"KYOGRE":case 382:m.onboarding_egg_pokemon=382;break;case"GROUDON":case 383:m.onboarding_egg_pokemon=383;break;case"RAYQUAZA":case 384:m.onboarding_egg_pokemon=384;break;case"JIRACHI":case 385:m.onboarding_egg_pokemon=385;break;case"DEOXYS":case 386:m.onboarding_egg_pokemon=386;break;case"TURTWIG":case 387:m.onboarding_egg_pokemon=387;break;case"GROTLE":case 388:m.onboarding_egg_pokemon=388;break;case"TORTERRA":case 389:m.onboarding_egg_pokemon=389;break;case"CHIMCHAR":case 390:m.onboarding_egg_pokemon=390;break;case"MONFERNO":case 391:m.onboarding_egg_pokemon=391;break;case"INFERNAPE":case 392:m.onboarding_egg_pokemon=392;break;case"PIPLUP":case 393:m.onboarding_egg_pokemon=393;break;case"PRINPLUP":case 394:m.onboarding_egg_pokemon=394;break;case"EMPOLEON":case 395:m.onboarding_egg_pokemon=395;break;case"STARLY":case 396:m.onboarding_egg_pokemon=396;break;case"STARAVIA":case 397:m.onboarding_egg_pokemon=397;break;case"STARAPTOR":case 398:m.onboarding_egg_pokemon=398;break;case"BIDOOF":case 399:m.onboarding_egg_pokemon=399;break;case"BIBAREL":case 400:m.onboarding_egg_pokemon=400;break;case"KRICKETOT":case 401:m.onboarding_egg_pokemon=401;break;case"KRICKETUNE":case 402:m.onboarding_egg_pokemon=402;break;case"SHINX":case 403:m.onboarding_egg_pokemon=403;break;case"LUXIO":case 404:m.onboarding_egg_pokemon=404;break;case"LUXRAY":case 405:m.onboarding_egg_pokemon=405;break;case"BUDEW":case 406:m.onboarding_egg_pokemon=406;break;case"ROSERADE":case 407:m.onboarding_egg_pokemon=407;break;case"CRANIDOS":case 408:m.onboarding_egg_pokemon=408;break;case"RAMPARDOS":case 409:m.onboarding_egg_pokemon=409;break;case"SHIELDON":case 410:m.onboarding_egg_pokemon=410;break;case"BASTIODON":case 411:m.onboarding_egg_pokemon=411;break;case"BURMY":case 412:m.onboarding_egg_pokemon=412;break;case"WORMADAM":case 413:m.onboarding_egg_pokemon=413;break;case"MOTHIM":case 414:m.onboarding_egg_pokemon=414;break;case"COMBEE":case 415:m.onboarding_egg_pokemon=415;break;case"VESPIQUEN":case 416:m.onboarding_egg_pokemon=416;break;case"PACHIRISU":case 417:m.onboarding_egg_pokemon=417;break;case"BUIZEL":case 418:m.onboarding_egg_pokemon=418;break;case"FLOATZEL":case 419:m.onboarding_egg_pokemon=419;break;case"CHERUBI":case 420:m.onboarding_egg_pokemon=420;break;case"CHERRIM":case 421:m.onboarding_egg_pokemon=421;break;case"SHELLOS":case 422:m.onboarding_egg_pokemon=422;break;case"GASTRODON":case 423:m.onboarding_egg_pokemon=423;break;case"AMBIPOM":case 424:m.onboarding_egg_pokemon=424;break;case"DRIFLOON":case 425:m.onboarding_egg_pokemon=425;break;case"DRIFBLIM":case 426:m.onboarding_egg_pokemon=426;break;case"BUNEARY":case 427:m.onboarding_egg_pokemon=427;break;case"LOPUNNY":case 428:m.onboarding_egg_pokemon=428;break;case"MISMAGIUS":case 429:m.onboarding_egg_pokemon=429;break;case"HONCHKROW":case 430:m.onboarding_egg_pokemon=430;break;case"GLAMEOW":case 431:m.onboarding_egg_pokemon=431;break;case"PURUGLY":case 432:m.onboarding_egg_pokemon=432;break;case"CHINGLING":case 433:m.onboarding_egg_pokemon=433;break;case"STUNKY":case 434:m.onboarding_egg_pokemon=434;break;case"SKUNTANK":case 435:m.onboarding_egg_pokemon=435;break;case"BRONZOR":case 436:m.onboarding_egg_pokemon=436;break;case"BRONZONG":case 437:m.onboarding_egg_pokemon=437;break;case"BONSLY":case 438:m.onboarding_egg_pokemon=438;break;case"MIME_JR":case 439:m.onboarding_egg_pokemon=439;break;case"HAPPINY":case 440:m.onboarding_egg_pokemon=440;break;case"CHATOT":case 441:m.onboarding_egg_pokemon=441;break;case"SPIRITOMB":case 442:m.onboarding_egg_pokemon=442;break;case"GIBLE":case 443:m.onboarding_egg_pokemon=443;break;case"GABITE":case 444:m.onboarding_egg_pokemon=444;break;case"GARCHOMP":case 445:m.onboarding_egg_pokemon=445;break;case"MUNCHLAX":case 446:m.onboarding_egg_pokemon=446;break;case"RIOLU":case 447:m.onboarding_egg_pokemon=447;break;case"LUCARIO":case 448:m.onboarding_egg_pokemon=448;break;case"HIPPOPOTAS":case 449:m.onboarding_egg_pokemon=449;break;case"HIPPOWDON":case 450:m.onboarding_egg_pokemon=450;break;case"SKORUPI":case 451:m.onboarding_egg_pokemon=451;break;case"DRAPION":case 452:m.onboarding_egg_pokemon=452;break;case"CROAGUNK":case 453:m.onboarding_egg_pokemon=453;break;case"TOXICROAK":case 454:m.onboarding_egg_pokemon=454;break;case"CARNIVINE":case 455:m.onboarding_egg_pokemon=455;break;case"FINNEON":case 456:m.onboarding_egg_pokemon=456;break;case"LUMINEON":case 457:m.onboarding_egg_pokemon=457;break;case"MANTYKE":case 458:m.onboarding_egg_pokemon=458;break;case"SNOVER":case 459:m.onboarding_egg_pokemon=459;break;case"ABOMASNOW":case 460:m.onboarding_egg_pokemon=460;break;case"WEAVILE":case 461:m.onboarding_egg_pokemon=461;break;case"MAGNEZONE":case 462:m.onboarding_egg_pokemon=462;break;case"LICKILICKY":case 463:m.onboarding_egg_pokemon=463;break;case"RHYPERIOR":case 464:m.onboarding_egg_pokemon=464;break;case"TANGROWTH":case 465:m.onboarding_egg_pokemon=465;break;case"ELECTIVIRE":case 466:m.onboarding_egg_pokemon=466;break;case"MAGMORTAR":case 467:m.onboarding_egg_pokemon=467;break;case"TOGEKISS":case 468:m.onboarding_egg_pokemon=468;break;case"YANMEGA":case 469:m.onboarding_egg_pokemon=469;break;case"LEAFEON":case 470:m.onboarding_egg_pokemon=470;break;case"GLACEON":case 471:m.onboarding_egg_pokemon=471;break;case"GLISCOR":case 472:m.onboarding_egg_pokemon=472;break;case"MAMOSWINE":case 473:m.onboarding_egg_pokemon=473;break;case"PORYGON_Z":case 474:m.onboarding_egg_pokemon=474;break;case"GALLADE":case 475:m.onboarding_egg_pokemon=475;break;case"PROBOPASS":case 476:m.onboarding_egg_pokemon=476;break;case"DUSKNOIR":case 477:m.onboarding_egg_pokemon=477;break;case"FROSLASS":case 478:m.onboarding_egg_pokemon=478;break;case"ROTOM":case 479:m.onboarding_egg_pokemon=479;break;case"UXIE":case 480:m.onboarding_egg_pokemon=480;break;case"MESPRIT":case 481:m.onboarding_egg_pokemon=481;break;case"AZELF":case 482:m.onboarding_egg_pokemon=482;break;case"DIALGA":case 483:m.onboarding_egg_pokemon=483;break;case"PALKIA":case 484:m.onboarding_egg_pokemon=484;break;case"HEATRAN":case 485:m.onboarding_egg_pokemon=485;break;case"REGIGIGAS":case 486:m.onboarding_egg_pokemon=486;break;case"GIRATINA":case 487:m.onboarding_egg_pokemon=487;break;case"CRESSELIA":case 488:m.onboarding_egg_pokemon=488;break;case"PHIONE":case 489:m.onboarding_egg_pokemon=489;break;case"MANAPHY":case 490:m.onboarding_egg_pokemon=490;break;case"DARKRAI":case 491:m.onboarding_egg_pokemon=491;break;case"SHAYMIN":case 492:m.onboarding_egg_pokemon=492;break;case"ARCEUS":case 493:m.onboarding_egg_pokemon=493;break;case"MELTAN":case 808:m.onboarding_egg_pokemon=808;break;case"MELMETAL":case 809:m.onboarding_egg_pokemon=809;break}if(d.egg_km_until_hatch!=null){m.egg_km_until_hatch=d.egg_km_until_hatch|0}return m};OnboardingV2Settings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.pokedex_id=[]}if(o.defaults){d.enable_onboarding_v2=false;d.onboarding_egg_pokemon=o.enums===String?"MISSINGNO":0;d.egg_km_until_hatch=0}if(m.enable_onboarding_v2!=null&&m.hasOwnProperty("enable_onboarding_v2")){d.enable_onboarding_v2=m.enable_onboarding_v2}if(m.pokedex_id&&m.pokedex_id.length){d.pokedex_id=[];for(var j=0;j<m.pokedex_id.length;++j){d.pokedex_id[j]=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokedex_id[j]]:m.pokedex_id[j]}}if(m.onboarding_egg_pokemon!=null&&m.hasOwnProperty("onboarding_egg_pokemon")){d.onboarding_egg_pokemon=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.onboarding_egg_pokemon]:m.onboarding_egg_pokemon}if(m.egg_km_until_hatch!=null&&m.hasOwnProperty("egg_km_until_hatch")){d.egg_km_until_hatch=m.egg_km_until_hatch}return d};OnboardingV2Settings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return OnboardingV2Settings}();Master.PlayerLevelSettings=function(){function PlayerLevelSettings(p){this.rank_num=[];this.required_experience=[];this.cp_multiplier=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PlayerLevelSettings.prototype.rank_num=$util.emptyArray;PlayerLevelSettings.prototype.required_experience=$util.emptyArray;PlayerLevelSettings.prototype.cp_multiplier=$util.emptyArray;PlayerLevelSettings.prototype.max_egg_player_level=0;PlayerLevelSettings.prototype.max_encounter_player_level=0;PlayerLevelSettings.prototype.max_raid_encounter_player_level=0;PlayerLevelSettings.prototype.max_quest_encounter_player_level=0;PlayerLevelSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.rank_num!=null&&m.rank_num.length){w.uint32(10).fork();for(var i=0;i<m.rank_num.length;++i)w.int32(m.rank_num[i]);w.ldelim()}if(m.required_experience!=null&&m.required_experience.length){w.uint32(18).fork();for(var i=0;i<m.required_experience.length;++i)w.int32(m.required_experience[i]);w.ldelim()}if(m.cp_multiplier!=null&&m.cp_multiplier.length){w.uint32(26).fork();for(var i=0;i<m.cp_multiplier.length;++i)w.float(m.cp_multiplier[i]);w.ldelim()}if(m.max_egg_player_level!=null&&m.hasOwnProperty("max_egg_player_level"))w.uint32(32).int32(m.max_egg_player_level);if(m.max_encounter_player_level!=null&&m.hasOwnProperty("max_encounter_player_level"))w.uint32(40).int32(m.max_encounter_player_level);if(m.max_raid_encounter_player_level!=null&&m.hasOwnProperty("max_raid_encounter_player_level"))w.uint32(48).int32(m.max_raid_encounter_player_level);if(m.max_quest_encounter_player_level!=null&&m.hasOwnProperty("max_quest_encounter_player_level"))w.uint32(56).int32(m.max_quest_encounter_player_level);return w};PlayerLevelSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.PlayerLevelSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.rank_num&&m.rank_num.length))m.rank_num=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.rank_num.push(r.int32())}else m.rank_num.push(r.int32());break;case 2:if(!(m.required_experience&&m.required_experience.length))m.required_experience=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.required_experience.push(r.int32())}else m.required_experience.push(r.int32());break;case 3:if(!(m.cp_multiplier&&m.cp_multiplier.length))m.cp_multiplier=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.cp_multiplier.push(r.float())}else m.cp_multiplier.push(r.float());break;case 4:m.max_egg_player_level=r.int32();break;case 5:m.max_encounter_player_level=r.int32();break;case 6:m.max_raid_encounter_player_level=r.int32();break;case 7:m.max_quest_encounter_player_level=r.int32();break;default:r.skipType(t&7);break}}return m};PlayerLevelSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.PlayerLevelSettings)return d;var m=new $root.POGOProtos.Settings.Master.PlayerLevelSettings;if(d.rank_num){if(!Array.isArray(d.rank_num))throw TypeError(".POGOProtos.Settings.Master.PlayerLevelSettings.rank_num: array expected");m.rank_num=[];for(var i=0;i<d.rank_num.length;++i){m.rank_num[i]=d.rank_num[i]|0}}if(d.required_experience){if(!Array.isArray(d.required_experience))throw TypeError(".POGOProtos.Settings.Master.PlayerLevelSettings.required_experience: array expected");m.required_experience=[];for(var i=0;i<d.required_experience.length;++i){m.required_experience[i]=d.required_experience[i]|0}}if(d.cp_multiplier){if(!Array.isArray(d.cp_multiplier))throw TypeError(".POGOProtos.Settings.Master.PlayerLevelSettings.cp_multiplier: array expected");m.cp_multiplier=[];for(var i=0;i<d.cp_multiplier.length;++i){m.cp_multiplier[i]=Number(d.cp_multiplier[i])}}if(d.max_egg_player_level!=null){m.max_egg_player_level=d.max_egg_player_level|0}if(d.max_encounter_player_level!=null){m.max_encounter_player_level=d.max_encounter_player_level|0}if(d.max_raid_encounter_player_level!=null){m.max_raid_encounter_player_level=d.max_raid_encounter_player_level|0}if(d.max_quest_encounter_player_level!=null){m.max_quest_encounter_player_level=d.max_quest_encounter_player_level|0}return m};PlayerLevelSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.rank_num=[];d.required_experience=[];d.cp_multiplier=[]}if(o.defaults){d.max_egg_player_level=0;d.max_encounter_player_level=0;d.max_raid_encounter_player_level=0;d.max_quest_encounter_player_level=0}if(m.rank_num&&m.rank_num.length){d.rank_num=[];for(var j=0;j<m.rank_num.length;++j){d.rank_num[j]=m.rank_num[j]}}if(m.required_experience&&m.required_experience.length){d.required_experience=[];for(var j=0;j<m.required_experience.length;++j){d.required_experience[j]=m.required_experience[j]}}if(m.cp_multiplier&&m.cp_multiplier.length){d.cp_multiplier=[];for(var j=0;j<m.cp_multiplier.length;++j){d.cp_multiplier[j]=o.json&&!isFinite(m.cp_multiplier[j])?String(m.cp_multiplier[j]):m.cp_multiplier[j]}}if(m.max_egg_player_level!=null&&m.hasOwnProperty("max_egg_player_level")){d.max_egg_player_level=m.max_egg_player_level}if(m.max_encounter_player_level!=null&&m.hasOwnProperty("max_encounter_player_level")){d.max_encounter_player_level=m.max_encounter_player_level}if(m.max_raid_encounter_player_level!=null&&m.hasOwnProperty("max_raid_encounter_player_level")){d.max_raid_encounter_player_level=m.max_raid_encounter_player_level}if(m.max_quest_encounter_player_level!=null&&m.hasOwnProperty("max_quest_encounter_player_level")){d.max_quest_encounter_player_level=m.max_quest_encounter_player_level}return d};PlayerLevelSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PlayerLevelSettings}();Master.Pokemon=function(){var Pokemon={};Pokemon.CameraAttributes=function(){function CameraAttributes(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}CameraAttributes.prototype.disk_radius_m=0;CameraAttributes.prototype.cylinder_radius_m=0;CameraAttributes.prototype.cylinder_height_m=0;CameraAttributes.prototype.cylinder_ground_m=0;CameraAttributes.prototype.shoulder_mode_scale=0;CameraAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.disk_radius_m!=null&&m.hasOwnProperty("disk_radius_m"))w.uint32(13).float(m.disk_radius_m);if(m.cylinder_radius_m!=null&&m.hasOwnProperty("cylinder_radius_m"))w.uint32(21).float(m.cylinder_radius_m);if(m.cylinder_height_m!=null&&m.hasOwnProperty("cylinder_height_m"))w.uint32(29).float(m.cylinder_height_m);if(m.cylinder_ground_m!=null&&m.hasOwnProperty("cylinder_ground_m"))w.uint32(37).float(m.cylinder_ground_m);if(m.shoulder_mode_scale!=null&&m.hasOwnProperty("shoulder_mode_scale"))w.uint32(45).float(m.shoulder_mode_scale);return w};CameraAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Pokemon.CameraAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.disk_radius_m=r.float();break;case 2:m.cylinder_radius_m=r.float();break;case 3:m.cylinder_height_m=r.float();break;case 4:m.cylinder_ground_m=r.float();break;case 5:m.shoulder_mode_scale=r.float();break;default:r.skipType(t&7);break}}return m};CameraAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Pokemon.CameraAttributes)return d;var m=new $root.POGOProtos.Settings.Master.Pokemon.CameraAttributes;if(d.disk_radius_m!=null){m.disk_radius_m=Number(d.disk_radius_m)}if(d.cylinder_radius_m!=null){m.cylinder_radius_m=Number(d.cylinder_radius_m)}if(d.cylinder_height_m!=null){m.cylinder_height_m=Number(d.cylinder_height_m)}if(d.cylinder_ground_m!=null){m.cylinder_ground_m=Number(d.cylinder_ground_m)}if(d.shoulder_mode_scale!=null){m.shoulder_mode_scale=Number(d.shoulder_mode_scale)}return m};CameraAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.disk_radius_m=0;d.cylinder_radius_m=0;d.cylinder_height_m=0;d.cylinder_ground_m=0;d.shoulder_mode_scale=0}if(m.disk_radius_m!=null&&m.hasOwnProperty("disk_radius_m")){d.disk_radius_m=o.json&&!isFinite(m.disk_radius_m)?String(m.disk_radius_m):m.disk_radius_m}if(m.cylinder_radius_m!=null&&m.hasOwnProperty("cylinder_radius_m")){d.cylinder_radius_m=o.json&&!isFinite(m.cylinder_radius_m)?String(m.cylinder_radius_m):m.cylinder_radius_m}if(m.cylinder_height_m!=null&&m.hasOwnProperty("cylinder_height_m")){d.cylinder_height_m=o.json&&!isFinite(m.cylinder_height_m)?String(m.cylinder_height_m):m.cylinder_height_m}if(m.cylinder_ground_m!=null&&m.hasOwnProperty("cylinder_ground_m")){d.cylinder_ground_m=o.json&&!isFinite(m.cylinder_ground_m)?String(m.cylinder_ground_m):m.cylinder_ground_m}if(m.shoulder_mode_scale!=null&&m.hasOwnProperty("shoulder_mode_scale")){d.shoulder_mode_scale=o.json&&!isFinite(m.shoulder_mode_scale)?String(m.shoulder_mode_scale):m.shoulder_mode_scale}return d};CameraAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return CameraAttributes}();Pokemon.EncounterAttributes=function(){function EncounterAttributes(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EncounterAttributes.prototype.base_capture_rate=0;EncounterAttributes.prototype.base_flee_rate=0;EncounterAttributes.prototype.collision_radius_m=0;EncounterAttributes.prototype.collision_height_m=0;EncounterAttributes.prototype.collision_head_radius_m=0;EncounterAttributes.prototype.movement_type=0;EncounterAttributes.prototype.movement_timer_s=0;EncounterAttributes.prototype.jump_time_s=0;EncounterAttributes.prototype.attack_timer_s=0;EncounterAttributes.prototype.bonus_candy_capture_reward=0;EncounterAttributes.prototype.bonus_stardust_capture_reward=0;EncounterAttributes.prototype.attack_probability=0;EncounterAttributes.prototype.dodge_probability=0;EncounterAttributes.prototype.dodge_duration_s=0;EncounterAttributes.prototype.dodge_distance=0;EncounterAttributes.prototype.camera_distance=0;EncounterAttributes.prototype.min_pokemon_action_frequency_s=0;EncounterAttributes.prototype.max_pokemon_action_frequency_s=0;EncounterAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.base_capture_rate!=null&&m.hasOwnProperty("base_capture_rate"))w.uint32(13).float(m.base_capture_rate);if(m.base_flee_rate!=null&&m.hasOwnProperty("base_flee_rate"))w.uint32(21).float(m.base_flee_rate);if(m.collision_radius_m!=null&&m.hasOwnProperty("collision_radius_m"))w.uint32(29).float(m.collision_radius_m);if(m.collision_height_m!=null&&m.hasOwnProperty("collision_height_m"))w.uint32(37).float(m.collision_height_m);if(m.collision_head_radius_m!=null&&m.hasOwnProperty("collision_head_radius_m"))w.uint32(45).float(m.collision_head_radius_m);if(m.movement_type!=null&&m.hasOwnProperty("movement_type"))w.uint32(48).int32(m.movement_type);if(m.movement_timer_s!=null&&m.hasOwnProperty("movement_timer_s"))w.uint32(61).float(m.movement_timer_s);if(m.jump_time_s!=null&&m.hasOwnProperty("jump_time_s"))w.uint32(69).float(m.jump_time_s);if(m.attack_timer_s!=null&&m.hasOwnProperty("attack_timer_s"))w.uint32(77).float(m.attack_timer_s);if(m.bonus_candy_capture_reward!=null&&m.hasOwnProperty("bonus_candy_capture_reward"))w.uint32(80).int32(m.bonus_candy_capture_reward);if(m.bonus_stardust_capture_reward!=null&&m.hasOwnProperty("bonus_stardust_capture_reward"))w.uint32(88).int32(m.bonus_stardust_capture_reward);if(m.attack_probability!=null&&m.hasOwnProperty("attack_probability"))w.uint32(101).float(m.attack_probability);if(m.dodge_probability!=null&&m.hasOwnProperty("dodge_probability"))w.uint32(109).float(m.dodge_probability);if(m.dodge_duration_s!=null&&m.hasOwnProperty("dodge_duration_s"))w.uint32(117).float(m.dodge_duration_s);if(m.dodge_distance!=null&&m.hasOwnProperty("dodge_distance"))w.uint32(125).float(m.dodge_distance);if(m.camera_distance!=null&&m.hasOwnProperty("camera_distance"))w.uint32(133).float(m.camera_distance);if(m.min_pokemon_action_frequency_s!=null&&m.hasOwnProperty("min_pokemon_action_frequency_s"))w.uint32(141).float(m.min_pokemon_action_frequency_s);if(m.max_pokemon_action_frequency_s!=null&&m.hasOwnProperty("max_pokemon_action_frequency_s"))w.uint32(149).float(m.max_pokemon_action_frequency_s);return w};EncounterAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Pokemon.EncounterAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.base_capture_rate=r.float();break;case 2:m.base_flee_rate=r.float();break;case 3:m.collision_radius_m=r.float();break;case 4:m.collision_height_m=r.float();break;case 5:m.collision_head_radius_m=r.float();break;case 6:m.movement_type=r.int32();break;case 7:m.movement_timer_s=r.float();break;case 8:m.jump_time_s=r.float();break;case 9:m.attack_timer_s=r.float();break;case 10:m.bonus_candy_capture_reward=r.int32();break;case 11:m.bonus_stardust_capture_reward=r.int32();break;case 12:m.attack_probability=r.float();break;case 13:m.dodge_probability=r.float();break;case 14:m.dodge_duration_s=r.float();break;case 15:m.dodge_distance=r.float();break;case 16:m.camera_distance=r.float();break;case 17:m.min_pokemon_action_frequency_s=r.float();break;case 18:m.max_pokemon_action_frequency_s=r.float();break;default:r.skipType(t&7);break}}return m};EncounterAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Pokemon.EncounterAttributes)return d;var m=new $root.POGOProtos.Settings.Master.Pokemon.EncounterAttributes;if(d.base_capture_rate!=null){m.base_capture_rate=Number(d.base_capture_rate)}if(d.base_flee_rate!=null){m.base_flee_rate=Number(d.base_flee_rate)}if(d.collision_radius_m!=null){m.collision_radius_m=Number(d.collision_radius_m)}if(d.collision_height_m!=null){m.collision_height_m=Number(d.collision_height_m)}if(d.collision_head_radius_m!=null){m.collision_head_radius_m=Number(d.collision_head_radius_m)}switch(d.movement_type){case"MOVEMENT_STATIC":case 0:m.movement_type=0;break;case"MOVEMENT_JUMP":case 1:m.movement_type=1;break;case"MOVEMENT_VERTICAL":case 2:m.movement_type=2;break;case"MOVEMENT_PSYCHIC":case 3:m.movement_type=3;break;case"MOVEMENT_ELECTRIC":case 4:m.movement_type=4;break;case"MOVEMENT_FLYING":case 5:m.movement_type=5;break;case"MOVEMENT_HOVERING":case 6:m.movement_type=6;break}if(d.movement_timer_s!=null){m.movement_timer_s=Number(d.movement_timer_s)}if(d.jump_time_s!=null){m.jump_time_s=Number(d.jump_time_s)}if(d.attack_timer_s!=null){m.attack_timer_s=Number(d.attack_timer_s)}if(d.bonus_candy_capture_reward!=null){m.bonus_candy_capture_reward=d.bonus_candy_capture_reward|0}if(d.bonus_stardust_capture_reward!=null){m.bonus_stardust_capture_reward=d.bonus_stardust_capture_reward|0}if(d.attack_probability!=null){m.attack_probability=Number(d.attack_probability)}if(d.dodge_probability!=null){m.dodge_probability=Number(d.dodge_probability)}if(d.dodge_duration_s!=null){m.dodge_duration_s=Number(d.dodge_duration_s)}if(d.dodge_distance!=null){m.dodge_distance=Number(d.dodge_distance)}if(d.camera_distance!=null){m.camera_distance=Number(d.camera_distance)}if(d.min_pokemon_action_frequency_s!=null){m.min_pokemon_action_frequency_s=Number(d.min_pokemon_action_frequency_s)}if(d.max_pokemon_action_frequency_s!=null){m.max_pokemon_action_frequency_s=Number(d.max_pokemon_action_frequency_s)}return m};EncounterAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.base_capture_rate=0;d.base_flee_rate=0;d.collision_radius_m=0;d.collision_height_m=0;d.collision_head_radius_m=0;d.movement_type=o.enums===String?"MOVEMENT_STATIC":0;d.movement_timer_s=0;d.jump_time_s=0;d.attack_timer_s=0;d.bonus_candy_capture_reward=0;d.bonus_stardust_capture_reward=0;d.attack_probability=0;d.dodge_probability=0;d.dodge_duration_s=0;d.dodge_distance=0;d.camera_distance=0;d.min_pokemon_action_frequency_s=0;d.max_pokemon_action_frequency_s=0}if(m.base_capture_rate!=null&&m.hasOwnProperty("base_capture_rate")){d.base_capture_rate=o.json&&!isFinite(m.base_capture_rate)?String(m.base_capture_rate):m.base_capture_rate}if(m.base_flee_rate!=null&&m.hasOwnProperty("base_flee_rate")){d.base_flee_rate=o.json&&!isFinite(m.base_flee_rate)?String(m.base_flee_rate):m.base_flee_rate}if(m.collision_radius_m!=null&&m.hasOwnProperty("collision_radius_m")){d.collision_radius_m=o.json&&!isFinite(m.collision_radius_m)?String(m.collision_radius_m):m.collision_radius_m}if(m.collision_height_m!=null&&m.hasOwnProperty("collision_height_m")){d.collision_height_m=o.json&&!isFinite(m.collision_height_m)?String(m.collision_height_m):m.collision_height_m}if(m.collision_head_radius_m!=null&&m.hasOwnProperty("collision_head_radius_m")){d.collision_head_radius_m=o.json&&!isFinite(m.collision_head_radius_m)?String(m.collision_head_radius_m):m.collision_head_radius_m}if(m.movement_type!=null&&m.hasOwnProperty("movement_type")){d.movement_type=o.enums===String?$root.POGOProtos.Enums.PokemonMovementType[m.movement_type]:m.movement_type}if(m.movement_timer_s!=null&&m.hasOwnProperty("movement_timer_s")){d.movement_timer_s=o.json&&!isFinite(m.movement_timer_s)?String(m.movement_timer_s):m.movement_timer_s}if(m.jump_time_s!=null&&m.hasOwnProperty("jump_time_s")){d.jump_time_s=o.json&&!isFinite(m.jump_time_s)?String(m.jump_time_s):m.jump_time_s}if(m.attack_timer_s!=null&&m.hasOwnProperty("attack_timer_s")){d.attack_timer_s=o.json&&!isFinite(m.attack_timer_s)?String(m.attack_timer_s):m.attack_timer_s}if(m.bonus_candy_capture_reward!=null&&m.hasOwnProperty("bonus_candy_capture_reward")){d.bonus_candy_capture_reward=m.bonus_candy_capture_reward}if(m.bonus_stardust_capture_reward!=null&&m.hasOwnProperty("bonus_stardust_capture_reward")){d.bonus_stardust_capture_reward=m.bonus_stardust_capture_reward}if(m.attack_probability!=null&&m.hasOwnProperty("attack_probability")){d.attack_probability=o.json&&!isFinite(m.attack_probability)?String(m.attack_probability):m.attack_probability}if(m.dodge_probability!=null&&m.hasOwnProperty("dodge_probability")){d.dodge_probability=o.json&&!isFinite(m.dodge_probability)?String(m.dodge_probability):m.dodge_probability}if(m.dodge_duration_s!=null&&m.hasOwnProperty("dodge_duration_s")){d.dodge_duration_s=o.json&&!isFinite(m.dodge_duration_s)?String(m.dodge_duration_s):m.dodge_duration_s}if(m.dodge_distance!=null&&m.hasOwnProperty("dodge_distance")){d.dodge_distance=o.json&&!isFinite(m.dodge_distance)?String(m.dodge_distance):m.dodge_distance}if(m.camera_distance!=null&&m.hasOwnProperty("camera_distance")){d.camera_distance=o.json&&!isFinite(m.camera_distance)?String(m.camera_distance):m.camera_distance}if(m.min_pokemon_action_frequency_s!=null&&m.hasOwnProperty("min_pokemon_action_frequency_s")){d.min_pokemon_action_frequency_s=o.json&&!isFinite(m.min_pokemon_action_frequency_s)?String(m.min_pokemon_action_frequency_s):m.min_pokemon_action_frequency_s}if(m.max_pokemon_action_frequency_s!=null&&m.hasOwnProperty("max_pokemon_action_frequency_s")){d.max_pokemon_action_frequency_s=o.json&&!isFinite(m.max_pokemon_action_frequency_s)?String(m.max_pokemon_action_frequency_s):m.max_pokemon_action_frequency_s}return d};EncounterAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EncounterAttributes}();Pokemon.EvolutionBranch=function(){function EvolutionBranch(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}EvolutionBranch.prototype.evolution=0;EvolutionBranch.prototype.evolution_item_requirement=0;EvolutionBranch.prototype.candy_cost=0;EvolutionBranch.prototype.km_buddy_distance_requirement=0;EvolutionBranch.prototype.form=0;EvolutionBranch.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.evolution!=null&&m.hasOwnProperty("evolution"))w.uint32(8).int32(m.evolution);if(m.evolution_item_requirement!=null&&m.hasOwnProperty("evolution_item_requirement"))w.uint32(16).int32(m.evolution_item_requirement);if(m.candy_cost!=null&&m.hasOwnProperty("candy_cost"))w.uint32(24).int32(m.candy_cost);if(m.km_buddy_distance_requirement!=null&&m.hasOwnProperty("km_buddy_distance_requirement"))w.uint32(37).float(m.km_buddy_distance_requirement);if(m.form!=null&&m.hasOwnProperty("form"))w.uint32(40).int32(m.form);return w};EvolutionBranch.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Pokemon.EvolutionBranch;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.evolution=r.int32();break;case 2:m.evolution_item_requirement=r.int32();break;case 3:m.candy_cost=r.int32();break;case 4:m.km_buddy_distance_requirement=r.float();break;case 5:m.form=r.int32();break;default:r.skipType(t&7);break}}return m};EvolutionBranch.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Pokemon.EvolutionBranch)return d;var m=new $root.POGOProtos.Settings.Master.Pokemon.EvolutionBranch;switch(d.evolution){case"MISSINGNO":case 0:m.evolution=0;break;case"BULBASAUR":case 1:m.evolution=1;break;case"IVYSAUR":case 2:m.evolution=2;break;case"VENUSAUR":case 3:m.evolution=3;break;case"CHARMANDER":case 4:m.evolution=4;break;case"CHARMELEON":case 5:m.evolution=5;break;case"CHARIZARD":case 6:m.evolution=6;break;case"SQUIRTLE":case 7:m.evolution=7;break;case"WARTORTLE":case 8:m.evolution=8;break;case"BLASTOISE":case 9:m.evolution=9;break;case"CATERPIE":case 10:m.evolution=10;break;case"METAPOD":case 11:m.evolution=11;break;case"BUTTERFREE":case 12:m.evolution=12;break;case"WEEDLE":case 13:m.evolution=13;break;case"KAKUNA":case 14:m.evolution=14;break;case"BEEDRILL":case 15:m.evolution=15;break;case"PIDGEY":case 16:m.evolution=16;break;case"PIDGEOTTO":case 17:m.evolution=17;break;case"PIDGEOT":case 18:m.evolution=18;break;case"RATTATA":case 19:m.evolution=19;break;case"RATICATE":case 20:m.evolution=20;break;case"SPEAROW":case 21:m.evolution=21;break;case"FEAROW":case 22:m.evolution=22;break;case"EKANS":case 23:m.evolution=23;break;case"ARBOK":case 24:m.evolution=24;break;case"PIKACHU":case 25:m.evolution=25;break;case"RAICHU":case 26:m.evolution=26;break;case"SANDSHREW":case 27:m.evolution=27;break;case"SANDSLASH":case 28:m.evolution=28;break;case"NIDORAN_FEMALE":case 29:m.evolution=29;break;case"NIDORINA":case 30:m.evolution=30;break;case"NIDOQUEEN":case 31:m.evolution=31;break;case"NIDORAN_MALE":case 32:m.evolution=32;break;case"NIDORINO":case 33:m.evolution=33;break;case"NIDOKING":case 34:m.evolution=34;break;case"CLEFAIRY":case 35:m.evolution=35;break;case"CLEFABLE":case 36:m.evolution=36;break;case"VULPIX":case 37:m.evolution=37;break;case"NINETALES":case 38:m.evolution=38;break;case"JIGGLYPUFF":case 39:m.evolution=39;break;case"WIGGLYTUFF":case 40:m.evolution=40;break;case"ZUBAT":case 41:m.evolution=41;break;case"GOLBAT":case 42:m.evolution=42;break;case"ODDISH":case 43:m.evolution=43;break;case"GLOOM":case 44:m.evolution=44;break;case"VILEPLUME":case 45:m.evolution=45;break;case"PARAS":case 46:m.evolution=46;break;case"PARASECT":case 47:m.evolution=47;break;case"VENONAT":case 48:m.evolution=48;break;case"VENOMOTH":case 49:m.evolution=49;break;case"DIGLETT":case 50:m.evolution=50;break;case"DUGTRIO":case 51:m.evolution=51;break;case"MEOWTH":case 52:m.evolution=52;break;case"PERSIAN":case 53:m.evolution=53;break;case"PSYDUCK":case 54:m.evolution=54;break;case"GOLDUCK":case 55:m.evolution=55;break;case"MANKEY":case 56:m.evolution=56;break;case"PRIMEAPE":case 57:m.evolution=57;break;case"GROWLITHE":case 58:m.evolution=58;break;case"ARCANINE":case 59:m.evolution=59;break;case"POLIWAG":case 60:m.evolution=60;break;case"POLIWHIRL":case 61:m.evolution=61;break;case"POLIWRATH":case 62:m.evolution=62;break;case"ABRA":case 63:m.evolution=63;break;case"KADABRA":case 64:m.evolution=64;break;case"ALAKAZAM":case 65:m.evolution=65;break;case"MACHOP":case 66:m.evolution=66;break;case"MACHOKE":case 67:m.evolution=67;break;case"MACHAMP":case 68:m.evolution=68;break;case"BELLSPROUT":case 69:m.evolution=69;break;case"WEEPINBELL":case 70:m.evolution=70;break;case"VICTREEBEL":case 71:m.evolution=71;break;case"TENTACOOL":case 72:m.evolution=72;break;case"TENTACRUEL":case 73:m.evolution=73;break;case"GEODUDE":case 74:m.evolution=74;break;case"GRAVELER":case 75:m.evolution=75;break;case"GOLEM":case 76:m.evolution=76;break;case"PONYTA":case 77:m.evolution=77;break;case"RAPIDASH":case 78:m.evolution=78;break;case"SLOWPOKE":case 79:m.evolution=79;break;case"SLOWBRO":case 80:m.evolution=80;break;case"MAGNEMITE":case 81:m.evolution=81;break;case"MAGNETON":case 82:m.evolution=82;break;case"FARFETCHD":case 83:m.evolution=83;break;case"DODUO":case 84:m.evolution=84;break;case"DODRIO":case 85:m.evolution=85;break;case"SEEL":case 86:m.evolution=86;break;case"DEWGONG":case 87:m.evolution=87;break;case"GRIMER":case 88:m.evolution=88;break;case"MUK":case 89:m.evolution=89;break;case"SHELLDER":case 90:m.evolution=90;break;case"CLOYSTER":case 91:m.evolution=91;break;case"GASTLY":case 92:m.evolution=92;break;case"HAUNTER":case 93:m.evolution=93;break;case"GENGAR":case 94:m.evolution=94;break;case"ONIX":case 95:m.evolution=95;break;case"DROWZEE":case 96:m.evolution=96;break;case"HYPNO":case 97:m.evolution=97;break;case"KRABBY":case 98:m.evolution=98;break;case"KINGLER":case 99:m.evolution=99;break;case"VOLTORB":case 100:m.evolution=100;break;case"ELECTRODE":case 101:m.evolution=101;break;case"EXEGGCUTE":case 102:m.evolution=102;break;case"EXEGGUTOR":case 103:m.evolution=103;break;case"CUBONE":case 104:m.evolution=104;break;case"MAROWAK":case 105:m.evolution=105;break;case"HITMONLEE":case 106:m.evolution=106;break;case"HITMONCHAN":case 107:m.evolution=107;break;case"LICKITUNG":case 108:m.evolution=108;break;case"KOFFING":case 109:m.evolution=109;break;case"WEEZING":case 110:m.evolution=110;break;case"RHYHORN":case 111:m.evolution=111;break;case"RHYDON":case 112:m.evolution=112;break;case"CHANSEY":case 113:m.evolution=113;break;case"TANGELA":case 114:m.evolution=114;break;case"KANGASKHAN":case 115:m.evolution=115;break;case"HORSEA":case 116:m.evolution=116;break;case"SEADRA":case 117:m.evolution=117;break;case"GOLDEEN":case 118:m.evolution=118;break;case"SEAKING":case 119:m.evolution=119;break;case"STARYU":case 120:m.evolution=120;break;case"STARMIE":case 121:m.evolution=121;break;case"MR_MIME":case 122:m.evolution=122;break;case"SCYTHER":case 123:m.evolution=123;break;case"JYNX":case 124:m.evolution=124;break;case"ELECTABUZZ":case 125:m.evolution=125;break;case"MAGMAR":case 126:m.evolution=126;break;case"PINSIR":case 127:m.evolution=127;break;case"TAUROS":case 128:m.evolution=128;break;case"MAGIKARP":case 129:m.evolution=129;break;case"GYARADOS":case 130:m.evolution=130;break;case"LAPRAS":case 131:m.evolution=131;break;case"DITTO":case 132:m.evolution=132;break;case"EEVEE":case 133:m.evolution=133;break;case"VAPOREON":case 134:m.evolution=134;break;case"JOLTEON":case 135:m.evolution=135;break;case"FLAREON":case 136:m.evolution=136;break;case"PORYGON":case 137:m.evolution=137;break;case"OMANYTE":case 138:m.evolution=138;break;case"OMASTAR":case 139:m.evolution=139;break;case"KABUTO":case 140:m.evolution=140;break;case"KABUTOPS":case 141:m.evolution=141;break;case"AERODACTYL":case 142:m.evolution=142;break;case"SNORLAX":case 143:m.evolution=143;break;case"ARTICUNO":case 144:m.evolution=144;break;case"ZAPDOS":case 145:m.evolution=145;break;case"MOLTRES":case 146:m.evolution=146;break;case"DRATINI":case 147:m.evolution=147;break;case"DRAGONAIR":case 148:m.evolution=148;break;case"DRAGONITE":case 149:m.evolution=149;break;case"MEWTWO":case 150:m.evolution=150;break;case"MEW":case 151:m.evolution=151;break;case"CHIKORITA":case 152:m.evolution=152;break;case"BAYLEEF":case 153:m.evolution=153;break;case"MEGANIUM":case 154:m.evolution=154;break;case"CYNDAQUIL":case 155:m.evolution=155;break;case"QUILAVA":case 156:m.evolution=156;break;case"TYPHLOSION":case 157:m.evolution=157;break;case"TOTODILE":case 158:m.evolution=158;break;case"CROCONAW":case 159:m.evolution=159;break;case"FERALIGATR":case 160:m.evolution=160;break;case"SENTRET":case 161:m.evolution=161;break;case"FURRET":case 162:m.evolution=162;break;case"HOOTHOOT":case 163:m.evolution=163;break;case"NOCTOWL":case 164:m.evolution=164;break;case"LEDYBA":case 165:m.evolution=165;break;case"LEDIAN":case 166:m.evolution=166;break;case"SPINARAK":case 167:m.evolution=167;break;case"ARIADOS":case 168:m.evolution=168;break;case"CROBAT":case 169:m.evolution=169;break;case"CHINCHOU":case 170:m.evolution=170;break;case"LANTURN":case 171:m.evolution=171;break;case"PICHU":case 172:m.evolution=172;break;case"CLEFFA":case 173:m.evolution=173;break;case"IGGLYBUFF":case 174:m.evolution=174;break;case"TOGEPI":case 175:m.evolution=175;break;case"TOGETIC":case 176:m.evolution=176;break;case"NATU":case 177:m.evolution=177;break;case"XATU":case 178:m.evolution=178;break;case"MAREEP":case 179:m.evolution=179;break;case"FLAAFFY":case 180:m.evolution=180;break;case"AMPHAROS":case 181:m.evolution=181;break;case"BELLOSSOM":case 182:m.evolution=182;break;case"MARILL":case 183:m.evolution=183;break;case"AZUMARILL":case 184:m.evolution=184;break;case"SUDOWOODO":case 185:m.evolution=185;break;case"POLITOED":case 186:m.evolution=186;break;case"HOPPIP":case 187:m.evolution=187;break;case"SKIPLOOM":case 188:m.evolution=188;break;case"JUMPLUFF":case 189:m.evolution=189;break;case"AIPOM":case 190:m.evolution=190;break;case"SUNKERN":case 191:m.evolution=191;break;case"SUNFLORA":case 192:m.evolution=192;break;case"YANMA":case 193:m.evolution=193;break;case"WOOPER":case 194:m.evolution=194;break;case"QUAGSIRE":case 195:m.evolution=195;break;case"ESPEON":case 196:m.evolution=196;break;case"UMBREON":case 197:m.evolution=197;break;case"MURKROW":case 198:m.evolution=198;break;case"SLOWKING":case 199:m.evolution=199;break;case"MISDREAVUS":case 200:m.evolution=200;break;case"UNOWN":case 201:m.evolution=201;break;case"WOBBUFFET":case 202:m.evolution=202;break;case"GIRAFARIG":case 203:m.evolution=203;break;case"PINECO":case 204:m.evolution=204;break;case"FORRETRESS":case 205:m.evolution=205;break;case"DUNSPARCE":case 206:m.evolution=206;break;case"GLIGAR":case 207:m.evolution=207;break;case"STEELIX":case 208:m.evolution=208;break;case"SNUBBULL":case 209:m.evolution=209;break;case"GRANBULL":case 210:m.evolution=210;break;case"QWILFISH":case 211:m.evolution=211;break;case"SCIZOR":case 212:m.evolution=212;break;case"SHUCKLE":case 213:m.evolution=213;break;case"HERACROSS":case 214:m.evolution=214;break;case"SNEASEL":case 215:m.evolution=215;break;case"TEDDIURSA":case 216:m.evolution=216;break;case"URSARING":case 217:m.evolution=217;break;case"SLUGMA":case 218:m.evolution=218;break;case"MAGCARGO":case 219:m.evolution=219;break;case"SWINUB":case 220:m.evolution=220;break;case"PILOSWINE":case 221:m.evolution=221;break;case"CORSOLA":case 222:m.evolution=222;break;case"REMORAID":case 223:m.evolution=223;break;case"OCTILLERY":case 224:m.evolution=224;break;case"DELIBIRD":case 225:m.evolution=225;break;case"MANTINE":case 226:m.evolution=226;break;case"SKARMORY":case 227:m.evolution=227;break;case"HOUNDOUR":case 228:m.evolution=228;break;case"HOUNDOOM":case 229:m.evolution=229;break;case"KINGDRA":case 230:m.evolution=230;break;case"PHANPY":case 231:m.evolution=231;break;case"DONPHAN":case 232:m.evolution=232;break;case"PORYGON2":case 233:m.evolution=233;break;case"STANTLER":case 234:m.evolution=234;break;case"SMEARGLE":case 235:m.evolution=235;break;case"TYROGUE":case 236:m.evolution=236;break;case"HITMONTOP":case 237:m.evolution=237;break;case"SMOOCHUM":case 238:m.evolution=238;break;case"ELEKID":case 239:m.evolution=239;break;case"MAGBY":case 240:m.evolution=240;break;case"MILTANK":case 241:m.evolution=241;break;case"BLISSEY":case 242:m.evolution=242;break;case"RAIKOU":case 243:m.evolution=243;break;case"ENTEI":case 244:m.evolution=244;break;case"SUICUNE":case 245:m.evolution=245;break;case"LARVITAR":case 246:m.evolution=246;break;case"PUPITAR":case 247:m.evolution=247;break;case"TYRANITAR":case 248:m.evolution=248;break;case"LUGIA":case 249:m.evolution=249;break;case"HO_OH":case 250:m.evolution=250;break;case"CELEBI":case 251:m.evolution=251;break;case"TREECKO":case 252:m.evolution=252;break;case"GROVYLE":case 253:m.evolution=253;break;case"SCEPTILE":case 254:m.evolution=254;break;case"TORCHIC":case 255:m.evolution=255;break;case"COMBUSKEN":case 256:m.evolution=256;break;case"BLAZIKEN":case 257:m.evolution=257;break;case"MUDKIP":case 258:m.evolution=258;break;case"MARSHTOMP":case 259:m.evolution=259;break;case"SWAMPERT":case 260:m.evolution=260;break;case"POOCHYENA":case 261:m.evolution=261;break;case"MIGHTYENA":case 262:m.evolution=262;break;case"ZIGZAGOON":case 263:m.evolution=263;break;case"LINOONE":case 264:m.evolution=264;break;case"WURMPLE":case 265:m.evolution=265;break;case"SILCOON":case 266:m.evolution=266;break;case"BEAUTIFLY":case 267:m.evolution=267;break;case"CASCOON":case 268:m.evolution=268;break;case"DUSTOX":case 269:m.evolution=269;break;case"LOTAD":case 270:m.evolution=270;break;case"LOMBRE":case 271:m.evolution=271;break;case"LUDICOLO":case 272:m.evolution=272;break;case"SEEDOT":case 273:m.evolution=273;break;case"NUZLEAF":case 274:m.evolution=274;break;case"SHIFTRY":case 275:m.evolution=275;break;case"TAILLOW":case 276:m.evolution=276;break;case"SWELLOW":case 277:m.evolution=277;break;case"WINGULL":case 278:m.evolution=278;break;case"PELIPPER":case 279:m.evolution=279;break;case"RALTS":case 280:m.evolution=280;break;case"KIRLIA":case 281:m.evolution=281;break;case"GARDEVOIR":case 282:m.evolution=282;break;case"SURSKIT":case 283:m.evolution=283;break;case"MASQUERAIN":case 284:m.evolution=284;break;case"SHROOMISH":case 285:m.evolution=285;break;case"BRELOOM":case 286:m.evolution=286;break;case"SLAKOTH":case 287:m.evolution=287;break;case"VIGOROTH":case 288:m.evolution=288;break;case"SLAKING":case 289:m.evolution=289;break;case"NINCADA":case 290:m.evolution=290;break;case"NINJASK":case 291:m.evolution=291;break;case"SHEDINJA":case 292:m.evolution=292;break;case"WHISMUR":case 293:m.evolution=293;break;case"LOUDRED":case 294:m.evolution=294;break;case"EXPLOUD":case 295:m.evolution=295;break;case"MAKUHITA":case 296:m.evolution=296;break;case"HARIYAMA":case 297:m.evolution=297;break;case"AZURILL":case 298:m.evolution=298;break;case"NOSEPASS":case 299:m.evolution=299;break;case"SKITTY":case 300:m.evolution=300;break;case"DELCATTY":case 301:m.evolution=301;break;case"SABLEYE":case 302:m.evolution=302;break;case"MAWILE":case 303:m.evolution=303;break;case"ARON":case 304:m.evolution=304;break;case"LAIRON":case 305:m.evolution=305;break;case"AGGRON":case 306:m.evolution=306;break;case"MEDITITE":case 307:m.evolution=307;break;case"MEDICHAM":case 308:m.evolution=308;break;case"ELECTRIKE":case 309:m.evolution=309;break;case"MANECTRIC":case 310:m.evolution=310;break;case"PLUSLE":case 311:m.evolution=311;break;case"MINUN":case 312:m.evolution=312;break;case"VOLBEAT":case 313:m.evolution=313;break;case"ILLUMISE":case 314:m.evolution=314;break;case"ROSELIA":case 315:m.evolution=315;break;case"GULPIN":case 316:m.evolution=316;break;case"SWALOT":case 317:m.evolution=317;break;case"CARVANHA":case 318:m.evolution=318;break;case"SHARPEDO":case 319:m.evolution=319;break;case"WAILMER":case 320:m.evolution=320;break;case"WAILORD":case 321:m.evolution=321;break;case"NUMEL":case 322:m.evolution=322;break;case"CAMERUPT":case 323:m.evolution=323;break;case"TORKOAL":case 324:m.evolution=324;break;case"SPOINK":case 325:m.evolution=325;break;case"GRUMPIG":case 326:m.evolution=326;break;case"SPINDA":case 327:m.evolution=327;break;case"TRAPINCH":case 328:m.evolution=328;break;case"VIBRAVA":case 329:m.evolution=329;break;case"FLYGON":case 330:m.evolution=330;break;case"CACNEA":case 331:m.evolution=331;break;case"CACTURNE":case 332:m.evolution=332;break;case"SWABLU":case 333:m.evolution=333;break;case"ALTARIA":case 334:m.evolution=334;break;case"ZANGOOSE":case 335:m.evolution=335;break;case"SEVIPER":case 336:m.evolution=336;break;case"LUNATONE":case 337:m.evolution=337;break;case"SOLROCK":case 338:m.evolution=338;break;case"BARBOACH":case 339:m.evolution=339;break;case"WHISCASH":case 340:m.evolution=340;break;case"CORPHISH":case 341:m.evolution=341;break;case"CRAWDAUNT":case 342:m.evolution=342;break;case"BALTOY":case 343:m.evolution=343;break;case"CLAYDOL":case 344:m.evolution=344;break;case"LILEEP":case 345:m.evolution=345;break;case"CRADILY":case 346:m.evolution=346;break;case"ANORITH":case 347:m.evolution=347;break;case"ARMALDO":case 348:m.evolution=348;break;case"FEEBAS":case 349:m.evolution=349;break;case"MILOTIC":case 350:m.evolution=350;break;case"CASTFORM":case 351:m.evolution=351;break;case"KECLEON":case 352:m.evolution=352;break;case"SHUPPET":case 353:m.evolution=353;break;case"BANETTE":case 354:m.evolution=354;break;case"DUSKULL":case 355:m.evolution=355;break;case"DUSCLOPS":case 356:m.evolution=356;break;case"TROPIUS":case 357:m.evolution=357;break;case"CHIMECHO":case 358:m.evolution=358;break;case"ABSOL":case 359:m.evolution=359;break;case"WYNAUT":case 360:m.evolution=360;break;case"SNORUNT":case 361:m.evolution=361;break;case"GLALIE":case 362:m.evolution=362;break;case"SPHEAL":case 363:m.evolution=363;break;case"SEALEO":case 364:m.evolution=364;break;case"WALREIN":case 365:m.evolution=365;break;case"CLAMPERL":case 366:m.evolution=366;break;case"HUNTAIL":case 367:m.evolution=367;break;case"GOREBYSS":case 368:m.evolution=368;break;case"RELICANTH":case 369:m.evolution=369;break;case"LUVDISC":case 370:m.evolution=370;break;case"BAGON":case 371:m.evolution=371;break;case"SHELGON":case 372:m.evolution=372;break;case"SALAMENCE":case 373:m.evolution=373;break;case"BELDUM":case 374:m.evolution=374;break;case"METANG":case 375:m.evolution=375;break;case"METAGROSS":case 376:m.evolution=376;break;case"REGIROCK":case 377:m.evolution=377;break;case"REGICE":case 378:m.evolution=378;break;case"REGISTEEL":case 379:m.evolution=379;break;case"LATIAS":case 380:m.evolution=380;break;case"LATIOS":case 381:m.evolution=381;break;case"KYOGRE":case 382:m.evolution=382;break;case"GROUDON":case 383:m.evolution=383;break;case"RAYQUAZA":case 384:m.evolution=384;break;case"JIRACHI":case 385:m.evolution=385;break;case"DEOXYS":case 386:m.evolution=386;break;case"TURTWIG":case 387:m.evolution=387;break;case"GROTLE":case 388:m.evolution=388;break;case"TORTERRA":case 389:m.evolution=389;break;case"CHIMCHAR":case 390:m.evolution=390;break;case"MONFERNO":case 391:m.evolution=391;break;case"INFERNAPE":case 392:m.evolution=392;break;case"PIPLUP":case 393:m.evolution=393;break;case"PRINPLUP":case 394:m.evolution=394;break;case"EMPOLEON":case 395:m.evolution=395;break;case"STARLY":case 396:m.evolution=396;break;case"STARAVIA":case 397:m.evolution=397;break;case"STARAPTOR":case 398:m.evolution=398;break;case"BIDOOF":case 399:m.evolution=399;break;case"BIBAREL":case 400:m.evolution=400;break;case"KRICKETOT":case 401:m.evolution=401;break;case"KRICKETUNE":case 402:m.evolution=402;break;case"SHINX":case 403:m.evolution=403;break;case"LUXIO":case 404:m.evolution=404;break;case"LUXRAY":case 405:m.evolution=405;break;case"BUDEW":case 406:m.evolution=406;break;case"ROSERADE":case 407:m.evolution=407;break;case"CRANIDOS":case 408:m.evolution=408;break;case"RAMPARDOS":case 409:m.evolution=409;break;case"SHIELDON":case 410:m.evolution=410;break;case"BASTIODON":case 411:m.evolution=411;break;case"BURMY":case 412:m.evolution=412;break;case"WORMADAM":case 413:m.evolution=413;break;case"MOTHIM":case 414:m.evolution=414;break;case"COMBEE":case 415:m.evolution=415;break;case"VESPIQUEN":case 416:m.evolution=416;break;case"PACHIRISU":case 417:m.evolution=417;break;case"BUIZEL":case 418:m.evolution=418;break;case"FLOATZEL":case 419:m.evolution=419;break;case"CHERUBI":case 420:m.evolution=420;break;case"CHERRIM":case 421:m.evolution=421;break;case"SHELLOS":case 422:m.evolution=422;break;case"GASTRODON":case 423:m.evolution=423;break;case"AMBIPOM":case 424:m.evolution=424;break;case"DRIFLOON":case 425:m.evolution=425;break;case"DRIFBLIM":case 426:m.evolution=426;break;case"BUNEARY":case 427:m.evolution=427;break;case"LOPUNNY":case 428:m.evolution=428;break;case"MISMAGIUS":case 429:m.evolution=429;break;case"HONCHKROW":case 430:m.evolution=430;break;case"GLAMEOW":case 431:m.evolution=431;break;case"PURUGLY":case 432:m.evolution=432;break;case"CHINGLING":case 433:m.evolution=433;break;case"STUNKY":case 434:m.evolution=434;break;case"SKUNTANK":case 435:m.evolution=435;break;case"BRONZOR":case 436:m.evolution=436;break;case"BRONZONG":case 437:m.evolution=437;break;case"BONSLY":case 438:m.evolution=438;break;case"MIME_JR":case 439:m.evolution=439;break;case"HAPPINY":case 440:m.evolution=440;break;case"CHATOT":case 441:m.evolution=441;break;case"SPIRITOMB":case 442:m.evolution=442;break;case"GIBLE":case 443:m.evolution=443;break;case"GABITE":case 444:m.evolution=444;break;case"GARCHOMP":case 445:m.evolution=445;break;case"MUNCHLAX":case 446:m.evolution=446;break;case"RIOLU":case 447:m.evolution=447;break;case"LUCARIO":case 448:m.evolution=448;break;case"HIPPOPOTAS":case 449:m.evolution=449;break;case"HIPPOWDON":case 450:m.evolution=450;break;case"SKORUPI":case 451:m.evolution=451;break;case"DRAPION":case 452:m.evolution=452;break;case"CROAGUNK":case 453:m.evolution=453;break;case"TOXICROAK":case 454:m.evolution=454;break;case"CARNIVINE":case 455:m.evolution=455;break;case"FINNEON":case 456:m.evolution=456;break;case"LUMINEON":case 457:m.evolution=457;break;case"MANTYKE":case 458:m.evolution=458;break;case"SNOVER":case 459:m.evolution=459;break;case"ABOMASNOW":case 460:m.evolution=460;break;case"WEAVILE":case 461:m.evolution=461;break;case"MAGNEZONE":case 462:m.evolution=462;break;case"LICKILICKY":case 463:m.evolution=463;break;case"RHYPERIOR":case 464:m.evolution=464;break;case"TANGROWTH":case 465:m.evolution=465;break;case"ELECTIVIRE":case 466:m.evolution=466;break;case"MAGMORTAR":case 467:m.evolution=467;break;case"TOGEKISS":case 468:m.evolution=468;break;case"YANMEGA":case 469:m.evolution=469;break;case"LEAFEON":case 470:m.evolution=470;break;case"GLACEON":case 471:m.evolution=471;break;case"GLISCOR":case 472:m.evolution=472;break;case"MAMOSWINE":case 473:m.evolution=473;break;case"PORYGON_Z":case 474:m.evolution=474;break;case"GALLADE":case 475:m.evolution=475;break;case"PROBOPASS":case 476:m.evolution=476;break;case"DUSKNOIR":case 477:m.evolution=477;break;case"FROSLASS":case 478:m.evolution=478;break;case"ROTOM":case 479:m.evolution=479;break;case"UXIE":case 480:m.evolution=480;break;case"MESPRIT":case 481:m.evolution=481;break;case"AZELF":case 482:m.evolution=482;break;case"DIALGA":case 483:m.evolution=483;break;case"PALKIA":case 484:m.evolution=484;break;case"HEATRAN":case 485:m.evolution=485;break;case"REGIGIGAS":case 486:m.evolution=486;break;case"GIRATINA":case 487:m.evolution=487;break;case"CRESSELIA":case 488:m.evolution=488;break;case"PHIONE":case 489:m.evolution=489;break;case"MANAPHY":case 490:m.evolution=490;break;case"DARKRAI":case 491:m.evolution=491;break;case"SHAYMIN":case 492:m.evolution=492;break;case"ARCEUS":case 493:m.evolution=493;break;case"MELTAN":case 808:m.evolution=808;break;case"MELMETAL":case 809:m.evolution=809;break}switch(d.evolution_item_requirement){case"ITEM_UNKNOWN":case 0:m.evolution_item_requirement=0;break;case"ITEM_POKE_BALL":case 1:m.evolution_item_requirement=1;break;case"ITEM_GREAT_BALL":case 2:m.evolution_item_requirement=2;break;case"ITEM_ULTRA_BALL":case 3:m.evolution_item_requirement=3;break;case"ITEM_MASTER_BALL":case 4:m.evolution_item_requirement=4;break;case"ITEM_PREMIER_BALL":case 5:m.evolution_item_requirement=5;break;case"ITEM_POTION":case 101:m.evolution_item_requirement=101;break;case"ITEM_SUPER_POTION":case 102:m.evolution_item_requirement=102;break;case"ITEM_HYPER_POTION":case 103:m.evolution_item_requirement=103;break;case"ITEM_MAX_POTION":case 104:m.evolution_item_requirement=104;break;case"ITEM_REVIVE":case 201:m.evolution_item_requirement=201;break;case"ITEM_MAX_REVIVE":case 202:m.evolution_item_requirement=202;break;case"ITEM_LUCKY_EGG":case 301:m.evolution_item_requirement=301;break;case"ITEM_INCENSE_ORDINARY":case 401:m.evolution_item_requirement=401;break;case"ITEM_INCENSE_SPICY":case 402:m.evolution_item_requirement=402;break;case"ITEM_INCENSE_COOL":case 403:m.evolution_item_requirement=403;break;case"ITEM_INCENSE_FLORAL":case 404:m.evolution_item_requirement=404;break;case"ITEM_INCENSE_BELUGA_BOX":case 405:m.evolution_item_requirement=405;break;case"ITEM_TROY_DISK":case 501:m.evolution_item_requirement=501;break;case"ITEM_X_ATTACK":case 602:m.evolution_item_requirement=602;break;case"ITEM_X_DEFENSE":case 603:m.evolution_item_requirement=603;break;case"ITEM_X_MIRACLE":case 604:m.evolution_item_requirement=604;break;case"ITEM_RAZZ_BERRY":case 701:m.evolution_item_requirement=701;break;case"ITEM_BLUK_BERRY":case 702:m.evolution_item_requirement=702;break;case"ITEM_NANAB_BERRY":case 703:m.evolution_item_requirement=703;break;case"ITEM_WEPAR_BERRY":case 704:m.evolution_item_requirement=704;break;case"ITEM_PINAP_BERRY":case 705:m.evolution_item_requirement=705;break;case"ITEM_GOLDEN_RAZZ_BERRY":case 706:m.evolution_item_requirement=706;break;case"ITEM_GOLDEN_NANAB_BERRY":case 707:m.evolution_item_requirement=707;break;case"ITEM_GOLDEN_PINAP_BERRY":case 708:m.evolution_item_requirement=708;break;case"ITEM_SPECIAL_CAMERA":case 801:m.evolution_item_requirement=801;break;case"ITEM_INCUBATOR_BASIC_UNLIMITED":case 901:m.evolution_item_requirement=901;break;case"ITEM_INCUBATOR_BASIC":case 902:m.evolution_item_requirement=902;break;case"ITEM_INCUBATOR_SUPER":case 903:m.evolution_item_requirement=903;break;case"ITEM_POKEMON_STORAGE_UPGRADE":case 1001:m.evolution_item_requirement=1001;break;case"ITEM_ITEM_STORAGE_UPGRADE":case 1002:m.evolution_item_requirement=1002;break;case"ITEM_SUN_STONE":case 1101:m.evolution_item_requirement=1101;break;case"ITEM_KINGS_ROCK":case 1102:m.evolution_item_requirement=1102;break;case"ITEM_METAL_COAT":case 1103:m.evolution_item_requirement=1103;break;case"ITEM_DRAGON_SCALE":case 1104:m.evolution_item_requirement=1104;break;case"ITEM_UP_GRADE":case 1105:m.evolution_item_requirement=1105;break;case"ITEM_GEN4_EVOLUTION_STONE":case 1106:m.evolution_item_requirement=1106;break;case"ITEM_MOVE_REROLL_FAST_ATTACK":case 1201:m.evolution_item_requirement=1201;break;case"ITEM_MOVE_REROLL_SPECIAL_ATTACK":case 1202:m.evolution_item_requirement=1202;break;case"ITEM_RARE_CANDY":case 1301:m.evolution_item_requirement=1301;break;case"ITEM_FREE_RAID_TICKET":case 1401:m.evolution_item_requirement=1401;break;case"ITEM_PAID_RAID_TICKET":case 1402:m.evolution_item_requirement=1402;break;case"ITEM_LEGENDARY_RAID_TICKET":case 1403:m.evolution_item_requirement=1403;break;case"ITEM_STAR_PIECE":case 1404:m.evolution_item_requirement=1404;break;case"ITEM_FRIEND_GIFT_BOX":case 1405:m.evolution_item_requirement=1405;break}if(d.candy_cost!=null){m.candy_cost=d.candy_cost|0}if(d.km_buddy_distance_requirement!=null){m.km_buddy_distance_requirement=Number(d.km_buddy_distance_requirement)}switch(d.form){case"FORM_UNSET":case 0:m.form=0;break;case"UNOWN_A":case 1:m.form=1;break;case"UNOWN_B":case 2:m.form=2;break;case"UNOWN_C":case 3:m.form=3;break;case"UNOWN_D":case 4:m.form=4;break;case"UNOWN_E":case 5:m.form=5;break;case"UNOWN_F":case 6:m.form=6;break;case"UNOWN_G":case 7:m.form=7;break;case"UNOWN_H":case 8:m.form=8;break;case"UNOWN_I":case 9:m.form=9;break;case"UNOWN_J":case 10:m.form=10;break;case"UNOWN_K":case 11:m.form=11;break;case"UNOWN_L":case 12:m.form=12;break;case"UNOWN_M":case 13:m.form=13;break;case"UNOWN_N":case 14:m.form=14;break;case"UNOWN_O":case 15:m.form=15;break;case"UNOWN_P":case 16:m.form=16;break;case"UNOWN_Q":case 17:m.form=17;break;case"UNOWN_R":case 18:m.form=18;break;case"UNOWN_S":case 19:m.form=19;break;case"UNOWN_T":case 20:m.form=20;break;case"UNOWN_U":case 21:m.form=21;break;case"UNOWN_V":case 22:m.form=22;break;case"UNOWN_W":case 23:m.form=23;break;case"UNOWN_X":case 24:m.form=24;break;case"UNOWN_Y":case 25:m.form=25;break;case"UNOWN_Z":case 26:m.form=26;break;case"UNOWN_EXCLAMATION_POINT":case 27:m.form=27;break;case"UNOWN_QUESTION_MARK":case 28:m.form=28;break;case"CASTFORM_NORMAL":case 29:m.form=29;break;case"CASTFORM_SUNNY":case 30:m.form=30;break;case"CASTFORM_RAINY":case 31:m.form=31;break;case"CASTFORM_SNOWY":case 32:m.form=32;break;case"DEOXYS_NORMAL":case 33:m.form=33;break;case"DEOXYS_ATTACK":case 34:m.form=34;break;case"DEOXYS_DEFENSE":case 35:m.form=35;break;case"DEOXYS_SPEED":case 36:m.form=36;break;case"SPINDA_00":case 37:m.form=37;break;case"SPINDA_01":case 38:m.form=38;break;case"SPINDA_02":case 39:m.form=39;break;case"SPINDA_03":case 40:m.form=40;break;case"SPINDA_04":case 41:m.form=41;break;case"SPINDA_05":case 42:m.form=42;break;case"SPINDA_06":case 43:m.form=43;break;case"SPINDA_07":case 44:m.form=44;break;case"RATTATA_NORMAL":case 45:m.form=45;break;case"RATTATA_ALOLA":case 46:m.form=46;break;case"RATICATE_NORMAL":case 47:m.form=47;break;case"RATICATE_ALOLA":case 48:m.form=48;break;case"RAICHU_NORMAL":case 49:m.form=49;break;case"RAICHU_ALOLA":case 50:m.form=50;break;case"SANDSHREW_NORMAL":case 51:m.form=51;break;case"SANDSHREW_ALOLA":case 52:m.form=52;break;case"SANDSLASH_NORMAL":case 53:m.form=53;break;case"SANDSLASH_ALOLA":case 54:m.form=54;break;case"VULPIX_NORMAL":case 55:m.form=55;break;case"VULPIX_ALOLA":case 56:m.form=56;break;case"NINETALES_NORMAL":case 57:m.form=57;break;case"NINETALES_ALOLA":case 58:m.form=58;break;case"DIGLETT_NORMAL":case 59:m.form=59;break;case"DIGLETT_ALOLA":case 60:m.form=60;break;case"DUGTRIO_NORMAL":case 61:m.form=61;break;case"DUGTRIO_ALOLA":case 62:m.form=62;break;case"MEOWTH_NORMAL":case 63:m.form=63;break;case"MEOWTH_ALOLA":case 64:m.form=64;break;case"PERSIAN_NORMAL":case 65:m.form=65;break;case"PERSIAN_ALOLA":case 66:m.form=66;break;case"GEODUDE_NORMAL":case 67:m.form=67;break;case"GEODUDE_ALOLA":case 68:m.form=68;break;case"GRAVELER_NORMAL":case 69:m.form=69;break;case"GRAVELER_ALOLA":case 70:m.form=70;break;case"GOLEM_NORMAL":case 71:m.form=71;break;case"GOLEM_ALOLA":case 72:m.form=72;break;case"GRIMER_NORMAL":case 73:m.form=73;break;case"GRIMER_ALOLA":case 74:m.form=74;break;case"MUK_NORMAL":case 75:m.form=75;break;case"MUK_ALOLA":case 76:m.form=76;break;case"EXEGGUTOR_NORMAL":case 77:m.form=77;break;case"EXEGGUTOR_ALOLA":case 78:m.form=78;break;case"MAROWAK_NORMAL":case 79:m.form=79;break;case"MAROWAK_ALOLA":case 80:m.form=80;break;case"ROTOM_NORMAL":case 81:m.form=81;break;case"ROTOM_FROST":case 82:m.form=82;break;case"ROTOM_FAN":case 83:m.form=83;break;case"ROTOM_MOW":case 84:m.form=84;break;case"ROTOM_WASH":case 85:m.form=85;break;case"ROTOM_HEAT":case 86:m.form=86;break;case"WORMADAM_PLANT":case 87:m.form=87;break;case"WORMADAM_SANDY":case 88:m.form=88;break;case"WORMADAM_TRASH":case 89:m.form=89;break;case"GIRATINA_ALTERED":case 90:m.form=90;break;case"GIRATINA_ORIGIN":case 91:m.form=91;break;case"SHAYMIN_SKY":case 92:m.form=92;break;case"SHAYMIN_LAND":case 93:m.form=93;break;case"CHERRIM_OVERCAST":case 94:m.form=94;break;case"CHERRIM_SUNNY":case 95:m.form=95;break;case"SHELLOS_WEST_SEA":case 96:m.form=96;break;case"SHELLOS_EAST_SEA":case 97:m.form=97;break;case"GASTRODON_WEST_SEA":case 98:m.form=98;break;case"GASTRODON_EAST_SEA":case 99:m.form=99;break;case"ARCEUS_NORMAL":case 100:m.form=100;break;case"ARCEUS_FIGHTING":case 101:m.form=101;break;case"ARCEUS_FLYING":case 102:m.form=102;break;case"ARCEUS_POISON":case 103:m.form=103;break;case"ARCEUS_GROUND":case 104:m.form=104;break;case"ARCEUS_ROCK":case 105:m.form=105;break;case"ARCEUS_BUG":case 106:m.form=106;break;case"ARCEUS_GHOST":case 107:m.form=107;break;case"ARCEUS_STEEL":case 108:m.form=108;break;case"ARCEUS_FIRE":case 109:m.form=109;break;case"ARCEUS_WATER":case 110:m.form=110;break;case"ARCEUS_GRASS":case 111:m.form=111;break;case"ARCEUS_ELECTRIC":case 112:m.form=112;break;case"ARCEUS_PSYCHIC":case 113:m.form=113;break;case"ARCEUS_ICE":case 114:m.form=114;break;case"ARCEUS_DRAGON":case 115:m.form=115;break;case"ARCEUS_DARK":case 116:m.form=116;break;case"ARCEUS_FAIRY":case 117:m.form=117;break;case"BURMY_PLANT":case 118:m.form=118;break;case"BURMY_SANDY":case 119:m.form=119;break;case"BURMY_TRASH":case 120:m.form=120;break}return m};EvolutionBranch.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.evolution=o.enums===String?"MISSINGNO":0;d.evolution_item_requirement=o.enums===String?"ITEM_UNKNOWN":0;d.candy_cost=0;d.km_buddy_distance_requirement=0;d.form=o.enums===String?"FORM_UNSET":0}if(m.evolution!=null&&m.hasOwnProperty("evolution")){d.evolution=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.evolution]:m.evolution}if(m.evolution_item_requirement!=null&&m.hasOwnProperty("evolution_item_requirement")){d.evolution_item_requirement=o.enums===String?$root.POGOProtos.Inventory.Item.ItemId[m.evolution_item_requirement]:m.evolution_item_requirement}if(m.candy_cost!=null&&m.hasOwnProperty("candy_cost")){d.candy_cost=m.candy_cost}if(m.km_buddy_distance_requirement!=null&&m.hasOwnProperty("km_buddy_distance_requirement")){d.km_buddy_distance_requirement=o.json&&!isFinite(m.km_buddy_distance_requirement)?String(m.km_buddy_distance_requirement):m.km_buddy_distance_requirement}if(m.form!=null&&m.hasOwnProperty("form")){d.form=o.enums===String?$root.POGOProtos.Enums.Form[m.form]:m.form}return d};EvolutionBranch.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return EvolutionBranch}();Pokemon.PokemonGenderSettings=function(){function PokemonGenderSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokemonGenderSettings.prototype.male_percent=0;PokemonGenderSettings.prototype.female_percent=0;PokemonGenderSettings.prototype.genderless_percent=0;PokemonGenderSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.male_percent!=null&&m.hasOwnProperty("male_percent"))w.uint32(13).float(m.male_percent);if(m.female_percent!=null&&m.hasOwnProperty("female_percent"))w.uint32(21).float(m.female_percent);if(m.genderless_percent!=null&&m.hasOwnProperty("genderless_percent"))w.uint32(29).float(m.genderless_percent);return w};PokemonGenderSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Pokemon.PokemonGenderSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.male_percent=r.float();break;case 2:m.female_percent=r.float();break;case 3:m.genderless_percent=r.float();break;default:r.skipType(t&7);break}}return m};PokemonGenderSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Pokemon.PokemonGenderSettings)return d;var m=new $root.POGOProtos.Settings.Master.Pokemon.PokemonGenderSettings;if(d.male_percent!=null){m.male_percent=Number(d.male_percent)}if(d.female_percent!=null){m.female_percent=Number(d.female_percent)}if(d.genderless_percent!=null){m.genderless_percent=Number(d.genderless_percent)}return m};PokemonGenderSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.male_percent=0;d.female_percent=0;d.genderless_percent=0}if(m.male_percent!=null&&m.hasOwnProperty("male_percent")){d.male_percent=o.json&&!isFinite(m.male_percent)?String(m.male_percent):m.male_percent}if(m.female_percent!=null&&m.hasOwnProperty("female_percent")){d.female_percent=o.json&&!isFinite(m.female_percent)?String(m.female_percent):m.female_percent}if(m.genderless_percent!=null&&m.hasOwnProperty("genderless_percent")){d.genderless_percent=o.json&&!isFinite(m.genderless_percent)?String(m.genderless_percent):m.genderless_percent}return d};PokemonGenderSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokemonGenderSettings}();Pokemon.StatsAttributes=function(){function StatsAttributes(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}StatsAttributes.prototype.base_stamina=0;StatsAttributes.prototype.base_attack=0;StatsAttributes.prototype.base_defense=0;StatsAttributes.prototype.dodge_energy_delta=0;StatsAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.base_stamina!=null&&m.hasOwnProperty("base_stamina"))w.uint32(8).int32(m.base_stamina);if(m.base_attack!=null&&m.hasOwnProperty("base_attack"))w.uint32(16).int32(m.base_attack);if(m.base_defense!=null&&m.hasOwnProperty("base_defense"))w.uint32(24).int32(m.base_defense);if(m.dodge_energy_delta!=null&&m.hasOwnProperty("dodge_energy_delta"))w.uint32(64).int32(m.dodge_energy_delta);return w};StatsAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Pokemon.StatsAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.base_stamina=r.int32();break;case 2:m.base_attack=r.int32();break;case 3:m.base_defense=r.int32();break;case 8:m.dodge_energy_delta=r.int32();break;default:r.skipType(t&7);break}}return m};StatsAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Pokemon.StatsAttributes)return d;var m=new $root.POGOProtos.Settings.Master.Pokemon.StatsAttributes;if(d.base_stamina!=null){m.base_stamina=d.base_stamina|0}if(d.base_attack!=null){m.base_attack=d.base_attack|0}if(d.base_defense!=null){m.base_defense=d.base_defense|0}if(d.dodge_energy_delta!=null){m.dodge_energy_delta=d.dodge_energy_delta|0}return m};StatsAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.base_stamina=0;d.base_attack=0;d.base_defense=0;d.dodge_energy_delta=0}if(m.base_stamina!=null&&m.hasOwnProperty("base_stamina")){d.base_stamina=m.base_stamina}if(m.base_attack!=null&&m.hasOwnProperty("base_attack")){d.base_attack=m.base_attack}if(m.base_defense!=null&&m.hasOwnProperty("base_defense")){d.base_defense=m.base_defense}if(m.dodge_energy_delta!=null&&m.hasOwnProperty("dodge_energy_delta")){d.dodge_energy_delta=m.dodge_energy_delta}return d};StatsAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return StatsAttributes}();return Pokemon}();Master.PokemonScaleSetting=function(){function PokemonScaleSetting(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokemonScaleSetting.prototype.pokemon_scale_mode=0;PokemonScaleSetting.prototype.min_height=0;PokemonScaleSetting.prototype.max_height=0;PokemonScaleSetting.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_scale_mode!=null&&m.hasOwnProperty("pokemon_scale_mode"))w.uint32(8).int32(m.pokemon_scale_mode);if(m.min_height!=null&&m.hasOwnProperty("min_height"))w.uint32(21).float(m.min_height);if(m.max_height!=null&&m.hasOwnProperty("max_height"))w.uint32(29).float(m.max_height);return w};PokemonScaleSetting.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.PokemonScaleSetting;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_scale_mode=r.int32();break;case 2:m.min_height=r.float();break;case 3:m.max_height=r.float();break;default:r.skipType(t&7);break}}return m};PokemonScaleSetting.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.PokemonScaleSetting)return d;var m=new $root.POGOProtos.Settings.Master.PokemonScaleSetting;switch(d.pokemon_scale_mode){case"NaturalScale":case 0:m.pokemon_scale_mode=0;break;case"GuiScale":case 1:m.pokemon_scale_mode=1;break;case"BattlePokemonScale":case 2:m.pokemon_scale_mode=2;break;case"RaidBossScale":case 3:m.pokemon_scale_mode=3;break;case"GymTopperScale":case 4:m.pokemon_scale_mode=4;break;case"MapPokemonScale":case 5:m.pokemon_scale_mode=5;break}if(d.min_height!=null){m.min_height=Number(d.min_height)}if(d.max_height!=null){m.max_height=Number(d.max_height)}return m};PokemonScaleSetting.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pokemon_scale_mode=o.enums===String?"NaturalScale":0;d.min_height=0;d.max_height=0}if(m.pokemon_scale_mode!=null&&m.hasOwnProperty("pokemon_scale_mode")){d.pokemon_scale_mode=o.enums===String?$root.POGOProtos.Settings.Master.PokemonScaleSetting.PokemonScaleMode[m.pokemon_scale_mode]:m.pokemon_scale_mode}if(m.min_height!=null&&m.hasOwnProperty("min_height")){d.min_height=o.json&&!isFinite(m.min_height)?String(m.min_height):m.min_height}if(m.max_height!=null&&m.hasOwnProperty("max_height")){d.max_height=o.json&&!isFinite(m.max_height)?String(m.max_height):m.max_height}return d};PokemonScaleSetting.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PokemonScaleSetting.PokemonScaleMode=function(){var valuesById={},values=Object.create(valuesById);values[valuesById[0]="NaturalScale"]=0;values[valuesById[1]="GuiScale"]=1;values[valuesById[2]="BattlePokemonScale"]=2;values[valuesById[3]="RaidBossScale"]=3;values[valuesById[4]="GymTopperScale"]=4;values[valuesById[5]="MapPokemonScale"]=5;return values}();return PokemonScaleSetting}();Master.PokemonSettings=function(){function PokemonSettings(p){this.quick_moves=[];this.cinematic_moves=[];this.animation_time=[];this.evolution_ids=[];this.evolution_branch=[];this.buddy_offset_male=[];this.buddy_offset_female=[];this.buddy_portrait_offset=[];this.combat_shoulder_camera_angle=[];this.combat_default_camera_angle=[];this.combat_opponent_focus_camera_angle=[];this.combat_player_focus_camera_angle=[];this.combat_player_pokemon_position_offset=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokemonSettings.prototype.pokemon_id=0;PokemonSettings.prototype.model_scale=0;PokemonSettings.prototype.type=0;PokemonSettings.prototype.type_2=0;PokemonSettings.prototype.camera=null;PokemonSettings.prototype.encounter=null;PokemonSettings.prototype.stats=null;PokemonSettings.prototype.quick_moves=$util.emptyArray;PokemonSettings.prototype.cinematic_moves=$util.emptyArray;PokemonSettings.prototype.animation_time=$util.emptyArray;PokemonSettings.prototype.evolution_ids=$util.emptyArray;PokemonSettings.prototype.evolution_pips=0;PokemonSettings.prototype.rarity=0;PokemonSettings.prototype.pokedex_height_m=0;PokemonSettings.prototype.pokedex_weight_kg=0;PokemonSettings.prototype.parent_pokemon_id=0;PokemonSettings.prototype.height_std_dev=0;PokemonSettings.prototype.weight_std_dev=0;PokemonSettings.prototype.km_distance_to_hatch=0;PokemonSettings.prototype.family_id=0;PokemonSettings.prototype.candy_to_evolve=0;PokemonSettings.prototype.km_buddy_distance=0;PokemonSettings.prototype.buddy_size=0;PokemonSettings.prototype.model_height=0;PokemonSettings.prototype.evolution_branch=$util.emptyArray;PokemonSettings.prototype.model_scale_v2=0;PokemonSettings.prototype.form=0;PokemonSettings.prototype.event_quick_move=0;PokemonSettings.prototype.event_cinematic_move=0;PokemonSettings.prototype.buddy_offset_male=$util.emptyArray;PokemonSettings.prototype.buddy_offset_female=$util.emptyArray;PokemonSettings.prototype.buddy_scale=0;PokemonSettings.prototype.buddy_portrait_offset=$util.emptyArray;PokemonSettings.prototype.parent_form=0;PokemonSettings.prototype.third_move=null;PokemonSettings.prototype.is_transferable=false;PokemonSettings.prototype.is_deployable=false;PokemonSettings.prototype.combat_shoulder_camera_angle=$util.emptyArray;PokemonSettings.prototype.is_tradable=false;PokemonSettings.prototype.combat_default_camera_angle=$util.emptyArray;PokemonSettings.prototype.combat_opponent_focus_camera_angle=$util.emptyArray;PokemonSettings.prototype.combat_player_focus_camera_angle=$util.emptyArray;PokemonSettings.prototype.combat_player_pokemon_position_offset=$util.emptyArray;PokemonSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id"))w.uint32(8).int32(m.pokemon_id);if(m.model_scale!=null&&m.hasOwnProperty("model_scale"))w.uint32(29).float(m.model_scale);if(m.type!=null&&m.hasOwnProperty("type"))w.uint32(32).int32(m.type);if(m.type_2!=null&&m.hasOwnProperty("type_2"))w.uint32(40).int32(m.type_2);if(m.camera!=null&&m.hasOwnProperty("camera"))$root.POGOProtos.Settings.Master.Pokemon.CameraAttributes.encode(m.camera,w.uint32(50).fork()).ldelim();if(m.encounter!=null&&m.hasOwnProperty("encounter"))$root.POGOProtos.Settings.Master.Pokemon.EncounterAttributes.encode(m.encounter,w.uint32(58).fork()).ldelim();if(m.stats!=null&&m.hasOwnProperty("stats"))$root.POGOProtos.Settings.Master.Pokemon.StatsAttributes.encode(m.stats,w.uint32(66).fork()).ldelim();if(m.quick_moves!=null&&m.quick_moves.length){w.uint32(74).fork();for(var i=0;i<m.quick_moves.length;++i)w.int32(m.quick_moves[i]);w.ldelim()}if(m.cinematic_moves!=null&&m.cinematic_moves.length){w.uint32(82).fork();for(var i=0;i<m.cinematic_moves.length;++i)w.int32(m.cinematic_moves[i]);w.ldelim()}if(m.animation_time!=null&&m.animation_time.length){w.uint32(90).fork();for(var i=0;i<m.animation_time.length;++i)w.float(m.animation_time[i]);w.ldelim()}if(m.evolution_ids!=null&&m.evolution_ids.length){w.uint32(98).fork();for(var i=0;i<m.evolution_ids.length;++i)w.int32(m.evolution_ids[i]);w.ldelim()}if(m.evolution_pips!=null&&m.hasOwnProperty("evolution_pips"))w.uint32(104).int32(m.evolution_pips);if(m.rarity!=null&&m.hasOwnProperty("rarity"))w.uint32(112).int32(m.rarity);if(m.pokedex_height_m!=null&&m.hasOwnProperty("pokedex_height_m"))w.uint32(125).float(m.pokedex_height_m);if(m.pokedex_weight_kg!=null&&m.hasOwnProperty("pokedex_weight_kg"))w.uint32(133).float(m.pokedex_weight_kg);if(m.parent_pokemon_id!=null&&m.hasOwnProperty("parent_pokemon_id"))w.uint32(136).int32(m.parent_pokemon_id);if(m.height_std_dev!=null&&m.hasOwnProperty("height_std_dev"))w.uint32(149).float(m.height_std_dev);if(m.weight_std_dev!=null&&m.hasOwnProperty("weight_std_dev"))w.uint32(157).float(m.weight_std_dev);if(m.km_distance_to_hatch!=null&&m.hasOwnProperty("km_distance_to_hatch"))w.uint32(165).float(m.km_distance_to_hatch);if(m.family_id!=null&&m.hasOwnProperty("family_id"))w.uint32(168).int32(m.family_id);if(m.candy_to_evolve!=null&&m.hasOwnProperty("candy_to_evolve"))w.uint32(176).int32(m.candy_to_evolve);if(m.km_buddy_distance!=null&&m.hasOwnProperty("km_buddy_distance"))w.uint32(189).float(m.km_buddy_distance);if(m.buddy_size!=null&&m.hasOwnProperty("buddy_size"))w.uint32(192).int32(m.buddy_size);if(m.model_height!=null&&m.hasOwnProperty("model_height"))w.uint32(205).float(m.model_height);if(m.evolution_branch!=null&&m.evolution_branch.length){for(var i=0;i<m.evolution_branch.length;++i)$root.POGOProtos.Settings.Master.Pokemon.EvolutionBranch.encode(m.evolution_branch[i],w.uint32(210).fork()).ldelim()}if(m.model_scale_v2!=null&&m.hasOwnProperty("model_scale_v2"))w.uint32(221).float(m.model_scale_v2);if(m.form!=null&&m.hasOwnProperty("form"))w.uint32(224).int32(m.form);if(m.event_quick_move!=null&&m.hasOwnProperty("event_quick_move"))w.uint32(232).int32(m.event_quick_move);if(m.event_cinematic_move!=null&&m.hasOwnProperty("event_cinematic_move"))w.uint32(240).int32(m.event_cinematic_move);if(m.buddy_offset_male!=null&&m.buddy_offset_male.length){w.uint32(250).fork();for(var i=0;i<m.buddy_offset_male.length;++i)w.float(m.buddy_offset_male[i]);w.ldelim()}if(m.buddy_offset_female!=null&&m.buddy_offset_female.length){w.uint32(258).fork();for(var i=0;i<m.buddy_offset_female.length;++i)w.float(m.buddy_offset_female[i]);w.ldelim()}if(m.buddy_scale!=null&&m.hasOwnProperty("buddy_scale"))w.uint32(269).float(m.buddy_scale);if(m.buddy_portrait_offset!=null&&m.buddy_portrait_offset.length){w.uint32(274).fork();for(var i=0;i<m.buddy_portrait_offset.length;++i)w.float(m.buddy_portrait_offset[i]);w.ldelim()}if(m.parent_form!=null&&m.hasOwnProperty("parent_form"))w.uint32(280).int32(m.parent_form);if(m.third_move!=null&&m.hasOwnProperty("third_move"))$root.POGOProtos.Settings.Master.PokemonSettings.PokemonThirdMoveAttributes.encode(m.third_move,w.uint32(290).fork()).ldelim();if(m.is_transferable!=null&&m.hasOwnProperty("is_transferable"))w.uint32(296).bool(m.is_transferable);if(m.is_deployable!=null&&m.hasOwnProperty("is_deployable"))w.uint32(304).bool(m.is_deployable);if(m.combat_shoulder_camera_angle!=null&&m.combat_shoulder_camera_angle.length){w.uint32(314).fork();for(var i=0;i<m.combat_shoulder_camera_angle.length;++i)w.float(m.combat_shoulder_camera_angle[i]);w.ldelim()}if(m.is_tradable!=null&&m.hasOwnProperty("is_tradable"))w.uint32(320).bool(m.is_tradable);if(m.combat_default_camera_angle!=null&&m.combat_default_camera_angle.length){w.uint32(330).fork();for(var i=0;i<m.combat_default_camera_angle.length;++i)w.float(m.combat_default_camera_angle[i]);w.ldelim()}if(m.combat_opponent_focus_camera_angle!=null&&m.combat_opponent_focus_camera_angle.length){w.uint32(338).fork();for(var i=0;i<m.combat_opponent_focus_camera_angle.length;++i)w.float(m.combat_opponent_focus_camera_angle[i]);w.ldelim()}if(m.combat_player_focus_camera_angle!=null&&m.combat_player_focus_camera_angle.length){w.uint32(346).fork();for(var i=0;i<m.combat_player_focus_camera_angle.length;++i)w.float(m.combat_player_focus_camera_angle[i]);w.ldelim()}if(m.combat_player_pokemon_position_offset!=null&&m.combat_player_pokemon_position_offset.length){w.uint32(354).fork();for(var i=0;i<m.combat_player_pokemon_position_offset.length;++i)w.float(m.combat_player_pokemon_position_offset[i]);w.ldelim()}return w};PokemonSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.PokemonSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pokemon_id=r.int32();break;case 3:m.model_scale=r.float();break;case 4:m.type=r.int32();break;case 5:m.type_2=r.int32();break;case 6:m.camera=$root.POGOProtos.Settings.Master.Pokemon.CameraAttributes.decode(r,r.uint32());break;case 7:m.encounter=$root.POGOProtos.Settings.Master.Pokemon.EncounterAttributes.decode(r,r.uint32());break;case 8:m.stats=$root.POGOProtos.Settings.Master.Pokemon.StatsAttributes.decode(r,r.uint32());break;case 9:if(!(m.quick_moves&&m.quick_moves.length))m.quick_moves=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.quick_moves.push(r.int32())}else m.quick_moves.push(r.int32());break;case 10:if(!(m.cinematic_moves&&m.cinematic_moves.length))m.cinematic_moves=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.cinematic_moves.push(r.int32())}else m.cinematic_moves.push(r.int32());break;case 11:if(!(m.animation_time&&m.animation_time.length))m.animation_time=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.animation_time.push(r.float())}else m.animation_time.push(r.float());break;case 12:if(!(m.evolution_ids&&m.evolution_ids.length))m.evolution_ids=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.evolution_ids.push(r.int32())}else m.evolution_ids.push(r.int32());break;case 13:m.evolution_pips=r.int32();break;case 14:m.rarity=r.int32();break;case 15:m.pokedex_height_m=r.float();break;case 16:m.pokedex_weight_kg=r.float();break;case 17:m.parent_pokemon_id=r.int32();break;case 18:m.height_std_dev=r.float();break;case 19:m.weight_std_dev=r.float();break;case 20:m.km_distance_to_hatch=r.float();break;case 21:m.family_id=r.int32();break;case 22:m.candy_to_evolve=r.int32();break;case 23:m.km_buddy_distance=r.float();break;case 24:m.buddy_size=r.int32();break;case 25:m.model_height=r.float();break;case 26:if(!(m.evolution_branch&&m.evolution_branch.length))m.evolution_branch=[];m.evolution_branch.push($root.POGOProtos.Settings.Master.Pokemon.EvolutionBranch.decode(r,r.uint32()));break;case 27:m.model_scale_v2=r.float();break;case 28:m.form=r.int32();break;case 29:m.event_quick_move=r.int32();break;case 30:m.event_cinematic_move=r.int32();break;case 31:if(!(m.buddy_offset_male&&m.buddy_offset_male.length))m.buddy_offset_male=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.buddy_offset_male.push(r.float())}else m.buddy_offset_male.push(r.float());break;case 32:if(!(m.buddy_offset_female&&m.buddy_offset_female.length))m.buddy_offset_female=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.buddy_offset_female.push(r.float())}else m.buddy_offset_female.push(r.float());break;case 33:m.buddy_scale=r.float();break;case 34:if(!(m.buddy_portrait_offset&&m.buddy_portrait_offset.length))m.buddy_portrait_offset=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.buddy_portrait_offset.push(r.float())}else m.buddy_portrait_offset.push(r.float());break;case 35:m.parent_form=r.int32();break;case 36:m.third_move=$root.POGOProtos.Settings.Master.PokemonSettings.PokemonThirdMoveAttributes.decode(r,r.uint32());break;case 37:m.is_transferable=r.bool();break;case 38:m.is_deployable=r.bool();break;case 39:if(!(m.combat_shoulder_camera_angle&&m.combat_shoulder_camera_angle.length))m.combat_shoulder_camera_angle=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.combat_shoulder_camera_angle.push(r.float())}else m.combat_shoulder_camera_angle.push(r.float());break;case 40:m.is_tradable=r.bool();break;case 41:if(!(m.combat_default_camera_angle&&m.combat_default_camera_angle.length))m.combat_default_camera_angle=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.combat_default_camera_angle.push(r.float())}else m.combat_default_camera_angle.push(r.float());break;case 42:if(!(m.combat_opponent_focus_camera_angle&&m.combat_opponent_focus_camera_angle.length))m.combat_opponent_focus_camera_angle=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.combat_opponent_focus_camera_angle.push(r.float())}else m.combat_opponent_focus_camera_angle.push(r.float());break;case 43:if(!(m.combat_player_focus_camera_angle&&m.combat_player_focus_camera_angle.length))m.combat_player_focus_camera_angle=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.combat_player_focus_camera_angle.push(r.float())}else m.combat_player_focus_camera_angle.push(r.float());break;case 44:if(!(m.combat_player_pokemon_position_offset&&m.combat_player_pokemon_position_offset.length))m.combat_player_pokemon_position_offset=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.combat_player_pokemon_position_offset.push(r.float())}else m.combat_player_pokemon_position_offset.push(r.float());break;default:r.skipType(t&7);break}}return m};PokemonSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.PokemonSettings)return d;var m=new $root.POGOProtos.Settings.Master.PokemonSettings;switch(d.pokemon_id){case"MISSINGNO":case 0:m.pokemon_id=0;break;case"BULBASAUR":case 1:m.pokemon_id=1;break;case"IVYSAUR":case 2:m.pokemon_id=2;break;case"VENUSAUR":case 3:m.pokemon_id=3;break;case"CHARMANDER":case 4:m.pokemon_id=4;break;case"CHARMELEON":case 5:m.pokemon_id=5;break;case"CHARIZARD":case 6:m.pokemon_id=6;break;case"SQUIRTLE":case 7:m.pokemon_id=7;break;case"WARTORTLE":case 8:m.pokemon_id=8;break;case"BLASTOISE":case 9:m.pokemon_id=9;break;case"CATERPIE":case 10:m.pokemon_id=10;break;case"METAPOD":case 11:m.pokemon_id=11;break;case"BUTTERFREE":case 12:m.pokemon_id=12;break;case"WEEDLE":case 13:m.pokemon_id=13;break;case"KAKUNA":case 14:m.pokemon_id=14;break;case"BEEDRILL":case 15:m.pokemon_id=15;break;case"PIDGEY":case 16:m.pokemon_id=16;break;case"PIDGEOTTO":case 17:m.pokemon_id=17;break;case"PIDGEOT":case 18:m.pokemon_id=18;break;case"RATTATA":case 19:m.pokemon_id=19;break;case"RATICATE":case 20:m.pokemon_id=20;break;case"SPEAROW":case 21:m.pokemon_id=21;break;case"FEAROW":case 22:m.pokemon_id=22;break;case"EKANS":case 23:m.pokemon_id=23;break;case"ARBOK":case 24:m.pokemon_id=24;break;case"PIKACHU":case 25:m.pokemon_id=25;break;case"RAICHU":case 26:m.pokemon_id=26;break;case"SANDSHREW":case 27:m.pokemon_id=27;break;case"SANDSLASH":case 28:m.pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.pokemon_id=29;break;case"NIDORINA":case 30:m.pokemon_id=30;break;case"NIDOQUEEN":case 31:m.pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.pokemon_id=32;break;case"NIDORINO":case 33:m.pokemon_id=33;break;case"NIDOKING":case 34:m.pokemon_id=34;break;case"CLEFAIRY":case 35:m.pokemon_id=35;break;case"CLEFABLE":case 36:m.pokemon_id=36;break;case"VULPIX":case 37:m.pokemon_id=37;break;case"NINETALES":case 38:m.pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.pokemon_id=40;break;case"ZUBAT":case 41:m.pokemon_id=41;break;case"GOLBAT":case 42:m.pokemon_id=42;break;case"ODDISH":case 43:m.pokemon_id=43;break;case"GLOOM":case 44:m.pokemon_id=44;break;case"VILEPLUME":case 45:m.pokemon_id=45;break;case"PARAS":case 46:m.pokemon_id=46;break;case"PARASECT":case 47:m.pokemon_id=47;break;case"VENONAT":case 48:m.pokemon_id=48;break;case"VENOMOTH":case 49:m.pokemon_id=49;break;case"DIGLETT":case 50:m.pokemon_id=50;break;case"DUGTRIO":case 51:m.pokemon_id=51;break;case"MEOWTH":case 52:m.pokemon_id=52;break;case"PERSIAN":case 53:m.pokemon_id=53;break;case"PSYDUCK":case 54:m.pokemon_id=54;break;case"GOLDUCK":case 55:m.pokemon_id=55;break;case"MANKEY":case 56:m.pokemon_id=56;break;case"PRIMEAPE":case 57:m.pokemon_id=57;break;case"GROWLITHE":case 58:m.pokemon_id=58;break;case"ARCANINE":case 59:m.pokemon_id=59;break;case"POLIWAG":case 60:m.pokemon_id=60;break;case"POLIWHIRL":case 61:m.pokemon_id=61;break;case"POLIWRATH":case 62:m.pokemon_id=62;break;case"ABRA":case 63:m.pokemon_id=63;break;case"KADABRA":case 64:m.pokemon_id=64;break;case"ALAKAZAM":case 65:m.pokemon_id=65;break;case"MACHOP":case 66:m.pokemon_id=66;break;case"MACHOKE":case 67:m.pokemon_id=67;break;case"MACHAMP":case 68:m.pokemon_id=68;break;case"BELLSPROUT":case 69:m.pokemon_id=69;break;case"WEEPINBELL":case 70:m.pokemon_id=70;break;case"VICTREEBEL":case 71:m.pokemon_id=71;break;case"TENTACOOL":case 72:m.pokemon_id=72;break;case"TENTACRUEL":case 73:m.pokemon_id=73;break;case"GEODUDE":case 74:m.pokemon_id=74;break;case"GRAVELER":case 75:m.pokemon_id=75;break;case"GOLEM":case 76:m.pokemon_id=76;break;case"PONYTA":case 77:m.pokemon_id=77;break;case"RAPIDASH":case 78:m.pokemon_id=78;break;case"SLOWPOKE":case 79:m.pokemon_id=79;break;case"SLOWBRO":case 80:m.pokemon_id=80;break;case"MAGNEMITE":case 81:m.pokemon_id=81;break;case"MAGNETON":case 82:m.pokemon_id=82;break;case"FARFETCHD":case 83:m.pokemon_id=83;break;case"DODUO":case 84:m.pokemon_id=84;break;case"DODRIO":case 85:m.pokemon_id=85;break;case"SEEL":case 86:m.pokemon_id=86;break;case"DEWGONG":case 87:m.pokemon_id=87;break;case"GRIMER":case 88:m.pokemon_id=88;break;case"MUK":case 89:m.pokemon_id=89;break;case"SHELLDER":case 90:m.pokemon_id=90;break;case"CLOYSTER":case 91:m.pokemon_id=91;break;case"GASTLY":case 92:m.pokemon_id=92;break;case"HAUNTER":case 93:m.pokemon_id=93;break;case"GENGAR":case 94:m.pokemon_id=94;break;case"ONIX":case 95:m.pokemon_id=95;break;case"DROWZEE":case 96:m.pokemon_id=96;break;case"HYPNO":case 97:m.pokemon_id=97;break;case"KRABBY":case 98:m.pokemon_id=98;break;case"KINGLER":case 99:m.pokemon_id=99;break;case"VOLTORB":case 100:m.pokemon_id=100;break;case"ELECTRODE":case 101:m.pokemon_id=101;break;case"EXEGGCUTE":case 102:m.pokemon_id=102;break;case"EXEGGUTOR":case 103:m.pokemon_id=103;break;case"CUBONE":case 104:m.pokemon_id=104;break;case"MAROWAK":case 105:m.pokemon_id=105;break;case"HITMONLEE":case 106:m.pokemon_id=106;break;case"HITMONCHAN":case 107:m.pokemon_id=107;break;case"LICKITUNG":case 108:m.pokemon_id=108;break;case"KOFFING":case 109:m.pokemon_id=109;break;case"WEEZING":case 110:m.pokemon_id=110;break;case"RHYHORN":case 111:m.pokemon_id=111;break;case"RHYDON":case 112:m.pokemon_id=112;break;case"CHANSEY":case 113:m.pokemon_id=113;break;case"TANGELA":case 114:m.pokemon_id=114;break;case"KANGASKHAN":case 115:m.pokemon_id=115;break;case"HORSEA":case 116:m.pokemon_id=116;break;case"SEADRA":case 117:m.pokemon_id=117;break;case"GOLDEEN":case 118:m.pokemon_id=118;break;case"SEAKING":case 119:m.pokemon_id=119;break;case"STARYU":case 120:m.pokemon_id=120;break;case"STARMIE":case 121:m.pokemon_id=121;break;case"MR_MIME":case 122:m.pokemon_id=122;break;case"SCYTHER":case 123:m.pokemon_id=123;break;case"JYNX":case 124:m.pokemon_id=124;break;case"ELECTABUZZ":case 125:m.pokemon_id=125;break;case"MAGMAR":case 126:m.pokemon_id=126;break;case"PINSIR":case 127:m.pokemon_id=127;break;case"TAUROS":case 128:m.pokemon_id=128;break;case"MAGIKARP":case 129:m.pokemon_id=129;break;case"GYARADOS":case 130:m.pokemon_id=130;break;case"LAPRAS":case 131:m.pokemon_id=131;break;case"DITTO":case 132:m.pokemon_id=132;break;case"EEVEE":case 133:m.pokemon_id=133;break;case"VAPOREON":case 134:m.pokemon_id=134;break;case"JOLTEON":case 135:m.pokemon_id=135;break;case"FLAREON":case 136:m.pokemon_id=136;break;case"PORYGON":case 137:m.pokemon_id=137;break;case"OMANYTE":case 138:m.pokemon_id=138;break;case"OMASTAR":case 139:m.pokemon_id=139;break;case"KABUTO":case 140:m.pokemon_id=140;break;case"KABUTOPS":case 141:m.pokemon_id=141;break;case"AERODACTYL":case 142:m.pokemon_id=142;break;case"SNORLAX":case 143:m.pokemon_id=143;break;case"ARTICUNO":case 144:m.pokemon_id=144;break;case"ZAPDOS":case 145:m.pokemon_id=145;break;case"MOLTRES":case 146:m.pokemon_id=146;break;case"DRATINI":case 147:m.pokemon_id=147;break;case"DRAGONAIR":case 148:m.pokemon_id=148;break;case"DRAGONITE":case 149:m.pokemon_id=149;break;case"MEWTWO":case 150:m.pokemon_id=150;break;case"MEW":case 151:m.pokemon_id=151;break;case"CHIKORITA":case 152:m.pokemon_id=152;break;case"BAYLEEF":case 153:m.pokemon_id=153;break;case"MEGANIUM":case 154:m.pokemon_id=154;break;case"CYNDAQUIL":case 155:m.pokemon_id=155;break;case"QUILAVA":case 156:m.pokemon_id=156;break;case"TYPHLOSION":case 157:m.pokemon_id=157;break;case"TOTODILE":case 158:m.pokemon_id=158;break;case"CROCONAW":case 159:m.pokemon_id=159;break;case"FERALIGATR":case 160:m.pokemon_id=160;break;case"SENTRET":case 161:m.pokemon_id=161;break;case"FURRET":case 162:m.pokemon_id=162;break;case"HOOTHOOT":case 163:m.pokemon_id=163;break;case"NOCTOWL":case 164:m.pokemon_id=164;break;case"LEDYBA":case 165:m.pokemon_id=165;break;case"LEDIAN":case 166:m.pokemon_id=166;break;case"SPINARAK":case 167:m.pokemon_id=167;break;case"ARIADOS":case 168:m.pokemon_id=168;break;case"CROBAT":case 169:m.pokemon_id=169;break;case"CHINCHOU":case 170:m.pokemon_id=170;break;case"LANTURN":case 171:m.pokemon_id=171;break;case"PICHU":case 172:m.pokemon_id=172;break;case"CLEFFA":case 173:m.pokemon_id=173;break;case"IGGLYBUFF":case 174:m.pokemon_id=174;break;case"TOGEPI":case 175:m.pokemon_id=175;break;case"TOGETIC":case 176:m.pokemon_id=176;break;case"NATU":case 177:m.pokemon_id=177;break;case"XATU":case 178:m.pokemon_id=178;break;case"MAREEP":case 179:m.pokemon_id=179;break;case"FLAAFFY":case 180:m.pokemon_id=180;break;case"AMPHAROS":case 181:m.pokemon_id=181;break;case"BELLOSSOM":case 182:m.pokemon_id=182;break;case"MARILL":case 183:m.pokemon_id=183;break;case"AZUMARILL":case 184:m.pokemon_id=184;break;case"SUDOWOODO":case 185:m.pokemon_id=185;break;case"POLITOED":case 186:m.pokemon_id=186;break;case"HOPPIP":case 187:m.pokemon_id=187;break;case"SKIPLOOM":case 188:m.pokemon_id=188;break;case"JUMPLUFF":case 189:m.pokemon_id=189;break;case"AIPOM":case 190:m.pokemon_id=190;break;case"SUNKERN":case 191:m.pokemon_id=191;break;case"SUNFLORA":case 192:m.pokemon_id=192;break;case"YANMA":case 193:m.pokemon_id=193;break;case"WOOPER":case 194:m.pokemon_id=194;break;case"QUAGSIRE":case 195:m.pokemon_id=195;break;case"ESPEON":case 196:m.pokemon_id=196;break;case"UMBREON":case 197:m.pokemon_id=197;break;case"MURKROW":case 198:m.pokemon_id=198;break;case"SLOWKING":case 199:m.pokemon_id=199;break;case"MISDREAVUS":case 200:m.pokemon_id=200;break;case"UNOWN":case 201:m.pokemon_id=201;break;case"WOBBUFFET":case 202:m.pokemon_id=202;break;case"GIRAFARIG":case 203:m.pokemon_id=203;break;case"PINECO":case 204:m.pokemon_id=204;break;case"FORRETRESS":case 205:m.pokemon_id=205;break;case"DUNSPARCE":case 206:m.pokemon_id=206;break;case"GLIGAR":case 207:m.pokemon_id=207;break;case"STEELIX":case 208:m.pokemon_id=208;break;case"SNUBBULL":case 209:m.pokemon_id=209;break;case"GRANBULL":case 210:m.pokemon_id=210;break;case"QWILFISH":case 211:m.pokemon_id=211;break;case"SCIZOR":case 212:m.pokemon_id=212;break;case"SHUCKLE":case 213:m.pokemon_id=213;break;case"HERACROSS":case 214:m.pokemon_id=214;break;case"SNEASEL":case 215:m.pokemon_id=215;break;case"TEDDIURSA":case 216:m.pokemon_id=216;break;case"URSARING":case 217:m.pokemon_id=217;break;case"SLUGMA":case 218:m.pokemon_id=218;break;case"MAGCARGO":case 219:m.pokemon_id=219;break;case"SWINUB":case 220:m.pokemon_id=220;break;case"PILOSWINE":case 221:m.pokemon_id=221;break;case"CORSOLA":case 222:m.pokemon_id=222;break;case"REMORAID":case 223:m.pokemon_id=223;break;case"OCTILLERY":case 224:m.pokemon_id=224;break;case"DELIBIRD":case 225:m.pokemon_id=225;break;case"MANTINE":case 226:m.pokemon_id=226;break;case"SKARMORY":case 227:m.pokemon_id=227;break;case"HOUNDOUR":case 228:m.pokemon_id=228;break;case"HOUNDOOM":case 229:m.pokemon_id=229;break;case"KINGDRA":case 230:m.pokemon_id=230;break;case"PHANPY":case 231:m.pokemon_id=231;break;case"DONPHAN":case 232:m.pokemon_id=232;break;case"PORYGON2":case 233:m.pokemon_id=233;break;case"STANTLER":case 234:m.pokemon_id=234;break;case"SMEARGLE":case 235:m.pokemon_id=235;break;case"TYROGUE":case 236:m.pokemon_id=236;break;case"HITMONTOP":case 237:m.pokemon_id=237;break;case"SMOOCHUM":case 238:m.pokemon_id=238;break;case"ELEKID":case 239:m.pokemon_id=239;break;case"MAGBY":case 240:m.pokemon_id=240;break;case"MILTANK":case 241:m.pokemon_id=241;break;case"BLISSEY":case 242:m.pokemon_id=242;break;case"RAIKOU":case 243:m.pokemon_id=243;break;case"ENTEI":case 244:m.pokemon_id=244;break;case"SUICUNE":case 245:m.pokemon_id=245;break;case"LARVITAR":case 246:m.pokemon_id=246;break;case"PUPITAR":case 247:m.pokemon_id=247;break;case"TYRANITAR":case 248:m.pokemon_id=248;break;case"LUGIA":case 249:m.pokemon_id=249;break;case"HO_OH":case 250:m.pokemon_id=250;break;case"CELEBI":case 251:m.pokemon_id=251;break;case"TREECKO":case 252:m.pokemon_id=252;break;case"GROVYLE":case 253:m.pokemon_id=253;break;case"SCEPTILE":case 254:m.pokemon_id=254;break;case"TORCHIC":case 255:m.pokemon_id=255;break;case"COMBUSKEN":case 256:m.pokemon_id=256;break;case"BLAZIKEN":case 257:m.pokemon_id=257;break;case"MUDKIP":case 258:m.pokemon_id=258;break;case"MARSHTOMP":case 259:m.pokemon_id=259;break;case"SWAMPERT":case 260:m.pokemon_id=260;break;case"POOCHYENA":case 261:m.pokemon_id=261;break;case"MIGHTYENA":case 262:m.pokemon_id=262;break;case"ZIGZAGOON":case 263:m.pokemon_id=263;break;case"LINOONE":case 264:m.pokemon_id=264;break;case"WURMPLE":case 265:m.pokemon_id=265;break;case"SILCOON":case 266:m.pokemon_id=266;break;case"BEAUTIFLY":case 267:m.pokemon_id=267;break;case"CASCOON":case 268:m.pokemon_id=268;break;case"DUSTOX":case 269:m.pokemon_id=269;break;case"LOTAD":case 270:m.pokemon_id=270;break;case"LOMBRE":case 271:m.pokemon_id=271;break;case"LUDICOLO":case 272:m.pokemon_id=272;break;case"SEEDOT":case 273:m.pokemon_id=273;break;case"NUZLEAF":case 274:m.pokemon_id=274;break;case"SHIFTRY":case 275:m.pokemon_id=275;break;case"TAILLOW":case 276:m.pokemon_id=276;break;case"SWELLOW":case 277:m.pokemon_id=277;break;case"WINGULL":case 278:m.pokemon_id=278;break;case"PELIPPER":case 279:m.pokemon_id=279;break;case"RALTS":case 280:m.pokemon_id=280;break;case"KIRLIA":case 281:m.pokemon_id=281;break;case"GARDEVOIR":case 282:m.pokemon_id=282;break;case"SURSKIT":case 283:m.pokemon_id=283;break;case"MASQUERAIN":case 284:m.pokemon_id=284;break;case"SHROOMISH":case 285:m.pokemon_id=285;break;case"BRELOOM":case 286:m.pokemon_id=286;break;case"SLAKOTH":case 287:m.pokemon_id=287;break;case"VIGOROTH":case 288:m.pokemon_id=288;break;case"SLAKING":case 289:m.pokemon_id=289;break;case"NINCADA":case 290:m.pokemon_id=290;break;case"NINJASK":case 291:m.pokemon_id=291;break;case"SHEDINJA":case 292:m.pokemon_id=292;break;case"WHISMUR":case 293:m.pokemon_id=293;break;case"LOUDRED":case 294:m.pokemon_id=294;break;case"EXPLOUD":case 295:m.pokemon_id=295;break;case"MAKUHITA":case 296:m.pokemon_id=296;break;case"HARIYAMA":case 297:m.pokemon_id=297;break;case"AZURILL":case 298:m.pokemon_id=298;break;case"NOSEPASS":case 299:m.pokemon_id=299;break;case"SKITTY":case 300:m.pokemon_id=300;break;case"DELCATTY":case 301:m.pokemon_id=301;break;case"SABLEYE":case 302:m.pokemon_id=302;break;case"MAWILE":case 303:m.pokemon_id=303;break;case"ARON":case 304:m.pokemon_id=304;break;case"LAIRON":case 305:m.pokemon_id=305;break;case"AGGRON":case 306:m.pokemon_id=306;break;case"MEDITITE":case 307:m.pokemon_id=307;break;case"MEDICHAM":case 308:m.pokemon_id=308;break;case"ELECTRIKE":case 309:m.pokemon_id=309;break;case"MANECTRIC":case 310:m.pokemon_id=310;break;case"PLUSLE":case 311:m.pokemon_id=311;break;case"MINUN":case 312:m.pokemon_id=312;break;case"VOLBEAT":case 313:m.pokemon_id=313;break;case"ILLUMISE":case 314:m.pokemon_id=314;break;case"ROSELIA":case 315:m.pokemon_id=315;break;case"GULPIN":case 316:m.pokemon_id=316;break;case"SWALOT":case 317:m.pokemon_id=317;break;case"CARVANHA":case 318:m.pokemon_id=318;break;case"SHARPEDO":case 319:m.pokemon_id=319;break;case"WAILMER":case 320:m.pokemon_id=320;break;case"WAILORD":case 321:m.pokemon_id=321;break;case"NUMEL":case 322:m.pokemon_id=322;break;case"CAMERUPT":case 323:m.pokemon_id=323;break;case"TORKOAL":case 324:m.pokemon_id=324;break;case"SPOINK":case 325:m.pokemon_id=325;break;case"GRUMPIG":case 326:m.pokemon_id=326;break;case"SPINDA":case 327:m.pokemon_id=327;break;case"TRAPINCH":case 328:m.pokemon_id=328;break;case"VIBRAVA":case 329:m.pokemon_id=329;break;case"FLYGON":case 330:m.pokemon_id=330;break;case"CACNEA":case 331:m.pokemon_id=331;break;case"CACTURNE":case 332:m.pokemon_id=332;break;case"SWABLU":case 333:m.pokemon_id=333;break;case"ALTARIA":case 334:m.pokemon_id=334;break;case"ZANGOOSE":case 335:m.pokemon_id=335;break;case"SEVIPER":case 336:m.pokemon_id=336;break;case"LUNATONE":case 337:m.pokemon_id=337;break;case"SOLROCK":case 338:m.pokemon_id=338;break;case"BARBOACH":case 339:m.pokemon_id=339;break;case"WHISCASH":case 340:m.pokemon_id=340;break;case"CORPHISH":case 341:m.pokemon_id=341;break;case"CRAWDAUNT":case 342:m.pokemon_id=342;break;case"BALTOY":case 343:m.pokemon_id=343;break;case"CLAYDOL":case 344:m.pokemon_id=344;break;case"LILEEP":case 345:m.pokemon_id=345;break;case"CRADILY":case 346:m.pokemon_id=346;break;case"ANORITH":case 347:m.pokemon_id=347;break;case"ARMALDO":case 348:m.pokemon_id=348;break;case"FEEBAS":case 349:m.pokemon_id=349;break;case"MILOTIC":case 350:m.pokemon_id=350;break;case"CASTFORM":case 351:m.pokemon_id=351;break;case"KECLEON":case 352:m.pokemon_id=352;break;case"SHUPPET":case 353:m.pokemon_id=353;break;case"BANETTE":case 354:m.pokemon_id=354;break;case"DUSKULL":case 355:m.pokemon_id=355;break;case"DUSCLOPS":case 356:m.pokemon_id=356;break;case"TROPIUS":case 357:m.pokemon_id=357;break;case"CHIMECHO":case 358:m.pokemon_id=358;break;case"ABSOL":case 359:m.pokemon_id=359;break;case"WYNAUT":case 360:m.pokemon_id=360;break;case"SNORUNT":case 361:m.pokemon_id=361;break;case"GLALIE":case 362:m.pokemon_id=362;break;case"SPHEAL":case 363:m.pokemon_id=363;break;case"SEALEO":case 364:m.pokemon_id=364;break;case"WALREIN":case 365:m.pokemon_id=365;break;case"CLAMPERL":case 366:m.pokemon_id=366;break;case"HUNTAIL":case 367:m.pokemon_id=367;break;case"GOREBYSS":case 368:m.pokemon_id=368;break;case"RELICANTH":case 369:m.pokemon_id=369;break;case"LUVDISC":case 370:m.pokemon_id=370;break;case"BAGON":case 371:m.pokemon_id=371;break;case"SHELGON":case 372:m.pokemon_id=372;break;case"SALAMENCE":case 373:m.pokemon_id=373;break;case"BELDUM":case 374:m.pokemon_id=374;break;case"METANG":case 375:m.pokemon_id=375;break;case"METAGROSS":case 376:m.pokemon_id=376;break;case"REGIROCK":case 377:m.pokemon_id=377;break;case"REGICE":case 378:m.pokemon_id=378;break;case"REGISTEEL":case 379:m.pokemon_id=379;break;case"LATIAS":case 380:m.pokemon_id=380;break;case"LATIOS":case 381:m.pokemon_id=381;break;case"KYOGRE":case 382:m.pokemon_id=382;break;case"GROUDON":case 383:m.pokemon_id=383;break;case"RAYQUAZA":case 384:m.pokemon_id=384;break;case"JIRACHI":case 385:m.pokemon_id=385;break;case"DEOXYS":case 386:m.pokemon_id=386;break;case"TURTWIG":case 387:m.pokemon_id=387;break;case"GROTLE":case 388:m.pokemon_id=388;break;case"TORTERRA":case 389:m.pokemon_id=389;break;case"CHIMCHAR":case 390:m.pokemon_id=390;break;case"MONFERNO":case 391:m.pokemon_id=391;break;case"INFERNAPE":case 392:m.pokemon_id=392;break;case"PIPLUP":case 393:m.pokemon_id=393;break;case"PRINPLUP":case 394:m.pokemon_id=394;break;case"EMPOLEON":case 395:m.pokemon_id=395;break;case"STARLY":case 396:m.pokemon_id=396;break;case"STARAVIA":case 397:m.pokemon_id=397;break;case"STARAPTOR":case 398:m.pokemon_id=398;break;case"BIDOOF":case 399:m.pokemon_id=399;break;case"BIBAREL":case 400:m.pokemon_id=400;break;case"KRICKETOT":case 401:m.pokemon_id=401;break;case"KRICKETUNE":case 402:m.pokemon_id=402;break;case"SHINX":case 403:m.pokemon_id=403;break;case"LUXIO":case 404:m.pokemon_id=404;break;case"LUXRAY":case 405:m.pokemon_id=405;break;case"BUDEW":case 406:m.pokemon_id=406;break;case"ROSERADE":case 407:m.pokemon_id=407;break;case"CRANIDOS":case 408:m.pokemon_id=408;break;case"RAMPARDOS":case 409:m.pokemon_id=409;break;case"SHIELDON":case 410:m.pokemon_id=410;break;case"BASTIODON":case 411:m.pokemon_id=411;break;case"BURMY":case 412:m.pokemon_id=412;break;case"WORMADAM":case 413:m.pokemon_id=413;break;case"MOTHIM":case 414:m.pokemon_id=414;break;case"COMBEE":case 415:m.pokemon_id=415;break;case"VESPIQUEN":case 416:m.pokemon_id=416;break;case"PACHIRISU":case 417:m.pokemon_id=417;break;case"BUIZEL":case 418:m.pokemon_id=418;break;case"FLOATZEL":case 419:m.pokemon_id=419;break;case"CHERUBI":case 420:m.pokemon_id=420;break;case"CHERRIM":case 421:m.pokemon_id=421;break;case"SHELLOS":case 422:m.pokemon_id=422;break;case"GASTRODON":case 423:m.pokemon_id=423;break;case"AMBIPOM":case 424:m.pokemon_id=424;break;case"DRIFLOON":case 425:m.pokemon_id=425;break;case"DRIFBLIM":case 426:m.pokemon_id=426;break;case"BUNEARY":case 427:m.pokemon_id=427;break;case"LOPUNNY":case 428:m.pokemon_id=428;break;case"MISMAGIUS":case 429:m.pokemon_id=429;break;case"HONCHKROW":case 430:m.pokemon_id=430;break;case"GLAMEOW":case 431:m.pokemon_id=431;break;case"PURUGLY":case 432:m.pokemon_id=432;break;case"CHINGLING":case 433:m.pokemon_id=433;break;case"STUNKY":case 434:m.pokemon_id=434;break;case"SKUNTANK":case 435:m.pokemon_id=435;break;case"BRONZOR":case 436:m.pokemon_id=436;break;case"BRONZONG":case 437:m.pokemon_id=437;break;case"BONSLY":case 438:m.pokemon_id=438;break;case"MIME_JR":case 439:m.pokemon_id=439;break;case"HAPPINY":case 440:m.pokemon_id=440;break;case"CHATOT":case 441:m.pokemon_id=441;break;case"SPIRITOMB":case 442:m.pokemon_id=442;break;case"GIBLE":case 443:m.pokemon_id=443;break;case"GABITE":case 444:m.pokemon_id=444;break;case"GARCHOMP":case 445:m.pokemon_id=445;break;case"MUNCHLAX":case 446:m.pokemon_id=446;break;case"RIOLU":case 447:m.pokemon_id=447;break;case"LUCARIO":case 448:m.pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.pokemon_id=449;break;case"HIPPOWDON":case 450:m.pokemon_id=450;break;case"SKORUPI":case 451:m.pokemon_id=451;break;case"DRAPION":case 452:m.pokemon_id=452;break;case"CROAGUNK":case 453:m.pokemon_id=453;break;case"TOXICROAK":case 454:m.pokemon_id=454;break;case"CARNIVINE":case 455:m.pokemon_id=455;break;case"FINNEON":case 456:m.pokemon_id=456;break;case"LUMINEON":case 457:m.pokemon_id=457;break;case"MANTYKE":case 458:m.pokemon_id=458;break;case"SNOVER":case 459:m.pokemon_id=459;break;case"ABOMASNOW":case 460:m.pokemon_id=460;break;case"WEAVILE":case 461:m.pokemon_id=461;break;case"MAGNEZONE":case 462:m.pokemon_id=462;break;case"LICKILICKY":case 463:m.pokemon_id=463;break;case"RHYPERIOR":case 464:m.pokemon_id=464;break;case"TANGROWTH":case 465:m.pokemon_id=465;break;case"ELECTIVIRE":case 466:m.pokemon_id=466;break;case"MAGMORTAR":case 467:m.pokemon_id=467;break;case"TOGEKISS":case 468:m.pokemon_id=468;break;case"YANMEGA":case 469:m.pokemon_id=469;break;case"LEAFEON":case 470:m.pokemon_id=470;break;case"GLACEON":case 471:m.pokemon_id=471;break;case"GLISCOR":case 472:m.pokemon_id=472;break;case"MAMOSWINE":case 473:m.pokemon_id=473;break;case"PORYGON_Z":case 474:m.pokemon_id=474;break;case"GALLADE":case 475:m.pokemon_id=475;break;case"PROBOPASS":case 476:m.pokemon_id=476;break;case"DUSKNOIR":case 477:m.pokemon_id=477;break;case"FROSLASS":case 478:m.pokemon_id=478;break;case"ROTOM":case 479:m.pokemon_id=479;break;case"UXIE":case 480:m.pokemon_id=480;break;case"MESPRIT":case 481:m.pokemon_id=481;break;case"AZELF":case 482:m.pokemon_id=482;break;case"DIALGA":case 483:m.pokemon_id=483;break;case"PALKIA":case 484:m.pokemon_id=484;break;case"HEATRAN":case 485:m.pokemon_id=485;break;case"REGIGIGAS":case 486:m.pokemon_id=486;break;case"GIRATINA":case 487:m.pokemon_id=487;break;case"CRESSELIA":case 488:m.pokemon_id=488;break;case"PHIONE":case 489:m.pokemon_id=489;break;case"MANAPHY":case 490:m.pokemon_id=490;break;case"DARKRAI":case 491:m.pokemon_id=491;break;case"SHAYMIN":case 492:m.pokemon_id=492;break;case"ARCEUS":case 493:m.pokemon_id=493;break;case"MELTAN":case 808:m.pokemon_id=808;break;case"MELMETAL":case 809:m.pokemon_id=809;break}if(d.model_scale!=null){m.model_scale=Number(d.model_scale)}switch(d.type){case"POKEMON_TYPE_NONE":case 0:m.type=0;break;case"POKEMON_TYPE_NORMAL":case 1:m.type=1;break;case"POKEMON_TYPE_FIGHTING":case 2:m.type=2;break;case"POKEMON_TYPE_FLYING":case 3:m.type=3;break;case"POKEMON_TYPE_POISON":case 4:m.type=4;break;case"POKEMON_TYPE_GROUND":case 5:m.type=5;break;case"POKEMON_TYPE_ROCK":case 6:m.type=6;break;case"POKEMON_TYPE_BUG":case 7:m.type=7;break;case"POKEMON_TYPE_GHOST":case 8:m.type=8;break;case"POKEMON_TYPE_STEEL":case 9:m.type=9;break;case"POKEMON_TYPE_FIRE":case 10:m.type=10;break;case"POKEMON_TYPE_WATER":case 11:m.type=11;break;case"POKEMON_TYPE_GRASS":case 12:m.type=12;break;case"POKEMON_TYPE_ELECTRIC":case 13:m.type=13;break;case"POKEMON_TYPE_PSYCHIC":case 14:m.type=14;break;case"POKEMON_TYPE_ICE":case 15:m.type=15;break;case"POKEMON_TYPE_DRAGON":case 16:m.type=16;break;case"POKEMON_TYPE_DARK":case 17:m.type=17;break;case"POKEMON_TYPE_FAIRY":case 18:m.type=18;break}switch(d.type_2){case"POKEMON_TYPE_NONE":case 0:m.type_2=0;break;case"POKEMON_TYPE_NORMAL":case 1:m.type_2=1;break;case"POKEMON_TYPE_FIGHTING":case 2:m.type_2=2;break;case"POKEMON_TYPE_FLYING":case 3:m.type_2=3;break;case"POKEMON_TYPE_POISON":case 4:m.type_2=4;break;case"POKEMON_TYPE_GROUND":case 5:m.type_2=5;break;case"POKEMON_TYPE_ROCK":case 6:m.type_2=6;break;case"POKEMON_TYPE_BUG":case 7:m.type_2=7;break;case"POKEMON_TYPE_GHOST":case 8:m.type_2=8;break;case"POKEMON_TYPE_STEEL":case 9:m.type_2=9;break;case"POKEMON_TYPE_FIRE":case 10:m.type_2=10;break;case"POKEMON_TYPE_WATER":case 11:m.type_2=11;break;case"POKEMON_TYPE_GRASS":case 12:m.type_2=12;break;case"POKEMON_TYPE_ELECTRIC":case 13:m.type_2=13;break;case"POKEMON_TYPE_PSYCHIC":case 14:m.type_2=14;break;case"POKEMON_TYPE_ICE":case 15:m.type_2=15;break;case"POKEMON_TYPE_DRAGON":case 16:m.type_2=16;break;case"POKEMON_TYPE_DARK":case 17:m.type_2=17;break;case"POKEMON_TYPE_FAIRY":case 18:m.type_2=18;break}if(d.camera!=null){if(typeof d.camera!=="object")throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.camera: object expected");m.camera=$root.POGOProtos.Settings.Master.Pokemon.CameraAttributes.fromObject(d.camera)}if(d.encounter!=null){if(typeof d.encounter!=="object")throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.encounter: object expected");m.encounter=$root.POGOProtos.Settings.Master.Pokemon.EncounterAttributes.fromObject(d.encounter)}if(d.stats!=null){if(typeof d.stats!=="object")throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.stats: object expected");m.stats=$root.POGOProtos.Settings.Master.Pokemon.StatsAttributes.fromObject(d.stats)}if(d.quick_moves){if(!Array.isArray(d.quick_moves))throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.quick_moves: array expected");m.quick_moves=[];for(var i=0;i<d.quick_moves.length;++i){switch(d.quick_moves[i]){default:case"MOVE_UNSET":case 0:m.quick_moves[i]=0;break;case"THUNDER_SHOCK":case 1:m.quick_moves[i]=1;break;case"QUICK_ATTACK":case 2:m.quick_moves[i]=2;break;case"SCRATCH":case 3:m.quick_moves[i]=3;break;case"EMBER":case 4:m.quick_moves[i]=4;break;case"VINE_WHIP":case 5:m.quick_moves[i]=5;break;case"TACKLE":case 6:m.quick_moves[i]=6;break;case"RAZOR_LEAF":case 7:m.quick_moves[i]=7;break;case"TAKE_DOWN":case 8:m.quick_moves[i]=8;break;case"WATER_GUN":case 9:m.quick_moves[i]=9;break;case"BITE":case 10:m.quick_moves[i]=10;break;case"POUND":case 11:m.quick_moves[i]=11;break;case"DOUBLE_SLAP":case 12:m.quick_moves[i]=12;break;case"WRAP":case 13:m.quick_moves[i]=13;break;case"HYPER_BEAM":case 14:m.quick_moves[i]=14;break;case"LICK":case 15:m.quick_moves[i]=15;break;case"DARK_PULSE":case 16:m.quick_moves[i]=16;break;case"SMOG":case 17:m.quick_moves[i]=17;break;case"SLUDGE":case 18:m.quick_moves[i]=18;break;case"METAL_CLAW":case 19:m.quick_moves[i]=19;break;case"VICE_GRIP":case 20:m.quick_moves[i]=20;break;case"FLAME_WHEEL":case 21:m.quick_moves[i]=21;break;case"MEGAHORN":case 22:m.quick_moves[i]=22;break;case"WING_ATTACK":case 23:m.quick_moves[i]=23;break;case"FLAMETHROWER":case 24:m.quick_moves[i]=24;break;case"SUCKER_PUNCH":case 25:m.quick_moves[i]=25;break;case"DIG":case 26:m.quick_moves[i]=26;break;case"LOW_KICK":case 27:m.quick_moves[i]=27;break;case"CROSS_CHOP":case 28:m.quick_moves[i]=28;break;case"PSYCHO_CUT":case 29:m.quick_moves[i]=29;break;case"PSYBEAM":case 30:m.quick_moves[i]=30;break;case"EARTHQUAKE":case 31:m.quick_moves[i]=31;break;case"STONE_EDGE":case 32:m.quick_moves[i]=32;break;case"ICE_PUNCH":case 33:m.quick_moves[i]=33;break;case"HEART_STAMP":case 34:m.quick_moves[i]=34;break;case"DISCHARGE":case 35:m.quick_moves[i]=35;break;case"FLASH_CANNON":case 36:m.quick_moves[i]=36;break;case"PECK":case 37:m.quick_moves[i]=37;break;case"DRILL_PECK":case 38:m.quick_moves[i]=38;break;case"ICE_BEAM":case 39:m.quick_moves[i]=39;break;case"BLIZZARD":case 40:m.quick_moves[i]=40;break;case"AIR_SLASH":case 41:m.quick_moves[i]=41;break;case"HEAT_WAVE":case 42:m.quick_moves[i]=42;break;case"TWINEEDLE":case 43:m.quick_moves[i]=43;break;case"POISON_JAB":case 44:m.quick_moves[i]=44;break;case"AERIAL_ACE":case 45:m.quick_moves[i]=45;break;case"DRILL_RUN":case 46:m.quick_moves[i]=46;break;case"PETAL_BLIZZARD":case 47:m.quick_moves[i]=47;break;case"MEGA_DRAIN":case 48:m.quick_moves[i]=48;break;case"BUG_BUZZ":case 49:m.quick_moves[i]=49;break;case"POISON_FANG":case 50:m.quick_moves[i]=50;break;case"NIGHT_SLASH":case 51:m.quick_moves[i]=51;break;case"SLASH":case 52:m.quick_moves[i]=52;break;case"BUBBLE_BEAM":case 53:m.quick_moves[i]=53;break;case"SUBMISSION":case 54:m.quick_moves[i]=54;break;case"KARATE_CHOP":case 55:m.quick_moves[i]=55;break;case"LOW_SWEEP":case 56:m.quick_moves[i]=56;break;case"AQUA_JET":case 57:m.quick_moves[i]=57;break;case"AQUA_TAIL":case 58:m.quick_moves[i]=58;break;case"SEED_BOMB":case 59:m.quick_moves[i]=59;break;case"PSYSHOCK":case 60:m.quick_moves[i]=60;break;case"ROCK_THROW":case 61:m.quick_moves[i]=61;break;case"ANCIENT_POWER":case 62:m.quick_moves[i]=62;break;case"ROCK_TOMB":case 63:m.quick_moves[i]=63;break;case"ROCK_SLIDE":case 64:m.quick_moves[i]=64;break;case"POWER_GEM":case 65:m.quick_moves[i]=65;break;case"SHADOW_SNEAK":case 66:m.quick_moves[i]=66;break;case"SHADOW_PUNCH":case 67:m.quick_moves[i]=67;break;case"SHADOW_CLAW":case 68:m.quick_moves[i]=68;break;case"OMINOUS_WIND":case 69:m.quick_moves[i]=69;break;case"SHADOW_BALL":case 70:m.quick_moves[i]=70;break;case"BULLET_PUNCH":case 71:m.quick_moves[i]=71;break;case"MAGNET_BOMB":case 72:m.quick_moves[i]=72;break;case"STEEL_WING":case 73:m.quick_moves[i]=73;break;case"IRON_HEAD":case 74:m.quick_moves[i]=74;break;case"PARABOLIC_CHARGE":case 75:m.quick_moves[i]=75;break;case"SPARK":case 76:m.quick_moves[i]=76;break;case"THUNDER_PUNCH":case 77:m.quick_moves[i]=77;break;case"THUNDER":case 78:m.quick_moves[i]=78;break;case"THUNDERBOLT":case 79:m.quick_moves[i]=79;break;case"TWISTER":case 80:m.quick_moves[i]=80;break;case"DRAGON_BREATH":case 81:m.quick_moves[i]=81;break;case"DRAGON_PULSE":case 82:m.quick_moves[i]=82;break;case"DRAGON_CLAW":case 83:m.quick_moves[i]=83;break;case"DISARMING_VOICE":case 84:m.quick_moves[i]=84;break;case"DRAINING_KISS":case 85:m.quick_moves[i]=85;break;case"DAZZLING_GLEAM":case 86:m.quick_moves[i]=86;break;case"MOONBLAST":case 87:m.quick_moves[i]=87;break;case"PLAY_ROUGH":case 88:m.quick_moves[i]=88;break;case"CROSS_POISON":case 89:m.quick_moves[i]=89;break;case"SLUDGE_BOMB":case 90:m.quick_moves[i]=90;break;case"SLUDGE_WAVE":case 91:m.quick_moves[i]=91;break;case"GUNK_SHOT":case 92:m.quick_moves[i]=92;break;case"MUD_SHOT":case 93:m.quick_moves[i]=93;break;case"BONE_CLUB":case 94:m.quick_moves[i]=94;break;case"BULLDOZE":case 95:m.quick_moves[i]=95;break;case"MUD_BOMB":case 96:m.quick_moves[i]=96;break;case"FURY_CUTTER":case 97:m.quick_moves[i]=97;break;case"BUG_BITE":case 98:m.quick_moves[i]=98;break;case"SIGNAL_BEAM":case 99:m.quick_moves[i]=99;break;case"X_SCISSOR":case 100:m.quick_moves[i]=100;break;case"FLAME_CHARGE":case 101:m.quick_moves[i]=101;break;case"FLAME_BURST":case 102:m.quick_moves[i]=102;break;case"FIRE_BLAST":case 103:m.quick_moves[i]=103;break;case"BRINE":case 104:m.quick_moves[i]=104;break;case"WATER_PULSE":case 105:m.quick_moves[i]=105;break;case"SCALD":case 106:m.quick_moves[i]=106;break;case"HYDRO_PUMP":case 107:m.quick_moves[i]=107;break;case"PSYCHIC":case 108:m.quick_moves[i]=108;break;case"PSYSTRIKE":case 109:m.quick_moves[i]=109;break;case"ICE_SHARD":case 110:m.quick_moves[i]=110;break;case"ICY_WIND":case 111:m.quick_moves[i]=111;break;case"FROST_BREATH":case 112:m.quick_moves[i]=112;break;case"ABSORB":case 113:m.quick_moves[i]=113;break;case"GIGA_DRAIN":case 114:m.quick_moves[i]=114;break;case"FIRE_PUNCH":case 115:m.quick_moves[i]=115;break;case"SOLAR_BEAM":case 116:m.quick_moves[i]=116;break;case"LEAF_BLADE":case 117:m.quick_moves[i]=117;break;case"POWER_WHIP":case 118:m.quick_moves[i]=118;break;case"SPLASH":case 119:m.quick_moves[i]=119;break;case"ACID":case 120:m.quick_moves[i]=120;break;case"AIR_CUTTER":case 121:m.quick_moves[i]=121;break;case"HURRICANE":case 122:m.quick_moves[i]=122;break;case"BRICK_BREAK":case 123:m.quick_moves[i]=123;break;case"CUT":case 124:m.quick_moves[i]=124;break;case"SWIFT":case 125:m.quick_moves[i]=125;break;case"HORN_ATTACK":case 126:m.quick_moves[i]=126;break;case"STOMP":case 127:m.quick_moves[i]=127;break;case"HEADBUTT":case 128:m.quick_moves[i]=128;break;case"HYPER_FANG":case 129:m.quick_moves[i]=129;break;case"SLAM":case 130:m.quick_moves[i]=130;break;case"BODY_SLAM":case 131:m.quick_moves[i]=131;break;case"REST":case 132:m.quick_moves[i]=132;break;case"STRUGGLE":case 133:m.quick_moves[i]=133;break;case"SCALD_BLASTOISE":case 134:m.quick_moves[i]=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.quick_moves[i]=135;break;case"WRAP_GREEN":case 136:m.quick_moves[i]=136;break;case"WRAP_PINK":case 137:m.quick_moves[i]=137;break;case"FURY_CUTTER_FAST":case 200:m.quick_moves[i]=200;break;case"BUG_BITE_FAST":case 201:m.quick_moves[i]=201;break;case"BITE_FAST":case 202:m.quick_moves[i]=202;break;case"SUCKER_PUNCH_FAST":case 203:m.quick_moves[i]=203;break;case"DRAGON_BREATH_FAST":case 204:m.quick_moves[i]=204;break;case"THUNDER_SHOCK_FAST":case 205:m.quick_moves[i]=205;break;case"SPARK_FAST":case 206:m.quick_moves[i]=206;break;case"LOW_KICK_FAST":case 207:m.quick_moves[i]=207;break;case"KARATE_CHOP_FAST":case 208:m.quick_moves[i]=208;break;case"EMBER_FAST":case 209:m.quick_moves[i]=209;break;case"WING_ATTACK_FAST":case 210:m.quick_moves[i]=210;break;case"PECK_FAST":case 211:m.quick_moves[i]=211;break;case"LICK_FAST":case 212:m.quick_moves[i]=212;break;case"SHADOW_CLAW_FAST":case 213:m.quick_moves[i]=213;break;case"VINE_WHIP_FAST":case 214:m.quick_moves[i]=214;break;case"RAZOR_LEAF_FAST":case 215:m.quick_moves[i]=215;break;case"MUD_SHOT_FAST":case 216:m.quick_moves[i]=216;break;case"ICE_SHARD_FAST":case 217:m.quick_moves[i]=217;break;case"FROST_BREATH_FAST":case 218:m.quick_moves[i]=218;break;case"QUICK_ATTACK_FAST":case 219:m.quick_moves[i]=219;break;case"SCRATCH_FAST":case 220:m.quick_moves[i]=220;break;case"TACKLE_FAST":case 221:m.quick_moves[i]=221;break;case"POUND_FAST":case 222:m.quick_moves[i]=222;break;case"CUT_FAST":case 223:m.quick_moves[i]=223;break;case"POISON_JAB_FAST":case 224:m.quick_moves[i]=224;break;case"ACID_FAST":case 225:m.quick_moves[i]=225;break;case"PSYCHO_CUT_FAST":case 226:m.quick_moves[i]=226;break;case"ROCK_THROW_FAST":case 227:m.quick_moves[i]=227;break;case"METAL_CLAW_FAST":case 228:m.quick_moves[i]=228;break;case"BULLET_PUNCH_FAST":case 229:m.quick_moves[i]=229;break;case"WATER_GUN_FAST":case 230:m.quick_moves[i]=230;break;case"SPLASH_FAST":case 231:m.quick_moves[i]=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.quick_moves[i]=232;break;case"MUD_SLAP_FAST":case 233:m.quick_moves[i]=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.quick_moves[i]=234;break;case"CONFUSION_FAST":case 235:m.quick_moves[i]=235;break;case"POISON_STING_FAST":case 236:m.quick_moves[i]=236;break;case"BUBBLE_FAST":case 237:m.quick_moves[i]=237;break;case"FEINT_ATTACK_FAST":case 238:m.quick_moves[i]=238;break;case"STEEL_WING_FAST":case 239:m.quick_moves[i]=239;break;case"FIRE_FANG_FAST":case 240:m.quick_moves[i]=240;break;case"ROCK_SMASH_FAST":case 241:m.quick_moves[i]=241;break;case"TRANSFORM_FAST":case 242:m.quick_moves[i]=242;break;case"COUNTER_FAST":case 243:m.quick_moves[i]=243;break;case"POWDER_SNOW_FAST":case 244:m.quick_moves[i]=244;break;case"CLOSE_COMBAT":case 245:m.quick_moves[i]=245;break;case"DYNAMIC_PUNCH":case 246:m.quick_moves[i]=246;break;case"FOCUS_BLAST":case 247:m.quick_moves[i]=247;break;case"AURORA_BEAM":case 248:m.quick_moves[i]=248;break;case"CHARGE_BEAM_FAST":case 249:m.quick_moves[i]=249;break;case"VOLT_SWITCH_FAST":case 250:m.quick_moves[i]=250;break;case"WILD_CHARGE":case 251:m.quick_moves[i]=251;break;case"ZAP_CANNON":case 252:m.quick_moves[i]=252;break;case"DRAGON_TAIL_FAST":case 253:m.quick_moves[i]=253;break;case"AVALANCHE":case 254:m.quick_moves[i]=254;break;case"AIR_SLASH_FAST":case 255:m.quick_moves[i]=255;break;case"BRAVE_BIRD":case 256:m.quick_moves[i]=256;break;case"SKY_ATTACK":case 257:m.quick_moves[i]=257;break;case"SAND_TOMB":case 258:m.quick_moves[i]=258;break;case"ROCK_BLAST":case 259:m.quick_moves[i]=259;break;case"INFESTATION_FAST":case 260:m.quick_moves[i]=260;break;case"STRUGGLE_BUG_FAST":case 261:m.quick_moves[i]=261;break;case"SILVER_WIND":case 262:m.quick_moves[i]=262;break;case"ASTONISH_FAST":case 263:m.quick_moves[i]=263;break;case"HEX_FAST":case 264:m.quick_moves[i]=264;break;case"NIGHT_SHADE":case 265:m.quick_moves[i]=265;break;case"IRON_TAIL_FAST":case 266:m.quick_moves[i]=266;break;case"GYRO_BALL":case 267:m.quick_moves[i]=267;break;case"HEAVY_SLAM":case 268:m.quick_moves[i]=268;break;case"FIRE_SPIN_FAST":case 269:m.quick_moves[i]=269;break;case"OVERHEAT":case 270:m.quick_moves[i]=270;break;case"BULLET_SEED_FAST":case 271:m.quick_moves[i]=271;break;case"GRASS_KNOT":case 272:m.quick_moves[i]=272;break;case"ENERGY_BALL":case 273:m.quick_moves[i]=273;break;case"EXTRASENSORY_FAST":case 274:m.quick_moves[i]=274;break;case"FUTURESIGHT":case 275:m.quick_moves[i]=275;break;case"MIRROR_COAT":case 276:m.quick_moves[i]=276;break;case"OUTRAGE":case 277:m.quick_moves[i]=277;break;case"SNARL_FAST":case 278:m.quick_moves[i]=278;break;case"CRUNCH":case 279:m.quick_moves[i]=279;break;case"FOUL_PLAY":case 280:m.quick_moves[i]=280;break;case"HIDDEN_POWER_FAST":case 281:m.quick_moves[i]=281;break;case"TAKE_DOWN_FAST":case 282:m.quick_moves[i]=282;break;case"WATERFALL_FAST":case 283:m.quick_moves[i]=283;break;case"SURF":case 284:m.quick_moves[i]=284;break;case"DRACO_METEOR":case 285:m.quick_moves[i]=285;break;case"DOOM_DESIRE":case 286:m.quick_moves[i]=286;break;case"YAWN_FAST":case 287:m.quick_moves[i]=287;break;case"PSYCHO_BOOST":case 288:m.quick_moves[i]=288;break;case"ORIGIN_PULSE":case 289:m.quick_moves[i]=289;break;case"PRECIPICE_BLADES":case 290:m.quick_moves[i]=290;break;case"PRESENT_FAST":case 291:m.quick_moves[i]=291;break;case"WEATHER_BALL_FIRE":case 292:m.quick_moves[i]=292;break;case"WEATHER_BALL_ICE":case 293:m.quick_moves[i]=293;break;case"WEATHER_BALL_ROCK":case 294:m.quick_moves[i]=294;break;case"WEATHER_BALL_WATER":case 295:m.quick_moves[i]=295;break;case"FRENZY_PLANT":case 296:m.quick_moves[i]=296;break;case"SMACK_DOWN_FAST":case 297:m.quick_moves[i]=297;break;case"BLAST_BURN":case 298:m.quick_moves[i]=298;break;case"HYDRO_CANNON":case 299:m.quick_moves[i]=299;break;case"LAST_RESORT":case 300:m.quick_moves[i]=300;break;case"METEOR_MASH":case 301:m.quick_moves[i]=301;break;case"SKULL_BASH":case 302:m.quick_moves[i]=302;break;case"ACID_SPRAY":case 303:m.quick_moves[i]=303;break;case"EARTH_POWER":case 304:m.quick_moves[i]=304;break;case"CRABHAMMER":case 305:m.quick_moves[i]=305;break;case"LUNGE":case 306:m.quick_moves[i]=306;break;case"CRUSH_CLAW":case 307:m.quick_moves[i]=307;break;case"OCTAZOOKA":case 308:m.quick_moves[i]=308;break;case"MIRROR_SHOT":case 309:m.quick_moves[i]=309;break;case"SUPER_POWER":case 310:m.quick_moves[i]=310;break;case"FELL_STINGER":case 311:m.quick_moves[i]=311;break;case"LEAF_TORNADO":case 312:m.quick_moves[i]=312;break;case"LEECH_LIFE":case 313:m.quick_moves[i]=313;break;case"DRAIN_PUNCH":case 314:m.quick_moves[i]=314;break;case"SHADOW_BONE":case 315:m.quick_moves[i]=315;break;case"MUDDY_WATER":case 316:m.quick_moves[i]=316;break;case"BLAZE_KICK":case 317:m.quick_moves[i]=317;break;case"RAZOR_SHELL":case 318:m.quick_moves[i]=318;break;case"POWER_UP_PUNCH":case 319:m.quick_moves[i]=319;break}}}if(d.cinematic_moves){if(!Array.isArray(d.cinematic_moves))throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.cinematic_moves: array expected");m.cinematic_moves=[];for(var i=0;i<d.cinematic_moves.length;++i){switch(d.cinematic_moves[i]){default:case"MOVE_UNSET":case 0:m.cinematic_moves[i]=0;break;case"THUNDER_SHOCK":case 1:m.cinematic_moves[i]=1;break;case"QUICK_ATTACK":case 2:m.cinematic_moves[i]=2;break;case"SCRATCH":case 3:m.cinematic_moves[i]=3;break;case"EMBER":case 4:m.cinematic_moves[i]=4;break;case"VINE_WHIP":case 5:m.cinematic_moves[i]=5;break;case"TACKLE":case 6:m.cinematic_moves[i]=6;break;case"RAZOR_LEAF":case 7:m.cinematic_moves[i]=7;break;case"TAKE_DOWN":case 8:m.cinematic_moves[i]=8;break;case"WATER_GUN":case 9:m.cinematic_moves[i]=9;break;case"BITE":case 10:m.cinematic_moves[i]=10;break;case"POUND":case 11:m.cinematic_moves[i]=11;break;case"DOUBLE_SLAP":case 12:m.cinematic_moves[i]=12;break;case"WRAP":case 13:m.cinematic_moves[i]=13;break;case"HYPER_BEAM":case 14:m.cinematic_moves[i]=14;break;case"LICK":case 15:m.cinematic_moves[i]=15;break;case"DARK_PULSE":case 16:m.cinematic_moves[i]=16;break;case"SMOG":case 17:m.cinematic_moves[i]=17;break;case"SLUDGE":case 18:m.cinematic_moves[i]=18;break;case"METAL_CLAW":case 19:m.cinematic_moves[i]=19;break;case"VICE_GRIP":case 20:m.cinematic_moves[i]=20;break;case"FLAME_WHEEL":case 21:m.cinematic_moves[i]=21;break;case"MEGAHORN":case 22:m.cinematic_moves[i]=22;break;case"WING_ATTACK":case 23:m.cinematic_moves[i]=23;break;case"FLAMETHROWER":case 24:m.cinematic_moves[i]=24;break;case"SUCKER_PUNCH":case 25:m.cinematic_moves[i]=25;break;case"DIG":case 26:m.cinematic_moves[i]=26;break;case"LOW_KICK":case 27:m.cinematic_moves[i]=27;break;case"CROSS_CHOP":case 28:m.cinematic_moves[i]=28;break;case"PSYCHO_CUT":case 29:m.cinematic_moves[i]=29;break;case"PSYBEAM":case 30:m.cinematic_moves[i]=30;break;case"EARTHQUAKE":case 31:m.cinematic_moves[i]=31;break;case"STONE_EDGE":case 32:m.cinematic_moves[i]=32;break;case"ICE_PUNCH":case 33:m.cinematic_moves[i]=33;break;case"HEART_STAMP":case 34:m.cinematic_moves[i]=34;break;case"DISCHARGE":case 35:m.cinematic_moves[i]=35;break;case"FLASH_CANNON":case 36:m.cinematic_moves[i]=36;break;case"PECK":case 37:m.cinematic_moves[i]=37;break;case"DRILL_PECK":case 38:m.cinematic_moves[i]=38;break;case"ICE_BEAM":case 39:m.cinematic_moves[i]=39;break;case"BLIZZARD":case 40:m.cinematic_moves[i]=40;break;case"AIR_SLASH":case 41:m.cinematic_moves[i]=41;break;case"HEAT_WAVE":case 42:m.cinematic_moves[i]=42;break;case"TWINEEDLE":case 43:m.cinematic_moves[i]=43;break;case"POISON_JAB":case 44:m.cinematic_moves[i]=44;break;case"AERIAL_ACE":case 45:m.cinematic_moves[i]=45;break;case"DRILL_RUN":case 46:m.cinematic_moves[i]=46;break;case"PETAL_BLIZZARD":case 47:m.cinematic_moves[i]=47;break;case"MEGA_DRAIN":case 48:m.cinematic_moves[i]=48;break;case"BUG_BUZZ":case 49:m.cinematic_moves[i]=49;break;case"POISON_FANG":case 50:m.cinematic_moves[i]=50;break;case"NIGHT_SLASH":case 51:m.cinematic_moves[i]=51;break;case"SLASH":case 52:m.cinematic_moves[i]=52;break;case"BUBBLE_BEAM":case 53:m.cinematic_moves[i]=53;break;case"SUBMISSION":case 54:m.cinematic_moves[i]=54;break;case"KARATE_CHOP":case 55:m.cinematic_moves[i]=55;break;case"LOW_SWEEP":case 56:m.cinematic_moves[i]=56;break;case"AQUA_JET":case 57:m.cinematic_moves[i]=57;break;case"AQUA_TAIL":case 58:m.cinematic_moves[i]=58;break;case"SEED_BOMB":case 59:m.cinematic_moves[i]=59;break;case"PSYSHOCK":case 60:m.cinematic_moves[i]=60;break;case"ROCK_THROW":case 61:m.cinematic_moves[i]=61;break;case"ANCIENT_POWER":case 62:m.cinematic_moves[i]=62;break;case"ROCK_TOMB":case 63:m.cinematic_moves[i]=63;break;case"ROCK_SLIDE":case 64:m.cinematic_moves[i]=64;break;case"POWER_GEM":case 65:m.cinematic_moves[i]=65;break;case"SHADOW_SNEAK":case 66:m.cinematic_moves[i]=66;break;case"SHADOW_PUNCH":case 67:m.cinematic_moves[i]=67;break;case"SHADOW_CLAW":case 68:m.cinematic_moves[i]=68;break;case"OMINOUS_WIND":case 69:m.cinematic_moves[i]=69;break;case"SHADOW_BALL":case 70:m.cinematic_moves[i]=70;break;case"BULLET_PUNCH":case 71:m.cinematic_moves[i]=71;break;case"MAGNET_BOMB":case 72:m.cinematic_moves[i]=72;break;case"STEEL_WING":case 73:m.cinematic_moves[i]=73;break;case"IRON_HEAD":case 74:m.cinematic_moves[i]=74;break;case"PARABOLIC_CHARGE":case 75:m.cinematic_moves[i]=75;break;case"SPARK":case 76:m.cinematic_moves[i]=76;break;case"THUNDER_PUNCH":case 77:m.cinematic_moves[i]=77;break;case"THUNDER":case 78:m.cinematic_moves[i]=78;break;case"THUNDERBOLT":case 79:m.cinematic_moves[i]=79;break;case"TWISTER":case 80:m.cinematic_moves[i]=80;break;case"DRAGON_BREATH":case 81:m.cinematic_moves[i]=81;break;case"DRAGON_PULSE":case 82:m.cinematic_moves[i]=82;break;case"DRAGON_CLAW":case 83:m.cinematic_moves[i]=83;break;case"DISARMING_VOICE":case 84:m.cinematic_moves[i]=84;break;case"DRAINING_KISS":case 85:m.cinematic_moves[i]=85;break;case"DAZZLING_GLEAM":case 86:m.cinematic_moves[i]=86;break;case"MOONBLAST":case 87:m.cinematic_moves[i]=87;break;case"PLAY_ROUGH":case 88:m.cinematic_moves[i]=88;break;case"CROSS_POISON":case 89:m.cinematic_moves[i]=89;break;case"SLUDGE_BOMB":case 90:m.cinematic_moves[i]=90;break;case"SLUDGE_WAVE":case 91:m.cinematic_moves[i]=91;break;case"GUNK_SHOT":case 92:m.cinematic_moves[i]=92;break;case"MUD_SHOT":case 93:m.cinematic_moves[i]=93;break;case"BONE_CLUB":case 94:m.cinematic_moves[i]=94;break;case"BULLDOZE":case 95:m.cinematic_moves[i]=95;break;case"MUD_BOMB":case 96:m.cinematic_moves[i]=96;break;case"FURY_CUTTER":case 97:m.cinematic_moves[i]=97;break;case"BUG_BITE":case 98:m.cinematic_moves[i]=98;break;case"SIGNAL_BEAM":case 99:m.cinematic_moves[i]=99;break;case"X_SCISSOR":case 100:m.cinematic_moves[i]=100;break;case"FLAME_CHARGE":case 101:m.cinematic_moves[i]=101;break;case"FLAME_BURST":case 102:m.cinematic_moves[i]=102;break;case"FIRE_BLAST":case 103:m.cinematic_moves[i]=103;break;case"BRINE":case 104:m.cinematic_moves[i]=104;break;case"WATER_PULSE":case 105:m.cinematic_moves[i]=105;break;case"SCALD":case 106:m.cinematic_moves[i]=106;break;case"HYDRO_PUMP":case 107:m.cinematic_moves[i]=107;break;case"PSYCHIC":case 108:m.cinematic_moves[i]=108;break;case"PSYSTRIKE":case 109:m.cinematic_moves[i]=109;break;case"ICE_SHARD":case 110:m.cinematic_moves[i]=110;break;case"ICY_WIND":case 111:m.cinematic_moves[i]=111;break;case"FROST_BREATH":case 112:m.cinematic_moves[i]=112;break;case"ABSORB":case 113:m.cinematic_moves[i]=113;break;case"GIGA_DRAIN":case 114:m.cinematic_moves[i]=114;break;case"FIRE_PUNCH":case 115:m.cinematic_moves[i]=115;break;case"SOLAR_BEAM":case 116:m.cinematic_moves[i]=116;break;case"LEAF_BLADE":case 117:m.cinematic_moves[i]=117;break;case"POWER_WHIP":case 118:m.cinematic_moves[i]=118;break;case"SPLASH":case 119:m.cinematic_moves[i]=119;break;case"ACID":case 120:m.cinematic_moves[i]=120;break;case"AIR_CUTTER":case 121:m.cinematic_moves[i]=121;break;case"HURRICANE":case 122:m.cinematic_moves[i]=122;break;case"BRICK_BREAK":case 123:m.cinematic_moves[i]=123;break;case"CUT":case 124:m.cinematic_moves[i]=124;break;case"SWIFT":case 125:m.cinematic_moves[i]=125;break;case"HORN_ATTACK":case 126:m.cinematic_moves[i]=126;break;case"STOMP":case 127:m.cinematic_moves[i]=127;break;case"HEADBUTT":case 128:m.cinematic_moves[i]=128;break;case"HYPER_FANG":case 129:m.cinematic_moves[i]=129;break;case"SLAM":case 130:m.cinematic_moves[i]=130;break;case"BODY_SLAM":case 131:m.cinematic_moves[i]=131;break;case"REST":case 132:m.cinematic_moves[i]=132;break;case"STRUGGLE":case 133:m.cinematic_moves[i]=133;break;case"SCALD_BLASTOISE":case 134:m.cinematic_moves[i]=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.cinematic_moves[i]=135;break;case"WRAP_GREEN":case 136:m.cinematic_moves[i]=136;break;case"WRAP_PINK":case 137:m.cinematic_moves[i]=137;break;case"FURY_CUTTER_FAST":case 200:m.cinematic_moves[i]=200;break;case"BUG_BITE_FAST":case 201:m.cinematic_moves[i]=201;break;case"BITE_FAST":case 202:m.cinematic_moves[i]=202;break;case"SUCKER_PUNCH_FAST":case 203:m.cinematic_moves[i]=203;break;case"DRAGON_BREATH_FAST":case 204:m.cinematic_moves[i]=204;break;case"THUNDER_SHOCK_FAST":case 205:m.cinematic_moves[i]=205;break;case"SPARK_FAST":case 206:m.cinematic_moves[i]=206;break;case"LOW_KICK_FAST":case 207:m.cinematic_moves[i]=207;break;case"KARATE_CHOP_FAST":case 208:m.cinematic_moves[i]=208;break;case"EMBER_FAST":case 209:m.cinematic_moves[i]=209;break;case"WING_ATTACK_FAST":case 210:m.cinematic_moves[i]=210;break;case"PECK_FAST":case 211:m.cinematic_moves[i]=211;break;case"LICK_FAST":case 212:m.cinematic_moves[i]=212;break;case"SHADOW_CLAW_FAST":case 213:m.cinematic_moves[i]=213;break;case"VINE_WHIP_FAST":case 214:m.cinematic_moves[i]=214;break;case"RAZOR_LEAF_FAST":case 215:m.cinematic_moves[i]=215;break;case"MUD_SHOT_FAST":case 216:m.cinematic_moves[i]=216;break;case"ICE_SHARD_FAST":case 217:m.cinematic_moves[i]=217;break;case"FROST_BREATH_FAST":case 218:m.cinematic_moves[i]=218;break;case"QUICK_ATTACK_FAST":case 219:m.cinematic_moves[i]=219;break;case"SCRATCH_FAST":case 220:m.cinematic_moves[i]=220;break;case"TACKLE_FAST":case 221:m.cinematic_moves[i]=221;break;case"POUND_FAST":case 222:m.cinematic_moves[i]=222;break;case"CUT_FAST":case 223:m.cinematic_moves[i]=223;break;case"POISON_JAB_FAST":case 224:m.cinematic_moves[i]=224;break;case"ACID_FAST":case 225:m.cinematic_moves[i]=225;break;case"PSYCHO_CUT_FAST":case 226:m.cinematic_moves[i]=226;break;case"ROCK_THROW_FAST":case 227:m.cinematic_moves[i]=227;break;case"METAL_CLAW_FAST":case 228:m.cinematic_moves[i]=228;break;case"BULLET_PUNCH_FAST":case 229:m.cinematic_moves[i]=229;break;case"WATER_GUN_FAST":case 230:m.cinematic_moves[i]=230;break;case"SPLASH_FAST":case 231:m.cinematic_moves[i]=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.cinematic_moves[i]=232;break;case"MUD_SLAP_FAST":case 233:m.cinematic_moves[i]=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.cinematic_moves[i]=234;break;case"CONFUSION_FAST":case 235:m.cinematic_moves[i]=235;break;case"POISON_STING_FAST":case 236:m.cinematic_moves[i]=236;break;case"BUBBLE_FAST":case 237:m.cinematic_moves[i]=237;break;case"FEINT_ATTACK_FAST":case 238:m.cinematic_moves[i]=238;break;case"STEEL_WING_FAST":case 239:m.cinematic_moves[i]=239;break;case"FIRE_FANG_FAST":case 240:m.cinematic_moves[i]=240;break;case"ROCK_SMASH_FAST":case 241:m.cinematic_moves[i]=241;break;case"TRANSFORM_FAST":case 242:m.cinematic_moves[i]=242;break;case"COUNTER_FAST":case 243:m.cinematic_moves[i]=243;break;case"POWDER_SNOW_FAST":case 244:m.cinematic_moves[i]=244;break;case"CLOSE_COMBAT":case 245:m.cinematic_moves[i]=245;break;case"DYNAMIC_PUNCH":case 246:m.cinematic_moves[i]=246;break;case"FOCUS_BLAST":case 247:m.cinematic_moves[i]=247;break;case"AURORA_BEAM":case 248:m.cinematic_moves[i]=248;break;case"CHARGE_BEAM_FAST":case 249:m.cinematic_moves[i]=249;break;case"VOLT_SWITCH_FAST":case 250:m.cinematic_moves[i]=250;break;case"WILD_CHARGE":case 251:m.cinematic_moves[i]=251;break;case"ZAP_CANNON":case 252:m.cinematic_moves[i]=252;break;case"DRAGON_TAIL_FAST":case 253:m.cinematic_moves[i]=253;break;case"AVALANCHE":case 254:m.cinematic_moves[i]=254;break;case"AIR_SLASH_FAST":case 255:m.cinematic_moves[i]=255;break;case"BRAVE_BIRD":case 256:m.cinematic_moves[i]=256;break;case"SKY_ATTACK":case 257:m.cinematic_moves[i]=257;break;case"SAND_TOMB":case 258:m.cinematic_moves[i]=258;break;case"ROCK_BLAST":case 259:m.cinematic_moves[i]=259;break;case"INFESTATION_FAST":case 260:m.cinematic_moves[i]=260;break;case"STRUGGLE_BUG_FAST":case 261:m.cinematic_moves[i]=261;break;case"SILVER_WIND":case 262:m.cinematic_moves[i]=262;break;case"ASTONISH_FAST":case 263:m.cinematic_moves[i]=263;break;case"HEX_FAST":case 264:m.cinematic_moves[i]=264;break;case"NIGHT_SHADE":case 265:m.cinematic_moves[i]=265;break;case"IRON_TAIL_FAST":case 266:m.cinematic_moves[i]=266;break;case"GYRO_BALL":case 267:m.cinematic_moves[i]=267;break;case"HEAVY_SLAM":case 268:m.cinematic_moves[i]=268;break;case"FIRE_SPIN_FAST":case 269:m.cinematic_moves[i]=269;break;case"OVERHEAT":case 270:m.cinematic_moves[i]=270;break;case"BULLET_SEED_FAST":case 271:m.cinematic_moves[i]=271;break;case"GRASS_KNOT":case 272:m.cinematic_moves[i]=272;break;case"ENERGY_BALL":case 273:m.cinematic_moves[i]=273;break;case"EXTRASENSORY_FAST":case 274:m.cinematic_moves[i]=274;break;case"FUTURESIGHT":case 275:m.cinematic_moves[i]=275;break;case"MIRROR_COAT":case 276:m.cinematic_moves[i]=276;break;case"OUTRAGE":case 277:m.cinematic_moves[i]=277;break;case"SNARL_FAST":case 278:m.cinematic_moves[i]=278;break;case"CRUNCH":case 279:m.cinematic_moves[i]=279;break;case"FOUL_PLAY":case 280:m.cinematic_moves[i]=280;break;case"HIDDEN_POWER_FAST":case 281:m.cinematic_moves[i]=281;break;case"TAKE_DOWN_FAST":case 282:m.cinematic_moves[i]=282;break;case"WATERFALL_FAST":case 283:m.cinematic_moves[i]=283;break;case"SURF":case 284:m.cinematic_moves[i]=284;break;case"DRACO_METEOR":case 285:m.cinematic_moves[i]=285;break;case"DOOM_DESIRE":case 286:m.cinematic_moves[i]=286;break;case"YAWN_FAST":case 287:m.cinematic_moves[i]=287;break;case"PSYCHO_BOOST":case 288:m.cinematic_moves[i]=288;break;case"ORIGIN_PULSE":case 289:m.cinematic_moves[i]=289;break;case"PRECIPICE_BLADES":case 290:m.cinematic_moves[i]=290;break;case"PRESENT_FAST":case 291:m.cinematic_moves[i]=291;break;case"WEATHER_BALL_FIRE":case 292:m.cinematic_moves[i]=292;break;case"WEATHER_BALL_ICE":case 293:m.cinematic_moves[i]=293;break;case"WEATHER_BALL_ROCK":case 294:m.cinematic_moves[i]=294;break;case"WEATHER_BALL_WATER":case 295:m.cinematic_moves[i]=295;break;case"FRENZY_PLANT":case 296:m.cinematic_moves[i]=296;break;case"SMACK_DOWN_FAST":case 297:m.cinematic_moves[i]=297;break;case"BLAST_BURN":case 298:m.cinematic_moves[i]=298;break;case"HYDRO_CANNON":case 299:m.cinematic_moves[i]=299;break;case"LAST_RESORT":case 300:m.cinematic_moves[i]=300;break;case"METEOR_MASH":case 301:m.cinematic_moves[i]=301;break;case"SKULL_BASH":case 302:m.cinematic_moves[i]=302;break;case"ACID_SPRAY":case 303:m.cinematic_moves[i]=303;break;case"EARTH_POWER":case 304:m.cinematic_moves[i]=304;break;case"CRABHAMMER":case 305:m.cinematic_moves[i]=305;break;case"LUNGE":case 306:m.cinematic_moves[i]=306;break;case"CRUSH_CLAW":case 307:m.cinematic_moves[i]=307;break;case"OCTAZOOKA":case 308:m.cinematic_moves[i]=308;break;case"MIRROR_SHOT":case 309:m.cinematic_moves[i]=309;break;case"SUPER_POWER":case 310:m.cinematic_moves[i]=310;break;case"FELL_STINGER":case 311:m.cinematic_moves[i]=311;break;case"LEAF_TORNADO":case 312:m.cinematic_moves[i]=312;break;case"LEECH_LIFE":case 313:m.cinematic_moves[i]=313;break;case"DRAIN_PUNCH":case 314:m.cinematic_moves[i]=314;break;case"SHADOW_BONE":case 315:m.cinematic_moves[i]=315;break;case"MUDDY_WATER":case 316:m.cinematic_moves[i]=316;break;case"BLAZE_KICK":case 317:m.cinematic_moves[i]=317;break;case"RAZOR_SHELL":case 318:m.cinematic_moves[i]=318;break;case"POWER_UP_PUNCH":case 319:m.cinematic_moves[i]=319;break}}}if(d.animation_time){if(!Array.isArray(d.animation_time))throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.animation_time: array expected");m.animation_time=[];for(var i=0;i<d.animation_time.length;++i){m.animation_time[i]=Number(d.animation_time[i])}}if(d.evolution_ids){if(!Array.isArray(d.evolution_ids))throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.evolution_ids: array expected");m.evolution_ids=[];for(var i=0;i<d.evolution_ids.length;++i){switch(d.evolution_ids[i]){default:case"MISSINGNO":case 0:m.evolution_ids[i]=0;break;case"BULBASAUR":case 1:m.evolution_ids[i]=1;break;case"IVYSAUR":case 2:m.evolution_ids[i]=2;break;case"VENUSAUR":case 3:m.evolution_ids[i]=3;break;case"CHARMANDER":case 4:m.evolution_ids[i]=4;break;case"CHARMELEON":case 5:m.evolution_ids[i]=5;break;case"CHARIZARD":case 6:m.evolution_ids[i]=6;break;case"SQUIRTLE":case 7:m.evolution_ids[i]=7;break;case"WARTORTLE":case 8:m.evolution_ids[i]=8;break;case"BLASTOISE":case 9:m.evolution_ids[i]=9;break;case"CATERPIE":case 10:m.evolution_ids[i]=10;break;case"METAPOD":case 11:m.evolution_ids[i]=11;break;case"BUTTERFREE":case 12:m.evolution_ids[i]=12;break;case"WEEDLE":case 13:m.evolution_ids[i]=13;break;case"KAKUNA":case 14:m.evolution_ids[i]=14;break;case"BEEDRILL":case 15:m.evolution_ids[i]=15;break;case"PIDGEY":case 16:m.evolution_ids[i]=16;break;case"PIDGEOTTO":case 17:m.evolution_ids[i]=17;break;case"PIDGEOT":case 18:m.evolution_ids[i]=18;break;case"RATTATA":case 19:m.evolution_ids[i]=19;break;case"RATICATE":case 20:m.evolution_ids[i]=20;break;case"SPEAROW":case 21:m.evolution_ids[i]=21;break;case"FEAROW":case 22:m.evolution_ids[i]=22;break;case"EKANS":case 23:m.evolution_ids[i]=23;break;case"ARBOK":case 24:m.evolution_ids[i]=24;break;case"PIKACHU":case 25:m.evolution_ids[i]=25;break;case"RAICHU":case 26:m.evolution_ids[i]=26;break;case"SANDSHREW":case 27:m.evolution_ids[i]=27;break;case"SANDSLASH":case 28:m.evolution_ids[i]=28;break;case"NIDORAN_FEMALE":case 29:m.evolution_ids[i]=29;break;case"NIDORINA":case 30:m.evolution_ids[i]=30;break;case"NIDOQUEEN":case 31:m.evolution_ids[i]=31;break;case"NIDORAN_MALE":case 32:m.evolution_ids[i]=32;break;case"NIDORINO":case 33:m.evolution_ids[i]=33;break;case"NIDOKING":case 34:m.evolution_ids[i]=34;break;case"CLEFAIRY":case 35:m.evolution_ids[i]=35;break;case"CLEFABLE":case 36:m.evolution_ids[i]=36;break;case"VULPIX":case 37:m.evolution_ids[i]=37;break;case"NINETALES":case 38:m.evolution_ids[i]=38;break;case"JIGGLYPUFF":case 39:m.evolution_ids[i]=39;break;case"WIGGLYTUFF":case 40:m.evolution_ids[i]=40;break;case"ZUBAT":case 41:m.evolution_ids[i]=41;break;case"GOLBAT":case 42:m.evolution_ids[i]=42;break;case"ODDISH":case 43:m.evolution_ids[i]=43;break;case"GLOOM":case 44:m.evolution_ids[i]=44;break;case"VILEPLUME":case 45:m.evolution_ids[i]=45;break;case"PARAS":case 46:m.evolution_ids[i]=46;break;case"PARASECT":case 47:m.evolution_ids[i]=47;break;case"VENONAT":case 48:m.evolution_ids[i]=48;break;case"VENOMOTH":case 49:m.evolution_ids[i]=49;break;case"DIGLETT":case 50:m.evolution_ids[i]=50;break;case"DUGTRIO":case 51:m.evolution_ids[i]=51;break;case"MEOWTH":case 52:m.evolution_ids[i]=52;break;case"PERSIAN":case 53:m.evolution_ids[i]=53;break;case"PSYDUCK":case 54:m.evolution_ids[i]=54;break;case"GOLDUCK":case 55:m.evolution_ids[i]=55;break;case"MANKEY":case 56:m.evolution_ids[i]=56;break;case"PRIMEAPE":case 57:m.evolution_ids[i]=57;break;case"GROWLITHE":case 58:m.evolution_ids[i]=58;break;case"ARCANINE":case 59:m.evolution_ids[i]=59;break;case"POLIWAG":case 60:m.evolution_ids[i]=60;break;case"POLIWHIRL":case 61:m.evolution_ids[i]=61;break;case"POLIWRATH":case 62:m.evolution_ids[i]=62;break;case"ABRA":case 63:m.evolution_ids[i]=63;break;case"KADABRA":case 64:m.evolution_ids[i]=64;break;case"ALAKAZAM":case 65:m.evolution_ids[i]=65;break;case"MACHOP":case 66:m.evolution_ids[i]=66;break;case"MACHOKE":case 67:m.evolution_ids[i]=67;break;case"MACHAMP":case 68:m.evolution_ids[i]=68;break;case"BELLSPROUT":case 69:m.evolution_ids[i]=69;break;case"WEEPINBELL":case 70:m.evolution_ids[i]=70;break;case"VICTREEBEL":case 71:m.evolution_ids[i]=71;break;case"TENTACOOL":case 72:m.evolution_ids[i]=72;break;case"TENTACRUEL":case 73:m.evolution_ids[i]=73;break;case"GEODUDE":case 74:m.evolution_ids[i]=74;break;case"GRAVELER":case 75:m.evolution_ids[i]=75;break;case"GOLEM":case 76:m.evolution_ids[i]=76;break;case"PONYTA":case 77:m.evolution_ids[i]=77;break;case"RAPIDASH":case 78:m.evolution_ids[i]=78;break;case"SLOWPOKE":case 79:m.evolution_ids[i]=79;break;case"SLOWBRO":case 80:m.evolution_ids[i]=80;break;case"MAGNEMITE":case 81:m.evolution_ids[i]=81;break;case"MAGNETON":case 82:m.evolution_ids[i]=82;break;case"FARFETCHD":case 83:m.evolution_ids[i]=83;break;case"DODUO":case 84:m.evolution_ids[i]=84;break;case"DODRIO":case 85:m.evolution_ids[i]=85;break;case"SEEL":case 86:m.evolution_ids[i]=86;break;case"DEWGONG":case 87:m.evolution_ids[i]=87;break;case"GRIMER":case 88:m.evolution_ids[i]=88;break;case"MUK":case 89:m.evolution_ids[i]=89;break;case"SHELLDER":case 90:m.evolution_ids[i]=90;break;case"CLOYSTER":case 91:m.evolution_ids[i]=91;break;case"GASTLY":case 92:m.evolution_ids[i]=92;break;case"HAUNTER":case 93:m.evolution_ids[i]=93;break;case"GENGAR":case 94:m.evolution_ids[i]=94;break;case"ONIX":case 95:m.evolution_ids[i]=95;break;case"DROWZEE":case 96:m.evolution_ids[i]=96;break;case"HYPNO":case 97:m.evolution_ids[i]=97;break;case"KRABBY":case 98:m.evolution_ids[i]=98;break;case"KINGLER":case 99:m.evolution_ids[i]=99;break;case"VOLTORB":case 100:m.evolution_ids[i]=100;break;case"ELECTRODE":case 101:m.evolution_ids[i]=101;break;case"EXEGGCUTE":case 102:m.evolution_ids[i]=102;break;case"EXEGGUTOR":case 103:m.evolution_ids[i]=103;break;case"CUBONE":case 104:m.evolution_ids[i]=104;break;case"MAROWAK":case 105:m.evolution_ids[i]=105;break;case"HITMONLEE":case 106:m.evolution_ids[i]=106;break;case"HITMONCHAN":case 107:m.evolution_ids[i]=107;break;case"LICKITUNG":case 108:m.evolution_ids[i]=108;break;case"KOFFING":case 109:m.evolution_ids[i]=109;break;case"WEEZING":case 110:m.evolution_ids[i]=110;break;case"RHYHORN":case 111:m.evolution_ids[i]=111;break;case"RHYDON":case 112:m.evolution_ids[i]=112;break;case"CHANSEY":case 113:m.evolution_ids[i]=113;break;case"TANGELA":case 114:m.evolution_ids[i]=114;break;case"KANGASKHAN":case 115:m.evolution_ids[i]=115;break;case"HORSEA":case 116:m.evolution_ids[i]=116;break;case"SEADRA":case 117:m.evolution_ids[i]=117;break;case"GOLDEEN":case 118:m.evolution_ids[i]=118;break;case"SEAKING":case 119:m.evolution_ids[i]=119;break;case"STARYU":case 120:m.evolution_ids[i]=120;break;case"STARMIE":case 121:m.evolution_ids[i]=121;break;case"MR_MIME":case 122:m.evolution_ids[i]=122;break;case"SCYTHER":case 123:m.evolution_ids[i]=123;break;case"JYNX":case 124:m.evolution_ids[i]=124;break;case"ELECTABUZZ":case 125:m.evolution_ids[i]=125;break;case"MAGMAR":case 126:m.evolution_ids[i]=126;break;case"PINSIR":case 127:m.evolution_ids[i]=127;break;case"TAUROS":case 128:m.evolution_ids[i]=128;break;case"MAGIKARP":case 129:m.evolution_ids[i]=129;break;case"GYARADOS":case 130:m.evolution_ids[i]=130;break;case"LAPRAS":case 131:m.evolution_ids[i]=131;break;case"DITTO":case 132:m.evolution_ids[i]=132;break;case"EEVEE":case 133:m.evolution_ids[i]=133;break;case"VAPOREON":case 134:m.evolution_ids[i]=134;break;case"JOLTEON":case 135:m.evolution_ids[i]=135;break;case"FLAREON":case 136:m.evolution_ids[i]=136;break;case"PORYGON":case 137:m.evolution_ids[i]=137;break;case"OMANYTE":case 138:m.evolution_ids[i]=138;break;case"OMASTAR":case 139:m.evolution_ids[i]=139;break;case"KABUTO":case 140:m.evolution_ids[i]=140;break;case"KABUTOPS":case 141:m.evolution_ids[i]=141;break;case"AERODACTYL":case 142:m.evolution_ids[i]=142;break;case"SNORLAX":case 143:m.evolution_ids[i]=143;break;case"ARTICUNO":case 144:m.evolution_ids[i]=144;break;case"ZAPDOS":case 145:m.evolution_ids[i]=145;break;case"MOLTRES":case 146:m.evolution_ids[i]=146;break;case"DRATINI":case 147:m.evolution_ids[i]=147;break;case"DRAGONAIR":case 148:m.evolution_ids[i]=148;break;case"DRAGONITE":case 149:m.evolution_ids[i]=149;break;case"MEWTWO":case 150:m.evolution_ids[i]=150;break;case"MEW":case 151:m.evolution_ids[i]=151;break;case"CHIKORITA":case 152:m.evolution_ids[i]=152;break;case"BAYLEEF":case 153:m.evolution_ids[i]=153;break;case"MEGANIUM":case 154:m.evolution_ids[i]=154;break;case"CYNDAQUIL":case 155:m.evolution_ids[i]=155;break;case"QUILAVA":case 156:m.evolution_ids[i]=156;break;case"TYPHLOSION":case 157:m.evolution_ids[i]=157;break;case"TOTODILE":case 158:m.evolution_ids[i]=158;break;case"CROCONAW":case 159:m.evolution_ids[i]=159;break;case"FERALIGATR":case 160:m.evolution_ids[i]=160;break;case"SENTRET":case 161:m.evolution_ids[i]=161;break;case"FURRET":case 162:m.evolution_ids[i]=162;break;case"HOOTHOOT":case 163:m.evolution_ids[i]=163;break;case"NOCTOWL":case 164:m.evolution_ids[i]=164;break;case"LEDYBA":case 165:m.evolution_ids[i]=165;break;case"LEDIAN":case 166:m.evolution_ids[i]=166;break;case"SPINARAK":case 167:m.evolution_ids[i]=167;break;case"ARIADOS":case 168:m.evolution_ids[i]=168;break;case"CROBAT":case 169:m.evolution_ids[i]=169;break;case"CHINCHOU":case 170:m.evolution_ids[i]=170;break;case"LANTURN":case 171:m.evolution_ids[i]=171;break;case"PICHU":case 172:m.evolution_ids[i]=172;break;case"CLEFFA":case 173:m.evolution_ids[i]=173;break;case"IGGLYBUFF":case 174:m.evolution_ids[i]=174;break;case"TOGEPI":case 175:m.evolution_ids[i]=175;break;case"TOGETIC":case 176:m.evolution_ids[i]=176;break;case"NATU":case 177:m.evolution_ids[i]=177;break;case"XATU":case 178:m.evolution_ids[i]=178;break;case"MAREEP":case 179:m.evolution_ids[i]=179;break;case"FLAAFFY":case 180:m.evolution_ids[i]=180;break;case"AMPHAROS":case 181:m.evolution_ids[i]=181;break;case"BELLOSSOM":case 182:m.evolution_ids[i]=182;break;case"MARILL":case 183:m.evolution_ids[i]=183;break;case"AZUMARILL":case 184:m.evolution_ids[i]=184;break;case"SUDOWOODO":case 185:m.evolution_ids[i]=185;break;case"POLITOED":case 186:m.evolution_ids[i]=186;break;case"HOPPIP":case 187:m.evolution_ids[i]=187;break;case"SKIPLOOM":case 188:m.evolution_ids[i]=188;break;case"JUMPLUFF":case 189:m.evolution_ids[i]=189;break;case"AIPOM":case 190:m.evolution_ids[i]=190;break;case"SUNKERN":case 191:m.evolution_ids[i]=191;break;case"SUNFLORA":case 192:m.evolution_ids[i]=192;break;case"YANMA":case 193:m.evolution_ids[i]=193;break;case"WOOPER":case 194:m.evolution_ids[i]=194;break;case"QUAGSIRE":case 195:m.evolution_ids[i]=195;break;case"ESPEON":case 196:m.evolution_ids[i]=196;break;case"UMBREON":case 197:m.evolution_ids[i]=197;break;case"MURKROW":case 198:m.evolution_ids[i]=198;break;case"SLOWKING":case 199:m.evolution_ids[i]=199;break;case"MISDREAVUS":case 200:m.evolution_ids[i]=200;break;case"UNOWN":case 201:m.evolution_ids[i]=201;break;case"WOBBUFFET":case 202:m.evolution_ids[i]=202;break;case"GIRAFARIG":case 203:m.evolution_ids[i]=203;break;case"PINECO":case 204:m.evolution_ids[i]=204;break;case"FORRETRESS":case 205:m.evolution_ids[i]=205;break;case"DUNSPARCE":case 206:m.evolution_ids[i]=206;break;case"GLIGAR":case 207:m.evolution_ids[i]=207;break;case"STEELIX":case 208:m.evolution_ids[i]=208;break;case"SNUBBULL":case 209:m.evolution_ids[i]=209;break;case"GRANBULL":case 210:m.evolution_ids[i]=210;break;case"QWILFISH":case 211:m.evolution_ids[i]=211;break;case"SCIZOR":case 212:m.evolution_ids[i]=212;break;case"SHUCKLE":case 213:m.evolution_ids[i]=213;break;case"HERACROSS":case 214:m.evolution_ids[i]=214;break;case"SNEASEL":case 215:m.evolution_ids[i]=215;break;case"TEDDIURSA":case 216:m.evolution_ids[i]=216;break;case"URSARING":case 217:m.evolution_ids[i]=217;break;case"SLUGMA":case 218:m.evolution_ids[i]=218;break;case"MAGCARGO":case 219:m.evolution_ids[i]=219;break;case"SWINUB":case 220:m.evolution_ids[i]=220;break;case"PILOSWINE":case 221:m.evolution_ids[i]=221;break;case"CORSOLA":case 222:m.evolution_ids[i]=222;break;case"REMORAID":case 223:m.evolution_ids[i]=223;break;case"OCTILLERY":case 224:m.evolution_ids[i]=224;break;case"DELIBIRD":case 225:m.evolution_ids[i]=225;break;case"MANTINE":case 226:m.evolution_ids[i]=226;break;case"SKARMORY":case 227:m.evolution_ids[i]=227;break;case"HOUNDOUR":case 228:m.evolution_ids[i]=228;break;case"HOUNDOOM":case 229:m.evolution_ids[i]=229;break;case"KINGDRA":case 230:m.evolution_ids[i]=230;break;case"PHANPY":case 231:m.evolution_ids[i]=231;break;case"DONPHAN":case 232:m.evolution_ids[i]=232;break;case"PORYGON2":case 233:m.evolution_ids[i]=233;break;case"STANTLER":case 234:m.evolution_ids[i]=234;break;case"SMEARGLE":case 235:m.evolution_ids[i]=235;break;case"TYROGUE":case 236:m.evolution_ids[i]=236;break;case"HITMONTOP":case 237:m.evolution_ids[i]=237;break;case"SMOOCHUM":case 238:m.evolution_ids[i]=238;break;case"ELEKID":case 239:m.evolution_ids[i]=239;break;case"MAGBY":case 240:m.evolution_ids[i]=240;break;case"MILTANK":case 241:m.evolution_ids[i]=241;break;case"BLISSEY":case 242:m.evolution_ids[i]=242;break;case"RAIKOU":case 243:m.evolution_ids[i]=243;break;case"ENTEI":case 244:m.evolution_ids[i]=244;break;case"SUICUNE":case 245:m.evolution_ids[i]=245;break;case"LARVITAR":case 246:m.evolution_ids[i]=246;break;case"PUPITAR":case 247:m.evolution_ids[i]=247;break;case"TYRANITAR":case 248:m.evolution_ids[i]=248;break;case"LUGIA":case 249:m.evolution_ids[i]=249;break;case"HO_OH":case 250:m.evolution_ids[i]=250;break;case"CELEBI":case 251:m.evolution_ids[i]=251;break;case"TREECKO":case 252:m.evolution_ids[i]=252;break;case"GROVYLE":case 253:m.evolution_ids[i]=253;break;case"SCEPTILE":case 254:m.evolution_ids[i]=254;break;case"TORCHIC":case 255:m.evolution_ids[i]=255;break;case"COMBUSKEN":case 256:m.evolution_ids[i]=256;break;case"BLAZIKEN":case 257:m.evolution_ids[i]=257;break;case"MUDKIP":case 258:m.evolution_ids[i]=258;break;case"MARSHTOMP":case 259:m.evolution_ids[i]=259;break;case"SWAMPERT":case 260:m.evolution_ids[i]=260;break;case"POOCHYENA":case 261:m.evolution_ids[i]=261;break;case"MIGHTYENA":case 262:m.evolution_ids[i]=262;break;case"ZIGZAGOON":case 263:m.evolution_ids[i]=263;break;case"LINOONE":case 264:m.evolution_ids[i]=264;break;case"WURMPLE":case 265:m.evolution_ids[i]=265;break;case"SILCOON":case 266:m.evolution_ids[i]=266;break;case"BEAUTIFLY":case 267:m.evolution_ids[i]=267;break;case"CASCOON":case 268:m.evolution_ids[i]=268;break;case"DUSTOX":case 269:m.evolution_ids[i]=269;break;case"LOTAD":case 270:m.evolution_ids[i]=270;break;case"LOMBRE":case 271:m.evolution_ids[i]=271;break;case"LUDICOLO":case 272:m.evolution_ids[i]=272;break;case"SEEDOT":case 273:m.evolution_ids[i]=273;break;case"NUZLEAF":case 274:m.evolution_ids[i]=274;break;case"SHIFTRY":case 275:m.evolution_ids[i]=275;break;case"TAILLOW":case 276:m.evolution_ids[i]=276;break;case"SWELLOW":case 277:m.evolution_ids[i]=277;break;case"WINGULL":case 278:m.evolution_ids[i]=278;break;case"PELIPPER":case 279:m.evolution_ids[i]=279;break;case"RALTS":case 280:m.evolution_ids[i]=280;break;case"KIRLIA":case 281:m.evolution_ids[i]=281;break;case"GARDEVOIR":case 282:m.evolution_ids[i]=282;break;case"SURSKIT":case 283:m.evolution_ids[i]=283;break;case"MASQUERAIN":case 284:m.evolution_ids[i]=284;break;case"SHROOMISH":case 285:m.evolution_ids[i]=285;break;case"BRELOOM":case 286:m.evolution_ids[i]=286;break;case"SLAKOTH":case 287:m.evolution_ids[i]=287;break;case"VIGOROTH":case 288:m.evolution_ids[i]=288;break;case"SLAKING":case 289:m.evolution_ids[i]=289;break;case"NINCADA":case 290:m.evolution_ids[i]=290;break;case"NINJASK":case 291:m.evolution_ids[i]=291;break;case"SHEDINJA":case 292:m.evolution_ids[i]=292;break;case"WHISMUR":case 293:m.evolution_ids[i]=293;break;case"LOUDRED":case 294:m.evolution_ids[i]=294;break;case"EXPLOUD":case 295:m.evolution_ids[i]=295;break;case"MAKUHITA":case 296:m.evolution_ids[i]=296;break;case"HARIYAMA":case 297:m.evolution_ids[i]=297;break;case"AZURILL":case 298:m.evolution_ids[i]=298;break;case"NOSEPASS":case 299:m.evolution_ids[i]=299;break;case"SKITTY":case 300:m.evolution_ids[i]=300;break;case"DELCATTY":case 301:m.evolution_ids[i]=301;break;case"SABLEYE":case 302:m.evolution_ids[i]=302;break;case"MAWILE":case 303:m.evolution_ids[i]=303;break;case"ARON":case 304:m.evolution_ids[i]=304;break;case"LAIRON":case 305:m.evolution_ids[i]=305;break;case"AGGRON":case 306:m.evolution_ids[i]=306;break;case"MEDITITE":case 307:m.evolution_ids[i]=307;break;case"MEDICHAM":case 308:m.evolution_ids[i]=308;break;case"ELECTRIKE":case 309:m.evolution_ids[i]=309;break;case"MANECTRIC":case 310:m.evolution_ids[i]=310;break;case"PLUSLE":case 311:m.evolution_ids[i]=311;break;case"MINUN":case 312:m.evolution_ids[i]=312;break;case"VOLBEAT":case 313:m.evolution_ids[i]=313;break;case"ILLUMISE":case 314:m.evolution_ids[i]=314;break;case"ROSELIA":case 315:m.evolution_ids[i]=315;break;case"GULPIN":case 316:m.evolution_ids[i]=316;break;case"SWALOT":case 317:m.evolution_ids[i]=317;break;case"CARVANHA":case 318:m.evolution_ids[i]=318;break;case"SHARPEDO":case 319:m.evolution_ids[i]=319;break;case"WAILMER":case 320:m.evolution_ids[i]=320;break;case"WAILORD":case 321:m.evolution_ids[i]=321;break;case"NUMEL":case 322:m.evolution_ids[i]=322;break;case"CAMERUPT":case 323:m.evolution_ids[i]=323;break;case"TORKOAL":case 324:m.evolution_ids[i]=324;break;case"SPOINK":case 325:m.evolution_ids[i]=325;break;case"GRUMPIG":case 326:m.evolution_ids[i]=326;break;case"SPINDA":case 327:m.evolution_ids[i]=327;break;case"TRAPINCH":case 328:m.evolution_ids[i]=328;break;case"VIBRAVA":case 329:m.evolution_ids[i]=329;break;case"FLYGON":case 330:m.evolution_ids[i]=330;break;case"CACNEA":case 331:m.evolution_ids[i]=331;break;case"CACTURNE":case 332:m.evolution_ids[i]=332;break;case"SWABLU":case 333:m.evolution_ids[i]=333;break;case"ALTARIA":case 334:m.evolution_ids[i]=334;break;case"ZANGOOSE":case 335:m.evolution_ids[i]=335;break;case"SEVIPER":case 336:m.evolution_ids[i]=336;break;case"LUNATONE":case 337:m.evolution_ids[i]=337;break;case"SOLROCK":case 338:m.evolution_ids[i]=338;break;case"BARBOACH":case 339:m.evolution_ids[i]=339;break;case"WHISCASH":case 340:m.evolution_ids[i]=340;break;case"CORPHISH":case 341:m.evolution_ids[i]=341;break;case"CRAWDAUNT":case 342:m.evolution_ids[i]=342;break;case"BALTOY":case 343:m.evolution_ids[i]=343;break;case"CLAYDOL":case 344:m.evolution_ids[i]=344;break;case"LILEEP":case 345:m.evolution_ids[i]=345;break;case"CRADILY":case 346:m.evolution_ids[i]=346;break;case"ANORITH":case 347:m.evolution_ids[i]=347;break;case"ARMALDO":case 348:m.evolution_ids[i]=348;break;case"FEEBAS":case 349:m.evolution_ids[i]=349;break;case"MILOTIC":case 350:m.evolution_ids[i]=350;break;case"CASTFORM":case 351:m.evolution_ids[i]=351;break;case"KECLEON":case 352:m.evolution_ids[i]=352;break;case"SHUPPET":case 353:m.evolution_ids[i]=353;break;case"BANETTE":case 354:m.evolution_ids[i]=354;break;case"DUSKULL":case 355:m.evolution_ids[i]=355;break;case"DUSCLOPS":case 356:m.evolution_ids[i]=356;break;case"TROPIUS":case 357:m.evolution_ids[i]=357;break;case"CHIMECHO":case 358:m.evolution_ids[i]=358;break;case"ABSOL":case 359:m.evolution_ids[i]=359;break;case"WYNAUT":case 360:m.evolution_ids[i]=360;break;case"SNORUNT":case 361:m.evolution_ids[i]=361;break;case"GLALIE":case 362:m.evolution_ids[i]=362;break;case"SPHEAL":case 363:m.evolution_ids[i]=363;break;case"SEALEO":case 364:m.evolution_ids[i]=364;break;case"WALREIN":case 365:m.evolution_ids[i]=365;break;case"CLAMPERL":case 366:m.evolution_ids[i]=366;break;case"HUNTAIL":case 367:m.evolution_ids[i]=367;break;case"GOREBYSS":case 368:m.evolution_ids[i]=368;break;case"RELICANTH":case 369:m.evolution_ids[i]=369;break;case"LUVDISC":case 370:m.evolution_ids[i]=370;break;case"BAGON":case 371:m.evolution_ids[i]=371;break;case"SHELGON":case 372:m.evolution_ids[i]=372;break;case"SALAMENCE":case 373:m.evolution_ids[i]=373;break;case"BELDUM":case 374:m.evolution_ids[i]=374;break;case"METANG":case 375:m.evolution_ids[i]=375;break;case"METAGROSS":case 376:m.evolution_ids[i]=376;break;case"REGIROCK":case 377:m.evolution_ids[i]=377;break;case"REGICE":case 378:m.evolution_ids[i]=378;break;case"REGISTEEL":case 379:m.evolution_ids[i]=379;break;case"LATIAS":case 380:m.evolution_ids[i]=380;break;case"LATIOS":case 381:m.evolution_ids[i]=381;break;case"KYOGRE":case 382:m.evolution_ids[i]=382;break;case"GROUDON":case 383:m.evolution_ids[i]=383;break;case"RAYQUAZA":case 384:m.evolution_ids[i]=384;break;case"JIRACHI":case 385:m.evolution_ids[i]=385;break;case"DEOXYS":case 386:m.evolution_ids[i]=386;break;case"TURTWIG":case 387:m.evolution_ids[i]=387;break;case"GROTLE":case 388:m.evolution_ids[i]=388;break;case"TORTERRA":case 389:m.evolution_ids[i]=389;break;case"CHIMCHAR":case 390:m.evolution_ids[i]=390;break;case"MONFERNO":case 391:m.evolution_ids[i]=391;break;case"INFERNAPE":case 392:m.evolution_ids[i]=392;break;case"PIPLUP":case 393:m.evolution_ids[i]=393;break;case"PRINPLUP":case 394:m.evolution_ids[i]=394;break;case"EMPOLEON":case 395:m.evolution_ids[i]=395;break;case"STARLY":case 396:m.evolution_ids[i]=396;break;case"STARAVIA":case 397:m.evolution_ids[i]=397;break;case"STARAPTOR":case 398:m.evolution_ids[i]=398;break;case"BIDOOF":case 399:m.evolution_ids[i]=399;break;case"BIBAREL":case 400:m.evolution_ids[i]=400;break;case"KRICKETOT":case 401:m.evolution_ids[i]=401;break;case"KRICKETUNE":case 402:m.evolution_ids[i]=402;break;case"SHINX":case 403:m.evolution_ids[i]=403;break;case"LUXIO":case 404:m.evolution_ids[i]=404;break;case"LUXRAY":case 405:m.evolution_ids[i]=405;break;case"BUDEW":case 406:m.evolution_ids[i]=406;break;case"ROSERADE":case 407:m.evolution_ids[i]=407;break;case"CRANIDOS":case 408:m.evolution_ids[i]=408;break;case"RAMPARDOS":case 409:m.evolution_ids[i]=409;break;case"SHIELDON":case 410:m.evolution_ids[i]=410;break;case"BASTIODON":case 411:m.evolution_ids[i]=411;break;case"BURMY":case 412:m.evolution_ids[i]=412;break;case"WORMADAM":case 413:m.evolution_ids[i]=413;break;case"MOTHIM":case 414:m.evolution_ids[i]=414;break;case"COMBEE":case 415:m.evolution_ids[i]=415;break;case"VESPIQUEN":case 416:m.evolution_ids[i]=416;break;case"PACHIRISU":case 417:m.evolution_ids[i]=417;break;case"BUIZEL":case 418:m.evolution_ids[i]=418;break;case"FLOATZEL":case 419:m.evolution_ids[i]=419;break;case"CHERUBI":case 420:m.evolution_ids[i]=420;break;case"CHERRIM":case 421:m.evolution_ids[i]=421;break;case"SHELLOS":case 422:m.evolution_ids[i]=422;break;case"GASTRODON":case 423:m.evolution_ids[i]=423;break;case"AMBIPOM":case 424:m.evolution_ids[i]=424;break;case"DRIFLOON":case 425:m.evolution_ids[i]=425;break;case"DRIFBLIM":case 426:m.evolution_ids[i]=426;break;case"BUNEARY":case 427:m.evolution_ids[i]=427;break;case"LOPUNNY":case 428:m.evolution_ids[i]=428;break;case"MISMAGIUS":case 429:m.evolution_ids[i]=429;break;case"HONCHKROW":case 430:m.evolution_ids[i]=430;break;case"GLAMEOW":case 431:m.evolution_ids[i]=431;break;case"PURUGLY":case 432:m.evolution_ids[i]=432;break;case"CHINGLING":case 433:m.evolution_ids[i]=433;break;case"STUNKY":case 434:m.evolution_ids[i]=434;break;case"SKUNTANK":case 435:m.evolution_ids[i]=435;break;case"BRONZOR":case 436:m.evolution_ids[i]=436;break;case"BRONZONG":case 437:m.evolution_ids[i]=437;break;case"BONSLY":case 438:m.evolution_ids[i]=438;break;case"MIME_JR":case 439:m.evolution_ids[i]=439;break;case"HAPPINY":case 440:m.evolution_ids[i]=440;break;case"CHATOT":case 441:m.evolution_ids[i]=441;break;case"SPIRITOMB":case 442:m.evolution_ids[i]=442;break;case"GIBLE":case 443:m.evolution_ids[i]=443;break;case"GABITE":case 444:m.evolution_ids[i]=444;break;case"GARCHOMP":case 445:m.evolution_ids[i]=445;break;case"MUNCHLAX":case 446:m.evolution_ids[i]=446;break;case"RIOLU":case 447:m.evolution_ids[i]=447;break;case"LUCARIO":case 448:m.evolution_ids[i]=448;break;case"HIPPOPOTAS":case 449:m.evolution_ids[i]=449;break;case"HIPPOWDON":case 450:m.evolution_ids[i]=450;break;case"SKORUPI":case 451:m.evolution_ids[i]=451;break;case"DRAPION":case 452:m.evolution_ids[i]=452;break;case"CROAGUNK":case 453:m.evolution_ids[i]=453;break;case"TOXICROAK":case 454:m.evolution_ids[i]=454;break;case"CARNIVINE":case 455:m.evolution_ids[i]=455;break;case"FINNEON":case 456:m.evolution_ids[i]=456;break;case"LUMINEON":case 457:m.evolution_ids[i]=457;break;case"MANTYKE":case 458:m.evolution_ids[i]=458;break;case"SNOVER":case 459:m.evolution_ids[i]=459;break;case"ABOMASNOW":case 460:m.evolution_ids[i]=460;break;case"WEAVILE":case 461:m.evolution_ids[i]=461;break;case"MAGNEZONE":case 462:m.evolution_ids[i]=462;break;case"LICKILICKY":case 463:m.evolution_ids[i]=463;break;case"RHYPERIOR":case 464:m.evolution_ids[i]=464;break;case"TANGROWTH":case 465:m.evolution_ids[i]=465;break;case"ELECTIVIRE":case 466:m.evolution_ids[i]=466;break;case"MAGMORTAR":case 467:m.evolution_ids[i]=467;break;case"TOGEKISS":case 468:m.evolution_ids[i]=468;break;case"YANMEGA":case 469:m.evolution_ids[i]=469;break;case"LEAFEON":case 470:m.evolution_ids[i]=470;break;case"GLACEON":case 471:m.evolution_ids[i]=471;break;case"GLISCOR":case 472:m.evolution_ids[i]=472;break;case"MAMOSWINE":case 473:m.evolution_ids[i]=473;break;case"PORYGON_Z":case 474:m.evolution_ids[i]=474;break;case"GALLADE":case 475:m.evolution_ids[i]=475;break;case"PROBOPASS":case 476:m.evolution_ids[i]=476;break;case"DUSKNOIR":case 477:m.evolution_ids[i]=477;break;case"FROSLASS":case 478:m.evolution_ids[i]=478;break;case"ROTOM":case 479:m.evolution_ids[i]=479;break;case"UXIE":case 480:m.evolution_ids[i]=480;break;case"MESPRIT":case 481:m.evolution_ids[i]=481;break;case"AZELF":case 482:m.evolution_ids[i]=482;break;case"DIALGA":case 483:m.evolution_ids[i]=483;break;case"PALKIA":case 484:m.evolution_ids[i]=484;break;case"HEATRAN":case 485:m.evolution_ids[i]=485;break;case"REGIGIGAS":case 486:m.evolution_ids[i]=486;break;case"GIRATINA":case 487:m.evolution_ids[i]=487;break;case"CRESSELIA":case 488:m.evolution_ids[i]=488;break;case"PHIONE":case 489:m.evolution_ids[i]=489;break;case"MANAPHY":case 490:m.evolution_ids[i]=490;break;case"DARKRAI":case 491:m.evolution_ids[i]=491;break;case"SHAYMIN":case 492:m.evolution_ids[i]=492;break;case"ARCEUS":case 493:m.evolution_ids[i]=493;break;case"MELTAN":case 808:m.evolution_ids[i]=808;break;case"MELMETAL":case 809:m.evolution_ids[i]=809;break}}}if(d.evolution_pips!=null){m.evolution_pips=d.evolution_pips|0}switch(d.rarity){case"POKEMON_RARITY_NORMAL":case 0:m.rarity=0;break;case"POKEMON_RARITY_LEGENDARY":case 1:m.rarity=1;break;case"POKEMON_RARITY_MYTHIC":case 2:m.rarity=2;break}if(d.pokedex_height_m!=null){m.pokedex_height_m=Number(d.pokedex_height_m)}if(d.pokedex_weight_kg!=null){m.pokedex_weight_kg=Number(d.pokedex_weight_kg)}switch(d.parent_pokemon_id){case"MISSINGNO":case 0:m.parent_pokemon_id=0;break;case"BULBASAUR":case 1:m.parent_pokemon_id=1;break;case"IVYSAUR":case 2:m.parent_pokemon_id=2;break;case"VENUSAUR":case 3:m.parent_pokemon_id=3;break;case"CHARMANDER":case 4:m.parent_pokemon_id=4;break;case"CHARMELEON":case 5:m.parent_pokemon_id=5;break;case"CHARIZARD":case 6:m.parent_pokemon_id=6;break;case"SQUIRTLE":case 7:m.parent_pokemon_id=7;break;case"WARTORTLE":case 8:m.parent_pokemon_id=8;break;case"BLASTOISE":case 9:m.parent_pokemon_id=9;break;case"CATERPIE":case 10:m.parent_pokemon_id=10;break;case"METAPOD":case 11:m.parent_pokemon_id=11;break;case"BUTTERFREE":case 12:m.parent_pokemon_id=12;break;case"WEEDLE":case 13:m.parent_pokemon_id=13;break;case"KAKUNA":case 14:m.parent_pokemon_id=14;break;case"BEEDRILL":case 15:m.parent_pokemon_id=15;break;case"PIDGEY":case 16:m.parent_pokemon_id=16;break;case"PIDGEOTTO":case 17:m.parent_pokemon_id=17;break;case"PIDGEOT":case 18:m.parent_pokemon_id=18;break;case"RATTATA":case 19:m.parent_pokemon_id=19;break;case"RATICATE":case 20:m.parent_pokemon_id=20;break;case"SPEAROW":case 21:m.parent_pokemon_id=21;break;case"FEAROW":case 22:m.parent_pokemon_id=22;break;case"EKANS":case 23:m.parent_pokemon_id=23;break;case"ARBOK":case 24:m.parent_pokemon_id=24;break;case"PIKACHU":case 25:m.parent_pokemon_id=25;break;case"RAICHU":case 26:m.parent_pokemon_id=26;break;case"SANDSHREW":case 27:m.parent_pokemon_id=27;break;case"SANDSLASH":case 28:m.parent_pokemon_id=28;break;case"NIDORAN_FEMALE":case 29:m.parent_pokemon_id=29;break;case"NIDORINA":case 30:m.parent_pokemon_id=30;break;case"NIDOQUEEN":case 31:m.parent_pokemon_id=31;break;case"NIDORAN_MALE":case 32:m.parent_pokemon_id=32;break;case"NIDORINO":case 33:m.parent_pokemon_id=33;break;case"NIDOKING":case 34:m.parent_pokemon_id=34;break;case"CLEFAIRY":case 35:m.parent_pokemon_id=35;break;case"CLEFABLE":case 36:m.parent_pokemon_id=36;break;case"VULPIX":case 37:m.parent_pokemon_id=37;break;case"NINETALES":case 38:m.parent_pokemon_id=38;break;case"JIGGLYPUFF":case 39:m.parent_pokemon_id=39;break;case"WIGGLYTUFF":case 40:m.parent_pokemon_id=40;break;case"ZUBAT":case 41:m.parent_pokemon_id=41;break;case"GOLBAT":case 42:m.parent_pokemon_id=42;break;case"ODDISH":case 43:m.parent_pokemon_id=43;break;case"GLOOM":case 44:m.parent_pokemon_id=44;break;case"VILEPLUME":case 45:m.parent_pokemon_id=45;break;case"PARAS":case 46:m.parent_pokemon_id=46;break;case"PARASECT":case 47:m.parent_pokemon_id=47;break;case"VENONAT":case 48:m.parent_pokemon_id=48;break;case"VENOMOTH":case 49:m.parent_pokemon_id=49;break;case"DIGLETT":case 50:m.parent_pokemon_id=50;break;case"DUGTRIO":case 51:m.parent_pokemon_id=51;break;case"MEOWTH":case 52:m.parent_pokemon_id=52;break;case"PERSIAN":case 53:m.parent_pokemon_id=53;break;case"PSYDUCK":case 54:m.parent_pokemon_id=54;break;case"GOLDUCK":case 55:m.parent_pokemon_id=55;break;case"MANKEY":case 56:m.parent_pokemon_id=56;break;case"PRIMEAPE":case 57:m.parent_pokemon_id=57;break;case"GROWLITHE":case 58:m.parent_pokemon_id=58;break;case"ARCANINE":case 59:m.parent_pokemon_id=59;break;case"POLIWAG":case 60:m.parent_pokemon_id=60;break;case"POLIWHIRL":case 61:m.parent_pokemon_id=61;break;case"POLIWRATH":case 62:m.parent_pokemon_id=62;break;case"ABRA":case 63:m.parent_pokemon_id=63;break;case"KADABRA":case 64:m.parent_pokemon_id=64;break;case"ALAKAZAM":case 65:m.parent_pokemon_id=65;break;case"MACHOP":case 66:m.parent_pokemon_id=66;break;case"MACHOKE":case 67:m.parent_pokemon_id=67;break;case"MACHAMP":case 68:m.parent_pokemon_id=68;break;case"BELLSPROUT":case 69:m.parent_pokemon_id=69;break;case"WEEPINBELL":case 70:m.parent_pokemon_id=70;break;case"VICTREEBEL":case 71:m.parent_pokemon_id=71;break;case"TENTACOOL":case 72:m.parent_pokemon_id=72;break;case"TENTACRUEL":case 73:m.parent_pokemon_id=73;break;case"GEODUDE":case 74:m.parent_pokemon_id=74;break;case"GRAVELER":case 75:m.parent_pokemon_id=75;break;case"GOLEM":case 76:m.parent_pokemon_id=76;break;case"PONYTA":case 77:m.parent_pokemon_id=77;break;case"RAPIDASH":case 78:m.parent_pokemon_id=78;break;case"SLOWPOKE":case 79:m.parent_pokemon_id=79;break;case"SLOWBRO":case 80:m.parent_pokemon_id=80;break;case"MAGNEMITE":case 81:m.parent_pokemon_id=81;break;case"MAGNETON":case 82:m.parent_pokemon_id=82;break;case"FARFETCHD":case 83:m.parent_pokemon_id=83;break;case"DODUO":case 84:m.parent_pokemon_id=84;break;case"DODRIO":case 85:m.parent_pokemon_id=85;break;case"SEEL":case 86:m.parent_pokemon_id=86;break;case"DEWGONG":case 87:m.parent_pokemon_id=87;break;case"GRIMER":case 88:m.parent_pokemon_id=88;break;case"MUK":case 89:m.parent_pokemon_id=89;break;case"SHELLDER":case 90:m.parent_pokemon_id=90;break;case"CLOYSTER":case 91:m.parent_pokemon_id=91;break;case"GASTLY":case 92:m.parent_pokemon_id=92;break;case"HAUNTER":case 93:m.parent_pokemon_id=93;break;case"GENGAR":case 94:m.parent_pokemon_id=94;break;case"ONIX":case 95:m.parent_pokemon_id=95;break;case"DROWZEE":case 96:m.parent_pokemon_id=96;break;case"HYPNO":case 97:m.parent_pokemon_id=97;break;case"KRABBY":case 98:m.parent_pokemon_id=98;break;case"KINGLER":case 99:m.parent_pokemon_id=99;break;case"VOLTORB":case 100:m.parent_pokemon_id=100;break;case"ELECTRODE":case 101:m.parent_pokemon_id=101;break;case"EXEGGCUTE":case 102:m.parent_pokemon_id=102;break;case"EXEGGUTOR":case 103:m.parent_pokemon_id=103;break;case"CUBONE":case 104:m.parent_pokemon_id=104;break;case"MAROWAK":case 105:m.parent_pokemon_id=105;break;case"HITMONLEE":case 106:m.parent_pokemon_id=106;break;case"HITMONCHAN":case 107:m.parent_pokemon_id=107;break;case"LICKITUNG":case 108:m.parent_pokemon_id=108;break;case"KOFFING":case 109:m.parent_pokemon_id=109;break;case"WEEZING":case 110:m.parent_pokemon_id=110;break;case"RHYHORN":case 111:m.parent_pokemon_id=111;break;case"RHYDON":case 112:m.parent_pokemon_id=112;break;case"CHANSEY":case 113:m.parent_pokemon_id=113;break;case"TANGELA":case 114:m.parent_pokemon_id=114;break;case"KANGASKHAN":case 115:m.parent_pokemon_id=115;break;case"HORSEA":case 116:m.parent_pokemon_id=116;break;case"SEADRA":case 117:m.parent_pokemon_id=117;break;case"GOLDEEN":case 118:m.parent_pokemon_id=118;break;case"SEAKING":case 119:m.parent_pokemon_id=119;break;case"STARYU":case 120:m.parent_pokemon_id=120;break;case"STARMIE":case 121:m.parent_pokemon_id=121;break;case"MR_MIME":case 122:m.parent_pokemon_id=122;break;case"SCYTHER":case 123:m.parent_pokemon_id=123;break;case"JYNX":case 124:m.parent_pokemon_id=124;break;case"ELECTABUZZ":case 125:m.parent_pokemon_id=125;break;case"MAGMAR":case 126:m.parent_pokemon_id=126;break;case"PINSIR":case 127:m.parent_pokemon_id=127;break;case"TAUROS":case 128:m.parent_pokemon_id=128;break;case"MAGIKARP":case 129:m.parent_pokemon_id=129;break;case"GYARADOS":case 130:m.parent_pokemon_id=130;break;case"LAPRAS":case 131:m.parent_pokemon_id=131;break;case"DITTO":case 132:m.parent_pokemon_id=132;break;case"EEVEE":case 133:m.parent_pokemon_id=133;break;case"VAPOREON":case 134:m.parent_pokemon_id=134;break;case"JOLTEON":case 135:m.parent_pokemon_id=135;break;case"FLAREON":case 136:m.parent_pokemon_id=136;break;case"PORYGON":case 137:m.parent_pokemon_id=137;break;case"OMANYTE":case 138:m.parent_pokemon_id=138;break;case"OMASTAR":case 139:m.parent_pokemon_id=139;break;case"KABUTO":case 140:m.parent_pokemon_id=140;break;case"KABUTOPS":case 141:m.parent_pokemon_id=141;break;case"AERODACTYL":case 142:m.parent_pokemon_id=142;break;case"SNORLAX":case 143:m.parent_pokemon_id=143;break;case"ARTICUNO":case 144:m.parent_pokemon_id=144;break;case"ZAPDOS":case 145:m.parent_pokemon_id=145;break;case"MOLTRES":case 146:m.parent_pokemon_id=146;break;case"DRATINI":case 147:m.parent_pokemon_id=147;break;case"DRAGONAIR":case 148:m.parent_pokemon_id=148;break;case"DRAGONITE":case 149:m.parent_pokemon_id=149;break;case"MEWTWO":case 150:m.parent_pokemon_id=150;break;case"MEW":case 151:m.parent_pokemon_id=151;break;case"CHIKORITA":case 152:m.parent_pokemon_id=152;break;case"BAYLEEF":case 153:m.parent_pokemon_id=153;break;case"MEGANIUM":case 154:m.parent_pokemon_id=154;break;case"CYNDAQUIL":case 155:m.parent_pokemon_id=155;break;case"QUILAVA":case 156:m.parent_pokemon_id=156;break;case"TYPHLOSION":case 157:m.parent_pokemon_id=157;break;case"TOTODILE":case 158:m.parent_pokemon_id=158;break;case"CROCONAW":case 159:m.parent_pokemon_id=159;break;case"FERALIGATR":case 160:m.parent_pokemon_id=160;break;case"SENTRET":case 161:m.parent_pokemon_id=161;break;case"FURRET":case 162:m.parent_pokemon_id=162;break;case"HOOTHOOT":case 163:m.parent_pokemon_id=163;break;case"NOCTOWL":case 164:m.parent_pokemon_id=164;break;case"LEDYBA":case 165:m.parent_pokemon_id=165;break;case"LEDIAN":case 166:m.parent_pokemon_id=166;break;case"SPINARAK":case 167:m.parent_pokemon_id=167;break;case"ARIADOS":case 168:m.parent_pokemon_id=168;break;case"CROBAT":case 169:m.parent_pokemon_id=169;break;case"CHINCHOU":case 170:m.parent_pokemon_id=170;break;case"LANTURN":case 171:m.parent_pokemon_id=171;break;case"PICHU":case 172:m.parent_pokemon_id=172;break;case"CLEFFA":case 173:m.parent_pokemon_id=173;break;case"IGGLYBUFF":case 174:m.parent_pokemon_id=174;break;case"TOGEPI":case 175:m.parent_pokemon_id=175;break;case"TOGETIC":case 176:m.parent_pokemon_id=176;break;case"NATU":case 177:m.parent_pokemon_id=177;break;case"XATU":case 178:m.parent_pokemon_id=178;break;case"MAREEP":case 179:m.parent_pokemon_id=179;break;case"FLAAFFY":case 180:m.parent_pokemon_id=180;break;case"AMPHAROS":case 181:m.parent_pokemon_id=181;break;case"BELLOSSOM":case 182:m.parent_pokemon_id=182;break;case"MARILL":case 183:m.parent_pokemon_id=183;break;case"AZUMARILL":case 184:m.parent_pokemon_id=184;break;case"SUDOWOODO":case 185:m.parent_pokemon_id=185;break;case"POLITOED":case 186:m.parent_pokemon_id=186;break;case"HOPPIP":case 187:m.parent_pokemon_id=187;break;case"SKIPLOOM":case 188:m.parent_pokemon_id=188;break;case"JUMPLUFF":case 189:m.parent_pokemon_id=189;break;case"AIPOM":case 190:m.parent_pokemon_id=190;break;case"SUNKERN":case 191:m.parent_pokemon_id=191;break;case"SUNFLORA":case 192:m.parent_pokemon_id=192;break;case"YANMA":case 193:m.parent_pokemon_id=193;break;case"WOOPER":case 194:m.parent_pokemon_id=194;break;case"QUAGSIRE":case 195:m.parent_pokemon_id=195;break;case"ESPEON":case 196:m.parent_pokemon_id=196;break;case"UMBREON":case 197:m.parent_pokemon_id=197;break;case"MURKROW":case 198:m.parent_pokemon_id=198;break;case"SLOWKING":case 199:m.parent_pokemon_id=199;break;case"MISDREAVUS":case 200:m.parent_pokemon_id=200;break;case"UNOWN":case 201:m.parent_pokemon_id=201;break;case"WOBBUFFET":case 202:m.parent_pokemon_id=202;break;case"GIRAFARIG":case 203:m.parent_pokemon_id=203;break;case"PINECO":case 204:m.parent_pokemon_id=204;break;case"FORRETRESS":case 205:m.parent_pokemon_id=205;break;case"DUNSPARCE":case 206:m.parent_pokemon_id=206;break;case"GLIGAR":case 207:m.parent_pokemon_id=207;break;case"STEELIX":case 208:m.parent_pokemon_id=208;break;case"SNUBBULL":case 209:m.parent_pokemon_id=209;break;case"GRANBULL":case 210:m.parent_pokemon_id=210;break;case"QWILFISH":case 211:m.parent_pokemon_id=211;break;case"SCIZOR":case 212:m.parent_pokemon_id=212;break;case"SHUCKLE":case 213:m.parent_pokemon_id=213;break;case"HERACROSS":case 214:m.parent_pokemon_id=214;break;case"SNEASEL":case 215:m.parent_pokemon_id=215;break;case"TEDDIURSA":case 216:m.parent_pokemon_id=216;break;case"URSARING":case 217:m.parent_pokemon_id=217;break;case"SLUGMA":case 218:m.parent_pokemon_id=218;break;case"MAGCARGO":case 219:m.parent_pokemon_id=219;break;case"SWINUB":case 220:m.parent_pokemon_id=220;break;case"PILOSWINE":case 221:m.parent_pokemon_id=221;break;case"CORSOLA":case 222:m.parent_pokemon_id=222;break;case"REMORAID":case 223:m.parent_pokemon_id=223;break;case"OCTILLERY":case 224:m.parent_pokemon_id=224;break;case"DELIBIRD":case 225:m.parent_pokemon_id=225;break;case"MANTINE":case 226:m.parent_pokemon_id=226;break;case"SKARMORY":case 227:m.parent_pokemon_id=227;break;case"HOUNDOUR":case 228:m.parent_pokemon_id=228;break;case"HOUNDOOM":case 229:m.parent_pokemon_id=229;break;case"KINGDRA":case 230:m.parent_pokemon_id=230;break;case"PHANPY":case 231:m.parent_pokemon_id=231;break;case"DONPHAN":case 232:m.parent_pokemon_id=232;break;case"PORYGON2":case 233:m.parent_pokemon_id=233;break;case"STANTLER":case 234:m.parent_pokemon_id=234;break;case"SMEARGLE":case 235:m.parent_pokemon_id=235;break;case"TYROGUE":case 236:m.parent_pokemon_id=236;break;case"HITMONTOP":case 237:m.parent_pokemon_id=237;break;case"SMOOCHUM":case 238:m.parent_pokemon_id=238;break;case"ELEKID":case 239:m.parent_pokemon_id=239;break;case"MAGBY":case 240:m.parent_pokemon_id=240;break;case"MILTANK":case 241:m.parent_pokemon_id=241;break;case"BLISSEY":case 242:m.parent_pokemon_id=242;break;case"RAIKOU":case 243:m.parent_pokemon_id=243;break;case"ENTEI":case 244:m.parent_pokemon_id=244;break;case"SUICUNE":case 245:m.parent_pokemon_id=245;break;case"LARVITAR":case 246:m.parent_pokemon_id=246;break;case"PUPITAR":case 247:m.parent_pokemon_id=247;break;case"TYRANITAR":case 248:m.parent_pokemon_id=248;break;case"LUGIA":case 249:m.parent_pokemon_id=249;break;case"HO_OH":case 250:m.parent_pokemon_id=250;break;case"CELEBI":case 251:m.parent_pokemon_id=251;break;case"TREECKO":case 252:m.parent_pokemon_id=252;break;case"GROVYLE":case 253:m.parent_pokemon_id=253;break;case"SCEPTILE":case 254:m.parent_pokemon_id=254;break;case"TORCHIC":case 255:m.parent_pokemon_id=255;break;case"COMBUSKEN":case 256:m.parent_pokemon_id=256;break;case"BLAZIKEN":case 257:m.parent_pokemon_id=257;break;case"MUDKIP":case 258:m.parent_pokemon_id=258;break;case"MARSHTOMP":case 259:m.parent_pokemon_id=259;break;case"SWAMPERT":case 260:m.parent_pokemon_id=260;break;case"POOCHYENA":case 261:m.parent_pokemon_id=261;break;case"MIGHTYENA":case 262:m.parent_pokemon_id=262;break;case"ZIGZAGOON":case 263:m.parent_pokemon_id=263;break;case"LINOONE":case 264:m.parent_pokemon_id=264;break;case"WURMPLE":case 265:m.parent_pokemon_id=265;break;case"SILCOON":case 266:m.parent_pokemon_id=266;break;case"BEAUTIFLY":case 267:m.parent_pokemon_id=267;break;case"CASCOON":case 268:m.parent_pokemon_id=268;break;case"DUSTOX":case 269:m.parent_pokemon_id=269;break;case"LOTAD":case 270:m.parent_pokemon_id=270;break;case"LOMBRE":case 271:m.parent_pokemon_id=271;break;case"LUDICOLO":case 272:m.parent_pokemon_id=272;break;case"SEEDOT":case 273:m.parent_pokemon_id=273;break;case"NUZLEAF":case 274:m.parent_pokemon_id=274;break;case"SHIFTRY":case 275:m.parent_pokemon_id=275;break;case"TAILLOW":case 276:m.parent_pokemon_id=276;break;case"SWELLOW":case 277:m.parent_pokemon_id=277;break;case"WINGULL":case 278:m.parent_pokemon_id=278;break;case"PELIPPER":case 279:m.parent_pokemon_id=279;break;case"RALTS":case 280:m.parent_pokemon_id=280;break;case"KIRLIA":case 281:m.parent_pokemon_id=281;break;case"GARDEVOIR":case 282:m.parent_pokemon_id=282;break;case"SURSKIT":case 283:m.parent_pokemon_id=283;break;case"MASQUERAIN":case 284:m.parent_pokemon_id=284;break;case"SHROOMISH":case 285:m.parent_pokemon_id=285;break;case"BRELOOM":case 286:m.parent_pokemon_id=286;break;case"SLAKOTH":case 287:m.parent_pokemon_id=287;break;case"VIGOROTH":case 288:m.parent_pokemon_id=288;break;case"SLAKING":case 289:m.parent_pokemon_id=289;break;case"NINCADA":case 290:m.parent_pokemon_id=290;break;case"NINJASK":case 291:m.parent_pokemon_id=291;break;case"SHEDINJA":case 292:m.parent_pokemon_id=292;break;case"WHISMUR":case 293:m.parent_pokemon_id=293;break;case"LOUDRED":case 294:m.parent_pokemon_id=294;break;case"EXPLOUD":case 295:m.parent_pokemon_id=295;break;case"MAKUHITA":case 296:m.parent_pokemon_id=296;break;case"HARIYAMA":case 297:m.parent_pokemon_id=297;break;case"AZURILL":case 298:m.parent_pokemon_id=298;break;case"NOSEPASS":case 299:m.parent_pokemon_id=299;break;case"SKITTY":case 300:m.parent_pokemon_id=300;break;case"DELCATTY":case 301:m.parent_pokemon_id=301;break;case"SABLEYE":case 302:m.parent_pokemon_id=302;break;case"MAWILE":case 303:m.parent_pokemon_id=303;break;case"ARON":case 304:m.parent_pokemon_id=304;break;case"LAIRON":case 305:m.parent_pokemon_id=305;break;case"AGGRON":case 306:m.parent_pokemon_id=306;break;case"MEDITITE":case 307:m.parent_pokemon_id=307;break;case"MEDICHAM":case 308:m.parent_pokemon_id=308;break;case"ELECTRIKE":case 309:m.parent_pokemon_id=309;break;case"MANECTRIC":case 310:m.parent_pokemon_id=310;break;case"PLUSLE":case 311:m.parent_pokemon_id=311;break;case"MINUN":case 312:m.parent_pokemon_id=312;break;case"VOLBEAT":case 313:m.parent_pokemon_id=313;break;case"ILLUMISE":case 314:m.parent_pokemon_id=314;break;case"ROSELIA":case 315:m.parent_pokemon_id=315;break;case"GULPIN":case 316:m.parent_pokemon_id=316;break;case"SWALOT":case 317:m.parent_pokemon_id=317;break;case"CARVANHA":case 318:m.parent_pokemon_id=318;break;case"SHARPEDO":case 319:m.parent_pokemon_id=319;break;case"WAILMER":case 320:m.parent_pokemon_id=320;break;case"WAILORD":case 321:m.parent_pokemon_id=321;break;case"NUMEL":case 322:m.parent_pokemon_id=322;break;case"CAMERUPT":case 323:m.parent_pokemon_id=323;break;case"TORKOAL":case 324:m.parent_pokemon_id=324;break;case"SPOINK":case 325:m.parent_pokemon_id=325;break;case"GRUMPIG":case 326:m.parent_pokemon_id=326;break;case"SPINDA":case 327:m.parent_pokemon_id=327;break;case"TRAPINCH":case 328:m.parent_pokemon_id=328;break;case"VIBRAVA":case 329:m.parent_pokemon_id=329;break;case"FLYGON":case 330:m.parent_pokemon_id=330;break;case"CACNEA":case 331:m.parent_pokemon_id=331;break;case"CACTURNE":case 332:m.parent_pokemon_id=332;break;case"SWABLU":case 333:m.parent_pokemon_id=333;break;case"ALTARIA":case 334:m.parent_pokemon_id=334;break;case"ZANGOOSE":case 335:m.parent_pokemon_id=335;break;case"SEVIPER":case 336:m.parent_pokemon_id=336;break;case"LUNATONE":case 337:m.parent_pokemon_id=337;break;case"SOLROCK":case 338:m.parent_pokemon_id=338;break;case"BARBOACH":case 339:m.parent_pokemon_id=339;break;case"WHISCASH":case 340:m.parent_pokemon_id=340;break;case"CORPHISH":case 341:m.parent_pokemon_id=341;break;case"CRAWDAUNT":case 342:m.parent_pokemon_id=342;break;case"BALTOY":case 343:m.parent_pokemon_id=343;break;case"CLAYDOL":case 344:m.parent_pokemon_id=344;break;case"LILEEP":case 345:m.parent_pokemon_id=345;break;case"CRADILY":case 346:m.parent_pokemon_id=346;break;case"ANORITH":case 347:m.parent_pokemon_id=347;break;case"ARMALDO":case 348:m.parent_pokemon_id=348;break;case"FEEBAS":case 349:m.parent_pokemon_id=349;break;case"MILOTIC":case 350:m.parent_pokemon_id=350;break;case"CASTFORM":case 351:m.parent_pokemon_id=351;break;case"KECLEON":case 352:m.parent_pokemon_id=352;break;case"SHUPPET":case 353:m.parent_pokemon_id=353;break;case"BANETTE":case 354:m.parent_pokemon_id=354;break;case"DUSKULL":case 355:m.parent_pokemon_id=355;break;case"DUSCLOPS":case 356:m.parent_pokemon_id=356;break;case"TROPIUS":case 357:m.parent_pokemon_id=357;break;case"CHIMECHO":case 358:m.parent_pokemon_id=358;break;case"ABSOL":case 359:m.parent_pokemon_id=359;break;case"WYNAUT":case 360:m.parent_pokemon_id=360;break;case"SNORUNT":case 361:m.parent_pokemon_id=361;break;case"GLALIE":case 362:m.parent_pokemon_id=362;break;case"SPHEAL":case 363:m.parent_pokemon_id=363;break;case"SEALEO":case 364:m.parent_pokemon_id=364;break;case"WALREIN":case 365:m.parent_pokemon_id=365;break;case"CLAMPERL":case 366:m.parent_pokemon_id=366;break;case"HUNTAIL":case 367:m.parent_pokemon_id=367;break;case"GOREBYSS":case 368:m.parent_pokemon_id=368;break;case"RELICANTH":case 369:m.parent_pokemon_id=369;break;case"LUVDISC":case 370:m.parent_pokemon_id=370;break;case"BAGON":case 371:m.parent_pokemon_id=371;break;case"SHELGON":case 372:m.parent_pokemon_id=372;break;case"SALAMENCE":case 373:m.parent_pokemon_id=373;break;case"BELDUM":case 374:m.parent_pokemon_id=374;break;case"METANG":case 375:m.parent_pokemon_id=375;break;case"METAGROSS":case 376:m.parent_pokemon_id=376;break;case"REGIROCK":case 377:m.parent_pokemon_id=377;break;case"REGICE":case 378:m.parent_pokemon_id=378;break;case"REGISTEEL":case 379:m.parent_pokemon_id=379;break;case"LATIAS":case 380:m.parent_pokemon_id=380;break;case"LATIOS":case 381:m.parent_pokemon_id=381;break;case"KYOGRE":case 382:m.parent_pokemon_id=382;break;case"GROUDON":case 383:m.parent_pokemon_id=383;break;case"RAYQUAZA":case 384:m.parent_pokemon_id=384;break;case"JIRACHI":case 385:m.parent_pokemon_id=385;break;case"DEOXYS":case 386:m.parent_pokemon_id=386;break;case"TURTWIG":case 387:m.parent_pokemon_id=387;break;case"GROTLE":case 388:m.parent_pokemon_id=388;break;case"TORTERRA":case 389:m.parent_pokemon_id=389;break;case"CHIMCHAR":case 390:m.parent_pokemon_id=390;break;case"MONFERNO":case 391:m.parent_pokemon_id=391;break;case"INFERNAPE":case 392:m.parent_pokemon_id=392;break;case"PIPLUP":case 393:m.parent_pokemon_id=393;break;case"PRINPLUP":case 394:m.parent_pokemon_id=394;break;case"EMPOLEON":case 395:m.parent_pokemon_id=395;break;case"STARLY":case 396:m.parent_pokemon_id=396;break;case"STARAVIA":case 397:m.parent_pokemon_id=397;break;case"STARAPTOR":case 398:m.parent_pokemon_id=398;break;case"BIDOOF":case 399:m.parent_pokemon_id=399;break;case"BIBAREL":case 400:m.parent_pokemon_id=400;break;case"KRICKETOT":case 401:m.parent_pokemon_id=401;break;case"KRICKETUNE":case 402:m.parent_pokemon_id=402;break;case"SHINX":case 403:m.parent_pokemon_id=403;break;case"LUXIO":case 404:m.parent_pokemon_id=404;break;case"LUXRAY":case 405:m.parent_pokemon_id=405;break;case"BUDEW":case 406:m.parent_pokemon_id=406;break;case"ROSERADE":case 407:m.parent_pokemon_id=407;break;case"CRANIDOS":case 408:m.parent_pokemon_id=408;break;case"RAMPARDOS":case 409:m.parent_pokemon_id=409;break;case"SHIELDON":case 410:m.parent_pokemon_id=410;break;case"BASTIODON":case 411:m.parent_pokemon_id=411;break;case"BURMY":case 412:m.parent_pokemon_id=412;break;case"WORMADAM":case 413:m.parent_pokemon_id=413;break;case"MOTHIM":case 414:m.parent_pokemon_id=414;break;case"COMBEE":case 415:m.parent_pokemon_id=415;break;case"VESPIQUEN":case 416:m.parent_pokemon_id=416;break;case"PACHIRISU":case 417:m.parent_pokemon_id=417;break;case"BUIZEL":case 418:m.parent_pokemon_id=418;break;case"FLOATZEL":case 419:m.parent_pokemon_id=419;break;case"CHERUBI":case 420:m.parent_pokemon_id=420;break;case"CHERRIM":case 421:m.parent_pokemon_id=421;break;case"SHELLOS":case 422:m.parent_pokemon_id=422;break;case"GASTRODON":case 423:m.parent_pokemon_id=423;break;case"AMBIPOM":case 424:m.parent_pokemon_id=424;break;case"DRIFLOON":case 425:m.parent_pokemon_id=425;break;case"DRIFBLIM":case 426:m.parent_pokemon_id=426;break;case"BUNEARY":case 427:m.parent_pokemon_id=427;break;case"LOPUNNY":case 428:m.parent_pokemon_id=428;break;case"MISMAGIUS":case 429:m.parent_pokemon_id=429;break;case"HONCHKROW":case 430:m.parent_pokemon_id=430;break;case"GLAMEOW":case 431:m.parent_pokemon_id=431;break;case"PURUGLY":case 432:m.parent_pokemon_id=432;break;case"CHINGLING":case 433:m.parent_pokemon_id=433;break;case"STUNKY":case 434:m.parent_pokemon_id=434;break;case"SKUNTANK":case 435:m.parent_pokemon_id=435;break;case"BRONZOR":case 436:m.parent_pokemon_id=436;break;case"BRONZONG":case 437:m.parent_pokemon_id=437;break;case"BONSLY":case 438:m.parent_pokemon_id=438;break;case"MIME_JR":case 439:m.parent_pokemon_id=439;break;case"HAPPINY":case 440:m.parent_pokemon_id=440;break;case"CHATOT":case 441:m.parent_pokemon_id=441;break;case"SPIRITOMB":case 442:m.parent_pokemon_id=442;break;case"GIBLE":case 443:m.parent_pokemon_id=443;break;case"GABITE":case 444:m.parent_pokemon_id=444;break;case"GARCHOMP":case 445:m.parent_pokemon_id=445;break;case"MUNCHLAX":case 446:m.parent_pokemon_id=446;break;case"RIOLU":case 447:m.parent_pokemon_id=447;break;case"LUCARIO":case 448:m.parent_pokemon_id=448;break;case"HIPPOPOTAS":case 449:m.parent_pokemon_id=449;break;case"HIPPOWDON":case 450:m.parent_pokemon_id=450;break;case"SKORUPI":case 451:m.parent_pokemon_id=451;break;case"DRAPION":case 452:m.parent_pokemon_id=452;break;case"CROAGUNK":case 453:m.parent_pokemon_id=453;break;case"TOXICROAK":case 454:m.parent_pokemon_id=454;break;case"CARNIVINE":case 455:m.parent_pokemon_id=455;break;case"FINNEON":case 456:m.parent_pokemon_id=456;break;case"LUMINEON":case 457:m.parent_pokemon_id=457;break;case"MANTYKE":case 458:m.parent_pokemon_id=458;break;case"SNOVER":case 459:m.parent_pokemon_id=459;break;case"ABOMASNOW":case 460:m.parent_pokemon_id=460;break;case"WEAVILE":case 461:m.parent_pokemon_id=461;break;case"MAGNEZONE":case 462:m.parent_pokemon_id=462;break;case"LICKILICKY":case 463:m.parent_pokemon_id=463;break;case"RHYPERIOR":case 464:m.parent_pokemon_id=464;break;case"TANGROWTH":case 465:m.parent_pokemon_id=465;break;case"ELECTIVIRE":case 466:m.parent_pokemon_id=466;break;case"MAGMORTAR":case 467:m.parent_pokemon_id=467;break;case"TOGEKISS":case 468:m.parent_pokemon_id=468;break;case"YANMEGA":case 469:m.parent_pokemon_id=469;break;case"LEAFEON":case 470:m.parent_pokemon_id=470;break;case"GLACEON":case 471:m.parent_pokemon_id=471;break;case"GLISCOR":case 472:m.parent_pokemon_id=472;break;case"MAMOSWINE":case 473:m.parent_pokemon_id=473;break;case"PORYGON_Z":case 474:m.parent_pokemon_id=474;break;case"GALLADE":case 475:m.parent_pokemon_id=475;break;case"PROBOPASS":case 476:m.parent_pokemon_id=476;break;case"DUSKNOIR":case 477:m.parent_pokemon_id=477;break;case"FROSLASS":case 478:m.parent_pokemon_id=478;break;case"ROTOM":case 479:m.parent_pokemon_id=479;break;case"UXIE":case 480:m.parent_pokemon_id=480;break;case"MESPRIT":case 481:m.parent_pokemon_id=481;break;case"AZELF":case 482:m.parent_pokemon_id=482;break;case"DIALGA":case 483:m.parent_pokemon_id=483;break;case"PALKIA":case 484:m.parent_pokemon_id=484;break;case"HEATRAN":case 485:m.parent_pokemon_id=485;break;case"REGIGIGAS":case 486:m.parent_pokemon_id=486;break;case"GIRATINA":case 487:m.parent_pokemon_id=487;break;case"CRESSELIA":case 488:m.parent_pokemon_id=488;break;case"PHIONE":case 489:m.parent_pokemon_id=489;break;case"MANAPHY":case 490:m.parent_pokemon_id=490;break;case"DARKRAI":case 491:m.parent_pokemon_id=491;break;case"SHAYMIN":case 492:m.parent_pokemon_id=492;break;case"ARCEUS":case 493:m.parent_pokemon_id=493;break;case"MELTAN":case 808:m.parent_pokemon_id=808;break;case"MELMETAL":case 809:m.parent_pokemon_id=809;break}if(d.height_std_dev!=null){m.height_std_dev=Number(d.height_std_dev)}if(d.weight_std_dev!=null){m.weight_std_dev=Number(d.weight_std_dev)}if(d.km_distance_to_hatch!=null){m.km_distance_to_hatch=Number(d.km_distance_to_hatch)}switch(d.family_id){case"FAMILY_UNSET":case 0:m.family_id=0;break;case"FAMILY_BULBASAUR":case 1:m.family_id=1;break;case"FAMILY_CHARMANDER":case 4:m.family_id=4;break;case"FAMILY_SQUIRTLE":case 7:m.family_id=7;break;case"FAMILY_CATERPIE":case 10:m.family_id=10;break;case"FAMILY_WEEDLE":case 13:m.family_id=13;break;case"FAMILY_PIDGEY":case 16:m.family_id=16;break;case"FAMILY_RATTATA":case 19:m.family_id=19;break;case"FAMILY_SPEAROW":case 21:m.family_id=21;break;case"FAMILY_EKANS":case 23:m.family_id=23;break;case"FAMILY_PIKACHU":case 25:m.family_id=25;break;case"FAMILY_SANDSHREW":case 27:m.family_id=27;break;case"FAMILY_NIDORAN_FEMALE":case 29:m.family_id=29;break;case"FAMILY_NIDORAN_MALE":case 32:m.family_id=32;break;case"FAMILY_CLEFAIRY":case 35:m.family_id=35;break;case"FAMILY_VULPIX":case 37:m.family_id=37;break;case"FAMILY_JIGGLYPUFF":case 39:m.family_id=39;break;case"FAMILY_ZUBAT":case 41:m.family_id=41;break;case"FAMILY_ODDISH":case 43:m.family_id=43;break;case"FAMILY_PARAS":case 46:m.family_id=46;break;case"FAMILY_VENONAT":case 48:m.family_id=48;break;case"FAMILY_DIGLETT":case 50:m.family_id=50;break;case"FAMILY_MEOWTH":case 52:m.family_id=52;break;case"FAMILY_PSYDUCK":case 54:m.family_id=54;break;case"FAMILY_MANKEY":case 56:m.family_id=56;break;case"FAMILY_GROWLITHE":case 58:m.family_id=58;break;case"FAMILY_POLIWAG":case 60:m.family_id=60;break;case"FAMILY_ABRA":case 63:m.family_id=63;break;case"FAMILY_MACHOP":case 66:m.family_id=66;break;case"FAMILY_BELLSPROUT":case 69:m.family_id=69;break;case"FAMILY_TENTACOOL":case 72:m.family_id=72;break;case"FAMILY_GEODUDE":case 74:m.family_id=74;break;case"FAMILY_PONYTA":case 77:m.family_id=77;break;case"FAMILY_SLOWPOKE":case 79:m.family_id=79;break;case"FAMILY_MAGNEMITE":case 81:m.family_id=81;break;case"FAMILY_FARFETCHD":case 83:m.family_id=83;break;case"FAMILY_DODUO":case 84:m.family_id=84;break;case"FAMILY_SEEL":case 86:m.family_id=86;break;case"FAMILY_GRIMER":case 88:m.family_id=88;break;case"FAMILY_SHELLDER":case 90:m.family_id=90;break;case"FAMILY_GASTLY":case 92:m.family_id=92;break;case"FAMILY_ONIX":case 95:m.family_id=95;break;case"FAMILY_DROWZEE":case 96:m.family_id=96;break;case"FAMILY_HYPNO":case 97:m.family_id=97;break;case"FAMILY_KRABBY":case 98:m.family_id=98;break;case"FAMILY_VOLTORB":case 100:m.family_id=100;break;case"FAMILY_EXEGGCUTE":case 102:m.family_id=102;break;case"FAMILY_CUBONE":case 104:m.family_id=104;break;case"FAMILY_HITMONLEE":case 106:m.family_id=106;break;case"FAMILY_HITMONCHAN":case 107:m.family_id=107;break;case"FAMILY_LICKITUNG":case 108:m.family_id=108;break;case"FAMILY_KOFFING":case 109:m.family_id=109;break;case"FAMILY_RHYHORN":case 111:m.family_id=111;break;case"FAMILY_CHANSEY":case 113:m.family_id=113;break;case"FAMILY_TANGELA":case 114:m.family_id=114;break;case"FAMILY_KANGASKHAN":case 115:m.family_id=115;break;case"FAMILY_HORSEA":case 116:m.family_id=116;break;case"FAMILY_GOLDEEN":case 118:m.family_id=118;break;case"FAMILY_STARYU":case 120:m.family_id=120;break;case"FAMILY_MR_MIME":case 122:m.family_id=122;break;case"FAMILY_SCYTHER":case 123:m.family_id=123;break;case"FAMILY_JYNX":case 124:m.family_id=124;break;case"FAMILY_ELECTABUZZ":case 125:m.family_id=125;break;case"FAMILY_MAGMAR":case 126:m.family_id=126;break;case"FAMILY_PINSIR":case 127:m.family_id=127;break;case"FAMILY_TAUROS":case 128:m.family_id=128;break;case"FAMILY_MAGIKARP":case 129:m.family_id=129;break;case"FAMILY_LAPRAS":case 131:m.family_id=131;break;case"FAMILY_DITTO":case 132:m.family_id=132;break;case"FAMILY_EEVEE":case 133:m.family_id=133;break;case"FAMILY_PORYGON":case 137:m.family_id=137;break;case"FAMILY_OMANYTE":case 138:m.family_id=138;break;case"FAMILY_KABUTO":case 140:m.family_id=140;break;case"FAMILY_AERODACTYL":case 142:m.family_id=142;break;case"FAMILY_SNORLAX":case 143:m.family_id=143;break;case"FAMILY_ARTICUNO":case 144:m.family_id=144;break;case"FAMILY_ZAPDOS":case 145:m.family_id=145;break;case"FAMILY_MOLTRES":case 146:m.family_id=146;break;case"FAMILY_DRATINI":case 147:m.family_id=147;break;case"FAMILY_MEWTWO":case 150:m.family_id=150;break;case"FAMILY_MEW":case 151:m.family_id=151;break;case"FAMILY_CHIKORITA":case 152:m.family_id=152;break;case"FAMILY_CYNDAQUIL":case 155:m.family_id=155;break;case"FAMILY_TOTODILE":case 158:m.family_id=158;break;case"FAMILY_SENTRET":case 161:m.family_id=161;break;case"FAMILY_HOOTHOOT":case 163:m.family_id=163;break;case"FAMILY_LEDYBA":case 165:m.family_id=165;break;case"FAMILY_SPINARAK":case 167:m.family_id=167;break;case"FAMILY_CHINCHOU":case 170:m.family_id=170;break;case"FAMILY_TOGEPI":case 175:m.family_id=175;break;case"FAMILY_NATU":case 177:m.family_id=177;break;case"FAMILY_MAREEP":case 179:m.family_id=179;break;case"FAMILY_MARILL":case 183:m.family_id=183;break;case"FAMILY_SUDOWOODO":case 185:m.family_id=185;break;case"FAMILY_HOPPIP":case 187:m.family_id=187;break;case"FAMILY_AIPOM":case 190:m.family_id=190;break;case"FAMILY_SUNKERN":case 191:m.family_id=191;break;case"FAMILY_YANMA":case 193:m.family_id=193;break;case"FAMILY_WOOPER":case 194:m.family_id=194;break;case"FAMILY_MURKROW":case 198:m.family_id=198;break;case"FAMILY_MISDREAVUS":case 200:m.family_id=200;break;case"FAMILY_UNOWN":case 201:m.family_id=201;break;case"FAMILY_WOBBUFFET":case 202:m.family_id=202;break;case"FAMILY_GIRAFARIG":case 203:m.family_id=203;break;case"FAMILY_PINECO":case 204:m.family_id=204;break;case"FAMILY_DUNSPARCE":case 206:m.family_id=206;break;case"FAMILY_GLIGAR":case 207:m.family_id=207;break;case"FAMILY_SNUBBULL":case 209:m.family_id=209;break;case"FAMILY_QWILFISH":case 211:m.family_id=211;break;case"FAMILY_SHUCKLE":case 213:m.family_id=213;break;case"FAMILY_HERACROSS":case 214:m.family_id=214;break;case"FAMILY_SNEASEL":case 215:m.family_id=215;break;case"FAMILY_TEDDIURSA":case 216:m.family_id=216;break;case"FAMILY_SLUGMA":case 218:m.family_id=218;break;case"FAMILY_SWINUB":case 220:m.family_id=220;break;case"FAMILY_CORSOLA":case 222:m.family_id=222;break;case"FAMILY_REMORAID":case 223:m.family_id=223;break;case"FAMILY_DELIBIRD":case 225:m.family_id=225;break;case"FAMILY_MANTINE":case 226:m.family_id=226;break;case"FAMILY_SKARMORY":case 227:m.family_id=227;break;case"FAMILY_HOUNDOUR":case 228:m.family_id=228;break;case"FAMILY_PHANPY":case 231:m.family_id=231;break;case"FAMILY_STANTLER":case 234:m.family_id=234;break;case"FAMILY_SMEARGLE":case 235:m.family_id=235;break;case"FAMILY_TYROGUE":case 236:m.family_id=236;break;case"FAMILY_MILTANK":case 241:m.family_id=241;break;case"FAMILY_RAIKOU":case 243:m.family_id=243;break;case"FAMILY_ENTEI":case 244:m.family_id=244;break;case"FAMILY_SUICUNE":case 245:m.family_id=245;break;case"FAMILY_LARVITAR":case 246:m.family_id=246;break;case"FAMILY_LUGIA":case 249:m.family_id=249;break;case"FAMILY_HO_OH":case 250:m.family_id=250;break;case"FAMILY_CELEBI":case 251:m.family_id=251;break;case"FAMILY_TREECKO":case 252:m.family_id=252;break;case"FAMILY_TORCHIC":case 255:m.family_id=255;break;case"FAMILY_MUDKIP":case 258:m.family_id=258;break;case"FAMILY_POOCHYENA":case 261:m.family_id=261;break;case"FAMILY_ZIGZAGOON":case 263:m.family_id=263;break;case"FAMILY_WURMPLE":case 265:m.family_id=265;break;case"FAMILY_LOTAD":case 270:m.family_id=270;break;case"FAMILY_SEEDOT":case 273:m.family_id=273;break;case"FAMILY_TAILLOW":case 276:m.family_id=276;break;case"FAMILY_WINGULL":case 278:m.family_id=278;break;case"FAMILY_RALTS":case 280:m.family_id=280;break;case"FAMILY_SURSKIT":case 283:m.family_id=283;break;case"FAMILY_SHROOMISH":case 285:m.family_id=285;break;case"FAMILY_SLAKOTH":case 287:m.family_id=287;break;case"FAMILY_NINCADA":case 290:m.family_id=290;break;case"FAMILY_WHISMUR":case 293:m.family_id=293;break;case"FAMILY_MAKUHITA":case 296:m.family_id=296;break;case"FAMILY_NOSEPASS":case 299:m.family_id=299;break;case"FAMILY_SKITTY":case 300:m.family_id=300;break;case"FAMILY_SABLEYE":case 302:m.family_id=302;break;case"FAMILY_MAWILE":case 303:m.family_id=303;break;case"FAMILY_ARON":case 304:m.family_id=304;break;case"FAMILY_MEDITITE":case 307:m.family_id=307;break;case"FAMILY_ELECTRIKE":case 309:m.family_id=309;break;case"FAMILY_PLUSLE":case 311:m.family_id=311;break;case"FAMILY_MINUN":case 312:m.family_id=312;break;case"FAMILY_VOLBEAT":case 313:m.family_id=313;break;case"FAMILY_ILLUMISE":case 314:m.family_id=314;break;case"FAMILY_ROSELIA":case 315:m.family_id=315;break;case"FAMILY_GULPIN":case 316:m.family_id=316;break;case"FAMILY_CARVANHA":case 318:m.family_id=318;break;case"FAMILY_WAILMER":case 320:m.family_id=320;break;case"FAMILY_NUMEL":case 322:m.family_id=322;break;case"FAMILY_TORKOAL":case 324:m.family_id=324;break;case"FAMILY_SPOINK":case 325:m.family_id=325;break;case"FAMILY_SPINDA":case 327:m.family_id=327;break;case"FAMILY_TRAPINCH":case 328:m.family_id=328;break;case"FAMILY_CACNEA":case 331:m.family_id=331;break;case"FAMILY_SWABLU":case 333:m.family_id=333;break;case"FAMILY_ZANGOOSE":case 335:m.family_id=335;break;case"FAMILY_SEVIPER":case 336:m.family_id=336;break;case"FAMILY_LUNATONE":case 337:m.family_id=337;break;case"FAMILY_SOLROCK":case 338:m.family_id=338;break;case"FAMILY_BARBOACH":case 339:m.family_id=339;break;case"FAMILY_CORPHISH":case 341:m.family_id=341;break;case"FAMILY_BALTOY":case 343:m.family_id=343;break;case"FAMILY_LILEEP":case 345:m.family_id=345;break;case"FAMILY_ANORITH":case 347:m.family_id=347;break;case"FAMILY_FEEBAS":case 349:m.family_id=349;break;case"FAMILY_CASTFORM":case 351:m.family_id=351;break;case"FAMILY_KECLEON":case 352:m.family_id=352;break;case"FAMILY_SHUPPET":case 353:m.family_id=353;break;case"FAMILY_DUSKULL":case 355:m.family_id=355;break;case"FAMILY_TROPIUS":case 357:m.family_id=357;break;case"FAMILY_CHIMECHO":case 358:m.family_id=358;break;case"FAMILY_ABSOL":case 359:m.family_id=359;break;case"FAMILY_SNORUNT":case 361:m.family_id=361;break;case"FAMILY_SPHEAL":case 363:m.family_id=363;break;case"FAMILY_CLAMPERL":case 366:m.family_id=366;break;case"FAMILY_RELICANTH":case 369:m.family_id=369;break;case"FAMILY_LUVDISC":case 370:m.family_id=370;break;case"FAMILY_BAGON":case 371:m.family_id=371;break;case"FAMILY_BELDUM":case 374:m.family_id=374;break;case"FAMILY_REGIROCK":case 377:m.family_id=377;break;case"FAMILY_REGICE":case 378:m.family_id=378;break;case"FAMILY_REGISTEEL":case 379:m.family_id=379;break;case"FAMILY_LATIAS":case 380:m.family_id=380;break;case"FAMILY_LATIOS":case 381:m.family_id=381;break;case"FAMILY_KYOGRE":case 382:m.family_id=382;break;case"FAMILY_GROUDON":case 383:m.family_id=383;break;case"FAMILY_RAYQUAZA":case 384:m.family_id=384;break;case"FAMILY_JIRACHI":case 385:m.family_id=385;break;case"FAMILY_DEOXYS":case 386:m.family_id=386;break;case"FAMILY_TURTWIG":case 387:m.family_id=387;break;case"FAMILY_CHIMCHAR":case 390:m.family_id=390;break;case"FAMILY_PIPLUP":case 393:m.family_id=393;break;case"FAMILY_STARLY":case 396:m.family_id=396;break;case"FAMILY_BIDOOF":case 399:m.family_id=399;break;case"FAMILY_KRICKETOT":case 401:m.family_id=401;break;case"FAMILY_SHINX":case 403:m.family_id=403;break;case"FAMILY_CRANIDOS":case 408:m.family_id=408;break;case"FAMILY_SHIELDON":case 410:m.family_id=410;break;case"FAMILY_BURMY":case 412:m.family_id=412;break;case"FAMILY_COMBEE":case 415:m.family_id=415;break;case"FAMILY_PACHIRISU":case 417:m.family_id=417;break;case"FAMILY_BUIZEL":case 418:m.family_id=418;break;case"FAMILY_CHERUBI":case 420:m.family_id=420;break;case"FAMILY_SHELLOS":case 422:m.family_id=422;break;case"FAMILY_DRIFLOON":case 425:m.family_id=425;break;case"FAMILY_BUNEARY":case 427:m.family_id=427;break;case"FAMILY_GLAMEOW":case 431:m.family_id=431;break;case"FAMILY_STUNKY":case 434:m.family_id=434;break;case"FAMILY_BRONZOR":case 436:m.family_id=436;break;case"FAMILY_CHATOT":case 441:m.family_id=441;break;case"FAMILY_SPIRITOMB":case 442:m.family_id=442;break;case"FAMILY_GIBLE":case 443:m.family_id=443;break;case"FAMILY_LUCARIO":case 448:m.family_id=448;break;case"FAMILY_HIPPOPOTAS":case 449:m.family_id=449;break;case"FAMILY_SKORUPI":case 451:m.family_id=451;break;case"FAMILY_CROAGUNK":case 453:m.family_id=453;break;case"FAMILY_CARNIVINE":case 455:m.family_id=455;break;case"FAMILY_FINNEON":case 456:m.family_id=456;break;case"FAMILY_SNOVER":case 459:m.family_id=459;break;case"FAMILY_ROTOM":case 479:m.family_id=479;break;case"FAMILY_UXIE":case 480:m.family_id=480;break;case"FAMILY_MESPRIT":case 481:m.family_id=481;break;case"FAMILY_AZELF":case 482:m.family_id=482;break;case"FAMILY_DIALGA":case 483:m.family_id=483;break;case"FAMILY_PALKIA":case 484:m.family_id=484;break;case"FAMILY_HEATRAN":case 485:m.family_id=485;break;case"FAMILY_REGIGIGAS":case 486:m.family_id=486;break;case"FAMILY_GIRATINA":case 487:m.family_id=487;break;case"FAMILY_CRESSELIA":case 488:m.family_id=488;break;case"FAMILY_PHIONE":case 489:m.family_id=489;break;case"FAMILY_MANAPHY":case 490:m.family_id=490;break;case"FAMILY_DARKRAI":case 491:m.family_id=491;break;case"FAMILY_SHAYMIN":case 492:m.family_id=492;break;case"FAMILY_ARCEUS":case 493:m.family_id=493;break;case"FAMILY_MELTAN":case 808:m.family_id=808;break}if(d.candy_to_evolve!=null){m.candy_to_evolve=d.candy_to_evolve|0}if(d.km_buddy_distance!=null){m.km_buddy_distance=Number(d.km_buddy_distance)}switch(d.buddy_size){case"BUDDY_MEDIUM":case 0:m.buddy_size=0;break;case"BUDDY_SHOULDER":case 1:m.buddy_size=1;break;case"BUDDY_BIG":case 2:m.buddy_size=2;break;case"BUDDY_FLYING":case 3:m.buddy_size=3;break;case"BUDDY_BABY":case 4:m.buddy_size=4;break}if(d.model_height!=null){m.model_height=Number(d.model_height)}if(d.evolution_branch){if(!Array.isArray(d.evolution_branch))throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.evolution_branch: array expected");m.evolution_branch=[];for(var i=0;i<d.evolution_branch.length;++i){if(typeof d.evolution_branch[i]!=="object")throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.evolution_branch: object expected");m.evolution_branch[i]=$root.POGOProtos.Settings.Master.Pokemon.EvolutionBranch.fromObject(d.evolution_branch[i])}}if(d.model_scale_v2!=null){m.model_scale_v2=Number(d.model_scale_v2)}switch(d.form){case"FORM_UNSET":case 0:m.form=0;break;case"UNOWN_A":case 1:m.form=1;break;case"UNOWN_B":case 2:m.form=2;break;case"UNOWN_C":case 3:m.form=3;break;case"UNOWN_D":case 4:m.form=4;break;case"UNOWN_E":case 5:m.form=5;break;case"UNOWN_F":case 6:m.form=6;break;case"UNOWN_G":case 7:m.form=7;break;case"UNOWN_H":case 8:m.form=8;break;case"UNOWN_I":case 9:m.form=9;break;case"UNOWN_J":case 10:m.form=10;break;case"UNOWN_K":case 11:m.form=11;break;case"UNOWN_L":case 12:m.form=12;break;case"UNOWN_M":case 13:m.form=13;break;case"UNOWN_N":case 14:m.form=14;break;case"UNOWN_O":case 15:m.form=15;break;case"UNOWN_P":case 16:m.form=16;break;case"UNOWN_Q":case 17:m.form=17;break;case"UNOWN_R":case 18:m.form=18;break;case"UNOWN_S":case 19:m.form=19;break;case"UNOWN_T":case 20:m.form=20;break;case"UNOWN_U":case 21:m.form=21;break;case"UNOWN_V":case 22:m.form=22;break;case"UNOWN_W":case 23:m.form=23;break;case"UNOWN_X":case 24:m.form=24;break;case"UNOWN_Y":case 25:m.form=25;break;case"UNOWN_Z":case 26:m.form=26;break;case"UNOWN_EXCLAMATION_POINT":case 27:m.form=27;break;case"UNOWN_QUESTION_MARK":case 28:m.form=28;break;case"CASTFORM_NORMAL":case 29:m.form=29;break;case"CASTFORM_SUNNY":case 30:m.form=30;break;case"CASTFORM_RAINY":case 31:m.form=31;break;case"CASTFORM_SNOWY":case 32:m.form=32;break;case"DEOXYS_NORMAL":case 33:m.form=33;break;case"DEOXYS_ATTACK":case 34:m.form=34;break;case"DEOXYS_DEFENSE":case 35:m.form=35;break;case"DEOXYS_SPEED":case 36:m.form=36;break;case"SPINDA_00":case 37:m.form=37;break;case"SPINDA_01":case 38:m.form=38;break;case"SPINDA_02":case 39:m.form=39;break;case"SPINDA_03":case 40:m.form=40;break;case"SPINDA_04":case 41:m.form=41;break;case"SPINDA_05":case 42:m.form=42;break;case"SPINDA_06":case 43:m.form=43;break;case"SPINDA_07":case 44:m.form=44;break;case"RATTATA_NORMAL":case 45:m.form=45;break;case"RATTATA_ALOLA":case 46:m.form=46;break;case"RATICATE_NORMAL":case 47:m.form=47;break;case"RATICATE_ALOLA":case 48:m.form=48;break;case"RAICHU_NORMAL":case 49:m.form=49;break;case"RAICHU_ALOLA":case 50:m.form=50;break;case"SANDSHREW_NORMAL":case 51:m.form=51;break;case"SANDSHREW_ALOLA":case 52:m.form=52;break;case"SANDSLASH_NORMAL":case 53:m.form=53;break;case"SANDSLASH_ALOLA":case 54:m.form=54;break;case"VULPIX_NORMAL":case 55:m.form=55;break;case"VULPIX_ALOLA":case 56:m.form=56;break;case"NINETALES_NORMAL":case 57:m.form=57;break;case"NINETALES_ALOLA":case 58:m.form=58;break;case"DIGLETT_NORMAL":case 59:m.form=59;break;case"DIGLETT_ALOLA":case 60:m.form=60;break;case"DUGTRIO_NORMAL":case 61:m.form=61;break;case"DUGTRIO_ALOLA":case 62:m.form=62;break;case"MEOWTH_NORMAL":case 63:m.form=63;break;case"MEOWTH_ALOLA":case 64:m.form=64;break;case"PERSIAN_NORMAL":case 65:m.form=65;break;case"PERSIAN_ALOLA":case 66:m.form=66;break;case"GEODUDE_NORMAL":case 67:m.form=67;break;case"GEODUDE_ALOLA":case 68:m.form=68;break;case"GRAVELER_NORMAL":case 69:m.form=69;break;case"GRAVELER_ALOLA":case 70:m.form=70;break;case"GOLEM_NORMAL":case 71:m.form=71;break;case"GOLEM_ALOLA":case 72:m.form=72;break;case"GRIMER_NORMAL":case 73:m.form=73;break;case"GRIMER_ALOLA":case 74:m.form=74;break;case"MUK_NORMAL":case 75:m.form=75;break;case"MUK_ALOLA":case 76:m.form=76;break;case"EXEGGUTOR_NORMAL":case 77:m.form=77;break;case"EXEGGUTOR_ALOLA":case 78:m.form=78;break;case"MAROWAK_NORMAL":case 79:m.form=79;break;case"MAROWAK_ALOLA":case 80:m.form=80;break;case"ROTOM_NORMAL":case 81:m.form=81;break;case"ROTOM_FROST":case 82:m.form=82;break;case"ROTOM_FAN":case 83:m.form=83;break;case"ROTOM_MOW":case 84:m.form=84;break;case"ROTOM_WASH":case 85:m.form=85;break;case"ROTOM_HEAT":case 86:m.form=86;break;case"WORMADAM_PLANT":case 87:m.form=87;break;case"WORMADAM_SANDY":case 88:m.form=88;break;case"WORMADAM_TRASH":case 89:m.form=89;break;case"GIRATINA_ALTERED":case 90:m.form=90;break;case"GIRATINA_ORIGIN":case 91:m.form=91;break;case"SHAYMIN_SKY":case 92:m.form=92;break;case"SHAYMIN_LAND":case 93:m.form=93;break;case"CHERRIM_OVERCAST":case 94:m.form=94;break;case"CHERRIM_SUNNY":case 95:m.form=95;break;case"SHELLOS_WEST_SEA":case 96:m.form=96;break;case"SHELLOS_EAST_SEA":case 97:m.form=97;break;case"GASTRODON_WEST_SEA":case 98:m.form=98;break;case"GASTRODON_EAST_SEA":case 99:m.form=99;break;case"ARCEUS_NORMAL":case 100:m.form=100;break;case"ARCEUS_FIGHTING":case 101:m.form=101;break;case"ARCEUS_FLYING":case 102:m.form=102;break;case"ARCEUS_POISON":case 103:m.form=103;break;case"ARCEUS_GROUND":case 104:m.form=104;break;case"ARCEUS_ROCK":case 105:m.form=105;break;case"ARCEUS_BUG":case 106:m.form=106;break;case"ARCEUS_GHOST":case 107:m.form=107;break;case"ARCEUS_STEEL":case 108:m.form=108;break;case"ARCEUS_FIRE":case 109:m.form=109;break;case"ARCEUS_WATER":case 110:m.form=110;break;case"ARCEUS_GRASS":case 111:m.form=111;break;case"ARCEUS_ELECTRIC":case 112:m.form=112;break;case"ARCEUS_PSYCHIC":case 113:m.form=113;break;case"ARCEUS_ICE":case 114:m.form=114;break;case"ARCEUS_DRAGON":case 115:m.form=115;break;case"ARCEUS_DARK":case 116:m.form=116;break;case"ARCEUS_FAIRY":case 117:m.form=117;break;case"BURMY_PLANT":case 118:m.form=118;break;case"BURMY_SANDY":case 119:m.form=119;break;case"BURMY_TRASH":case 120:m.form=120;break}switch(d.event_quick_move){case"MOVE_UNSET":case 0:m.event_quick_move=0;break;case"THUNDER_SHOCK":case 1:m.event_quick_move=1;break;case"QUICK_ATTACK":case 2:m.event_quick_move=2;break;case"SCRATCH":case 3:m.event_quick_move=3;break;case"EMBER":case 4:m.event_quick_move=4;break;case"VINE_WHIP":case 5:m.event_quick_move=5;break;case"TACKLE":case 6:m.event_quick_move=6;break;case"RAZOR_LEAF":case 7:m.event_quick_move=7;break;case"TAKE_DOWN":case 8:m.event_quick_move=8;break;case"WATER_GUN":case 9:m.event_quick_move=9;break;case"BITE":case 10:m.event_quick_move=10;break;case"POUND":case 11:m.event_quick_move=11;break;case"DOUBLE_SLAP":case 12:m.event_quick_move=12;break;case"WRAP":case 13:m.event_quick_move=13;break;case"HYPER_BEAM":case 14:m.event_quick_move=14;break;case"LICK":case 15:m.event_quick_move=15;break;case"DARK_PULSE":case 16:m.event_quick_move=16;break;case"SMOG":case 17:m.event_quick_move=17;break;case"SLUDGE":case 18:m.event_quick_move=18;break;case"METAL_CLAW":case 19:m.event_quick_move=19;break;case"VICE_GRIP":case 20:m.event_quick_move=20;break;case"FLAME_WHEEL":case 21:m.event_quick_move=21;break;case"MEGAHORN":case 22:m.event_quick_move=22;break;case"WING_ATTACK":case 23:m.event_quick_move=23;break;case"FLAMETHROWER":case 24:m.event_quick_move=24;break;case"SUCKER_PUNCH":case 25:m.event_quick_move=25;break;case"DIG":case 26:m.event_quick_move=26;break;case"LOW_KICK":case 27:m.event_quick_move=27;break;case"CROSS_CHOP":case 28:m.event_quick_move=28;break;case"PSYCHO_CUT":case 29:m.event_quick_move=29;break;case"PSYBEAM":case 30:m.event_quick_move=30;break;case"EARTHQUAKE":case 31:m.event_quick_move=31;break;case"STONE_EDGE":case 32:m.event_quick_move=32;break;case"ICE_PUNCH":case 33:m.event_quick_move=33;break;case"HEART_STAMP":case 34:m.event_quick_move=34;break;case"DISCHARGE":case 35:m.event_quick_move=35;break;case"FLASH_CANNON":case 36:m.event_quick_move=36;break;case"PECK":case 37:m.event_quick_move=37;break;case"DRILL_PECK":case 38:m.event_quick_move=38;break;case"ICE_BEAM":case 39:m.event_quick_move=39;break;case"BLIZZARD":case 40:m.event_quick_move=40;break;case"AIR_SLASH":case 41:m.event_quick_move=41;break;case"HEAT_WAVE":case 42:m.event_quick_move=42;break;case"TWINEEDLE":case 43:m.event_quick_move=43;break;case"POISON_JAB":case 44:m.event_quick_move=44;break;case"AERIAL_ACE":case 45:m.event_quick_move=45;break;case"DRILL_RUN":case 46:m.event_quick_move=46;break;case"PETAL_BLIZZARD":case 47:m.event_quick_move=47;break;case"MEGA_DRAIN":case 48:m.event_quick_move=48;break;case"BUG_BUZZ":case 49:m.event_quick_move=49;break;case"POISON_FANG":case 50:m.event_quick_move=50;break;case"NIGHT_SLASH":case 51:m.event_quick_move=51;break;case"SLASH":case 52:m.event_quick_move=52;break;case"BUBBLE_BEAM":case 53:m.event_quick_move=53;break;case"SUBMISSION":case 54:m.event_quick_move=54;break;case"KARATE_CHOP":case 55:m.event_quick_move=55;break;case"LOW_SWEEP":case 56:m.event_quick_move=56;break;case"AQUA_JET":case 57:m.event_quick_move=57;break;case"AQUA_TAIL":case 58:m.event_quick_move=58;break;case"SEED_BOMB":case 59:m.event_quick_move=59;break;case"PSYSHOCK":case 60:m.event_quick_move=60;break;case"ROCK_THROW":case 61:m.event_quick_move=61;break;case"ANCIENT_POWER":case 62:m.event_quick_move=62;break;case"ROCK_TOMB":case 63:m.event_quick_move=63;break;case"ROCK_SLIDE":case 64:m.event_quick_move=64;break;case"POWER_GEM":case 65:m.event_quick_move=65;break;case"SHADOW_SNEAK":case 66:m.event_quick_move=66;break;case"SHADOW_PUNCH":case 67:m.event_quick_move=67;break;case"SHADOW_CLAW":case 68:m.event_quick_move=68;break;case"OMINOUS_WIND":case 69:m.event_quick_move=69;break;case"SHADOW_BALL":case 70:m.event_quick_move=70;break;case"BULLET_PUNCH":case 71:m.event_quick_move=71;break;case"MAGNET_BOMB":case 72:m.event_quick_move=72;break;case"STEEL_WING":case 73:m.event_quick_move=73;break;case"IRON_HEAD":case 74:m.event_quick_move=74;break;case"PARABOLIC_CHARGE":case 75:m.event_quick_move=75;break;case"SPARK":case 76:m.event_quick_move=76;break;case"THUNDER_PUNCH":case 77:m.event_quick_move=77;break;case"THUNDER":case 78:m.event_quick_move=78;break;case"THUNDERBOLT":case 79:m.event_quick_move=79;break;case"TWISTER":case 80:m.event_quick_move=80;break;case"DRAGON_BREATH":case 81:m.event_quick_move=81;break;case"DRAGON_PULSE":case 82:m.event_quick_move=82;break;case"DRAGON_CLAW":case 83:m.event_quick_move=83;break;case"DISARMING_VOICE":case 84:m.event_quick_move=84;break;case"DRAINING_KISS":case 85:m.event_quick_move=85;break;case"DAZZLING_GLEAM":case 86:m.event_quick_move=86;break;case"MOONBLAST":case 87:m.event_quick_move=87;break;case"PLAY_ROUGH":case 88:m.event_quick_move=88;break;case"CROSS_POISON":case 89:m.event_quick_move=89;break;case"SLUDGE_BOMB":case 90:m.event_quick_move=90;break;case"SLUDGE_WAVE":case 91:m.event_quick_move=91;break;case"GUNK_SHOT":case 92:m.event_quick_move=92;break;case"MUD_SHOT":case 93:m.event_quick_move=93;break;case"BONE_CLUB":case 94:m.event_quick_move=94;break;case"BULLDOZE":case 95:m.event_quick_move=95;break;case"MUD_BOMB":case 96:m.event_quick_move=96;break;case"FURY_CUTTER":case 97:m.event_quick_move=97;break;case"BUG_BITE":case 98:m.event_quick_move=98;break;case"SIGNAL_BEAM":case 99:m.event_quick_move=99;break;case"X_SCISSOR":case 100:m.event_quick_move=100;break;case"FLAME_CHARGE":case 101:m.event_quick_move=101;break;case"FLAME_BURST":case 102:m.event_quick_move=102;break;case"FIRE_BLAST":case 103:m.event_quick_move=103;break;case"BRINE":case 104:m.event_quick_move=104;break;case"WATER_PULSE":case 105:m.event_quick_move=105;break;case"SCALD":case 106:m.event_quick_move=106;break;case"HYDRO_PUMP":case 107:m.event_quick_move=107;break;case"PSYCHIC":case 108:m.event_quick_move=108;break;case"PSYSTRIKE":case 109:m.event_quick_move=109;break;case"ICE_SHARD":case 110:m.event_quick_move=110;break;case"ICY_WIND":case 111:m.event_quick_move=111;break;case"FROST_BREATH":case 112:m.event_quick_move=112;break;case"ABSORB":case 113:m.event_quick_move=113;break;case"GIGA_DRAIN":case 114:m.event_quick_move=114;break;case"FIRE_PUNCH":case 115:m.event_quick_move=115;break;case"SOLAR_BEAM":case 116:m.event_quick_move=116;break;case"LEAF_BLADE":case 117:m.event_quick_move=117;break;case"POWER_WHIP":case 118:m.event_quick_move=118;break;case"SPLASH":case 119:m.event_quick_move=119;break;case"ACID":case 120:m.event_quick_move=120;break;case"AIR_CUTTER":case 121:m.event_quick_move=121;break;case"HURRICANE":case 122:m.event_quick_move=122;break;case"BRICK_BREAK":case 123:m.event_quick_move=123;break;case"CUT":case 124:m.event_quick_move=124;break;case"SWIFT":case 125:m.event_quick_move=125;break;case"HORN_ATTACK":case 126:m.event_quick_move=126;break;case"STOMP":case 127:m.event_quick_move=127;break;case"HEADBUTT":case 128:m.event_quick_move=128;break;case"HYPER_FANG":case 129:m.event_quick_move=129;break;case"SLAM":case 130:m.event_quick_move=130;break;case"BODY_SLAM":case 131:m.event_quick_move=131;break;case"REST":case 132:m.event_quick_move=132;break;case"STRUGGLE":case 133:m.event_quick_move=133;break;case"SCALD_BLASTOISE":case 134:m.event_quick_move=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.event_quick_move=135;break;case"WRAP_GREEN":case 136:m.event_quick_move=136;break;case"WRAP_PINK":case 137:m.event_quick_move=137;break;case"FURY_CUTTER_FAST":case 200:m.event_quick_move=200;break;case"BUG_BITE_FAST":case 201:m.event_quick_move=201;break;case"BITE_FAST":case 202:m.event_quick_move=202;break;case"SUCKER_PUNCH_FAST":case 203:m.event_quick_move=203;break;case"DRAGON_BREATH_FAST":case 204:m.event_quick_move=204;break;case"THUNDER_SHOCK_FAST":case 205:m.event_quick_move=205;break;case"SPARK_FAST":case 206:m.event_quick_move=206;break;case"LOW_KICK_FAST":case 207:m.event_quick_move=207;break;case"KARATE_CHOP_FAST":case 208:m.event_quick_move=208;break;case"EMBER_FAST":case 209:m.event_quick_move=209;break;case"WING_ATTACK_FAST":case 210:m.event_quick_move=210;break;case"PECK_FAST":case 211:m.event_quick_move=211;break;case"LICK_FAST":case 212:m.event_quick_move=212;break;case"SHADOW_CLAW_FAST":case 213:m.event_quick_move=213;break;case"VINE_WHIP_FAST":case 214:m.event_quick_move=214;break;case"RAZOR_LEAF_FAST":case 215:m.event_quick_move=215;break;case"MUD_SHOT_FAST":case 216:m.event_quick_move=216;break;case"ICE_SHARD_FAST":case 217:m.event_quick_move=217;break;case"FROST_BREATH_FAST":case 218:m.event_quick_move=218;break;case"QUICK_ATTACK_FAST":case 219:m.event_quick_move=219;break;case"SCRATCH_FAST":case 220:m.event_quick_move=220;break;case"TACKLE_FAST":case 221:m.event_quick_move=221;break;case"POUND_FAST":case 222:m.event_quick_move=222;break;case"CUT_FAST":case 223:m.event_quick_move=223;break;case"POISON_JAB_FAST":case 224:m.event_quick_move=224;break;case"ACID_FAST":case 225:m.event_quick_move=225;break;case"PSYCHO_CUT_FAST":case 226:m.event_quick_move=226;break;case"ROCK_THROW_FAST":case 227:m.event_quick_move=227;break;case"METAL_CLAW_FAST":case 228:m.event_quick_move=228;break;case"BULLET_PUNCH_FAST":case 229:m.event_quick_move=229;break;case"WATER_GUN_FAST":case 230:m.event_quick_move=230;break;case"SPLASH_FAST":case 231:m.event_quick_move=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.event_quick_move=232;break;case"MUD_SLAP_FAST":case 233:m.event_quick_move=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.event_quick_move=234;break;case"CONFUSION_FAST":case 235:m.event_quick_move=235;break;case"POISON_STING_FAST":case 236:m.event_quick_move=236;break;case"BUBBLE_FAST":case 237:m.event_quick_move=237;break;case"FEINT_ATTACK_FAST":case 238:m.event_quick_move=238;break;case"STEEL_WING_FAST":case 239:m.event_quick_move=239;break;case"FIRE_FANG_FAST":case 240:m.event_quick_move=240;break;case"ROCK_SMASH_FAST":case 241:m.event_quick_move=241;break;case"TRANSFORM_FAST":case 242:m.event_quick_move=242;break;case"COUNTER_FAST":case 243:m.event_quick_move=243;break;case"POWDER_SNOW_FAST":case 244:m.event_quick_move=244;break;case"CLOSE_COMBAT":case 245:m.event_quick_move=245;break;case"DYNAMIC_PUNCH":case 246:m.event_quick_move=246;break;case"FOCUS_BLAST":case 247:m.event_quick_move=247;break;case"AURORA_BEAM":case 248:m.event_quick_move=248;break;case"CHARGE_BEAM_FAST":case 249:m.event_quick_move=249;break;case"VOLT_SWITCH_FAST":case 250:m.event_quick_move=250;break;case"WILD_CHARGE":case 251:m.event_quick_move=251;break;case"ZAP_CANNON":case 252:m.event_quick_move=252;break;case"DRAGON_TAIL_FAST":case 253:m.event_quick_move=253;break;case"AVALANCHE":case 254:m.event_quick_move=254;break;case"AIR_SLASH_FAST":case 255:m.event_quick_move=255;break;case"BRAVE_BIRD":case 256:m.event_quick_move=256;break;case"SKY_ATTACK":case 257:m.event_quick_move=257;break;case"SAND_TOMB":case 258:m.event_quick_move=258;break;case"ROCK_BLAST":case 259:m.event_quick_move=259;break;case"INFESTATION_FAST":case 260:m.event_quick_move=260;break;case"STRUGGLE_BUG_FAST":case 261:m.event_quick_move=261;break;case"SILVER_WIND":case 262:m.event_quick_move=262;break;case"ASTONISH_FAST":case 263:m.event_quick_move=263;break;case"HEX_FAST":case 264:m.event_quick_move=264;break;case"NIGHT_SHADE":case 265:m.event_quick_move=265;break;case"IRON_TAIL_FAST":case 266:m.event_quick_move=266;break;case"GYRO_BALL":case 267:m.event_quick_move=267;break;case"HEAVY_SLAM":case 268:m.event_quick_move=268;break;case"FIRE_SPIN_FAST":case 269:m.event_quick_move=269;break;case"OVERHEAT":case 270:m.event_quick_move=270;break;case"BULLET_SEED_FAST":case 271:m.event_quick_move=271;break;case"GRASS_KNOT":case 272:m.event_quick_move=272;break;case"ENERGY_BALL":case 273:m.event_quick_move=273;break;case"EXTRASENSORY_FAST":case 274:m.event_quick_move=274;break;case"FUTURESIGHT":case 275:m.event_quick_move=275;break;case"MIRROR_COAT":case 276:m.event_quick_move=276;break;case"OUTRAGE":case 277:m.event_quick_move=277;break;case"SNARL_FAST":case 278:m.event_quick_move=278;break;case"CRUNCH":case 279:m.event_quick_move=279;break;case"FOUL_PLAY":case 280:m.event_quick_move=280;break;case"HIDDEN_POWER_FAST":case 281:m.event_quick_move=281;break;case"TAKE_DOWN_FAST":case 282:m.event_quick_move=282;break;case"WATERFALL_FAST":case 283:m.event_quick_move=283;break;case"SURF":case 284:m.event_quick_move=284;break;case"DRACO_METEOR":case 285:m.event_quick_move=285;break;case"DOOM_DESIRE":case 286:m.event_quick_move=286;break;case"YAWN_FAST":case 287:m.event_quick_move=287;break;case"PSYCHO_BOOST":case 288:m.event_quick_move=288;break;case"ORIGIN_PULSE":case 289:m.event_quick_move=289;break;case"PRECIPICE_BLADES":case 290:m.event_quick_move=290;break;case"PRESENT_FAST":case 291:m.event_quick_move=291;break;case"WEATHER_BALL_FIRE":case 292:m.event_quick_move=292;break;case"WEATHER_BALL_ICE":case 293:m.event_quick_move=293;break;case"WEATHER_BALL_ROCK":case 294:m.event_quick_move=294;break;case"WEATHER_BALL_WATER":case 295:m.event_quick_move=295;break;case"FRENZY_PLANT":case 296:m.event_quick_move=296;break;case"SMACK_DOWN_FAST":case 297:m.event_quick_move=297;break;case"BLAST_BURN":case 298:m.event_quick_move=298;break;case"HYDRO_CANNON":case 299:m.event_quick_move=299;break;case"LAST_RESORT":case 300:m.event_quick_move=300;break;case"METEOR_MASH":case 301:m.event_quick_move=301;break;case"SKULL_BASH":case 302:m.event_quick_move=302;break;case"ACID_SPRAY":case 303:m.event_quick_move=303;break;case"EARTH_POWER":case 304:m.event_quick_move=304;break;case"CRABHAMMER":case 305:m.event_quick_move=305;break;case"LUNGE":case 306:m.event_quick_move=306;break;case"CRUSH_CLAW":case 307:m.event_quick_move=307;break;case"OCTAZOOKA":case 308:m.event_quick_move=308;break;case"MIRROR_SHOT":case 309:m.event_quick_move=309;break;case"SUPER_POWER":case 310:m.event_quick_move=310;break;case"FELL_STINGER":case 311:m.event_quick_move=311;break;case"LEAF_TORNADO":case 312:m.event_quick_move=312;break;case"LEECH_LIFE":case 313:m.event_quick_move=313;break;case"DRAIN_PUNCH":case 314:m.event_quick_move=314;break;case"SHADOW_BONE":case 315:m.event_quick_move=315;break;case"MUDDY_WATER":case 316:m.event_quick_move=316;break;case"BLAZE_KICK":case 317:m.event_quick_move=317;break;case"RAZOR_SHELL":case 318:m.event_quick_move=318;break;case"POWER_UP_PUNCH":case 319:m.event_quick_move=319;break}switch(d.event_cinematic_move){case"MOVE_UNSET":case 0:m.event_cinematic_move=0;break;case"THUNDER_SHOCK":case 1:m.event_cinematic_move=1;break;case"QUICK_ATTACK":case 2:m.event_cinematic_move=2;break;case"SCRATCH":case 3:m.event_cinematic_move=3;break;case"EMBER":case 4:m.event_cinematic_move=4;break;case"VINE_WHIP":case 5:m.event_cinematic_move=5;break;case"TACKLE":case 6:m.event_cinematic_move=6;break;case"RAZOR_LEAF":case 7:m.event_cinematic_move=7;break;case"TAKE_DOWN":case 8:m.event_cinematic_move=8;break;case"WATER_GUN":case 9:m.event_cinematic_move=9;break;case"BITE":case 10:m.event_cinematic_move=10;break;case"POUND":case 11:m.event_cinematic_move=11;break;case"DOUBLE_SLAP":case 12:m.event_cinematic_move=12;break;case"WRAP":case 13:m.event_cinematic_move=13;break;case"HYPER_BEAM":case 14:m.event_cinematic_move=14;break;case"LICK":case 15:m.event_cinematic_move=15;break;case"DARK_PULSE":case 16:m.event_cinematic_move=16;break;case"SMOG":case 17:m.event_cinematic_move=17;break;case"SLUDGE":case 18:m.event_cinematic_move=18;break;case"METAL_CLAW":case 19:m.event_cinematic_move=19;break;case"VICE_GRIP":case 20:m.event_cinematic_move=20;break;case"FLAME_WHEEL":case 21:m.event_cinematic_move=21;break;case"MEGAHORN":case 22:m.event_cinematic_move=22;break;case"WING_ATTACK":case 23:m.event_cinematic_move=23;break;case"FLAMETHROWER":case 24:m.event_cinematic_move=24;break;case"SUCKER_PUNCH":case 25:m.event_cinematic_move=25;break;case"DIG":case 26:m.event_cinematic_move=26;break;case"LOW_KICK":case 27:m.event_cinematic_move=27;break;case"CROSS_CHOP":case 28:m.event_cinematic_move=28;break;case"PSYCHO_CUT":case 29:m.event_cinematic_move=29;break;case"PSYBEAM":case 30:m.event_cinematic_move=30;break;case"EARTHQUAKE":case 31:m.event_cinematic_move=31;break;case"STONE_EDGE":case 32:m.event_cinematic_move=32;break;case"ICE_PUNCH":case 33:m.event_cinematic_move=33;break;case"HEART_STAMP":case 34:m.event_cinematic_move=34;break;case"DISCHARGE":case 35:m.event_cinematic_move=35;break;case"FLASH_CANNON":case 36:m.event_cinematic_move=36;break;case"PECK":case 37:m.event_cinematic_move=37;break;case"DRILL_PECK":case 38:m.event_cinematic_move=38;break;case"ICE_BEAM":case 39:m.event_cinematic_move=39;break;case"BLIZZARD":case 40:m.event_cinematic_move=40;break;case"AIR_SLASH":case 41:m.event_cinematic_move=41;break;case"HEAT_WAVE":case 42:m.event_cinematic_move=42;break;case"TWINEEDLE":case 43:m.event_cinematic_move=43;break;case"POISON_JAB":case 44:m.event_cinematic_move=44;break;case"AERIAL_ACE":case 45:m.event_cinematic_move=45;break;case"DRILL_RUN":case 46:m.event_cinematic_move=46;break;case"PETAL_BLIZZARD":case 47:m.event_cinematic_move=47;break;case"MEGA_DRAIN":case 48:m.event_cinematic_move=48;break;case"BUG_BUZZ":case 49:m.event_cinematic_move=49;break;case"POISON_FANG":case 50:m.event_cinematic_move=50;break;case"NIGHT_SLASH":case 51:m.event_cinematic_move=51;break;case"SLASH":case 52:m.event_cinematic_move=52;break;case"BUBBLE_BEAM":case 53:m.event_cinematic_move=53;break;case"SUBMISSION":case 54:m.event_cinematic_move=54;break;case"KARATE_CHOP":case 55:m.event_cinematic_move=55;break;case"LOW_SWEEP":case 56:m.event_cinematic_move=56;break;case"AQUA_JET":case 57:m.event_cinematic_move=57;break;case"AQUA_TAIL":case 58:m.event_cinematic_move=58;break;case"SEED_BOMB":case 59:m.event_cinematic_move=59;break;case"PSYSHOCK":case 60:m.event_cinematic_move=60;break;case"ROCK_THROW":case 61:m.event_cinematic_move=61;break;case"ANCIENT_POWER":case 62:m.event_cinematic_move=62;break;case"ROCK_TOMB":case 63:m.event_cinematic_move=63;break;case"ROCK_SLIDE":case 64:m.event_cinematic_move=64;break;case"POWER_GEM":case 65:m.event_cinematic_move=65;break;case"SHADOW_SNEAK":case 66:m.event_cinematic_move=66;break;case"SHADOW_PUNCH":case 67:m.event_cinematic_move=67;break;case"SHADOW_CLAW":case 68:m.event_cinematic_move=68;break;case"OMINOUS_WIND":case 69:m.event_cinematic_move=69;break;case"SHADOW_BALL":case 70:m.event_cinematic_move=70;break;case"BULLET_PUNCH":case 71:m.event_cinematic_move=71;break;case"MAGNET_BOMB":case 72:m.event_cinematic_move=72;break;case"STEEL_WING":case 73:m.event_cinematic_move=73;break;case"IRON_HEAD":case 74:m.event_cinematic_move=74;break;case"PARABOLIC_CHARGE":case 75:m.event_cinematic_move=75;break;case"SPARK":case 76:m.event_cinematic_move=76;break;case"THUNDER_PUNCH":case 77:m.event_cinematic_move=77;break;case"THUNDER":case 78:m.event_cinematic_move=78;break;case"THUNDERBOLT":case 79:m.event_cinematic_move=79;break;case"TWISTER":case 80:m.event_cinematic_move=80;break;case"DRAGON_BREATH":case 81:m.event_cinematic_move=81;break;case"DRAGON_PULSE":case 82:m.event_cinematic_move=82;break;case"DRAGON_CLAW":case 83:m.event_cinematic_move=83;break;case"DISARMING_VOICE":case 84:m.event_cinematic_move=84;break;case"DRAINING_KISS":case 85:m.event_cinematic_move=85;break;case"DAZZLING_GLEAM":case 86:m.event_cinematic_move=86;break;case"MOONBLAST":case 87:m.event_cinematic_move=87;break;case"PLAY_ROUGH":case 88:m.event_cinematic_move=88;break;case"CROSS_POISON":case 89:m.event_cinematic_move=89;break;case"SLUDGE_BOMB":case 90:m.event_cinematic_move=90;break;case"SLUDGE_WAVE":case 91:m.event_cinematic_move=91;break;case"GUNK_SHOT":case 92:m.event_cinematic_move=92;break;case"MUD_SHOT":case 93:m.event_cinematic_move=93;break;case"BONE_CLUB":case 94:m.event_cinematic_move=94;break;case"BULLDOZE":case 95:m.event_cinematic_move=95;break;case"MUD_BOMB":case 96:m.event_cinematic_move=96;break;case"FURY_CUTTER":case 97:m.event_cinematic_move=97;break;case"BUG_BITE":case 98:m.event_cinematic_move=98;break;case"SIGNAL_BEAM":case 99:m.event_cinematic_move=99;break;case"X_SCISSOR":case 100:m.event_cinematic_move=100;break;case"FLAME_CHARGE":case 101:m.event_cinematic_move=101;break;case"FLAME_BURST":case 102:m.event_cinematic_move=102;break;case"FIRE_BLAST":case 103:m.event_cinematic_move=103;break;case"BRINE":case 104:m.event_cinematic_move=104;break;case"WATER_PULSE":case 105:m.event_cinematic_move=105;break;case"SCALD":case 106:m.event_cinematic_move=106;break;case"HYDRO_PUMP":case 107:m.event_cinematic_move=107;break;case"PSYCHIC":case 108:m.event_cinematic_move=108;break;case"PSYSTRIKE":case 109:m.event_cinematic_move=109;break;case"ICE_SHARD":case 110:m.event_cinematic_move=110;break;case"ICY_WIND":case 111:m.event_cinematic_move=111;break;case"FROST_BREATH":case 112:m.event_cinematic_move=112;break;case"ABSORB":case 113:m.event_cinematic_move=113;break;case"GIGA_DRAIN":case 114:m.event_cinematic_move=114;break;case"FIRE_PUNCH":case 115:m.event_cinematic_move=115;break;case"SOLAR_BEAM":case 116:m.event_cinematic_move=116;break;case"LEAF_BLADE":case 117:m.event_cinematic_move=117;break;case"POWER_WHIP":case 118:m.event_cinematic_move=118;break;case"SPLASH":case 119:m.event_cinematic_move=119;break;case"ACID":case 120:m.event_cinematic_move=120;break;case"AIR_CUTTER":case 121:m.event_cinematic_move=121;break;case"HURRICANE":case 122:m.event_cinematic_move=122;break;case"BRICK_BREAK":case 123:m.event_cinematic_move=123;break;case"CUT":case 124:m.event_cinematic_move=124;break;case"SWIFT":case 125:m.event_cinematic_move=125;break;case"HORN_ATTACK":case 126:m.event_cinematic_move=126;break;case"STOMP":case 127:m.event_cinematic_move=127;break;case"HEADBUTT":case 128:m.event_cinematic_move=128;break;case"HYPER_FANG":case 129:m.event_cinematic_move=129;break;case"SLAM":case 130:m.event_cinematic_move=130;break;case"BODY_SLAM":case 131:m.event_cinematic_move=131;break;case"REST":case 132:m.event_cinematic_move=132;break;case"STRUGGLE":case 133:m.event_cinematic_move=133;break;case"SCALD_BLASTOISE":case 134:m.event_cinematic_move=134;break;case"HYDRO_PUMP_BLASTOISE":case 135:m.event_cinematic_move=135;break;case"WRAP_GREEN":case 136:m.event_cinematic_move=136;break;case"WRAP_PINK":case 137:m.event_cinematic_move=137;break;case"FURY_CUTTER_FAST":case 200:m.event_cinematic_move=200;break;case"BUG_BITE_FAST":case 201:m.event_cinematic_move=201;break;case"BITE_FAST":case 202:m.event_cinematic_move=202;break;case"SUCKER_PUNCH_FAST":case 203:m.event_cinematic_move=203;break;case"DRAGON_BREATH_FAST":case 204:m.event_cinematic_move=204;break;case"THUNDER_SHOCK_FAST":case 205:m.event_cinematic_move=205;break;case"SPARK_FAST":case 206:m.event_cinematic_move=206;break;case"LOW_KICK_FAST":case 207:m.event_cinematic_move=207;break;case"KARATE_CHOP_FAST":case 208:m.event_cinematic_move=208;break;case"EMBER_FAST":case 209:m.event_cinematic_move=209;break;case"WING_ATTACK_FAST":case 210:m.event_cinematic_move=210;break;case"PECK_FAST":case 211:m.event_cinematic_move=211;break;case"LICK_FAST":case 212:m.event_cinematic_move=212;break;case"SHADOW_CLAW_FAST":case 213:m.event_cinematic_move=213;break;case"VINE_WHIP_FAST":case 214:m.event_cinematic_move=214;break;case"RAZOR_LEAF_FAST":case 215:m.event_cinematic_move=215;break;case"MUD_SHOT_FAST":case 216:m.event_cinematic_move=216;break;case"ICE_SHARD_FAST":case 217:m.event_cinematic_move=217;break;case"FROST_BREATH_FAST":case 218:m.event_cinematic_move=218;break;case"QUICK_ATTACK_FAST":case 219:m.event_cinematic_move=219;break;case"SCRATCH_FAST":case 220:m.event_cinematic_move=220;break;case"TACKLE_FAST":case 221:m.event_cinematic_move=221;break;case"POUND_FAST":case 222:m.event_cinematic_move=222;break;case"CUT_FAST":case 223:m.event_cinematic_move=223;break;case"POISON_JAB_FAST":case 224:m.event_cinematic_move=224;break;case"ACID_FAST":case 225:m.event_cinematic_move=225;break;case"PSYCHO_CUT_FAST":case 226:m.event_cinematic_move=226;break;case"ROCK_THROW_FAST":case 227:m.event_cinematic_move=227;break;case"METAL_CLAW_FAST":case 228:m.event_cinematic_move=228;break;case"BULLET_PUNCH_FAST":case 229:m.event_cinematic_move=229;break;case"WATER_GUN_FAST":case 230:m.event_cinematic_move=230;break;case"SPLASH_FAST":case 231:m.event_cinematic_move=231;break;case"WATER_GUN_FAST_BLASTOISE":case 232:m.event_cinematic_move=232;break;case"MUD_SLAP_FAST":case 233:m.event_cinematic_move=233;break;case"ZEN_HEADBUTT_FAST":case 234:m.event_cinematic_move=234;break;case"CONFUSION_FAST":case 235:m.event_cinematic_move=235;break;case"POISON_STING_FAST":case 236:m.event_cinematic_move=236;break;case"BUBBLE_FAST":case 237:m.event_cinematic_move=237;break;case"FEINT_ATTACK_FAST":case 238:m.event_cinematic_move=238;break;case"STEEL_WING_FAST":case 239:m.event_cinematic_move=239;break;case"FIRE_FANG_FAST":case 240:m.event_cinematic_move=240;break;case"ROCK_SMASH_FAST":case 241:m.event_cinematic_move=241;break;case"TRANSFORM_FAST":case 242:m.event_cinematic_move=242;break;case"COUNTER_FAST":case 243:m.event_cinematic_move=243;break;case"POWDER_SNOW_FAST":case 244:m.event_cinematic_move=244;break;case"CLOSE_COMBAT":case 245:m.event_cinematic_move=245;break;case"DYNAMIC_PUNCH":case 246:m.event_cinematic_move=246;break;case"FOCUS_BLAST":case 247:m.event_cinematic_move=247;break;case"AURORA_BEAM":case 248:m.event_cinematic_move=248;break;case"CHARGE_BEAM_FAST":case 249:m.event_cinematic_move=249;break;case"VOLT_SWITCH_FAST":case 250:m.event_cinematic_move=250;break;case"WILD_CHARGE":case 251:m.event_cinematic_move=251;break;case"ZAP_CANNON":case 252:m.event_cinematic_move=252;break;case"DRAGON_TAIL_FAST":case 253:m.event_cinematic_move=253;break;case"AVALANCHE":case 254:m.event_cinematic_move=254;break;case"AIR_SLASH_FAST":case 255:m.event_cinematic_move=255;break;case"BRAVE_BIRD":case 256:m.event_cinematic_move=256;break;case"SKY_ATTACK":case 257:m.event_cinematic_move=257;break;case"SAND_TOMB":case 258:m.event_cinematic_move=258;break;case"ROCK_BLAST":case 259:m.event_cinematic_move=259;break;case"INFESTATION_FAST":case 260:m.event_cinematic_move=260;break;case"STRUGGLE_BUG_FAST":case 261:m.event_cinematic_move=261;break;case"SILVER_WIND":case 262:m.event_cinematic_move=262;break;case"ASTONISH_FAST":case 263:m.event_cinematic_move=263;break;case"HEX_FAST":case 264:m.event_cinematic_move=264;break;case"NIGHT_SHADE":case 265:m.event_cinematic_move=265;break;case"IRON_TAIL_FAST":case 266:m.event_cinematic_move=266;break;case"GYRO_BALL":case 267:m.event_cinematic_move=267;break;case"HEAVY_SLAM":case 268:m.event_cinematic_move=268;break;case"FIRE_SPIN_FAST":case 269:m.event_cinematic_move=269;break;case"OVERHEAT":case 270:m.event_cinematic_move=270;break;case"BULLET_SEED_FAST":case 271:m.event_cinematic_move=271;break;case"GRASS_KNOT":case 272:m.event_cinematic_move=272;break;case"ENERGY_BALL":case 273:m.event_cinematic_move=273;break;case"EXTRASENSORY_FAST":case 274:m.event_cinematic_move=274;break;case"FUTURESIGHT":case 275:m.event_cinematic_move=275;break;case"MIRROR_COAT":case 276:m.event_cinematic_move=276;break;case"OUTRAGE":case 277:m.event_cinematic_move=277;break;case"SNARL_FAST":case 278:m.event_cinematic_move=278;break;case"CRUNCH":case 279:m.event_cinematic_move=279;break;case"FOUL_PLAY":case 280:m.event_cinematic_move=280;break;case"HIDDEN_POWER_FAST":case 281:m.event_cinematic_move=281;break;case"TAKE_DOWN_FAST":case 282:m.event_cinematic_move=282;break;case"WATERFALL_FAST":case 283:m.event_cinematic_move=283;break;case"SURF":case 284:m.event_cinematic_move=284;break;case"DRACO_METEOR":case 285:m.event_cinematic_move=285;break;case"DOOM_DESIRE":case 286:m.event_cinematic_move=286;break;case"YAWN_FAST":case 287:m.event_cinematic_move=287;break;case"PSYCHO_BOOST":case 288:m.event_cinematic_move=288;break;case"ORIGIN_PULSE":case 289:m.event_cinematic_move=289;break;case"PRECIPICE_BLADES":case 290:m.event_cinematic_move=290;break;case"PRESENT_FAST":case 291:m.event_cinematic_move=291;break;case"WEATHER_BALL_FIRE":case 292:m.event_cinematic_move=292;break;case"WEATHER_BALL_ICE":case 293:m.event_cinematic_move=293;break;case"WEATHER_BALL_ROCK":case 294:m.event_cinematic_move=294;break;case"WEATHER_BALL_WATER":case 295:m.event_cinematic_move=295;break;case"FRENZY_PLANT":case 296:m.event_cinematic_move=296;break;case"SMACK_DOWN_FAST":case 297:m.event_cinematic_move=297;break;case"BLAST_BURN":case 298:m.event_cinematic_move=298;break;case"HYDRO_CANNON":case 299:m.event_cinematic_move=299;break;case"LAST_RESORT":case 300:m.event_cinematic_move=300;break;case"METEOR_MASH":case 301:m.event_cinematic_move=301;break;case"SKULL_BASH":case 302:m.event_cinematic_move=302;break;case"ACID_SPRAY":case 303:m.event_cinematic_move=303;break;case"EARTH_POWER":case 304:m.event_cinematic_move=304;break;case"CRABHAMMER":case 305:m.event_cinematic_move=305;break;case"LUNGE":case 306:m.event_cinematic_move=306;break;case"CRUSH_CLAW":case 307:m.event_cinematic_move=307;break;case"OCTAZOOKA":case 308:m.event_cinematic_move=308;break;case"MIRROR_SHOT":case 309:m.event_cinematic_move=309;break;case"SUPER_POWER":case 310:m.event_cinematic_move=310;break;case"FELL_STINGER":case 311:m.event_cinematic_move=311;break;case"LEAF_TORNADO":case 312:m.event_cinematic_move=312;break;case"LEECH_LIFE":case 313:m.event_cinematic_move=313;break;case"DRAIN_PUNCH":case 314:m.event_cinematic_move=314;break;case"SHADOW_BONE":case 315:m.event_cinematic_move=315;break;case"MUDDY_WATER":case 316:m.event_cinematic_move=316;break;case"BLAZE_KICK":case 317:m.event_cinematic_move=317;break;case"RAZOR_SHELL":case 318:m.event_cinematic_move=318;break;case"POWER_UP_PUNCH":case 319:m.event_cinematic_move=319;break}if(d.buddy_offset_male){if(!Array.isArray(d.buddy_offset_male))throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.buddy_offset_male: array expected");m.buddy_offset_male=[];for(var i=0;i<d.buddy_offset_male.length;++i){m.buddy_offset_male[i]=Number(d.buddy_offset_male[i])}}if(d.buddy_offset_female){if(!Array.isArray(d.buddy_offset_female))throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.buddy_offset_female: array expected");m.buddy_offset_female=[];for(var i=0;i<d.buddy_offset_female.length;++i){m.buddy_offset_female[i]=Number(d.buddy_offset_female[i])}}if(d.buddy_scale!=null){m.buddy_scale=Number(d.buddy_scale)}if(d.buddy_portrait_offset){if(!Array.isArray(d.buddy_portrait_offset))throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.buddy_portrait_offset: array expected");m.buddy_portrait_offset=[];for(var i=0;i<d.buddy_portrait_offset.length;++i){m.buddy_portrait_offset[i]=Number(d.buddy_portrait_offset[i])}}switch(d.parent_form){case"FORM_UNSET":case 0:m.parent_form=0;break;case"UNOWN_A":case 1:m.parent_form=1;break;case"UNOWN_B":case 2:m.parent_form=2;break;case"UNOWN_C":case 3:m.parent_form=3;break;case"UNOWN_D":case 4:m.parent_form=4;break;case"UNOWN_E":case 5:m.parent_form=5;break;case"UNOWN_F":case 6:m.parent_form=6;break;case"UNOWN_G":case 7:m.parent_form=7;break;case"UNOWN_H":case 8:m.parent_form=8;break;case"UNOWN_I":case 9:m.parent_form=9;break;case"UNOWN_J":case 10:m.parent_form=10;break;case"UNOWN_K":case 11:m.parent_form=11;break;case"UNOWN_L":case 12:m.parent_form=12;break;case"UNOWN_M":case 13:m.parent_form=13;break;case"UNOWN_N":case 14:m.parent_form=14;break;case"UNOWN_O":case 15:m.parent_form=15;break;case"UNOWN_P":case 16:m.parent_form=16;break;case"UNOWN_Q":case 17:m.parent_form=17;break;case"UNOWN_R":case 18:m.parent_form=18;break;case"UNOWN_S":case 19:m.parent_form=19;break;case"UNOWN_T":case 20:m.parent_form=20;break;case"UNOWN_U":case 21:m.parent_form=21;break;case"UNOWN_V":case 22:m.parent_form=22;break;case"UNOWN_W":case 23:m.parent_form=23;break;case"UNOWN_X":case 24:m.parent_form=24;break;case"UNOWN_Y":case 25:m.parent_form=25;break;case"UNOWN_Z":case 26:m.parent_form=26;break;case"UNOWN_EXCLAMATION_POINT":case 27:m.parent_form=27;break;case"UNOWN_QUESTION_MARK":case 28:m.parent_form=28;break;case"CASTFORM_NORMAL":case 29:m.parent_form=29;break;case"CASTFORM_SUNNY":case 30:m.parent_form=30;break;case"CASTFORM_RAINY":case 31:m.parent_form=31;break;case"CASTFORM_SNOWY":case 32:m.parent_form=32;break;case"DEOXYS_NORMAL":case 33:m.parent_form=33;break;case"DEOXYS_ATTACK":case 34:m.parent_form=34;break;case"DEOXYS_DEFENSE":case 35:m.parent_form=35;break;case"DEOXYS_SPEED":case 36:m.parent_form=36;break;case"SPINDA_00":case 37:m.parent_form=37;break;case"SPINDA_01":case 38:m.parent_form=38;break;case"SPINDA_02":case 39:m.parent_form=39;break;case"SPINDA_03":case 40:m.parent_form=40;break;case"SPINDA_04":case 41:m.parent_form=41;break;case"SPINDA_05":case 42:m.parent_form=42;break;case"SPINDA_06":case 43:m.parent_form=43;break;case"SPINDA_07":case 44:m.parent_form=44;break;case"RATTATA_NORMAL":case 45:m.parent_form=45;break;case"RATTATA_ALOLA":case 46:m.parent_form=46;break;case"RATICATE_NORMAL":case 47:m.parent_form=47;break;case"RATICATE_ALOLA":case 48:m.parent_form=48;break;case"RAICHU_NORMAL":case 49:m.parent_form=49;break;case"RAICHU_ALOLA":case 50:m.parent_form=50;break;case"SANDSHREW_NORMAL":case 51:m.parent_form=51;break;case"SANDSHREW_ALOLA":case 52:m.parent_form=52;break;case"SANDSLASH_NORMAL":case 53:m.parent_form=53;break;case"SANDSLASH_ALOLA":case 54:m.parent_form=54;break;case"VULPIX_NORMAL":case 55:m.parent_form=55;break;case"VULPIX_ALOLA":case 56:m.parent_form=56;break;case"NINETALES_NORMAL":case 57:m.parent_form=57;break;case"NINETALES_ALOLA":case 58:m.parent_form=58;break;case"DIGLETT_NORMAL":case 59:m.parent_form=59;break;case"DIGLETT_ALOLA":case 60:m.parent_form=60;break;case"DUGTRIO_NORMAL":case 61:m.parent_form=61;break;case"DUGTRIO_ALOLA":case 62:m.parent_form=62;break;case"MEOWTH_NORMAL":case 63:m.parent_form=63;break;case"MEOWTH_ALOLA":case 64:m.parent_form=64;break;case"PERSIAN_NORMAL":case 65:m.parent_form=65;break;case"PERSIAN_ALOLA":case 66:m.parent_form=66;break;case"GEODUDE_NORMAL":case 67:m.parent_form=67;break;case"GEODUDE_ALOLA":case 68:m.parent_form=68;break;case"GRAVELER_NORMAL":case 69:m.parent_form=69;break;case"GRAVELER_ALOLA":case 70:m.parent_form=70;break;case"GOLEM_NORMAL":case 71:m.parent_form=71;break;case"GOLEM_ALOLA":case 72:m.parent_form=72;break;case"GRIMER_NORMAL":case 73:m.parent_form=73;break;case"GRIMER_ALOLA":case 74:m.parent_form=74;break;case"MUK_NORMAL":case 75:m.parent_form=75;break;case"MUK_ALOLA":case 76:m.parent_form=76;break;case"EXEGGUTOR_NORMAL":case 77:m.parent_form=77;break;case"EXEGGUTOR_ALOLA":case 78:m.parent_form=78;break;case"MAROWAK_NORMAL":case 79:m.parent_form=79;break;case"MAROWAK_ALOLA":case 80:m.parent_form=80;break;case"ROTOM_NORMAL":case 81:m.parent_form=81;break;case"ROTOM_FROST":case 82:m.parent_form=82;break;case"ROTOM_FAN":case 83:m.parent_form=83;break;case"ROTOM_MOW":case 84:m.parent_form=84;break;case"ROTOM_WASH":case 85:m.parent_form=85;break;case"ROTOM_HEAT":case 86:m.parent_form=86;break;case"WORMADAM_PLANT":case 87:m.parent_form=87;break;case"WORMADAM_SANDY":case 88:m.parent_form=88;break;case"WORMADAM_TRASH":case 89:m.parent_form=89;break;case"GIRATINA_ALTERED":case 90:m.parent_form=90;break;case"GIRATINA_ORIGIN":case 91:m.parent_form=91;break;case"SHAYMIN_SKY":case 92:m.parent_form=92;break;case"SHAYMIN_LAND":case 93:m.parent_form=93;break;case"CHERRIM_OVERCAST":case 94:m.parent_form=94;break;case"CHERRIM_SUNNY":case 95:m.parent_form=95;break;case"SHELLOS_WEST_SEA":case 96:m.parent_form=96;break;case"SHELLOS_EAST_SEA":case 97:m.parent_form=97;break;case"GASTRODON_WEST_SEA":case 98:m.parent_form=98;break;case"GASTRODON_EAST_SEA":case 99:m.parent_form=99;break;case"ARCEUS_NORMAL":case 100:m.parent_form=100;break;case"ARCEUS_FIGHTING":case 101:m.parent_form=101;break;case"ARCEUS_FLYING":case 102:m.parent_form=102;break;case"ARCEUS_POISON":case 103:m.parent_form=103;break;case"ARCEUS_GROUND":case 104:m.parent_form=104;break;case"ARCEUS_ROCK":case 105:m.parent_form=105;break;case"ARCEUS_BUG":case 106:m.parent_form=106;break;case"ARCEUS_GHOST":case 107:m.parent_form=107;break;case"ARCEUS_STEEL":case 108:m.parent_form=108;break;case"ARCEUS_FIRE":case 109:m.parent_form=109;break;case"ARCEUS_WATER":case 110:m.parent_form=110;break;case"ARCEUS_GRASS":case 111:m.parent_form=111;break;case"ARCEUS_ELECTRIC":case 112:m.parent_form=112;break;case"ARCEUS_PSYCHIC":case 113:m.parent_form=113;break;case"ARCEUS_ICE":case 114:m.parent_form=114;break;case"ARCEUS_DRAGON":case 115:m.parent_form=115;break;case"ARCEUS_DARK":case 116:m.parent_form=116;break;case"ARCEUS_FAIRY":case 117:m.parent_form=117;break;case"BURMY_PLANT":case 118:m.parent_form=118;break;case"BURMY_SANDY":case 119:m.parent_form=119;break;case"BURMY_TRASH":case 120:m.parent_form=120;break}if(d.third_move!=null){if(typeof d.third_move!=="object")throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.third_move: object expected");m.third_move=$root.POGOProtos.Settings.Master.PokemonSettings.PokemonThirdMoveAttributes.fromObject(d.third_move)}if(d.is_transferable!=null){m.is_transferable=Boolean(d.is_transferable)}if(d.is_deployable!=null){m.is_deployable=Boolean(d.is_deployable)}if(d.combat_shoulder_camera_angle){if(!Array.isArray(d.combat_shoulder_camera_angle))throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.combat_shoulder_camera_angle: array expected");m.combat_shoulder_camera_angle=[];for(var i=0;i<d.combat_shoulder_camera_angle.length;++i){m.combat_shoulder_camera_angle[i]=Number(d.combat_shoulder_camera_angle[i])}}if(d.is_tradable!=null){m.is_tradable=Boolean(d.is_tradable)}if(d.combat_default_camera_angle){if(!Array.isArray(d.combat_default_camera_angle))throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.combat_default_camera_angle: array expected");m.combat_default_camera_angle=[];for(var i=0;i<d.combat_default_camera_angle.length;++i){m.combat_default_camera_angle[i]=Number(d.combat_default_camera_angle[i])}}if(d.combat_opponent_focus_camera_angle){if(!Array.isArray(d.combat_opponent_focus_camera_angle))throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.combat_opponent_focus_camera_angle: array expected");m.combat_opponent_focus_camera_angle=[];for(var i=0;i<d.combat_opponent_focus_camera_angle.length;++i){m.combat_opponent_focus_camera_angle[i]=Number(d.combat_opponent_focus_camera_angle[i])}}if(d.combat_player_focus_camera_angle){if(!Array.isArray(d.combat_player_focus_camera_angle))throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.combat_player_focus_camera_angle: array expected");m.combat_player_focus_camera_angle=[];for(var i=0;i<d.combat_player_focus_camera_angle.length;++i){m.combat_player_focus_camera_angle[i]=Number(d.combat_player_focus_camera_angle[i])}}if(d.combat_player_pokemon_position_offset){if(!Array.isArray(d.combat_player_pokemon_position_offset))throw TypeError(".POGOProtos.Settings.Master.PokemonSettings.combat_player_pokemon_position_offset: array expected");m.combat_player_pokemon_position_offset=[];for(var i=0;i<d.combat_player_pokemon_position_offset.length;++i){m.combat_player_pokemon_position_offset[i]=Number(d.combat_player_pokemon_position_offset[i])}}return m};PokemonSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.quick_moves=[];d.cinematic_moves=[];d.animation_time=[];d.evolution_ids=[];d.evolution_branch=[];d.buddy_offset_male=[];d.buddy_offset_female=[];d.buddy_portrait_offset=[];d.combat_shoulder_camera_angle=[];d.combat_default_camera_angle=[];d.combat_opponent_focus_camera_angle=[];d.combat_player_focus_camera_angle=[];d.combat_player_pokemon_position_offset=[]}if(o.defaults){d.pokemon_id=o.enums===String?"MISSINGNO":0;d.model_scale=0;d.type=o.enums===String?"POKEMON_TYPE_NONE":0;d.type_2=o.enums===String?"POKEMON_TYPE_NONE":0;d.camera=null;d.encounter=null;d.stats=null;d.evolution_pips=0;d.rarity=o.enums===String?"POKEMON_RARITY_NORMAL":0;d.pokedex_height_m=0;d.pokedex_weight_kg=0;d.parent_pokemon_id=o.enums===String?"MISSINGNO":0;d.height_std_dev=0;d.weight_std_dev=0;d.km_distance_to_hatch=0;d.family_id=o.enums===String?"FAMILY_UNSET":0;d.candy_to_evolve=0;d.km_buddy_distance=0;d.buddy_size=o.enums===String?"BUDDY_MEDIUM":0;d.model_height=0;d.model_scale_v2=0;d.form=o.enums===String?"FORM_UNSET":0;d.event_quick_move=o.enums===String?"MOVE_UNSET":0;d.event_cinematic_move=o.enums===String?"MOVE_UNSET":0;d.buddy_scale=0;d.parent_form=o.enums===String?"FORM_UNSET":0;d.third_move=null;d.is_transferable=false;d.is_deployable=false;d.is_tradable=false}if(m.pokemon_id!=null&&m.hasOwnProperty("pokemon_id")){d.pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.pokemon_id]:m.pokemon_id}if(m.model_scale!=null&&m.hasOwnProperty("model_scale")){d.model_scale=o.json&&!isFinite(m.model_scale)?String(m.model_scale):m.model_scale}if(m.type!=null&&m.hasOwnProperty("type")){d.type=o.enums===String?$root.POGOProtos.Enums.PokemonType[m.type]:m.type}if(m.type_2!=null&&m.hasOwnProperty("type_2")){d.type_2=o.enums===String?$root.POGOProtos.Enums.PokemonType[m.type_2]:m.type_2}if(m.camera!=null&&m.hasOwnProperty("camera")){d.camera=$root.POGOProtos.Settings.Master.Pokemon.CameraAttributes.toObject(m.camera,o)}if(m.encounter!=null&&m.hasOwnProperty("encounter")){d.encounter=$root.POGOProtos.Settings.Master.Pokemon.EncounterAttributes.toObject(m.encounter,o)}if(m.stats!=null&&m.hasOwnProperty("stats")){d.stats=$root.POGOProtos.Settings.Master.Pokemon.StatsAttributes.toObject(m.stats,o)}if(m.quick_moves&&m.quick_moves.length){d.quick_moves=[];for(var j=0;j<m.quick_moves.length;++j){d.quick_moves[j]=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.quick_moves[j]]:m.quick_moves[j]}}if(m.cinematic_moves&&m.cinematic_moves.length){d.cinematic_moves=[];for(var j=0;j<m.cinematic_moves.length;++j){d.cinematic_moves[j]=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.cinematic_moves[j]]:m.cinematic_moves[j]}}if(m.animation_time&&m.animation_time.length){d.animation_time=[];for(var j=0;j<m.animation_time.length;++j){d.animation_time[j]=o.json&&!isFinite(m.animation_time[j])?String(m.animation_time[j]):m.animation_time[j]}}if(m.evolution_ids&&m.evolution_ids.length){d.evolution_ids=[];for(var j=0;j<m.evolution_ids.length;++j){d.evolution_ids[j]=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.evolution_ids[j]]:m.evolution_ids[j]}}if(m.evolution_pips!=null&&m.hasOwnProperty("evolution_pips")){d.evolution_pips=m.evolution_pips}if(m.rarity!=null&&m.hasOwnProperty("rarity")){d.rarity=o.enums===String?$root.POGOProtos.Enums.PokemonRarity[m.rarity]:m.rarity}if(m.pokedex_height_m!=null&&m.hasOwnProperty("pokedex_height_m")){d.pokedex_height_m=o.json&&!isFinite(m.pokedex_height_m)?String(m.pokedex_height_m):m.pokedex_height_m}if(m.pokedex_weight_kg!=null&&m.hasOwnProperty("pokedex_weight_kg")){d.pokedex_weight_kg=o.json&&!isFinite(m.pokedex_weight_kg)?String(m.pokedex_weight_kg):m.pokedex_weight_kg}if(m.parent_pokemon_id!=null&&m.hasOwnProperty("parent_pokemon_id")){d.parent_pokemon_id=o.enums===String?$root.POGOProtos.Enums.PokemonId[m.parent_pokemon_id]:m.parent_pokemon_id}if(m.height_std_dev!=null&&m.hasOwnProperty("height_std_dev")){d.height_std_dev=o.json&&!isFinite(m.height_std_dev)?String(m.height_std_dev):m.height_std_dev}if(m.weight_std_dev!=null&&m.hasOwnProperty("weight_std_dev")){d.weight_std_dev=o.json&&!isFinite(m.weight_std_dev)?String(m.weight_std_dev):m.weight_std_dev}if(m.km_distance_to_hatch!=null&&m.hasOwnProperty("km_distance_to_hatch")){d.km_distance_to_hatch=o.json&&!isFinite(m.km_distance_to_hatch)?String(m.km_distance_to_hatch):m.km_distance_to_hatch}if(m.family_id!=null&&m.hasOwnProperty("family_id")){d.family_id=o.enums===String?$root.POGOProtos.Enums.PokemonFamilyId[m.family_id]:m.family_id}if(m.candy_to_evolve!=null&&m.hasOwnProperty("candy_to_evolve")){d.candy_to_evolve=m.candy_to_evolve}if(m.km_buddy_distance!=null&&m.hasOwnProperty("km_buddy_distance")){d.km_buddy_distance=o.json&&!isFinite(m.km_buddy_distance)?String(m.km_buddy_distance):m.km_buddy_distance}if(m.buddy_size!=null&&m.hasOwnProperty("buddy_size")){d.buddy_size=o.enums===String?$root.POGOProtos.Enums.BuddySize[m.buddy_size]:m.buddy_size}if(m.model_height!=null&&m.hasOwnProperty("model_height")){d.model_height=o.json&&!isFinite(m.model_height)?String(m.model_height):m.model_height}if(m.evolution_branch&&m.evolution_branch.length){d.evolution_branch=[];for(var j=0;j<m.evolution_branch.length;++j){d.evolution_branch[j]=$root.POGOProtos.Settings.Master.Pokemon.EvolutionBranch.toObject(m.evolution_branch[j],o)}}if(m.model_scale_v2!=null&&m.hasOwnProperty("model_scale_v2")){d.model_scale_v2=o.json&&!isFinite(m.model_scale_v2)?String(m.model_scale_v2):m.model_scale_v2}if(m.form!=null&&m.hasOwnProperty("form")){d.form=o.enums===String?$root.POGOProtos.Enums.Form[m.form]:m.form}if(m.event_quick_move!=null&&m.hasOwnProperty("event_quick_move")){d.event_quick_move=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.event_quick_move]:m.event_quick_move}if(m.event_cinematic_move!=null&&m.hasOwnProperty("event_cinematic_move")){d.event_cinematic_move=o.enums===String?$root.POGOProtos.Enums.PokemonMove[m.event_cinematic_move]:m.event_cinematic_move}if(m.buddy_offset_male&&m.buddy_offset_male.length){d.buddy_offset_male=[];for(var j=0;j<m.buddy_offset_male.length;++j){d.buddy_offset_male[j]=o.json&&!isFinite(m.buddy_offset_male[j])?String(m.buddy_offset_male[j]):m.buddy_offset_male[j]}}if(m.buddy_offset_female&&m.buddy_offset_female.length){d.buddy_offset_female=[];for(var j=0;j<m.buddy_offset_female.length;++j){d.buddy_offset_female[j]=o.json&&!isFinite(m.buddy_offset_female[j])?String(m.buddy_offset_female[j]):m.buddy_offset_female[j]}}if(m.buddy_scale!=null&&m.hasOwnProperty("buddy_scale")){d.buddy_scale=o.json&&!isFinite(m.buddy_scale)?String(m.buddy_scale):m.buddy_scale}if(m.buddy_portrait_offset&&m.buddy_portrait_offset.length){d.buddy_portrait_offset=[];for(var j=0;j<m.buddy_portrait_offset.length;++j){d.buddy_portrait_offset[j]=o.json&&!isFinite(m.buddy_portrait_offset[j])?String(m.buddy_portrait_offset[j]):m.buddy_portrait_offset[j]}}if(m.parent_form!=null&&m.hasOwnProperty("parent_form")){d.parent_form=o.enums===String?$root.POGOProtos.Enums.Form[m.parent_form]:m.parent_form}if(m.third_move!=null&&m.hasOwnProperty("third_move")){d.third_move=$root.POGOProtos.Settings.Master.PokemonSettings.PokemonThirdMoveAttributes.toObject(m.third_move,o)}if(m.is_transferable!=null&&m.hasOwnProperty("is_transferable")){d.is_transferable=m.is_transferable}if(m.is_deployable!=null&&m.hasOwnProperty("is_deployable")){d.is_deployable=m.is_deployable}if(m.combat_shoulder_camera_angle&&m.combat_shoulder_camera_angle.length){d.combat_shoulder_camera_angle=[];for(var j=0;j<m.combat_shoulder_camera_angle.length;++j){d.combat_shoulder_camera_angle[j]=o.json&&!isFinite(m.combat_shoulder_camera_angle[j])?String(m.combat_shoulder_camera_angle[j]):m.combat_shoulder_camera_angle[j]}}if(m.is_tradable!=null&&m.hasOwnProperty("is_tradable")){d.is_tradable=m.is_tradable}if(m.combat_default_camera_angle&&m.combat_default_camera_angle.length){d.combat_default_camera_angle=[];for(var j=0;j<m.combat_default_camera_angle.length;++j){d.combat_default_camera_angle[j]=o.json&&!isFinite(m.combat_default_camera_angle[j])?String(m.combat_default_camera_angle[j]):m.combat_default_camera_angle[j]}}if(m.combat_opponent_focus_camera_angle&&m.combat_opponent_focus_camera_angle.length){d.combat_opponent_focus_camera_angle=[];for(var j=0;j<m.combat_opponent_focus_camera_angle.length;++j){d.combat_opponent_focus_camera_angle[j]=o.json&&!isFinite(m.combat_opponent_focus_camera_angle[j])?String(m.combat_opponent_focus_camera_angle[j]):m.combat_opponent_focus_camera_angle[j]}}if(m.combat_player_focus_camera_angle&&m.combat_player_focus_camera_angle.length){d.combat_player_focus_camera_angle=[];for(var j=0;j<m.combat_player_focus_camera_angle.length;++j){d.combat_player_focus_camera_angle[j]=o.json&&!isFinite(m.combat_player_focus_camera_angle[j])?String(m.combat_player_focus_camera_angle[j]):m.combat_player_focus_camera_angle[j]}}if(m.combat_player_pokemon_position_offset&&m.combat_player_pokemon_position_offset.length){d.combat_player_pokemon_position_offset=[];for(var j=0;j<m.combat_player_pokemon_position_offset.length;++j){d.combat_player_pokemon_position_offset[j]=o.json&&!isFinite(m.combat_player_pokemon_position_offset[j])?String(m.combat_player_pokemon_position_offset[j]):m.combat_player_pokemon_position_offset[j]}}return d};PokemonSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};PokemonSettings.PokemonThirdMoveAttributes=function(){function PokemonThirdMoveAttributes(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokemonThirdMoveAttributes.prototype.stardust_to_unlock=0;PokemonThirdMoveAttributes.prototype.candy_to_unlock=0;PokemonThirdMoveAttributes.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.stardust_to_unlock!=null&&m.hasOwnProperty("stardust_to_unlock"))w.uint32(8).int32(m.stardust_to_unlock);if(m.candy_to_unlock!=null&&m.hasOwnProperty("candy_to_unlock"))w.uint32(16).int32(m.candy_to_unlock);return w};PokemonThirdMoveAttributes.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.PokemonSettings.PokemonThirdMoveAttributes;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.stardust_to_unlock=r.int32();break;case 2:m.candy_to_unlock=r.int32();break;default:r.skipType(t&7);break}}return m};PokemonThirdMoveAttributes.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.PokemonSettings.PokemonThirdMoveAttributes)return d;var m=new $root.POGOProtos.Settings.Master.PokemonSettings.PokemonThirdMoveAttributes;if(d.stardust_to_unlock!=null){m.stardust_to_unlock=d.stardust_to_unlock|0}if(d.candy_to_unlock!=null){m.candy_to_unlock=d.candy_to_unlock|0}return m};PokemonThirdMoveAttributes.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.stardust_to_unlock=0;d.candy_to_unlock=0}if(m.stardust_to_unlock!=null&&m.hasOwnProperty("stardust_to_unlock")){d.stardust_to_unlock=m.stardust_to_unlock}if(m.candy_to_unlock!=null&&m.hasOwnProperty("candy_to_unlock")){d.candy_to_unlock=m.candy_to_unlock}return d};PokemonThirdMoveAttributes.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokemonThirdMoveAttributes}();return PokemonSettings}();Master.PokemonUpgradeSettings=function(){function PokemonUpgradeSettings(p){this.candy_cost=[];this.stardust_cost=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokemonUpgradeSettings.prototype.upgrades_per_level=0;PokemonUpgradeSettings.prototype.allowed_levels_above_player=0;PokemonUpgradeSettings.prototype.candy_cost=$util.emptyArray;PokemonUpgradeSettings.prototype.stardust_cost=$util.emptyArray;PokemonUpgradeSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.upgrades_per_level!=null&&m.hasOwnProperty("upgrades_per_level"))w.uint32(8).int32(m.upgrades_per_level);if(m.allowed_levels_above_player!=null&&m.hasOwnProperty("allowed_levels_above_player"))w.uint32(16).int32(m.allowed_levels_above_player);if(m.candy_cost!=null&&m.candy_cost.length){w.uint32(26).fork();for(var i=0;i<m.candy_cost.length;++i)w.int32(m.candy_cost[i]);w.ldelim()}if(m.stardust_cost!=null&&m.stardust_cost.length){w.uint32(34).fork();for(var i=0;i<m.stardust_cost.length;++i)w.int32(m.stardust_cost[i]);w.ldelim()}return w};PokemonUpgradeSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.PokemonUpgradeSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.upgrades_per_level=r.int32();break;case 2:m.allowed_levels_above_player=r.int32();break;case 3:if(!(m.candy_cost&&m.candy_cost.length))m.candy_cost=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.candy_cost.push(r.int32())}else m.candy_cost.push(r.int32());break;case 4:if(!(m.stardust_cost&&m.stardust_cost.length))m.stardust_cost=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.stardust_cost.push(r.int32())}else m.stardust_cost.push(r.int32());break;default:r.skipType(t&7);break}}return m};PokemonUpgradeSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.PokemonUpgradeSettings)return d;var m=new $root.POGOProtos.Settings.Master.PokemonUpgradeSettings;if(d.upgrades_per_level!=null){m.upgrades_per_level=d.upgrades_per_level|0}if(d.allowed_levels_above_player!=null){m.allowed_levels_above_player=d.allowed_levels_above_player|0}if(d.candy_cost){if(!Array.isArray(d.candy_cost))throw TypeError(".POGOProtos.Settings.Master.PokemonUpgradeSettings.candy_cost: array expected");m.candy_cost=[];for(var i=0;i<d.candy_cost.length;++i){m.candy_cost[i]=d.candy_cost[i]|0}}if(d.stardust_cost){if(!Array.isArray(d.stardust_cost))throw TypeError(".POGOProtos.Settings.Master.PokemonUpgradeSettings.stardust_cost: array expected");m.stardust_cost=[];for(var i=0;i<d.stardust_cost.length;++i){m.stardust_cost[i]=d.stardust_cost[i]|0}}return m};PokemonUpgradeSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.candy_cost=[];d.stardust_cost=[]}if(o.defaults){d.upgrades_per_level=0;d.allowed_levels_above_player=0}if(m.upgrades_per_level!=null&&m.hasOwnProperty("upgrades_per_level")){d.upgrades_per_level=m.upgrades_per_level}if(m.allowed_levels_above_player!=null&&m.hasOwnProperty("allowed_levels_above_player")){d.allowed_levels_above_player=m.allowed_levels_above_player}if(m.candy_cost&&m.candy_cost.length){d.candy_cost=[];for(var j=0;j<m.candy_cost.length;++j){d.candy_cost[j]=m.candy_cost[j]}}if(m.stardust_cost&&m.stardust_cost.length){d.stardust_cost=[];for(var j=0;j<m.stardust_cost.length;++j){d.stardust_cost[j]=m.stardust_cost[j]}}return d};PokemonUpgradeSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokemonUpgradeSettings}();Master.Quest=function(){var Quest={};Quest.DailyQuestSettings=function(){function DailyQuestSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}DailyQuestSettings.prototype.buckets_per_day=0;DailyQuestSettings.prototype.streak_length=0;DailyQuestSettings.prototype.bonus_multiplier=0;DailyQuestSettings.prototype.streak_bonus_multiplier=0;DailyQuestSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.buckets_per_day!=null&&m.hasOwnProperty("buckets_per_day"))w.uint32(8).int32(m.buckets_per_day);if(m.streak_length!=null&&m.hasOwnProperty("streak_length"))w.uint32(16).int32(m.streak_length);if(m.bonus_multiplier!=null&&m.hasOwnProperty("bonus_multiplier"))w.uint32(29).float(m.bonus_multiplier);if(m.streak_bonus_multiplier!=null&&m.hasOwnProperty("streak_bonus_multiplier"))w.uint32(37).float(m.streak_bonus_multiplier);return w};DailyQuestSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.Quest.DailyQuestSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.buckets_per_day=r.int32();break;case 2:m.streak_length=r.int32();break;case 3:m.bonus_multiplier=r.float();break;case 4:m.streak_bonus_multiplier=r.float();break;default:r.skipType(t&7);break}}return m};DailyQuestSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.Quest.DailyQuestSettings)return d;var m=new $root.POGOProtos.Settings.Master.Quest.DailyQuestSettings;if(d.buckets_per_day!=null){m.buckets_per_day=d.buckets_per_day|0}if(d.streak_length!=null){m.streak_length=d.streak_length|0}if(d.bonus_multiplier!=null){m.bonus_multiplier=Number(d.bonus_multiplier)}if(d.streak_bonus_multiplier!=null){m.streak_bonus_multiplier=Number(d.streak_bonus_multiplier)}return m};DailyQuestSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.buckets_per_day=0;d.streak_length=0;d.bonus_multiplier=0;d.streak_bonus_multiplier=0}if(m.buckets_per_day!=null&&m.hasOwnProperty("buckets_per_day")){d.buckets_per_day=m.buckets_per_day}if(m.streak_length!=null&&m.hasOwnProperty("streak_length")){d.streak_length=m.streak_length}if(m.bonus_multiplier!=null&&m.hasOwnProperty("bonus_multiplier")){d.bonus_multiplier=o.json&&!isFinite(m.bonus_multiplier)?String(m.bonus_multiplier):m.bonus_multiplier}if(m.streak_bonus_multiplier!=null&&m.hasOwnProperty("streak_bonus_multiplier")){d.streak_bonus_multiplier=o.json&&!isFinite(m.streak_bonus_multiplier)?String(m.streak_bonus_multiplier):m.streak_bonus_multiplier}return d};DailyQuestSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return DailyQuestSettings}();return Quest}();Master.QuestSettings=function(){function QuestSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}QuestSettings.prototype.quest_type=0;QuestSettings.prototype.daily_quest=null;QuestSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.quest_type!=null&&m.hasOwnProperty("quest_type"))w.uint32(8).int32(m.quest_type);if(m.daily_quest!=null&&m.hasOwnProperty("daily_quest"))$root.POGOProtos.Settings.Master.Quest.DailyQuestSettings.encode(m.daily_quest,w.uint32(18).fork()).ldelim();return w};QuestSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.QuestSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.quest_type=r.int32();break;case 2:m.daily_quest=$root.POGOProtos.Settings.Master.Quest.DailyQuestSettings.decode(r,r.uint32());break;default:r.skipType(t&7);break}}return m};QuestSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.QuestSettings)return d;var m=new $root.POGOProtos.Settings.Master.QuestSettings;switch(d.quest_type){case"QUEST_UNKNOWN_TYPE":case 0:m.quest_type=0;break;case"QUEST_FIRST_CATCH_OF_THE_DAY":case 1:m.quest_type=1;break;case"QUEST_FIRST_POKESTOP_OF_THE_DAY":case 2:m.quest_type=2;break;case"QUEST_MULTI_PART":case 3:m.quest_type=3;break;case"QUEST_CATCH_POKEMON":case 4:m.quest_type=4;break;case"QUEST_SPIN_POKESTOP":case 5:m.quest_type=5;break;case"QUEST_HATCH_EGG":case 6:m.quest_type=6;break;case"QUEST_COMPLETE_GYM_BATTLE":case 7:m.quest_type=7;break;case"QUEST_COMPLETE_RAID_BATTLE":case 8:m.quest_type=8;break;case"QUEST_COMPLETE_QUEST":case 9:m.quest_type=9;break;case"QUEST_TRANSFER_POKEMON":case 10:m.quest_type=10;break;case"QUEST_FAVORITE_POKEMON":case 11:m.quest_type=11;break;case"QUEST_AUTOCOMPLETE":case 12:m.quest_type=12;break;case"QUEST_USE_BERRY_IN_ENCOUNTER":case 13:m.quest_type=13;break;case"QUEST_UPGRADE_POKEMON":case 14:m.quest_type=14;break;case"QUEST_EVOLVE_POKEMON":case 15:m.quest_type=15;break;case"QUEST_LAND_THROW":case 16:m.quest_type=16;break;case"QUEST_GET_BUDDY_CANDY":case 17:m.quest_type=17;break;case"QUEST_BADGE_RANK":case 18:m.quest_type=18;break;case"QUEST_PLAYER_LEVEL":case 19:m.quest_type=19;break;case"QUEST_JOIN_RAID":case 20:m.quest_type=20;break;case"QUEST_COMPLETE_BATTLE":case 21:m.quest_type=21;break;case"QUEST_ADD_FRIEND":case 22:m.quest_type=22;break;case"QUEST_TRADE_POKEMON":case 23:m.quest_type=23;break;case"QUEST_SEND_GIFT":case 24:m.quest_type=24;break;case"QUEST_EVOLVE_INTO_POKEMON":case 25:m.quest_type=25;break}if(d.daily_quest!=null){if(typeof d.daily_quest!=="object")throw TypeError(".POGOProtos.Settings.Master.QuestSettings.daily_quest: object expected");m.daily_quest=$root.POGOProtos.Settings.Master.Quest.DailyQuestSettings.fromObject(d.daily_quest)}return m};QuestSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.quest_type=o.enums===String?"QUEST_UNKNOWN_TYPE":0;d.daily_quest=null}if(m.quest_type!=null&&m.hasOwnProperty("quest_type")){d.quest_type=o.enums===String?$root.POGOProtos.Enums.QuestType[m.quest_type]:m.quest_type}if(m.daily_quest!=null&&m.hasOwnProperty("daily_quest")){d.daily_quest=$root.POGOProtos.Settings.Master.Quest.DailyQuestSettings.toObject(m.daily_quest,o)}return d};QuestSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return QuestSettings}();Master.TypeEffectiveSettings=function(){function TypeEffectiveSettings(p){this.attack_scalar=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}TypeEffectiveSettings.prototype.attack_scalar=$util.emptyArray;TypeEffectiveSettings.prototype.attack_type=0;TypeEffectiveSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.attack_scalar!=null&&m.attack_scalar.length){w.uint32(10).fork();for(var i=0;i<m.attack_scalar.length;++i)w.float(m.attack_scalar[i]);w.ldelim()}if(m.attack_type!=null&&m.hasOwnProperty("attack_type"))w.uint32(16).int32(m.attack_type);return w};TypeEffectiveSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.TypeEffectiveSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.attack_scalar&&m.attack_scalar.length))m.attack_scalar=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.attack_scalar.push(r.float())}else m.attack_scalar.push(r.float());break;case 2:m.attack_type=r.int32();break;default:r.skipType(t&7);break}}return m};TypeEffectiveSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.TypeEffectiveSettings)return d;var m=new $root.POGOProtos.Settings.Master.TypeEffectiveSettings;if(d.attack_scalar){if(!Array.isArray(d.attack_scalar))throw TypeError(".POGOProtos.Settings.Master.TypeEffectiveSettings.attack_scalar: array expected");m.attack_scalar=[];for(var i=0;i<d.attack_scalar.length;++i){m.attack_scalar[i]=Number(d.attack_scalar[i])}}switch(d.attack_type){case"POKEMON_TYPE_NONE":case 0:m.attack_type=0;break;case"POKEMON_TYPE_NORMAL":case 1:m.attack_type=1;break;case"POKEMON_TYPE_FIGHTING":case 2:m.attack_type=2;break;case"POKEMON_TYPE_FLYING":case 3:m.attack_type=3;break;case"POKEMON_TYPE_POISON":case 4:m.attack_type=4;break;case"POKEMON_TYPE_GROUND":case 5:m.attack_type=5;break;case"POKEMON_TYPE_ROCK":case 6:m.attack_type=6;break;case"POKEMON_TYPE_BUG":case 7:m.attack_type=7;break;case"POKEMON_TYPE_GHOST":case 8:m.attack_type=8;break;case"POKEMON_TYPE_STEEL":case 9:m.attack_type=9;break;case"POKEMON_TYPE_FIRE":case 10:m.attack_type=10;break;case"POKEMON_TYPE_WATER":case 11:m.attack_type=11;break;case"POKEMON_TYPE_GRASS":case 12:m.attack_type=12;break;case"POKEMON_TYPE_ELECTRIC":case 13:m.attack_type=13;break;case"POKEMON_TYPE_PSYCHIC":case 14:m.attack_type=14;break;case"POKEMON_TYPE_ICE":case 15:m.attack_type=15;break;case"POKEMON_TYPE_DRAGON":case 16:m.attack_type=16;break;case"POKEMON_TYPE_DARK":case 17:m.attack_type=17;break;case"POKEMON_TYPE_FAIRY":case 18:m.attack_type=18;break}return m};TypeEffectiveSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.attack_scalar=[]}if(o.defaults){d.attack_type=o.enums===String?"POKEMON_TYPE_NONE":0}if(m.attack_scalar&&m.attack_scalar.length){d.attack_scalar=[];for(var j=0;j<m.attack_scalar.length;++j){d.attack_scalar[j]=o.json&&!isFinite(m.attack_scalar[j])?String(m.attack_scalar[j]):m.attack_scalar[j]}}if(m.attack_type!=null&&m.hasOwnProperty("attack_type")){d.attack_type=o.enums===String?$root.POGOProtos.Enums.PokemonType[m.attack_type]:m.attack_type}return d};TypeEffectiveSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return TypeEffectiveSettings}();Master.WeatherAffinity=function(){function WeatherAffinity(p){this.pokemon_type=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WeatherAffinity.prototype.weather_condition=0;WeatherAffinity.prototype.pokemon_type=$util.emptyArray;WeatherAffinity.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.weather_condition!=null&&m.hasOwnProperty("weather_condition"))w.uint32(8).int32(m.weather_condition);if(m.pokemon_type!=null&&m.pokemon_type.length){w.uint32(18).fork();for(var i=0;i<m.pokemon_type.length;++i)w.int32(m.pokemon_type[i]);w.ldelim()}return w};WeatherAffinity.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.WeatherAffinity;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.weather_condition=r.int32();break;case 2:if(!(m.pokemon_type&&m.pokemon_type.length))m.pokemon_type=[];if((t&7)===2){var c2=r.uint32()+r.pos;while(r.pos<c2)m.pokemon_type.push(r.int32())}else m.pokemon_type.push(r.int32());break;default:r.skipType(t&7);break}}return m};WeatherAffinity.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.WeatherAffinity)return d;var m=new $root.POGOProtos.Settings.Master.WeatherAffinity;switch(d.weather_condition){case"NONE":case 0:m.weather_condition=0;break;case"CLEAR":case 1:m.weather_condition=1;break;case"RAINY":case 2:m.weather_condition=2;break;case"PARTLY_CLOUDY":case 3:m.weather_condition=3;break;case"OVERCAST":case 4:m.weather_condition=4;break;case"WINDY":case 5:m.weather_condition=5;break;case"SNOW":case 6:m.weather_condition=6;break;case"FOG":case 7:m.weather_condition=7;break}if(d.pokemon_type){if(!Array.isArray(d.pokemon_type))throw TypeError(".POGOProtos.Settings.Master.WeatherAffinity.pokemon_type: array expected");m.pokemon_type=[];for(var i=0;i<d.pokemon_type.length;++i){switch(d.pokemon_type[i]){default:case"POKEMON_TYPE_NONE":case 0:m.pokemon_type[i]=0;break;case"POKEMON_TYPE_NORMAL":case 1:m.pokemon_type[i]=1;break;case"POKEMON_TYPE_FIGHTING":case 2:m.pokemon_type[i]=2;break;case"POKEMON_TYPE_FLYING":case 3:m.pokemon_type[i]=3;break;case"POKEMON_TYPE_POISON":case 4:m.pokemon_type[i]=4;break;case"POKEMON_TYPE_GROUND":case 5:m.pokemon_type[i]=5;break;case"POKEMON_TYPE_ROCK":case 6:m.pokemon_type[i]=6;break;case"POKEMON_TYPE_BUG":case 7:m.pokemon_type[i]=7;break;case"POKEMON_TYPE_GHOST":case 8:m.pokemon_type[i]=8;break;case"POKEMON_TYPE_STEEL":case 9:m.pokemon_type[i]=9;break;case"POKEMON_TYPE_FIRE":case 10:m.pokemon_type[i]=10;break;case"POKEMON_TYPE_WATER":case 11:m.pokemon_type[i]=11;break;case"POKEMON_TYPE_GRASS":case 12:m.pokemon_type[i]=12;break;case"POKEMON_TYPE_ELECTRIC":case 13:m.pokemon_type[i]=13;break;case"POKEMON_TYPE_PSYCHIC":case 14:m.pokemon_type[i]=14;break;case"POKEMON_TYPE_ICE":case 15:m.pokemon_type[i]=15;break;case"POKEMON_TYPE_DRAGON":case 16:m.pokemon_type[i]=16;break;case"POKEMON_TYPE_DARK":case 17:m.pokemon_type[i]=17;break;case"POKEMON_TYPE_FAIRY":case 18:m.pokemon_type[i]=18;break}}}return m};WeatherAffinity.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.pokemon_type=[]}if(o.defaults){d.weather_condition=o.enums===String?"NONE":0}if(m.weather_condition!=null&&m.hasOwnProperty("weather_condition")){d.weather_condition=o.enums===String?$root.POGOProtos.Enums.WeatherCondition[m.weather_condition]:m.weather_condition}if(m.pokemon_type&&m.pokemon_type.length){d.pokemon_type=[];for(var j=0;j<m.pokemon_type.length;++j){d.pokemon_type[j]=o.enums===String?$root.POGOProtos.Enums.PokemonType[m.pokemon_type[j]]:m.pokemon_type[j]}}return d};WeatherAffinity.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WeatherAffinity}();Master.WeatherBonus=function(){function WeatherBonus(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}WeatherBonus.prototype.cp_base_level_bonus=0;WeatherBonus.prototype.guaranteed_individual_values=0;WeatherBonus.prototype.stardust_bonus_multiplier=0;WeatherBonus.prototype.attack_bonus_multiplier=0;WeatherBonus.prototype.raid_encounter_cp_base_level_bonus=0;WeatherBonus.prototype.raid_encounter_guaranteed_individual_values=0;WeatherBonus.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.cp_base_level_bonus!=null&&m.hasOwnProperty("cp_base_level_bonus"))w.uint32(8).int32(m.cp_base_level_bonus);if(m.guaranteed_individual_values!=null&&m.hasOwnProperty("guaranteed_individual_values"))w.uint32(16).int32(m.guaranteed_individual_values);if(m.stardust_bonus_multiplier!=null&&m.hasOwnProperty("stardust_bonus_multiplier"))w.uint32(25).double(m.stardust_bonus_multiplier);if(m.attack_bonus_multiplier!=null&&m.hasOwnProperty("attack_bonus_multiplier"))w.uint32(33).double(m.attack_bonus_multiplier);if(m.raid_encounter_cp_base_level_bonus!=null&&m.hasOwnProperty("raid_encounter_cp_base_level_bonus"))w.uint32(40).int32(m.raid_encounter_cp_base_level_bonus);if(m.raid_encounter_guaranteed_individual_values!=null&&m.hasOwnProperty("raid_encounter_guaranteed_individual_values"))w.uint32(48).int32(m.raid_encounter_guaranteed_individual_values);return w};WeatherBonus.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.Master.WeatherBonus;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.cp_base_level_bonus=r.int32();break;case 2:m.guaranteed_individual_values=r.int32();break;case 3:m.stardust_bonus_multiplier=r.double();break;case 4:m.attack_bonus_multiplier=r.double();break;case 5:m.raid_encounter_cp_base_level_bonus=r.int32();break;case 6:m.raid_encounter_guaranteed_individual_values=r.int32();break;default:r.skipType(t&7);break}}return m};WeatherBonus.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.Master.WeatherBonus)return d;var m=new $root.POGOProtos.Settings.Master.WeatherBonus;if(d.cp_base_level_bonus!=null){m.cp_base_level_bonus=d.cp_base_level_bonus|0}if(d.guaranteed_individual_values!=null){m.guaranteed_individual_values=d.guaranteed_individual_values|0}if(d.stardust_bonus_multiplier!=null){m.stardust_bonus_multiplier=Number(d.stardust_bonus_multiplier)}if(d.attack_bonus_multiplier!=null){m.attack_bonus_multiplier=Number(d.attack_bonus_multiplier)}if(d.raid_encounter_cp_base_level_bonus!=null){m.raid_encounter_cp_base_level_bonus=d.raid_encounter_cp_base_level_bonus|0}if(d.raid_encounter_guaranteed_individual_values!=null){m.raid_encounter_guaranteed_individual_values=d.raid_encounter_guaranteed_individual_values|0}return m};WeatherBonus.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.cp_base_level_bonus=0;d.guaranteed_individual_values=0;d.stardust_bonus_multiplier=0;d.attack_bonus_multiplier=0;d.raid_encounter_cp_base_level_bonus=0;d.raid_encounter_guaranteed_individual_values=0}if(m.cp_base_level_bonus!=null&&m.hasOwnProperty("cp_base_level_bonus")){d.cp_base_level_bonus=m.cp_base_level_bonus}if(m.guaranteed_individual_values!=null&&m.hasOwnProperty("guaranteed_individual_values")){d.guaranteed_individual_values=m.guaranteed_individual_values}if(m.stardust_bonus_multiplier!=null&&m.hasOwnProperty("stardust_bonus_multiplier")){d.stardust_bonus_multiplier=o.json&&!isFinite(m.stardust_bonus_multiplier)?String(m.stardust_bonus_multiplier):m.stardust_bonus_multiplier}if(m.attack_bonus_multiplier!=null&&m.hasOwnProperty("attack_bonus_multiplier")){d.attack_bonus_multiplier=o.json&&!isFinite(m.attack_bonus_multiplier)?String(m.attack_bonus_multiplier):m.attack_bonus_multiplier}if(m.raid_encounter_cp_base_level_bonus!=null&&m.hasOwnProperty("raid_encounter_cp_base_level_bonus")){d.raid_encounter_cp_base_level_bonus=m.raid_encounter_cp_base_level_bonus}if(m.raid_encounter_guaranteed_individual_values!=null&&m.hasOwnProperty("raid_encounter_guaranteed_individual_values")){d.raid_encounter_guaranteed_individual_values=m.raid_encounter_guaranteed_individual_values}return d};WeatherBonus.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return WeatherBonus}();return Master}();Settings.NewsGlobalSettings=function(){function NewsGlobalSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}NewsGlobalSettings.prototype.enable_news=false;NewsGlobalSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.enable_news!=null&&m.hasOwnProperty("enable_news"))w.uint32(8).bool(m.enable_news);return w};NewsGlobalSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.NewsGlobalSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.enable_news=r.bool();break;default:r.skipType(t&7);break}}return m};NewsGlobalSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.NewsGlobalSettings)return d;var m=new $root.POGOProtos.Settings.NewsGlobalSettings;if(d.enable_news!=null){m.enable_news=Boolean(d.enable_news)}return m};NewsGlobalSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.enable_news=false}if(m.enable_news!=null&&m.hasOwnProperty("enable_news")){d.enable_news=m.enable_news}return d};NewsGlobalSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return NewsGlobalSettings}();Settings.NewsSettings=function(){function NewsSettings(p){this.news=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}NewsSettings.prototype.news=$util.emptyArray;NewsSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.news!=null&&m.news.length){for(var i=0;i<m.news.length;++i)$root.POGOProtos.Settings.NewsSettings.News.encode(m.news[i],w.uint32(10).fork()).ldelim()}return w};NewsSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.NewsSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.news&&m.news.length))m.news=[];m.news.push($root.POGOProtos.Settings.NewsSettings.News.decode(r,r.uint32()));break;default:r.skipType(t&7);break}}return m};NewsSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.NewsSettings)return d;var m=new $root.POGOProtos.Settings.NewsSettings;if(d.news){if(!Array.isArray(d.news))throw TypeError(".POGOProtos.Settings.NewsSettings.news: array expected");m.news=[];for(var i=0;i<d.news.length;++i){if(typeof d.news[i]!=="object")throw TypeError(".POGOProtos.Settings.NewsSettings.news: object expected");m.news[i]=$root.POGOProtos.Settings.NewsSettings.News.fromObject(d.news[i])}}return m};NewsSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.news=[]}if(m.news&&m.news.length){d.news=[];for(var j=0;j<m.news.length;++j){d.news[j]=$root.POGOProtos.Settings.NewsSettings.News.toObject(m.news[j],o)}}return d};NewsSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};NewsSettings.News=function(){function News(p){this.exclusive_countries=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}News.prototype.news_bundle_id="";News.prototype.exclusive_countries=$util.emptyArray;News.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.news_bundle_id!=null&&m.hasOwnProperty("news_bundle_id"))w.uint32(10).string(m.news_bundle_id);if(m.exclusive_countries!=null&&m.exclusive_countries.length){for(var i=0;i<m.exclusive_countries.length;++i)w.uint32(18).string(m.exclusive_countries[i])}return w};News.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.NewsSettings.News;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.news_bundle_id=r.string();break;case 2:if(!(m.exclusive_countries&&m.exclusive_countries.length))m.exclusive_countries=[];m.exclusive_countries.push(r.string());break;default:r.skipType(t&7);break}}return m};News.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.NewsSettings.News)return d;var m=new $root.POGOProtos.Settings.NewsSettings.News;if(d.news_bundle_id!=null){m.news_bundle_id=String(d.news_bundle_id)}if(d.exclusive_countries){if(!Array.isArray(d.exclusive_countries))throw TypeError(".POGOProtos.Settings.NewsSettings.News.exclusive_countries: array expected");m.exclusive_countries=[];for(var i=0;i<d.exclusive_countries.length;++i){m.exclusive_countries[i]=String(d.exclusive_countries[i])}}return m};News.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.exclusive_countries=[]}if(o.defaults){d.news_bundle_id=""}if(m.news_bundle_id!=null&&m.hasOwnProperty("news_bundle_id")){d.news_bundle_id=m.news_bundle_id}if(m.exclusive_countries&&m.exclusive_countries.length){d.exclusive_countries=[];for(var j=0;j<m.exclusive_countries.length;++j){d.exclusive_countries[j]=m.exclusive_countries[j]}}return d};News.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return News}();return NewsSettings}();Settings.NotificationSettings=function(){function NotificationSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}NotificationSettings.prototype.pull_notifications=false;NotificationSettings.prototype.show_notifications=false;NotificationSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.pull_notifications!=null&&m.hasOwnProperty("pull_notifications"))w.uint32(8).bool(m.pull_notifications);if(m.show_notifications!=null&&m.hasOwnProperty("show_notifications"))w.uint32(16).bool(m.show_notifications);return w};NotificationSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.NotificationSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.pull_notifications=r.bool();break;case 2:m.show_notifications=r.bool();break;default:r.skipType(t&7);break}}return m};NotificationSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.NotificationSettings)return d;var m=new $root.POGOProtos.Settings.NotificationSettings;if(d.pull_notifications!=null){m.pull_notifications=Boolean(d.pull_notifications)}if(d.show_notifications!=null){m.show_notifications=Boolean(d.show_notifications)}return m};NotificationSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.pull_notifications=false;d.show_notifications=false}if(m.pull_notifications!=null&&m.hasOwnProperty("pull_notifications")){d.pull_notifications=m.pull_notifications}if(m.show_notifications!=null&&m.hasOwnProperty("show_notifications")){d.show_notifications=m.show_notifications}return d};NotificationSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return NotificationSettings}();Settings.PasscodeSettings=function(){function PasscodeSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PasscodeSettings.prototype.show_passcode_in_store=false;PasscodeSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.show_passcode_in_store!=null&&m.hasOwnProperty("show_passcode_in_store"))w.uint32(8).bool(m.show_passcode_in_store);return w};PasscodeSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.PasscodeSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.show_passcode_in_store=r.bool();break;default:r.skipType(t&7);break}}return m};PasscodeSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.PasscodeSettings)return d;var m=new $root.POGOProtos.Settings.PasscodeSettings;if(d.show_passcode_in_store!=null){m.show_passcode_in_store=Boolean(d.show_passcode_in_store)}return m};PasscodeSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.show_passcode_in_store=false}if(m.show_passcode_in_store!=null&&m.hasOwnProperty("show_passcode_in_store")){d.show_passcode_in_store=m.show_passcode_in_store}return d};PasscodeSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PasscodeSettings}();Settings.PoiGlobalSettings=function(){function PoiGlobalSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PoiGlobalSettings.prototype.is_enabled=false;PoiGlobalSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.is_enabled!=null&&m.hasOwnProperty("is_enabled"))w.uint32(8).bool(m.is_enabled);return w};PoiGlobalSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.PoiGlobalSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.is_enabled=r.bool();break;default:r.skipType(t&7);break}}return m};PoiGlobalSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.PoiGlobalSettings)return d;var m=new $root.POGOProtos.Settings.PoiGlobalSettings;if(d.is_enabled!=null){m.is_enabled=Boolean(d.is_enabled)}return m};PoiGlobalSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.is_enabled=false}if(m.is_enabled!=null&&m.hasOwnProperty("is_enabled")){d.is_enabled=m.is_enabled}return d};PoiGlobalSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PoiGlobalSettings}();Settings.PokecoinPurchaseDisplaySettings=function(){function PokecoinPurchaseDisplaySettings(p){this.enabled_countries=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}PokecoinPurchaseDisplaySettings.prototype.feature_enabled=false;PokecoinPurchaseDisplaySettings.prototype.enabled_countries=$util.emptyArray;PokecoinPurchaseDisplaySettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.feature_enabled!=null&&m.hasOwnProperty("feature_enabled"))w.uint32(8).bool(m.feature_enabled);if(m.enabled_countries!=null&&m.enabled_countries.length){for(var i=0;i<m.enabled_countries.length;++i)w.uint32(18).string(m.enabled_countries[i])}return w};PokecoinPurchaseDisplaySettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.PokecoinPurchaseDisplaySettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.feature_enabled=r.bool();break;case 2:if(!(m.enabled_countries&&m.enabled_countries.length))m.enabled_countries=[];m.enabled_countries.push(r.string());break;default:r.skipType(t&7);break}}return m};PokecoinPurchaseDisplaySettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.PokecoinPurchaseDisplaySettings)return d;var m=new $root.POGOProtos.Settings.PokecoinPurchaseDisplaySettings;if(d.feature_enabled!=null){m.feature_enabled=Boolean(d.feature_enabled)}if(d.enabled_countries){if(!Array.isArray(d.enabled_countries))throw TypeError(".POGOProtos.Settings.PokecoinPurchaseDisplaySettings.enabled_countries: array expected");m.enabled_countries=[];for(var i=0;i<d.enabled_countries.length;++i){m.enabled_countries[i]=String(d.enabled_countries[i])}}return m};PokecoinPurchaseDisplaySettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.enabled_countries=[]}if(o.defaults){d.feature_enabled=false}if(m.feature_enabled!=null&&m.hasOwnProperty("feature_enabled")){d.feature_enabled=m.feature_enabled}if(m.enabled_countries&&m.enabled_countries.length){d.enabled_countries=[];for(var j=0;j<m.enabled_countries.length;++j){d.enabled_countries[j]=m.enabled_countries[j]}}return d};PokecoinPurchaseDisplaySettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return PokecoinPurchaseDisplaySettings}();Settings.ProbeSettings=function(){function ProbeSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ProbeSettings.prototype.enable_sidechannel=false;ProbeSettings.prototype.enable_adhoc=false;ProbeSettings.prototype.adhoc_frequency_sec=0;ProbeSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.enable_sidechannel!=null&&m.hasOwnProperty("enable_sidechannel"))w.uint32(8).bool(m.enable_sidechannel);if(m.enable_adhoc!=null&&m.hasOwnProperty("enable_adhoc"))w.uint32(16).bool(m.enable_adhoc);if(m.adhoc_frequency_sec!=null&&m.hasOwnProperty("adhoc_frequency_sec"))w.uint32(24).int32(m.adhoc_frequency_sec);return w};ProbeSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.ProbeSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.enable_sidechannel=r.bool();break;case 2:m.enable_adhoc=r.bool();break;case 3:m.adhoc_frequency_sec=r.int32();break;default:r.skipType(t&7);break}}return m};ProbeSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.ProbeSettings)return d;var m=new $root.POGOProtos.Settings.ProbeSettings;if(d.enable_sidechannel!=null){m.enable_sidechannel=Boolean(d.enable_sidechannel)}if(d.enable_adhoc!=null){m.enable_adhoc=Boolean(d.enable_adhoc)}if(d.adhoc_frequency_sec!=null){m.adhoc_frequency_sec=d.adhoc_frequency_sec|0}return m};ProbeSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.enable_sidechannel=false;d.enable_adhoc=false;d.adhoc_frequency_sec=0}if(m.enable_sidechannel!=null&&m.hasOwnProperty("enable_sidechannel")){d.enable_sidechannel=m.enable_sidechannel}if(m.enable_adhoc!=null&&m.hasOwnProperty("enable_adhoc")){d.enable_adhoc=m.enable_adhoc}if(m.adhoc_frequency_sec!=null&&m.hasOwnProperty("adhoc_frequency_sec")){d.adhoc_frequency_sec=m.adhoc_frequency_sec}return d};ProbeSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ProbeSettings}();Settings.QuestGlobalSettings=function(){function QuestGlobalSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}QuestGlobalSettings.prototype.enable_quests=false;QuestGlobalSettings.prototype.max_challenge_quests=0;QuestGlobalSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.enable_quests!=null&&m.hasOwnProperty("enable_quests"))w.uint32(8).bool(m.enable_quests);if(m.max_challenge_quests!=null&&m.hasOwnProperty("max_challenge_quests"))w.uint32(16).int32(m.max_challenge_quests);return w};QuestGlobalSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.QuestGlobalSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.enable_quests=r.bool();break;case 2:m.max_challenge_quests=r.int32();break;default:r.skipType(t&7);break}}return m};QuestGlobalSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.QuestGlobalSettings)return d;var m=new $root.POGOProtos.Settings.QuestGlobalSettings;if(d.enable_quests!=null){m.enable_quests=Boolean(d.enable_quests)}if(d.max_challenge_quests!=null){m.max_challenge_quests=d.max_challenge_quests|0}return m};QuestGlobalSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.enable_quests=false;d.max_challenge_quests=0}if(m.enable_quests!=null&&m.hasOwnProperty("enable_quests")){d.enable_quests=m.enable_quests}if(m.max_challenge_quests!=null&&m.hasOwnProperty("max_challenge_quests")){d.max_challenge_quests=m.max_challenge_quests}return d};QuestGlobalSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return QuestGlobalSettings}();Settings.SfidaSettings=function(){function SfidaSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SfidaSettings.prototype.low_battery_threshold=0;SfidaSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.low_battery_threshold!=null&&m.hasOwnProperty("low_battery_threshold"))w.uint32(13).float(m.low_battery_threshold);return w};SfidaSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.SfidaSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.low_battery_threshold=r.float();break;default:r.skipType(t&7);break}}return m};SfidaSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.SfidaSettings)return d;var m=new $root.POGOProtos.Settings.SfidaSettings;if(d.low_battery_threshold!=null){m.low_battery_threshold=Number(d.low_battery_threshold)}return m};SfidaSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.low_battery_threshold=0}if(m.low_battery_threshold!=null&&m.hasOwnProperty("low_battery_threshold")){d.low_battery_threshold=o.json&&!isFinite(m.low_battery_threshold)?String(m.low_battery_threshold):m.low_battery_threshold}return d};SfidaSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SfidaSettings}();Settings.SocialClientSettings=function(){function SocialClientSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SocialClientSettings.prototype.enable_social=false;SocialClientSettings.prototype.max_friend_details=0;SocialClientSettings.prototype.player_level_gate=0;SocialClientSettings.prototype.max_friend_nickname_length=0;SocialClientSettings.prototype.enable_add_friend_via_qr_code=false;SocialClientSettings.prototype.enable_share_ex_pass=false;SocialClientSettings.prototype.enable_facebook_friends=false;SocialClientSettings.prototype.facebook_friend_limit_per_request=0;SocialClientSettings.prototype.disable_facebook_friends_opening_prompt=false;SocialClientSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.enable_social!=null&&m.hasOwnProperty("enable_social"))w.uint32(8).bool(m.enable_social);if(m.max_friend_details!=null&&m.hasOwnProperty("max_friend_details"))w.uint32(16).int32(m.max_friend_details);if(m.player_level_gate!=null&&m.hasOwnProperty("player_level_gate"))w.uint32(24).int32(m.player_level_gate);if(m.max_friend_nickname_length!=null&&m.hasOwnProperty("max_friend_nickname_length"))w.uint32(32).int32(m.max_friend_nickname_length);if(m.enable_add_friend_via_qr_code!=null&&m.hasOwnProperty("enable_add_friend_via_qr_code"))w.uint32(40).bool(m.enable_add_friend_via_qr_code);if(m.enable_share_ex_pass!=null&&m.hasOwnProperty("enable_share_ex_pass"))w.uint32(48).bool(m.enable_share_ex_pass);if(m.enable_facebook_friends!=null&&m.hasOwnProperty("enable_facebook_friends"))w.uint32(56).bool(m.enable_facebook_friends);if(m.facebook_friend_limit_per_request!=null&&m.hasOwnProperty("facebook_friend_limit_per_request"))w.uint32(64).int32(m.facebook_friend_limit_per_request);if(m.disable_facebook_friends_opening_prompt!=null&&m.hasOwnProperty("disable_facebook_friends_opening_prompt"))w.uint32(72).bool(m.disable_facebook_friends_opening_prompt);return w};SocialClientSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.SocialClientSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.enable_social=r.bool();break;case 2:m.max_friend_details=r.int32();break;case 3:m.player_level_gate=r.int32();break;case 4:m.max_friend_nickname_length=r.int32();break;case 5:m.enable_add_friend_via_qr_code=r.bool();break;case 6:m.enable_share_ex_pass=r.bool();break;case 7:m.enable_facebook_friends=r.bool();break;case 8:m.facebook_friend_limit_per_request=r.int32();break;case 9:m.disable_facebook_friends_opening_prompt=r.bool();break;default:r.skipType(t&7);break}}return m};SocialClientSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.SocialClientSettings)return d;var m=new $root.POGOProtos.Settings.SocialClientSettings;if(d.enable_social!=null){m.enable_social=Boolean(d.enable_social)}if(d.max_friend_details!=null){m.max_friend_details=d.max_friend_details|0}if(d.player_level_gate!=null){m.player_level_gate=d.player_level_gate|0}if(d.max_friend_nickname_length!=null){m.max_friend_nickname_length=d.max_friend_nickname_length|0}if(d.enable_add_friend_via_qr_code!=null){m.enable_add_friend_via_qr_code=Boolean(d.enable_add_friend_via_qr_code)}if(d.enable_share_ex_pass!=null){m.enable_share_ex_pass=Boolean(d.enable_share_ex_pass)}if(d.enable_facebook_friends!=null){m.enable_facebook_friends=Boolean(d.enable_facebook_friends)}if(d.facebook_friend_limit_per_request!=null){m.facebook_friend_limit_per_request=d.facebook_friend_limit_per_request|0}if(d.disable_facebook_friends_opening_prompt!=null){m.disable_facebook_friends_opening_prompt=Boolean(d.disable_facebook_friends_opening_prompt)}return m};SocialClientSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.enable_social=false;d.max_friend_details=0;d.player_level_gate=0;d.max_friend_nickname_length=0;d.enable_add_friend_via_qr_code=false;d.enable_share_ex_pass=false;d.enable_facebook_friends=false;d.facebook_friend_limit_per_request=0;d.disable_facebook_friends_opening_prompt=false}if(m.enable_social!=null&&m.hasOwnProperty("enable_social")){d.enable_social=m.enable_social}if(m.max_friend_details!=null&&m.hasOwnProperty("max_friend_details")){d.max_friend_details=m.max_friend_details}if(m.player_level_gate!=null&&m.hasOwnProperty("player_level_gate")){d.player_level_gate=m.player_level_gate}if(m.max_friend_nickname_length!=null&&m.hasOwnProperty("max_friend_nickname_length")){d.max_friend_nickname_length=m.max_friend_nickname_length}if(m.enable_add_friend_via_qr_code!=null&&m.hasOwnProperty("enable_add_friend_via_qr_code")){d.enable_add_friend_via_qr_code=m.enable_add_friend_via_qr_code}if(m.enable_share_ex_pass!=null&&m.hasOwnProperty("enable_share_ex_pass")){d.enable_share_ex_pass=m.enable_share_ex_pass}if(m.enable_facebook_friends!=null&&m.hasOwnProperty("enable_facebook_friends")){d.enable_facebook_friends=m.enable_facebook_friends}if(m.facebook_friend_limit_per_request!=null&&m.hasOwnProperty("facebook_friend_limit_per_request")){d.facebook_friend_limit_per_request=m.facebook_friend_limit_per_request}if(m.disable_facebook_friends_opening_prompt!=null&&m.hasOwnProperty("disable_facebook_friends_opening_prompt")){d.disable_facebook_friends_opening_prompt=m.disable_facebook_friends_opening_prompt}return d};SocialClientSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SocialClientSettings}();Settings.SocialGiftCountTelemetry=function(){function SocialGiftCountTelemetry(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}SocialGiftCountTelemetry.prototype.unopened_gift_count=0;SocialGiftCountTelemetry.prototype.unsent_gift_count=0;SocialGiftCountTelemetry.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.unopened_gift_count!=null&&m.hasOwnProperty("unopened_gift_count"))w.uint32(8).int32(m.unopened_gift_count);if(m.unsent_gift_count!=null&&m.hasOwnProperty("unsent_gift_count"))w.uint32(16).int32(m.unsent_gift_count);return w};SocialGiftCountTelemetry.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.SocialGiftCountTelemetry;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.unopened_gift_count=r.int32();break;case 2:m.unsent_gift_count=r.int32();break;default:r.skipType(t&7);break}}return m};SocialGiftCountTelemetry.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.SocialGiftCountTelemetry)return d;var m=new $root.POGOProtos.Settings.SocialGiftCountTelemetry;if(d.unopened_gift_count!=null){m.unopened_gift_count=d.unopened_gift_count|0}if(d.unsent_gift_count!=null){m.unsent_gift_count=d.unsent_gift_count|0}return m};SocialGiftCountTelemetry.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.unopened_gift_count=0;d.unsent_gift_count=0}if(m.unopened_gift_count!=null&&m.hasOwnProperty("unopened_gift_count")){d.unopened_gift_count=m.unopened_gift_count}if(m.unsent_gift_count!=null&&m.hasOwnProperty("unsent_gift_count")){d.unsent_gift_count=m.unsent_gift_count}return d};SocialGiftCountTelemetry.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return SocialGiftCountTelemetry}();Settings.TelemetryGlobalSettings=function(){function TelemetryGlobalSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}TelemetryGlobalSettings.prototype.enabled=false;TelemetryGlobalSettings.prototype.session_sampling_fraction=0;TelemetryGlobalSettings.prototype.max_buffer_size_kb=0;TelemetryGlobalSettings.prototype.batch_size=0;TelemetryGlobalSettings.prototype.update_interval_ms=$util.Long?$util.Long.fromBits(0,0,false):0;TelemetryGlobalSettings.prototype.frame_rate_sample_interval_ms=$util.Long?$util.Long.fromBits(0,0,false):0;TelemetryGlobalSettings.prototype.frame_rate_sample_period_ms=$util.Long?$util.Long.fromBits(0,0,false):0;TelemetryGlobalSettings.prototype.enable_omni_wrapper_sending=false;TelemetryGlobalSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.enabled!=null&&m.hasOwnProperty("enabled"))w.uint32(8).bool(m.enabled);if(m.session_sampling_fraction!=null&&m.hasOwnProperty("session_sampling_fraction"))w.uint32(17).double(m.session_sampling_fraction);if(m.max_buffer_size_kb!=null&&m.hasOwnProperty("max_buffer_size_kb"))w.uint32(24).int32(m.max_buffer_size_kb);if(m.batch_size!=null&&m.hasOwnProperty("batch_size"))w.uint32(32).int32(m.batch_size);if(m.update_interval_ms!=null&&m.hasOwnProperty("update_interval_ms"))w.uint32(40).int64(m.update_interval_ms);if(m.frame_rate_sample_interval_ms!=null&&m.hasOwnProperty("frame_rate_sample_interval_ms"))w.uint32(48).int64(m.frame_rate_sample_interval_ms);if(m.frame_rate_sample_period_ms!=null&&m.hasOwnProperty("frame_rate_sample_period_ms"))w.uint32(56).int64(m.frame_rate_sample_period_ms);if(m.enable_omni_wrapper_sending!=null&&m.hasOwnProperty("enable_omni_wrapper_sending"))w.uint32(64).bool(m.enable_omni_wrapper_sending);return w};TelemetryGlobalSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.TelemetryGlobalSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.enabled=r.bool();break;case 2:m.session_sampling_fraction=r.double();break;case 3:m.max_buffer_size_kb=r.int32();break;case 4:m.batch_size=r.int32();break;case 5:m.update_interval_ms=r.int64();break;case 6:m.frame_rate_sample_interval_ms=r.int64();break;case 7:m.frame_rate_sample_period_ms=r.int64();break;case 8:m.enable_omni_wrapper_sending=r.bool();break;default:r.skipType(t&7);break}}return m};TelemetryGlobalSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.TelemetryGlobalSettings)return d;var m=new $root.POGOProtos.Settings.TelemetryGlobalSettings;if(d.enabled!=null){m.enabled=Boolean(d.enabled)}if(d.session_sampling_fraction!=null){m.session_sampling_fraction=Number(d.session_sampling_fraction)}if(d.max_buffer_size_kb!=null){m.max_buffer_size_kb=d.max_buffer_size_kb|0}if(d.batch_size!=null){m.batch_size=d.batch_size|0}if(d.update_interval_ms!=null){if($util.Long)(m.update_interval_ms=$util.Long.fromValue(d.update_interval_ms)).unsigned=false;else if(typeof d.update_interval_ms==="string")m.update_interval_ms=parseInt(d.update_interval_ms,10);else if(typeof d.update_interval_ms==="number")m.update_interval_ms=d.update_interval_ms;else if(typeof d.update_interval_ms==="object")m.update_interval_ms=new $util.LongBits(d.update_interval_ms.low>>>0,d.update_interval_ms.high>>>0).toNumber()}if(d.frame_rate_sample_interval_ms!=null){if($util.Long)(m.frame_rate_sample_interval_ms=$util.Long.fromValue(d.frame_rate_sample_interval_ms)).unsigned=false;else if(typeof d.frame_rate_sample_interval_ms==="string")m.frame_rate_sample_interval_ms=parseInt(d.frame_rate_sample_interval_ms,10);else if(typeof d.frame_rate_sample_interval_ms==="number")m.frame_rate_sample_interval_ms=d.frame_rate_sample_interval_ms;else if(typeof d.frame_rate_sample_interval_ms==="object")m.frame_rate_sample_interval_ms=new $util.LongBits(d.frame_rate_sample_interval_ms.low>>>0,d.frame_rate_sample_interval_ms.high>>>0).toNumber()}if(d.frame_rate_sample_period_ms!=null){if($util.Long)(m.frame_rate_sample_period_ms=$util.Long.fromValue(d.frame_rate_sample_period_ms)).unsigned=false;else if(typeof d.frame_rate_sample_period_ms==="string")m.frame_rate_sample_period_ms=parseInt(d.frame_rate_sample_period_ms,10);else if(typeof d.frame_rate_sample_period_ms==="number")m.frame_rate_sample_period_ms=d.frame_rate_sample_period_ms;else if(typeof d.frame_rate_sample_period_ms==="object")m.frame_rate_sample_period_ms=new $util.LongBits(d.frame_rate_sample_period_ms.low>>>0,d.frame_rate_sample_period_ms.high>>>0).toNumber()}if(d.enable_omni_wrapper_sending!=null){m.enable_omni_wrapper_sending=Boolean(d.enable_omni_wrapper_sending)}return m};TelemetryGlobalSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.enabled=false;d.session_sampling_fraction=0;d.max_buffer_size_kb=0;d.batch_size=0;if($util.Long){var n=new $util.Long(0,0,false);d.update_interval_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.update_interval_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.frame_rate_sample_interval_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.frame_rate_sample_interval_ms=o.longs===String?"0":0;if($util.Long){var n=new $util.Long(0,0,false);d.frame_rate_sample_period_ms=o.longs===String?n.toString():o.longs===Number?n.toNumber():n}else d.frame_rate_sample_period_ms=o.longs===String?"0":0;d.enable_omni_wrapper_sending=false}if(m.enabled!=null&&m.hasOwnProperty("enabled")){d.enabled=m.enabled}if(m.session_sampling_fraction!=null&&m.hasOwnProperty("session_sampling_fraction")){d.session_sampling_fraction=o.json&&!isFinite(m.session_sampling_fraction)?String(m.session_sampling_fraction):m.session_sampling_fraction}if(m.max_buffer_size_kb!=null&&m.hasOwnProperty("max_buffer_size_kb")){d.max_buffer_size_kb=m.max_buffer_size_kb}if(m.batch_size!=null&&m.hasOwnProperty("batch_size")){d.batch_size=m.batch_size}if(m.update_interval_ms!=null&&m.hasOwnProperty("update_interval_ms")){if(typeof m.update_interval_ms==="number")d.update_interval_ms=o.longs===String?String(m.update_interval_ms):m.update_interval_ms;else d.update_interval_ms=o.longs===String?$util.Long.prototype.toString.call(m.update_interval_ms):o.longs===Number?new $util.LongBits(m.update_interval_ms.low>>>0,m.update_interval_ms.high>>>0).toNumber():m.update_interval_ms}if(m.frame_rate_sample_interval_ms!=null&&m.hasOwnProperty("frame_rate_sample_interval_ms")){if(typeof m.frame_rate_sample_interval_ms==="number")d.frame_rate_sample_interval_ms=o.longs===String?String(m.frame_rate_sample_interval_ms):m.frame_rate_sample_interval_ms;else d.frame_rate_sample_interval_ms=o.longs===String?$util.Long.prototype.toString.call(m.frame_rate_sample_interval_ms):o.longs===Number?new $util.LongBits(m.frame_rate_sample_interval_ms.low>>>0,m.frame_rate_sample_interval_ms.high>>>0).toNumber():m.frame_rate_sample_interval_ms}if(m.frame_rate_sample_period_ms!=null&&m.hasOwnProperty("frame_rate_sample_period_ms")){if(typeof m.frame_rate_sample_period_ms==="number")d.frame_rate_sample_period_ms=o.longs===String?String(m.frame_rate_sample_period_ms):m.frame_rate_sample_period_ms;else d.frame_rate_sample_period_ms=o.longs===String?$util.Long.prototype.toString.call(m.frame_rate_sample_period_ms):o.longs===Number?new $util.LongBits(m.frame_rate_sample_period_ms.low>>>0,m.frame_rate_sample_period_ms.high>>>0).toNumber():m.frame_rate_sample_period_ms}if(m.enable_omni_wrapper_sending!=null&&m.hasOwnProperty("enable_omni_wrapper_sending")){d.enable_omni_wrapper_sending=m.enable_omni_wrapper_sending}return d};TelemetryGlobalSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return TelemetryGlobalSettings}();Settings.ThirdMoveGlobalSettings=function(){function ThirdMoveGlobalSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}ThirdMoveGlobalSettings.prototype.unlock_enabled=false;ThirdMoveGlobalSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.unlock_enabled!=null&&m.hasOwnProperty("unlock_enabled"))w.uint32(8).bool(m.unlock_enabled);return w};ThirdMoveGlobalSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.ThirdMoveGlobalSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.unlock_enabled=r.bool();break;default:r.skipType(t&7);break}}return m};ThirdMoveGlobalSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.ThirdMoveGlobalSettings)return d;var m=new $root.POGOProtos.Settings.ThirdMoveGlobalSettings;if(d.unlock_enabled!=null){m.unlock_enabled=Boolean(d.unlock_enabled)}return m};ThirdMoveGlobalSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.unlock_enabled=false}if(m.unlock_enabled!=null&&m.hasOwnProperty("unlock_enabled")){d.unlock_enabled=m.unlock_enabled}return d};ThirdMoveGlobalSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return ThirdMoveGlobalSettings}();Settings.TradingGlobalSettings=function(){function TradingGlobalSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}TradingGlobalSettings.prototype.enable_trading=false;TradingGlobalSettings.prototype.min_player_level=0;TradingGlobalSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.enable_trading!=null&&m.hasOwnProperty("enable_trading"))w.uint32(8).bool(m.enable_trading);if(m.min_player_level!=null&&m.hasOwnProperty("min_player_level"))w.uint32(16).uint32(m.min_player_level);return w};TradingGlobalSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.TradingGlobalSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.enable_trading=r.bool();break;case 2:m.min_player_level=r.uint32();break;default:r.skipType(t&7);break}}return m};TradingGlobalSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.TradingGlobalSettings)return d;var m=new $root.POGOProtos.Settings.TradingGlobalSettings;if(d.enable_trading!=null){m.enable_trading=Boolean(d.enable_trading)}if(d.min_player_level!=null){m.min_player_level=d.min_player_level>>>0}return m};TradingGlobalSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.enable_trading=false;d.min_player_level=0}if(m.enable_trading!=null&&m.hasOwnProperty("enable_trading")){d.enable_trading=m.enable_trading}if(m.min_player_level!=null&&m.hasOwnProperty("min_player_level")){d.min_player_level=m.min_player_level}return d};TradingGlobalSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return TradingGlobalSettings}();Settings.TranslationSettings=function(){function TranslationSettings(p){this.translation_bundle_ids=[];if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}TranslationSettings.prototype.translation_bundle_ids=$util.emptyArray;TranslationSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.translation_bundle_ids!=null&&m.translation_bundle_ids.length){for(var i=0;i<m.translation_bundle_ids.length;++i)w.uint32(10).string(m.translation_bundle_ids[i])}return w};TranslationSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.TranslationSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:if(!(m.translation_bundle_ids&&m.translation_bundle_ids.length))m.translation_bundle_ids=[];m.translation_bundle_ids.push(r.string());break;default:r.skipType(t&7);break}}return m};TranslationSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.TranslationSettings)return d;var m=new $root.POGOProtos.Settings.TranslationSettings;if(d.translation_bundle_ids){if(!Array.isArray(d.translation_bundle_ids))throw TypeError(".POGOProtos.Settings.TranslationSettings.translation_bundle_ids: array expected");m.translation_bundle_ids=[];for(var i=0;i<d.translation_bundle_ids.length;++i){m.translation_bundle_ids[i]=String(d.translation_bundle_ids[i])}}return m};TranslationSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.arrays||o.defaults){d.translation_bundle_ids=[]}if(m.translation_bundle_ids&&m.translation_bundle_ids.length){d.translation_bundle_ids=[];for(var j=0;j<m.translation_bundle_ids.length;++j){d.translation_bundle_ids[j]=m.translation_bundle_ids[j]}}return d};TranslationSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return TranslationSettings}();Settings.UpsightLoggingSettings=function(){function UpsightLoggingSettings(p){if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)this[ks[i]]=p[ks[i]]}UpsightLoggingSettings.prototype.use_verbose_logging=false;UpsightLoggingSettings.prototype.logging_percentage=0;UpsightLoggingSettings.prototype.disable_logging=false;UpsightLoggingSettings.encode=function encode(m,w){if(!w)w=$Writer.create();if(m.use_verbose_logging!=null&&m.hasOwnProperty("use_verbose_logging"))w.uint32(8).bool(m.use_verbose_logging);if(m.logging_percentage!=null&&m.hasOwnProperty("logging_percentage"))w.uint32(16).int32(m.logging_percentage);if(m.disable_logging!=null&&m.hasOwnProperty("disable_logging"))w.uint32(24).bool(m.disable_logging);return w};UpsightLoggingSettings.decode=function decode(r,l){if(!(r instanceof $Reader))r=$Reader.create(r);var c=l===undefined?r.len:r.pos+l,m=new $root.POGOProtos.Settings.UpsightLoggingSettings;while(r.pos<c){var t=r.uint32();switch(t>>>3){case 1:m.use_verbose_logging=r.bool();break;case 2:m.logging_percentage=r.int32();break;case 3:m.disable_logging=r.bool();break;default:r.skipType(t&7);break}}return m};UpsightLoggingSettings.fromObject=function fromObject(d){if(d instanceof $root.POGOProtos.Settings.UpsightLoggingSettings)return d;var m=new $root.POGOProtos.Settings.UpsightLoggingSettings;if(d.use_verbose_logging!=null){m.use_verbose_logging=Boolean(d.use_verbose_logging)}if(d.logging_percentage!=null){m.logging_percentage=d.logging_percentage|0}if(d.disable_logging!=null){m.disable_logging=Boolean(d.disable_logging)}return m};UpsightLoggingSettings.toObject=function toObject(m,o){if(!o)o={};var d={};if(o.defaults){d.use_verbose_logging=false;d.logging_percentage=0;d.disable_logging=false}if(m.use_verbose_logging!=null&&m.hasOwnProperty("use_verbose_logging")){d.use_verbose_logging=m.use_verbose_logging}if(m.logging_percentage!=null&&m.hasOwnProperty("logging_percentage")){d.logging_percentage=m.logging_percentage}if(m.disable_logging!=null&&m.hasOwnProperty("disable_logging")){d.disable_logging=m.disable_logging}return d};UpsightLoggingSettings.prototype.toJSON=function toJSON(){return this.constructor.toObject(this,$protobuf.util.toJSONOptions)};return UpsightLoggingSettings}();return Settings}();return POGOProtos}();return $root});
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/pogo-protos/index.js":
|
||
/*!*******************************************!*\
|
||
!*** ./node_modules/pogo-protos/index.js ***!
|
||
\*******************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
module.exports = __webpack_require__(/*! ./compiled.js */ "./node_modules/pogo-protos/compiled.js").POGOProtos;
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/prop-types/checkPropTypes.js":
|
||
/*!***************************************************!*\
|
||
!*** ./node_modules/prop-types/checkPropTypes.js ***!
|
||
\***************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
var printWarning = function() {};
|
||
|
||
if (true) {
|
||
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
|
||
var loggedTypeFailures = {};
|
||
|
||
printWarning = function(text) {
|
||
var message = 'Warning: ' + text;
|
||
if (typeof console !== 'undefined') {
|
||
console.error(message);
|
||
}
|
||
try {
|
||
// --- Welcome to debugging React ---
|
||
// This error was thrown as a convenience so that you can use this stack
|
||
// to find the callsite that caused this warning to fire.
|
||
throw new Error(message);
|
||
} catch (x) {}
|
||
};
|
||
}
|
||
|
||
/**
|
||
* Assert that the values match with the type specs.
|
||
* Error messages are memorized and will only be shown once.
|
||
*
|
||
* @param {object} typeSpecs Map of name to a ReactPropType
|
||
* @param {object} values Runtime values that need to be type-checked
|
||
* @param {string} location e.g. "prop", "context", "child context"
|
||
* @param {string} componentName Name of the component for error messages.
|
||
* @param {?Function} getStack Returns the component stack.
|
||
* @private
|
||
*/
|
||
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
||
if (true) {
|
||
for (var typeSpecName in typeSpecs) {
|
||
if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
||
var error;
|
||
// Prop type validation may throw. In case they do, we don't want to
|
||
// fail the render phase where it didn't fail before. So we log it.
|
||
// After these have been cleaned up, we'll let them throw.
|
||
try {
|
||
// This is intentionally an invariant that gets caught. It's the same
|
||
// behavior as without this statement except with a better message.
|
||
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
||
var err = Error(
|
||
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
||
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
||
);
|
||
err.name = 'Invariant Violation';
|
||
throw err;
|
||
}
|
||
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
||
} catch (ex) {
|
||
error = ex;
|
||
}
|
||
if (error && !(error instanceof Error)) {
|
||
printWarning(
|
||
(componentName || 'React class') + ': type specification of ' +
|
||
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
||
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
||
'You may have forgotten to pass an argument to the type checker ' +
|
||
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
||
'shape all require an argument).'
|
||
)
|
||
|
||
}
|
||
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
||
// Only monitor this failure once because there tends to be a lot of the
|
||
// same error.
|
||
loggedTypeFailures[error.message] = true;
|
||
|
||
var stack = getStack ? getStack() : '';
|
||
|
||
printWarning(
|
||
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
||
);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
module.exports = checkPropTypes;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
|
||
/*!************************************************************!*\
|
||
!*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
|
||
\************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
|
||
|
||
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
|
||
var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
|
||
|
||
var printWarning = function() {};
|
||
|
||
if (true) {
|
||
printWarning = function(text) {
|
||
var message = 'Warning: ' + text;
|
||
if (typeof console !== 'undefined') {
|
||
console.error(message);
|
||
}
|
||
try {
|
||
// --- Welcome to debugging React ---
|
||
// This error was thrown as a convenience so that you can use this stack
|
||
// to find the callsite that caused this warning to fire.
|
||
throw new Error(message);
|
||
} catch (x) {}
|
||
};
|
||
}
|
||
|
||
function emptyFunctionThatReturnsNull() {
|
||
return null;
|
||
}
|
||
|
||
module.exports = function(isValidElement, throwOnDirectAccess) {
|
||
/* global Symbol */
|
||
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
||
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
||
|
||
/**
|
||
* Returns the iterator method function contained on the iterable object.
|
||
*
|
||
* Be sure to invoke the function with the iterable as context:
|
||
*
|
||
* var iteratorFn = getIteratorFn(myIterable);
|
||
* if (iteratorFn) {
|
||
* var iterator = iteratorFn.call(myIterable);
|
||
* ...
|
||
* }
|
||
*
|
||
* @param {?object} maybeIterable
|
||
* @return {?function}
|
||
*/
|
||
function getIteratorFn(maybeIterable) {
|
||
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
||
if (typeof iteratorFn === 'function') {
|
||
return iteratorFn;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Collection of methods that allow declaration and validation of props that are
|
||
* supplied to React components. Example usage:
|
||
*
|
||
* var Props = require('ReactPropTypes');
|
||
* var MyArticle = React.createClass({
|
||
* propTypes: {
|
||
* // An optional string prop named "description".
|
||
* description: Props.string,
|
||
*
|
||
* // A required enum prop named "category".
|
||
* category: Props.oneOf(['News','Photos']).isRequired,
|
||
*
|
||
* // A prop named "dialog" that requires an instance of Dialog.
|
||
* dialog: Props.instanceOf(Dialog).isRequired
|
||
* },
|
||
* render: function() { ... }
|
||
* });
|
||
*
|
||
* A more formal specification of how these methods are used:
|
||
*
|
||
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
||
* decl := ReactPropTypes.{type}(.isRequired)?
|
||
*
|
||
* Each and every declaration produces a function with the same signature. This
|
||
* allows the creation of custom validation functions. For example:
|
||
*
|
||
* var MyLink = React.createClass({
|
||
* propTypes: {
|
||
* // An optional string or URI prop named "href".
|
||
* href: function(props, propName, componentName) {
|
||
* var propValue = props[propName];
|
||
* if (propValue != null && typeof propValue !== 'string' &&
|
||
* !(propValue instanceof URI)) {
|
||
* return new Error(
|
||
* 'Expected a string or an URI for ' + propName + ' in ' +
|
||
* componentName
|
||
* );
|
||
* }
|
||
* }
|
||
* },
|
||
* render: function() {...}
|
||
* });
|
||
*
|
||
* @internal
|
||
*/
|
||
|
||
var ANONYMOUS = '<<anonymous>>';
|
||
|
||
// Important!
|
||
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
||
var ReactPropTypes = {
|
||
array: createPrimitiveTypeChecker('array'),
|
||
bool: createPrimitiveTypeChecker('boolean'),
|
||
func: createPrimitiveTypeChecker('function'),
|
||
number: createPrimitiveTypeChecker('number'),
|
||
object: createPrimitiveTypeChecker('object'),
|
||
string: createPrimitiveTypeChecker('string'),
|
||
symbol: createPrimitiveTypeChecker('symbol'),
|
||
|
||
any: createAnyTypeChecker(),
|
||
arrayOf: createArrayOfTypeChecker,
|
||
element: createElementTypeChecker(),
|
||
instanceOf: createInstanceTypeChecker,
|
||
node: createNodeChecker(),
|
||
objectOf: createObjectOfTypeChecker,
|
||
oneOf: createEnumTypeChecker,
|
||
oneOfType: createUnionTypeChecker,
|
||
shape: createShapeTypeChecker,
|
||
exact: createStrictShapeTypeChecker,
|
||
};
|
||
|
||
/**
|
||
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
||
*/
|
||
/*eslint-disable no-self-compare*/
|
||
function is(x, y) {
|
||
// SameValue algorithm
|
||
if (x === y) {
|
||
// Steps 1-5, 7-10
|
||
// Steps 6.b-6.e: +0 != -0
|
||
return x !== 0 || 1 / x === 1 / y;
|
||
} else {
|
||
// Step 6.a: NaN == NaN
|
||
return x !== x && y !== y;
|
||
}
|
||
}
|
||
/*eslint-enable no-self-compare*/
|
||
|
||
/**
|
||
* We use an Error-like object for backward compatibility as people may call
|
||
* PropTypes directly and inspect their output. However, we don't use real
|
||
* Errors anymore. We don't inspect their stack anyway, and creating them
|
||
* is prohibitively expensive if they are created too often, such as what
|
||
* happens in oneOfType() for any type before the one that matched.
|
||
*/
|
||
function PropTypeError(message) {
|
||
this.message = message;
|
||
this.stack = '';
|
||
}
|
||
// Make `instanceof Error` still work for returned errors.
|
||
PropTypeError.prototype = Error.prototype;
|
||
|
||
function createChainableTypeChecker(validate) {
|
||
if (true) {
|
||
var manualPropTypeCallCache = {};
|
||
var manualPropTypeWarningCount = 0;
|
||
}
|
||
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
||
componentName = componentName || ANONYMOUS;
|
||
propFullName = propFullName || propName;
|
||
|
||
if (secret !== ReactPropTypesSecret) {
|
||
if (throwOnDirectAccess) {
|
||
// New behavior only for users of `prop-types` package
|
||
var err = new Error(
|
||
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
||
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
||
'Read more at http://fb.me/use-check-prop-types'
|
||
);
|
||
err.name = 'Invariant Violation';
|
||
throw err;
|
||
} else if ( true && typeof console !== 'undefined') {
|
||
// Old behavior for people using React.PropTypes
|
||
var cacheKey = componentName + ':' + propName;
|
||
if (
|
||
!manualPropTypeCallCache[cacheKey] &&
|
||
// Avoid spamming the console because they are often not actionable except for lib authors
|
||
manualPropTypeWarningCount < 3
|
||
) {
|
||
printWarning(
|
||
'You are manually calling a React.PropTypes validation ' +
|
||
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
||
'and will throw in the standalone `prop-types` package. ' +
|
||
'You may be seeing this warning due to a third-party PropTypes ' +
|
||
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
||
);
|
||
manualPropTypeCallCache[cacheKey] = true;
|
||
manualPropTypeWarningCount++;
|
||
}
|
||
}
|
||
}
|
||
if (props[propName] == null) {
|
||
if (isRequired) {
|
||
if (props[propName] === null) {
|
||
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
||
}
|
||
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
||
}
|
||
return null;
|
||
} else {
|
||
return validate(props, propName, componentName, location, propFullName);
|
||
}
|
||
}
|
||
|
||
var chainedCheckType = checkType.bind(null, false);
|
||
chainedCheckType.isRequired = checkType.bind(null, true);
|
||
|
||
return chainedCheckType;
|
||
}
|
||
|
||
function createPrimitiveTypeChecker(expectedType) {
|
||
function validate(props, propName, componentName, location, propFullName, secret) {
|
||
var propValue = props[propName];
|
||
var propType = getPropType(propValue);
|
||
if (propType !== expectedType) {
|
||
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
||
// check, but we can offer a more precise error message here rather than
|
||
// 'of type `object`'.
|
||
var preciseType = getPreciseType(propValue);
|
||
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createAnyTypeChecker() {
|
||
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
||
}
|
||
|
||
function createArrayOfTypeChecker(typeChecker) {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
if (typeof typeChecker !== 'function') {
|
||
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
||
}
|
||
var propValue = props[propName];
|
||
if (!Array.isArray(propValue)) {
|
||
var propType = getPropType(propValue);
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
||
}
|
||
for (var i = 0; i < propValue.length; i++) {
|
||
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
||
if (error instanceof Error) {
|
||
return error;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createElementTypeChecker() {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
var propValue = props[propName];
|
||
if (!isValidElement(propValue)) {
|
||
var propType = getPropType(propValue);
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createInstanceTypeChecker(expectedClass) {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
if (!(props[propName] instanceof expectedClass)) {
|
||
var expectedClassName = expectedClass.name || ANONYMOUS;
|
||
var actualClassName = getClassName(props[propName]);
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createEnumTypeChecker(expectedValues) {
|
||
if (!Array.isArray(expectedValues)) {
|
||
true ? printWarning('Invalid argument supplied to oneOf, expected an instance of array.') : undefined;
|
||
return emptyFunctionThatReturnsNull;
|
||
}
|
||
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
var propValue = props[propName];
|
||
for (var i = 0; i < expectedValues.length; i++) {
|
||
if (is(propValue, expectedValues[i])) {
|
||
return null;
|
||
}
|
||
}
|
||
|
||
var valuesString = JSON.stringify(expectedValues);
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createObjectOfTypeChecker(typeChecker) {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
if (typeof typeChecker !== 'function') {
|
||
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
||
}
|
||
var propValue = props[propName];
|
||
var propType = getPropType(propValue);
|
||
if (propType !== 'object') {
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
||
}
|
||
for (var key in propValue) {
|
||
if (propValue.hasOwnProperty(key)) {
|
||
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
||
if (error instanceof Error) {
|
||
return error;
|
||
}
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
||
if (!Array.isArray(arrayOfTypeCheckers)) {
|
||
true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : undefined;
|
||
return emptyFunctionThatReturnsNull;
|
||
}
|
||
|
||
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
||
var checker = arrayOfTypeCheckers[i];
|
||
if (typeof checker !== 'function') {
|
||
printWarning(
|
||
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
||
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
||
);
|
||
return emptyFunctionThatReturnsNull;
|
||
}
|
||
}
|
||
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
||
var checker = arrayOfTypeCheckers[i];
|
||
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
||
return null;
|
||
}
|
||
}
|
||
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createNodeChecker() {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
if (!isNode(props[propName])) {
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createShapeTypeChecker(shapeTypes) {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
var propValue = props[propName];
|
||
var propType = getPropType(propValue);
|
||
if (propType !== 'object') {
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
||
}
|
||
for (var key in shapeTypes) {
|
||
var checker = shapeTypes[key];
|
||
if (!checker) {
|
||
continue;
|
||
}
|
||
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
||
if (error) {
|
||
return error;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createStrictShapeTypeChecker(shapeTypes) {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
var propValue = props[propName];
|
||
var propType = getPropType(propValue);
|
||
if (propType !== 'object') {
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
||
}
|
||
// We need to check all keys in case some are required but missing from
|
||
// props.
|
||
var allKeys = assign({}, props[propName], shapeTypes);
|
||
for (var key in allKeys) {
|
||
var checker = shapeTypes[key];
|
||
if (!checker) {
|
||
return new PropTypeError(
|
||
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
||
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
||
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
||
);
|
||
}
|
||
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
||
if (error) {
|
||
return error;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function isNode(propValue) {
|
||
switch (typeof propValue) {
|
||
case 'number':
|
||
case 'string':
|
||
case 'undefined':
|
||
return true;
|
||
case 'boolean':
|
||
return !propValue;
|
||
case 'object':
|
||
if (Array.isArray(propValue)) {
|
||
return propValue.every(isNode);
|
||
}
|
||
if (propValue === null || isValidElement(propValue)) {
|
||
return true;
|
||
}
|
||
|
||
var iteratorFn = getIteratorFn(propValue);
|
||
if (iteratorFn) {
|
||
var iterator = iteratorFn.call(propValue);
|
||
var step;
|
||
if (iteratorFn !== propValue.entries) {
|
||
while (!(step = iterator.next()).done) {
|
||
if (!isNode(step.value)) {
|
||
return false;
|
||
}
|
||
}
|
||
} else {
|
||
// Iterator will provide entry [k,v] tuples rather than values.
|
||
while (!(step = iterator.next()).done) {
|
||
var entry = step.value;
|
||
if (entry) {
|
||
if (!isNode(entry[1])) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
} else {
|
||
return false;
|
||
}
|
||
|
||
return true;
|
||
default:
|
||
return false;
|
||
}
|
||
}
|
||
|
||
function isSymbol(propType, propValue) {
|
||
// Native Symbol.
|
||
if (propType === 'symbol') {
|
||
return true;
|
||
}
|
||
|
||
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
||
if (propValue['@@toStringTag'] === 'Symbol') {
|
||
return true;
|
||
}
|
||
|
||
// Fallback for non-spec compliant Symbols which are polyfilled.
|
||
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
||
return true;
|
||
}
|
||
|
||
return false;
|
||
}
|
||
|
||
// Equivalent of `typeof` but with special handling for array and regexp.
|
||
function getPropType(propValue) {
|
||
var propType = typeof propValue;
|
||
if (Array.isArray(propValue)) {
|
||
return 'array';
|
||
}
|
||
if (propValue instanceof RegExp) {
|
||
// Old webkits (at least until Android 4.0) return 'function' rather than
|
||
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
||
// passes PropTypes.object.
|
||
return 'object';
|
||
}
|
||
if (isSymbol(propType, propValue)) {
|
||
return 'symbol';
|
||
}
|
||
return propType;
|
||
}
|
||
|
||
// This handles more types than `getPropType`. Only used for error messages.
|
||
// See `createPrimitiveTypeChecker`.
|
||
function getPreciseType(propValue) {
|
||
if (typeof propValue === 'undefined' || propValue === null) {
|
||
return '' + propValue;
|
||
}
|
||
var propType = getPropType(propValue);
|
||
if (propType === 'object') {
|
||
if (propValue instanceof Date) {
|
||
return 'date';
|
||
} else if (propValue instanceof RegExp) {
|
||
return 'regexp';
|
||
}
|
||
}
|
||
return propType;
|
||
}
|
||
|
||
// Returns a string that is postfixed to a warning about an invalid type.
|
||
// For example, "undefined" or "of type array"
|
||
function getPostfixForTypeWarning(value) {
|
||
var type = getPreciseType(value);
|
||
switch (type) {
|
||
case 'array':
|
||
case 'object':
|
||
return 'an ' + type;
|
||
case 'boolean':
|
||
case 'date':
|
||
case 'regexp':
|
||
return 'a ' + type;
|
||
default:
|
||
return type;
|
||
}
|
||
}
|
||
|
||
// Returns class name of the object, if any.
|
||
function getClassName(propValue) {
|
||
if (!propValue.constructor || !propValue.constructor.name) {
|
||
return ANONYMOUS;
|
||
}
|
||
return propValue.constructor.name;
|
||
}
|
||
|
||
ReactPropTypes.checkPropTypes = checkPropTypes;
|
||
ReactPropTypes.PropTypes = ReactPropTypes;
|
||
|
||
return ReactPropTypes;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/prop-types/index.js":
|
||
/*!******************************************!*\
|
||
!*** ./node_modules/prop-types/index.js ***!
|
||
\******************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
if (true) {
|
||
var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
|
||
Symbol.for &&
|
||
Symbol.for('react.element')) ||
|
||
0xeac7;
|
||
|
||
var isValidElement = function(object) {
|
||
return typeof object === 'object' &&
|
||
object !== null &&
|
||
object.$$typeof === REACT_ELEMENT_TYPE;
|
||
};
|
||
|
||
// By explicitly using `prop-types` you are opting into new development behavior.
|
||
// http://fb.me/prop-types-in-prod
|
||
var throwOnDirectAccess = true;
|
||
module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(isValidElement, throwOnDirectAccess);
|
||
} else {}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
|
||
/*!*************************************************************!*\
|
||
!*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
|
||
\*************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
||
|
||
module.exports = ReactPropTypesSecret;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/protobufjs/minimal.js":
|
||
/*!********************************************!*\
|
||
!*** ./node_modules/protobufjs/minimal.js ***!
|
||
\********************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
// minimal library entry point.
|
||
|
||
|
||
module.exports = __webpack_require__(/*! ./src/index-minimal */ "./node_modules/protobufjs/src/index-minimal.js");
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/protobufjs/src/index-minimal.js":
|
||
/*!******************************************************!*\
|
||
!*** ./node_modules/protobufjs/src/index-minimal.js ***!
|
||
\******************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
var protobuf = exports;
|
||
|
||
/**
|
||
* Build type, one of `"full"`, `"light"` or `"minimal"`.
|
||
* @name build
|
||
* @type {string}
|
||
* @const
|
||
*/
|
||
protobuf.build = "minimal";
|
||
|
||
// Serialization
|
||
protobuf.Writer = __webpack_require__(/*! ./writer */ "./node_modules/protobufjs/src/writer.js");
|
||
protobuf.BufferWriter = __webpack_require__(/*! ./writer_buffer */ "./node_modules/protobufjs/src/writer_buffer.js");
|
||
protobuf.Reader = __webpack_require__(/*! ./reader */ "./node_modules/protobufjs/src/reader.js");
|
||
protobuf.BufferReader = __webpack_require__(/*! ./reader_buffer */ "./node_modules/protobufjs/src/reader_buffer.js");
|
||
|
||
// Utility
|
||
protobuf.util = __webpack_require__(/*! ./util/minimal */ "./node_modules/protobufjs/src/util/minimal.js");
|
||
protobuf.rpc = __webpack_require__(/*! ./rpc */ "./node_modules/protobufjs/src/rpc.js");
|
||
protobuf.roots = __webpack_require__(/*! ./roots */ "./node_modules/protobufjs/src/roots.js");
|
||
protobuf.configure = configure;
|
||
|
||
/* istanbul ignore next */
|
||
/**
|
||
* Reconfigures the library according to the environment.
|
||
* @returns {undefined}
|
||
*/
|
||
function configure() {
|
||
protobuf.Reader._configure(protobuf.BufferReader);
|
||
protobuf.util._configure();
|
||
}
|
||
|
||
// Set up buffer utility according to the environment
|
||
protobuf.Writer._configure(protobuf.BufferWriter);
|
||
configure();
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/protobufjs/src/reader.js":
|
||
/*!***********************************************!*\
|
||
!*** ./node_modules/protobufjs/src/reader.js ***!
|
||
\***********************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
module.exports = Reader;
|
||
|
||
var util = __webpack_require__(/*! ./util/minimal */ "./node_modules/protobufjs/src/util/minimal.js");
|
||
|
||
var BufferReader; // cyclic
|
||
|
||
var LongBits = util.LongBits,
|
||
utf8 = util.utf8;
|
||
|
||
/* istanbul ignore next */
|
||
function indexOutOfRange(reader, writeLength) {
|
||
return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len);
|
||
}
|
||
|
||
/**
|
||
* Constructs a new reader instance using the specified buffer.
|
||
* @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.
|
||
* @constructor
|
||
* @param {Uint8Array} buffer Buffer to read from
|
||
*/
|
||
function Reader(buffer) {
|
||
|
||
/**
|
||
* Read buffer.
|
||
* @type {Uint8Array}
|
||
*/
|
||
this.buf = buffer;
|
||
|
||
/**
|
||
* Read buffer position.
|
||
* @type {number}
|
||
*/
|
||
this.pos = 0;
|
||
|
||
/**
|
||
* Read buffer length.
|
||
* @type {number}
|
||
*/
|
||
this.len = buffer.length;
|
||
}
|
||
|
||
var create_array = typeof Uint8Array !== "undefined"
|
||
? function create_typed_array(buffer) {
|
||
if (buffer instanceof Uint8Array || Array.isArray(buffer))
|
||
return new Reader(buffer);
|
||
throw Error("illegal buffer");
|
||
}
|
||
/* istanbul ignore next */
|
||
: function create_array(buffer) {
|
||
if (Array.isArray(buffer))
|
||
return new Reader(buffer);
|
||
throw Error("illegal buffer");
|
||
};
|
||
|
||
/**
|
||
* Creates a new reader using the specified buffer.
|
||
* @function
|
||
* @param {Uint8Array|Buffer} buffer Buffer to read from
|
||
* @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}
|
||
* @throws {Error} If `buffer` is not a valid buffer
|
||
*/
|
||
Reader.create = util.Buffer
|
||
? function create_buffer_setup(buffer) {
|
||
return (Reader.create = function create_buffer(buffer) {
|
||
return util.Buffer.isBuffer(buffer)
|
||
? new BufferReader(buffer)
|
||
/* istanbul ignore next */
|
||
: create_array(buffer);
|
||
})(buffer);
|
||
}
|
||
/* istanbul ignore next */
|
||
: create_array;
|
||
|
||
Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;
|
||
|
||
/**
|
||
* Reads a varint as an unsigned 32 bit value.
|
||
* @function
|
||
* @returns {number} Value read
|
||
*/
|
||
Reader.prototype.uint32 = (function read_uint32_setup() {
|
||
var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)
|
||
return function read_uint32() {
|
||
value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;
|
||
value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;
|
||
value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;
|
||
value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;
|
||
value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;
|
||
|
||
/* istanbul ignore if */
|
||
if ((this.pos += 5) > this.len) {
|
||
this.pos = this.len;
|
||
throw indexOutOfRange(this, 10);
|
||
}
|
||
return value;
|
||
};
|
||
})();
|
||
|
||
/**
|
||
* Reads a varint as a signed 32 bit value.
|
||
* @returns {number} Value read
|
||
*/
|
||
Reader.prototype.int32 = function read_int32() {
|
||
return this.uint32() | 0;
|
||
};
|
||
|
||
/**
|
||
* Reads a zig-zag encoded varint as a signed 32 bit value.
|
||
* @returns {number} Value read
|
||
*/
|
||
Reader.prototype.sint32 = function read_sint32() {
|
||
var value = this.uint32();
|
||
return value >>> 1 ^ -(value & 1) | 0;
|
||
};
|
||
|
||
/* eslint-disable no-invalid-this */
|
||
|
||
function readLongVarint() {
|
||
// tends to deopt with local vars for octet etc.
|
||
var bits = new LongBits(0, 0);
|
||
var i = 0;
|
||
if (this.len - this.pos > 4) { // fast route (lo)
|
||
for (; i < 4; ++i) {
|
||
// 1st..4th
|
||
bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
|
||
if (this.buf[this.pos++] < 128)
|
||
return bits;
|
||
}
|
||
// 5th
|
||
bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;
|
||
bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;
|
||
if (this.buf[this.pos++] < 128)
|
||
return bits;
|
||
i = 0;
|
||
} else {
|
||
for (; i < 3; ++i) {
|
||
/* istanbul ignore if */
|
||
if (this.pos >= this.len)
|
||
throw indexOutOfRange(this);
|
||
// 1st..3th
|
||
bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
|
||
if (this.buf[this.pos++] < 128)
|
||
return bits;
|
||
}
|
||
// 4th
|
||
bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
|
||
return bits;
|
||
}
|
||
if (this.len - this.pos > 4) { // fast route (hi)
|
||
for (; i < 5; ++i) {
|
||
// 6th..10th
|
||
bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
|
||
if (this.buf[this.pos++] < 128)
|
||
return bits;
|
||
}
|
||
} else {
|
||
for (; i < 5; ++i) {
|
||
/* istanbul ignore if */
|
||
if (this.pos >= this.len)
|
||
throw indexOutOfRange(this);
|
||
// 6th..10th
|
||
bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
|
||
if (this.buf[this.pos++] < 128)
|
||
return bits;
|
||
}
|
||
}
|
||
/* istanbul ignore next */
|
||
throw Error("invalid varint encoding");
|
||
}
|
||
|
||
/* eslint-enable no-invalid-this */
|
||
|
||
/**
|
||
* Reads a varint as a signed 64 bit value.
|
||
* @name Reader#int64
|
||
* @function
|
||
* @returns {Long} Value read
|
||
*/
|
||
|
||
/**
|
||
* Reads a varint as an unsigned 64 bit value.
|
||
* @name Reader#uint64
|
||
* @function
|
||
* @returns {Long} Value read
|
||
*/
|
||
|
||
/**
|
||
* Reads a zig-zag encoded varint as a signed 64 bit value.
|
||
* @name Reader#sint64
|
||
* @function
|
||
* @returns {Long} Value read
|
||
*/
|
||
|
||
/**
|
||
* Reads a varint as a boolean.
|
||
* @returns {boolean} Value read
|
||
*/
|
||
Reader.prototype.bool = function read_bool() {
|
||
return this.uint32() !== 0;
|
||
};
|
||
|
||
function readFixed32_end(buf, end) { // note that this uses `end`, not `pos`
|
||
return (buf[end - 4]
|
||
| buf[end - 3] << 8
|
||
| buf[end - 2] << 16
|
||
| buf[end - 1] << 24) >>> 0;
|
||
}
|
||
|
||
/**
|
||
* Reads fixed 32 bits as an unsigned 32 bit integer.
|
||
* @returns {number} Value read
|
||
*/
|
||
Reader.prototype.fixed32 = function read_fixed32() {
|
||
|
||
/* istanbul ignore if */
|
||
if (this.pos + 4 > this.len)
|
||
throw indexOutOfRange(this, 4);
|
||
|
||
return readFixed32_end(this.buf, this.pos += 4);
|
||
};
|
||
|
||
/**
|
||
* Reads fixed 32 bits as a signed 32 bit integer.
|
||
* @returns {number} Value read
|
||
*/
|
||
Reader.prototype.sfixed32 = function read_sfixed32() {
|
||
|
||
/* istanbul ignore if */
|
||
if (this.pos + 4 > this.len)
|
||
throw indexOutOfRange(this, 4);
|
||
|
||
return readFixed32_end(this.buf, this.pos += 4) | 0;
|
||
};
|
||
|
||
/* eslint-disable no-invalid-this */
|
||
|
||
function readFixed64(/* this: Reader */) {
|
||
|
||
/* istanbul ignore if */
|
||
if (this.pos + 8 > this.len)
|
||
throw indexOutOfRange(this, 8);
|
||
|
||
return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));
|
||
}
|
||
|
||
/* eslint-enable no-invalid-this */
|
||
|
||
/**
|
||
* Reads fixed 64 bits.
|
||
* @name Reader#fixed64
|
||
* @function
|
||
* @returns {Long} Value read
|
||
*/
|
||
|
||
/**
|
||
* Reads zig-zag encoded fixed 64 bits.
|
||
* @name Reader#sfixed64
|
||
* @function
|
||
* @returns {Long} Value read
|
||
*/
|
||
|
||
/**
|
||
* Reads a float (32 bit) as a number.
|
||
* @function
|
||
* @returns {number} Value read
|
||
*/
|
||
Reader.prototype.float = function read_float() {
|
||
|
||
/* istanbul ignore if */
|
||
if (this.pos + 4 > this.len)
|
||
throw indexOutOfRange(this, 4);
|
||
|
||
var value = util.float.readFloatLE(this.buf, this.pos);
|
||
this.pos += 4;
|
||
return value;
|
||
};
|
||
|
||
/**
|
||
* Reads a double (64 bit float) as a number.
|
||
* @function
|
||
* @returns {number} Value read
|
||
*/
|
||
Reader.prototype.double = function read_double() {
|
||
|
||
/* istanbul ignore if */
|
||
if (this.pos + 8 > this.len)
|
||
throw indexOutOfRange(this, 4);
|
||
|
||
var value = util.float.readDoubleLE(this.buf, this.pos);
|
||
this.pos += 8;
|
||
return value;
|
||
};
|
||
|
||
/**
|
||
* Reads a sequence of bytes preceeded by its length as a varint.
|
||
* @returns {Uint8Array} Value read
|
||
*/
|
||
Reader.prototype.bytes = function read_bytes() {
|
||
var length = this.uint32(),
|
||
start = this.pos,
|
||
end = this.pos + length;
|
||
|
||
/* istanbul ignore if */
|
||
if (end > this.len)
|
||
throw indexOutOfRange(this, length);
|
||
|
||
this.pos += length;
|
||
if (Array.isArray(this.buf)) // plain array
|
||
return this.buf.slice(start, end);
|
||
return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1
|
||
? new this.buf.constructor(0)
|
||
: this._slice.call(this.buf, start, end);
|
||
};
|
||
|
||
/**
|
||
* Reads a string preceeded by its byte length as a varint.
|
||
* @returns {string} Value read
|
||
*/
|
||
Reader.prototype.string = function read_string() {
|
||
var bytes = this.bytes();
|
||
return utf8.read(bytes, 0, bytes.length);
|
||
};
|
||
|
||
/**
|
||
* Skips the specified number of bytes if specified, otherwise skips a varint.
|
||
* @param {number} [length] Length if known, otherwise a varint is assumed
|
||
* @returns {Reader} `this`
|
||
*/
|
||
Reader.prototype.skip = function skip(length) {
|
||
if (typeof length === "number") {
|
||
/* istanbul ignore if */
|
||
if (this.pos + length > this.len)
|
||
throw indexOutOfRange(this, length);
|
||
this.pos += length;
|
||
} else {
|
||
do {
|
||
/* istanbul ignore if */
|
||
if (this.pos >= this.len)
|
||
throw indexOutOfRange(this);
|
||
} while (this.buf[this.pos++] & 128);
|
||
}
|
||
return this;
|
||
};
|
||
|
||
/**
|
||
* Skips the next element of the specified wire type.
|
||
* @param {number} wireType Wire type received
|
||
* @returns {Reader} `this`
|
||
*/
|
||
Reader.prototype.skipType = function(wireType) {
|
||
switch (wireType) {
|
||
case 0:
|
||
this.skip();
|
||
break;
|
||
case 1:
|
||
this.skip(8);
|
||
break;
|
||
case 2:
|
||
this.skip(this.uint32());
|
||
break;
|
||
case 3:
|
||
while ((wireType = this.uint32() & 7) !== 4) {
|
||
this.skipType(wireType);
|
||
}
|
||
break;
|
||
case 5:
|
||
this.skip(4);
|
||
break;
|
||
|
||
/* istanbul ignore next */
|
||
default:
|
||
throw Error("invalid wire type " + wireType + " at offset " + this.pos);
|
||
}
|
||
return this;
|
||
};
|
||
|
||
Reader._configure = function(BufferReader_) {
|
||
BufferReader = BufferReader_;
|
||
|
||
var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber";
|
||
util.merge(Reader.prototype, {
|
||
|
||
int64: function read_int64() {
|
||
return readLongVarint.call(this)[fn](false);
|
||
},
|
||
|
||
uint64: function read_uint64() {
|
||
return readLongVarint.call(this)[fn](true);
|
||
},
|
||
|
||
sint64: function read_sint64() {
|
||
return readLongVarint.call(this).zzDecode()[fn](false);
|
||
},
|
||
|
||
fixed64: function read_fixed64() {
|
||
return readFixed64.call(this)[fn](true);
|
||
},
|
||
|
||
sfixed64: function read_sfixed64() {
|
||
return readFixed64.call(this)[fn](false);
|
||
}
|
||
|
||
});
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/protobufjs/src/reader_buffer.js":
|
||
/*!******************************************************!*\
|
||
!*** ./node_modules/protobufjs/src/reader_buffer.js ***!
|
||
\******************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
module.exports = BufferReader;
|
||
|
||
// extends Reader
|
||
var Reader = __webpack_require__(/*! ./reader */ "./node_modules/protobufjs/src/reader.js");
|
||
(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;
|
||
|
||
var util = __webpack_require__(/*! ./util/minimal */ "./node_modules/protobufjs/src/util/minimal.js");
|
||
|
||
/**
|
||
* Constructs a new buffer reader instance.
|
||
* @classdesc Wire format reader using node buffers.
|
||
* @extends Reader
|
||
* @constructor
|
||
* @param {Buffer} buffer Buffer to read from
|
||
*/
|
||
function BufferReader(buffer) {
|
||
Reader.call(this, buffer);
|
||
|
||
/**
|
||
* Read buffer.
|
||
* @name BufferReader#buf
|
||
* @type {Buffer}
|
||
*/
|
||
}
|
||
|
||
/* istanbul ignore else */
|
||
if (util.Buffer)
|
||
BufferReader.prototype._slice = util.Buffer.prototype.slice;
|
||
|
||
/**
|
||
* @override
|
||
*/
|
||
BufferReader.prototype.string = function read_string_buffer() {
|
||
var len = this.uint32(); // modifies pos
|
||
return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));
|
||
};
|
||
|
||
/**
|
||
* Reads a sequence of bytes preceeded by its length as a varint.
|
||
* @name BufferReader#bytes
|
||
* @function
|
||
* @returns {Buffer} Value read
|
||
*/
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/protobufjs/src/roots.js":
|
||
/*!**********************************************!*\
|
||
!*** ./node_modules/protobufjs/src/roots.js ***!
|
||
\**********************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
module.exports = {};
|
||
|
||
/**
|
||
* Named roots.
|
||
* This is where pbjs stores generated structures (the option `-r, --root` specifies a name).
|
||
* Can also be used manually to make roots available accross modules.
|
||
* @name roots
|
||
* @type {Object.<string,Root>}
|
||
* @example
|
||
* // pbjs -r myroot -o compiled.js ...
|
||
*
|
||
* // in another module:
|
||
* require("./compiled.js");
|
||
*
|
||
* // in any subsequent module:
|
||
* var root = protobuf.roots["myroot"];
|
||
*/
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/protobufjs/src/rpc.js":
|
||
/*!********************************************!*\
|
||
!*** ./node_modules/protobufjs/src/rpc.js ***!
|
||
\********************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
/**
|
||
* Streaming RPC helpers.
|
||
* @namespace
|
||
*/
|
||
var rpc = exports;
|
||
|
||
/**
|
||
* RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.
|
||
* @typedef RPCImpl
|
||
* @type {function}
|
||
* @param {Method|rpc.ServiceMethod<Message<{}>,Message<{}>>} method Reflected or static method being called
|
||
* @param {Uint8Array} requestData Request data
|
||
* @param {RPCImplCallback} callback Callback function
|
||
* @returns {undefined}
|
||
* @example
|
||
* function rpcImpl(method, requestData, callback) {
|
||
* if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code
|
||
* throw Error("no such method");
|
||
* asynchronouslyObtainAResponse(requestData, function(err, responseData) {
|
||
* callback(err, responseData);
|
||
* });
|
||
* }
|
||
*/
|
||
|
||
/**
|
||
* Node-style callback as used by {@link RPCImpl}.
|
||
* @typedef RPCImplCallback
|
||
* @type {function}
|
||
* @param {Error|null} error Error, if any, otherwise `null`
|
||
* @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error
|
||
* @returns {undefined}
|
||
*/
|
||
|
||
rpc.Service = __webpack_require__(/*! ./rpc/service */ "./node_modules/protobufjs/src/rpc/service.js");
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/protobufjs/src/rpc/service.js":
|
||
/*!****************************************************!*\
|
||
!*** ./node_modules/protobufjs/src/rpc/service.js ***!
|
||
\****************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
module.exports = Service;
|
||
|
||
var util = __webpack_require__(/*! ../util/minimal */ "./node_modules/protobufjs/src/util/minimal.js");
|
||
|
||
// Extends EventEmitter
|
||
(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;
|
||
|
||
/**
|
||
* A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.
|
||
*
|
||
* Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.
|
||
* @typedef rpc.ServiceMethodCallback
|
||
* @template TRes extends Message<TRes>
|
||
* @type {function}
|
||
* @param {Error|null} error Error, if any
|
||
* @param {TRes} [response] Response message
|
||
* @returns {undefined}
|
||
*/
|
||
|
||
/**
|
||
* A service method part of a {@link rpc.Service} as created by {@link Service.create}.
|
||
* @typedef rpc.ServiceMethod
|
||
* @template TReq extends Message<TReq>
|
||
* @template TRes extends Message<TRes>
|
||
* @type {function}
|
||
* @param {TReq|Properties<TReq>} request Request message or plain object
|
||
* @param {rpc.ServiceMethodCallback<TRes>} [callback] Node-style callback called with the error, if any, and the response message
|
||
* @returns {Promise<Message<TRes>>} Promise if `callback` has been omitted, otherwise `undefined`
|
||
*/
|
||
|
||
/**
|
||
* Constructs a new RPC service instance.
|
||
* @classdesc An RPC service as returned by {@link Service#create}.
|
||
* @exports rpc.Service
|
||
* @extends util.EventEmitter
|
||
* @constructor
|
||
* @param {RPCImpl} rpcImpl RPC implementation
|
||
* @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
||
* @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
||
*/
|
||
function Service(rpcImpl, requestDelimited, responseDelimited) {
|
||
|
||
if (typeof rpcImpl !== "function")
|
||
throw TypeError("rpcImpl must be a function");
|
||
|
||
util.EventEmitter.call(this);
|
||
|
||
/**
|
||
* RPC implementation. Becomes `null` once the service is ended.
|
||
* @type {RPCImpl|null}
|
||
*/
|
||
this.rpcImpl = rpcImpl;
|
||
|
||
/**
|
||
* Whether requests are length-delimited.
|
||
* @type {boolean}
|
||
*/
|
||
this.requestDelimited = Boolean(requestDelimited);
|
||
|
||
/**
|
||
* Whether responses are length-delimited.
|
||
* @type {boolean}
|
||
*/
|
||
this.responseDelimited = Boolean(responseDelimited);
|
||
}
|
||
|
||
/**
|
||
* Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.
|
||
* @param {Method|rpc.ServiceMethod<TReq,TRes>} method Reflected or static method
|
||
* @param {Constructor<TReq>} requestCtor Request constructor
|
||
* @param {Constructor<TRes>} responseCtor Response constructor
|
||
* @param {TReq|Properties<TReq>} request Request message or plain object
|
||
* @param {rpc.ServiceMethodCallback<TRes>} callback Service callback
|
||
* @returns {undefined}
|
||
* @template TReq extends Message<TReq>
|
||
* @template TRes extends Message<TRes>
|
||
*/
|
||
Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {
|
||
|
||
if (!request)
|
||
throw TypeError("request must be specified");
|
||
|
||
var self = this;
|
||
if (!callback)
|
||
return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);
|
||
|
||
if (!self.rpcImpl) {
|
||
setTimeout(function() { callback(Error("already ended")); }, 0);
|
||
return undefined;
|
||
}
|
||
|
||
try {
|
||
return self.rpcImpl(
|
||
method,
|
||
requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(),
|
||
function rpcCallback(err, response) {
|
||
|
||
if (err) {
|
||
self.emit("error", err, method);
|
||
return callback(err);
|
||
}
|
||
|
||
if (response === null) {
|
||
self.end(/* endedByRPC */ true);
|
||
return undefined;
|
||
}
|
||
|
||
if (!(response instanceof responseCtor)) {
|
||
try {
|
||
response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response);
|
||
} catch (err) {
|
||
self.emit("error", err, method);
|
||
return callback(err);
|
||
}
|
||
}
|
||
|
||
self.emit("data", response, method);
|
||
return callback(null, response);
|
||
}
|
||
);
|
||
} catch (err) {
|
||
self.emit("error", err, method);
|
||
setTimeout(function() { callback(err); }, 0);
|
||
return undefined;
|
||
}
|
||
};
|
||
|
||
/**
|
||
* Ends this service and emits the `end` event.
|
||
* @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.
|
||
* @returns {rpc.Service} `this`
|
||
*/
|
||
Service.prototype.end = function end(endedByRPC) {
|
||
if (this.rpcImpl) {
|
||
if (!endedByRPC) // signal end to rpcImpl
|
||
this.rpcImpl(null, null, null);
|
||
this.rpcImpl = null;
|
||
this.emit("end").off();
|
||
}
|
||
return this;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/protobufjs/src/util/longbits.js":
|
||
/*!******************************************************!*\
|
||
!*** ./node_modules/protobufjs/src/util/longbits.js ***!
|
||
\******************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
module.exports = LongBits;
|
||
|
||
var util = __webpack_require__(/*! ../util/minimal */ "./node_modules/protobufjs/src/util/minimal.js");
|
||
|
||
/**
|
||
* Constructs new long bits.
|
||
* @classdesc Helper class for working with the low and high bits of a 64 bit value.
|
||
* @memberof util
|
||
* @constructor
|
||
* @param {number} lo Low 32 bits, unsigned
|
||
* @param {number} hi High 32 bits, unsigned
|
||
*/
|
||
function LongBits(lo, hi) {
|
||
|
||
// note that the casts below are theoretically unnecessary as of today, but older statically
|
||
// generated converter code might still call the ctor with signed 32bits. kept for compat.
|
||
|
||
/**
|
||
* Low bits.
|
||
* @type {number}
|
||
*/
|
||
this.lo = lo >>> 0;
|
||
|
||
/**
|
||
* High bits.
|
||
* @type {number}
|
||
*/
|
||
this.hi = hi >>> 0;
|
||
}
|
||
|
||
/**
|
||
* Zero bits.
|
||
* @memberof util.LongBits
|
||
* @type {util.LongBits}
|
||
*/
|
||
var zero = LongBits.zero = new LongBits(0, 0);
|
||
|
||
zero.toNumber = function() { return 0; };
|
||
zero.zzEncode = zero.zzDecode = function() { return this; };
|
||
zero.length = function() { return 1; };
|
||
|
||
/**
|
||
* Zero hash.
|
||
* @memberof util.LongBits
|
||
* @type {string}
|
||
*/
|
||
var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0";
|
||
|
||
/**
|
||
* Constructs new long bits from the specified number.
|
||
* @param {number} value Value
|
||
* @returns {util.LongBits} Instance
|
||
*/
|
||
LongBits.fromNumber = function fromNumber(value) {
|
||
if (value === 0)
|
||
return zero;
|
||
var sign = value < 0;
|
||
if (sign)
|
||
value = -value;
|
||
var lo = value >>> 0,
|
||
hi = (value - lo) / 4294967296 >>> 0;
|
||
if (sign) {
|
||
hi = ~hi >>> 0;
|
||
lo = ~lo >>> 0;
|
||
if (++lo > 4294967295) {
|
||
lo = 0;
|
||
if (++hi > 4294967295)
|
||
hi = 0;
|
||
}
|
||
}
|
||
return new LongBits(lo, hi);
|
||
};
|
||
|
||
/**
|
||
* Constructs new long bits from a number, long or string.
|
||
* @param {Long|number|string} value Value
|
||
* @returns {util.LongBits} Instance
|
||
*/
|
||
LongBits.from = function from(value) {
|
||
if (typeof value === "number")
|
||
return LongBits.fromNumber(value);
|
||
if (util.isString(value)) {
|
||
/* istanbul ignore else */
|
||
if (util.Long)
|
||
value = util.Long.fromString(value);
|
||
else
|
||
return LongBits.fromNumber(parseInt(value, 10));
|
||
}
|
||
return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;
|
||
};
|
||
|
||
/**
|
||
* Converts this long bits to a possibly unsafe JavaScript number.
|
||
* @param {boolean} [unsigned=false] Whether unsigned or not
|
||
* @returns {number} Possibly unsafe number
|
||
*/
|
||
LongBits.prototype.toNumber = function toNumber(unsigned) {
|
||
if (!unsigned && this.hi >>> 31) {
|
||
var lo = ~this.lo + 1 >>> 0,
|
||
hi = ~this.hi >>> 0;
|
||
if (!lo)
|
||
hi = hi + 1 >>> 0;
|
||
return -(lo + hi * 4294967296);
|
||
}
|
||
return this.lo + this.hi * 4294967296;
|
||
};
|
||
|
||
/**
|
||
* Converts this long bits to a long.
|
||
* @param {boolean} [unsigned=false] Whether unsigned or not
|
||
* @returns {Long} Long
|
||
*/
|
||
LongBits.prototype.toLong = function toLong(unsigned) {
|
||
return util.Long
|
||
? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))
|
||
/* istanbul ignore next */
|
||
: { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };
|
||
};
|
||
|
||
var charCodeAt = String.prototype.charCodeAt;
|
||
|
||
/**
|
||
* Constructs new long bits from the specified 8 characters long hash.
|
||
* @param {string} hash Hash
|
||
* @returns {util.LongBits} Bits
|
||
*/
|
||
LongBits.fromHash = function fromHash(hash) {
|
||
if (hash === zeroHash)
|
||
return zero;
|
||
return new LongBits(
|
||
( charCodeAt.call(hash, 0)
|
||
| charCodeAt.call(hash, 1) << 8
|
||
| charCodeAt.call(hash, 2) << 16
|
||
| charCodeAt.call(hash, 3) << 24) >>> 0
|
||
,
|
||
( charCodeAt.call(hash, 4)
|
||
| charCodeAt.call(hash, 5) << 8
|
||
| charCodeAt.call(hash, 6) << 16
|
||
| charCodeAt.call(hash, 7) << 24) >>> 0
|
||
);
|
||
};
|
||
|
||
/**
|
||
* Converts this long bits to a 8 characters long hash.
|
||
* @returns {string} Hash
|
||
*/
|
||
LongBits.prototype.toHash = function toHash() {
|
||
return String.fromCharCode(
|
||
this.lo & 255,
|
||
this.lo >>> 8 & 255,
|
||
this.lo >>> 16 & 255,
|
||
this.lo >>> 24 ,
|
||
this.hi & 255,
|
||
this.hi >>> 8 & 255,
|
||
this.hi >>> 16 & 255,
|
||
this.hi >>> 24
|
||
);
|
||
};
|
||
|
||
/**
|
||
* Zig-zag encodes this long bits.
|
||
* @returns {util.LongBits} `this`
|
||
*/
|
||
LongBits.prototype.zzEncode = function zzEncode() {
|
||
var mask = this.hi >> 31;
|
||
this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;
|
||
this.lo = ( this.lo << 1 ^ mask) >>> 0;
|
||
return this;
|
||
};
|
||
|
||
/**
|
||
* Zig-zag decodes this long bits.
|
||
* @returns {util.LongBits} `this`
|
||
*/
|
||
LongBits.prototype.zzDecode = function zzDecode() {
|
||
var mask = -(this.lo & 1);
|
||
this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;
|
||
this.hi = ( this.hi >>> 1 ^ mask) >>> 0;
|
||
return this;
|
||
};
|
||
|
||
/**
|
||
* Calculates the length of this longbits when encoded as a varint.
|
||
* @returns {number} Length
|
||
*/
|
||
LongBits.prototype.length = function length() {
|
||
var part0 = this.lo,
|
||
part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,
|
||
part2 = this.hi >>> 24;
|
||
return part2 === 0
|
||
? part1 === 0
|
||
? part0 < 16384
|
||
? part0 < 128 ? 1 : 2
|
||
: part0 < 2097152 ? 3 : 4
|
||
: part1 < 16384
|
||
? part1 < 128 ? 5 : 6
|
||
: part1 < 2097152 ? 7 : 8
|
||
: part2 < 128 ? 9 : 10;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/protobufjs/src/util/minimal.js":
|
||
/*!*****************************************************!*\
|
||
!*** ./node_modules/protobufjs/src/util/minimal.js ***!
|
||
\*****************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* WEBPACK VAR INJECTION */(function(global) {
|
||
var util = exports;
|
||
|
||
// used to return a Promise where callback is omitted
|
||
util.asPromise = __webpack_require__(/*! @protobufjs/aspromise */ "./node_modules/@protobufjs/aspromise/index.js");
|
||
|
||
// converts to / from base64 encoded strings
|
||
util.base64 = __webpack_require__(/*! @protobufjs/base64 */ "./node_modules/@protobufjs/base64/index.js");
|
||
|
||
// base class of rpc.Service
|
||
util.EventEmitter = __webpack_require__(/*! @protobufjs/eventemitter */ "./node_modules/@protobufjs/eventemitter/index.js");
|
||
|
||
// float handling accross browsers
|
||
util.float = __webpack_require__(/*! @protobufjs/float */ "./node_modules/@protobufjs/float/index.js");
|
||
|
||
// requires modules optionally and hides the call from bundlers
|
||
util.inquire = __webpack_require__(/*! @protobufjs/inquire */ "./node_modules/@protobufjs/inquire/index.js");
|
||
|
||
// converts to / from utf8 encoded strings
|
||
util.utf8 = __webpack_require__(/*! @protobufjs/utf8 */ "./node_modules/@protobufjs/utf8/index.js");
|
||
|
||
// provides a node-like buffer pool in the browser
|
||
util.pool = __webpack_require__(/*! @protobufjs/pool */ "./node_modules/@protobufjs/pool/index.js");
|
||
|
||
// utility to work with the low and high bits of a 64 bit value
|
||
util.LongBits = __webpack_require__(/*! ./longbits */ "./node_modules/protobufjs/src/util/longbits.js");
|
||
|
||
// global object reference
|
||
util.global = typeof window !== "undefined" && window
|
||
|| typeof global !== "undefined" && global
|
||
|| typeof self !== "undefined" && self
|
||
|| this; // eslint-disable-line no-invalid-this
|
||
|
||
/**
|
||
* An immuable empty array.
|
||
* @memberof util
|
||
* @type {Array.<*>}
|
||
* @const
|
||
*/
|
||
util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes
|
||
|
||
/**
|
||
* An immutable empty object.
|
||
* @type {Object}
|
||
* @const
|
||
*/
|
||
util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes
|
||
|
||
/**
|
||
* Whether running within node or not.
|
||
* @memberof util
|
||
* @type {boolean}
|
||
* @const
|
||
*/
|
||
util.isNode = Boolean(util.global.process && util.global.process.versions && util.global.process.versions.node);
|
||
|
||
/**
|
||
* Tests if the specified value is an integer.
|
||
* @function
|
||
* @param {*} value Value to test
|
||
* @returns {boolean} `true` if the value is an integer
|
||
*/
|
||
util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {
|
||
return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
|
||
};
|
||
|
||
/**
|
||
* Tests if the specified value is a string.
|
||
* @param {*} value Value to test
|
||
* @returns {boolean} `true` if the value is a string
|
||
*/
|
||
util.isString = function isString(value) {
|
||
return typeof value === "string" || value instanceof String;
|
||
};
|
||
|
||
/**
|
||
* Tests if the specified value is a non-null object.
|
||
* @param {*} value Value to test
|
||
* @returns {boolean} `true` if the value is a non-null object
|
||
*/
|
||
util.isObject = function isObject(value) {
|
||
return value && typeof value === "object";
|
||
};
|
||
|
||
/**
|
||
* Checks if a property on a message is considered to be present.
|
||
* This is an alias of {@link util.isSet}.
|
||
* @function
|
||
* @param {Object} obj Plain object or message instance
|
||
* @param {string} prop Property name
|
||
* @returns {boolean} `true` if considered to be present, otherwise `false`
|
||
*/
|
||
util.isset =
|
||
|
||
/**
|
||
* Checks if a property on a message is considered to be present.
|
||
* @param {Object} obj Plain object or message instance
|
||
* @param {string} prop Property name
|
||
* @returns {boolean} `true` if considered to be present, otherwise `false`
|
||
*/
|
||
util.isSet = function isSet(obj, prop) {
|
||
var value = obj[prop];
|
||
if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins
|
||
return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;
|
||
return false;
|
||
};
|
||
|
||
/**
|
||
* Any compatible Buffer instance.
|
||
* This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.
|
||
* @interface Buffer
|
||
* @extends Uint8Array
|
||
*/
|
||
|
||
/**
|
||
* Node's Buffer class if available.
|
||
* @type {Constructor<Buffer>}
|
||
*/
|
||
util.Buffer = (function() {
|
||
try {
|
||
var Buffer = util.inquire("buffer").Buffer;
|
||
// refuse to use non-node buffers if not explicitly assigned (perf reasons):
|
||
return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;
|
||
} catch (e) {
|
||
/* istanbul ignore next */
|
||
return null;
|
||
}
|
||
})();
|
||
|
||
// Internal alias of or polyfull for Buffer.from.
|
||
util._Buffer_from = null;
|
||
|
||
// Internal alias of or polyfill for Buffer.allocUnsafe.
|
||
util._Buffer_allocUnsafe = null;
|
||
|
||
/**
|
||
* Creates a new buffer of whatever type supported by the environment.
|
||
* @param {number|number[]} [sizeOrArray=0] Buffer size or number array
|
||
* @returns {Uint8Array|Buffer} Buffer
|
||
*/
|
||
util.newBuffer = function newBuffer(sizeOrArray) {
|
||
/* istanbul ignore next */
|
||
return typeof sizeOrArray === "number"
|
||
? util.Buffer
|
||
? util._Buffer_allocUnsafe(sizeOrArray)
|
||
: new util.Array(sizeOrArray)
|
||
: util.Buffer
|
||
? util._Buffer_from(sizeOrArray)
|
||
: typeof Uint8Array === "undefined"
|
||
? sizeOrArray
|
||
: new Uint8Array(sizeOrArray);
|
||
};
|
||
|
||
/**
|
||
* Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.
|
||
* @type {Constructor<Uint8Array>}
|
||
*/
|
||
util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array;
|
||
|
||
/**
|
||
* Any compatible Long instance.
|
||
* This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.
|
||
* @interface Long
|
||
* @property {number} low Low bits
|
||
* @property {number} high High bits
|
||
* @property {boolean} unsigned Whether unsigned or not
|
||
*/
|
||
|
||
/**
|
||
* Long.js's Long class if available.
|
||
* @type {Constructor<Long>}
|
||
*/
|
||
util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long
|
||
|| /* istanbul ignore next */ util.global.Long
|
||
|| util.inquire("long");
|
||
|
||
/**
|
||
* Regular expression used to verify 2 bit (`bool`) map keys.
|
||
* @type {RegExp}
|
||
* @const
|
||
*/
|
||
util.key2Re = /^true|false|0|1$/;
|
||
|
||
/**
|
||
* Regular expression used to verify 32 bit (`int32` etc.) map keys.
|
||
* @type {RegExp}
|
||
* @const
|
||
*/
|
||
util.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
|
||
|
||
/**
|
||
* Regular expression used to verify 64 bit (`int64` etc.) map keys.
|
||
* @type {RegExp}
|
||
* @const
|
||
*/
|
||
util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
|
||
|
||
/**
|
||
* Converts a number or long to an 8 characters long hash string.
|
||
* @param {Long|number} value Value to convert
|
||
* @returns {string} Hash
|
||
*/
|
||
util.longToHash = function longToHash(value) {
|
||
return value
|
||
? util.LongBits.from(value).toHash()
|
||
: util.LongBits.zeroHash;
|
||
};
|
||
|
||
/**
|
||
* Converts an 8 characters long hash string to a long or number.
|
||
* @param {string} hash Hash
|
||
* @param {boolean} [unsigned=false] Whether unsigned or not
|
||
* @returns {Long|number} Original value
|
||
*/
|
||
util.longFromHash = function longFromHash(hash, unsigned) {
|
||
var bits = util.LongBits.fromHash(hash);
|
||
if (util.Long)
|
||
return util.Long.fromBits(bits.lo, bits.hi, unsigned);
|
||
return bits.toNumber(Boolean(unsigned));
|
||
};
|
||
|
||
/**
|
||
* Merges the properties of the source object into the destination object.
|
||
* @memberof util
|
||
* @param {Object.<string,*>} dst Destination object
|
||
* @param {Object.<string,*>} src Source object
|
||
* @param {boolean} [ifNotSet=false] Merges only if the key is not already set
|
||
* @returns {Object.<string,*>} Destination object
|
||
*/
|
||
function merge(dst, src, ifNotSet) { // used by converters
|
||
for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)
|
||
if (dst[keys[i]] === undefined || !ifNotSet)
|
||
dst[keys[i]] = src[keys[i]];
|
||
return dst;
|
||
}
|
||
|
||
util.merge = merge;
|
||
|
||
/**
|
||
* Converts the first character of a string to lower case.
|
||
* @param {string} str String to convert
|
||
* @returns {string} Converted string
|
||
*/
|
||
util.lcFirst = function lcFirst(str) {
|
||
return str.charAt(0).toLowerCase() + str.substring(1);
|
||
};
|
||
|
||
/**
|
||
* Creates a custom error constructor.
|
||
* @memberof util
|
||
* @param {string} name Error name
|
||
* @returns {Constructor<Error>} Custom error constructor
|
||
*/
|
||
function newError(name) {
|
||
|
||
function CustomError(message, properties) {
|
||
|
||
if (!(this instanceof CustomError))
|
||
return new CustomError(message, properties);
|
||
|
||
// Error.call(this, message);
|
||
// ^ just returns a new error instance because the ctor can be called as a function
|
||
|
||
Object.defineProperty(this, "message", { get: function() { return message; } });
|
||
|
||
/* istanbul ignore next */
|
||
if (Error.captureStackTrace) // node
|
||
Error.captureStackTrace(this, CustomError);
|
||
else
|
||
Object.defineProperty(this, "stack", { value: (new Error()).stack || "" });
|
||
|
||
if (properties)
|
||
merge(this, properties);
|
||
}
|
||
|
||
(CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;
|
||
|
||
Object.defineProperty(CustomError.prototype, "name", { get: function() { return name; } });
|
||
|
||
CustomError.prototype.toString = function toString() {
|
||
return this.name + ": " + this.message;
|
||
};
|
||
|
||
return CustomError;
|
||
}
|
||
|
||
util.newError = newError;
|
||
|
||
/**
|
||
* Constructs a new protocol error.
|
||
* @classdesc Error subclass indicating a protocol specifc error.
|
||
* @memberof util
|
||
* @extends Error
|
||
* @template T extends Message<T>
|
||
* @constructor
|
||
* @param {string} message Error message
|
||
* @param {Object.<string,*>} [properties] Additional properties
|
||
* @example
|
||
* try {
|
||
* MyMessage.decode(someBuffer); // throws if required fields are missing
|
||
* } catch (e) {
|
||
* if (e instanceof ProtocolError && e.instance)
|
||
* console.log("decoded so far: " + JSON.stringify(e.instance));
|
||
* }
|
||
*/
|
||
util.ProtocolError = newError("ProtocolError");
|
||
|
||
/**
|
||
* So far decoded message instance.
|
||
* @name util.ProtocolError#instance
|
||
* @type {Message<T>}
|
||
*/
|
||
|
||
/**
|
||
* A OneOf getter as returned by {@link util.oneOfGetter}.
|
||
* @typedef OneOfGetter
|
||
* @type {function}
|
||
* @returns {string|undefined} Set field name, if any
|
||
*/
|
||
|
||
/**
|
||
* Builds a getter for a oneof's present field name.
|
||
* @param {string[]} fieldNames Field names
|
||
* @returns {OneOfGetter} Unbound getter
|
||
*/
|
||
util.oneOfGetter = function getOneOf(fieldNames) {
|
||
var fieldMap = {};
|
||
for (var i = 0; i < fieldNames.length; ++i)
|
||
fieldMap[fieldNames[i]] = 1;
|
||
|
||
/**
|
||
* @returns {string|undefined} Set field name, if any
|
||
* @this Object
|
||
* @ignore
|
||
*/
|
||
return function() { // eslint-disable-line consistent-return
|
||
for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)
|
||
if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)
|
||
return keys[i];
|
||
};
|
||
};
|
||
|
||
/**
|
||
* A OneOf setter as returned by {@link util.oneOfSetter}.
|
||
* @typedef OneOfSetter
|
||
* @type {function}
|
||
* @param {string|undefined} value Field name
|
||
* @returns {undefined}
|
||
*/
|
||
|
||
/**
|
||
* Builds a setter for a oneof's present field name.
|
||
* @param {string[]} fieldNames Field names
|
||
* @returns {OneOfSetter} Unbound setter
|
||
*/
|
||
util.oneOfSetter = function setOneOf(fieldNames) {
|
||
|
||
/**
|
||
* @param {string} name Field name
|
||
* @returns {undefined}
|
||
* @this Object
|
||
* @ignore
|
||
*/
|
||
return function(name) {
|
||
for (var i = 0; i < fieldNames.length; ++i)
|
||
if (fieldNames[i] !== name)
|
||
delete this[fieldNames[i]];
|
||
};
|
||
};
|
||
|
||
/**
|
||
* Default conversion options used for {@link Message#toJSON} implementations.
|
||
*
|
||
* These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:
|
||
*
|
||
* - Longs become strings
|
||
* - Enums become string keys
|
||
* - Bytes become base64 encoded strings
|
||
* - (Sub-)Messages become plain objects
|
||
* - Maps become plain objects with all string keys
|
||
* - Repeated fields become arrays
|
||
* - NaN and Infinity for float and double fields become strings
|
||
*
|
||
* @type {IConversionOptions}
|
||
* @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json
|
||
*/
|
||
util.toJSONOptions = {
|
||
longs: String,
|
||
enums: String,
|
||
bytes: String,
|
||
json: true
|
||
};
|
||
|
||
// Sets up buffer utility according to the environment (called in index-minimal)
|
||
util._configure = function() {
|
||
var Buffer = util.Buffer;
|
||
/* istanbul ignore if */
|
||
if (!Buffer) {
|
||
util._Buffer_from = util._Buffer_allocUnsafe = null;
|
||
return;
|
||
}
|
||
// because node 4.x buffers are incompatible & immutable
|
||
// see: https://github.com/dcodeIO/protobuf.js/pull/665
|
||
util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||
|
||
/* istanbul ignore next */
|
||
function Buffer_from(value, encoding) {
|
||
return new Buffer(value, encoding);
|
||
};
|
||
util._Buffer_allocUnsafe = Buffer.allocUnsafe ||
|
||
/* istanbul ignore next */
|
||
function Buffer_allocUnsafe(size) {
|
||
return new Buffer(size);
|
||
};
|
||
};
|
||
|
||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/protobufjs/src/writer.js":
|
||
/*!***********************************************!*\
|
||
!*** ./node_modules/protobufjs/src/writer.js ***!
|
||
\***********************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
module.exports = Writer;
|
||
|
||
var util = __webpack_require__(/*! ./util/minimal */ "./node_modules/protobufjs/src/util/minimal.js");
|
||
|
||
var BufferWriter; // cyclic
|
||
|
||
var LongBits = util.LongBits,
|
||
base64 = util.base64,
|
||
utf8 = util.utf8;
|
||
|
||
/**
|
||
* Constructs a new writer operation instance.
|
||
* @classdesc Scheduled writer operation.
|
||
* @constructor
|
||
* @param {function(*, Uint8Array, number)} fn Function to call
|
||
* @param {number} len Value byte length
|
||
* @param {*} val Value to write
|
||
* @ignore
|
||
*/
|
||
function Op(fn, len, val) {
|
||
|
||
/**
|
||
* Function to call.
|
||
* @type {function(Uint8Array, number, *)}
|
||
*/
|
||
this.fn = fn;
|
||
|
||
/**
|
||
* Value byte length.
|
||
* @type {number}
|
||
*/
|
||
this.len = len;
|
||
|
||
/**
|
||
* Next operation.
|
||
* @type {Writer.Op|undefined}
|
||
*/
|
||
this.next = undefined;
|
||
|
||
/**
|
||
* Value to write.
|
||
* @type {*}
|
||
*/
|
||
this.val = val; // type varies
|
||
}
|
||
|
||
/* istanbul ignore next */
|
||
function noop() {} // eslint-disable-line no-empty-function
|
||
|
||
/**
|
||
* Constructs a new writer state instance.
|
||
* @classdesc Copied writer state.
|
||
* @memberof Writer
|
||
* @constructor
|
||
* @param {Writer} writer Writer to copy state from
|
||
* @ignore
|
||
*/
|
||
function State(writer) {
|
||
|
||
/**
|
||
* Current head.
|
||
* @type {Writer.Op}
|
||
*/
|
||
this.head = writer.head;
|
||
|
||
/**
|
||
* Current tail.
|
||
* @type {Writer.Op}
|
||
*/
|
||
this.tail = writer.tail;
|
||
|
||
/**
|
||
* Current buffer length.
|
||
* @type {number}
|
||
*/
|
||
this.len = writer.len;
|
||
|
||
/**
|
||
* Next state.
|
||
* @type {State|null}
|
||
*/
|
||
this.next = writer.states;
|
||
}
|
||
|
||
/**
|
||
* Constructs a new writer instance.
|
||
* @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.
|
||
* @constructor
|
||
*/
|
||
function Writer() {
|
||
|
||
/**
|
||
* Current length.
|
||
* @type {number}
|
||
*/
|
||
this.len = 0;
|
||
|
||
/**
|
||
* Operations head.
|
||
* @type {Object}
|
||
*/
|
||
this.head = new Op(noop, 0, 0);
|
||
|
||
/**
|
||
* Operations tail
|
||
* @type {Object}
|
||
*/
|
||
this.tail = this.head;
|
||
|
||
/**
|
||
* Linked forked states.
|
||
* @type {Object|null}
|
||
*/
|
||
this.states = null;
|
||
|
||
// When a value is written, the writer calculates its byte length and puts it into a linked
|
||
// list of operations to perform when finish() is called. This both allows us to allocate
|
||
// buffers of the exact required size and reduces the amount of work we have to do compared
|
||
// to first calculating over objects and then encoding over objects. In our case, the encoding
|
||
// part is just a linked list walk calling operations with already prepared values.
|
||
}
|
||
|
||
/**
|
||
* Creates a new writer.
|
||
* @function
|
||
* @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}
|
||
*/
|
||
Writer.create = util.Buffer
|
||
? function create_buffer_setup() {
|
||
return (Writer.create = function create_buffer() {
|
||
return new BufferWriter();
|
||
})();
|
||
}
|
||
/* istanbul ignore next */
|
||
: function create_array() {
|
||
return new Writer();
|
||
};
|
||
|
||
/**
|
||
* Allocates a buffer of the specified size.
|
||
* @param {number} size Buffer size
|
||
* @returns {Uint8Array} Buffer
|
||
*/
|
||
Writer.alloc = function alloc(size) {
|
||
return new util.Array(size);
|
||
};
|
||
|
||
// Use Uint8Array buffer pool in the browser, just like node does with buffers
|
||
/* istanbul ignore else */
|
||
if (util.Array !== Array)
|
||
Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);
|
||
|
||
/**
|
||
* Pushes a new operation to the queue.
|
||
* @param {function(Uint8Array, number, *)} fn Function to call
|
||
* @param {number} len Value byte length
|
||
* @param {number} val Value to write
|
||
* @returns {Writer} `this`
|
||
* @private
|
||
*/
|
||
Writer.prototype._push = function push(fn, len, val) {
|
||
this.tail = this.tail.next = new Op(fn, len, val);
|
||
this.len += len;
|
||
return this;
|
||
};
|
||
|
||
function writeByte(val, buf, pos) {
|
||
buf[pos] = val & 255;
|
||
}
|
||
|
||
function writeVarint32(val, buf, pos) {
|
||
while (val > 127) {
|
||
buf[pos++] = val & 127 | 128;
|
||
val >>>= 7;
|
||
}
|
||
buf[pos] = val;
|
||
}
|
||
|
||
/**
|
||
* Constructs a new varint writer operation instance.
|
||
* @classdesc Scheduled varint writer operation.
|
||
* @extends Op
|
||
* @constructor
|
||
* @param {number} len Value byte length
|
||
* @param {number} val Value to write
|
||
* @ignore
|
||
*/
|
||
function VarintOp(len, val) {
|
||
this.len = len;
|
||
this.next = undefined;
|
||
this.val = val;
|
||
}
|
||
|
||
VarintOp.prototype = Object.create(Op.prototype);
|
||
VarintOp.prototype.fn = writeVarint32;
|
||
|
||
/**
|
||
* Writes an unsigned 32 bit value as a varint.
|
||
* @param {number} value Value to write
|
||
* @returns {Writer} `this`
|
||
*/
|
||
Writer.prototype.uint32 = function write_uint32(value) {
|
||
// here, the call to this.push has been inlined and a varint specific Op subclass is used.
|
||
// uint32 is by far the most frequently used operation and benefits significantly from this.
|
||
this.len += (this.tail = this.tail.next = new VarintOp(
|
||
(value = value >>> 0)
|
||
< 128 ? 1
|
||
: value < 16384 ? 2
|
||
: value < 2097152 ? 3
|
||
: value < 268435456 ? 4
|
||
: 5,
|
||
value)).len;
|
||
return this;
|
||
};
|
||
|
||
/**
|
||
* Writes a signed 32 bit value as a varint.
|
||
* @function
|
||
* @param {number} value Value to write
|
||
* @returns {Writer} `this`
|
||
*/
|
||
Writer.prototype.int32 = function write_int32(value) {
|
||
return value < 0
|
||
? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec
|
||
: this.uint32(value);
|
||
};
|
||
|
||
/**
|
||
* Writes a 32 bit value as a varint, zig-zag encoded.
|
||
* @param {number} value Value to write
|
||
* @returns {Writer} `this`
|
||
*/
|
||
Writer.prototype.sint32 = function write_sint32(value) {
|
||
return this.uint32((value << 1 ^ value >> 31) >>> 0);
|
||
};
|
||
|
||
function writeVarint64(val, buf, pos) {
|
||
while (val.hi) {
|
||
buf[pos++] = val.lo & 127 | 128;
|
||
val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;
|
||
val.hi >>>= 7;
|
||
}
|
||
while (val.lo > 127) {
|
||
buf[pos++] = val.lo & 127 | 128;
|
||
val.lo = val.lo >>> 7;
|
||
}
|
||
buf[pos++] = val.lo;
|
||
}
|
||
|
||
/**
|
||
* Writes an unsigned 64 bit value as a varint.
|
||
* @param {Long|number|string} value Value to write
|
||
* @returns {Writer} `this`
|
||
* @throws {TypeError} If `value` is a string and no long library is present.
|
||
*/
|
||
Writer.prototype.uint64 = function write_uint64(value) {
|
||
var bits = LongBits.from(value);
|
||
return this._push(writeVarint64, bits.length(), bits);
|
||
};
|
||
|
||
/**
|
||
* Writes a signed 64 bit value as a varint.
|
||
* @function
|
||
* @param {Long|number|string} value Value to write
|
||
* @returns {Writer} `this`
|
||
* @throws {TypeError} If `value` is a string and no long library is present.
|
||
*/
|
||
Writer.prototype.int64 = Writer.prototype.uint64;
|
||
|
||
/**
|
||
* Writes a signed 64 bit value as a varint, zig-zag encoded.
|
||
* @param {Long|number|string} value Value to write
|
||
* @returns {Writer} `this`
|
||
* @throws {TypeError} If `value` is a string and no long library is present.
|
||
*/
|
||
Writer.prototype.sint64 = function write_sint64(value) {
|
||
var bits = LongBits.from(value).zzEncode();
|
||
return this._push(writeVarint64, bits.length(), bits);
|
||
};
|
||
|
||
/**
|
||
* Writes a boolish value as a varint.
|
||
* @param {boolean} value Value to write
|
||
* @returns {Writer} `this`
|
||
*/
|
||
Writer.prototype.bool = function write_bool(value) {
|
||
return this._push(writeByte, 1, value ? 1 : 0);
|
||
};
|
||
|
||
function writeFixed32(val, buf, pos) {
|
||
buf[pos ] = val & 255;
|
||
buf[pos + 1] = val >>> 8 & 255;
|
||
buf[pos + 2] = val >>> 16 & 255;
|
||
buf[pos + 3] = val >>> 24;
|
||
}
|
||
|
||
/**
|
||
* Writes an unsigned 32 bit value as fixed 32 bits.
|
||
* @param {number} value Value to write
|
||
* @returns {Writer} `this`
|
||
*/
|
||
Writer.prototype.fixed32 = function write_fixed32(value) {
|
||
return this._push(writeFixed32, 4, value >>> 0);
|
||
};
|
||
|
||
/**
|
||
* Writes a signed 32 bit value as fixed 32 bits.
|
||
* @function
|
||
* @param {number} value Value to write
|
||
* @returns {Writer} `this`
|
||
*/
|
||
Writer.prototype.sfixed32 = Writer.prototype.fixed32;
|
||
|
||
/**
|
||
* Writes an unsigned 64 bit value as fixed 64 bits.
|
||
* @param {Long|number|string} value Value to write
|
||
* @returns {Writer} `this`
|
||
* @throws {TypeError} If `value` is a string and no long library is present.
|
||
*/
|
||
Writer.prototype.fixed64 = function write_fixed64(value) {
|
||
var bits = LongBits.from(value);
|
||
return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);
|
||
};
|
||
|
||
/**
|
||
* Writes a signed 64 bit value as fixed 64 bits.
|
||
* @function
|
||
* @param {Long|number|string} value Value to write
|
||
* @returns {Writer} `this`
|
||
* @throws {TypeError} If `value` is a string and no long library is present.
|
||
*/
|
||
Writer.prototype.sfixed64 = Writer.prototype.fixed64;
|
||
|
||
/**
|
||
* Writes a float (32 bit).
|
||
* @function
|
||
* @param {number} value Value to write
|
||
* @returns {Writer} `this`
|
||
*/
|
||
Writer.prototype.float = function write_float(value) {
|
||
return this._push(util.float.writeFloatLE, 4, value);
|
||
};
|
||
|
||
/**
|
||
* Writes a double (64 bit float).
|
||
* @function
|
||
* @param {number} value Value to write
|
||
* @returns {Writer} `this`
|
||
*/
|
||
Writer.prototype.double = function write_double(value) {
|
||
return this._push(util.float.writeDoubleLE, 8, value);
|
||
};
|
||
|
||
var writeBytes = util.Array.prototype.set
|
||
? function writeBytes_set(val, buf, pos) {
|
||
buf.set(val, pos); // also works for plain array values
|
||
}
|
||
/* istanbul ignore next */
|
||
: function writeBytes_for(val, buf, pos) {
|
||
for (var i = 0; i < val.length; ++i)
|
||
buf[pos + i] = val[i];
|
||
};
|
||
|
||
/**
|
||
* Writes a sequence of bytes.
|
||
* @param {Uint8Array|string} value Buffer or base64 encoded string to write
|
||
* @returns {Writer} `this`
|
||
*/
|
||
Writer.prototype.bytes = function write_bytes(value) {
|
||
var len = value.length >>> 0;
|
||
if (!len)
|
||
return this._push(writeByte, 1, 0);
|
||
if (util.isString(value)) {
|
||
var buf = Writer.alloc(len = base64.length(value));
|
||
base64.decode(value, buf, 0);
|
||
value = buf;
|
||
}
|
||
return this.uint32(len)._push(writeBytes, len, value);
|
||
};
|
||
|
||
/**
|
||
* Writes a string.
|
||
* @param {string} value Value to write
|
||
* @returns {Writer} `this`
|
||
*/
|
||
Writer.prototype.string = function write_string(value) {
|
||
var len = utf8.length(value);
|
||
return len
|
||
? this.uint32(len)._push(utf8.write, len, value)
|
||
: this._push(writeByte, 1, 0);
|
||
};
|
||
|
||
/**
|
||
* Forks this writer's state by pushing it to a stack.
|
||
* Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.
|
||
* @returns {Writer} `this`
|
||
*/
|
||
Writer.prototype.fork = function fork() {
|
||
this.states = new State(this);
|
||
this.head = this.tail = new Op(noop, 0, 0);
|
||
this.len = 0;
|
||
return this;
|
||
};
|
||
|
||
/**
|
||
* Resets this instance to the last state.
|
||
* @returns {Writer} `this`
|
||
*/
|
||
Writer.prototype.reset = function reset() {
|
||
if (this.states) {
|
||
this.head = this.states.head;
|
||
this.tail = this.states.tail;
|
||
this.len = this.states.len;
|
||
this.states = this.states.next;
|
||
} else {
|
||
this.head = this.tail = new Op(noop, 0, 0);
|
||
this.len = 0;
|
||
}
|
||
return this;
|
||
};
|
||
|
||
/**
|
||
* Resets to the last state and appends the fork state's current write length as a varint followed by its operations.
|
||
* @returns {Writer} `this`
|
||
*/
|
||
Writer.prototype.ldelim = function ldelim() {
|
||
var head = this.head,
|
||
tail = this.tail,
|
||
len = this.len;
|
||
this.reset().uint32(len);
|
||
if (len) {
|
||
this.tail.next = head.next; // skip noop
|
||
this.tail = tail;
|
||
this.len += len;
|
||
}
|
||
return this;
|
||
};
|
||
|
||
/**
|
||
* Finishes the write operation.
|
||
* @returns {Uint8Array} Finished buffer
|
||
*/
|
||
Writer.prototype.finish = function finish() {
|
||
var head = this.head.next, // skip noop
|
||
buf = this.constructor.alloc(this.len),
|
||
pos = 0;
|
||
while (head) {
|
||
head.fn(head.val, buf, pos);
|
||
pos += head.len;
|
||
head = head.next;
|
||
}
|
||
// this.head = this.tail = null;
|
||
return buf;
|
||
};
|
||
|
||
Writer._configure = function(BufferWriter_) {
|
||
BufferWriter = BufferWriter_;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/protobufjs/src/writer_buffer.js":
|
||
/*!******************************************************!*\
|
||
!*** ./node_modules/protobufjs/src/writer_buffer.js ***!
|
||
\******************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
module.exports = BufferWriter;
|
||
|
||
// extends Writer
|
||
var Writer = __webpack_require__(/*! ./writer */ "./node_modules/protobufjs/src/writer.js");
|
||
(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;
|
||
|
||
var util = __webpack_require__(/*! ./util/minimal */ "./node_modules/protobufjs/src/util/minimal.js");
|
||
|
||
var Buffer = util.Buffer;
|
||
|
||
/**
|
||
* Constructs a new buffer writer instance.
|
||
* @classdesc Wire format writer using node buffers.
|
||
* @extends Writer
|
||
* @constructor
|
||
*/
|
||
function BufferWriter() {
|
||
Writer.call(this);
|
||
}
|
||
|
||
/**
|
||
* Allocates a buffer of the specified size.
|
||
* @param {number} size Buffer size
|
||
* @returns {Buffer} Buffer
|
||
*/
|
||
BufferWriter.alloc = function alloc_buffer(size) {
|
||
return (BufferWriter.alloc = util._Buffer_allocUnsafe)(size);
|
||
};
|
||
|
||
var writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === "set"
|
||
? function writeBytesBuffer_set(val, buf, pos) {
|
||
buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)
|
||
// also works for plain array values
|
||
}
|
||
/* istanbul ignore next */
|
||
: function writeBytesBuffer_copy(val, buf, pos) {
|
||
if (val.copy) // Buffer values
|
||
val.copy(buf, pos, 0, val.length);
|
||
else for (var i = 0; i < val.length;) // plain array values
|
||
buf[pos++] = val[i++];
|
||
};
|
||
|
||
/**
|
||
* @override
|
||
*/
|
||
BufferWriter.prototype.bytes = function write_bytes_buffer(value) {
|
||
if (util.isString(value))
|
||
value = util._Buffer_from(value, "base64");
|
||
var len = value.length >>> 0;
|
||
this.uint32(len);
|
||
if (len)
|
||
this._push(writeBytesBuffer, len, value);
|
||
return this;
|
||
};
|
||
|
||
function writeStringBuffer(val, buf, pos) {
|
||
if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)
|
||
util.utf8.write(val, buf, pos);
|
||
else
|
||
buf.utf8Write(val, pos);
|
||
}
|
||
|
||
/**
|
||
* @override
|
||
*/
|
||
BufferWriter.prototype.string = function write_string_buffer(value) {
|
||
var len = Buffer.byteLength(value);
|
||
this.uint32(len);
|
||
if (len)
|
||
this._push(writeStringBuffer, len, value);
|
||
return this;
|
||
};
|
||
|
||
|
||
/**
|
||
* Finishes the write operation.
|
||
* @name BufferWriter#finish
|
||
* @function
|
||
* @returns {Buffer} Finished buffer
|
||
*/
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-dom/cjs/react-dom.development.js":
|
||
/*!*************************************************************!*\
|
||
!*** ./node_modules/react-dom/cjs/react-dom.development.js ***!
|
||
\*************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/** @license React v16.7.0
|
||
* react-dom.development.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
if (true) {
|
||
(function() {
|
||
'use strict';
|
||
|
||
var React = __webpack_require__(/*! react */ "./node_modules/react/index.js");
|
||
var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
|
||
var checkPropTypes = __webpack_require__(/*! prop-types/checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
|
||
var scheduler = __webpack_require__(/*! scheduler */ "./node_modules/scheduler/index.js");
|
||
var tracing = __webpack_require__(/*! scheduler/tracing */ "./node_modules/scheduler/tracing.js");
|
||
|
||
/**
|
||
* Use invariant() to assert state which your program assumes to be true.
|
||
*
|
||
* Provide sprintf-style format (only %s is supported) and arguments
|
||
* to provide information about what broke and what you were
|
||
* expecting.
|
||
*
|
||
* The invariant message will be stripped in production, but the invariant
|
||
* will remain to ensure logic does not differ in production.
|
||
*/
|
||
|
||
var validateFormat = function () {};
|
||
|
||
{
|
||
validateFormat = function (format) {
|
||
if (format === undefined) {
|
||
throw new Error('invariant requires an error message argument');
|
||
}
|
||
};
|
||
}
|
||
|
||
function invariant(condition, format, a, b, c, d, e, f) {
|
||
validateFormat(format);
|
||
|
||
if (!condition) {
|
||
var error = void 0;
|
||
if (format === undefined) {
|
||
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
||
} else {
|
||
var args = [a, b, c, d, e, f];
|
||
var argIndex = 0;
|
||
error = new Error(format.replace(/%s/g, function () {
|
||
return args[argIndex++];
|
||
}));
|
||
error.name = 'Invariant Violation';
|
||
}
|
||
|
||
error.framesToPop = 1; // we don't care about invariant's own frame
|
||
throw error;
|
||
}
|
||
}
|
||
|
||
// Relying on the `invariant()` implementation lets us
|
||
// preserve the format and params in the www builds.
|
||
|
||
!React ? invariant(false, 'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.') : void 0;
|
||
|
||
var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) {
|
||
var funcArgs = Array.prototype.slice.call(arguments, 3);
|
||
try {
|
||
func.apply(context, funcArgs);
|
||
} catch (error) {
|
||
this.onError(error);
|
||
}
|
||
};
|
||
|
||
{
|
||
// In DEV mode, we swap out invokeGuardedCallback for a special version
|
||
// that plays more nicely with the browser's DevTools. The idea is to preserve
|
||
// "Pause on exceptions" behavior. Because React wraps all user-provided
|
||
// functions in invokeGuardedCallback, and the production version of
|
||
// invokeGuardedCallback uses a try-catch, all user exceptions are treated
|
||
// like caught exceptions, and the DevTools won't pause unless the developer
|
||
// takes the extra step of enabling pause on caught exceptions. This is
|
||
// untintuitive, though, because even though React has caught the error, from
|
||
// the developer's perspective, the error is uncaught.
|
||
//
|
||
// To preserve the expected "Pause on exceptions" behavior, we don't use a
|
||
// try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
|
||
// DOM node, and call the user-provided callback from inside an event handler
|
||
// for that fake event. If the callback throws, the error is "captured" using
|
||
// a global event handler. But because the error happens in a different
|
||
// event loop context, it does not interrupt the normal program flow.
|
||
// Effectively, this gives us try-catch behavior without actually using
|
||
// try-catch. Neat!
|
||
|
||
// Check that the browser supports the APIs we need to implement our special
|
||
// DEV version of invokeGuardedCallback
|
||
if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
|
||
var fakeNode = document.createElement('react');
|
||
|
||
var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) {
|
||
// If document doesn't exist we know for sure we will crash in this method
|
||
// when we call document.createEvent(). However this can cause confusing
|
||
// errors: https://github.com/facebookincubator/create-react-app/issues/3482
|
||
// So we preemptively throw with a better message instead.
|
||
!(typeof document !== 'undefined') ? invariant(false, 'The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.') : void 0;
|
||
var evt = document.createEvent('Event');
|
||
|
||
// Keeps track of whether the user-provided callback threw an error. We
|
||
// set this to true at the beginning, then set it to false right after
|
||
// calling the function. If the function errors, `didError` will never be
|
||
// set to false. This strategy works even if the browser is flaky and
|
||
// fails to call our global error handler, because it doesn't rely on
|
||
// the error event at all.
|
||
var didError = true;
|
||
|
||
// Keeps track of the value of window.event so that we can reset it
|
||
// during the callback to let user code access window.event in the
|
||
// browsers that support it.
|
||
var windowEvent = window.event;
|
||
|
||
// Keeps track of the descriptor of window.event to restore it after event
|
||
// dispatching: https://github.com/facebook/react/issues/13688
|
||
var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');
|
||
|
||
// Create an event handler for our fake event. We will synchronously
|
||
// dispatch our fake event using `dispatchEvent`. Inside the handler, we
|
||
// call the user-provided callback.
|
||
var funcArgs = Array.prototype.slice.call(arguments, 3);
|
||
function callCallback() {
|
||
// We immediately remove the callback from event listeners so that
|
||
// nested `invokeGuardedCallback` calls do not clash. Otherwise, a
|
||
// nested call would trigger the fake event handlers of any call higher
|
||
// in the stack.
|
||
fakeNode.removeEventListener(evtType, callCallback, false);
|
||
|
||
// We check for window.hasOwnProperty('event') to prevent the
|
||
// window.event assignment in both IE <= 10 as they throw an error
|
||
// "Member not found" in strict mode, and in Firefox which does not
|
||
// support window.event.
|
||
if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
|
||
window.event = windowEvent;
|
||
}
|
||
|
||
func.apply(context, funcArgs);
|
||
didError = false;
|
||
}
|
||
|
||
// Create a global error event handler. We use this to capture the value
|
||
// that was thrown. It's possible that this error handler will fire more
|
||
// than once; for example, if non-React code also calls `dispatchEvent`
|
||
// and a handler for that event throws. We should be resilient to most of
|
||
// those cases. Even if our error event handler fires more than once, the
|
||
// last error event is always used. If the callback actually does error,
|
||
// we know that the last error event is the correct one, because it's not
|
||
// possible for anything else to have happened in between our callback
|
||
// erroring and the code that follows the `dispatchEvent` call below. If
|
||
// the callback doesn't error, but the error event was fired, we know to
|
||
// ignore it because `didError` will be false, as described above.
|
||
var error = void 0;
|
||
// Use this to track whether the error event is ever called.
|
||
var didSetError = false;
|
||
var isCrossOriginError = false;
|
||
|
||
function handleWindowError(event) {
|
||
error = event.error;
|
||
didSetError = true;
|
||
if (error === null && event.colno === 0 && event.lineno === 0) {
|
||
isCrossOriginError = true;
|
||
}
|
||
if (event.defaultPrevented) {
|
||
// Some other error handler has prevented default.
|
||
// Browsers silence the error report if this happens.
|
||
// We'll remember this to later decide whether to log it or not.
|
||
if (error != null && typeof error === 'object') {
|
||
try {
|
||
error._suppressLogging = true;
|
||
} catch (inner) {
|
||
// Ignore.
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
// Create a fake event type.
|
||
var evtType = 'react-' + (name ? name : 'invokeguardedcallback');
|
||
|
||
// Attach our event handlers
|
||
window.addEventListener('error', handleWindowError);
|
||
fakeNode.addEventListener(evtType, callCallback, false);
|
||
|
||
// Synchronously dispatch our fake event. If the user-provided function
|
||
// errors, it will trigger our global error handler.
|
||
evt.initEvent(evtType, false, false);
|
||
fakeNode.dispatchEvent(evt);
|
||
|
||
if (windowEventDescriptor) {
|
||
Object.defineProperty(window, 'event', windowEventDescriptor);
|
||
}
|
||
|
||
if (didError) {
|
||
if (!didSetError) {
|
||
// The callback errored, but the error event never fired.
|
||
error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
|
||
} else if (isCrossOriginError) {
|
||
error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://fb.me/react-crossorigin-error for more information.');
|
||
}
|
||
this.onError(error);
|
||
}
|
||
|
||
// Remove our event listeners
|
||
window.removeEventListener('error', handleWindowError);
|
||
};
|
||
|
||
invokeGuardedCallbackImpl = invokeGuardedCallbackDev;
|
||
}
|
||
}
|
||
|
||
var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
|
||
|
||
// Used by Fiber to simulate a try-catch.
|
||
var hasError = false;
|
||
var caughtError = null;
|
||
|
||
// Used by event system to capture/rethrow the first error.
|
||
var hasRethrowError = false;
|
||
var rethrowError = null;
|
||
|
||
var reporter = {
|
||
onError: function (error) {
|
||
hasError = true;
|
||
caughtError = error;
|
||
}
|
||
};
|
||
|
||
/**
|
||
* Call a function while guarding against errors that happens within it.
|
||
* Returns an error if it throws, otherwise null.
|
||
*
|
||
* In production, this is implemented using a try-catch. The reason we don't
|
||
* use a try-catch directly is so that we can swap out a different
|
||
* implementation in DEV mode.
|
||
*
|
||
* @param {String} name of the guard to use for logging or debugging
|
||
* @param {Function} func The function to invoke
|
||
* @param {*} context The context to use when calling the function
|
||
* @param {...*} args Arguments for function
|
||
*/
|
||
function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
|
||
hasError = false;
|
||
caughtError = null;
|
||
invokeGuardedCallbackImpl$1.apply(reporter, arguments);
|
||
}
|
||
|
||
/**
|
||
* Same as invokeGuardedCallback, but instead of returning an error, it stores
|
||
* it in a global so it can be rethrown by `rethrowCaughtError` later.
|
||
* TODO: See if caughtError and rethrowError can be unified.
|
||
*
|
||
* @param {String} name of the guard to use for logging or debugging
|
||
* @param {Function} func The function to invoke
|
||
* @param {*} context The context to use when calling the function
|
||
* @param {...*} args Arguments for function
|
||
*/
|
||
function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
|
||
invokeGuardedCallback.apply(this, arguments);
|
||
if (hasError) {
|
||
var error = clearCaughtError();
|
||
if (!hasRethrowError) {
|
||
hasRethrowError = true;
|
||
rethrowError = error;
|
||
}
|
||
}
|
||
}
|
||
|
||
/**
|
||
* During execution of guarded functions we will capture the first error which
|
||
* we will rethrow to be handled by the top level error handler.
|
||
*/
|
||
function rethrowCaughtError() {
|
||
if (hasRethrowError) {
|
||
var error = rethrowError;
|
||
hasRethrowError = false;
|
||
rethrowError = null;
|
||
throw error;
|
||
}
|
||
}
|
||
|
||
function hasCaughtError() {
|
||
return hasError;
|
||
}
|
||
|
||
function clearCaughtError() {
|
||
if (hasError) {
|
||
var error = caughtError;
|
||
hasError = false;
|
||
caughtError = null;
|
||
return error;
|
||
} else {
|
||
invariant(false, 'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.');
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Injectable ordering of event plugins.
|
||
*/
|
||
var eventPluginOrder = null;
|
||
|
||
/**
|
||
* Injectable mapping from names to event plugin modules.
|
||
*/
|
||
var namesToPlugins = {};
|
||
|
||
/**
|
||
* Recomputes the plugin list using the injected plugins and plugin ordering.
|
||
*
|
||
* @private
|
||
*/
|
||
function recomputePluginOrdering() {
|
||
if (!eventPluginOrder) {
|
||
// Wait until an `eventPluginOrder` is injected.
|
||
return;
|
||
}
|
||
for (var pluginName in namesToPlugins) {
|
||
var pluginModule = namesToPlugins[pluginName];
|
||
var pluginIndex = eventPluginOrder.indexOf(pluginName);
|
||
!(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;
|
||
if (plugins[pluginIndex]) {
|
||
continue;
|
||
}
|
||
!pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;
|
||
plugins[pluginIndex] = pluginModule;
|
||
var publishedEvents = pluginModule.eventTypes;
|
||
for (var eventName in publishedEvents) {
|
||
!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;
|
||
}
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Publishes an event so that it can be dispatched by the supplied plugin.
|
||
*
|
||
* @param {object} dispatchConfig Dispatch configuration for the event.
|
||
* @param {object} PluginModule Plugin publishing the event.
|
||
* @return {boolean} True if the event was successfully published.
|
||
* @private
|
||
*/
|
||
function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
|
||
!!eventNameDispatchConfigs.hasOwnProperty(eventName) ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : void 0;
|
||
eventNameDispatchConfigs[eventName] = dispatchConfig;
|
||
|
||
var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
|
||
if (phasedRegistrationNames) {
|
||
for (var phaseName in phasedRegistrationNames) {
|
||
if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
|
||
var phasedRegistrationName = phasedRegistrationNames[phaseName];
|
||
publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
|
||
}
|
||
}
|
||
return true;
|
||
} else if (dispatchConfig.registrationName) {
|
||
publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
/**
|
||
* Publishes a registration name that is used to identify dispatched events.
|
||
*
|
||
* @param {string} registrationName Registration name to add.
|
||
* @param {object} PluginModule Plugin publishing the event.
|
||
* @private
|
||
*/
|
||
function publishRegistrationName(registrationName, pluginModule, eventName) {
|
||
!!registrationNameModules[registrationName] ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : void 0;
|
||
registrationNameModules[registrationName] = pluginModule;
|
||
registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
|
||
|
||
{
|
||
var lowerCasedName = registrationName.toLowerCase();
|
||
possibleRegistrationNames[lowerCasedName] = registrationName;
|
||
|
||
if (registrationName === 'onDoubleClick') {
|
||
possibleRegistrationNames.ondblclick = registrationName;
|
||
}
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Registers plugins so that they can extract and dispatch events.
|
||
*
|
||
* @see {EventPluginHub}
|
||
*/
|
||
|
||
/**
|
||
* Ordered list of injected plugins.
|
||
*/
|
||
var plugins = [];
|
||
|
||
/**
|
||
* Mapping from event name to dispatch config
|
||
*/
|
||
var eventNameDispatchConfigs = {};
|
||
|
||
/**
|
||
* Mapping from registration name to plugin module
|
||
*/
|
||
var registrationNameModules = {};
|
||
|
||
/**
|
||
* Mapping from registration name to event name
|
||
*/
|
||
var registrationNameDependencies = {};
|
||
|
||
/**
|
||
* Mapping from lowercase registration names to the properly cased version,
|
||
* used to warn in the case of missing event handlers. Available
|
||
* only in true.
|
||
* @type {Object}
|
||
*/
|
||
var possibleRegistrationNames = {};
|
||
// Trust the developer to only use possibleRegistrationNames in true
|
||
|
||
/**
|
||
* Injects an ordering of plugins (by plugin name). This allows the ordering
|
||
* to be decoupled from injection of the actual plugins so that ordering is
|
||
* always deterministic regardless of packaging, on-the-fly injection, etc.
|
||
*
|
||
* @param {array} InjectedEventPluginOrder
|
||
* @internal
|
||
* @see {EventPluginHub.injection.injectEventPluginOrder}
|
||
*/
|
||
function injectEventPluginOrder(injectedEventPluginOrder) {
|
||
!!eventPluginOrder ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : void 0;
|
||
// Clone the ordering so it cannot be dynamically mutated.
|
||
eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
|
||
recomputePluginOrdering();
|
||
}
|
||
|
||
/**
|
||
* Injects plugins to be used by `EventPluginHub`. The plugin names must be
|
||
* in the ordering injected by `injectEventPluginOrder`.
|
||
*
|
||
* Plugins can be injected as part of page initialization or on-the-fly.
|
||
*
|
||
* @param {object} injectedNamesToPlugins Map from names to plugin modules.
|
||
* @internal
|
||
* @see {EventPluginHub.injection.injectEventPluginsByName}
|
||
*/
|
||
function injectEventPluginsByName(injectedNamesToPlugins) {
|
||
var isOrderingDirty = false;
|
||
for (var pluginName in injectedNamesToPlugins) {
|
||
if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
|
||
continue;
|
||
}
|
||
var pluginModule = injectedNamesToPlugins[pluginName];
|
||
if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
|
||
!!namesToPlugins[pluginName] ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : void 0;
|
||
namesToPlugins[pluginName] = pluginModule;
|
||
isOrderingDirty = true;
|
||
}
|
||
}
|
||
if (isOrderingDirty) {
|
||
recomputePluginOrdering();
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Similar to invariant but only logs a warning if the condition is not met.
|
||
* This can be used to log issues in development environments in critical
|
||
* paths. Removing the logging code for production environments will keep the
|
||
* same logic and follow the same code paths.
|
||
*/
|
||
|
||
var warningWithoutStack = function () {};
|
||
|
||
{
|
||
warningWithoutStack = function (condition, format) {
|
||
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
||
args[_key - 2] = arguments[_key];
|
||
}
|
||
|
||
if (format === undefined) {
|
||
throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
|
||
}
|
||
if (args.length > 8) {
|
||
// Check before the condition to catch violations early.
|
||
throw new Error('warningWithoutStack() currently supports at most 8 arguments.');
|
||
}
|
||
if (condition) {
|
||
return;
|
||
}
|
||
if (typeof console !== 'undefined') {
|
||
var argsWithFormat = args.map(function (item) {
|
||
return '' + item;
|
||
});
|
||
argsWithFormat.unshift('Warning: ' + format);
|
||
|
||
// We intentionally don't use spread (or .apply) directly because it
|
||
// breaks IE9: https://github.com/facebook/react/issues/13610
|
||
Function.prototype.apply.call(console.error, console, argsWithFormat);
|
||
}
|
||
try {
|
||
// --- Welcome to debugging React ---
|
||
// This error was thrown as a convenience so that you can use this stack
|
||
// to find the callsite that caused this warning to fire.
|
||
var argIndex = 0;
|
||
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
||
return args[argIndex++];
|
||
});
|
||
throw new Error(message);
|
||
} catch (x) {}
|
||
};
|
||
}
|
||
|
||
var warningWithoutStack$1 = warningWithoutStack;
|
||
|
||
var getFiberCurrentPropsFromNode = null;
|
||
var getInstanceFromNode = null;
|
||
var getNodeFromInstance = null;
|
||
|
||
function setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) {
|
||
getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;
|
||
getInstanceFromNode = getInstanceFromNodeImpl;
|
||
getNodeFromInstance = getNodeFromInstanceImpl;
|
||
{
|
||
!(getNodeFromInstance && getInstanceFromNode) ? warningWithoutStack$1(false, 'EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
|
||
}
|
||
}
|
||
|
||
var validateEventDispatches = void 0;
|
||
{
|
||
validateEventDispatches = function (event) {
|
||
var dispatchListeners = event._dispatchListeners;
|
||
var dispatchInstances = event._dispatchInstances;
|
||
|
||
var listenersIsArr = Array.isArray(dispatchListeners);
|
||
var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
|
||
|
||
var instancesIsArr = Array.isArray(dispatchInstances);
|
||
var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
|
||
|
||
!(instancesIsArr === listenersIsArr && instancesLen === listenersLen) ? warningWithoutStack$1(false, 'EventPluginUtils: Invalid `event`.') : void 0;
|
||
};
|
||
}
|
||
|
||
/**
|
||
* Dispatch the event to the listener.
|
||
* @param {SyntheticEvent} event SyntheticEvent to handle
|
||
* @param {function} listener Application-level callback
|
||
* @param {*} inst Internal component instance
|
||
*/
|
||
function executeDispatch(event, listener, inst) {
|
||
var type = event.type || 'unknown-event';
|
||
event.currentTarget = getNodeFromInstance(inst);
|
||
invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
|
||
event.currentTarget = null;
|
||
}
|
||
|
||
/**
|
||
* Standard/simple iteration through an event's collected dispatches.
|
||
*/
|
||
function executeDispatchesInOrder(event) {
|
||
var dispatchListeners = event._dispatchListeners;
|
||
var dispatchInstances = event._dispatchInstances;
|
||
{
|
||
validateEventDispatches(event);
|
||
}
|
||
if (Array.isArray(dispatchListeners)) {
|
||
for (var i = 0; i < dispatchListeners.length; i++) {
|
||
if (event.isPropagationStopped()) {
|
||
break;
|
||
}
|
||
// Listeners and Instances are two parallel arrays that are always in sync.
|
||
executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);
|
||
}
|
||
} else if (dispatchListeners) {
|
||
executeDispatch(event, dispatchListeners, dispatchInstances);
|
||
}
|
||
event._dispatchListeners = null;
|
||
event._dispatchInstances = null;
|
||
}
|
||
|
||
/**
|
||
* @see executeDispatchesInOrderStopAtTrueImpl
|
||
*/
|
||
|
||
|
||
/**
|
||
* Execution of a "direct" dispatch - there must be at most one dispatch
|
||
* accumulated on the event or it is considered an error. It doesn't really make
|
||
* sense for an event with multiple dispatches (bubbled) to keep track of the
|
||
* return values at each dispatch execution, but it does tend to make sense when
|
||
* dealing with "direct" dispatches.
|
||
*
|
||
* @return {*} The return value of executing the single dispatch.
|
||
*/
|
||
|
||
|
||
/**
|
||
* @param {SyntheticEvent} event
|
||
* @return {boolean} True iff number of dispatches accumulated is greater than 0.
|
||
*/
|
||
|
||
/**
|
||
* Accumulates items that must not be null or undefined into the first one. This
|
||
* is used to conserve memory by avoiding array allocations, and thus sacrifices
|
||
* API cleanness. Since `current` can be null before being passed in and not
|
||
* null after this function, make sure to assign it back to `current`:
|
||
*
|
||
* `a = accumulateInto(a, b);`
|
||
*
|
||
* This API should be sparingly used. Try `accumulate` for something cleaner.
|
||
*
|
||
* @return {*|array<*>} An accumulation of items.
|
||
*/
|
||
|
||
function accumulateInto(current, next) {
|
||
!(next != null) ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : void 0;
|
||
|
||
if (current == null) {
|
||
return next;
|
||
}
|
||
|
||
// Both are not empty. Warning: Never call x.concat(y) when you are not
|
||
// certain that x is an Array (x could be a string with concat method).
|
||
if (Array.isArray(current)) {
|
||
if (Array.isArray(next)) {
|
||
current.push.apply(current, next);
|
||
return current;
|
||
}
|
||
current.push(next);
|
||
return current;
|
||
}
|
||
|
||
if (Array.isArray(next)) {
|
||
// A bit too dangerous to mutate `next`.
|
||
return [current].concat(next);
|
||
}
|
||
|
||
return [current, next];
|
||
}
|
||
|
||
/**
|
||
* @param {array} arr an "accumulation" of items which is either an Array or
|
||
* a single item. Useful when paired with the `accumulate` module. This is a
|
||
* simple utility that allows us to reason about a collection of items, but
|
||
* handling the case when there is exactly one item (and we do not need to
|
||
* allocate an array).
|
||
* @param {function} cb Callback invoked with each element or a collection.
|
||
* @param {?} [scope] Scope used as `this` in a callback.
|
||
*/
|
||
function forEachAccumulated(arr, cb, scope) {
|
||
if (Array.isArray(arr)) {
|
||
arr.forEach(cb, scope);
|
||
} else if (arr) {
|
||
cb.call(scope, arr);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Internal queue of events that have accumulated their dispatches and are
|
||
* waiting to have their dispatches executed.
|
||
*/
|
||
var eventQueue = null;
|
||
|
||
/**
|
||
* Dispatches an event and releases it back into the pool, unless persistent.
|
||
*
|
||
* @param {?object} event Synthetic event to be dispatched.
|
||
* @private
|
||
*/
|
||
var executeDispatchesAndRelease = function (event) {
|
||
if (event) {
|
||
executeDispatchesInOrder(event);
|
||
|
||
if (!event.isPersistent()) {
|
||
event.constructor.release(event);
|
||
}
|
||
}
|
||
};
|
||
var executeDispatchesAndReleaseTopLevel = function (e) {
|
||
return executeDispatchesAndRelease(e);
|
||
};
|
||
|
||
function isInteractive(tag) {
|
||
return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
|
||
}
|
||
|
||
function shouldPreventMouseEvent(name, type, props) {
|
||
switch (name) {
|
||
case 'onClick':
|
||
case 'onClickCapture':
|
||
case 'onDoubleClick':
|
||
case 'onDoubleClickCapture':
|
||
case 'onMouseDown':
|
||
case 'onMouseDownCapture':
|
||
case 'onMouseMove':
|
||
case 'onMouseMoveCapture':
|
||
case 'onMouseUp':
|
||
case 'onMouseUpCapture':
|
||
return !!(props.disabled && isInteractive(type));
|
||
default:
|
||
return false;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* This is a unified interface for event plugins to be installed and configured.
|
||
*
|
||
* Event plugins can implement the following properties:
|
||
*
|
||
* `extractEvents` {function(string, DOMEventTarget, string, object): *}
|
||
* Required. When a top-level event is fired, this method is expected to
|
||
* extract synthetic events that will in turn be queued and dispatched.
|
||
*
|
||
* `eventTypes` {object}
|
||
* Optional, plugins that fire events must publish a mapping of registration
|
||
* names that are used to register listeners. Values of this mapping must
|
||
* be objects that contain `registrationName` or `phasedRegistrationNames`.
|
||
*
|
||
* `executeDispatch` {function(object, function, string)}
|
||
* Optional, allows plugins to override how an event gets dispatched. By
|
||
* default, the listener is simply invoked.
|
||
*
|
||
* Each plugin that is injected into `EventsPluginHub` is immediately operable.
|
||
*
|
||
* @public
|
||
*/
|
||
|
||
/**
|
||
* Methods for injecting dependencies.
|
||
*/
|
||
var injection = {
|
||
/**
|
||
* @param {array} InjectedEventPluginOrder
|
||
* @public
|
||
*/
|
||
injectEventPluginOrder: injectEventPluginOrder,
|
||
|
||
/**
|
||
* @param {object} injectedNamesToPlugins Map from names to plugin modules.
|
||
*/
|
||
injectEventPluginsByName: injectEventPluginsByName
|
||
};
|
||
|
||
/**
|
||
* @param {object} inst The instance, which is the source of events.
|
||
* @param {string} registrationName Name of listener (e.g. `onClick`).
|
||
* @return {?function} The stored callback.
|
||
*/
|
||
function getListener(inst, registrationName) {
|
||
var listener = void 0;
|
||
|
||
// TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
|
||
// live here; needs to be moved to a better place soon
|
||
var stateNode = inst.stateNode;
|
||
if (!stateNode) {
|
||
// Work in progress (ex: onload events in incremental mode).
|
||
return null;
|
||
}
|
||
var props = getFiberCurrentPropsFromNode(stateNode);
|
||
if (!props) {
|
||
// Work in progress.
|
||
return null;
|
||
}
|
||
listener = props[registrationName];
|
||
if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
|
||
return null;
|
||
}
|
||
!(!listener || typeof listener === 'function') ? invariant(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener) : void 0;
|
||
return listener;
|
||
}
|
||
|
||
/**
|
||
* Allows registered plugins an opportunity to extract events from top-level
|
||
* native browser events.
|
||
*
|
||
* @return {*} An accumulation of synthetic events.
|
||
* @internal
|
||
*/
|
||
function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
||
var events = null;
|
||
for (var i = 0; i < plugins.length; i++) {
|
||
// Not every plugin in the ordering may be loaded at runtime.
|
||
var possiblePlugin = plugins[i];
|
||
if (possiblePlugin) {
|
||
var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
|
||
if (extractedEvents) {
|
||
events = accumulateInto(events, extractedEvents);
|
||
}
|
||
}
|
||
}
|
||
return events;
|
||
}
|
||
|
||
function runEventsInBatch(events) {
|
||
if (events !== null) {
|
||
eventQueue = accumulateInto(eventQueue, events);
|
||
}
|
||
|
||
// Set `eventQueue` to null before processing it so that we can tell if more
|
||
// events get enqueued while processing.
|
||
var processingEventQueue = eventQueue;
|
||
eventQueue = null;
|
||
|
||
if (!processingEventQueue) {
|
||
return;
|
||
}
|
||
|
||
forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
|
||
!!eventQueue ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : void 0;
|
||
// This would be a good time to rethrow if any of the event handlers threw.
|
||
rethrowCaughtError();
|
||
}
|
||
|
||
function runExtractedEventsInBatch(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
||
var events = extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
|
||
runEventsInBatch(events);
|
||
}
|
||
|
||
var FunctionComponent = 0;
|
||
var ClassComponent = 1;
|
||
var IndeterminateComponent = 2; // Before we know whether it is function or class
|
||
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
|
||
var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
|
||
var HostComponent = 5;
|
||
var HostText = 6;
|
||
var Fragment = 7;
|
||
var Mode = 8;
|
||
var ContextConsumer = 9;
|
||
var ContextProvider = 10;
|
||
var ForwardRef = 11;
|
||
var Profiler = 12;
|
||
var SuspenseComponent = 13;
|
||
var MemoComponent = 14;
|
||
var SimpleMemoComponent = 15;
|
||
var LazyComponent = 16;
|
||
var IncompleteClassComponent = 17;
|
||
|
||
var randomKey = Math.random().toString(36).slice(2);
|
||
var internalInstanceKey = '__reactInternalInstance$' + randomKey;
|
||
var internalEventHandlersKey = '__reactEventHandlers$' + randomKey;
|
||
|
||
function precacheFiberNode(hostInst, node) {
|
||
node[internalInstanceKey] = hostInst;
|
||
}
|
||
|
||
/**
|
||
* Given a DOM node, return the closest ReactDOMComponent or
|
||
* ReactDOMTextComponent instance ancestor.
|
||
*/
|
||
function getClosestInstanceFromNode(node) {
|
||
if (node[internalInstanceKey]) {
|
||
return node[internalInstanceKey];
|
||
}
|
||
|
||
while (!node[internalInstanceKey]) {
|
||
if (node.parentNode) {
|
||
node = node.parentNode;
|
||
} else {
|
||
// Top of the tree. This node must not be part of a React tree (or is
|
||
// unmounted, potentially).
|
||
return null;
|
||
}
|
||
}
|
||
|
||
var inst = node[internalInstanceKey];
|
||
if (inst.tag === HostComponent || inst.tag === HostText) {
|
||
// In Fiber, this will always be the deepest root.
|
||
return inst;
|
||
}
|
||
|
||
return null;
|
||
}
|
||
|
||
/**
|
||
* Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
|
||
* instance, or null if the node was not rendered by this React.
|
||
*/
|
||
function getInstanceFromNode$1(node) {
|
||
var inst = node[internalInstanceKey];
|
||
if (inst) {
|
||
if (inst.tag === HostComponent || inst.tag === HostText) {
|
||
return inst;
|
||
} else {
|
||
return null;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
|
||
/**
|
||
* Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
|
||
* DOM node.
|
||
*/
|
||
function getNodeFromInstance$1(inst) {
|
||
if (inst.tag === HostComponent || inst.tag === HostText) {
|
||
// In Fiber this, is just the state node right now. We assume it will be
|
||
// a host component or host text.
|
||
return inst.stateNode;
|
||
}
|
||
|
||
// Without this first invariant, passing a non-DOM-component triggers the next
|
||
// invariant for a missing parent, which is super confusing.
|
||
invariant(false, 'getNodeFromInstance: Invalid argument.');
|
||
}
|
||
|
||
function getFiberCurrentPropsFromNode$1(node) {
|
||
return node[internalEventHandlersKey] || null;
|
||
}
|
||
|
||
function updateFiberProps(node, props) {
|
||
node[internalEventHandlersKey] = props;
|
||
}
|
||
|
||
function getParent(inst) {
|
||
do {
|
||
inst = inst.return;
|
||
// TODO: If this is a HostRoot we might want to bail out.
|
||
// That is depending on if we want nested subtrees (layers) to bubble
|
||
// events to their parent. We could also go through parentNode on the
|
||
// host node but that wouldn't work for React Native and doesn't let us
|
||
// do the portal feature.
|
||
} while (inst && inst.tag !== HostComponent);
|
||
if (inst) {
|
||
return inst;
|
||
}
|
||
return null;
|
||
}
|
||
|
||
/**
|
||
* Return the lowest common ancestor of A and B, or null if they are in
|
||
* different trees.
|
||
*/
|
||
function getLowestCommonAncestor(instA, instB) {
|
||
var depthA = 0;
|
||
for (var tempA = instA; tempA; tempA = getParent(tempA)) {
|
||
depthA++;
|
||
}
|
||
var depthB = 0;
|
||
for (var tempB = instB; tempB; tempB = getParent(tempB)) {
|
||
depthB++;
|
||
}
|
||
|
||
// If A is deeper, crawl up.
|
||
while (depthA - depthB > 0) {
|
||
instA = getParent(instA);
|
||
depthA--;
|
||
}
|
||
|
||
// If B is deeper, crawl up.
|
||
while (depthB - depthA > 0) {
|
||
instB = getParent(instB);
|
||
depthB--;
|
||
}
|
||
|
||
// Walk in lockstep until we find a match.
|
||
var depth = depthA;
|
||
while (depth--) {
|
||
if (instA === instB || instA === instB.alternate) {
|
||
return instA;
|
||
}
|
||
instA = getParent(instA);
|
||
instB = getParent(instB);
|
||
}
|
||
return null;
|
||
}
|
||
|
||
/**
|
||
* Return if A is an ancestor of B.
|
||
*/
|
||
|
||
|
||
/**
|
||
* Return the parent instance of the passed-in instance.
|
||
*/
|
||
|
||
|
||
/**
|
||
* Simulates the traversal of a two-phase, capture/bubble event dispatch.
|
||
*/
|
||
function traverseTwoPhase(inst, fn, arg) {
|
||
var path = [];
|
||
while (inst) {
|
||
path.push(inst);
|
||
inst = getParent(inst);
|
||
}
|
||
var i = void 0;
|
||
for (i = path.length; i-- > 0;) {
|
||
fn(path[i], 'captured', arg);
|
||
}
|
||
for (i = 0; i < path.length; i++) {
|
||
fn(path[i], 'bubbled', arg);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
|
||
* should would receive a `mouseEnter` or `mouseLeave` event.
|
||
*
|
||
* Does not invoke the callback on the nearest common ancestor because nothing
|
||
* "entered" or "left" that element.
|
||
*/
|
||
function traverseEnterLeave(from, to, fn, argFrom, argTo) {
|
||
var common = from && to ? getLowestCommonAncestor(from, to) : null;
|
||
var pathFrom = [];
|
||
while (true) {
|
||
if (!from) {
|
||
break;
|
||
}
|
||
if (from === common) {
|
||
break;
|
||
}
|
||
var alternate = from.alternate;
|
||
if (alternate !== null && alternate === common) {
|
||
break;
|
||
}
|
||
pathFrom.push(from);
|
||
from = getParent(from);
|
||
}
|
||
var pathTo = [];
|
||
while (true) {
|
||
if (!to) {
|
||
break;
|
||
}
|
||
if (to === common) {
|
||
break;
|
||
}
|
||
var _alternate = to.alternate;
|
||
if (_alternate !== null && _alternate === common) {
|
||
break;
|
||
}
|
||
pathTo.push(to);
|
||
to = getParent(to);
|
||
}
|
||
for (var i = 0; i < pathFrom.length; i++) {
|
||
fn(pathFrom[i], 'bubbled', argFrom);
|
||
}
|
||
for (var _i = pathTo.length; _i-- > 0;) {
|
||
fn(pathTo[_i], 'captured', argTo);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Some event types have a notion of different registration names for different
|
||
* "phases" of propagation. This finds listeners by a given phase.
|
||
*/
|
||
function listenerAtPhase(inst, event, propagationPhase) {
|
||
var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
|
||
return getListener(inst, registrationName);
|
||
}
|
||
|
||
/**
|
||
* A small set of propagation patterns, each of which will accept a small amount
|
||
* of information, and generate a set of "dispatch ready event objects" - which
|
||
* are sets of events that have already been annotated with a set of dispatched
|
||
* listener functions/ids. The API is designed this way to discourage these
|
||
* propagation strategies from actually executing the dispatches, since we
|
||
* always want to collect the entire set of dispatches before executing even a
|
||
* single one.
|
||
*/
|
||
|
||
/**
|
||
* Tags a `SyntheticEvent` with dispatched listeners. Creating this function
|
||
* here, allows us to not have to bind or create functions for each event.
|
||
* Mutating the event's members allows us to not have to create a wrapping
|
||
* "dispatch" object that pairs the event with the listener.
|
||
*/
|
||
function accumulateDirectionalDispatches(inst, phase, event) {
|
||
{
|
||
!inst ? warningWithoutStack$1(false, 'Dispatching inst must not be null') : void 0;
|
||
}
|
||
var listener = listenerAtPhase(inst, event, phase);
|
||
if (listener) {
|
||
event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
|
||
event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Collect dispatches (must be entirely collected before dispatching - see unit
|
||
* tests). Lazily allocate the array to conserve memory. We must loop through
|
||
* each event and perform the traversal for each one. We cannot perform a
|
||
* single traversal for the entire collection of events because each event may
|
||
* have a different target.
|
||
*/
|
||
function accumulateTwoPhaseDispatchesSingle(event) {
|
||
if (event && event.dispatchConfig.phasedRegistrationNames) {
|
||
traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Accumulates without regard to direction, does not look for phased
|
||
* registration names. Same as `accumulateDirectDispatchesSingle` but without
|
||
* requiring that the `dispatchMarker` be the same as the dispatched ID.
|
||
*/
|
||
function accumulateDispatches(inst, ignoredDirection, event) {
|
||
if (inst && event && event.dispatchConfig.registrationName) {
|
||
var registrationName = event.dispatchConfig.registrationName;
|
||
var listener = getListener(inst, registrationName);
|
||
if (listener) {
|
||
event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
|
||
event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
|
||
}
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Accumulates dispatches on an `SyntheticEvent`, but only for the
|
||
* `dispatchMarker`.
|
||
* @param {SyntheticEvent} event
|
||
*/
|
||
function accumulateDirectDispatchesSingle(event) {
|
||
if (event && event.dispatchConfig.registrationName) {
|
||
accumulateDispatches(event._targetInst, null, event);
|
||
}
|
||
}
|
||
|
||
function accumulateTwoPhaseDispatches(events) {
|
||
forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
|
||
}
|
||
|
||
|
||
|
||
function accumulateEnterLeaveDispatches(leave, enter, from, to) {
|
||
traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
|
||
}
|
||
|
||
function accumulateDirectDispatches(events) {
|
||
forEachAccumulated(events, accumulateDirectDispatchesSingle);
|
||
}
|
||
|
||
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
||
|
||
// Do not uses the below two methods directly!
|
||
// Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.
|
||
// (It is the only module that is allowed to access these methods.)
|
||
|
||
function unsafeCastStringToDOMTopLevelType(topLevelType) {
|
||
return topLevelType;
|
||
}
|
||
|
||
function unsafeCastDOMTopLevelTypeToString(topLevelType) {
|
||
return topLevelType;
|
||
}
|
||
|
||
/**
|
||
* Generate a mapping of standard vendor prefixes using the defined style property and event name.
|
||
*
|
||
* @param {string} styleProp
|
||
* @param {string} eventName
|
||
* @returns {object}
|
||
*/
|
||
function makePrefixMap(styleProp, eventName) {
|
||
var prefixes = {};
|
||
|
||
prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
|
||
prefixes['Webkit' + styleProp] = 'webkit' + eventName;
|
||
prefixes['Moz' + styleProp] = 'moz' + eventName;
|
||
|
||
return prefixes;
|
||
}
|
||
|
||
/**
|
||
* A list of event names to a configurable list of vendor prefixes.
|
||
*/
|
||
var vendorPrefixes = {
|
||
animationend: makePrefixMap('Animation', 'AnimationEnd'),
|
||
animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
|
||
animationstart: makePrefixMap('Animation', 'AnimationStart'),
|
||
transitionend: makePrefixMap('Transition', 'TransitionEnd')
|
||
};
|
||
|
||
/**
|
||
* Event names that have already been detected and prefixed (if applicable).
|
||
*/
|
||
var prefixedEventNames = {};
|
||
|
||
/**
|
||
* Element to check for prefixes on.
|
||
*/
|
||
var style = {};
|
||
|
||
/**
|
||
* Bootstrap if a DOM exists.
|
||
*/
|
||
if (canUseDOM) {
|
||
style = document.createElement('div').style;
|
||
|
||
// On some platforms, in particular some releases of Android 4.x,
|
||
// the un-prefixed "animation" and "transition" properties are defined on the
|
||
// style object but the events that fire will still be prefixed, so we need
|
||
// to check if the un-prefixed events are usable, and if not remove them from the map.
|
||
if (!('AnimationEvent' in window)) {
|
||
delete vendorPrefixes.animationend.animation;
|
||
delete vendorPrefixes.animationiteration.animation;
|
||
delete vendorPrefixes.animationstart.animation;
|
||
}
|
||
|
||
// Same as above
|
||
if (!('TransitionEvent' in window)) {
|
||
delete vendorPrefixes.transitionend.transition;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Attempts to determine the correct vendor prefixed event name.
|
||
*
|
||
* @param {string} eventName
|
||
* @returns {string}
|
||
*/
|
||
function getVendorPrefixedEventName(eventName) {
|
||
if (prefixedEventNames[eventName]) {
|
||
return prefixedEventNames[eventName];
|
||
} else if (!vendorPrefixes[eventName]) {
|
||
return eventName;
|
||
}
|
||
|
||
var prefixMap = vendorPrefixes[eventName];
|
||
|
||
for (var styleProp in prefixMap) {
|
||
if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
|
||
return prefixedEventNames[eventName] = prefixMap[styleProp];
|
||
}
|
||
}
|
||
|
||
return eventName;
|
||
}
|
||
|
||
/**
|
||
* To identify top level events in ReactDOM, we use constants defined by this
|
||
* module. This is the only module that uses the unsafe* methods to express
|
||
* that the constants actually correspond to the browser event names. This lets
|
||
* us save some bundle size by avoiding a top level type -> event name map.
|
||
* The rest of ReactDOM code should import top level types from this file.
|
||
*/
|
||
var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort');
|
||
var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));
|
||
var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));
|
||
var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));
|
||
var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur');
|
||
var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');
|
||
var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough');
|
||
var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');
|
||
var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change');
|
||
var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');
|
||
var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');
|
||
var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');
|
||
var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');
|
||
var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');
|
||
var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');
|
||
var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');
|
||
var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut');
|
||
var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');
|
||
var TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick');
|
||
var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag');
|
||
var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');
|
||
var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');
|
||
var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');
|
||
var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');
|
||
var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');
|
||
var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart');
|
||
var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop');
|
||
var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange');
|
||
var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied');
|
||
var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted');
|
||
var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended');
|
||
var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error');
|
||
var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');
|
||
var TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture');
|
||
var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');
|
||
var TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid');
|
||
var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');
|
||
var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');
|
||
var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup');
|
||
var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load');
|
||
var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart');
|
||
var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata');
|
||
var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');
|
||
var TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture');
|
||
var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown');
|
||
var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove');
|
||
var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');
|
||
var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');
|
||
var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');
|
||
var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');
|
||
var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');
|
||
var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');
|
||
var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing');
|
||
var TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel');
|
||
var TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown');
|
||
|
||
|
||
var TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove');
|
||
var TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout');
|
||
var TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover');
|
||
var TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup');
|
||
var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');
|
||
var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');
|
||
var TOP_RESET = unsafeCastStringToDOMTopLevelType('reset');
|
||
var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');
|
||
var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');
|
||
var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');
|
||
var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');
|
||
var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');
|
||
var TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit');
|
||
var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');
|
||
var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput');
|
||
var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate');
|
||
var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');
|
||
var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel');
|
||
var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');
|
||
var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');
|
||
var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart');
|
||
var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));
|
||
var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');
|
||
var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');
|
||
var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel');
|
||
|
||
// List of events that need to be individually attached to media elements.
|
||
// Note that events in this list will *not* be listened to at the top level
|
||
// unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.
|
||
var mediaEventTypes = [TOP_ABORT, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_VOLUME_CHANGE, TOP_WAITING];
|
||
|
||
function getRawEventName(topLevelType) {
|
||
return unsafeCastDOMTopLevelTypeToString(topLevelType);
|
||
}
|
||
|
||
/**
|
||
* These variables store information about text content of a target node,
|
||
* allowing comparison of content before and after a given event.
|
||
*
|
||
* Identify the node where selection currently begins, then observe
|
||
* both its text content and its current position in the DOM. Since the
|
||
* browser may natively replace the target node during composition, we can
|
||
* use its position to find its replacement.
|
||
*
|
||
*
|
||
*/
|
||
|
||
var root = null;
|
||
var startText = null;
|
||
var fallbackText = null;
|
||
|
||
function initialize(nativeEventTarget) {
|
||
root = nativeEventTarget;
|
||
startText = getText();
|
||
return true;
|
||
}
|
||
|
||
function reset() {
|
||
root = null;
|
||
startText = null;
|
||
fallbackText = null;
|
||
}
|
||
|
||
function getData() {
|
||
if (fallbackText) {
|
||
return fallbackText;
|
||
}
|
||
|
||
var start = void 0;
|
||
var startValue = startText;
|
||
var startLength = startValue.length;
|
||
var end = void 0;
|
||
var endValue = getText();
|
||
var endLength = endValue.length;
|
||
|
||
for (start = 0; start < startLength; start++) {
|
||
if (startValue[start] !== endValue[start]) {
|
||
break;
|
||
}
|
||
}
|
||
|
||
var minEnd = startLength - start;
|
||
for (end = 1; end <= minEnd; end++) {
|
||
if (startValue[startLength - end] !== endValue[endLength - end]) {
|
||
break;
|
||
}
|
||
}
|
||
|
||
var sliceTail = end > 1 ? 1 - end : undefined;
|
||
fallbackText = endValue.slice(start, sliceTail);
|
||
return fallbackText;
|
||
}
|
||
|
||
function getText() {
|
||
if ('value' in root) {
|
||
return root.value;
|
||
}
|
||
return root.textContent;
|
||
}
|
||
|
||
/* eslint valid-typeof: 0 */
|
||
|
||
var EVENT_POOL_SIZE = 10;
|
||
|
||
/**
|
||
* @interface Event
|
||
* @see http://www.w3.org/TR/DOM-Level-3-Events/
|
||
*/
|
||
var EventInterface = {
|
||
type: null,
|
||
target: null,
|
||
// currentTarget is set when dispatching; no use in copying it here
|
||
currentTarget: function () {
|
||
return null;
|
||
},
|
||
eventPhase: null,
|
||
bubbles: null,
|
||
cancelable: null,
|
||
timeStamp: function (event) {
|
||
return event.timeStamp || Date.now();
|
||
},
|
||
defaultPrevented: null,
|
||
isTrusted: null
|
||
};
|
||
|
||
function functionThatReturnsTrue() {
|
||
return true;
|
||
}
|
||
|
||
function functionThatReturnsFalse() {
|
||
return false;
|
||
}
|
||
|
||
/**
|
||
* Synthetic events are dispatched by event plugins, typically in response to a
|
||
* top-level event delegation handler.
|
||
*
|
||
* These systems should generally use pooling to reduce the frequency of garbage
|
||
* collection. The system should check `isPersistent` to determine whether the
|
||
* event should be released into the pool after being dispatched. Users that
|
||
* need a persisted event should invoke `persist`.
|
||
*
|
||
* Synthetic events (and subclasses) implement the DOM Level 3 Events API by
|
||
* normalizing browser quirks. Subclasses do not necessarily have to implement a
|
||
* DOM interface; custom application-specific events can also subclass this.
|
||
*
|
||
* @param {object} dispatchConfig Configuration used to dispatch this event.
|
||
* @param {*} targetInst Marker identifying the event target.
|
||
* @param {object} nativeEvent Native browser event.
|
||
* @param {DOMEventTarget} nativeEventTarget Target node.
|
||
*/
|
||
function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
|
||
{
|
||
// these have a getter/setter for warnings
|
||
delete this.nativeEvent;
|
||
delete this.preventDefault;
|
||
delete this.stopPropagation;
|
||
delete this.isDefaultPrevented;
|
||
delete this.isPropagationStopped;
|
||
}
|
||
|
||
this.dispatchConfig = dispatchConfig;
|
||
this._targetInst = targetInst;
|
||
this.nativeEvent = nativeEvent;
|
||
|
||
var Interface = this.constructor.Interface;
|
||
for (var propName in Interface) {
|
||
if (!Interface.hasOwnProperty(propName)) {
|
||
continue;
|
||
}
|
||
{
|
||
delete this[propName]; // this has a getter/setter for warnings
|
||
}
|
||
var normalize = Interface[propName];
|
||
if (normalize) {
|
||
this[propName] = normalize(nativeEvent);
|
||
} else {
|
||
if (propName === 'target') {
|
||
this.target = nativeEventTarget;
|
||
} else {
|
||
this[propName] = nativeEvent[propName];
|
||
}
|
||
}
|
||
}
|
||
|
||
var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
|
||
if (defaultPrevented) {
|
||
this.isDefaultPrevented = functionThatReturnsTrue;
|
||
} else {
|
||
this.isDefaultPrevented = functionThatReturnsFalse;
|
||
}
|
||
this.isPropagationStopped = functionThatReturnsFalse;
|
||
return this;
|
||
}
|
||
|
||
_assign(SyntheticEvent.prototype, {
|
||
preventDefault: function () {
|
||
this.defaultPrevented = true;
|
||
var event = this.nativeEvent;
|
||
if (!event) {
|
||
return;
|
||
}
|
||
|
||
if (event.preventDefault) {
|
||
event.preventDefault();
|
||
} else if (typeof event.returnValue !== 'unknown') {
|
||
event.returnValue = false;
|
||
}
|
||
this.isDefaultPrevented = functionThatReturnsTrue;
|
||
},
|
||
|
||
stopPropagation: function () {
|
||
var event = this.nativeEvent;
|
||
if (!event) {
|
||
return;
|
||
}
|
||
|
||
if (event.stopPropagation) {
|
||
event.stopPropagation();
|
||
} else if (typeof event.cancelBubble !== 'unknown') {
|
||
// The ChangeEventPlugin registers a "propertychange" event for
|
||
// IE. This event does not support bubbling or cancelling, and
|
||
// any references to cancelBubble throw "Member not found". A
|
||
// typeof check of "unknown" circumvents this issue (and is also
|
||
// IE specific).
|
||
event.cancelBubble = true;
|
||
}
|
||
|
||
this.isPropagationStopped = functionThatReturnsTrue;
|
||
},
|
||
|
||
/**
|
||
* We release all dispatched `SyntheticEvent`s after each event loop, adding
|
||
* them back into the pool. This allows a way to hold onto a reference that
|
||
* won't be added back into the pool.
|
||
*/
|
||
persist: function () {
|
||
this.isPersistent = functionThatReturnsTrue;
|
||
},
|
||
|
||
/**
|
||
* Checks if this event should be released back into the pool.
|
||
*
|
||
* @return {boolean} True if this should not be released, false otherwise.
|
||
*/
|
||
isPersistent: functionThatReturnsFalse,
|
||
|
||
/**
|
||
* `PooledClass` looks for `destructor` on each instance it releases.
|
||
*/
|
||
destructor: function () {
|
||
var Interface = this.constructor.Interface;
|
||
for (var propName in Interface) {
|
||
{
|
||
Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
|
||
}
|
||
}
|
||
this.dispatchConfig = null;
|
||
this._targetInst = null;
|
||
this.nativeEvent = null;
|
||
this.isDefaultPrevented = functionThatReturnsFalse;
|
||
this.isPropagationStopped = functionThatReturnsFalse;
|
||
this._dispatchListeners = null;
|
||
this._dispatchInstances = null;
|
||
{
|
||
Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
|
||
Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));
|
||
Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));
|
||
Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));
|
||
Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));
|
||
}
|
||
}
|
||
});
|
||
|
||
SyntheticEvent.Interface = EventInterface;
|
||
|
||
/**
|
||
* Helper to reduce boilerplate when creating subclasses.
|
||
*/
|
||
SyntheticEvent.extend = function (Interface) {
|
||
var Super = this;
|
||
|
||
var E = function () {};
|
||
E.prototype = Super.prototype;
|
||
var prototype = new E();
|
||
|
||
function Class() {
|
||
return Super.apply(this, arguments);
|
||
}
|
||
_assign(prototype, Class.prototype);
|
||
Class.prototype = prototype;
|
||
Class.prototype.constructor = Class;
|
||
|
||
Class.Interface = _assign({}, Super.Interface, Interface);
|
||
Class.extend = Super.extend;
|
||
addEventPoolingTo(Class);
|
||
|
||
return Class;
|
||
};
|
||
|
||
addEventPoolingTo(SyntheticEvent);
|
||
|
||
/**
|
||
* Helper to nullify syntheticEvent instance properties when destructing
|
||
*
|
||
* @param {String} propName
|
||
* @param {?object} getVal
|
||
* @return {object} defineProperty object
|
||
*/
|
||
function getPooledWarningPropertyDefinition(propName, getVal) {
|
||
var isFunction = typeof getVal === 'function';
|
||
return {
|
||
configurable: true,
|
||
set: set,
|
||
get: get
|
||
};
|
||
|
||
function set(val) {
|
||
var action = isFunction ? 'setting the method' : 'setting the property';
|
||
warn(action, 'This is effectively a no-op');
|
||
return val;
|
||
}
|
||
|
||
function get() {
|
||
var action = isFunction ? 'accessing the method' : 'accessing the property';
|
||
var result = isFunction ? 'This is a no-op function' : 'This is set to null';
|
||
warn(action, result);
|
||
return getVal;
|
||
}
|
||
|
||
function warn(action, result) {
|
||
var warningCondition = false;
|
||
!warningCondition ? warningWithoutStack$1(false, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
|
||
}
|
||
}
|
||
|
||
function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
|
||
var EventConstructor = this;
|
||
if (EventConstructor.eventPool.length) {
|
||
var instance = EventConstructor.eventPool.pop();
|
||
EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
|
||
return instance;
|
||
}
|
||
return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);
|
||
}
|
||
|
||
function releasePooledEvent(event) {
|
||
var EventConstructor = this;
|
||
!(event instanceof EventConstructor) ? invariant(false, 'Trying to release an event instance into a pool of a different type.') : void 0;
|
||
event.destructor();
|
||
if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
|
||
EventConstructor.eventPool.push(event);
|
||
}
|
||
}
|
||
|
||
function addEventPoolingTo(EventConstructor) {
|
||
EventConstructor.eventPool = [];
|
||
EventConstructor.getPooled = getPooledEvent;
|
||
EventConstructor.release = releasePooledEvent;
|
||
}
|
||
|
||
/**
|
||
* @interface Event
|
||
* @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
|
||
*/
|
||
var SyntheticCompositionEvent = SyntheticEvent.extend({
|
||
data: null
|
||
});
|
||
|
||
/**
|
||
* @interface Event
|
||
* @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
|
||
* /#events-inputevents
|
||
*/
|
||
var SyntheticInputEvent = SyntheticEvent.extend({
|
||
data: null
|
||
});
|
||
|
||
var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
|
||
var START_KEYCODE = 229;
|
||
|
||
var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
|
||
|
||
var documentMode = null;
|
||
if (canUseDOM && 'documentMode' in document) {
|
||
documentMode = document.documentMode;
|
||
}
|
||
|
||
// Webkit offers a very useful `textInput` event that can be used to
|
||
// directly represent `beforeInput`. The IE `textinput` event is not as
|
||
// useful, so we don't use it.
|
||
var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode;
|
||
|
||
// In IE9+, we have access to composition events, but the data supplied
|
||
// by the native compositionend event may be incorrect. Japanese ideographic
|
||
// spaces, for instance (\u3000) are not recorded correctly.
|
||
var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
|
||
|
||
var SPACEBAR_CODE = 32;
|
||
var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
|
||
|
||
// Events and their corresponding property names.
|
||
var eventTypes = {
|
||
beforeInput: {
|
||
phasedRegistrationNames: {
|
||
bubbled: 'onBeforeInput',
|
||
captured: 'onBeforeInputCapture'
|
||
},
|
||
dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE]
|
||
},
|
||
compositionEnd: {
|
||
phasedRegistrationNames: {
|
||
bubbled: 'onCompositionEnd',
|
||
captured: 'onCompositionEndCapture'
|
||
},
|
||
dependencies: [TOP_BLUR, TOP_COMPOSITION_END, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
|
||
},
|
||
compositionStart: {
|
||
phasedRegistrationNames: {
|
||
bubbled: 'onCompositionStart',
|
||
captured: 'onCompositionStartCapture'
|
||
},
|
||
dependencies: [TOP_BLUR, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
|
||
},
|
||
compositionUpdate: {
|
||
phasedRegistrationNames: {
|
||
bubbled: 'onCompositionUpdate',
|
||
captured: 'onCompositionUpdateCapture'
|
||
},
|
||
dependencies: [TOP_BLUR, TOP_COMPOSITION_UPDATE, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
|
||
}
|
||
};
|
||
|
||
// Track whether we've ever handled a keypress on the space key.
|
||
var hasSpaceKeypress = false;
|
||
|
||
/**
|
||
* Return whether a native keypress event is assumed to be a command.
|
||
* This is required because Firefox fires `keypress` events for key commands
|
||
* (cut, copy, select-all, etc.) even though no character is inserted.
|
||
*/
|
||
function isKeypressCommand(nativeEvent) {
|
||
return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
|
||
// ctrlKey && altKey is equivalent to AltGr, and is not a command.
|
||
!(nativeEvent.ctrlKey && nativeEvent.altKey);
|
||
}
|
||
|
||
/**
|
||
* Translate native top level events into event types.
|
||
*
|
||
* @param {string} topLevelType
|
||
* @return {object}
|
||
*/
|
||
function getCompositionEventType(topLevelType) {
|
||
switch (topLevelType) {
|
||
case TOP_COMPOSITION_START:
|
||
return eventTypes.compositionStart;
|
||
case TOP_COMPOSITION_END:
|
||
return eventTypes.compositionEnd;
|
||
case TOP_COMPOSITION_UPDATE:
|
||
return eventTypes.compositionUpdate;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Does our fallback best-guess model think this event signifies that
|
||
* composition has begun?
|
||
*
|
||
* @param {string} topLevelType
|
||
* @param {object} nativeEvent
|
||
* @return {boolean}
|
||
*/
|
||
function isFallbackCompositionStart(topLevelType, nativeEvent) {
|
||
return topLevelType === TOP_KEY_DOWN && nativeEvent.keyCode === START_KEYCODE;
|
||
}
|
||
|
||
/**
|
||
* Does our fallback mode think that this event is the end of composition?
|
||
*
|
||
* @param {string} topLevelType
|
||
* @param {object} nativeEvent
|
||
* @return {boolean}
|
||
*/
|
||
function isFallbackCompositionEnd(topLevelType, nativeEvent) {
|
||
switch (topLevelType) {
|
||
case TOP_KEY_UP:
|
||
// Command keys insert or clear IME input.
|
||
return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
|
||
case TOP_KEY_DOWN:
|
||
// Expect IME keyCode on each keydown. If we get any other
|
||
// code we must have exited earlier.
|
||
return nativeEvent.keyCode !== START_KEYCODE;
|
||
case TOP_KEY_PRESS:
|
||
case TOP_MOUSE_DOWN:
|
||
case TOP_BLUR:
|
||
// Events are not possible without cancelling IME.
|
||
return true;
|
||
default:
|
||
return false;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Google Input Tools provides composition data via a CustomEvent,
|
||
* with the `data` property populated in the `detail` object. If this
|
||
* is available on the event object, use it. If not, this is a plain
|
||
* composition event and we have nothing special to extract.
|
||
*
|
||
* @param {object} nativeEvent
|
||
* @return {?string}
|
||
*/
|
||
function getDataFromCustomEvent(nativeEvent) {
|
||
var detail = nativeEvent.detail;
|
||
if (typeof detail === 'object' && 'data' in detail) {
|
||
return detail.data;
|
||
}
|
||
return null;
|
||
}
|
||
|
||
/**
|
||
* Check if a composition event was triggered by Korean IME.
|
||
* Our fallback mode does not work well with IE's Korean IME,
|
||
* so just use native composition events when Korean IME is used.
|
||
* Although CompositionEvent.locale property is deprecated,
|
||
* it is available in IE, where our fallback mode is enabled.
|
||
*
|
||
* @param {object} nativeEvent
|
||
* @return {boolean}
|
||
*/
|
||
function isUsingKoreanIME(nativeEvent) {
|
||
return nativeEvent.locale === 'ko';
|
||
}
|
||
|
||
// Track the current IME composition status, if any.
|
||
var isComposing = false;
|
||
|
||
/**
|
||
* @return {?object} A SyntheticCompositionEvent.
|
||
*/
|
||
function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
||
var eventType = void 0;
|
||
var fallbackData = void 0;
|
||
|
||
if (canUseCompositionEvent) {
|
||
eventType = getCompositionEventType(topLevelType);
|
||
} else if (!isComposing) {
|
||
if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
|
||
eventType = eventTypes.compositionStart;
|
||
}
|
||
} else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
|
||
eventType = eventTypes.compositionEnd;
|
||
}
|
||
|
||
if (!eventType) {
|
||
return null;
|
||
}
|
||
|
||
if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
|
||
// The current composition is stored statically and must not be
|
||
// overwritten while composition continues.
|
||
if (!isComposing && eventType === eventTypes.compositionStart) {
|
||
isComposing = initialize(nativeEventTarget);
|
||
} else if (eventType === eventTypes.compositionEnd) {
|
||
if (isComposing) {
|
||
fallbackData = getData();
|
||
}
|
||
}
|
||
}
|
||
|
||
var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
|
||
|
||
if (fallbackData) {
|
||
// Inject data generated from fallback path into the synthetic event.
|
||
// This matches the property of native CompositionEventInterface.
|
||
event.data = fallbackData;
|
||
} else {
|
||
var customData = getDataFromCustomEvent(nativeEvent);
|
||
if (customData !== null) {
|
||
event.data = customData;
|
||
}
|
||
}
|
||
|
||
accumulateTwoPhaseDispatches(event);
|
||
return event;
|
||
}
|
||
|
||
/**
|
||
* @param {TopLevelType} topLevelType Number from `TopLevelType`.
|
||
* @param {object} nativeEvent Native browser event.
|
||
* @return {?string} The string corresponding to this `beforeInput` event.
|
||
*/
|
||
function getNativeBeforeInputChars(topLevelType, nativeEvent) {
|
||
switch (topLevelType) {
|
||
case TOP_COMPOSITION_END:
|
||
return getDataFromCustomEvent(nativeEvent);
|
||
case TOP_KEY_PRESS:
|
||
/**
|
||
* If native `textInput` events are available, our goal is to make
|
||
* use of them. However, there is a special case: the spacebar key.
|
||
* In Webkit, preventing default on a spacebar `textInput` event
|
||
* cancels character insertion, but it *also* causes the browser
|
||
* to fall back to its default spacebar behavior of scrolling the
|
||
* page.
|
||
*
|
||
* Tracking at:
|
||
* https://code.google.com/p/chromium/issues/detail?id=355103
|
||
*
|
||
* To avoid this issue, use the keypress event as if no `textInput`
|
||
* event is available.
|
||
*/
|
||
var which = nativeEvent.which;
|
||
if (which !== SPACEBAR_CODE) {
|
||
return null;
|
||
}
|
||
|
||
hasSpaceKeypress = true;
|
||
return SPACEBAR_CHAR;
|
||
|
||
case TOP_TEXT_INPUT:
|
||
// Record the characters to be added to the DOM.
|
||
var chars = nativeEvent.data;
|
||
|
||
// If it's a spacebar character, assume that we have already handled
|
||
// it at the keypress level and bail immediately. Android Chrome
|
||
// doesn't give us keycodes, so we need to ignore it.
|
||
if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
|
||
return null;
|
||
}
|
||
|
||
return chars;
|
||
|
||
default:
|
||
// For other native event types, do nothing.
|
||
return null;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* For browsers that do not provide the `textInput` event, extract the
|
||
* appropriate string to use for SyntheticInputEvent.
|
||
*
|
||
* @param {number} topLevelType Number from `TopLevelEventTypes`.
|
||
* @param {object} nativeEvent Native browser event.
|
||
* @return {?string} The fallback string for this `beforeInput` event.
|
||
*/
|
||
function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
|
||
// If we are currently composing (IME) and using a fallback to do so,
|
||
// try to extract the composed characters from the fallback object.
|
||
// If composition event is available, we extract a string only at
|
||
// compositionevent, otherwise extract it at fallback events.
|
||
if (isComposing) {
|
||
if (topLevelType === TOP_COMPOSITION_END || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
|
||
var chars = getData();
|
||
reset();
|
||
isComposing = false;
|
||
return chars;
|
||
}
|
||
return null;
|
||
}
|
||
|
||
switch (topLevelType) {
|
||
case TOP_PASTE:
|
||
// If a paste event occurs after a keypress, throw out the input
|
||
// chars. Paste events should not lead to BeforeInput events.
|
||
return null;
|
||
case TOP_KEY_PRESS:
|
||
/**
|
||
* As of v27, Firefox may fire keypress events even when no character
|
||
* will be inserted. A few possibilities:
|
||
*
|
||
* - `which` is `0`. Arrow keys, Esc key, etc.
|
||
*
|
||
* - `which` is the pressed key code, but no char is available.
|
||
* Ex: 'AltGr + d` in Polish. There is no modified character for
|
||
* this key combination and no character is inserted into the
|
||
* document, but FF fires the keypress for char code `100` anyway.
|
||
* No `input` event will occur.
|
||
*
|
||
* - `which` is the pressed key code, but a command combination is
|
||
* being used. Ex: `Cmd+C`. No character is inserted, and no
|
||
* `input` event will occur.
|
||
*/
|
||
if (!isKeypressCommand(nativeEvent)) {
|
||
// IE fires the `keypress` event when a user types an emoji via
|
||
// Touch keyboard of Windows. In such a case, the `char` property
|
||
// holds an emoji character like `\uD83D\uDE0A`. Because its length
|
||
// is 2, the property `which` does not represent an emoji correctly.
|
||
// In such a case, we directly return the `char` property instead of
|
||
// using `which`.
|
||
if (nativeEvent.char && nativeEvent.char.length > 1) {
|
||
return nativeEvent.char;
|
||
} else if (nativeEvent.which) {
|
||
return String.fromCharCode(nativeEvent.which);
|
||
}
|
||
}
|
||
return null;
|
||
case TOP_COMPOSITION_END:
|
||
return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
|
||
default:
|
||
return null;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Extract a SyntheticInputEvent for `beforeInput`, based on either native
|
||
* `textInput` or fallback behavior.
|
||
*
|
||
* @return {?object} A SyntheticInputEvent.
|
||
*/
|
||
function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
||
var chars = void 0;
|
||
|
||
if (canUseTextInputEvent) {
|
||
chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
|
||
} else {
|
||
chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
|
||
}
|
||
|
||
// If no characters are being inserted, no BeforeInput event should
|
||
// be fired.
|
||
if (!chars) {
|
||
return null;
|
||
}
|
||
|
||
var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
|
||
|
||
event.data = chars;
|
||
accumulateTwoPhaseDispatches(event);
|
||
return event;
|
||
}
|
||
|
||
/**
|
||
* Create an `onBeforeInput` event to match
|
||
* http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
|
||
*
|
||
* This event plugin is based on the native `textInput` event
|
||
* available in Chrome, Safari, Opera, and IE. This event fires after
|
||
* `onKeyPress` and `onCompositionEnd`, but before `onInput`.
|
||
*
|
||
* `beforeInput` is spec'd but not implemented in any browsers, and
|
||
* the `input` event does not provide any useful information about what has
|
||
* actually been added, contrary to the spec. Thus, `textInput` is the best
|
||
* available event to identify the characters that have actually been inserted
|
||
* into the target node.
|
||
*
|
||
* This plugin is also responsible for emitting `composition` events, thus
|
||
* allowing us to share composition fallback code for both `beforeInput` and
|
||
* `composition` event types.
|
||
*/
|
||
var BeforeInputEventPlugin = {
|
||
eventTypes: eventTypes,
|
||
|
||
extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
||
var composition = extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);
|
||
|
||
var beforeInput = extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);
|
||
|
||
if (composition === null) {
|
||
return beforeInput;
|
||
}
|
||
|
||
if (beforeInput === null) {
|
||
return composition;
|
||
}
|
||
|
||
return [composition, beforeInput];
|
||
}
|
||
};
|
||
|
||
// Use to restore controlled state after a change event has fired.
|
||
|
||
var restoreImpl = null;
|
||
var restoreTarget = null;
|
||
var restoreQueue = null;
|
||
|
||
function restoreStateOfTarget(target) {
|
||
// We perform this translation at the end of the event loop so that we
|
||
// always receive the correct fiber here
|
||
var internalInstance = getInstanceFromNode(target);
|
||
if (!internalInstance) {
|
||
// Unmounted
|
||
return;
|
||
}
|
||
!(typeof restoreImpl === 'function') ? invariant(false, 'setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
var props = getFiberCurrentPropsFromNode(internalInstance.stateNode);
|
||
restoreImpl(internalInstance.stateNode, internalInstance.type, props);
|
||
}
|
||
|
||
function setRestoreImplementation(impl) {
|
||
restoreImpl = impl;
|
||
}
|
||
|
||
function enqueueStateRestore(target) {
|
||
if (restoreTarget) {
|
||
if (restoreQueue) {
|
||
restoreQueue.push(target);
|
||
} else {
|
||
restoreQueue = [target];
|
||
}
|
||
} else {
|
||
restoreTarget = target;
|
||
}
|
||
}
|
||
|
||
function needsStateRestore() {
|
||
return restoreTarget !== null || restoreQueue !== null;
|
||
}
|
||
|
||
function restoreStateIfNeeded() {
|
||
if (!restoreTarget) {
|
||
return;
|
||
}
|
||
var target = restoreTarget;
|
||
var queuedTargets = restoreQueue;
|
||
restoreTarget = null;
|
||
restoreQueue = null;
|
||
|
||
restoreStateOfTarget(target);
|
||
if (queuedTargets) {
|
||
for (var i = 0; i < queuedTargets.length; i++) {
|
||
restoreStateOfTarget(queuedTargets[i]);
|
||
}
|
||
}
|
||
}
|
||
|
||
// Used as a way to call batchedUpdates when we don't have a reference to
|
||
// the renderer. Such as when we're dispatching events or if third party
|
||
// libraries need to call batchedUpdates. Eventually, this API will go away when
|
||
// everything is batched by default. We'll then have a similar API to opt-out of
|
||
// scheduled work and instead do synchronous work.
|
||
|
||
// Defaults
|
||
var _batchedUpdatesImpl = function (fn, bookkeeping) {
|
||
return fn(bookkeeping);
|
||
};
|
||
var _interactiveUpdatesImpl = function (fn, a, b) {
|
||
return fn(a, b);
|
||
};
|
||
var _flushInteractiveUpdatesImpl = function () {};
|
||
|
||
var isBatching = false;
|
||
function batchedUpdates(fn, bookkeeping) {
|
||
if (isBatching) {
|
||
// If we are currently inside another batch, we need to wait until it
|
||
// fully completes before restoring state.
|
||
return fn(bookkeeping);
|
||
}
|
||
isBatching = true;
|
||
try {
|
||
return _batchedUpdatesImpl(fn, bookkeeping);
|
||
} finally {
|
||
// Here we wait until all updates have propagated, which is important
|
||
// when using controlled components within layers:
|
||
// https://github.com/facebook/react/issues/1698
|
||
// Then we restore state of any controlled component.
|
||
isBatching = false;
|
||
var controlledComponentsHavePendingUpdates = needsStateRestore();
|
||
if (controlledComponentsHavePendingUpdates) {
|
||
// If a controlled event was fired, we may need to restore the state of
|
||
// the DOM node back to the controlled value. This is necessary when React
|
||
// bails out of the update without touching the DOM.
|
||
_flushInteractiveUpdatesImpl();
|
||
restoreStateIfNeeded();
|
||
}
|
||
}
|
||
}
|
||
|
||
function interactiveUpdates(fn, a, b) {
|
||
return _interactiveUpdatesImpl(fn, a, b);
|
||
}
|
||
|
||
|
||
|
||
function setBatchingImplementation(batchedUpdatesImpl, interactiveUpdatesImpl, flushInteractiveUpdatesImpl) {
|
||
_batchedUpdatesImpl = batchedUpdatesImpl;
|
||
_interactiveUpdatesImpl = interactiveUpdatesImpl;
|
||
_flushInteractiveUpdatesImpl = flushInteractiveUpdatesImpl;
|
||
}
|
||
|
||
/**
|
||
* @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
|
||
*/
|
||
var supportedInputTypes = {
|
||
color: true,
|
||
date: true,
|
||
datetime: true,
|
||
'datetime-local': true,
|
||
email: true,
|
||
month: true,
|
||
number: true,
|
||
password: true,
|
||
range: true,
|
||
search: true,
|
||
tel: true,
|
||
text: true,
|
||
time: true,
|
||
url: true,
|
||
week: true
|
||
};
|
||
|
||
function isTextInputElement(elem) {
|
||
var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
|
||
|
||
if (nodeName === 'input') {
|
||
return !!supportedInputTypes[elem.type];
|
||
}
|
||
|
||
if (nodeName === 'textarea') {
|
||
return true;
|
||
}
|
||
|
||
return false;
|
||
}
|
||
|
||
/**
|
||
* HTML nodeType values that represent the type of the node
|
||
*/
|
||
|
||
var ELEMENT_NODE = 1;
|
||
var TEXT_NODE = 3;
|
||
var COMMENT_NODE = 8;
|
||
var DOCUMENT_NODE = 9;
|
||
var DOCUMENT_FRAGMENT_NODE = 11;
|
||
|
||
/**
|
||
* Gets the target node from a native browser event by accounting for
|
||
* inconsistencies in browser DOM APIs.
|
||
*
|
||
* @param {object} nativeEvent Native browser event.
|
||
* @return {DOMEventTarget} Target node.
|
||
*/
|
||
function getEventTarget(nativeEvent) {
|
||
// Fallback to nativeEvent.srcElement for IE9
|
||
// https://github.com/facebook/react/issues/12506
|
||
var target = nativeEvent.target || nativeEvent.srcElement || window;
|
||
|
||
// Normalize SVG <use> element events #4963
|
||
if (target.correspondingUseElement) {
|
||
target = target.correspondingUseElement;
|
||
}
|
||
|
||
// Safari may fire events on text nodes (Node.TEXT_NODE is 3).
|
||
// @see http://www.quirksmode.org/js/events_properties.html
|
||
return target.nodeType === TEXT_NODE ? target.parentNode : target;
|
||
}
|
||
|
||
/**
|
||
* Checks if an event is supported in the current execution environment.
|
||
*
|
||
* NOTE: This will not work correctly for non-generic events such as `change`,
|
||
* `reset`, `load`, `error`, and `select`.
|
||
*
|
||
* Borrows from Modernizr.
|
||
*
|
||
* @param {string} eventNameSuffix Event name, e.g. "click".
|
||
* @return {boolean} True if the event is supported.
|
||
* @internal
|
||
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
||
*/
|
||
function isEventSupported(eventNameSuffix) {
|
||
if (!canUseDOM) {
|
||
return false;
|
||
}
|
||
|
||
var eventName = 'on' + eventNameSuffix;
|
||
var isSupported = eventName in document;
|
||
|
||
if (!isSupported) {
|
||
var element = document.createElement('div');
|
||
element.setAttribute(eventName, 'return;');
|
||
isSupported = typeof element[eventName] === 'function';
|
||
}
|
||
|
||
return isSupported;
|
||
}
|
||
|
||
function isCheckable(elem) {
|
||
var type = elem.type;
|
||
var nodeName = elem.nodeName;
|
||
return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
|
||
}
|
||
|
||
function getTracker(node) {
|
||
return node._valueTracker;
|
||
}
|
||
|
||
function detachTracker(node) {
|
||
node._valueTracker = null;
|
||
}
|
||
|
||
function getValueFromNode(node) {
|
||
var value = '';
|
||
if (!node) {
|
||
return value;
|
||
}
|
||
|
||
if (isCheckable(node)) {
|
||
value = node.checked ? 'true' : 'false';
|
||
} else {
|
||
value = node.value;
|
||
}
|
||
|
||
return value;
|
||
}
|
||
|
||
function trackValueOnNode(node) {
|
||
var valueField = isCheckable(node) ? 'checked' : 'value';
|
||
var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
|
||
|
||
var currentValue = '' + node[valueField];
|
||
|
||
// if someone has already defined a value or Safari, then bail
|
||
// and don't track value will cause over reporting of changes,
|
||
// but it's better then a hard failure
|
||
// (needed for certain tests that spyOn input values and Safari)
|
||
if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
|
||
return;
|
||
}
|
||
var get = descriptor.get,
|
||
set = descriptor.set;
|
||
|
||
Object.defineProperty(node, valueField, {
|
||
configurable: true,
|
||
get: function () {
|
||
return get.call(this);
|
||
},
|
||
set: function (value) {
|
||
currentValue = '' + value;
|
||
set.call(this, value);
|
||
}
|
||
});
|
||
// We could've passed this the first time
|
||
// but it triggers a bug in IE11 and Edge 14/15.
|
||
// Calling defineProperty() again should be equivalent.
|
||
// https://github.com/facebook/react/issues/11768
|
||
Object.defineProperty(node, valueField, {
|
||
enumerable: descriptor.enumerable
|
||
});
|
||
|
||
var tracker = {
|
||
getValue: function () {
|
||
return currentValue;
|
||
},
|
||
setValue: function (value) {
|
||
currentValue = '' + value;
|
||
},
|
||
stopTracking: function () {
|
||
detachTracker(node);
|
||
delete node[valueField];
|
||
}
|
||
};
|
||
return tracker;
|
||
}
|
||
|
||
function track(node) {
|
||
if (getTracker(node)) {
|
||
return;
|
||
}
|
||
|
||
// TODO: Once it's just Fiber we can move this to node._wrapperState
|
||
node._valueTracker = trackValueOnNode(node);
|
||
}
|
||
|
||
function updateValueIfChanged(node) {
|
||
if (!node) {
|
||
return false;
|
||
}
|
||
|
||
var tracker = getTracker(node);
|
||
// if there is no tracker at this point it's unlikely
|
||
// that trying again will succeed
|
||
if (!tracker) {
|
||
return true;
|
||
}
|
||
|
||
var lastValue = tracker.getValue();
|
||
var nextValue = getValueFromNode(node);
|
||
if (nextValue !== lastValue) {
|
||
tracker.setValue(nextValue);
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||
|
||
var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
|
||
|
||
var describeComponentFrame = function (name, source, ownerName) {
|
||
var sourceInfo = '';
|
||
if (source) {
|
||
var path = source.fileName;
|
||
var fileName = path.replace(BEFORE_SLASH_RE, '');
|
||
{
|
||
// In DEV, include code for a common special case:
|
||
// prefer "folder/index.js" instead of just "index.js".
|
||
if (/^index\./.test(fileName)) {
|
||
var match = path.match(BEFORE_SLASH_RE);
|
||
if (match) {
|
||
var pathBeforeSlash = match[1];
|
||
if (pathBeforeSlash) {
|
||
var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
|
||
fileName = folderName + '/' + fileName;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
|
||
} else if (ownerName) {
|
||
sourceInfo = ' (created by ' + ownerName + ')';
|
||
}
|
||
return '\n in ' + (name || 'Unknown') + sourceInfo;
|
||
};
|
||
|
||
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
||
// nor polyfill, then a plain number is used for performance.
|
||
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
||
|
||
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
||
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
||
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
||
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
||
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
||
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
||
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
|
||
|
||
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
||
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
||
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
||
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
||
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
||
|
||
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
||
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
||
|
||
function getIteratorFn(maybeIterable) {
|
||
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
||
return null;
|
||
}
|
||
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
||
if (typeof maybeIterator === 'function') {
|
||
return maybeIterator;
|
||
}
|
||
return null;
|
||
}
|
||
|
||
var Pending = 0;
|
||
var Resolved = 1;
|
||
var Rejected = 2;
|
||
|
||
function refineResolvedLazyComponent(lazyComponent) {
|
||
return lazyComponent._status === Resolved ? lazyComponent._result : null;
|
||
}
|
||
|
||
function getWrappedName(outerType, innerType, wrapperName) {
|
||
var functionName = innerType.displayName || innerType.name || '';
|
||
return outerType.displayName || (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName);
|
||
}
|
||
|
||
function getComponentName(type) {
|
||
if (type == null) {
|
||
// Host root, text node or just invalid type.
|
||
return null;
|
||
}
|
||
{
|
||
if (typeof type.tag === 'number') {
|
||
warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
|
||
}
|
||
}
|
||
if (typeof type === 'function') {
|
||
return type.displayName || type.name || null;
|
||
}
|
||
if (typeof type === 'string') {
|
||
return type;
|
||
}
|
||
switch (type) {
|
||
case REACT_CONCURRENT_MODE_TYPE:
|
||
return 'ConcurrentMode';
|
||
case REACT_FRAGMENT_TYPE:
|
||
return 'Fragment';
|
||
case REACT_PORTAL_TYPE:
|
||
return 'Portal';
|
||
case REACT_PROFILER_TYPE:
|
||
return 'Profiler';
|
||
case REACT_STRICT_MODE_TYPE:
|
||
return 'StrictMode';
|
||
case REACT_SUSPENSE_TYPE:
|
||
return 'Suspense';
|
||
}
|
||
if (typeof type === 'object') {
|
||
switch (type.$$typeof) {
|
||
case REACT_CONTEXT_TYPE:
|
||
return 'Context.Consumer';
|
||
case REACT_PROVIDER_TYPE:
|
||
return 'Context.Provider';
|
||
case REACT_FORWARD_REF_TYPE:
|
||
return getWrappedName(type, type.render, 'ForwardRef');
|
||
case REACT_MEMO_TYPE:
|
||
return getComponentName(type.type);
|
||
case REACT_LAZY_TYPE:
|
||
{
|
||
var thenable = type;
|
||
var resolvedThenable = refineResolvedLazyComponent(thenable);
|
||
if (resolvedThenable) {
|
||
return getComponentName(resolvedThenable);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
|
||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
||
|
||
function describeFiber(fiber) {
|
||
switch (fiber.tag) {
|
||
case HostRoot:
|
||
case HostPortal:
|
||
case HostText:
|
||
case Fragment:
|
||
case ContextProvider:
|
||
case ContextConsumer:
|
||
return '';
|
||
default:
|
||
var owner = fiber._debugOwner;
|
||
var source = fiber._debugSource;
|
||
var name = getComponentName(fiber.type);
|
||
var ownerName = null;
|
||
if (owner) {
|
||
ownerName = getComponentName(owner.type);
|
||
}
|
||
return describeComponentFrame(name, source, ownerName);
|
||
}
|
||
}
|
||
|
||
function getStackByFiberInDevAndProd(workInProgress) {
|
||
var info = '';
|
||
var node = workInProgress;
|
||
do {
|
||
info += describeFiber(node);
|
||
node = node.return;
|
||
} while (node);
|
||
return info;
|
||
}
|
||
|
||
var current = null;
|
||
var phase = null;
|
||
|
||
function getCurrentFiberOwnerNameInDevOrNull() {
|
||
{
|
||
if (current === null) {
|
||
return null;
|
||
}
|
||
var owner = current._debugOwner;
|
||
if (owner !== null && typeof owner !== 'undefined') {
|
||
return getComponentName(owner.type);
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
|
||
function getCurrentFiberStackInDev() {
|
||
{
|
||
if (current === null) {
|
||
return '';
|
||
}
|
||
// Safe because if current fiber exists, we are reconciling,
|
||
// and it is guaranteed to be the work-in-progress version.
|
||
return getStackByFiberInDevAndProd(current);
|
||
}
|
||
return '';
|
||
}
|
||
|
||
function resetCurrentFiber() {
|
||
{
|
||
ReactDebugCurrentFrame.getCurrentStack = null;
|
||
current = null;
|
||
phase = null;
|
||
}
|
||
}
|
||
|
||
function setCurrentFiber(fiber) {
|
||
{
|
||
ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;
|
||
current = fiber;
|
||
phase = null;
|
||
}
|
||
}
|
||
|
||
function setCurrentPhase(lifeCyclePhase) {
|
||
{
|
||
phase = lifeCyclePhase;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Similar to invariant but only logs a warning if the condition is not met.
|
||
* This can be used to log issues in development environments in critical
|
||
* paths. Removing the logging code for production environments will keep the
|
||
* same logic and follow the same code paths.
|
||
*/
|
||
|
||
var warning = warningWithoutStack$1;
|
||
|
||
{
|
||
warning = function (condition, format) {
|
||
if (condition) {
|
||
return;
|
||
}
|
||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
||
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
||
// eslint-disable-next-line react-internal/warning-and-invariant-args
|
||
|
||
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
||
args[_key - 2] = arguments[_key];
|
||
}
|
||
|
||
warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));
|
||
};
|
||
}
|
||
|
||
var warning$1 = warning;
|
||
|
||
// A reserved attribute.
|
||
// It is handled by React separately and shouldn't be written to the DOM.
|
||
var RESERVED = 0;
|
||
|
||
// A simple string attribute.
|
||
// Attributes that aren't in the whitelist are presumed to have this type.
|
||
var STRING = 1;
|
||
|
||
// A string attribute that accepts booleans in React. In HTML, these are called
|
||
// "enumerated" attributes with "true" and "false" as possible values.
|
||
// When true, it should be set to a "true" string.
|
||
// When false, it should be set to a "false" string.
|
||
var BOOLEANISH_STRING = 2;
|
||
|
||
// A real boolean attribute.
|
||
// When true, it should be present (set either to an empty string or its name).
|
||
// When false, it should be omitted.
|
||
var BOOLEAN = 3;
|
||
|
||
// An attribute that can be used as a flag as well as with a value.
|
||
// When true, it should be present (set either to an empty string or its name).
|
||
// When false, it should be omitted.
|
||
// For any other value, should be present with that value.
|
||
var OVERLOADED_BOOLEAN = 4;
|
||
|
||
// An attribute that must be numeric or parse as a numeric.
|
||
// When falsy, it should be removed.
|
||
var NUMERIC = 5;
|
||
|
||
// An attribute that must be positive numeric or parse as a positive numeric.
|
||
// When falsy, it should be removed.
|
||
var POSITIVE_NUMERIC = 6;
|
||
|
||
/* eslint-disable max-len */
|
||
var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
|
||
/* eslint-enable max-len */
|
||
var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040';
|
||
|
||
|
||
var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
|
||
var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
|
||
|
||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||
var illegalAttributeNameCache = {};
|
||
var validatedAttributeNameCache = {};
|
||
|
||
function isAttributeNameSafe(attributeName) {
|
||
if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
|
||
return true;
|
||
}
|
||
if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
|
||
return false;
|
||
}
|
||
if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
|
||
validatedAttributeNameCache[attributeName] = true;
|
||
return true;
|
||
}
|
||
illegalAttributeNameCache[attributeName] = true;
|
||
{
|
||
warning$1(false, 'Invalid attribute name: `%s`', attributeName);
|
||
}
|
||
return false;
|
||
}
|
||
|
||
function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
|
||
if (propertyInfo !== null) {
|
||
return propertyInfo.type === RESERVED;
|
||
}
|
||
if (isCustomComponentTag) {
|
||
return false;
|
||
}
|
||
if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
|
||
if (propertyInfo !== null && propertyInfo.type === RESERVED) {
|
||
return false;
|
||
}
|
||
switch (typeof value) {
|
||
case 'function':
|
||
// $FlowIssue symbol is perfectly valid here
|
||
case 'symbol':
|
||
// eslint-disable-line
|
||
return true;
|
||
case 'boolean':
|
||
{
|
||
if (isCustomComponentTag) {
|
||
return false;
|
||
}
|
||
if (propertyInfo !== null) {
|
||
return !propertyInfo.acceptsBooleans;
|
||
} else {
|
||
var prefix = name.toLowerCase().slice(0, 5);
|
||
return prefix !== 'data-' && prefix !== 'aria-';
|
||
}
|
||
}
|
||
default:
|
||
return false;
|
||
}
|
||
}
|
||
|
||
function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
|
||
if (value === null || typeof value === 'undefined') {
|
||
return true;
|
||
}
|
||
if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
|
||
return true;
|
||
}
|
||
if (isCustomComponentTag) {
|
||
return false;
|
||
}
|
||
if (propertyInfo !== null) {
|
||
switch (propertyInfo.type) {
|
||
case BOOLEAN:
|
||
return !value;
|
||
case OVERLOADED_BOOLEAN:
|
||
return value === false;
|
||
case NUMERIC:
|
||
return isNaN(value);
|
||
case POSITIVE_NUMERIC:
|
||
return isNaN(value) || value < 1;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
|
||
function getPropertyInfo(name) {
|
||
return properties.hasOwnProperty(name) ? properties[name] : null;
|
||
}
|
||
|
||
function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace) {
|
||
this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
|
||
this.attributeName = attributeName;
|
||
this.attributeNamespace = attributeNamespace;
|
||
this.mustUseProperty = mustUseProperty;
|
||
this.propertyName = name;
|
||
this.type = type;
|
||
}
|
||
|
||
// When adding attributes to this list, be sure to also add them to
|
||
// the `possibleStandardNames` module to ensure casing and incorrect
|
||
// name warnings.
|
||
var properties = {};
|
||
|
||
// These props are reserved by React. They shouldn't be written to the DOM.
|
||
['children', 'dangerouslySetInnerHTML',
|
||
// TODO: This prevents the assignment of defaultValue to regular
|
||
// elements (not just inputs). Now that ReactDOMInput assigns to the
|
||
// defaultValue property -- do we need this?
|
||
'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'].forEach(function (name) {
|
||
properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
|
||
name, // attributeName
|
||
null);
|
||
} // attributeNamespace
|
||
);
|
||
|
||
// A few React string attributes have a different name.
|
||
// This is a mapping from React prop names to the attribute names.
|
||
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
||
var name = _ref[0],
|
||
attributeName = _ref[1];
|
||
|
||
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
|
||
attributeName, // attributeName
|
||
null);
|
||
} // attributeNamespace
|
||
);
|
||
|
||
// These are "enumerated" HTML attributes that accept "true" and "false".
|
||
// In React, we let users pass `true` and `false` even though technically
|
||
// these aren't boolean attributes (they are coerced to strings).
|
||
['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
|
||
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
|
||
name.toLowerCase(), // attributeName
|
||
null);
|
||
} // attributeNamespace
|
||
);
|
||
|
||
// These are "enumerated" SVG attributes that accept "true" and "false".
|
||
// In React, we let users pass `true` and `false` even though technically
|
||
// these aren't boolean attributes (they are coerced to strings).
|
||
// Since these are SVG attributes, their attribute names are case-sensitive.
|
||
['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
|
||
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
|
||
name, // attributeName
|
||
null);
|
||
} // attributeNamespace
|
||
);
|
||
|
||
// These are HTML boolean attributes.
|
||
['allowFullScreen', 'async',
|
||
// Note: there is a special case that prevents it from being written to the DOM
|
||
// on the client side because the browsers are inconsistent. Instead we call focus().
|
||
'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless',
|
||
// Microdata
|
||
'itemScope'].forEach(function (name) {
|
||
properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
|
||
name.toLowerCase(), // attributeName
|
||
null);
|
||
} // attributeNamespace
|
||
);
|
||
|
||
// These are the few React props that we set as DOM properties
|
||
// rather than attributes. These are all booleans.
|
||
['checked',
|
||
// Note: `option.selected` is not updated if `select.multiple` is
|
||
// disabled with `removeAttribute`. We have special logic for handling this.
|
||
'multiple', 'muted', 'selected'].forEach(function (name) {
|
||
properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
|
||
name, // attributeName
|
||
null);
|
||
} // attributeNamespace
|
||
);
|
||
|
||
// These are HTML attributes that are "overloaded booleans": they behave like
|
||
// booleans, but can also accept a string value.
|
||
['capture', 'download'].forEach(function (name) {
|
||
properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
|
||
name, // attributeName
|
||
null);
|
||
} // attributeNamespace
|
||
);
|
||
|
||
// These are HTML attributes that must be positive numbers.
|
||
['cols', 'rows', 'size', 'span'].forEach(function (name) {
|
||
properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
|
||
name, // attributeName
|
||
null);
|
||
} // attributeNamespace
|
||
);
|
||
|
||
// These are HTML attributes that must be numbers.
|
||
['rowSpan', 'start'].forEach(function (name) {
|
||
properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
|
||
name.toLowerCase(), // attributeName
|
||
null);
|
||
} // attributeNamespace
|
||
);
|
||
|
||
var CAMELIZE = /[\-\:]([a-z])/g;
|
||
var capitalize = function (token) {
|
||
return token[1].toUpperCase();
|
||
};
|
||
|
||
// This is a list of all SVG attributes that need special casing, namespacing,
|
||
// or boolean value assignment. Regular attributes that just accept strings
|
||
// and have the same names are omitted, just like in the HTML whitelist.
|
||
// Some of these attributes can be hard to find. This list was created by
|
||
// scrapping the MDN documentation.
|
||
['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height'].forEach(function (attributeName) {
|
||
var name = attributeName.replace(CAMELIZE, capitalize);
|
||
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
|
||
attributeName, null);
|
||
} // attributeNamespace
|
||
);
|
||
|
||
// String SVG attributes with the xlink namespace.
|
||
['xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach(function (attributeName) {
|
||
var name = attributeName.replace(CAMELIZE, capitalize);
|
||
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
|
||
attributeName, 'http://www.w3.org/1999/xlink');
|
||
});
|
||
|
||
// String SVG attributes with the xml namespace.
|
||
['xml:base', 'xml:lang', 'xml:space'].forEach(function (attributeName) {
|
||
var name = attributeName.replace(CAMELIZE, capitalize);
|
||
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
|
||
attributeName, 'http://www.w3.org/XML/1998/namespace');
|
||
});
|
||
|
||
// Special case: this attribute exists both in HTML and SVG.
|
||
// Its "tabindex" attribute name is case-sensitive in SVG so we can't just use
|
||
// its React `tabIndex` name, like we do for attributes that exist only in HTML.
|
||
properties.tabIndex = new PropertyInfoRecord('tabIndex', STRING, false, // mustUseProperty
|
||
'tabindex', // attributeName
|
||
null);
|
||
|
||
/**
|
||
* Get the value for a property on a node. Only used in DEV for SSR validation.
|
||
* The "expected" argument is used as a hint of what the expected value is.
|
||
* Some properties have multiple equivalent values.
|
||
*/
|
||
function getValueForProperty(node, name, expected, propertyInfo) {
|
||
{
|
||
if (propertyInfo.mustUseProperty) {
|
||
var propertyName = propertyInfo.propertyName;
|
||
|
||
return node[propertyName];
|
||
} else {
|
||
var attributeName = propertyInfo.attributeName;
|
||
|
||
var stringValue = null;
|
||
|
||
if (propertyInfo.type === OVERLOADED_BOOLEAN) {
|
||
if (node.hasAttribute(attributeName)) {
|
||
var value = node.getAttribute(attributeName);
|
||
if (value === '') {
|
||
return true;
|
||
}
|
||
if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
|
||
return value;
|
||
}
|
||
if (value === '' + expected) {
|
||
return expected;
|
||
}
|
||
return value;
|
||
}
|
||
} else if (node.hasAttribute(attributeName)) {
|
||
if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
|
||
// We had an attribute but shouldn't have had one, so read it
|
||
// for the error message.
|
||
return node.getAttribute(attributeName);
|
||
}
|
||
if (propertyInfo.type === BOOLEAN) {
|
||
// If this was a boolean, it doesn't matter what the value is
|
||
// the fact that we have it is the same as the expected.
|
||
return expected;
|
||
}
|
||
// Even if this property uses a namespace we use getAttribute
|
||
// because we assume its namespaced name is the same as our config.
|
||
// To use getAttributeNS we need the local name which we don't have
|
||
// in our config atm.
|
||
stringValue = node.getAttribute(attributeName);
|
||
}
|
||
|
||
if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
|
||
return stringValue === null ? expected : stringValue;
|
||
} else if (stringValue === '' + expected) {
|
||
return expected;
|
||
} else {
|
||
return stringValue;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Get the value for a attribute on a node. Only used in DEV for SSR validation.
|
||
* The third argument is used as a hint of what the expected value is. Some
|
||
* attributes have multiple equivalent values.
|
||
*/
|
||
function getValueForAttribute(node, name, expected) {
|
||
{
|
||
if (!isAttributeNameSafe(name)) {
|
||
return;
|
||
}
|
||
if (!node.hasAttribute(name)) {
|
||
return expected === undefined ? undefined : null;
|
||
}
|
||
var value = node.getAttribute(name);
|
||
if (value === '' + expected) {
|
||
return expected;
|
||
}
|
||
return value;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Sets the value for a property on a node.
|
||
*
|
||
* @param {DOMElement} node
|
||
* @param {string} name
|
||
* @param {*} value
|
||
*/
|
||
function setValueForProperty(node, name, value, isCustomComponentTag) {
|
||
var propertyInfo = getPropertyInfo(name);
|
||
if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {
|
||
return;
|
||
}
|
||
if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {
|
||
value = null;
|
||
}
|
||
// If the prop isn't in the special list, treat it as a simple attribute.
|
||
if (isCustomComponentTag || propertyInfo === null) {
|
||
if (isAttributeNameSafe(name)) {
|
||
var _attributeName = name;
|
||
if (value === null) {
|
||
node.removeAttribute(_attributeName);
|
||
} else {
|
||
node.setAttribute(_attributeName, '' + value);
|
||
}
|
||
}
|
||
return;
|
||
}
|
||
var mustUseProperty = propertyInfo.mustUseProperty;
|
||
|
||
if (mustUseProperty) {
|
||
var propertyName = propertyInfo.propertyName;
|
||
|
||
if (value === null) {
|
||
var type = propertyInfo.type;
|
||
|
||
node[propertyName] = type === BOOLEAN ? false : '';
|
||
} else {
|
||
// Contrary to `setAttribute`, object properties are properly
|
||
// `toString`ed by IE8/9.
|
||
node[propertyName] = value;
|
||
}
|
||
return;
|
||
}
|
||
// The rest are treated as attributes with special cases.
|
||
var attributeName = propertyInfo.attributeName,
|
||
attributeNamespace = propertyInfo.attributeNamespace;
|
||
|
||
if (value === null) {
|
||
node.removeAttribute(attributeName);
|
||
} else {
|
||
var _type = propertyInfo.type;
|
||
|
||
var attributeValue = void 0;
|
||
if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
|
||
attributeValue = '';
|
||
} else {
|
||
// `setAttribute` with objects becomes only `[object]` in IE8/9,
|
||
// ('' + value) makes it output the correct toString()-value.
|
||
attributeValue = '' + value;
|
||
}
|
||
if (attributeNamespace) {
|
||
node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
|
||
} else {
|
||
node.setAttribute(attributeName, attributeValue);
|
||
}
|
||
}
|
||
}
|
||
|
||
// Flow does not allow string concatenation of most non-string types. To work
|
||
// around this limitation, we use an opaque type that can only be obtained by
|
||
// passing the value through getToStringValue first.
|
||
function toString(value) {
|
||
return '' + value;
|
||
}
|
||
|
||
function getToStringValue(value) {
|
||
switch (typeof value) {
|
||
case 'boolean':
|
||
case 'number':
|
||
case 'object':
|
||
case 'string':
|
||
case 'undefined':
|
||
return value;
|
||
default:
|
||
// function, symbol are assigned as empty strings
|
||
return '';
|
||
}
|
||
}
|
||
|
||
var ReactDebugCurrentFrame$1 = null;
|
||
|
||
var ReactControlledValuePropTypes = {
|
||
checkPropTypes: null
|
||
};
|
||
|
||
{
|
||
ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
||
|
||
var hasReadOnlyValue = {
|
||
button: true,
|
||
checkbox: true,
|
||
image: true,
|
||
hidden: true,
|
||
radio: true,
|
||
reset: true,
|
||
submit: true
|
||
};
|
||
|
||
var propTypes = {
|
||
value: function (props, propName, componentName) {
|
||
if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null) {
|
||
return null;
|
||
}
|
||
return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
|
||
},
|
||
checked: function (props, propName, componentName) {
|
||
if (props.onChange || props.readOnly || props.disabled || props[propName] == null) {
|
||
return null;
|
||
}
|
||
return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
|
||
}
|
||
};
|
||
|
||
/**
|
||
* Provide a linked `value` attribute for controlled forms. You should not use
|
||
* this outside of the ReactDOM controlled form components.
|
||
*/
|
||
ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
|
||
checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$1.getStackAddendum);
|
||
};
|
||
}
|
||
|
||
var enableUserTimingAPI = true;
|
||
|
||
var enableHooks = false;
|
||
// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
|
||
var debugRenderPhaseSideEffects = false;
|
||
|
||
// In some cases, StrictMode should also double-render lifecycles.
|
||
// This can be confusing for tests though,
|
||
// And it can be bad for performance in production.
|
||
// This feature flag can be used to control the behavior:
|
||
var debugRenderPhaseSideEffectsForStrictMode = true;
|
||
|
||
// To preserve the "Pause on caught exceptions" behavior of the debugger, we
|
||
// replay the begin phase of a failed component inside invokeGuardedCallback.
|
||
var replayFailedUnitOfWorkWithInvokeGuardedCallback = true;
|
||
|
||
// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
|
||
var warnAboutDeprecatedLifecycles = false;
|
||
|
||
// Gather advanced timing metrics for Profiler subtrees.
|
||
var enableProfilerTimer = true;
|
||
|
||
// Trace which interactions trigger each commit.
|
||
var enableSchedulerTracing = true;
|
||
|
||
// Only used in www builds.
|
||
// TODO: true? Here it might just be false.
|
||
|
||
// Only used in www builds.
|
||
|
||
|
||
// Only used in www builds.
|
||
|
||
|
||
// React Fire: prevent the value and checked attributes from syncing
|
||
// with their related DOM properties
|
||
var disableInputAttributeSyncing = false;
|
||
|
||
// These APIs will no longer be "unstable" in the upcoming 16.7 release,
|
||
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
|
||
var enableStableConcurrentModeAPIs = false;
|
||
|
||
var warnAboutShorthandPropertyCollision = false;
|
||
|
||
// TODO: direct imports like some-package/src/* are bad. Fix me.
|
||
var didWarnValueDefaultValue = false;
|
||
var didWarnCheckedDefaultChecked = false;
|
||
var didWarnControlledToUncontrolled = false;
|
||
var didWarnUncontrolledToControlled = false;
|
||
|
||
function isControlled(props) {
|
||
var usesChecked = props.type === 'checkbox' || props.type === 'radio';
|
||
return usesChecked ? props.checked != null : props.value != null;
|
||
}
|
||
|
||
/**
|
||
* Implements an <input> host component that allows setting these optional
|
||
* props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
|
||
*
|
||
* If `checked` or `value` are not supplied (or null/undefined), user actions
|
||
* that affect the checked state or value will trigger updates to the element.
|
||
*
|
||
* If they are supplied (and not null/undefined), the rendered element will not
|
||
* trigger updates to the element. Instead, the props must change in order for
|
||
* the rendered element to be updated.
|
||
*
|
||
* The rendered element will be initialized as unchecked (or `defaultChecked`)
|
||
* with an empty value (or `defaultValue`).
|
||
*
|
||
* See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
|
||
*/
|
||
|
||
function getHostProps(element, props) {
|
||
var node = element;
|
||
var checked = props.checked;
|
||
|
||
var hostProps = _assign({}, props, {
|
||
defaultChecked: undefined,
|
||
defaultValue: undefined,
|
||
value: undefined,
|
||
checked: checked != null ? checked : node._wrapperState.initialChecked
|
||
});
|
||
|
||
return hostProps;
|
||
}
|
||
|
||
function initWrapperState(element, props) {
|
||
{
|
||
ReactControlledValuePropTypes.checkPropTypes('input', props);
|
||
|
||
if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
|
||
warning$1(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
|
||
didWarnCheckedDefaultChecked = true;
|
||
}
|
||
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
|
||
warning$1(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
|
||
didWarnValueDefaultValue = true;
|
||
}
|
||
}
|
||
|
||
var node = element;
|
||
var defaultValue = props.defaultValue == null ? '' : props.defaultValue;
|
||
|
||
node._wrapperState = {
|
||
initialChecked: props.checked != null ? props.checked : props.defaultChecked,
|
||
initialValue: getToStringValue(props.value != null ? props.value : defaultValue),
|
||
controlled: isControlled(props)
|
||
};
|
||
}
|
||
|
||
function updateChecked(element, props) {
|
||
var node = element;
|
||
var checked = props.checked;
|
||
if (checked != null) {
|
||
setValueForProperty(node, 'checked', checked, false);
|
||
}
|
||
}
|
||
|
||
function updateWrapper(element, props) {
|
||
var node = element;
|
||
{
|
||
var _controlled = isControlled(props);
|
||
|
||
if (!node._wrapperState.controlled && _controlled && !didWarnUncontrolledToControlled) {
|
||
warning$1(false, 'A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);
|
||
didWarnUncontrolledToControlled = true;
|
||
}
|
||
if (node._wrapperState.controlled && !_controlled && !didWarnControlledToUncontrolled) {
|
||
warning$1(false, 'A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);
|
||
didWarnControlledToUncontrolled = true;
|
||
}
|
||
}
|
||
|
||
updateChecked(element, props);
|
||
|
||
var value = getToStringValue(props.value);
|
||
var type = props.type;
|
||
|
||
if (value != null) {
|
||
if (type === 'number') {
|
||
if (value === 0 && node.value === '' ||
|
||
// We explicitly want to coerce to number here if possible.
|
||
// eslint-disable-next-line
|
||
node.value != value) {
|
||
node.value = toString(value);
|
||
}
|
||
} else if (node.value !== toString(value)) {
|
||
node.value = toString(value);
|
||
}
|
||
} else if (type === 'submit' || type === 'reset') {
|
||
// Submit/reset inputs need the attribute removed completely to avoid
|
||
// blank-text buttons.
|
||
node.removeAttribute('value');
|
||
return;
|
||
}
|
||
|
||
if (disableInputAttributeSyncing) {
|
||
// When not syncing the value attribute, React only assigns a new value
|
||
// whenever the defaultValue React prop has changed. When not present,
|
||
// React does nothing
|
||
if (props.hasOwnProperty('defaultValue')) {
|
||
setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
|
||
}
|
||
} else {
|
||
// When syncing the value attribute, the value comes from a cascade of
|
||
// properties:
|
||
// 1. The value React property
|
||
// 2. The defaultValue React property
|
||
// 3. Otherwise there should be no change
|
||
if (props.hasOwnProperty('value')) {
|
||
setDefaultValue(node, props.type, value);
|
||
} else if (props.hasOwnProperty('defaultValue')) {
|
||
setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
|
||
}
|
||
}
|
||
|
||
if (disableInputAttributeSyncing) {
|
||
// When not syncing the checked attribute, the attribute is directly
|
||
// controllable from the defaultValue React property. It needs to be
|
||
// updated as new props come in.
|
||
if (props.defaultChecked == null) {
|
||
node.removeAttribute('checked');
|
||
} else {
|
||
node.defaultChecked = !!props.defaultChecked;
|
||
}
|
||
} else {
|
||
// When syncing the checked attribute, it only changes when it needs
|
||
// to be removed, such as transitioning from a checkbox into a text input
|
||
if (props.checked == null && props.defaultChecked != null) {
|
||
node.defaultChecked = !!props.defaultChecked;
|
||
}
|
||
}
|
||
}
|
||
|
||
function postMountWrapper(element, props, isHydrating) {
|
||
var node = element;
|
||
|
||
// Do not assign value if it is already set. This prevents user text input
|
||
// from being lost during SSR hydration.
|
||
if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {
|
||
var type = props.type;
|
||
var isButton = type === 'submit' || type === 'reset';
|
||
|
||
// Avoid setting value attribute on submit/reset inputs as it overrides the
|
||
// default value provided by the browser. See: #12872
|
||
if (isButton && (props.value === undefined || props.value === null)) {
|
||
return;
|
||
}
|
||
|
||
var _initialValue = toString(node._wrapperState.initialValue);
|
||
|
||
// Do not assign value if it is already set. This prevents user text input
|
||
// from being lost during SSR hydration.
|
||
if (!isHydrating) {
|
||
if (disableInputAttributeSyncing) {
|
||
var value = getToStringValue(props.value);
|
||
|
||
// When not syncing the value attribute, the value property points
|
||
// directly to the React prop. Only assign it if it exists.
|
||
if (value != null) {
|
||
// Always assign on buttons so that it is possible to assign an
|
||
// empty string to clear button text.
|
||
//
|
||
// Otherwise, do not re-assign the value property if is empty. This
|
||
// potentially avoids a DOM write and prevents Firefox (~60.0.1) from
|
||
// prematurely marking required inputs as invalid. Equality is compared
|
||
// to the current value in case the browser provided value is not an
|
||
// empty string.
|
||
if (isButton || value !== node.value) {
|
||
node.value = toString(value);
|
||
}
|
||
}
|
||
} else {
|
||
// When syncing the value attribute, the value property should use
|
||
// the wrapperState._initialValue property. This uses:
|
||
//
|
||
// 1. The value React property when present
|
||
// 2. The defaultValue React property when present
|
||
// 3. An empty string
|
||
if (_initialValue !== node.value) {
|
||
node.value = _initialValue;
|
||
}
|
||
}
|
||
}
|
||
|
||
if (disableInputAttributeSyncing) {
|
||
// When not syncing the value attribute, assign the value attribute
|
||
// directly from the defaultValue React property (when present)
|
||
var defaultValue = getToStringValue(props.defaultValue);
|
||
if (defaultValue != null) {
|
||
node.defaultValue = toString(defaultValue);
|
||
}
|
||
} else {
|
||
// Otherwise, the value attribute is synchronized to the property,
|
||
// so we assign defaultValue to the same thing as the value property
|
||
// assignment step above.
|
||
node.defaultValue = _initialValue;
|
||
}
|
||
}
|
||
|
||
// Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
|
||
// this is needed to work around a chrome bug where setting defaultChecked
|
||
// will sometimes influence the value of checked (even after detachment).
|
||
// Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
|
||
// We need to temporarily unset name to avoid disrupting radio button groups.
|
||
var name = node.name;
|
||
if (name !== '') {
|
||
node.name = '';
|
||
}
|
||
|
||
if (disableInputAttributeSyncing) {
|
||
// When not syncing the checked attribute, the checked property
|
||
// never gets assigned. It must be manually set. We don't want
|
||
// to do this when hydrating so that existing user input isn't
|
||
// modified
|
||
if (!isHydrating) {
|
||
updateChecked(element, props);
|
||
}
|
||
|
||
// Only assign the checked attribute if it is defined. This saves
|
||
// a DOM write when controlling the checked attribute isn't needed
|
||
// (text inputs, submit/reset)
|
||
if (props.hasOwnProperty('defaultChecked')) {
|
||
node.defaultChecked = !node.defaultChecked;
|
||
node.defaultChecked = !!props.defaultChecked;
|
||
}
|
||
} else {
|
||
// When syncing the checked attribute, both the checked property and
|
||
// attribute are assigned at the same time using defaultChecked. This uses:
|
||
//
|
||
// 1. The checked React property when present
|
||
// 2. The defaultChecked React property when present
|
||
// 3. Otherwise, false
|
||
node.defaultChecked = !node.defaultChecked;
|
||
node.defaultChecked = !!node._wrapperState.initialChecked;
|
||
}
|
||
|
||
if (name !== '') {
|
||
node.name = name;
|
||
}
|
||
}
|
||
|
||
function restoreControlledState(element, props) {
|
||
var node = element;
|
||
updateWrapper(node, props);
|
||
updateNamedCousins(node, props);
|
||
}
|
||
|
||
function updateNamedCousins(rootNode, props) {
|
||
var name = props.name;
|
||
if (props.type === 'radio' && name != null) {
|
||
var queryRoot = rootNode;
|
||
|
||
while (queryRoot.parentNode) {
|
||
queryRoot = queryRoot.parentNode;
|
||
}
|
||
|
||
// If `rootNode.form` was non-null, then we could try `form.elements`,
|
||
// but that sometimes behaves strangely in IE8. We could also try using
|
||
// `form.getElementsByName`, but that will only return direct children
|
||
// and won't include inputs that use the HTML5 `form=` attribute. Since
|
||
// the input might not even be in a form. It might not even be in the
|
||
// document. Let's just use the local `querySelectorAll` to ensure we don't
|
||
// miss anything.
|
||
var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
|
||
|
||
for (var i = 0; i < group.length; i++) {
|
||
var otherNode = group[i];
|
||
if (otherNode === rootNode || otherNode.form !== rootNode.form) {
|
||
continue;
|
||
}
|
||
// This will throw if radio buttons rendered by different copies of React
|
||
// and the same name are rendered into the same form (same as #1939).
|
||
// That's probably okay; we don't support it just as we don't support
|
||
// mixing React radio buttons with non-React ones.
|
||
var otherProps = getFiberCurrentPropsFromNode$1(otherNode);
|
||
!otherProps ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : void 0;
|
||
|
||
// We need update the tracked value on the named cousin since the value
|
||
// was changed but the input saw no event or value set
|
||
updateValueIfChanged(otherNode);
|
||
|
||
// If this is a controlled radio button group, forcing the input that
|
||
// was previously checked to update will cause it to be come re-checked
|
||
// as appropriate.
|
||
updateWrapper(otherNode, otherProps);
|
||
}
|
||
}
|
||
}
|
||
|
||
// In Chrome, assigning defaultValue to certain input types triggers input validation.
|
||
// For number inputs, the display value loses trailing decimal points. For email inputs,
|
||
// Chrome raises "The specified value <x> is not a valid email address".
|
||
//
|
||
// Here we check to see if the defaultValue has actually changed, avoiding these problems
|
||
// when the user is inputting text
|
||
//
|
||
// https://github.com/facebook/react/issues/7253
|
||
function setDefaultValue(node, type, value) {
|
||
if (
|
||
// Focused number inputs synchronize on blur. See ChangeEventPlugin.js
|
||
type !== 'number' || node.ownerDocument.activeElement !== node) {
|
||
if (value == null) {
|
||
node.defaultValue = toString(node._wrapperState.initialValue);
|
||
} else if (node.defaultValue !== toString(value)) {
|
||
node.defaultValue = toString(value);
|
||
}
|
||
}
|
||
}
|
||
|
||
var eventTypes$1 = {
|
||
change: {
|
||
phasedRegistrationNames: {
|
||
bubbled: 'onChange',
|
||
captured: 'onChangeCapture'
|
||
},
|
||
dependencies: [TOP_BLUR, TOP_CHANGE, TOP_CLICK, TOP_FOCUS, TOP_INPUT, TOP_KEY_DOWN, TOP_KEY_UP, TOP_SELECTION_CHANGE]
|
||
}
|
||
};
|
||
|
||
function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
|
||
var event = SyntheticEvent.getPooled(eventTypes$1.change, inst, nativeEvent, target);
|
||
event.type = 'change';
|
||
// Flag this event loop as needing state restore.
|
||
enqueueStateRestore(target);
|
||
accumulateTwoPhaseDispatches(event);
|
||
return event;
|
||
}
|
||
/**
|
||
* For IE shims
|
||
*/
|
||
var activeElement = null;
|
||
var activeElementInst = null;
|
||
|
||
/**
|
||
* SECTION: handle `change` event
|
||
*/
|
||
function shouldUseChangeEvent(elem) {
|
||
var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
|
||
return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
|
||
}
|
||
|
||
function manualDispatchChangeEvent(nativeEvent) {
|
||
var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));
|
||
|
||
// If change and propertychange bubbled, we'd just bind to it like all the
|
||
// other events and have it go through ReactBrowserEventEmitter. Since it
|
||
// doesn't, we manually listen for the events and so we have to enqueue and
|
||
// process the abstract event manually.
|
||
//
|
||
// Batching is necessary here in order to ensure that all event handlers run
|
||
// before the next rerender (including event handlers attached to ancestor
|
||
// elements instead of directly on the input). Without this, controlled
|
||
// components don't work properly in conjunction with event bubbling because
|
||
// the component is rerendered and the value reverted before all the event
|
||
// handlers can run. See https://github.com/facebook/react/issues/708.
|
||
batchedUpdates(runEventInBatch, event);
|
||
}
|
||
|
||
function runEventInBatch(event) {
|
||
runEventsInBatch(event);
|
||
}
|
||
|
||
function getInstIfValueChanged(targetInst) {
|
||
var targetNode = getNodeFromInstance$1(targetInst);
|
||
if (updateValueIfChanged(targetNode)) {
|
||
return targetInst;
|
||
}
|
||
}
|
||
|
||
function getTargetInstForChangeEvent(topLevelType, targetInst) {
|
||
if (topLevelType === TOP_CHANGE) {
|
||
return targetInst;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* SECTION: handle `input` event
|
||
*/
|
||
var isInputEventSupported = false;
|
||
if (canUseDOM) {
|
||
// IE9 claims to support the input event but fails to trigger it when
|
||
// deleting text, so we ignore its input events.
|
||
isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
|
||
}
|
||
|
||
/**
|
||
* (For IE <=9) Starts tracking propertychange events on the passed-in element
|
||
* and override the value property so that we can distinguish user events from
|
||
* value changes in JS.
|
||
*/
|
||
function startWatchingForValueChange(target, targetInst) {
|
||
activeElement = target;
|
||
activeElementInst = targetInst;
|
||
activeElement.attachEvent('onpropertychange', handlePropertyChange);
|
||
}
|
||
|
||
/**
|
||
* (For IE <=9) Removes the event listeners from the currently-tracked element,
|
||
* if any exists.
|
||
*/
|
||
function stopWatchingForValueChange() {
|
||
if (!activeElement) {
|
||
return;
|
||
}
|
||
activeElement.detachEvent('onpropertychange', handlePropertyChange);
|
||
activeElement = null;
|
||
activeElementInst = null;
|
||
}
|
||
|
||
/**
|
||
* (For IE <=9) Handles a propertychange event, sending a `change` event if
|
||
* the value of the active element has changed.
|
||
*/
|
||
function handlePropertyChange(nativeEvent) {
|
||
if (nativeEvent.propertyName !== 'value') {
|
||
return;
|
||
}
|
||
if (getInstIfValueChanged(activeElementInst)) {
|
||
manualDispatchChangeEvent(nativeEvent);
|
||
}
|
||
}
|
||
|
||
function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
|
||
if (topLevelType === TOP_FOCUS) {
|
||
// In IE9, propertychange fires for most input events but is buggy and
|
||
// doesn't fire when text is deleted, but conveniently, selectionchange
|
||
// appears to fire in all of the remaining cases so we catch those and
|
||
// forward the event if the value has changed
|
||
// In either case, we don't want to call the event handler if the value
|
||
// is changed from JS so we redefine a setter for `.value` that updates
|
||
// our activeElementValue variable, allowing us to ignore those changes
|
||
//
|
||
// stopWatching() should be a noop here but we call it just in case we
|
||
// missed a blur event somehow.
|
||
stopWatchingForValueChange();
|
||
startWatchingForValueChange(target, targetInst);
|
||
} else if (topLevelType === TOP_BLUR) {
|
||
stopWatchingForValueChange();
|
||
}
|
||
}
|
||
|
||
// For IE8 and IE9.
|
||
function getTargetInstForInputEventPolyfill(topLevelType, targetInst) {
|
||
if (topLevelType === TOP_SELECTION_CHANGE || topLevelType === TOP_KEY_UP || topLevelType === TOP_KEY_DOWN) {
|
||
// On the selectionchange event, the target is just document which isn't
|
||
// helpful for us so just check activeElement instead.
|
||
//
|
||
// 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
|
||
// propertychange on the first input event after setting `value` from a
|
||
// script and fires only keydown, keypress, keyup. Catching keyup usually
|
||
// gets it and catching keydown lets us fire an event for the first
|
||
// keystroke if user does a key repeat (it'll be a little delayed: right
|
||
// before the second keystroke). Other input methods (e.g., paste) seem to
|
||
// fire selectionchange normally.
|
||
return getInstIfValueChanged(activeElementInst);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* SECTION: handle `click` event
|
||
*/
|
||
function shouldUseClickEvent(elem) {
|
||
// Use the `click` event to detect changes to checkbox and radio inputs.
|
||
// This approach works across all browsers, whereas `change` does not fire
|
||
// until `blur` in IE8.
|
||
var nodeName = elem.nodeName;
|
||
return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
|
||
}
|
||
|
||
function getTargetInstForClickEvent(topLevelType, targetInst) {
|
||
if (topLevelType === TOP_CLICK) {
|
||
return getInstIfValueChanged(targetInst);
|
||
}
|
||
}
|
||
|
||
function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) {
|
||
if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) {
|
||
return getInstIfValueChanged(targetInst);
|
||
}
|
||
}
|
||
|
||
function handleControlledInputBlur(node) {
|
||
var state = node._wrapperState;
|
||
|
||
if (!state || !state.controlled || node.type !== 'number') {
|
||
return;
|
||
}
|
||
|
||
if (!disableInputAttributeSyncing) {
|
||
// If controlled, assign the value attribute to the current value on blur
|
||
setDefaultValue(node, 'number', node.value);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* This plugin creates an `onChange` event that normalizes change events
|
||
* across form elements. This event fires at a time when it's possible to
|
||
* change the element's value without seeing a flicker.
|
||
*
|
||
* Supported elements are:
|
||
* - input (see `isTextInputElement`)
|
||
* - textarea
|
||
* - select
|
||
*/
|
||
var ChangeEventPlugin = {
|
||
eventTypes: eventTypes$1,
|
||
|
||
_isInputEventSupported: isInputEventSupported,
|
||
|
||
extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
||
var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;
|
||
|
||
var getTargetInstFunc = void 0,
|
||
handleEventFunc = void 0;
|
||
if (shouldUseChangeEvent(targetNode)) {
|
||
getTargetInstFunc = getTargetInstForChangeEvent;
|
||
} else if (isTextInputElement(targetNode)) {
|
||
if (isInputEventSupported) {
|
||
getTargetInstFunc = getTargetInstForInputOrChangeEvent;
|
||
} else {
|
||
getTargetInstFunc = getTargetInstForInputEventPolyfill;
|
||
handleEventFunc = handleEventsForInputEventPolyfill;
|
||
}
|
||
} else if (shouldUseClickEvent(targetNode)) {
|
||
getTargetInstFunc = getTargetInstForClickEvent;
|
||
}
|
||
|
||
if (getTargetInstFunc) {
|
||
var inst = getTargetInstFunc(topLevelType, targetInst);
|
||
if (inst) {
|
||
var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
|
||
return event;
|
||
}
|
||
}
|
||
|
||
if (handleEventFunc) {
|
||
handleEventFunc(topLevelType, targetNode, targetInst);
|
||
}
|
||
|
||
// When blurring, set the value attribute for number inputs
|
||
if (topLevelType === TOP_BLUR) {
|
||
handleControlledInputBlur(targetNode);
|
||
}
|
||
}
|
||
};
|
||
|
||
/**
|
||
* Module that is injectable into `EventPluginHub`, that specifies a
|
||
* deterministic ordering of `EventPlugin`s. A convenient way to reason about
|
||
* plugins, without having to package every one of them. This is better than
|
||
* having plugins be ordered in the same order that they are injected because
|
||
* that ordering would be influenced by the packaging order.
|
||
* `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
|
||
* preventing default on events is convenient in `SimpleEventPlugin` handlers.
|
||
*/
|
||
var DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
|
||
|
||
var SyntheticUIEvent = SyntheticEvent.extend({
|
||
view: null,
|
||
detail: null
|
||
});
|
||
|
||
var modifierKeyToProp = {
|
||
Alt: 'altKey',
|
||
Control: 'ctrlKey',
|
||
Meta: 'metaKey',
|
||
Shift: 'shiftKey'
|
||
};
|
||
|
||
// Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
|
||
// getModifierState. If getModifierState is not supported, we map it to a set of
|
||
// modifier keys exposed by the event. In this case, Lock-keys are not supported.
|
||
/**
|
||
* Translation from modifier key to the associated property in the event.
|
||
* @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
|
||
*/
|
||
|
||
function modifierStateGetter(keyArg) {
|
||
var syntheticEvent = this;
|
||
var nativeEvent = syntheticEvent.nativeEvent;
|
||
if (nativeEvent.getModifierState) {
|
||
return nativeEvent.getModifierState(keyArg);
|
||
}
|
||
var keyProp = modifierKeyToProp[keyArg];
|
||
return keyProp ? !!nativeEvent[keyProp] : false;
|
||
}
|
||
|
||
function getEventModifierState(nativeEvent) {
|
||
return modifierStateGetter;
|
||
}
|
||
|
||
var previousScreenX = 0;
|
||
var previousScreenY = 0;
|
||
// Use flags to signal movementX/Y has already been set
|
||
var isMovementXSet = false;
|
||
var isMovementYSet = false;
|
||
|
||
/**
|
||
* @interface MouseEvent
|
||
* @see http://www.w3.org/TR/DOM-Level-3-Events/
|
||
*/
|
||
var SyntheticMouseEvent = SyntheticUIEvent.extend({
|
||
screenX: null,
|
||
screenY: null,
|
||
clientX: null,
|
||
clientY: null,
|
||
pageX: null,
|
||
pageY: null,
|
||
ctrlKey: null,
|
||
shiftKey: null,
|
||
altKey: null,
|
||
metaKey: null,
|
||
getModifierState: getEventModifierState,
|
||
button: null,
|
||
buttons: null,
|
||
relatedTarget: function (event) {
|
||
return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
|
||
},
|
||
movementX: function (event) {
|
||
if ('movementX' in event) {
|
||
return event.movementX;
|
||
}
|
||
|
||
var screenX = previousScreenX;
|
||
previousScreenX = event.screenX;
|
||
|
||
if (!isMovementXSet) {
|
||
isMovementXSet = true;
|
||
return 0;
|
||
}
|
||
|
||
return event.type === 'mousemove' ? event.screenX - screenX : 0;
|
||
},
|
||
movementY: function (event) {
|
||
if ('movementY' in event) {
|
||
return event.movementY;
|
||
}
|
||
|
||
var screenY = previousScreenY;
|
||
previousScreenY = event.screenY;
|
||
|
||
if (!isMovementYSet) {
|
||
isMovementYSet = true;
|
||
return 0;
|
||
}
|
||
|
||
return event.type === 'mousemove' ? event.screenY - screenY : 0;
|
||
}
|
||
});
|
||
|
||
/**
|
||
* @interface PointerEvent
|
||
* @see http://www.w3.org/TR/pointerevents/
|
||
*/
|
||
var SyntheticPointerEvent = SyntheticMouseEvent.extend({
|
||
pointerId: null,
|
||
width: null,
|
||
height: null,
|
||
pressure: null,
|
||
tangentialPressure: null,
|
||
tiltX: null,
|
||
tiltY: null,
|
||
twist: null,
|
||
pointerType: null,
|
||
isPrimary: null
|
||
});
|
||
|
||
var eventTypes$2 = {
|
||
mouseEnter: {
|
||
registrationName: 'onMouseEnter',
|
||
dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
|
||
},
|
||
mouseLeave: {
|
||
registrationName: 'onMouseLeave',
|
||
dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
|
||
},
|
||
pointerEnter: {
|
||
registrationName: 'onPointerEnter',
|
||
dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
|
||
},
|
||
pointerLeave: {
|
||
registrationName: 'onPointerLeave',
|
||
dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
|
||
}
|
||
};
|
||
|
||
var EnterLeaveEventPlugin = {
|
||
eventTypes: eventTypes$2,
|
||
|
||
/**
|
||
* For almost every interaction we care about, there will be both a top-level
|
||
* `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
|
||
* we do not extract duplicate events. However, moving the mouse into the
|
||
* browser from outside will not fire a `mouseout` event. In this case, we use
|
||
* the `mouseover` top-level event.
|
||
*/
|
||
extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
||
var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER;
|
||
var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT;
|
||
|
||
if (isOverEvent && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
|
||
return null;
|
||
}
|
||
|
||
if (!isOutEvent && !isOverEvent) {
|
||
// Must not be a mouse or pointer in or out - ignoring.
|
||
return null;
|
||
}
|
||
|
||
var win = void 0;
|
||
if (nativeEventTarget.window === nativeEventTarget) {
|
||
// `nativeEventTarget` is probably a window object.
|
||
win = nativeEventTarget;
|
||
} else {
|
||
// TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
|
||
var doc = nativeEventTarget.ownerDocument;
|
||
if (doc) {
|
||
win = doc.defaultView || doc.parentWindow;
|
||
} else {
|
||
win = window;
|
||
}
|
||
}
|
||
|
||
var from = void 0;
|
||
var to = void 0;
|
||
if (isOutEvent) {
|
||
from = targetInst;
|
||
var related = nativeEvent.relatedTarget || nativeEvent.toElement;
|
||
to = related ? getClosestInstanceFromNode(related) : null;
|
||
} else {
|
||
// Moving to a node from outside the window.
|
||
from = null;
|
||
to = targetInst;
|
||
}
|
||
|
||
if (from === to) {
|
||
// Nothing pertains to our managed components.
|
||
return null;
|
||
}
|
||
|
||
var eventInterface = void 0,
|
||
leaveEventType = void 0,
|
||
enterEventType = void 0,
|
||
eventTypePrefix = void 0;
|
||
|
||
if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) {
|
||
eventInterface = SyntheticMouseEvent;
|
||
leaveEventType = eventTypes$2.mouseLeave;
|
||
enterEventType = eventTypes$2.mouseEnter;
|
||
eventTypePrefix = 'mouse';
|
||
} else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) {
|
||
eventInterface = SyntheticPointerEvent;
|
||
leaveEventType = eventTypes$2.pointerLeave;
|
||
enterEventType = eventTypes$2.pointerEnter;
|
||
eventTypePrefix = 'pointer';
|
||
}
|
||
|
||
var fromNode = from == null ? win : getNodeFromInstance$1(from);
|
||
var toNode = to == null ? win : getNodeFromInstance$1(to);
|
||
|
||
var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget);
|
||
leave.type = eventTypePrefix + 'leave';
|
||
leave.target = fromNode;
|
||
leave.relatedTarget = toNode;
|
||
|
||
var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget);
|
||
enter.type = eventTypePrefix + 'enter';
|
||
enter.target = toNode;
|
||
enter.relatedTarget = fromNode;
|
||
|
||
accumulateEnterLeaveDispatches(leave, enter, from, to);
|
||
|
||
return [leave, enter];
|
||
}
|
||
};
|
||
|
||
/*eslint-disable no-self-compare */
|
||
|
||
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
||
|
||
/**
|
||
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
||
*/
|
||
function is(x, y) {
|
||
// SameValue algorithm
|
||
if (x === y) {
|
||
// Steps 1-5, 7-10
|
||
// Steps 6.b-6.e: +0 != -0
|
||
// Added the nonzero y check to make Flow happy, but it is redundant
|
||
return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
||
} else {
|
||
// Step 6.a: NaN == NaN
|
||
return x !== x && y !== y;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Performs equality by iterating through keys on an object and returning false
|
||
* when any key has values which are not strictly equal between the arguments.
|
||
* Returns true when the values of all keys are strictly equal.
|
||
*/
|
||
function shallowEqual(objA, objB) {
|
||
if (is(objA, objB)) {
|
||
return true;
|
||
}
|
||
|
||
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
|
||
return false;
|
||
}
|
||
|
||
var keysA = Object.keys(objA);
|
||
var keysB = Object.keys(objB);
|
||
|
||
if (keysA.length !== keysB.length) {
|
||
return false;
|
||
}
|
||
|
||
// Test for A's keys different from B.
|
||
for (var i = 0; i < keysA.length; i++) {
|
||
if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
|
||
return false;
|
||
}
|
||
}
|
||
|
||
return true;
|
||
}
|
||
|
||
/**
|
||
* `ReactInstanceMap` maintains a mapping from a public facing stateful
|
||
* instance (key) and the internal representation (value). This allows public
|
||
* methods to accept the user facing instance as an argument and map them back
|
||
* to internal methods.
|
||
*
|
||
* Note that this module is currently shared and assumed to be stateless.
|
||
* If this becomes an actual Map, that will break.
|
||
*/
|
||
|
||
/**
|
||
* This API should be called `delete` but we'd have to make sure to always
|
||
* transform these to strings for IE support. When this transform is fully
|
||
* supported we can rename it.
|
||
*/
|
||
|
||
|
||
function get(key) {
|
||
return key._reactInternalFiber;
|
||
}
|
||
|
||
function has(key) {
|
||
return key._reactInternalFiber !== undefined;
|
||
}
|
||
|
||
function set(key, value) {
|
||
key._reactInternalFiber = value;
|
||
}
|
||
|
||
// Don't change these two values. They're used by React Dev Tools.
|
||
var NoEffect = /* */0;
|
||
var PerformedWork = /* */1;
|
||
|
||
// You can change the rest (and add more).
|
||
var Placement = /* */2;
|
||
var Update = /* */4;
|
||
var PlacementAndUpdate = /* */6;
|
||
var Deletion = /* */8;
|
||
var ContentReset = /* */16;
|
||
var Callback = /* */32;
|
||
var DidCapture = /* */64;
|
||
var Ref = /* */128;
|
||
var Snapshot = /* */256;
|
||
var Passive = /* */512;
|
||
|
||
// Passive & Update & Callback & Ref & Snapshot
|
||
var LifecycleEffectMask = /* */932;
|
||
|
||
// Union of all host effects
|
||
var HostEffectMask = /* */1023;
|
||
|
||
var Incomplete = /* */1024;
|
||
var ShouldCapture = /* */2048;
|
||
|
||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
||
|
||
var MOUNTING = 1;
|
||
var MOUNTED = 2;
|
||
var UNMOUNTED = 3;
|
||
|
||
function isFiberMountedImpl(fiber) {
|
||
var node = fiber;
|
||
if (!fiber.alternate) {
|
||
// If there is no alternate, this might be a new tree that isn't inserted
|
||
// yet. If it is, then it will have a pending insertion effect on it.
|
||
if ((node.effectTag & Placement) !== NoEffect) {
|
||
return MOUNTING;
|
||
}
|
||
while (node.return) {
|
||
node = node.return;
|
||
if ((node.effectTag & Placement) !== NoEffect) {
|
||
return MOUNTING;
|
||
}
|
||
}
|
||
} else {
|
||
while (node.return) {
|
||
node = node.return;
|
||
}
|
||
}
|
||
if (node.tag === HostRoot) {
|
||
// TODO: Check if this was a nested HostRoot when used with
|
||
// renderContainerIntoSubtree.
|
||
return MOUNTED;
|
||
}
|
||
// If we didn't hit the root, that means that we're in an disconnected tree
|
||
// that has been unmounted.
|
||
return UNMOUNTED;
|
||
}
|
||
|
||
function isFiberMounted(fiber) {
|
||
return isFiberMountedImpl(fiber) === MOUNTED;
|
||
}
|
||
|
||
function isMounted(component) {
|
||
{
|
||
var owner = ReactCurrentOwner$1.current;
|
||
if (owner !== null && owner.tag === ClassComponent) {
|
||
var ownerFiber = owner;
|
||
var instance = ownerFiber.stateNode;
|
||
!instance._warnedAboutRefsInRender ? warningWithoutStack$1(false, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component') : void 0;
|
||
instance._warnedAboutRefsInRender = true;
|
||
}
|
||
}
|
||
|
||
var fiber = get(component);
|
||
if (!fiber) {
|
||
return false;
|
||
}
|
||
return isFiberMountedImpl(fiber) === MOUNTED;
|
||
}
|
||
|
||
function assertIsMounted(fiber) {
|
||
!(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
|
||
}
|
||
|
||
function findCurrentFiberUsingSlowPath(fiber) {
|
||
var alternate = fiber.alternate;
|
||
if (!alternate) {
|
||
// If there is no alternate, then we only need to check if it is mounted.
|
||
var state = isFiberMountedImpl(fiber);
|
||
!(state !== UNMOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
|
||
if (state === MOUNTING) {
|
||
return null;
|
||
}
|
||
return fiber;
|
||
}
|
||
// If we have two possible branches, we'll walk backwards up to the root
|
||
// to see what path the root points to. On the way we may hit one of the
|
||
// special cases and we'll deal with them.
|
||
var a = fiber;
|
||
var b = alternate;
|
||
while (true) {
|
||
var parentA = a.return;
|
||
var parentB = parentA ? parentA.alternate : null;
|
||
if (!parentA || !parentB) {
|
||
// We're at the root.
|
||
break;
|
||
}
|
||
|
||
// If both copies of the parent fiber point to the same child, we can
|
||
// assume that the child is current. This happens when we bailout on low
|
||
// priority: the bailed out fiber's child reuses the current child.
|
||
if (parentA.child === parentB.child) {
|
||
var child = parentA.child;
|
||
while (child) {
|
||
if (child === a) {
|
||
// We've determined that A is the current branch.
|
||
assertIsMounted(parentA);
|
||
return fiber;
|
||
}
|
||
if (child === b) {
|
||
// We've determined that B is the current branch.
|
||
assertIsMounted(parentA);
|
||
return alternate;
|
||
}
|
||
child = child.sibling;
|
||
}
|
||
// We should never have an alternate for any mounting node. So the only
|
||
// way this could possibly happen is if this was unmounted, if at all.
|
||
invariant(false, 'Unable to find node on an unmounted component.');
|
||
}
|
||
|
||
if (a.return !== b.return) {
|
||
// The return pointer of A and the return pointer of B point to different
|
||
// fibers. We assume that return pointers never criss-cross, so A must
|
||
// belong to the child set of A.return, and B must belong to the child
|
||
// set of B.return.
|
||
a = parentA;
|
||
b = parentB;
|
||
} else {
|
||
// The return pointers point to the same fiber. We'll have to use the
|
||
// default, slow path: scan the child sets of each parent alternate to see
|
||
// which child belongs to which set.
|
||
//
|
||
// Search parent A's child set
|
||
var didFindChild = false;
|
||
var _child = parentA.child;
|
||
while (_child) {
|
||
if (_child === a) {
|
||
didFindChild = true;
|
||
a = parentA;
|
||
b = parentB;
|
||
break;
|
||
}
|
||
if (_child === b) {
|
||
didFindChild = true;
|
||
b = parentA;
|
||
a = parentB;
|
||
break;
|
||
}
|
||
_child = _child.sibling;
|
||
}
|
||
if (!didFindChild) {
|
||
// Search parent B's child set
|
||
_child = parentB.child;
|
||
while (_child) {
|
||
if (_child === a) {
|
||
didFindChild = true;
|
||
a = parentB;
|
||
b = parentA;
|
||
break;
|
||
}
|
||
if (_child === b) {
|
||
didFindChild = true;
|
||
b = parentB;
|
||
a = parentA;
|
||
break;
|
||
}
|
||
_child = _child.sibling;
|
||
}
|
||
!didFindChild ? invariant(false, 'Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.') : void 0;
|
||
}
|
||
}
|
||
|
||
!(a.alternate === b) ? invariant(false, 'Return fibers should always be each others\' alternates. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
}
|
||
// If the root is not a host container, we're in a disconnected tree. I.e.
|
||
// unmounted.
|
||
!(a.tag === HostRoot) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;
|
||
if (a.stateNode.current === a) {
|
||
// We've determined that A is the current branch.
|
||
return fiber;
|
||
}
|
||
// Otherwise B has to be current branch.
|
||
return alternate;
|
||
}
|
||
|
||
function findCurrentHostFiber(parent) {
|
||
var currentParent = findCurrentFiberUsingSlowPath(parent);
|
||
if (!currentParent) {
|
||
return null;
|
||
}
|
||
|
||
// Next we'll drill down this component to find the first HostComponent/Text.
|
||
var node = currentParent;
|
||
while (true) {
|
||
if (node.tag === HostComponent || node.tag === HostText) {
|
||
return node;
|
||
} else if (node.child) {
|
||
node.child.return = node;
|
||
node = node.child;
|
||
continue;
|
||
}
|
||
if (node === currentParent) {
|
||
return null;
|
||
}
|
||
while (!node.sibling) {
|
||
if (!node.return || node.return === currentParent) {
|
||
return null;
|
||
}
|
||
node = node.return;
|
||
}
|
||
node.sibling.return = node.return;
|
||
node = node.sibling;
|
||
}
|
||
// Flow needs the return null here, but ESLint complains about it.
|
||
// eslint-disable-next-line no-unreachable
|
||
return null;
|
||
}
|
||
|
||
function findCurrentHostFiberWithNoPortals(parent) {
|
||
var currentParent = findCurrentFiberUsingSlowPath(parent);
|
||
if (!currentParent) {
|
||
return null;
|
||
}
|
||
|
||
// Next we'll drill down this component to find the first HostComponent/Text.
|
||
var node = currentParent;
|
||
while (true) {
|
||
if (node.tag === HostComponent || node.tag === HostText) {
|
||
return node;
|
||
} else if (node.child && node.tag !== HostPortal) {
|
||
node.child.return = node;
|
||
node = node.child;
|
||
continue;
|
||
}
|
||
if (node === currentParent) {
|
||
return null;
|
||
}
|
||
while (!node.sibling) {
|
||
if (!node.return || node.return === currentParent) {
|
||
return null;
|
||
}
|
||
node = node.return;
|
||
}
|
||
node.sibling.return = node.return;
|
||
node = node.sibling;
|
||
}
|
||
// Flow needs the return null here, but ESLint complains about it.
|
||
// eslint-disable-next-line no-unreachable
|
||
return null;
|
||
}
|
||
|
||
function addEventBubbleListener(element, eventType, listener) {
|
||
element.addEventListener(eventType, listener, false);
|
||
}
|
||
|
||
function addEventCaptureListener(element, eventType, listener) {
|
||
element.addEventListener(eventType, listener, true);
|
||
}
|
||
|
||
/**
|
||
* @interface Event
|
||
* @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
|
||
* @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
|
||
*/
|
||
var SyntheticAnimationEvent = SyntheticEvent.extend({
|
||
animationName: null,
|
||
elapsedTime: null,
|
||
pseudoElement: null
|
||
});
|
||
|
||
/**
|
||
* @interface Event
|
||
* @see http://www.w3.org/TR/clipboard-apis/
|
||
*/
|
||
var SyntheticClipboardEvent = SyntheticEvent.extend({
|
||
clipboardData: function (event) {
|
||
return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
|
||
}
|
||
});
|
||
|
||
/**
|
||
* @interface FocusEvent
|
||
* @see http://www.w3.org/TR/DOM-Level-3-Events/
|
||
*/
|
||
var SyntheticFocusEvent = SyntheticUIEvent.extend({
|
||
relatedTarget: null
|
||
});
|
||
|
||
/**
|
||
* `charCode` represents the actual "character code" and is safe to use with
|
||
* `String.fromCharCode`. As such, only keys that correspond to printable
|
||
* characters produce a valid `charCode`, the only exception to this is Enter.
|
||
* The Tab-key is considered non-printable and does not have a `charCode`,
|
||
* presumably because it does not produce a tab-character in browsers.
|
||
*
|
||
* @param {object} nativeEvent Native browser event.
|
||
* @return {number} Normalized `charCode` property.
|
||
*/
|
||
function getEventCharCode(nativeEvent) {
|
||
var charCode = void 0;
|
||
var keyCode = nativeEvent.keyCode;
|
||
|
||
if ('charCode' in nativeEvent) {
|
||
charCode = nativeEvent.charCode;
|
||
|
||
// FF does not set `charCode` for the Enter-key, check against `keyCode`.
|
||
if (charCode === 0 && keyCode === 13) {
|
||
charCode = 13;
|
||
}
|
||
} else {
|
||
// IE8 does not implement `charCode`, but `keyCode` has the correct value.
|
||
charCode = keyCode;
|
||
}
|
||
|
||
// IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
|
||
// report Enter as charCode 10 when ctrl is pressed.
|
||
if (charCode === 10) {
|
||
charCode = 13;
|
||
}
|
||
|
||
// Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
|
||
// Must not discard the (non-)printable Enter-key.
|
||
if (charCode >= 32 || charCode === 13) {
|
||
return charCode;
|
||
}
|
||
|
||
return 0;
|
||
}
|
||
|
||
/**
|
||
* Normalization of deprecated HTML5 `key` values
|
||
* @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
|
||
*/
|
||
var normalizeKey = {
|
||
Esc: 'Escape',
|
||
Spacebar: ' ',
|
||
Left: 'ArrowLeft',
|
||
Up: 'ArrowUp',
|
||
Right: 'ArrowRight',
|
||
Down: 'ArrowDown',
|
||
Del: 'Delete',
|
||
Win: 'OS',
|
||
Menu: 'ContextMenu',
|
||
Apps: 'ContextMenu',
|
||
Scroll: 'ScrollLock',
|
||
MozPrintableKey: 'Unidentified'
|
||
};
|
||
|
||
/**
|
||
* Translation from legacy `keyCode` to HTML5 `key`
|
||
* Only special keys supported, all others depend on keyboard layout or browser
|
||
* @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
|
||
*/
|
||
var translateToKey = {
|
||
'8': 'Backspace',
|
||
'9': 'Tab',
|
||
'12': 'Clear',
|
||
'13': 'Enter',
|
||
'16': 'Shift',
|
||
'17': 'Control',
|
||
'18': 'Alt',
|
||
'19': 'Pause',
|
||
'20': 'CapsLock',
|
||
'27': 'Escape',
|
||
'32': ' ',
|
||
'33': 'PageUp',
|
||
'34': 'PageDown',
|
||
'35': 'End',
|
||
'36': 'Home',
|
||
'37': 'ArrowLeft',
|
||
'38': 'ArrowUp',
|
||
'39': 'ArrowRight',
|
||
'40': 'ArrowDown',
|
||
'45': 'Insert',
|
||
'46': 'Delete',
|
||
'112': 'F1',
|
||
'113': 'F2',
|
||
'114': 'F3',
|
||
'115': 'F4',
|
||
'116': 'F5',
|
||
'117': 'F6',
|
||
'118': 'F7',
|
||
'119': 'F8',
|
||
'120': 'F9',
|
||
'121': 'F10',
|
||
'122': 'F11',
|
||
'123': 'F12',
|
||
'144': 'NumLock',
|
||
'145': 'ScrollLock',
|
||
'224': 'Meta'
|
||
};
|
||
|
||
/**
|
||
* @param {object} nativeEvent Native browser event.
|
||
* @return {string} Normalized `key` property.
|
||
*/
|
||
function getEventKey(nativeEvent) {
|
||
if (nativeEvent.key) {
|
||
// Normalize inconsistent values reported by browsers due to
|
||
// implementations of a working draft specification.
|
||
|
||
// FireFox implements `key` but returns `MozPrintableKey` for all
|
||
// printable characters (normalized to `Unidentified`), ignore it.
|
||
var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
|
||
if (key !== 'Unidentified') {
|
||
return key;
|
||
}
|
||
}
|
||
|
||
// Browser does not implement `key`, polyfill as much of it as we can.
|
||
if (nativeEvent.type === 'keypress') {
|
||
var charCode = getEventCharCode(nativeEvent);
|
||
|
||
// The enter-key is technically both printable and non-printable and can
|
||
// thus be captured by `keypress`, no other non-printable key should.
|
||
return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
|
||
}
|
||
if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
|
||
// While user keyboard layout determines the actual meaning of each
|
||
// `keyCode` value, almost all function keys have a universal value.
|
||
return translateToKey[nativeEvent.keyCode] || 'Unidentified';
|
||
}
|
||
return '';
|
||
}
|
||
|
||
/**
|
||
* @interface KeyboardEvent
|
||
* @see http://www.w3.org/TR/DOM-Level-3-Events/
|
||
*/
|
||
var SyntheticKeyboardEvent = SyntheticUIEvent.extend({
|
||
key: getEventKey,
|
||
location: null,
|
||
ctrlKey: null,
|
||
shiftKey: null,
|
||
altKey: null,
|
||
metaKey: null,
|
||
repeat: null,
|
||
locale: null,
|
||
getModifierState: getEventModifierState,
|
||
// Legacy Interface
|
||
charCode: function (event) {
|
||
// `charCode` is the result of a KeyPress event and represents the value of
|
||
// the actual printable character.
|
||
|
||
// KeyPress is deprecated, but its replacement is not yet final and not
|
||
// implemented in any major browser. Only KeyPress has charCode.
|
||
if (event.type === 'keypress') {
|
||
return getEventCharCode(event);
|
||
}
|
||
return 0;
|
||
},
|
||
keyCode: function (event) {
|
||
// `keyCode` is the result of a KeyDown/Up event and represents the value of
|
||
// physical keyboard key.
|
||
|
||
// The actual meaning of the value depends on the users' keyboard layout
|
||
// which cannot be detected. Assuming that it is a US keyboard layout
|
||
// provides a surprisingly accurate mapping for US and European users.
|
||
// Due to this, it is left to the user to implement at this time.
|
||
if (event.type === 'keydown' || event.type === 'keyup') {
|
||
return event.keyCode;
|
||
}
|
||
return 0;
|
||
},
|
||
which: function (event) {
|
||
// `which` is an alias for either `keyCode` or `charCode` depending on the
|
||
// type of the event.
|
||
if (event.type === 'keypress') {
|
||
return getEventCharCode(event);
|
||
}
|
||
if (event.type === 'keydown' || event.type === 'keyup') {
|
||
return event.keyCode;
|
||
}
|
||
return 0;
|
||
}
|
||
});
|
||
|
||
/**
|
||
* @interface DragEvent
|
||
* @see http://www.w3.org/TR/DOM-Level-3-Events/
|
||
*/
|
||
var SyntheticDragEvent = SyntheticMouseEvent.extend({
|
||
dataTransfer: null
|
||
});
|
||
|
||
/**
|
||
* @interface TouchEvent
|
||
* @see http://www.w3.org/TR/touch-events/
|
||
*/
|
||
var SyntheticTouchEvent = SyntheticUIEvent.extend({
|
||
touches: null,
|
||
targetTouches: null,
|
||
changedTouches: null,
|
||
altKey: null,
|
||
metaKey: null,
|
||
ctrlKey: null,
|
||
shiftKey: null,
|
||
getModifierState: getEventModifierState
|
||
});
|
||
|
||
/**
|
||
* @interface Event
|
||
* @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
|
||
* @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
|
||
*/
|
||
var SyntheticTransitionEvent = SyntheticEvent.extend({
|
||
propertyName: null,
|
||
elapsedTime: null,
|
||
pseudoElement: null
|
||
});
|
||
|
||
/**
|
||
* @interface WheelEvent
|
||
* @see http://www.w3.org/TR/DOM-Level-3-Events/
|
||
*/
|
||
var SyntheticWheelEvent = SyntheticMouseEvent.extend({
|
||
deltaX: function (event) {
|
||
return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
|
||
'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
|
||
},
|
||
deltaY: function (event) {
|
||
return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
|
||
'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
|
||
'wheelDelta' in event ? -event.wheelDelta : 0;
|
||
},
|
||
|
||
deltaZ: null,
|
||
|
||
// Browsers without "deltaMode" is reporting in raw wheel delta where one
|
||
// notch on the scroll is always +/- 120, roughly equivalent to pixels.
|
||
// A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
|
||
// ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
|
||
deltaMode: null
|
||
});
|
||
|
||
/**
|
||
* Turns
|
||
* ['abort', ...]
|
||
* into
|
||
* eventTypes = {
|
||
* 'abort': {
|
||
* phasedRegistrationNames: {
|
||
* bubbled: 'onAbort',
|
||
* captured: 'onAbortCapture',
|
||
* },
|
||
* dependencies: [TOP_ABORT],
|
||
* },
|
||
* ...
|
||
* };
|
||
* topLevelEventsToDispatchConfig = new Map([
|
||
* [TOP_ABORT, { sameConfig }],
|
||
* ]);
|
||
*/
|
||
|
||
var interactiveEventTypeNames = [[TOP_BLUR, 'blur'], [TOP_CANCEL, 'cancel'], [TOP_CLICK, 'click'], [TOP_CLOSE, 'close'], [TOP_CONTEXT_MENU, 'contextMenu'], [TOP_COPY, 'copy'], [TOP_CUT, 'cut'], [TOP_AUX_CLICK, 'auxClick'], [TOP_DOUBLE_CLICK, 'doubleClick'], [TOP_DRAG_END, 'dragEnd'], [TOP_DRAG_START, 'dragStart'], [TOP_DROP, 'drop'], [TOP_FOCUS, 'focus'], [TOP_INPUT, 'input'], [TOP_INVALID, 'invalid'], [TOP_KEY_DOWN, 'keyDown'], [TOP_KEY_PRESS, 'keyPress'], [TOP_KEY_UP, 'keyUp'], [TOP_MOUSE_DOWN, 'mouseDown'], [TOP_MOUSE_UP, 'mouseUp'], [TOP_PASTE, 'paste'], [TOP_PAUSE, 'pause'], [TOP_PLAY, 'play'], [TOP_POINTER_CANCEL, 'pointerCancel'], [TOP_POINTER_DOWN, 'pointerDown'], [TOP_POINTER_UP, 'pointerUp'], [TOP_RATE_CHANGE, 'rateChange'], [TOP_RESET, 'reset'], [TOP_SEEKED, 'seeked'], [TOP_SUBMIT, 'submit'], [TOP_TOUCH_CANCEL, 'touchCancel'], [TOP_TOUCH_END, 'touchEnd'], [TOP_TOUCH_START, 'touchStart'], [TOP_VOLUME_CHANGE, 'volumeChange']];
|
||
var nonInteractiveEventTypeNames = [[TOP_ABORT, 'abort'], [TOP_ANIMATION_END, 'animationEnd'], [TOP_ANIMATION_ITERATION, 'animationIteration'], [TOP_ANIMATION_START, 'animationStart'], [TOP_CAN_PLAY, 'canPlay'], [TOP_CAN_PLAY_THROUGH, 'canPlayThrough'], [TOP_DRAG, 'drag'], [TOP_DRAG_ENTER, 'dragEnter'], [TOP_DRAG_EXIT, 'dragExit'], [TOP_DRAG_LEAVE, 'dragLeave'], [TOP_DRAG_OVER, 'dragOver'], [TOP_DURATION_CHANGE, 'durationChange'], [TOP_EMPTIED, 'emptied'], [TOP_ENCRYPTED, 'encrypted'], [TOP_ENDED, 'ended'], [TOP_ERROR, 'error'], [TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture'], [TOP_LOAD, 'load'], [TOP_LOADED_DATA, 'loadedData'], [TOP_LOADED_METADATA, 'loadedMetadata'], [TOP_LOAD_START, 'loadStart'], [TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture'], [TOP_MOUSE_MOVE, 'mouseMove'], [TOP_MOUSE_OUT, 'mouseOut'], [TOP_MOUSE_OVER, 'mouseOver'], [TOP_PLAYING, 'playing'], [TOP_POINTER_MOVE, 'pointerMove'], [TOP_POINTER_OUT, 'pointerOut'], [TOP_POINTER_OVER, 'pointerOver'], [TOP_PROGRESS, 'progress'], [TOP_SCROLL, 'scroll'], [TOP_SEEKING, 'seeking'], [TOP_STALLED, 'stalled'], [TOP_SUSPEND, 'suspend'], [TOP_TIME_UPDATE, 'timeUpdate'], [TOP_TOGGLE, 'toggle'], [TOP_TOUCH_MOVE, 'touchMove'], [TOP_TRANSITION_END, 'transitionEnd'], [TOP_WAITING, 'waiting'], [TOP_WHEEL, 'wheel']];
|
||
|
||
var eventTypes$4 = {};
|
||
var topLevelEventsToDispatchConfig = {};
|
||
|
||
function addEventTypeNameToConfig(_ref, isInteractive) {
|
||
var topEvent = _ref[0],
|
||
event = _ref[1];
|
||
|
||
var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
|
||
var onEvent = 'on' + capitalizedEvent;
|
||
|
||
var type = {
|
||
phasedRegistrationNames: {
|
||
bubbled: onEvent,
|
||
captured: onEvent + 'Capture'
|
||
},
|
||
dependencies: [topEvent],
|
||
isInteractive: isInteractive
|
||
};
|
||
eventTypes$4[event] = type;
|
||
topLevelEventsToDispatchConfig[topEvent] = type;
|
||
}
|
||
|
||
interactiveEventTypeNames.forEach(function (eventTuple) {
|
||
addEventTypeNameToConfig(eventTuple, true);
|
||
});
|
||
nonInteractiveEventTypeNames.forEach(function (eventTuple) {
|
||
addEventTypeNameToConfig(eventTuple, false);
|
||
});
|
||
|
||
// Only used in DEV for exhaustiveness validation.
|
||
var knownHTMLTopLevelTypes = [TOP_ABORT, TOP_CANCEL, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_CLOSE, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_INPUT, TOP_INVALID, TOP_LOAD, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_RESET, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUBMIT, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_TOGGLE, TOP_VOLUME_CHANGE, TOP_WAITING];
|
||
|
||
var SimpleEventPlugin = {
|
||
eventTypes: eventTypes$4,
|
||
|
||
isInteractiveTopLevelEventType: function (topLevelType) {
|
||
var config = topLevelEventsToDispatchConfig[topLevelType];
|
||
return config !== undefined && config.isInteractive === true;
|
||
},
|
||
|
||
|
||
extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
||
var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
|
||
if (!dispatchConfig) {
|
||
return null;
|
||
}
|
||
var EventConstructor = void 0;
|
||
switch (topLevelType) {
|
||
case TOP_KEY_PRESS:
|
||
// Firefox creates a keypress event for function keys too. This removes
|
||
// the unwanted keypress events. Enter is however both printable and
|
||
// non-printable. One would expect Tab to be as well (but it isn't).
|
||
if (getEventCharCode(nativeEvent) === 0) {
|
||
return null;
|
||
}
|
||
/* falls through */
|
||
case TOP_KEY_DOWN:
|
||
case TOP_KEY_UP:
|
||
EventConstructor = SyntheticKeyboardEvent;
|
||
break;
|
||
case TOP_BLUR:
|
||
case TOP_FOCUS:
|
||
EventConstructor = SyntheticFocusEvent;
|
||
break;
|
||
case TOP_CLICK:
|
||
// Firefox creates a click event on right mouse clicks. This removes the
|
||
// unwanted click events.
|
||
if (nativeEvent.button === 2) {
|
||
return null;
|
||
}
|
||
/* falls through */
|
||
case TOP_AUX_CLICK:
|
||
case TOP_DOUBLE_CLICK:
|
||
case TOP_MOUSE_DOWN:
|
||
case TOP_MOUSE_MOVE:
|
||
case TOP_MOUSE_UP:
|
||
// TODO: Disabled elements should not respond to mouse events
|
||
/* falls through */
|
||
case TOP_MOUSE_OUT:
|
||
case TOP_MOUSE_OVER:
|
||
case TOP_CONTEXT_MENU:
|
||
EventConstructor = SyntheticMouseEvent;
|
||
break;
|
||
case TOP_DRAG:
|
||
case TOP_DRAG_END:
|
||
case TOP_DRAG_ENTER:
|
||
case TOP_DRAG_EXIT:
|
||
case TOP_DRAG_LEAVE:
|
||
case TOP_DRAG_OVER:
|
||
case TOP_DRAG_START:
|
||
case TOP_DROP:
|
||
EventConstructor = SyntheticDragEvent;
|
||
break;
|
||
case TOP_TOUCH_CANCEL:
|
||
case TOP_TOUCH_END:
|
||
case TOP_TOUCH_MOVE:
|
||
case TOP_TOUCH_START:
|
||
EventConstructor = SyntheticTouchEvent;
|
||
break;
|
||
case TOP_ANIMATION_END:
|
||
case TOP_ANIMATION_ITERATION:
|
||
case TOP_ANIMATION_START:
|
||
EventConstructor = SyntheticAnimationEvent;
|
||
break;
|
||
case TOP_TRANSITION_END:
|
||
EventConstructor = SyntheticTransitionEvent;
|
||
break;
|
||
case TOP_SCROLL:
|
||
EventConstructor = SyntheticUIEvent;
|
||
break;
|
||
case TOP_WHEEL:
|
||
EventConstructor = SyntheticWheelEvent;
|
||
break;
|
||
case TOP_COPY:
|
||
case TOP_CUT:
|
||
case TOP_PASTE:
|
||
EventConstructor = SyntheticClipboardEvent;
|
||
break;
|
||
case TOP_GOT_POINTER_CAPTURE:
|
||
case TOP_LOST_POINTER_CAPTURE:
|
||
case TOP_POINTER_CANCEL:
|
||
case TOP_POINTER_DOWN:
|
||
case TOP_POINTER_MOVE:
|
||
case TOP_POINTER_OUT:
|
||
case TOP_POINTER_OVER:
|
||
case TOP_POINTER_UP:
|
||
EventConstructor = SyntheticPointerEvent;
|
||
break;
|
||
default:
|
||
{
|
||
if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) {
|
||
warningWithoutStack$1(false, 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);
|
||
}
|
||
}
|
||
// HTML Events
|
||
// @see http://www.w3.org/TR/html5/index.html#events-0
|
||
EventConstructor = SyntheticEvent;
|
||
break;
|
||
}
|
||
var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
|
||
accumulateTwoPhaseDispatches(event);
|
||
return event;
|
||
}
|
||
};
|
||
|
||
var isInteractiveTopLevelEventType = SimpleEventPlugin.isInteractiveTopLevelEventType;
|
||
|
||
|
||
var CALLBACK_BOOKKEEPING_POOL_SIZE = 10;
|
||
var callbackBookkeepingPool = [];
|
||
|
||
/**
|
||
* Find the deepest React component completely containing the root of the
|
||
* passed-in instance (for use when entire React trees are nested within each
|
||
* other). If React trees are not nested, returns null.
|
||
*/
|
||
function findRootContainerNode(inst) {
|
||
// TODO: It may be a good idea to cache this to prevent unnecessary DOM
|
||
// traversal, but caching is difficult to do correctly without using a
|
||
// mutation observer to listen for all DOM changes.
|
||
while (inst.return) {
|
||
inst = inst.return;
|
||
}
|
||
if (inst.tag !== HostRoot) {
|
||
// This can happen if we're in a detached tree.
|
||
return null;
|
||
}
|
||
return inst.stateNode.containerInfo;
|
||
}
|
||
|
||
// Used to store ancestor hierarchy in top level callback
|
||
function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst) {
|
||
if (callbackBookkeepingPool.length) {
|
||
var instance = callbackBookkeepingPool.pop();
|
||
instance.topLevelType = topLevelType;
|
||
instance.nativeEvent = nativeEvent;
|
||
instance.targetInst = targetInst;
|
||
return instance;
|
||
}
|
||
return {
|
||
topLevelType: topLevelType,
|
||
nativeEvent: nativeEvent,
|
||
targetInst: targetInst,
|
||
ancestors: []
|
||
};
|
||
}
|
||
|
||
function releaseTopLevelCallbackBookKeeping(instance) {
|
||
instance.topLevelType = null;
|
||
instance.nativeEvent = null;
|
||
instance.targetInst = null;
|
||
instance.ancestors.length = 0;
|
||
if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {
|
||
callbackBookkeepingPool.push(instance);
|
||
}
|
||
}
|
||
|
||
function handleTopLevel(bookKeeping) {
|
||
var targetInst = bookKeeping.targetInst;
|
||
|
||
// Loop through the hierarchy, in case there's any nested components.
|
||
// It's important that we build the array of ancestors before calling any
|
||
// event handlers, because event handlers can modify the DOM, leading to
|
||
// inconsistencies with ReactMount's node cache. See #1105.
|
||
var ancestor = targetInst;
|
||
do {
|
||
if (!ancestor) {
|
||
bookKeeping.ancestors.push(ancestor);
|
||
break;
|
||
}
|
||
var root = findRootContainerNode(ancestor);
|
||
if (!root) {
|
||
break;
|
||
}
|
||
bookKeeping.ancestors.push(ancestor);
|
||
ancestor = getClosestInstanceFromNode(root);
|
||
} while (ancestor);
|
||
|
||
for (var i = 0; i < bookKeeping.ancestors.length; i++) {
|
||
targetInst = bookKeeping.ancestors[i];
|
||
runExtractedEventsInBatch(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
|
||
}
|
||
}
|
||
|
||
// TODO: can we stop exporting these?
|
||
var _enabled = true;
|
||
|
||
function setEnabled(enabled) {
|
||
_enabled = !!enabled;
|
||
}
|
||
|
||
function isEnabled() {
|
||
return _enabled;
|
||
}
|
||
|
||
/**
|
||
* Traps top-level events by using event bubbling.
|
||
*
|
||
* @param {number} topLevelType Number from `TopLevelEventTypes`.
|
||
* @param {object} element Element on which to attach listener.
|
||
* @return {?object} An object with a remove function which will forcefully
|
||
* remove the listener.
|
||
* @internal
|
||
*/
|
||
function trapBubbledEvent(topLevelType, element) {
|
||
if (!element) {
|
||
return null;
|
||
}
|
||
var dispatch = isInteractiveTopLevelEventType(topLevelType) ? dispatchInteractiveEvent : dispatchEvent;
|
||
|
||
addEventBubbleListener(element, getRawEventName(topLevelType),
|
||
// Check if interactive and wrap in interactiveUpdates
|
||
dispatch.bind(null, topLevelType));
|
||
}
|
||
|
||
/**
|
||
* Traps a top-level event by using event capturing.
|
||
*
|
||
* @param {number} topLevelType Number from `TopLevelEventTypes`.
|
||
* @param {object} element Element on which to attach listener.
|
||
* @return {?object} An object with a remove function which will forcefully
|
||
* remove the listener.
|
||
* @internal
|
||
*/
|
||
function trapCapturedEvent(topLevelType, element) {
|
||
if (!element) {
|
||
return null;
|
||
}
|
||
var dispatch = isInteractiveTopLevelEventType(topLevelType) ? dispatchInteractiveEvent : dispatchEvent;
|
||
|
||
addEventCaptureListener(element, getRawEventName(topLevelType),
|
||
// Check if interactive and wrap in interactiveUpdates
|
||
dispatch.bind(null, topLevelType));
|
||
}
|
||
|
||
function dispatchInteractiveEvent(topLevelType, nativeEvent) {
|
||
interactiveUpdates(dispatchEvent, topLevelType, nativeEvent);
|
||
}
|
||
|
||
function dispatchEvent(topLevelType, nativeEvent) {
|
||
if (!_enabled) {
|
||
return;
|
||
}
|
||
|
||
var nativeEventTarget = getEventTarget(nativeEvent);
|
||
var targetInst = getClosestInstanceFromNode(nativeEventTarget);
|
||
if (targetInst !== null && typeof targetInst.tag === 'number' && !isFiberMounted(targetInst)) {
|
||
// If we get an event (ex: img onload) before committing that
|
||
// component's mount, ignore it for now (that is, treat it as if it was an
|
||
// event on a non-React tree). We might also consider queueing events and
|
||
// dispatching them after the mount.
|
||
targetInst = null;
|
||
}
|
||
|
||
var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst);
|
||
|
||
try {
|
||
// Event queue being processed in the same cycle allows
|
||
// `preventDefault`.
|
||
batchedUpdates(handleTopLevel, bookKeeping);
|
||
} finally {
|
||
releaseTopLevelCallbackBookKeeping(bookKeeping);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Summary of `ReactBrowserEventEmitter` event handling:
|
||
*
|
||
* - Top-level delegation is used to trap most native browser events. This
|
||
* may only occur in the main thread and is the responsibility of
|
||
* ReactDOMEventListener, which is injected and can therefore support
|
||
* pluggable event sources. This is the only work that occurs in the main
|
||
* thread.
|
||
*
|
||
* - We normalize and de-duplicate events to account for browser quirks. This
|
||
* may be done in the worker thread.
|
||
*
|
||
* - Forward these native events (with the associated top-level type used to
|
||
* trap it) to `EventPluginHub`, which in turn will ask plugins if they want
|
||
* to extract any synthetic events.
|
||
*
|
||
* - The `EventPluginHub` will then process each event by annotating them with
|
||
* "dispatches", a sequence of listeners and IDs that care about that event.
|
||
*
|
||
* - The `EventPluginHub` then dispatches the events.
|
||
*
|
||
* Overview of React and the event system:
|
||
*
|
||
* +------------+ .
|
||
* | DOM | .
|
||
* +------------+ .
|
||
* | .
|
||
* v .
|
||
* +------------+ .
|
||
* | ReactEvent | .
|
||
* | Listener | .
|
||
* +------------+ . +-----------+
|
||
* | . +--------+|SimpleEvent|
|
||
* | . | |Plugin |
|
||
* +-----|------+ . v +-----------+
|
||
* | | | . +--------------+ +------------+
|
||
* | +-----------.--->|EventPluginHub| | Event |
|
||
* | | . | | +-----------+ | Propagators|
|
||
* | ReactEvent | . | | |TapEvent | |------------|
|
||
* | Emitter | . | |<---+|Plugin | |other plugin|
|
||
* | | . | | +-----------+ | utilities |
|
||
* | +-----------.--->| | +------------+
|
||
* | | | . +--------------+
|
||
* +-----|------+ . ^ +-----------+
|
||
* | . | |Enter/Leave|
|
||
* + . +-------+|Plugin |
|
||
* +-------------+ . +-----------+
|
||
* | application | .
|
||
* |-------------| .
|
||
* | | .
|
||
* | | .
|
||
* +-------------+ .
|
||
* .
|
||
* React Core . General Purpose Event Plugin System
|
||
*/
|
||
|
||
var alreadyListeningTo = {};
|
||
var reactTopListenersCounter = 0;
|
||
|
||
/**
|
||
* To ensure no conflicts with other potential React instances on the page
|
||
*/
|
||
var topListenersIDKey = '_reactListenersID' + ('' + Math.random()).slice(2);
|
||
|
||
function getListeningForDocument(mountAt) {
|
||
// In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
|
||
// directly.
|
||
if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
|
||
mountAt[topListenersIDKey] = reactTopListenersCounter++;
|
||
alreadyListeningTo[mountAt[topListenersIDKey]] = {};
|
||
}
|
||
return alreadyListeningTo[mountAt[topListenersIDKey]];
|
||
}
|
||
|
||
/**
|
||
* We listen for bubbled touch events on the document object.
|
||
*
|
||
* Firefox v8.01 (and possibly others) exhibited strange behavior when
|
||
* mounting `onmousemove` events at some node that was not the document
|
||
* element. The symptoms were that if your mouse is not moving over something
|
||
* contained within that mount point (for example on the background) the
|
||
* top-level listeners for `onmousemove` won't be called. However, if you
|
||
* register the `mousemove` on the document object, then it will of course
|
||
* catch all `mousemove`s. This along with iOS quirks, justifies restricting
|
||
* top-level listeners to the document object only, at least for these
|
||
* movement types of events and possibly all events.
|
||
*
|
||
* @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
|
||
*
|
||
* Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
|
||
* they bubble to document.
|
||
*
|
||
* @param {string} registrationName Name of listener (e.g. `onClick`).
|
||
* @param {object} mountAt Container where to mount the listener
|
||
*/
|
||
function listenTo(registrationName, mountAt) {
|
||
var isListening = getListeningForDocument(mountAt);
|
||
var dependencies = registrationNameDependencies[registrationName];
|
||
|
||
for (var i = 0; i < dependencies.length; i++) {
|
||
var dependency = dependencies[i];
|
||
if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
|
||
switch (dependency) {
|
||
case TOP_SCROLL:
|
||
trapCapturedEvent(TOP_SCROLL, mountAt);
|
||
break;
|
||
case TOP_FOCUS:
|
||
case TOP_BLUR:
|
||
trapCapturedEvent(TOP_FOCUS, mountAt);
|
||
trapCapturedEvent(TOP_BLUR, mountAt);
|
||
// We set the flag for a single dependency later in this function,
|
||
// but this ensures we mark both as attached rather than just one.
|
||
isListening[TOP_BLUR] = true;
|
||
isListening[TOP_FOCUS] = true;
|
||
break;
|
||
case TOP_CANCEL:
|
||
case TOP_CLOSE:
|
||
if (isEventSupported(getRawEventName(dependency))) {
|
||
trapCapturedEvent(dependency, mountAt);
|
||
}
|
||
break;
|
||
case TOP_INVALID:
|
||
case TOP_SUBMIT:
|
||
case TOP_RESET:
|
||
// We listen to them on the target DOM elements.
|
||
// Some of them bubble so we don't want them to fire twice.
|
||
break;
|
||
default:
|
||
// By default, listen on the top level to all non-media events.
|
||
// Media events don't bubble so adding the listener wouldn't do anything.
|
||
var isMediaEvent = mediaEventTypes.indexOf(dependency) !== -1;
|
||
if (!isMediaEvent) {
|
||
trapBubbledEvent(dependency, mountAt);
|
||
}
|
||
break;
|
||
}
|
||
isListening[dependency] = true;
|
||
}
|
||
}
|
||
}
|
||
|
||
function isListeningToAllDependencies(registrationName, mountAt) {
|
||
var isListening = getListeningForDocument(mountAt);
|
||
var dependencies = registrationNameDependencies[registrationName];
|
||
for (var i = 0; i < dependencies.length; i++) {
|
||
var dependency = dependencies[i];
|
||
if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
|
||
function getActiveElement(doc) {
|
||
doc = doc || (typeof document !== 'undefined' ? document : undefined);
|
||
if (typeof doc === 'undefined') {
|
||
return null;
|
||
}
|
||
try {
|
||
return doc.activeElement || doc.body;
|
||
} catch (e) {
|
||
return doc.body;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Given any node return the first leaf node without children.
|
||
*
|
||
* @param {DOMElement|DOMTextNode} node
|
||
* @return {DOMElement|DOMTextNode}
|
||
*/
|
||
function getLeafNode(node) {
|
||
while (node && node.firstChild) {
|
||
node = node.firstChild;
|
||
}
|
||
return node;
|
||
}
|
||
|
||
/**
|
||
* Get the next sibling within a container. This will walk up the
|
||
* DOM if a node's siblings have been exhausted.
|
||
*
|
||
* @param {DOMElement|DOMTextNode} node
|
||
* @return {?DOMElement|DOMTextNode}
|
||
*/
|
||
function getSiblingNode(node) {
|
||
while (node) {
|
||
if (node.nextSibling) {
|
||
return node.nextSibling;
|
||
}
|
||
node = node.parentNode;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Get object describing the nodes which contain characters at offset.
|
||
*
|
||
* @param {DOMElement|DOMTextNode} root
|
||
* @param {number} offset
|
||
* @return {?object}
|
||
*/
|
||
function getNodeForCharacterOffset(root, offset) {
|
||
var node = getLeafNode(root);
|
||
var nodeStart = 0;
|
||
var nodeEnd = 0;
|
||
|
||
while (node) {
|
||
if (node.nodeType === TEXT_NODE) {
|
||
nodeEnd = nodeStart + node.textContent.length;
|
||
|
||
if (nodeStart <= offset && nodeEnd >= offset) {
|
||
return {
|
||
node: node,
|
||
offset: offset - nodeStart
|
||
};
|
||
}
|
||
|
||
nodeStart = nodeEnd;
|
||
}
|
||
|
||
node = getLeafNode(getSiblingNode(node));
|
||
}
|
||
}
|
||
|
||
/**
|
||
* @param {DOMElement} outerNode
|
||
* @return {?object}
|
||
*/
|
||
function getOffsets(outerNode) {
|
||
var ownerDocument = outerNode.ownerDocument;
|
||
|
||
var win = ownerDocument && ownerDocument.defaultView || window;
|
||
var selection = win.getSelection && win.getSelection();
|
||
|
||
if (!selection || selection.rangeCount === 0) {
|
||
return null;
|
||
}
|
||
|
||
var anchorNode = selection.anchorNode,
|
||
anchorOffset = selection.anchorOffset,
|
||
focusNode = selection.focusNode,
|
||
focusOffset = selection.focusOffset;
|
||
|
||
// In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
|
||
// up/down buttons on an <input type="number">. Anonymous divs do not seem to
|
||
// expose properties, triggering a "Permission denied error" if any of its
|
||
// properties are accessed. The only seemingly possible way to avoid erroring
|
||
// is to access a property that typically works for non-anonymous divs and
|
||
// catch any error that may otherwise arise. See
|
||
// https://bugzilla.mozilla.org/show_bug.cgi?id=208427
|
||
|
||
try {
|
||
/* eslint-disable no-unused-expressions */
|
||
anchorNode.nodeType;
|
||
focusNode.nodeType;
|
||
/* eslint-enable no-unused-expressions */
|
||
} catch (e) {
|
||
return null;
|
||
}
|
||
|
||
return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
|
||
}
|
||
|
||
/**
|
||
* Returns {start, end} where `start` is the character/codepoint index of
|
||
* (anchorNode, anchorOffset) within the textContent of `outerNode`, and
|
||
* `end` is the index of (focusNode, focusOffset).
|
||
*
|
||
* Returns null if you pass in garbage input but we should probably just crash.
|
||
*
|
||
* Exported only for testing.
|
||
*/
|
||
function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
|
||
var length = 0;
|
||
var start = -1;
|
||
var end = -1;
|
||
var indexWithinAnchor = 0;
|
||
var indexWithinFocus = 0;
|
||
var node = outerNode;
|
||
var parentNode = null;
|
||
|
||
outer: while (true) {
|
||
var next = null;
|
||
|
||
while (true) {
|
||
if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
|
||
start = length + anchorOffset;
|
||
}
|
||
if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
|
||
end = length + focusOffset;
|
||
}
|
||
|
||
if (node.nodeType === TEXT_NODE) {
|
||
length += node.nodeValue.length;
|
||
}
|
||
|
||
if ((next = node.firstChild) === null) {
|
||
break;
|
||
}
|
||
// Moving from `node` to its first child `next`.
|
||
parentNode = node;
|
||
node = next;
|
||
}
|
||
|
||
while (true) {
|
||
if (node === outerNode) {
|
||
// If `outerNode` has children, this is always the second time visiting
|
||
// it. If it has no children, this is still the first loop, and the only
|
||
// valid selection is anchorNode and focusNode both equal to this node
|
||
// and both offsets 0, in which case we will have handled above.
|
||
break outer;
|
||
}
|
||
if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
|
||
start = length;
|
||
}
|
||
if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
|
||
end = length;
|
||
}
|
||
if ((next = node.nextSibling) !== null) {
|
||
break;
|
||
}
|
||
node = parentNode;
|
||
parentNode = node.parentNode;
|
||
}
|
||
|
||
// Moving from `node` to its next sibling `next`.
|
||
node = next;
|
||
}
|
||
|
||
if (start === -1 || end === -1) {
|
||
// This should never happen. (Would happen if the anchor/focus nodes aren't
|
||
// actually inside the passed-in node.)
|
||
return null;
|
||
}
|
||
|
||
return {
|
||
start: start,
|
||
end: end
|
||
};
|
||
}
|
||
|
||
/**
|
||
* In modern non-IE browsers, we can support both forward and backward
|
||
* selections.
|
||
*
|
||
* Note: IE10+ supports the Selection object, but it does not support
|
||
* the `extend` method, which means that even in modern IE, it's not possible
|
||
* to programmatically create a backward selection. Thus, for all IE
|
||
* versions, we use the old IE API to create our selections.
|
||
*
|
||
* @param {DOMElement|DOMTextNode} node
|
||
* @param {object} offsets
|
||
*/
|
||
function setOffsets(node, offsets) {
|
||
var doc = node.ownerDocument || document;
|
||
var win = doc && doc.defaultView || window;
|
||
|
||
// Edge fails with "Object expected" in some scenarios.
|
||
// (For instance: TinyMCE editor used in a list component that supports pasting to add more,
|
||
// fails when pasting 100+ items)
|
||
if (!win.getSelection) {
|
||
return;
|
||
}
|
||
|
||
var selection = win.getSelection();
|
||
var length = node.textContent.length;
|
||
var start = Math.min(offsets.start, length);
|
||
var end = offsets.end === undefined ? start : Math.min(offsets.end, length);
|
||
|
||
// IE 11 uses modern selection, but doesn't support the extend method.
|
||
// Flip backward selections, so we can set with a single range.
|
||
if (!selection.extend && start > end) {
|
||
var temp = end;
|
||
end = start;
|
||
start = temp;
|
||
}
|
||
|
||
var startMarker = getNodeForCharacterOffset(node, start);
|
||
var endMarker = getNodeForCharacterOffset(node, end);
|
||
|
||
if (startMarker && endMarker) {
|
||
if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
|
||
return;
|
||
}
|
||
var range = doc.createRange();
|
||
range.setStart(startMarker.node, startMarker.offset);
|
||
selection.removeAllRanges();
|
||
|
||
if (start > end) {
|
||
selection.addRange(range);
|
||
selection.extend(endMarker.node, endMarker.offset);
|
||
} else {
|
||
range.setEnd(endMarker.node, endMarker.offset);
|
||
selection.addRange(range);
|
||
}
|
||
}
|
||
}
|
||
|
||
function isTextNode(node) {
|
||
return node && node.nodeType === TEXT_NODE;
|
||
}
|
||
|
||
function containsNode(outerNode, innerNode) {
|
||
if (!outerNode || !innerNode) {
|
||
return false;
|
||
} else if (outerNode === innerNode) {
|
||
return true;
|
||
} else if (isTextNode(outerNode)) {
|
||
return false;
|
||
} else if (isTextNode(innerNode)) {
|
||
return containsNode(outerNode, innerNode.parentNode);
|
||
} else if ('contains' in outerNode) {
|
||
return outerNode.contains(innerNode);
|
||
} else if (outerNode.compareDocumentPosition) {
|
||
return !!(outerNode.compareDocumentPosition(innerNode) & 16);
|
||
} else {
|
||
return false;
|
||
}
|
||
}
|
||
|
||
function isInDocument(node) {
|
||
return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
|
||
}
|
||
|
||
function getActiveElementDeep() {
|
||
var win = window;
|
||
var element = getActiveElement();
|
||
while (element instanceof win.HTMLIFrameElement) {
|
||
// Accessing the contentDocument of a HTMLIframeElement can cause the browser
|
||
// to throw, e.g. if it has a cross-origin src attribute
|
||
try {
|
||
win = element.contentDocument.defaultView;
|
||
} catch (e) {
|
||
return element;
|
||
}
|
||
element = getActiveElement(win.document);
|
||
}
|
||
return element;
|
||
}
|
||
|
||
/**
|
||
* @ReactInputSelection: React input selection module. Based on Selection.js,
|
||
* but modified to be suitable for react and has a couple of bug fixes (doesn't
|
||
* assume buttons have range selections allowed).
|
||
* Input selection module for React.
|
||
*/
|
||
|
||
/**
|
||
* @hasSelectionCapabilities: we get the element types that support selection
|
||
* from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
|
||
* and `selectionEnd` rows.
|
||
*/
|
||
function hasSelectionCapabilities(elem) {
|
||
var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
|
||
return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
|
||
}
|
||
|
||
function getSelectionInformation() {
|
||
var focusedElem = getActiveElementDeep();
|
||
return {
|
||
focusedElem: focusedElem,
|
||
selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection$1(focusedElem) : null
|
||
};
|
||
}
|
||
|
||
/**
|
||
* @restoreSelection: If any selection information was potentially lost,
|
||
* restore it. This is useful when performing operations that could remove dom
|
||
* nodes and place them back in, resulting in focus being lost.
|
||
*/
|
||
function restoreSelection(priorSelectionInformation) {
|
||
var curFocusedElem = getActiveElementDeep();
|
||
var priorFocusedElem = priorSelectionInformation.focusedElem;
|
||
var priorSelectionRange = priorSelectionInformation.selectionRange;
|
||
if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
|
||
if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
|
||
setSelection(priorFocusedElem, priorSelectionRange);
|
||
}
|
||
|
||
// Focusing a node can change the scroll position, which is undesirable
|
||
var ancestors = [];
|
||
var ancestor = priorFocusedElem;
|
||
while (ancestor = ancestor.parentNode) {
|
||
if (ancestor.nodeType === ELEMENT_NODE) {
|
||
ancestors.push({
|
||
element: ancestor,
|
||
left: ancestor.scrollLeft,
|
||
top: ancestor.scrollTop
|
||
});
|
||
}
|
||
}
|
||
|
||
if (typeof priorFocusedElem.focus === 'function') {
|
||
priorFocusedElem.focus();
|
||
}
|
||
|
||
for (var i = 0; i < ancestors.length; i++) {
|
||
var info = ancestors[i];
|
||
info.element.scrollLeft = info.left;
|
||
info.element.scrollTop = info.top;
|
||
}
|
||
}
|
||
}
|
||
|
||
/**
|
||
* @getSelection: Gets the selection bounds of a focused textarea, input or
|
||
* contentEditable node.
|
||
* -@input: Look up selection bounds of this input
|
||
* -@return {start: selectionStart, end: selectionEnd}
|
||
*/
|
||
function getSelection$1(input) {
|
||
var selection = void 0;
|
||
|
||
if ('selectionStart' in input) {
|
||
// Modern browser with input or textarea.
|
||
selection = {
|
||
start: input.selectionStart,
|
||
end: input.selectionEnd
|
||
};
|
||
} else {
|
||
// Content editable or old IE textarea.
|
||
selection = getOffsets(input);
|
||
}
|
||
|
||
return selection || { start: 0, end: 0 };
|
||
}
|
||
|
||
/**
|
||
* @setSelection: Sets the selection bounds of a textarea or input and focuses
|
||
* the input.
|
||
* -@input Set selection bounds of this input or textarea
|
||
* -@offsets Object of same form that is returned from get*
|
||
*/
|
||
function setSelection(input, offsets) {
|
||
var start = offsets.start,
|
||
end = offsets.end;
|
||
|
||
if (end === undefined) {
|
||
end = start;
|
||
}
|
||
|
||
if ('selectionStart' in input) {
|
||
input.selectionStart = start;
|
||
input.selectionEnd = Math.min(end, input.value.length);
|
||
} else {
|
||
setOffsets(input, offsets);
|
||
}
|
||
}
|
||
|
||
var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
|
||
|
||
var eventTypes$3 = {
|
||
select: {
|
||
phasedRegistrationNames: {
|
||
bubbled: 'onSelect',
|
||
captured: 'onSelectCapture'
|
||
},
|
||
dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_DRAG_END, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE]
|
||
}
|
||
};
|
||
|
||
var activeElement$1 = null;
|
||
var activeElementInst$1 = null;
|
||
var lastSelection = null;
|
||
var mouseDown = false;
|
||
|
||
/**
|
||
* Get an object which is a unique representation of the current selection.
|
||
*
|
||
* The return value will not be consistent across nodes or browsers, but
|
||
* two identical selections on the same node will return identical objects.
|
||
*
|
||
* @param {DOMElement} node
|
||
* @return {object}
|
||
*/
|
||
function getSelection(node) {
|
||
if ('selectionStart' in node && hasSelectionCapabilities(node)) {
|
||
return {
|
||
start: node.selectionStart,
|
||
end: node.selectionEnd
|
||
};
|
||
} else {
|
||
var win = node.ownerDocument && node.ownerDocument.defaultView || window;
|
||
var selection = win.getSelection();
|
||
return {
|
||
anchorNode: selection.anchorNode,
|
||
anchorOffset: selection.anchorOffset,
|
||
focusNode: selection.focusNode,
|
||
focusOffset: selection.focusOffset
|
||
};
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Get document associated with the event target.
|
||
*
|
||
* @param {object} nativeEventTarget
|
||
* @return {Document}
|
||
*/
|
||
function getEventTargetDocument(eventTarget) {
|
||
return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
|
||
}
|
||
|
||
/**
|
||
* Poll selection to see whether it's changed.
|
||
*
|
||
* @param {object} nativeEvent
|
||
* @param {object} nativeEventTarget
|
||
* @return {?SyntheticEvent}
|
||
*/
|
||
function constructSelectEvent(nativeEvent, nativeEventTarget) {
|
||
// Ensure we have the right element, and that the user is not dragging a
|
||
// selection (this matches native `select` event behavior). In HTML5, select
|
||
// fires only on input and textarea thus if there's no focused element we
|
||
// won't dispatch.
|
||
var doc = getEventTargetDocument(nativeEventTarget);
|
||
|
||
if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
|
||
return null;
|
||
}
|
||
|
||
// Only fire when selection has actually changed.
|
||
var currentSelection = getSelection(activeElement$1);
|
||
if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
|
||
lastSelection = currentSelection;
|
||
|
||
var syntheticEvent = SyntheticEvent.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);
|
||
|
||
syntheticEvent.type = 'select';
|
||
syntheticEvent.target = activeElement$1;
|
||
|
||
accumulateTwoPhaseDispatches(syntheticEvent);
|
||
|
||
return syntheticEvent;
|
||
}
|
||
|
||
return null;
|
||
}
|
||
|
||
/**
|
||
* This plugin creates an `onSelect` event that normalizes select events
|
||
* across form elements.
|
||
*
|
||
* Supported elements are:
|
||
* - input (see `isTextInputElement`)
|
||
* - textarea
|
||
* - contentEditable
|
||
*
|
||
* This differs from native browser implementations in the following ways:
|
||
* - Fires on contentEditable fields as well as inputs.
|
||
* - Fires for collapsed selection.
|
||
* - Fires after user input.
|
||
*/
|
||
var SelectEventPlugin = {
|
||
eventTypes: eventTypes$3,
|
||
|
||
extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
||
var doc = getEventTargetDocument(nativeEventTarget);
|
||
// Track whether all listeners exists for this plugin. If none exist, we do
|
||
// not extract events. See #3639.
|
||
if (!doc || !isListeningToAllDependencies('onSelect', doc)) {
|
||
return null;
|
||
}
|
||
|
||
var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;
|
||
|
||
switch (topLevelType) {
|
||
// Track the input node that has focus.
|
||
case TOP_FOCUS:
|
||
if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
|
||
activeElement$1 = targetNode;
|
||
activeElementInst$1 = targetInst;
|
||
lastSelection = null;
|
||
}
|
||
break;
|
||
case TOP_BLUR:
|
||
activeElement$1 = null;
|
||
activeElementInst$1 = null;
|
||
lastSelection = null;
|
||
break;
|
||
// Don't fire the event while the user is dragging. This matches the
|
||
// semantics of the native select event.
|
||
case TOP_MOUSE_DOWN:
|
||
mouseDown = true;
|
||
break;
|
||
case TOP_CONTEXT_MENU:
|
||
case TOP_MOUSE_UP:
|
||
case TOP_DRAG_END:
|
||
mouseDown = false;
|
||
return constructSelectEvent(nativeEvent, nativeEventTarget);
|
||
// Chrome and IE fire non-standard event when selection is changed (and
|
||
// sometimes when it hasn't). IE's event fires out of order with respect
|
||
// to key and input events on deletion, so we discard it.
|
||
//
|
||
// Firefox doesn't support selectionchange, so check selection status
|
||
// after each key entry. The selection changes after keydown and before
|
||
// keyup, but we check on keydown as well in the case of holding down a
|
||
// key, when multiple keydown events are fired but only one keyup is.
|
||
// This is also our approach for IE handling, for the reason above.
|
||
case TOP_SELECTION_CHANGE:
|
||
if (skipSelectionChangeEvent) {
|
||
break;
|
||
}
|
||
// falls through
|
||
case TOP_KEY_DOWN:
|
||
case TOP_KEY_UP:
|
||
return constructSelectEvent(nativeEvent, nativeEventTarget);
|
||
}
|
||
|
||
return null;
|
||
}
|
||
};
|
||
|
||
/**
|
||
* Inject modules for resolving DOM hierarchy and plugin ordering.
|
||
*/
|
||
injection.injectEventPluginOrder(DOMEventPluginOrder);
|
||
setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1);
|
||
|
||
/**
|
||
* Some important event plugins included by default (without having to require
|
||
* them).
|
||
*/
|
||
injection.injectEventPluginsByName({
|
||
SimpleEventPlugin: SimpleEventPlugin,
|
||
EnterLeaveEventPlugin: EnterLeaveEventPlugin,
|
||
ChangeEventPlugin: ChangeEventPlugin,
|
||
SelectEventPlugin: SelectEventPlugin,
|
||
BeforeInputEventPlugin: BeforeInputEventPlugin
|
||
});
|
||
|
||
var didWarnSelectedSetOnOption = false;
|
||
var didWarnInvalidChild = false;
|
||
|
||
function flattenChildren(children) {
|
||
var content = '';
|
||
|
||
// Flatten children. We'll warn if they are invalid
|
||
// during validateProps() which runs for hydration too.
|
||
// Note that this would throw on non-element objects.
|
||
// Elements are stringified (which is normally irrelevant
|
||
// but matters for <fbt>).
|
||
React.Children.forEach(children, function (child) {
|
||
if (child == null) {
|
||
return;
|
||
}
|
||
content += child;
|
||
// Note: we don't warn about invalid children here.
|
||
// Instead, this is done separately below so that
|
||
// it happens during the hydration codepath too.
|
||
});
|
||
|
||
return content;
|
||
}
|
||
|
||
/**
|
||
* Implements an <option> host component that warns when `selected` is set.
|
||
*/
|
||
|
||
function validateProps(element, props) {
|
||
{
|
||
// This mirrors the codepath above, but runs for hydration too.
|
||
// Warn about invalid children here so that client and hydration are consistent.
|
||
// TODO: this seems like it could cause a DEV-only throw for hydration
|
||
// if children contains a non-element object. We should try to avoid that.
|
||
if (typeof props.children === 'object' && props.children !== null) {
|
||
React.Children.forEach(props.children, function (child) {
|
||
if (child == null) {
|
||
return;
|
||
}
|
||
if (typeof child === 'string' || typeof child === 'number') {
|
||
return;
|
||
}
|
||
if (typeof child.type !== 'string') {
|
||
return;
|
||
}
|
||
if (!didWarnInvalidChild) {
|
||
didWarnInvalidChild = true;
|
||
warning$1(false, 'Only strings and numbers are supported as <option> children.');
|
||
}
|
||
});
|
||
}
|
||
|
||
// TODO: Remove support for `selected` in <option>.
|
||
if (props.selected != null && !didWarnSelectedSetOnOption) {
|
||
warning$1(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
|
||
didWarnSelectedSetOnOption = true;
|
||
}
|
||
}
|
||
}
|
||
|
||
function postMountWrapper$1(element, props) {
|
||
// value="" should make a value attribute (#6219)
|
||
if (props.value != null) {
|
||
element.setAttribute('value', toString(getToStringValue(props.value)));
|
||
}
|
||
}
|
||
|
||
function getHostProps$1(element, props) {
|
||
var hostProps = _assign({ children: undefined }, props);
|
||
var content = flattenChildren(props.children);
|
||
|
||
if (content) {
|
||
hostProps.children = content;
|
||
}
|
||
|
||
return hostProps;
|
||
}
|
||
|
||
// TODO: direct imports like some-package/src/* are bad. Fix me.
|
||
var didWarnValueDefaultValue$1 = void 0;
|
||
|
||
{
|
||
didWarnValueDefaultValue$1 = false;
|
||
}
|
||
|
||
function getDeclarationErrorAddendum() {
|
||
var ownerName = getCurrentFiberOwnerNameInDevOrNull();
|
||
if (ownerName) {
|
||
return '\n\nCheck the render method of `' + ownerName + '`.';
|
||
}
|
||
return '';
|
||
}
|
||
|
||
var valuePropNames = ['value', 'defaultValue'];
|
||
|
||
/**
|
||
* Validation function for `value` and `defaultValue`.
|
||
*/
|
||
function checkSelectPropTypes(props) {
|
||
ReactControlledValuePropTypes.checkPropTypes('select', props);
|
||
|
||
for (var i = 0; i < valuePropNames.length; i++) {
|
||
var propName = valuePropNames[i];
|
||
if (props[propName] == null) {
|
||
continue;
|
||
}
|
||
var isArray = Array.isArray(props[propName]);
|
||
if (props.multiple && !isArray) {
|
||
warning$1(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
|
||
} else if (!props.multiple && isArray) {
|
||
warning$1(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
|
||
}
|
||
}
|
||
}
|
||
|
||
function updateOptions(node, multiple, propValue, setDefaultSelected) {
|
||
var options = node.options;
|
||
|
||
if (multiple) {
|
||
var selectedValues = propValue;
|
||
var selectedValue = {};
|
||
for (var i = 0; i < selectedValues.length; i++) {
|
||
// Prefix to avoid chaos with special keys.
|
||
selectedValue['$' + selectedValues[i]] = true;
|
||
}
|
||
for (var _i = 0; _i < options.length; _i++) {
|
||
var selected = selectedValue.hasOwnProperty('$' + options[_i].value);
|
||
if (options[_i].selected !== selected) {
|
||
options[_i].selected = selected;
|
||
}
|
||
if (selected && setDefaultSelected) {
|
||
options[_i].defaultSelected = true;
|
||
}
|
||
}
|
||
} else {
|
||
// Do not set `select.value` as exact behavior isn't consistent across all
|
||
// browsers for all cases.
|
||
var _selectedValue = toString(getToStringValue(propValue));
|
||
var defaultSelected = null;
|
||
for (var _i2 = 0; _i2 < options.length; _i2++) {
|
||
if (options[_i2].value === _selectedValue) {
|
||
options[_i2].selected = true;
|
||
if (setDefaultSelected) {
|
||
options[_i2].defaultSelected = true;
|
||
}
|
||
return;
|
||
}
|
||
if (defaultSelected === null && !options[_i2].disabled) {
|
||
defaultSelected = options[_i2];
|
||
}
|
||
}
|
||
if (defaultSelected !== null) {
|
||
defaultSelected.selected = true;
|
||
}
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Implements a <select> host component that allows optionally setting the
|
||
* props `value` and `defaultValue`. If `multiple` is false, the prop must be a
|
||
* stringable. If `multiple` is true, the prop must be an array of stringables.
|
||
*
|
||
* If `value` is not supplied (or null/undefined), user actions that change the
|
||
* selected option will trigger updates to the rendered options.
|
||
*
|
||
* If it is supplied (and not null/undefined), the rendered options will not
|
||
* update in response to user actions. Instead, the `value` prop must change in
|
||
* order for the rendered options to update.
|
||
*
|
||
* If `defaultValue` is provided, any options with the supplied values will be
|
||
* selected.
|
||
*/
|
||
|
||
function getHostProps$2(element, props) {
|
||
return _assign({}, props, {
|
||
value: undefined
|
||
});
|
||
}
|
||
|
||
function initWrapperState$1(element, props) {
|
||
var node = element;
|
||
{
|
||
checkSelectPropTypes(props);
|
||
}
|
||
|
||
node._wrapperState = {
|
||
wasMultiple: !!props.multiple
|
||
};
|
||
|
||
{
|
||
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
|
||
warning$1(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
|
||
didWarnValueDefaultValue$1 = true;
|
||
}
|
||
}
|
||
}
|
||
|
||
function postMountWrapper$2(element, props) {
|
||
var node = element;
|
||
node.multiple = !!props.multiple;
|
||
var value = props.value;
|
||
if (value != null) {
|
||
updateOptions(node, !!props.multiple, value, false);
|
||
} else if (props.defaultValue != null) {
|
||
updateOptions(node, !!props.multiple, props.defaultValue, true);
|
||
}
|
||
}
|
||
|
||
function postUpdateWrapper(element, props) {
|
||
var node = element;
|
||
var wasMultiple = node._wrapperState.wasMultiple;
|
||
node._wrapperState.wasMultiple = !!props.multiple;
|
||
|
||
var value = props.value;
|
||
if (value != null) {
|
||
updateOptions(node, !!props.multiple, value, false);
|
||
} else if (wasMultiple !== !!props.multiple) {
|
||
// For simplicity, reapply `defaultValue` if `multiple` is toggled.
|
||
if (props.defaultValue != null) {
|
||
updateOptions(node, !!props.multiple, props.defaultValue, true);
|
||
} else {
|
||
// Revert the select back to its default unselected state.
|
||
updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);
|
||
}
|
||
}
|
||
}
|
||
|
||
function restoreControlledState$2(element, props) {
|
||
var node = element;
|
||
var value = props.value;
|
||
|
||
if (value != null) {
|
||
updateOptions(node, !!props.multiple, value, false);
|
||
}
|
||
}
|
||
|
||
var didWarnValDefaultVal = false;
|
||
|
||
/**
|
||
* Implements a <textarea> host component that allows setting `value`, and
|
||
* `defaultValue`. This differs from the traditional DOM API because value is
|
||
* usually set as PCDATA children.
|
||
*
|
||
* If `value` is not supplied (or null/undefined), user actions that affect the
|
||
* value will trigger updates to the element.
|
||
*
|
||
* If `value` is supplied (and not null/undefined), the rendered element will
|
||
* not trigger updates to the element. Instead, the `value` prop must change in
|
||
* order for the rendered element to be updated.
|
||
*
|
||
* The rendered element will be initialized with an empty value, the prop
|
||
* `defaultValue` if specified, or the children content (deprecated).
|
||
*/
|
||
|
||
function getHostProps$3(element, props) {
|
||
var node = element;
|
||
!(props.dangerouslySetInnerHTML == null) ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : void 0;
|
||
|
||
// Always set children to the same thing. In IE9, the selection range will
|
||
// get reset if `textContent` is mutated. We could add a check in setTextContent
|
||
// to only set the value if/when the value differs from the node value (which would
|
||
// completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
|
||
// solution. The value can be a boolean or object so that's why it's forced
|
||
// to be a string.
|
||
var hostProps = _assign({}, props, {
|
||
value: undefined,
|
||
defaultValue: undefined,
|
||
children: toString(node._wrapperState.initialValue)
|
||
});
|
||
|
||
return hostProps;
|
||
}
|
||
|
||
function initWrapperState$2(element, props) {
|
||
var node = element;
|
||
{
|
||
ReactControlledValuePropTypes.checkPropTypes('textarea', props);
|
||
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
|
||
warning$1(false, '%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
|
||
didWarnValDefaultVal = true;
|
||
}
|
||
}
|
||
|
||
var initialValue = props.value;
|
||
|
||
// Only bother fetching default value if we're going to use it
|
||
if (initialValue == null) {
|
||
var defaultValue = props.defaultValue;
|
||
// TODO (yungsters): Remove support for children content in <textarea>.
|
||
var children = props.children;
|
||
if (children != null) {
|
||
{
|
||
warning$1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
|
||
}
|
||
!(defaultValue == null) ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : void 0;
|
||
if (Array.isArray(children)) {
|
||
!(children.length <= 1) ? invariant(false, '<textarea> can only have at most one child.') : void 0;
|
||
children = children[0];
|
||
}
|
||
|
||
defaultValue = children;
|
||
}
|
||
if (defaultValue == null) {
|
||
defaultValue = '';
|
||
}
|
||
initialValue = defaultValue;
|
||
}
|
||
|
||
node._wrapperState = {
|
||
initialValue: getToStringValue(initialValue)
|
||
};
|
||
}
|
||
|
||
function updateWrapper$1(element, props) {
|
||
var node = element;
|
||
var value = getToStringValue(props.value);
|
||
var defaultValue = getToStringValue(props.defaultValue);
|
||
if (value != null) {
|
||
// Cast `value` to a string to ensure the value is set correctly. While
|
||
// browsers typically do this as necessary, jsdom doesn't.
|
||
var newValue = toString(value);
|
||
// To avoid side effects (such as losing text selection), only set value if changed
|
||
if (newValue !== node.value) {
|
||
node.value = newValue;
|
||
}
|
||
if (props.defaultValue == null && node.defaultValue !== newValue) {
|
||
node.defaultValue = newValue;
|
||
}
|
||
}
|
||
if (defaultValue != null) {
|
||
node.defaultValue = toString(defaultValue);
|
||
}
|
||
}
|
||
|
||
function postMountWrapper$3(element, props) {
|
||
var node = element;
|
||
// This is in postMount because we need access to the DOM node, which is not
|
||
// available until after the component has mounted.
|
||
var textContent = node.textContent;
|
||
|
||
// Only set node.value if textContent is equal to the expected
|
||
// initial value. In IE10/IE11 there is a bug where the placeholder attribute
|
||
// will populate textContent as well.
|
||
// https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
|
||
if (textContent === node._wrapperState.initialValue) {
|
||
node.value = textContent;
|
||
}
|
||
}
|
||
|
||
function restoreControlledState$3(element, props) {
|
||
// DOM component is still mounted; update
|
||
updateWrapper$1(element, props);
|
||
}
|
||
|
||
var HTML_NAMESPACE$1 = 'http://www.w3.org/1999/xhtml';
|
||
var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
|
||
var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
||
|
||
var Namespaces = {
|
||
html: HTML_NAMESPACE$1,
|
||
mathml: MATH_NAMESPACE,
|
||
svg: SVG_NAMESPACE
|
||
};
|
||
|
||
// Assumes there is no parent namespace.
|
||
function getIntrinsicNamespace(type) {
|
||
switch (type) {
|
||
case 'svg':
|
||
return SVG_NAMESPACE;
|
||
case 'math':
|
||
return MATH_NAMESPACE;
|
||
default:
|
||
return HTML_NAMESPACE$1;
|
||
}
|
||
}
|
||
|
||
function getChildNamespace(parentNamespace, type) {
|
||
if (parentNamespace == null || parentNamespace === HTML_NAMESPACE$1) {
|
||
// No (or default) parent namespace: potential entry point.
|
||
return getIntrinsicNamespace(type);
|
||
}
|
||
if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
|
||
// We're leaving SVG.
|
||
return HTML_NAMESPACE$1;
|
||
}
|
||
// By default, pass namespace below.
|
||
return parentNamespace;
|
||
}
|
||
|
||
/* globals MSApp */
|
||
|
||
/**
|
||
* Create a function which has 'unsafe' privileges (required by windows8 apps)
|
||
*/
|
||
var createMicrosoftUnsafeLocalFunction = function (func) {
|
||
if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
|
||
return function (arg0, arg1, arg2, arg3) {
|
||
MSApp.execUnsafeLocalFunction(function () {
|
||
return func(arg0, arg1, arg2, arg3);
|
||
});
|
||
};
|
||
} else {
|
||
return func;
|
||
}
|
||
};
|
||
|
||
// SVG temp container for IE lacking innerHTML
|
||
var reusableSVGContainer = void 0;
|
||
|
||
/**
|
||
* Set the innerHTML property of a node
|
||
*
|
||
* @param {DOMElement} node
|
||
* @param {string} html
|
||
* @internal
|
||
*/
|
||
var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
|
||
// IE does not have innerHTML for SVG nodes, so instead we inject the
|
||
// new markup in a temp node and then move the child nodes across into
|
||
// the target node
|
||
|
||
if (node.namespaceURI === Namespaces.svg && !('innerHTML' in node)) {
|
||
reusableSVGContainer = reusableSVGContainer || document.createElement('div');
|
||
reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
|
||
var svgNode = reusableSVGContainer.firstChild;
|
||
while (node.firstChild) {
|
||
node.removeChild(node.firstChild);
|
||
}
|
||
while (svgNode.firstChild) {
|
||
node.appendChild(svgNode.firstChild);
|
||
}
|
||
} else {
|
||
node.innerHTML = html;
|
||
}
|
||
});
|
||
|
||
/**
|
||
* Set the textContent property of a node. For text updates, it's faster
|
||
* to set the `nodeValue` of the Text node directly instead of using
|
||
* `.textContent` which will remove the existing node and create a new one.
|
||
*
|
||
* @param {DOMElement} node
|
||
* @param {string} text
|
||
* @internal
|
||
*/
|
||
var setTextContent = function (node, text) {
|
||
if (text) {
|
||
var firstChild = node.firstChild;
|
||
|
||
if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
|
||
firstChild.nodeValue = text;
|
||
return;
|
||
}
|
||
}
|
||
node.textContent = text;
|
||
};
|
||
|
||
// List derived from Gecko source code:
|
||
// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
|
||
var shorthandToLonghand = {
|
||
animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],
|
||
background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],
|
||
backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],
|
||
border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],
|
||
borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],
|
||
borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],
|
||
borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],
|
||
borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],
|
||
borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],
|
||
borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],
|
||
borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],
|
||
borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],
|
||
borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],
|
||
borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],
|
||
borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],
|
||
borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],
|
||
borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],
|
||
columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],
|
||
columns: ['columnCount', 'columnWidth'],
|
||
flex: ['flexBasis', 'flexGrow', 'flexShrink'],
|
||
flexFlow: ['flexDirection', 'flexWrap'],
|
||
font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],
|
||
fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],
|
||
gap: ['columnGap', 'rowGap'],
|
||
grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
|
||
gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],
|
||
gridColumn: ['gridColumnEnd', 'gridColumnStart'],
|
||
gridColumnGap: ['columnGap'],
|
||
gridGap: ['columnGap', 'rowGap'],
|
||
gridRow: ['gridRowEnd', 'gridRowStart'],
|
||
gridRowGap: ['rowGap'],
|
||
gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
|
||
listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],
|
||
margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
|
||
marker: ['markerEnd', 'markerMid', 'markerStart'],
|
||
mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],
|
||
maskPosition: ['maskPositionX', 'maskPositionY'],
|
||
outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],
|
||
overflow: ['overflowX', 'overflowY'],
|
||
padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
|
||
placeContent: ['alignContent', 'justifyContent'],
|
||
placeItems: ['alignItems', 'justifyItems'],
|
||
placeSelf: ['alignSelf', 'justifySelf'],
|
||
textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],
|
||
textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],
|
||
transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],
|
||
wordWrap: ['overflowWrap']
|
||
};
|
||
|
||
/**
|
||
* CSS properties which accept numbers but are not in units of "px".
|
||
*/
|
||
var isUnitlessNumber = {
|
||
animationIterationCount: true,
|
||
borderImageOutset: true,
|
||
borderImageSlice: true,
|
||
borderImageWidth: true,
|
||
boxFlex: true,
|
||
boxFlexGroup: true,
|
||
boxOrdinalGroup: true,
|
||
columnCount: true,
|
||
columns: true,
|
||
flex: true,
|
||
flexGrow: true,
|
||
flexPositive: true,
|
||
flexShrink: true,
|
||
flexNegative: true,
|
||
flexOrder: true,
|
||
gridArea: true,
|
||
gridRow: true,
|
||
gridRowEnd: true,
|
||
gridRowSpan: true,
|
||
gridRowStart: true,
|
||
gridColumn: true,
|
||
gridColumnEnd: true,
|
||
gridColumnSpan: true,
|
||
gridColumnStart: true,
|
||
fontWeight: true,
|
||
lineClamp: true,
|
||
lineHeight: true,
|
||
opacity: true,
|
||
order: true,
|
||
orphans: true,
|
||
tabSize: true,
|
||
widows: true,
|
||
zIndex: true,
|
||
zoom: true,
|
||
|
||
// SVG-related properties
|
||
fillOpacity: true,
|
||
floodOpacity: true,
|
||
stopOpacity: true,
|
||
strokeDasharray: true,
|
||
strokeDashoffset: true,
|
||
strokeMiterlimit: true,
|
||
strokeOpacity: true,
|
||
strokeWidth: true
|
||
};
|
||
|
||
/**
|
||
* @param {string} prefix vendor-specific prefix, eg: Webkit
|
||
* @param {string} key style name, eg: transitionDuration
|
||
* @return {string} style name prefixed with `prefix`, properly camelCased, eg:
|
||
* WebkitTransitionDuration
|
||
*/
|
||
function prefixKey(prefix, key) {
|
||
return prefix + key.charAt(0).toUpperCase() + key.substring(1);
|
||
}
|
||
|
||
/**
|
||
* Support style names that may come passed in prefixed by adding permutations
|
||
* of vendor prefixes.
|
||
*/
|
||
var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
|
||
|
||
// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
|
||
// infinite loop, because it iterates over the newly added props too.
|
||
Object.keys(isUnitlessNumber).forEach(function (prop) {
|
||
prefixes.forEach(function (prefix) {
|
||
isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
|
||
});
|
||
});
|
||
|
||
/**
|
||
* Convert a value into the proper css writable value. The style name `name`
|
||
* should be logical (no hyphens), as specified
|
||
* in `CSSProperty.isUnitlessNumber`.
|
||
*
|
||
* @param {string} name CSS property name such as `topMargin`.
|
||
* @param {*} value CSS property value such as `10px`.
|
||
* @return {string} Normalized style value with dimensions applied.
|
||
*/
|
||
function dangerousStyleValue(name, value, isCustomProperty) {
|
||
// Note that we've removed escapeTextForBrowser() calls here since the
|
||
// whole string will be escaped when the attribute is injected into
|
||
// the markup. If you provide unsafe user data here they can inject
|
||
// arbitrary CSS which may be problematic (I couldn't repro this):
|
||
// https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
|
||
// http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
|
||
// This is not an XSS hole but instead a potential CSS injection issue
|
||
// which has lead to a greater discussion about how we're going to
|
||
// trust URLs moving forward. See #2115901
|
||
|
||
var isEmpty = value == null || typeof value === 'boolean' || value === '';
|
||
if (isEmpty) {
|
||
return '';
|
||
}
|
||
|
||
if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
|
||
return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
|
||
}
|
||
|
||
return ('' + value).trim();
|
||
}
|
||
|
||
var uppercasePattern = /([A-Z])/g;
|
||
var msPattern = /^ms-/;
|
||
|
||
/**
|
||
* Hyphenates a camelcased CSS property name, for example:
|
||
*
|
||
* > hyphenateStyleName('backgroundColor')
|
||
* < "background-color"
|
||
* > hyphenateStyleName('MozTransition')
|
||
* < "-moz-transition"
|
||
* > hyphenateStyleName('msTransition')
|
||
* < "-ms-transition"
|
||
*
|
||
* As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
|
||
* is converted to `-ms-`.
|
||
*/
|
||
function hyphenateStyleName(name) {
|
||
return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
|
||
}
|
||
|
||
var warnValidStyle = function () {};
|
||
|
||
{
|
||
// 'msTransform' is correct, but the other prefixes should be capitalized
|
||
var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
|
||
var msPattern$1 = /^-ms-/;
|
||
var hyphenPattern = /-(.)/g;
|
||
|
||
// style values shouldn't contain a semicolon
|
||
var badStyleValueWithSemicolonPattern = /;\s*$/;
|
||
|
||
var warnedStyleNames = {};
|
||
var warnedStyleValues = {};
|
||
var warnedForNaNValue = false;
|
||
var warnedForInfinityValue = false;
|
||
|
||
var camelize = function (string) {
|
||
return string.replace(hyphenPattern, function (_, character) {
|
||
return character.toUpperCase();
|
||
});
|
||
};
|
||
|
||
var warnHyphenatedStyleName = function (name) {
|
||
if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
|
||
return;
|
||
}
|
||
|
||
warnedStyleNames[name] = true;
|
||
warning$1(false, 'Unsupported style property %s. Did you mean %s?', name,
|
||
// As Andi Smith suggests
|
||
// (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
|
||
// is converted to lowercase `ms`.
|
||
camelize(name.replace(msPattern$1, 'ms-')));
|
||
};
|
||
|
||
var warnBadVendoredStyleName = function (name) {
|
||
if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
|
||
return;
|
||
}
|
||
|
||
warnedStyleNames[name] = true;
|
||
warning$1(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
|
||
};
|
||
|
||
var warnStyleValueWithSemicolon = function (name, value) {
|
||
if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
|
||
return;
|
||
}
|
||
|
||
warnedStyleValues[value] = true;
|
||
warning$1(false, "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
|
||
};
|
||
|
||
var warnStyleValueIsNaN = function (name, value) {
|
||
if (warnedForNaNValue) {
|
||
return;
|
||
}
|
||
|
||
warnedForNaNValue = true;
|
||
warning$1(false, '`NaN` is an invalid value for the `%s` css style property.', name);
|
||
};
|
||
|
||
var warnStyleValueIsInfinity = function (name, value) {
|
||
if (warnedForInfinityValue) {
|
||
return;
|
||
}
|
||
|
||
warnedForInfinityValue = true;
|
||
warning$1(false, '`Infinity` is an invalid value for the `%s` css style property.', name);
|
||
};
|
||
|
||
warnValidStyle = function (name, value) {
|
||
if (name.indexOf('-') > -1) {
|
||
warnHyphenatedStyleName(name);
|
||
} else if (badVendoredStyleNamePattern.test(name)) {
|
||
warnBadVendoredStyleName(name);
|
||
} else if (badStyleValueWithSemicolonPattern.test(value)) {
|
||
warnStyleValueWithSemicolon(name, value);
|
||
}
|
||
|
||
if (typeof value === 'number') {
|
||
if (isNaN(value)) {
|
||
warnStyleValueIsNaN(name, value);
|
||
} else if (!isFinite(value)) {
|
||
warnStyleValueIsInfinity(name, value);
|
||
}
|
||
}
|
||
};
|
||
}
|
||
|
||
var warnValidStyle$1 = warnValidStyle;
|
||
|
||
/**
|
||
* Operations for dealing with CSS properties.
|
||
*/
|
||
|
||
/**
|
||
* This creates a string that is expected to be equivalent to the style
|
||
* attribute generated by server-side rendering. It by-passes warnings and
|
||
* security checks so it's not safe to use this value for anything other than
|
||
* comparison. It is only used in DEV for SSR validation.
|
||
*/
|
||
function createDangerousStringForStyles(styles) {
|
||
{
|
||
var serialized = '';
|
||
var delimiter = '';
|
||
for (var styleName in styles) {
|
||
if (!styles.hasOwnProperty(styleName)) {
|
||
continue;
|
||
}
|
||
var styleValue = styles[styleName];
|
||
if (styleValue != null) {
|
||
var isCustomProperty = styleName.indexOf('--') === 0;
|
||
serialized += delimiter + hyphenateStyleName(styleName) + ':';
|
||
serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
|
||
|
||
delimiter = ';';
|
||
}
|
||
}
|
||
return serialized || null;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Sets the value for multiple styles on a node. If a value is specified as
|
||
* '' (empty string), the corresponding style property will be unset.
|
||
*
|
||
* @param {DOMElement} node
|
||
* @param {object} styles
|
||
*/
|
||
function setValueForStyles(node, styles) {
|
||
var style = node.style;
|
||
for (var styleName in styles) {
|
||
if (!styles.hasOwnProperty(styleName)) {
|
||
continue;
|
||
}
|
||
var isCustomProperty = styleName.indexOf('--') === 0;
|
||
{
|
||
if (!isCustomProperty) {
|
||
warnValidStyle$1(styleName, styles[styleName]);
|
||
}
|
||
}
|
||
var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);
|
||
if (styleName === 'float') {
|
||
styleName = 'cssFloat';
|
||
}
|
||
if (isCustomProperty) {
|
||
style.setProperty(styleName, styleValue);
|
||
} else {
|
||
style[styleName] = styleValue;
|
||
}
|
||
}
|
||
}
|
||
|
||
function isValueEmpty(value) {
|
||
return value == null || typeof value === 'boolean' || value === '';
|
||
}
|
||
|
||
/**
|
||
* Given {color: 'red', overflow: 'hidden'} returns {
|
||
* color: 'color',
|
||
* overflowX: 'overflow',
|
||
* overflowY: 'overflow',
|
||
* }. This can be read as "the overflowY property was set by the overflow
|
||
* shorthand". That is, the values are the property that each was derived from.
|
||
*/
|
||
function expandShorthandMap(styles) {
|
||
var expanded = {};
|
||
for (var key in styles) {
|
||
var longhands = shorthandToLonghand[key] || [key];
|
||
for (var i = 0; i < longhands.length; i++) {
|
||
expanded[longhands[i]] = key;
|
||
}
|
||
}
|
||
return expanded;
|
||
}
|
||
|
||
/**
|
||
* When mixing shorthand and longhand property names, we warn during updates if
|
||
* we expect an incorrect result to occur. In particular, we warn for:
|
||
*
|
||
* Updating a shorthand property (longhand gets overwritten):
|
||
* {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
|
||
* becomes .style.font = 'baz'
|
||
* Removing a shorthand property (longhand gets lost too):
|
||
* {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
|
||
* becomes .style.font = ''
|
||
* Removing a longhand property (should revert to shorthand; doesn't):
|
||
* {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
|
||
* becomes .style.fontVariant = ''
|
||
*/
|
||
function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
|
||
if (!warnAboutShorthandPropertyCollision) {
|
||
return;
|
||
}
|
||
|
||
if (!nextStyles) {
|
||
return;
|
||
}
|
||
|
||
var expandedUpdates = expandShorthandMap(styleUpdates);
|
||
var expandedStyles = expandShorthandMap(nextStyles);
|
||
var warnedAbout = {};
|
||
for (var key in expandedUpdates) {
|
||
var originalKey = expandedUpdates[key];
|
||
var correctOriginalKey = expandedStyles[key];
|
||
if (correctOriginalKey && originalKey !== correctOriginalKey) {
|
||
var warningKey = originalKey + ',' + correctOriginalKey;
|
||
if (warnedAbout[warningKey]) {
|
||
continue;
|
||
}
|
||
warnedAbout[warningKey] = true;
|
||
warning$1(false, '%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + "avoid this, don't mix shorthand and non-shorthand properties " + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);
|
||
}
|
||
}
|
||
}
|
||
|
||
// For HTML, certain tags should omit their close tag. We keep a whitelist for
|
||
// those special-case tags.
|
||
|
||
var omittedCloseTags = {
|
||
area: true,
|
||
base: true,
|
||
br: true,
|
||
col: true,
|
||
embed: true,
|
||
hr: true,
|
||
img: true,
|
||
input: true,
|
||
keygen: true,
|
||
link: true,
|
||
meta: true,
|
||
param: true,
|
||
source: true,
|
||
track: true,
|
||
wbr: true
|
||
// NOTE: menuitem's close tag should be omitted, but that causes problems.
|
||
};
|
||
|
||
// For HTML, certain tags cannot have children. This has the same purpose as
|
||
// `omittedCloseTags` except that `menuitem` should still have its closing tag.
|
||
|
||
var voidElementTags = _assign({
|
||
menuitem: true
|
||
}, omittedCloseTags);
|
||
|
||
// TODO: We can remove this if we add invariantWithStack()
|
||
// or add stack by default to invariants where possible.
|
||
var HTML$1 = '__html';
|
||
|
||
var ReactDebugCurrentFrame$2 = null;
|
||
{
|
||
ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
|
||
}
|
||
|
||
function assertValidProps(tag, props) {
|
||
if (!props) {
|
||
return;
|
||
}
|
||
// Note the use of `==` which checks for null or undefined.
|
||
if (voidElementTags[tag]) {
|
||
!(props.children == null && props.dangerouslySetInnerHTML == null) ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', tag, ReactDebugCurrentFrame$2.getStackAddendum()) : void 0;
|
||
}
|
||
if (props.dangerouslySetInnerHTML != null) {
|
||
!(props.children == null) ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : void 0;
|
||
!(typeof props.dangerouslySetInnerHTML === 'object' && HTML$1 in props.dangerouslySetInnerHTML) ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : void 0;
|
||
}
|
||
{
|
||
!(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) ? warning$1(false, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
|
||
}
|
||
!(props.style == null || typeof props.style === 'object') ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', ReactDebugCurrentFrame$2.getStackAddendum()) : void 0;
|
||
}
|
||
|
||
function isCustomComponent(tagName, props) {
|
||
if (tagName.indexOf('-') === -1) {
|
||
return typeof props.is === 'string';
|
||
}
|
||
switch (tagName) {
|
||
// These are reserved SVG and MathML elements.
|
||
// We don't mind this whitelist too much because we expect it to never grow.
|
||
// The alternative is to track the namespace in a few places which is convoluted.
|
||
// https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
|
||
case 'annotation-xml':
|
||
case 'color-profile':
|
||
case 'font-face':
|
||
case 'font-face-src':
|
||
case 'font-face-uri':
|
||
case 'font-face-format':
|
||
case 'font-face-name':
|
||
case 'missing-glyph':
|
||
return false;
|
||
default:
|
||
return true;
|
||
}
|
||
}
|
||
|
||
// When adding attributes to the HTML or SVG whitelist, be sure to
|
||
// also add them to this module to ensure casing and incorrect name
|
||
// warnings.
|
||
var possibleStandardNames = {
|
||
// HTML
|
||
accept: 'accept',
|
||
acceptcharset: 'acceptCharset',
|
||
'accept-charset': 'acceptCharset',
|
||
accesskey: 'accessKey',
|
||
action: 'action',
|
||
allowfullscreen: 'allowFullScreen',
|
||
alt: 'alt',
|
||
as: 'as',
|
||
async: 'async',
|
||
autocapitalize: 'autoCapitalize',
|
||
autocomplete: 'autoComplete',
|
||
autocorrect: 'autoCorrect',
|
||
autofocus: 'autoFocus',
|
||
autoplay: 'autoPlay',
|
||
autosave: 'autoSave',
|
||
capture: 'capture',
|
||
cellpadding: 'cellPadding',
|
||
cellspacing: 'cellSpacing',
|
||
challenge: 'challenge',
|
||
charset: 'charSet',
|
||
checked: 'checked',
|
||
children: 'children',
|
||
cite: 'cite',
|
||
class: 'className',
|
||
classid: 'classID',
|
||
classname: 'className',
|
||
cols: 'cols',
|
||
colspan: 'colSpan',
|
||
content: 'content',
|
||
contenteditable: 'contentEditable',
|
||
contextmenu: 'contextMenu',
|
||
controls: 'controls',
|
||
controlslist: 'controlsList',
|
||
coords: 'coords',
|
||
crossorigin: 'crossOrigin',
|
||
dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
|
||
data: 'data',
|
||
datetime: 'dateTime',
|
||
default: 'default',
|
||
defaultchecked: 'defaultChecked',
|
||
defaultvalue: 'defaultValue',
|
||
defer: 'defer',
|
||
dir: 'dir',
|
||
disabled: 'disabled',
|
||
download: 'download',
|
||
draggable: 'draggable',
|
||
enctype: 'encType',
|
||
for: 'htmlFor',
|
||
form: 'form',
|
||
formmethod: 'formMethod',
|
||
formaction: 'formAction',
|
||
formenctype: 'formEncType',
|
||
formnovalidate: 'formNoValidate',
|
||
formtarget: 'formTarget',
|
||
frameborder: 'frameBorder',
|
||
headers: 'headers',
|
||
height: 'height',
|
||
hidden: 'hidden',
|
||
high: 'high',
|
||
href: 'href',
|
||
hreflang: 'hrefLang',
|
||
htmlfor: 'htmlFor',
|
||
httpequiv: 'httpEquiv',
|
||
'http-equiv': 'httpEquiv',
|
||
icon: 'icon',
|
||
id: 'id',
|
||
innerhtml: 'innerHTML',
|
||
inputmode: 'inputMode',
|
||
integrity: 'integrity',
|
||
is: 'is',
|
||
itemid: 'itemID',
|
||
itemprop: 'itemProp',
|
||
itemref: 'itemRef',
|
||
itemscope: 'itemScope',
|
||
itemtype: 'itemType',
|
||
keyparams: 'keyParams',
|
||
keytype: 'keyType',
|
||
kind: 'kind',
|
||
label: 'label',
|
||
lang: 'lang',
|
||
list: 'list',
|
||
loop: 'loop',
|
||
low: 'low',
|
||
manifest: 'manifest',
|
||
marginwidth: 'marginWidth',
|
||
marginheight: 'marginHeight',
|
||
max: 'max',
|
||
maxlength: 'maxLength',
|
||
media: 'media',
|
||
mediagroup: 'mediaGroup',
|
||
method: 'method',
|
||
min: 'min',
|
||
minlength: 'minLength',
|
||
multiple: 'multiple',
|
||
muted: 'muted',
|
||
name: 'name',
|
||
nomodule: 'noModule',
|
||
nonce: 'nonce',
|
||
novalidate: 'noValidate',
|
||
open: 'open',
|
||
optimum: 'optimum',
|
||
pattern: 'pattern',
|
||
placeholder: 'placeholder',
|
||
playsinline: 'playsInline',
|
||
poster: 'poster',
|
||
preload: 'preload',
|
||
profile: 'profile',
|
||
radiogroup: 'radioGroup',
|
||
readonly: 'readOnly',
|
||
referrerpolicy: 'referrerPolicy',
|
||
rel: 'rel',
|
||
required: 'required',
|
||
reversed: 'reversed',
|
||
role: 'role',
|
||
rows: 'rows',
|
||
rowspan: 'rowSpan',
|
||
sandbox: 'sandbox',
|
||
scope: 'scope',
|
||
scoped: 'scoped',
|
||
scrolling: 'scrolling',
|
||
seamless: 'seamless',
|
||
selected: 'selected',
|
||
shape: 'shape',
|
||
size: 'size',
|
||
sizes: 'sizes',
|
||
span: 'span',
|
||
spellcheck: 'spellCheck',
|
||
src: 'src',
|
||
srcdoc: 'srcDoc',
|
||
srclang: 'srcLang',
|
||
srcset: 'srcSet',
|
||
start: 'start',
|
||
step: 'step',
|
||
style: 'style',
|
||
summary: 'summary',
|
||
tabindex: 'tabIndex',
|
||
target: 'target',
|
||
title: 'title',
|
||
type: 'type',
|
||
usemap: 'useMap',
|
||
value: 'value',
|
||
width: 'width',
|
||
wmode: 'wmode',
|
||
wrap: 'wrap',
|
||
|
||
// SVG
|
||
about: 'about',
|
||
accentheight: 'accentHeight',
|
||
'accent-height': 'accentHeight',
|
||
accumulate: 'accumulate',
|
||
additive: 'additive',
|
||
alignmentbaseline: 'alignmentBaseline',
|
||
'alignment-baseline': 'alignmentBaseline',
|
||
allowreorder: 'allowReorder',
|
||
alphabetic: 'alphabetic',
|
||
amplitude: 'amplitude',
|
||
arabicform: 'arabicForm',
|
||
'arabic-form': 'arabicForm',
|
||
ascent: 'ascent',
|
||
attributename: 'attributeName',
|
||
attributetype: 'attributeType',
|
||
autoreverse: 'autoReverse',
|
||
azimuth: 'azimuth',
|
||
basefrequency: 'baseFrequency',
|
||
baselineshift: 'baselineShift',
|
||
'baseline-shift': 'baselineShift',
|
||
baseprofile: 'baseProfile',
|
||
bbox: 'bbox',
|
||
begin: 'begin',
|
||
bias: 'bias',
|
||
by: 'by',
|
||
calcmode: 'calcMode',
|
||
capheight: 'capHeight',
|
||
'cap-height': 'capHeight',
|
||
clip: 'clip',
|
||
clippath: 'clipPath',
|
||
'clip-path': 'clipPath',
|
||
clippathunits: 'clipPathUnits',
|
||
cliprule: 'clipRule',
|
||
'clip-rule': 'clipRule',
|
||
color: 'color',
|
||
colorinterpolation: 'colorInterpolation',
|
||
'color-interpolation': 'colorInterpolation',
|
||
colorinterpolationfilters: 'colorInterpolationFilters',
|
||
'color-interpolation-filters': 'colorInterpolationFilters',
|
||
colorprofile: 'colorProfile',
|
||
'color-profile': 'colorProfile',
|
||
colorrendering: 'colorRendering',
|
||
'color-rendering': 'colorRendering',
|
||
contentscripttype: 'contentScriptType',
|
||
contentstyletype: 'contentStyleType',
|
||
cursor: 'cursor',
|
||
cx: 'cx',
|
||
cy: 'cy',
|
||
d: 'd',
|
||
datatype: 'datatype',
|
||
decelerate: 'decelerate',
|
||
descent: 'descent',
|
||
diffuseconstant: 'diffuseConstant',
|
||
direction: 'direction',
|
||
display: 'display',
|
||
divisor: 'divisor',
|
||
dominantbaseline: 'dominantBaseline',
|
||
'dominant-baseline': 'dominantBaseline',
|
||
dur: 'dur',
|
||
dx: 'dx',
|
||
dy: 'dy',
|
||
edgemode: 'edgeMode',
|
||
elevation: 'elevation',
|
||
enablebackground: 'enableBackground',
|
||
'enable-background': 'enableBackground',
|
||
end: 'end',
|
||
exponent: 'exponent',
|
||
externalresourcesrequired: 'externalResourcesRequired',
|
||
fill: 'fill',
|
||
fillopacity: 'fillOpacity',
|
||
'fill-opacity': 'fillOpacity',
|
||
fillrule: 'fillRule',
|
||
'fill-rule': 'fillRule',
|
||
filter: 'filter',
|
||
filterres: 'filterRes',
|
||
filterunits: 'filterUnits',
|
||
floodopacity: 'floodOpacity',
|
||
'flood-opacity': 'floodOpacity',
|
||
floodcolor: 'floodColor',
|
||
'flood-color': 'floodColor',
|
||
focusable: 'focusable',
|
||
fontfamily: 'fontFamily',
|
||
'font-family': 'fontFamily',
|
||
fontsize: 'fontSize',
|
||
'font-size': 'fontSize',
|
||
fontsizeadjust: 'fontSizeAdjust',
|
||
'font-size-adjust': 'fontSizeAdjust',
|
||
fontstretch: 'fontStretch',
|
||
'font-stretch': 'fontStretch',
|
||
fontstyle: 'fontStyle',
|
||
'font-style': 'fontStyle',
|
||
fontvariant: 'fontVariant',
|
||
'font-variant': 'fontVariant',
|
||
fontweight: 'fontWeight',
|
||
'font-weight': 'fontWeight',
|
||
format: 'format',
|
||
from: 'from',
|
||
fx: 'fx',
|
||
fy: 'fy',
|
||
g1: 'g1',
|
||
g2: 'g2',
|
||
glyphname: 'glyphName',
|
||
'glyph-name': 'glyphName',
|
||
glyphorientationhorizontal: 'glyphOrientationHorizontal',
|
||
'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
|
||
glyphorientationvertical: 'glyphOrientationVertical',
|
||
'glyph-orientation-vertical': 'glyphOrientationVertical',
|
||
glyphref: 'glyphRef',
|
||
gradienttransform: 'gradientTransform',
|
||
gradientunits: 'gradientUnits',
|
||
hanging: 'hanging',
|
||
horizadvx: 'horizAdvX',
|
||
'horiz-adv-x': 'horizAdvX',
|
||
horizoriginx: 'horizOriginX',
|
||
'horiz-origin-x': 'horizOriginX',
|
||
ideographic: 'ideographic',
|
||
imagerendering: 'imageRendering',
|
||
'image-rendering': 'imageRendering',
|
||
in2: 'in2',
|
||
in: 'in',
|
||
inlist: 'inlist',
|
||
intercept: 'intercept',
|
||
k1: 'k1',
|
||
k2: 'k2',
|
||
k3: 'k3',
|
||
k4: 'k4',
|
||
k: 'k',
|
||
kernelmatrix: 'kernelMatrix',
|
||
kernelunitlength: 'kernelUnitLength',
|
||
kerning: 'kerning',
|
||
keypoints: 'keyPoints',
|
||
keysplines: 'keySplines',
|
||
keytimes: 'keyTimes',
|
||
lengthadjust: 'lengthAdjust',
|
||
letterspacing: 'letterSpacing',
|
||
'letter-spacing': 'letterSpacing',
|
||
lightingcolor: 'lightingColor',
|
||
'lighting-color': 'lightingColor',
|
||
limitingconeangle: 'limitingConeAngle',
|
||
local: 'local',
|
||
markerend: 'markerEnd',
|
||
'marker-end': 'markerEnd',
|
||
markerheight: 'markerHeight',
|
||
markermid: 'markerMid',
|
||
'marker-mid': 'markerMid',
|
||
markerstart: 'markerStart',
|
||
'marker-start': 'markerStart',
|
||
markerunits: 'markerUnits',
|
||
markerwidth: 'markerWidth',
|
||
mask: 'mask',
|
||
maskcontentunits: 'maskContentUnits',
|
||
maskunits: 'maskUnits',
|
||
mathematical: 'mathematical',
|
||
mode: 'mode',
|
||
numoctaves: 'numOctaves',
|
||
offset: 'offset',
|
||
opacity: 'opacity',
|
||
operator: 'operator',
|
||
order: 'order',
|
||
orient: 'orient',
|
||
orientation: 'orientation',
|
||
origin: 'origin',
|
||
overflow: 'overflow',
|
||
overlineposition: 'overlinePosition',
|
||
'overline-position': 'overlinePosition',
|
||
overlinethickness: 'overlineThickness',
|
||
'overline-thickness': 'overlineThickness',
|
||
paintorder: 'paintOrder',
|
||
'paint-order': 'paintOrder',
|
||
panose1: 'panose1',
|
||
'panose-1': 'panose1',
|
||
pathlength: 'pathLength',
|
||
patterncontentunits: 'patternContentUnits',
|
||
patterntransform: 'patternTransform',
|
||
patternunits: 'patternUnits',
|
||
pointerevents: 'pointerEvents',
|
||
'pointer-events': 'pointerEvents',
|
||
points: 'points',
|
||
pointsatx: 'pointsAtX',
|
||
pointsaty: 'pointsAtY',
|
||
pointsatz: 'pointsAtZ',
|
||
prefix: 'prefix',
|
||
preservealpha: 'preserveAlpha',
|
||
preserveaspectratio: 'preserveAspectRatio',
|
||
primitiveunits: 'primitiveUnits',
|
||
property: 'property',
|
||
r: 'r',
|
||
radius: 'radius',
|
||
refx: 'refX',
|
||
refy: 'refY',
|
||
renderingintent: 'renderingIntent',
|
||
'rendering-intent': 'renderingIntent',
|
||
repeatcount: 'repeatCount',
|
||
repeatdur: 'repeatDur',
|
||
requiredextensions: 'requiredExtensions',
|
||
requiredfeatures: 'requiredFeatures',
|
||
resource: 'resource',
|
||
restart: 'restart',
|
||
result: 'result',
|
||
results: 'results',
|
||
rotate: 'rotate',
|
||
rx: 'rx',
|
||
ry: 'ry',
|
||
scale: 'scale',
|
||
security: 'security',
|
||
seed: 'seed',
|
||
shaperendering: 'shapeRendering',
|
||
'shape-rendering': 'shapeRendering',
|
||
slope: 'slope',
|
||
spacing: 'spacing',
|
||
specularconstant: 'specularConstant',
|
||
specularexponent: 'specularExponent',
|
||
speed: 'speed',
|
||
spreadmethod: 'spreadMethod',
|
||
startoffset: 'startOffset',
|
||
stddeviation: 'stdDeviation',
|
||
stemh: 'stemh',
|
||
stemv: 'stemv',
|
||
stitchtiles: 'stitchTiles',
|
||
stopcolor: 'stopColor',
|
||
'stop-color': 'stopColor',
|
||
stopopacity: 'stopOpacity',
|
||
'stop-opacity': 'stopOpacity',
|
||
strikethroughposition: 'strikethroughPosition',
|
||
'strikethrough-position': 'strikethroughPosition',
|
||
strikethroughthickness: 'strikethroughThickness',
|
||
'strikethrough-thickness': 'strikethroughThickness',
|
||
string: 'string',
|
||
stroke: 'stroke',
|
||
strokedasharray: 'strokeDasharray',
|
||
'stroke-dasharray': 'strokeDasharray',
|
||
strokedashoffset: 'strokeDashoffset',
|
||
'stroke-dashoffset': 'strokeDashoffset',
|
||
strokelinecap: 'strokeLinecap',
|
||
'stroke-linecap': 'strokeLinecap',
|
||
strokelinejoin: 'strokeLinejoin',
|
||
'stroke-linejoin': 'strokeLinejoin',
|
||
strokemiterlimit: 'strokeMiterlimit',
|
||
'stroke-miterlimit': 'strokeMiterlimit',
|
||
strokewidth: 'strokeWidth',
|
||
'stroke-width': 'strokeWidth',
|
||
strokeopacity: 'strokeOpacity',
|
||
'stroke-opacity': 'strokeOpacity',
|
||
suppresscontenteditablewarning: 'suppressContentEditableWarning',
|
||
suppresshydrationwarning: 'suppressHydrationWarning',
|
||
surfacescale: 'surfaceScale',
|
||
systemlanguage: 'systemLanguage',
|
||
tablevalues: 'tableValues',
|
||
targetx: 'targetX',
|
||
targety: 'targetY',
|
||
textanchor: 'textAnchor',
|
||
'text-anchor': 'textAnchor',
|
||
textdecoration: 'textDecoration',
|
||
'text-decoration': 'textDecoration',
|
||
textlength: 'textLength',
|
||
textrendering: 'textRendering',
|
||
'text-rendering': 'textRendering',
|
||
to: 'to',
|
||
transform: 'transform',
|
||
typeof: 'typeof',
|
||
u1: 'u1',
|
||
u2: 'u2',
|
||
underlineposition: 'underlinePosition',
|
||
'underline-position': 'underlinePosition',
|
||
underlinethickness: 'underlineThickness',
|
||
'underline-thickness': 'underlineThickness',
|
||
unicode: 'unicode',
|
||
unicodebidi: 'unicodeBidi',
|
||
'unicode-bidi': 'unicodeBidi',
|
||
unicoderange: 'unicodeRange',
|
||
'unicode-range': 'unicodeRange',
|
||
unitsperem: 'unitsPerEm',
|
||
'units-per-em': 'unitsPerEm',
|
||
unselectable: 'unselectable',
|
||
valphabetic: 'vAlphabetic',
|
||
'v-alphabetic': 'vAlphabetic',
|
||
values: 'values',
|
||
vectoreffect: 'vectorEffect',
|
||
'vector-effect': 'vectorEffect',
|
||
version: 'version',
|
||
vertadvy: 'vertAdvY',
|
||
'vert-adv-y': 'vertAdvY',
|
||
vertoriginx: 'vertOriginX',
|
||
'vert-origin-x': 'vertOriginX',
|
||
vertoriginy: 'vertOriginY',
|
||
'vert-origin-y': 'vertOriginY',
|
||
vhanging: 'vHanging',
|
||
'v-hanging': 'vHanging',
|
||
videographic: 'vIdeographic',
|
||
'v-ideographic': 'vIdeographic',
|
||
viewbox: 'viewBox',
|
||
viewtarget: 'viewTarget',
|
||
visibility: 'visibility',
|
||
vmathematical: 'vMathematical',
|
||
'v-mathematical': 'vMathematical',
|
||
vocab: 'vocab',
|
||
widths: 'widths',
|
||
wordspacing: 'wordSpacing',
|
||
'word-spacing': 'wordSpacing',
|
||
writingmode: 'writingMode',
|
||
'writing-mode': 'writingMode',
|
||
x1: 'x1',
|
||
x2: 'x2',
|
||
x: 'x',
|
||
xchannelselector: 'xChannelSelector',
|
||
xheight: 'xHeight',
|
||
'x-height': 'xHeight',
|
||
xlinkactuate: 'xlinkActuate',
|
||
'xlink:actuate': 'xlinkActuate',
|
||
xlinkarcrole: 'xlinkArcrole',
|
||
'xlink:arcrole': 'xlinkArcrole',
|
||
xlinkhref: 'xlinkHref',
|
||
'xlink:href': 'xlinkHref',
|
||
xlinkrole: 'xlinkRole',
|
||
'xlink:role': 'xlinkRole',
|
||
xlinkshow: 'xlinkShow',
|
||
'xlink:show': 'xlinkShow',
|
||
xlinktitle: 'xlinkTitle',
|
||
'xlink:title': 'xlinkTitle',
|
||
xlinktype: 'xlinkType',
|
||
'xlink:type': 'xlinkType',
|
||
xmlbase: 'xmlBase',
|
||
'xml:base': 'xmlBase',
|
||
xmllang: 'xmlLang',
|
||
'xml:lang': 'xmlLang',
|
||
xmlns: 'xmlns',
|
||
'xml:space': 'xmlSpace',
|
||
xmlnsxlink: 'xmlnsXlink',
|
||
'xmlns:xlink': 'xmlnsXlink',
|
||
xmlspace: 'xmlSpace',
|
||
y1: 'y1',
|
||
y2: 'y2',
|
||
y: 'y',
|
||
ychannelselector: 'yChannelSelector',
|
||
z: 'z',
|
||
zoomandpan: 'zoomAndPan'
|
||
};
|
||
|
||
var ariaProperties = {
|
||
'aria-current': 0, // state
|
||
'aria-details': 0,
|
||
'aria-disabled': 0, // state
|
||
'aria-hidden': 0, // state
|
||
'aria-invalid': 0, // state
|
||
'aria-keyshortcuts': 0,
|
||
'aria-label': 0,
|
||
'aria-roledescription': 0,
|
||
// Widget Attributes
|
||
'aria-autocomplete': 0,
|
||
'aria-checked': 0,
|
||
'aria-expanded': 0,
|
||
'aria-haspopup': 0,
|
||
'aria-level': 0,
|
||
'aria-modal': 0,
|
||
'aria-multiline': 0,
|
||
'aria-multiselectable': 0,
|
||
'aria-orientation': 0,
|
||
'aria-placeholder': 0,
|
||
'aria-pressed': 0,
|
||
'aria-readonly': 0,
|
||
'aria-required': 0,
|
||
'aria-selected': 0,
|
||
'aria-sort': 0,
|
||
'aria-valuemax': 0,
|
||
'aria-valuemin': 0,
|
||
'aria-valuenow': 0,
|
||
'aria-valuetext': 0,
|
||
// Live Region Attributes
|
||
'aria-atomic': 0,
|
||
'aria-busy': 0,
|
||
'aria-live': 0,
|
||
'aria-relevant': 0,
|
||
// Drag-and-Drop Attributes
|
||
'aria-dropeffect': 0,
|
||
'aria-grabbed': 0,
|
||
// Relationship Attributes
|
||
'aria-activedescendant': 0,
|
||
'aria-colcount': 0,
|
||
'aria-colindex': 0,
|
||
'aria-colspan': 0,
|
||
'aria-controls': 0,
|
||
'aria-describedby': 0,
|
||
'aria-errormessage': 0,
|
||
'aria-flowto': 0,
|
||
'aria-labelledby': 0,
|
||
'aria-owns': 0,
|
||
'aria-posinset': 0,
|
||
'aria-rowcount': 0,
|
||
'aria-rowindex': 0,
|
||
'aria-rowspan': 0,
|
||
'aria-setsize': 0
|
||
};
|
||
|
||
var warnedProperties = {};
|
||
var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
|
||
var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
|
||
|
||
var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
|
||
|
||
function validateProperty(tagName, name) {
|
||
if (hasOwnProperty$2.call(warnedProperties, name) && warnedProperties[name]) {
|
||
return true;
|
||
}
|
||
|
||
if (rARIACamel.test(name)) {
|
||
var ariaName = 'aria-' + name.slice(4).toLowerCase();
|
||
var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null;
|
||
|
||
// If this is an aria-* attribute, but is not listed in the known DOM
|
||
// DOM properties, then it is an invalid aria-* attribute.
|
||
if (correctName == null) {
|
||
warning$1(false, 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
|
||
warnedProperties[name] = true;
|
||
return true;
|
||
}
|
||
// aria-* attributes should be lowercase; suggest the lowercase version.
|
||
if (name !== correctName) {
|
||
warning$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
|
||
warnedProperties[name] = true;
|
||
return true;
|
||
}
|
||
}
|
||
|
||
if (rARIA.test(name)) {
|
||
var lowerCasedName = name.toLowerCase();
|
||
var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null;
|
||
|
||
// If this is an aria-* attribute, but is not listed in the known DOM
|
||
// DOM properties, then it is an invalid aria-* attribute.
|
||
if (standardName == null) {
|
||
warnedProperties[name] = true;
|
||
return false;
|
||
}
|
||
// aria-* attributes should be lowercase; suggest the lowercase version.
|
||
if (name !== standardName) {
|
||
warning$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
|
||
warnedProperties[name] = true;
|
||
return true;
|
||
}
|
||
}
|
||
|
||
return true;
|
||
}
|
||
|
||
function warnInvalidARIAProps(type, props) {
|
||
var invalidProps = [];
|
||
|
||
for (var key in props) {
|
||
var isValid = validateProperty(type, key);
|
||
if (!isValid) {
|
||
invalidProps.push(key);
|
||
}
|
||
}
|
||
|
||
var unknownPropString = invalidProps.map(function (prop) {
|
||
return '`' + prop + '`';
|
||
}).join(', ');
|
||
|
||
if (invalidProps.length === 1) {
|
||
warning$1(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
|
||
} else if (invalidProps.length > 1) {
|
||
warning$1(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
|
||
}
|
||
}
|
||
|
||
function validateProperties(type, props) {
|
||
if (isCustomComponent(type, props)) {
|
||
return;
|
||
}
|
||
warnInvalidARIAProps(type, props);
|
||
}
|
||
|
||
var didWarnValueNull = false;
|
||
|
||
function validateProperties$1(type, props) {
|
||
if (type !== 'input' && type !== 'textarea' && type !== 'select') {
|
||
return;
|
||
}
|
||
|
||
if (props != null && props.value === null && !didWarnValueNull) {
|
||
didWarnValueNull = true;
|
||
if (type === 'select' && props.multiple) {
|
||
warning$1(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
|
||
} else {
|
||
warning$1(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
|
||
}
|
||
}
|
||
}
|
||
|
||
var validateProperty$1 = function () {};
|
||
|
||
{
|
||
var warnedProperties$1 = {};
|
||
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
||
var EVENT_NAME_REGEX = /^on./;
|
||
var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
|
||
var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
|
||
var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
|
||
|
||
validateProperty$1 = function (tagName, name, value, canUseEventSystem) {
|
||
if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
|
||
return true;
|
||
}
|
||
|
||
var lowerCasedName = name.toLowerCase();
|
||
if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
|
||
warning$1(false, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');
|
||
warnedProperties$1[name] = true;
|
||
return true;
|
||
}
|
||
|
||
// We can't rely on the event system being injected on the server.
|
||
if (canUseEventSystem) {
|
||
if (registrationNameModules.hasOwnProperty(name)) {
|
||
return true;
|
||
}
|
||
var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
|
||
if (registrationName != null) {
|
||
warning$1(false, 'Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
|
||
warnedProperties$1[name] = true;
|
||
return true;
|
||
}
|
||
if (EVENT_NAME_REGEX.test(name)) {
|
||
warning$1(false, 'Unknown event handler property `%s`. It will be ignored.', name);
|
||
warnedProperties$1[name] = true;
|
||
return true;
|
||
}
|
||
} else if (EVENT_NAME_REGEX.test(name)) {
|
||
// If no event plugins have been injected, we are in a server environment.
|
||
// So we can't tell if the event name is correct for sure, but we can filter
|
||
// out known bad ones like `onclick`. We can't suggest a specific replacement though.
|
||
if (INVALID_EVENT_NAME_REGEX.test(name)) {
|
||
warning$1(false, 'Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
|
||
}
|
||
warnedProperties$1[name] = true;
|
||
return true;
|
||
}
|
||
|
||
// Let the ARIA attribute hook validate ARIA attributes
|
||
if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
|
||
return true;
|
||
}
|
||
|
||
if (lowerCasedName === 'innerhtml') {
|
||
warning$1(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
|
||
warnedProperties$1[name] = true;
|
||
return true;
|
||
}
|
||
|
||
if (lowerCasedName === 'aria') {
|
||
warning$1(false, 'The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
|
||
warnedProperties$1[name] = true;
|
||
return true;
|
||
}
|
||
|
||
if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
|
||
warning$1(false, 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
|
||
warnedProperties$1[name] = true;
|
||
return true;
|
||
}
|
||
|
||
if (typeof value === 'number' && isNaN(value)) {
|
||
warning$1(false, 'Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
|
||
warnedProperties$1[name] = true;
|
||
return true;
|
||
}
|
||
|
||
var propertyInfo = getPropertyInfo(name);
|
||
var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED;
|
||
|
||
// Known attributes should match the casing specified in the property config.
|
||
if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
|
||
var standardName = possibleStandardNames[lowerCasedName];
|
||
if (standardName !== name) {
|
||
warning$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
|
||
warnedProperties$1[name] = true;
|
||
return true;
|
||
}
|
||
} else if (!isReserved && name !== lowerCasedName) {
|
||
// Unknown attributes should have lowercase casing since that's how they
|
||
// will be cased anyway with server rendering.
|
||
warning$1(false, 'React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);
|
||
warnedProperties$1[name] = true;
|
||
return true;
|
||
}
|
||
|
||
if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
|
||
if (value) {
|
||
warning$1(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
|
||
} else {
|
||
warning$1(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
|
||
}
|
||
warnedProperties$1[name] = true;
|
||
return true;
|
||
}
|
||
|
||
// Now that we've validated casing, do not validate
|
||
// data types for reserved props
|
||
if (isReserved) {
|
||
return true;
|
||
}
|
||
|
||
// Warn when a known attribute is a bad type
|
||
if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
|
||
warnedProperties$1[name] = true;
|
||
return false;
|
||
}
|
||
|
||
// Warn when passing the strings 'false' or 'true' into a boolean prop
|
||
if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
|
||
warning$1(false, 'Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);
|
||
warnedProperties$1[name] = true;
|
||
return true;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
}
|
||
|
||
var warnUnknownProperties = function (type, props, canUseEventSystem) {
|
||
var unknownProps = [];
|
||
for (var key in props) {
|
||
var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);
|
||
if (!isValid) {
|
||
unknownProps.push(key);
|
||
}
|
||
}
|
||
|
||
var unknownPropString = unknownProps.map(function (prop) {
|
||
return '`' + prop + '`';
|
||
}).join(', ');
|
||
if (unknownProps.length === 1) {
|
||
warning$1(false, 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
|
||
} else if (unknownProps.length > 1) {
|
||
warning$1(false, 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
|
||
}
|
||
};
|
||
|
||
function validateProperties$2(type, props, canUseEventSystem) {
|
||
if (isCustomComponent(type, props)) {
|
||
return;
|
||
}
|
||
warnUnknownProperties(type, props, canUseEventSystem);
|
||
}
|
||
|
||
// TODO: direct imports like some-package/src/* are bad. Fix me.
|
||
var didWarnInvalidHydration = false;
|
||
var didWarnShadyDOM = false;
|
||
|
||
var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';
|
||
var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';
|
||
var SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';
|
||
var AUTOFOCUS = 'autoFocus';
|
||
var CHILDREN = 'children';
|
||
var STYLE$1 = 'style';
|
||
var HTML = '__html';
|
||
|
||
var HTML_NAMESPACE = Namespaces.html;
|
||
|
||
|
||
var warnedUnknownTags = void 0;
|
||
var suppressHydrationWarning = void 0;
|
||
|
||
var validatePropertiesInDevelopment = void 0;
|
||
var warnForTextDifference = void 0;
|
||
var warnForPropDifference = void 0;
|
||
var warnForExtraAttributes = void 0;
|
||
var warnForInvalidEventListener = void 0;
|
||
var canDiffStyleForHydrationWarning = void 0;
|
||
|
||
var normalizeMarkupForTextOrAttribute = void 0;
|
||
var normalizeHTML = void 0;
|
||
|
||
{
|
||
warnedUnknownTags = {
|
||
// Chrome is the only major browser not shipping <time>. But as of July
|
||
// 2017 it intends to ship it due to widespread usage. We intentionally
|
||
// *don't* warn for <time> even if it's unrecognized by Chrome because
|
||
// it soon will be, and many apps have been using it anyway.
|
||
time: true,
|
||
// There are working polyfills for <dialog>. Let people use it.
|
||
dialog: true,
|
||
// Electron ships a custom <webview> tag to display external web content in
|
||
// an isolated frame and process.
|
||
// This tag is not present in non Electron environments such as JSDom which
|
||
// is often used for testing purposes.
|
||
// @see https://electronjs.org/docs/api/webview-tag
|
||
webview: true
|
||
};
|
||
|
||
validatePropertiesInDevelopment = function (type, props) {
|
||
validateProperties(type, props);
|
||
validateProperties$1(type, props);
|
||
validateProperties$2(type, props, /* canUseEventSystem */true);
|
||
};
|
||
|
||
// IE 11 parses & normalizes the style attribute as opposed to other
|
||
// browsers. It adds spaces and sorts the properties in some
|
||
// non-alphabetical order. Handling that would require sorting CSS
|
||
// properties in the client & server versions or applying
|
||
// `expectedStyle` to a temporary DOM node to read its `style` attribute
|
||
// normalized. Since it only affects IE, we're skipping style warnings
|
||
// in that browser completely in favor of doing all that work.
|
||
// See https://github.com/facebook/react/issues/11807
|
||
canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode;
|
||
|
||
// HTML parsing normalizes CR and CRLF to LF.
|
||
// It also can turn \u0000 into \uFFFD inside attributes.
|
||
// https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream
|
||
// If we have a mismatch, it might be caused by that.
|
||
// We will still patch up in this case but not fire the warning.
|
||
var NORMALIZE_NEWLINES_REGEX = /\r\n?/g;
|
||
var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
|
||
|
||
normalizeMarkupForTextOrAttribute = function (markup) {
|
||
var markupString = typeof markup === 'string' ? markup : '' + markup;
|
||
return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');
|
||
};
|
||
|
||
warnForTextDifference = function (serverText, clientText) {
|
||
if (didWarnInvalidHydration) {
|
||
return;
|
||
}
|
||
var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);
|
||
var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);
|
||
if (normalizedServerText === normalizedClientText) {
|
||
return;
|
||
}
|
||
didWarnInvalidHydration = true;
|
||
warningWithoutStack$1(false, 'Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
|
||
};
|
||
|
||
warnForPropDifference = function (propName, serverValue, clientValue) {
|
||
if (didWarnInvalidHydration) {
|
||
return;
|
||
}
|
||
var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);
|
||
var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);
|
||
if (normalizedServerValue === normalizedClientValue) {
|
||
return;
|
||
}
|
||
didWarnInvalidHydration = true;
|
||
warningWithoutStack$1(false, 'Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
|
||
};
|
||
|
||
warnForExtraAttributes = function (attributeNames) {
|
||
if (didWarnInvalidHydration) {
|
||
return;
|
||
}
|
||
didWarnInvalidHydration = true;
|
||
var names = [];
|
||
attributeNames.forEach(function (name) {
|
||
names.push(name);
|
||
});
|
||
warningWithoutStack$1(false, 'Extra attributes from the server: %s', names);
|
||
};
|
||
|
||
warnForInvalidEventListener = function (registrationName, listener) {
|
||
if (listener === false) {
|
||
warning$1(false, 'Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);
|
||
} else {
|
||
warning$1(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);
|
||
}
|
||
};
|
||
|
||
// Parse the HTML and read it back to normalize the HTML string so that it
|
||
// can be used for comparison.
|
||
normalizeHTML = function (parent, html) {
|
||
// We could have created a separate document here to avoid
|
||
// re-initializing custom elements if they exist. But this breaks
|
||
// how <noscript> is being handled. So we use the same document.
|
||
// See the discussion in https://github.com/facebook/react/pull/11157.
|
||
var testElement = parent.namespaceURI === HTML_NAMESPACE ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);
|
||
testElement.innerHTML = html;
|
||
return testElement.innerHTML;
|
||
};
|
||
}
|
||
|
||
function ensureListeningTo(rootContainerElement, registrationName) {
|
||
var isDocumentOrFragment = rootContainerElement.nodeType === DOCUMENT_NODE || rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE;
|
||
var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument;
|
||
listenTo(registrationName, doc);
|
||
}
|
||
|
||
function getOwnerDocumentFromRootContainer(rootContainerElement) {
|
||
return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
|
||
}
|
||
|
||
function noop() {}
|
||
|
||
function trapClickOnNonInteractiveElement(node) {
|
||
// Mobile Safari does not fire properly bubble click events on
|
||
// non-interactive elements, which means delegated click listeners do not
|
||
// fire. The workaround for this bug involves attaching an empty click
|
||
// listener on the target node.
|
||
// http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
|
||
// Just set it using the onclick property so that we don't have to manage any
|
||
// bookkeeping for it. Not sure if we need to clear it when the listener is
|
||
// removed.
|
||
// TODO: Only do this for the relevant Safaris maybe?
|
||
node.onclick = noop;
|
||
}
|
||
|
||
function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {
|
||
for (var propKey in nextProps) {
|
||
if (!nextProps.hasOwnProperty(propKey)) {
|
||
continue;
|
||
}
|
||
var nextProp = nextProps[propKey];
|
||
if (propKey === STYLE$1) {
|
||
{
|
||
if (nextProp) {
|
||
// Freeze the next style object so that we can assume it won't be
|
||
// mutated. We have already warned for this in the past.
|
||
Object.freeze(nextProp);
|
||
}
|
||
}
|
||
// Relies on `updateStylesByID` not mutating `styleUpdates`.
|
||
setValueForStyles(domElement, nextProp);
|
||
} else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
|
||
var nextHtml = nextProp ? nextProp[HTML] : undefined;
|
||
if (nextHtml != null) {
|
||
setInnerHTML(domElement, nextHtml);
|
||
}
|
||
} else if (propKey === CHILDREN) {
|
||
if (typeof nextProp === 'string') {
|
||
// Avoid setting initial textContent when the text is empty. In IE11 setting
|
||
// textContent on a <textarea> will cause the placeholder to not
|
||
// show within the <textarea> until it has been focused and blurred again.
|
||
// https://github.com/facebook/react/issues/6731#issuecomment-254874553
|
||
var canSetTextContent = tag !== 'textarea' || nextProp !== '';
|
||
if (canSetTextContent) {
|
||
setTextContent(domElement, nextProp);
|
||
}
|
||
} else if (typeof nextProp === 'number') {
|
||
setTextContent(domElement, '' + nextProp);
|
||
}
|
||
} else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {
|
||
// Noop
|
||
} else if (propKey === AUTOFOCUS) {
|
||
// We polyfill it separately on the client during commit.
|
||
// We could have excluded it in the property list instead of
|
||
// adding a special case here, but then it wouldn't be emitted
|
||
// on server rendering (but we *do* want to emit it in SSR).
|
||
} else if (registrationNameModules.hasOwnProperty(propKey)) {
|
||
if (nextProp != null) {
|
||
if ( true && typeof nextProp !== 'function') {
|
||
warnForInvalidEventListener(propKey, nextProp);
|
||
}
|
||
ensureListeningTo(rootContainerElement, propKey);
|
||
}
|
||
} else if (nextProp != null) {
|
||
setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);
|
||
}
|
||
}
|
||
}
|
||
|
||
function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
|
||
// TODO: Handle wasCustomComponentTag
|
||
for (var i = 0; i < updatePayload.length; i += 2) {
|
||
var propKey = updatePayload[i];
|
||
var propValue = updatePayload[i + 1];
|
||
if (propKey === STYLE$1) {
|
||
setValueForStyles(domElement, propValue);
|
||
} else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
|
||
setInnerHTML(domElement, propValue);
|
||
} else if (propKey === CHILDREN) {
|
||
setTextContent(domElement, propValue);
|
||
} else {
|
||
setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
|
||
}
|
||
}
|
||
}
|
||
|
||
function createElement(type, props, rootContainerElement, parentNamespace) {
|
||
var isCustomComponentTag = void 0;
|
||
|
||
// We create tags in the namespace of their parent container, except HTML
|
||
// tags get no namespace.
|
||
var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
|
||
var domElement = void 0;
|
||
var namespaceURI = parentNamespace;
|
||
if (namespaceURI === HTML_NAMESPACE) {
|
||
namespaceURI = getIntrinsicNamespace(type);
|
||
}
|
||
if (namespaceURI === HTML_NAMESPACE) {
|
||
{
|
||
isCustomComponentTag = isCustomComponent(type, props);
|
||
// Should this check be gated by parent namespace? Not sure we want to
|
||
// allow <SVG> or <mATH>.
|
||
!(isCustomComponentTag || type === type.toLowerCase()) ? warning$1(false, '<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type) : void 0;
|
||
}
|
||
|
||
if (type === 'script') {
|
||
// Create the script via .innerHTML so its "parser-inserted" flag is
|
||
// set to true and it does not execute
|
||
var div = ownerDocument.createElement('div');
|
||
div.innerHTML = '<script><' + '/script>'; // eslint-disable-line
|
||
// This is guaranteed to yield a script element.
|
||
var firstChild = div.firstChild;
|
||
domElement = div.removeChild(firstChild);
|
||
} else if (typeof props.is === 'string') {
|
||
// $FlowIssue `createElement` should be updated for Web Components
|
||
domElement = ownerDocument.createElement(type, { is: props.is });
|
||
} else {
|
||
// Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
|
||
// See discussion in https://github.com/facebook/react/pull/6896
|
||
// and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
|
||
domElement = ownerDocument.createElement(type);
|
||
// Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple`
|
||
// attribute on `select`s needs to be added before `option`s are inserted. This prevents
|
||
// a bug where the `select` does not scroll to the correct option because singular
|
||
// `select` elements automatically pick the first item.
|
||
// See https://github.com/facebook/react/issues/13222
|
||
if (type === 'select' && props.multiple) {
|
||
var node = domElement;
|
||
node.multiple = true;
|
||
}
|
||
}
|
||
} else {
|
||
domElement = ownerDocument.createElementNS(namespaceURI, type);
|
||
}
|
||
|
||
{
|
||
if (namespaceURI === HTML_NAMESPACE) {
|
||
if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {
|
||
warnedUnknownTags[type] = true;
|
||
warning$1(false, 'The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
|
||
}
|
||
}
|
||
}
|
||
|
||
return domElement;
|
||
}
|
||
|
||
function createTextNode(text, rootContainerElement) {
|
||
return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);
|
||
}
|
||
|
||
function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
|
||
var isCustomComponentTag = isCustomComponent(tag, rawProps);
|
||
{
|
||
validatePropertiesInDevelopment(tag, rawProps);
|
||
if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) {
|
||
warning$1(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
|
||
didWarnShadyDOM = true;
|
||
}
|
||
}
|
||
|
||
// TODO: Make sure that we check isMounted before firing any of these events.
|
||
var props = void 0;
|
||
switch (tag) {
|
||
case 'iframe':
|
||
case 'object':
|
||
trapBubbledEvent(TOP_LOAD, domElement);
|
||
props = rawProps;
|
||
break;
|
||
case 'video':
|
||
case 'audio':
|
||
// Create listener for each media event
|
||
for (var i = 0; i < mediaEventTypes.length; i++) {
|
||
trapBubbledEvent(mediaEventTypes[i], domElement);
|
||
}
|
||
props = rawProps;
|
||
break;
|
||
case 'source':
|
||
trapBubbledEvent(TOP_ERROR, domElement);
|
||
props = rawProps;
|
||
break;
|
||
case 'img':
|
||
case 'image':
|
||
case 'link':
|
||
trapBubbledEvent(TOP_ERROR, domElement);
|
||
trapBubbledEvent(TOP_LOAD, domElement);
|
||
props = rawProps;
|
||
break;
|
||
case 'form':
|
||
trapBubbledEvent(TOP_RESET, domElement);
|
||
trapBubbledEvent(TOP_SUBMIT, domElement);
|
||
props = rawProps;
|
||
break;
|
||
case 'details':
|
||
trapBubbledEvent(TOP_TOGGLE, domElement);
|
||
props = rawProps;
|
||
break;
|
||
case 'input':
|
||
initWrapperState(domElement, rawProps);
|
||
props = getHostProps(domElement, rawProps);
|
||
trapBubbledEvent(TOP_INVALID, domElement);
|
||
// For controlled components we always need to ensure we're listening
|
||
// to onChange. Even if there is no listener.
|
||
ensureListeningTo(rootContainerElement, 'onChange');
|
||
break;
|
||
case 'option':
|
||
validateProps(domElement, rawProps);
|
||
props = getHostProps$1(domElement, rawProps);
|
||
break;
|
||
case 'select':
|
||
initWrapperState$1(domElement, rawProps);
|
||
props = getHostProps$2(domElement, rawProps);
|
||
trapBubbledEvent(TOP_INVALID, domElement);
|
||
// For controlled components we always need to ensure we're listening
|
||
// to onChange. Even if there is no listener.
|
||
ensureListeningTo(rootContainerElement, 'onChange');
|
||
break;
|
||
case 'textarea':
|
||
initWrapperState$2(domElement, rawProps);
|
||
props = getHostProps$3(domElement, rawProps);
|
||
trapBubbledEvent(TOP_INVALID, domElement);
|
||
// For controlled components we always need to ensure we're listening
|
||
// to onChange. Even if there is no listener.
|
||
ensureListeningTo(rootContainerElement, 'onChange');
|
||
break;
|
||
default:
|
||
props = rawProps;
|
||
}
|
||
|
||
assertValidProps(tag, props);
|
||
|
||
setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);
|
||
|
||
switch (tag) {
|
||
case 'input':
|
||
// TODO: Make sure we check if this is still unmounted or do any clean
|
||
// up necessary since we never stop tracking anymore.
|
||
track(domElement);
|
||
postMountWrapper(domElement, rawProps, false);
|
||
break;
|
||
case 'textarea':
|
||
// TODO: Make sure we check if this is still unmounted or do any clean
|
||
// up necessary since we never stop tracking anymore.
|
||
track(domElement);
|
||
postMountWrapper$3(domElement, rawProps);
|
||
break;
|
||
case 'option':
|
||
postMountWrapper$1(domElement, rawProps);
|
||
break;
|
||
case 'select':
|
||
postMountWrapper$2(domElement, rawProps);
|
||
break;
|
||
default:
|
||
if (typeof props.onClick === 'function') {
|
||
// TODO: This cast may not be sound for SVG, MathML or custom elements.
|
||
trapClickOnNonInteractiveElement(domElement);
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
|
||
// Calculate the diff between the two objects.
|
||
function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
|
||
{
|
||
validatePropertiesInDevelopment(tag, nextRawProps);
|
||
}
|
||
|
||
var updatePayload = null;
|
||
|
||
var lastProps = void 0;
|
||
var nextProps = void 0;
|
||
switch (tag) {
|
||
case 'input':
|
||
lastProps = getHostProps(domElement, lastRawProps);
|
||
nextProps = getHostProps(domElement, nextRawProps);
|
||
updatePayload = [];
|
||
break;
|
||
case 'option':
|
||
lastProps = getHostProps$1(domElement, lastRawProps);
|
||
nextProps = getHostProps$1(domElement, nextRawProps);
|
||
updatePayload = [];
|
||
break;
|
||
case 'select':
|
||
lastProps = getHostProps$2(domElement, lastRawProps);
|
||
nextProps = getHostProps$2(domElement, nextRawProps);
|
||
updatePayload = [];
|
||
break;
|
||
case 'textarea':
|
||
lastProps = getHostProps$3(domElement, lastRawProps);
|
||
nextProps = getHostProps$3(domElement, nextRawProps);
|
||
updatePayload = [];
|
||
break;
|
||
default:
|
||
lastProps = lastRawProps;
|
||
nextProps = nextRawProps;
|
||
if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {
|
||
// TODO: This cast may not be sound for SVG, MathML or custom elements.
|
||
trapClickOnNonInteractiveElement(domElement);
|
||
}
|
||
break;
|
||
}
|
||
|
||
assertValidProps(tag, nextProps);
|
||
|
||
var propKey = void 0;
|
||
var styleName = void 0;
|
||
var styleUpdates = null;
|
||
for (propKey in lastProps) {
|
||
if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
|
||
continue;
|
||
}
|
||
if (propKey === STYLE$1) {
|
||
var lastStyle = lastProps[propKey];
|
||
for (styleName in lastStyle) {
|
||
if (lastStyle.hasOwnProperty(styleName)) {
|
||
if (!styleUpdates) {
|
||
styleUpdates = {};
|
||
}
|
||
styleUpdates[styleName] = '';
|
||
}
|
||
}
|
||
} else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {
|
||
// Noop. This is handled by the clear text mechanism.
|
||
} else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {
|
||
// Noop
|
||
} else if (propKey === AUTOFOCUS) {
|
||
// Noop. It doesn't work on updates anyway.
|
||
} else if (registrationNameModules.hasOwnProperty(propKey)) {
|
||
// This is a special case. If any listener updates we need to ensure
|
||
// that the "current" fiber pointer gets updated so we need a commit
|
||
// to update this element.
|
||
if (!updatePayload) {
|
||
updatePayload = [];
|
||
}
|
||
} else {
|
||
// For all other deleted properties we add it to the queue. We use
|
||
// the whitelist in the commit phase instead.
|
||
(updatePayload = updatePayload || []).push(propKey, null);
|
||
}
|
||
}
|
||
for (propKey in nextProps) {
|
||
var nextProp = nextProps[propKey];
|
||
var lastProp = lastProps != null ? lastProps[propKey] : undefined;
|
||
if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
|
||
continue;
|
||
}
|
||
if (propKey === STYLE$1) {
|
||
{
|
||
if (nextProp) {
|
||
// Freeze the next style object so that we can assume it won't be
|
||
// mutated. We have already warned for this in the past.
|
||
Object.freeze(nextProp);
|
||
}
|
||
}
|
||
if (lastProp) {
|
||
// Unset styles on `lastProp` but not on `nextProp`.
|
||
for (styleName in lastProp) {
|
||
if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
|
||
if (!styleUpdates) {
|
||
styleUpdates = {};
|
||
}
|
||
styleUpdates[styleName] = '';
|
||
}
|
||
}
|
||
// Update styles that changed since `lastProp`.
|
||
for (styleName in nextProp) {
|
||
if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
|
||
if (!styleUpdates) {
|
||
styleUpdates = {};
|
||
}
|
||
styleUpdates[styleName] = nextProp[styleName];
|
||
}
|
||
}
|
||
} else {
|
||
// Relies on `updateStylesByID` not mutating `styleUpdates`.
|
||
if (!styleUpdates) {
|
||
if (!updatePayload) {
|
||
updatePayload = [];
|
||
}
|
||
updatePayload.push(propKey, styleUpdates);
|
||
}
|
||
styleUpdates = nextProp;
|
||
}
|
||
} else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
|
||
var nextHtml = nextProp ? nextProp[HTML] : undefined;
|
||
var lastHtml = lastProp ? lastProp[HTML] : undefined;
|
||
if (nextHtml != null) {
|
||
if (lastHtml !== nextHtml) {
|
||
(updatePayload = updatePayload || []).push(propKey, '' + nextHtml);
|
||
}
|
||
} else {
|
||
// TODO: It might be too late to clear this if we have children
|
||
// inserted already.
|
||
}
|
||
} else if (propKey === CHILDREN) {
|
||
if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {
|
||
(updatePayload = updatePayload || []).push(propKey, '' + nextProp);
|
||
}
|
||
} else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {
|
||
// Noop
|
||
} else if (registrationNameModules.hasOwnProperty(propKey)) {
|
||
if (nextProp != null) {
|
||
// We eagerly listen to this even though we haven't committed yet.
|
||
if ( true && typeof nextProp !== 'function') {
|
||
warnForInvalidEventListener(propKey, nextProp);
|
||
}
|
||
ensureListeningTo(rootContainerElement, propKey);
|
||
}
|
||
if (!updatePayload && lastProp !== nextProp) {
|
||
// This is a special case. If any listener updates we need to ensure
|
||
// that the "current" props pointer gets updated so we need a commit
|
||
// to update this element.
|
||
updatePayload = [];
|
||
}
|
||
} else {
|
||
// For any other property we always add it to the queue and then we
|
||
// filter it out using the whitelist during the commit.
|
||
(updatePayload = updatePayload || []).push(propKey, nextProp);
|
||
}
|
||
}
|
||
if (styleUpdates) {
|
||
{
|
||
validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);
|
||
}
|
||
(updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);
|
||
}
|
||
return updatePayload;
|
||
}
|
||
|
||
// Apply the diff.
|
||
function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
|
||
// Update checked *before* name.
|
||
// In the middle of an update, it is possible to have multiple checked.
|
||
// When a checked radio tries to change name, browser makes another radio's checked false.
|
||
if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
|
||
updateChecked(domElement, nextRawProps);
|
||
}
|
||
|
||
var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
|
||
var isCustomComponentTag = isCustomComponent(tag, nextRawProps);
|
||
// Apply the diff.
|
||
updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag);
|
||
|
||
// TODO: Ensure that an update gets scheduled if any of the special props
|
||
// changed.
|
||
switch (tag) {
|
||
case 'input':
|
||
// Update the wrapper around inputs *after* updating props. This has to
|
||
// happen after `updateDOMProperties`. Otherwise HTML5 input validations
|
||
// raise warnings and prevent the new value from being assigned.
|
||
updateWrapper(domElement, nextRawProps);
|
||
break;
|
||
case 'textarea':
|
||
updateWrapper$1(domElement, nextRawProps);
|
||
break;
|
||
case 'select':
|
||
// <select> value update needs to occur after <option> children
|
||
// reconciliation
|
||
postUpdateWrapper(domElement, nextRawProps);
|
||
break;
|
||
}
|
||
}
|
||
|
||
function getPossibleStandardName(propName) {
|
||
{
|
||
var lowerCasedName = propName.toLowerCase();
|
||
if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {
|
||
return null;
|
||
}
|
||
return possibleStandardNames[lowerCasedName] || null;
|
||
}
|
||
return null;
|
||
}
|
||
|
||
function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
|
||
var isCustomComponentTag = void 0;
|
||
var extraAttributeNames = void 0;
|
||
|
||
{
|
||
suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING$1] === true;
|
||
isCustomComponentTag = isCustomComponent(tag, rawProps);
|
||
validatePropertiesInDevelopment(tag, rawProps);
|
||
if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) {
|
||
warning$1(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
|
||
didWarnShadyDOM = true;
|
||
}
|
||
}
|
||
|
||
// TODO: Make sure that we check isMounted before firing any of these events.
|
||
switch (tag) {
|
||
case 'iframe':
|
||
case 'object':
|
||
trapBubbledEvent(TOP_LOAD, domElement);
|
||
break;
|
||
case 'video':
|
||
case 'audio':
|
||
// Create listener for each media event
|
||
for (var i = 0; i < mediaEventTypes.length; i++) {
|
||
trapBubbledEvent(mediaEventTypes[i], domElement);
|
||
}
|
||
break;
|
||
case 'source':
|
||
trapBubbledEvent(TOP_ERROR, domElement);
|
||
break;
|
||
case 'img':
|
||
case 'image':
|
||
case 'link':
|
||
trapBubbledEvent(TOP_ERROR, domElement);
|
||
trapBubbledEvent(TOP_LOAD, domElement);
|
||
break;
|
||
case 'form':
|
||
trapBubbledEvent(TOP_RESET, domElement);
|
||
trapBubbledEvent(TOP_SUBMIT, domElement);
|
||
break;
|
||
case 'details':
|
||
trapBubbledEvent(TOP_TOGGLE, domElement);
|
||
break;
|
||
case 'input':
|
||
initWrapperState(domElement, rawProps);
|
||
trapBubbledEvent(TOP_INVALID, domElement);
|
||
// For controlled components we always need to ensure we're listening
|
||
// to onChange. Even if there is no listener.
|
||
ensureListeningTo(rootContainerElement, 'onChange');
|
||
break;
|
||
case 'option':
|
||
validateProps(domElement, rawProps);
|
||
break;
|
||
case 'select':
|
||
initWrapperState$1(domElement, rawProps);
|
||
trapBubbledEvent(TOP_INVALID, domElement);
|
||
// For controlled components we always need to ensure we're listening
|
||
// to onChange. Even if there is no listener.
|
||
ensureListeningTo(rootContainerElement, 'onChange');
|
||
break;
|
||
case 'textarea':
|
||
initWrapperState$2(domElement, rawProps);
|
||
trapBubbledEvent(TOP_INVALID, domElement);
|
||
// For controlled components we always need to ensure we're listening
|
||
// to onChange. Even if there is no listener.
|
||
ensureListeningTo(rootContainerElement, 'onChange');
|
||
break;
|
||
}
|
||
|
||
assertValidProps(tag, rawProps);
|
||
|
||
{
|
||
extraAttributeNames = new Set();
|
||
var attributes = domElement.attributes;
|
||
for (var _i = 0; _i < attributes.length; _i++) {
|
||
var name = attributes[_i].name.toLowerCase();
|
||
switch (name) {
|
||
// Built-in SSR attribute is whitelisted
|
||
case 'data-reactroot':
|
||
break;
|
||
// Controlled attributes are not validated
|
||
// TODO: Only ignore them on controlled tags.
|
||
case 'value':
|
||
break;
|
||
case 'checked':
|
||
break;
|
||
case 'selected':
|
||
break;
|
||
default:
|
||
// Intentionally use the original name.
|
||
// See discussion in https://github.com/facebook/react/pull/10676.
|
||
extraAttributeNames.add(attributes[_i].name);
|
||
}
|
||
}
|
||
}
|
||
|
||
var updatePayload = null;
|
||
for (var propKey in rawProps) {
|
||
if (!rawProps.hasOwnProperty(propKey)) {
|
||
continue;
|
||
}
|
||
var nextProp = rawProps[propKey];
|
||
if (propKey === CHILDREN) {
|
||
// For text content children we compare against textContent. This
|
||
// might match additional HTML that is hidden when we read it using
|
||
// textContent. E.g. "foo" will match "f<span>oo</span>" but that still
|
||
// satisfies our requirement. Our requirement is not to produce perfect
|
||
// HTML and attributes. Ideally we should preserve structure but it's
|
||
// ok not to if the visible content is still enough to indicate what
|
||
// even listeners these nodes might be wired up to.
|
||
// TODO: Warn if there is more than a single textNode as a child.
|
||
// TODO: Should we use domElement.firstChild.nodeValue to compare?
|
||
if (typeof nextProp === 'string') {
|
||
if (domElement.textContent !== nextProp) {
|
||
if ( true && !suppressHydrationWarning) {
|
||
warnForTextDifference(domElement.textContent, nextProp);
|
||
}
|
||
updatePayload = [CHILDREN, nextProp];
|
||
}
|
||
} else if (typeof nextProp === 'number') {
|
||
if (domElement.textContent !== '' + nextProp) {
|
||
if ( true && !suppressHydrationWarning) {
|
||
warnForTextDifference(domElement.textContent, nextProp);
|
||
}
|
||
updatePayload = [CHILDREN, '' + nextProp];
|
||
}
|
||
}
|
||
} else if (registrationNameModules.hasOwnProperty(propKey)) {
|
||
if (nextProp != null) {
|
||
if ( true && typeof nextProp !== 'function') {
|
||
warnForInvalidEventListener(propKey, nextProp);
|
||
}
|
||
ensureListeningTo(rootContainerElement, propKey);
|
||
}
|
||
} else if ( true &&
|
||
// Convince Flow we've calculated it (it's DEV-only in this method.)
|
||
typeof isCustomComponentTag === 'boolean') {
|
||
// Validate that the properties correspond to their expected values.
|
||
var serverValue = void 0;
|
||
var propertyInfo = getPropertyInfo(propKey);
|
||
if (suppressHydrationWarning) {
|
||
// Don't bother comparing. We're ignoring all these warnings.
|
||
} else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1 ||
|
||
// Controlled attributes are not validated
|
||
// TODO: Only ignore them on controlled tags.
|
||
propKey === 'value' || propKey === 'checked' || propKey === 'selected') {
|
||
// Noop
|
||
} else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
|
||
var serverHTML = domElement.innerHTML;
|
||
var nextHtml = nextProp ? nextProp[HTML] : undefined;
|
||
var expectedHTML = normalizeHTML(domElement, nextHtml != null ? nextHtml : '');
|
||
if (expectedHTML !== serverHTML) {
|
||
warnForPropDifference(propKey, serverHTML, expectedHTML);
|
||
}
|
||
} else if (propKey === STYLE$1) {
|
||
// $FlowFixMe - Should be inferred as not undefined.
|
||
extraAttributeNames.delete(propKey);
|
||
|
||
if (canDiffStyleForHydrationWarning) {
|
||
var expectedStyle = createDangerousStringForStyles(nextProp);
|
||
serverValue = domElement.getAttribute('style');
|
||
if (expectedStyle !== serverValue) {
|
||
warnForPropDifference(propKey, serverValue, expectedStyle);
|
||
}
|
||
}
|
||
} else if (isCustomComponentTag) {
|
||
// $FlowFixMe - Should be inferred as not undefined.
|
||
extraAttributeNames.delete(propKey.toLowerCase());
|
||
serverValue = getValueForAttribute(domElement, propKey, nextProp);
|
||
|
||
if (nextProp !== serverValue) {
|
||
warnForPropDifference(propKey, serverValue, nextProp);
|
||
}
|
||
} else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {
|
||
var isMismatchDueToBadCasing = false;
|
||
if (propertyInfo !== null) {
|
||
// $FlowFixMe - Should be inferred as not undefined.
|
||
extraAttributeNames.delete(propertyInfo.attributeName);
|
||
serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);
|
||
} else {
|
||
var ownNamespace = parentNamespace;
|
||
if (ownNamespace === HTML_NAMESPACE) {
|
||
ownNamespace = getIntrinsicNamespace(tag);
|
||
}
|
||
if (ownNamespace === HTML_NAMESPACE) {
|
||
// $FlowFixMe - Should be inferred as not undefined.
|
||
extraAttributeNames.delete(propKey.toLowerCase());
|
||
} else {
|
||
var standardName = getPossibleStandardName(propKey);
|
||
if (standardName !== null && standardName !== propKey) {
|
||
// If an SVG prop is supplied with bad casing, it will
|
||
// be successfully parsed from HTML, but will produce a mismatch
|
||
// (and would be incorrectly rendered on the client).
|
||
// However, we already warn about bad casing elsewhere.
|
||
// So we'll skip the misleading extra mismatch warning in this case.
|
||
isMismatchDueToBadCasing = true;
|
||
// $FlowFixMe - Should be inferred as not undefined.
|
||
extraAttributeNames.delete(standardName);
|
||
}
|
||
// $FlowFixMe - Should be inferred as not undefined.
|
||
extraAttributeNames.delete(propKey);
|
||
}
|
||
serverValue = getValueForAttribute(domElement, propKey, nextProp);
|
||
}
|
||
|
||
if (nextProp !== serverValue && !isMismatchDueToBadCasing) {
|
||
warnForPropDifference(propKey, serverValue, nextProp);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
{
|
||
// $FlowFixMe - Should be inferred as not undefined.
|
||
if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {
|
||
// $FlowFixMe - Should be inferred as not undefined.
|
||
warnForExtraAttributes(extraAttributeNames);
|
||
}
|
||
}
|
||
|
||
switch (tag) {
|
||
case 'input':
|
||
// TODO: Make sure we check if this is still unmounted or do any clean
|
||
// up necessary since we never stop tracking anymore.
|
||
track(domElement);
|
||
postMountWrapper(domElement, rawProps, true);
|
||
break;
|
||
case 'textarea':
|
||
// TODO: Make sure we check if this is still unmounted or do any clean
|
||
// up necessary since we never stop tracking anymore.
|
||
track(domElement);
|
||
postMountWrapper$3(domElement, rawProps);
|
||
break;
|
||
case 'select':
|
||
case 'option':
|
||
// For input and textarea we current always set the value property at
|
||
// post mount to force it to diverge from attributes. However, for
|
||
// option and select we don't quite do the same thing and select
|
||
// is not resilient to the DOM state changing so we don't do that here.
|
||
// TODO: Consider not doing this for input and textarea.
|
||
break;
|
||
default:
|
||
if (typeof rawProps.onClick === 'function') {
|
||
// TODO: This cast may not be sound for SVG, MathML or custom elements.
|
||
trapClickOnNonInteractiveElement(domElement);
|
||
}
|
||
break;
|
||
}
|
||
|
||
return updatePayload;
|
||
}
|
||
|
||
function diffHydratedText(textNode, text) {
|
||
var isDifferent = textNode.nodeValue !== text;
|
||
return isDifferent;
|
||
}
|
||
|
||
function warnForUnmatchedText(textNode, text) {
|
||
{
|
||
warnForTextDifference(textNode.nodeValue, text);
|
||
}
|
||
}
|
||
|
||
function warnForDeletedHydratableElement(parentNode, child) {
|
||
{
|
||
if (didWarnInvalidHydration) {
|
||
return;
|
||
}
|
||
didWarnInvalidHydration = true;
|
||
warningWithoutStack$1(false, 'Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
|
||
}
|
||
}
|
||
|
||
function warnForDeletedHydratableText(parentNode, child) {
|
||
{
|
||
if (didWarnInvalidHydration) {
|
||
return;
|
||
}
|
||
didWarnInvalidHydration = true;
|
||
warningWithoutStack$1(false, 'Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
|
||
}
|
||
}
|
||
|
||
function warnForInsertedHydratedElement(parentNode, tag, props) {
|
||
{
|
||
if (didWarnInvalidHydration) {
|
||
return;
|
||
}
|
||
didWarnInvalidHydration = true;
|
||
warningWithoutStack$1(false, 'Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
|
||
}
|
||
}
|
||
|
||
function warnForInsertedHydratedText(parentNode, text) {
|
||
{
|
||
if (text === '') {
|
||
// We expect to insert empty text nodes since they're not represented in
|
||
// the HTML.
|
||
// TODO: Remove this special case if we can just avoid inserting empty
|
||
// text nodes.
|
||
return;
|
||
}
|
||
if (didWarnInvalidHydration) {
|
||
return;
|
||
}
|
||
didWarnInvalidHydration = true;
|
||
warningWithoutStack$1(false, 'Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
|
||
}
|
||
}
|
||
|
||
function restoreControlledState$1(domElement, tag, props) {
|
||
switch (tag) {
|
||
case 'input':
|
||
restoreControlledState(domElement, props);
|
||
return;
|
||
case 'textarea':
|
||
restoreControlledState$3(domElement, props);
|
||
return;
|
||
case 'select':
|
||
restoreControlledState$2(domElement, props);
|
||
return;
|
||
}
|
||
}
|
||
|
||
// TODO: direct imports like some-package/src/* are bad. Fix me.
|
||
var validateDOMNesting = function () {};
|
||
var updatedAncestorInfo = function () {};
|
||
|
||
{
|
||
// This validation code was written based on the HTML5 parsing spec:
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
|
||
//
|
||
// Note: this does not catch all invalid nesting, nor does it try to (as it's
|
||
// not clear what practical benefit doing so provides); instead, we warn only
|
||
// for cases where the parser will give a parse tree differing from what React
|
||
// intended. For example, <b><div></div></b> is invalid but we don't warn
|
||
// because it still parses correctly; we do warn for other cases like nested
|
||
// <p> tags where the beginning of the second element implicitly closes the
|
||
// first, causing a confusing mess.
|
||
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#special
|
||
var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp'];
|
||
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
|
||
var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',
|
||
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
|
||
// TODO: Distinguish by namespace here -- for <title>, including it here
|
||
// errs on the side of fewer warnings
|
||
'foreignObject', 'desc', 'title'];
|
||
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
|
||
var buttonScopeTags = inScopeTags.concat(['button']);
|
||
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
|
||
var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
|
||
|
||
var emptyAncestorInfo = {
|
||
current: null,
|
||
|
||
formTag: null,
|
||
aTagInScope: null,
|
||
buttonTagInScope: null,
|
||
nobrTagInScope: null,
|
||
pTagInButtonScope: null,
|
||
|
||
listItemTagAutoclosing: null,
|
||
dlItemTagAutoclosing: null
|
||
};
|
||
|
||
updatedAncestorInfo = function (oldInfo, tag) {
|
||
var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
|
||
var info = { tag: tag };
|
||
|
||
if (inScopeTags.indexOf(tag) !== -1) {
|
||
ancestorInfo.aTagInScope = null;
|
||
ancestorInfo.buttonTagInScope = null;
|
||
ancestorInfo.nobrTagInScope = null;
|
||
}
|
||
if (buttonScopeTags.indexOf(tag) !== -1) {
|
||
ancestorInfo.pTagInButtonScope = null;
|
||
}
|
||
|
||
// See rules for 'li', 'dd', 'dt' start tags in
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
|
||
if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
|
||
ancestorInfo.listItemTagAutoclosing = null;
|
||
ancestorInfo.dlItemTagAutoclosing = null;
|
||
}
|
||
|
||
ancestorInfo.current = info;
|
||
|
||
if (tag === 'form') {
|
||
ancestorInfo.formTag = info;
|
||
}
|
||
if (tag === 'a') {
|
||
ancestorInfo.aTagInScope = info;
|
||
}
|
||
if (tag === 'button') {
|
||
ancestorInfo.buttonTagInScope = info;
|
||
}
|
||
if (tag === 'nobr') {
|
||
ancestorInfo.nobrTagInScope = info;
|
||
}
|
||
if (tag === 'p') {
|
||
ancestorInfo.pTagInButtonScope = info;
|
||
}
|
||
if (tag === 'li') {
|
||
ancestorInfo.listItemTagAutoclosing = info;
|
||
}
|
||
if (tag === 'dd' || tag === 'dt') {
|
||
ancestorInfo.dlItemTagAutoclosing = info;
|
||
}
|
||
|
||
return ancestorInfo;
|
||
};
|
||
|
||
/**
|
||
* Returns whether
|
||
*/
|
||
var isTagValidWithParent = function (tag, parentTag) {
|
||
// First, let's check if we're in an unusual parsing mode...
|
||
switch (parentTag) {
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
|
||
case 'select':
|
||
return tag === 'option' || tag === 'optgroup' || tag === '#text';
|
||
case 'optgroup':
|
||
return tag === 'option' || tag === '#text';
|
||
// Strictly speaking, seeing an <option> doesn't mean we're in a <select>
|
||
// but
|
||
case 'option':
|
||
return tag === '#text';
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
|
||
// No special behavior since these rules fall back to "in body" mode for
|
||
// all except special table nodes which cause bad parsing behavior anyway.
|
||
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
|
||
case 'tr':
|
||
return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
|
||
case 'tbody':
|
||
case 'thead':
|
||
case 'tfoot':
|
||
return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
|
||
case 'colgroup':
|
||
return tag === 'col' || tag === 'template';
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
|
||
case 'table':
|
||
return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
|
||
case 'head':
|
||
return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
|
||
// https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
|
||
case 'html':
|
||
return tag === 'head' || tag === 'body';
|
||
case '#document':
|
||
return tag === 'html';
|
||
}
|
||
|
||
// Probably in the "in body" parsing mode, so we outlaw only tag combos
|
||
// where the parsing rules cause implicit opens or closes to be added.
|
||
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
|
||
switch (tag) {
|
||
case 'h1':
|
||
case 'h2':
|
||
case 'h3':
|
||
case 'h4':
|
||
case 'h5':
|
||
case 'h6':
|
||
return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
|
||
|
||
case 'rp':
|
||
case 'rt':
|
||
return impliedEndTags.indexOf(parentTag) === -1;
|
||
|
||
case 'body':
|
||
case 'caption':
|
||
case 'col':
|
||
case 'colgroup':
|
||
case 'frame':
|
||
case 'head':
|
||
case 'html':
|
||
case 'tbody':
|
||
case 'td':
|
||
case 'tfoot':
|
||
case 'th':
|
||
case 'thead':
|
||
case 'tr':
|
||
// These tags are only valid with a few parents that have special child
|
||
// parsing rules -- if we're down here, then none of those matched and
|
||
// so we allow it only if we don't know what the parent is, as all other
|
||
// cases are invalid.
|
||
return parentTag == null;
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
/**
|
||
* Returns whether
|
||
*/
|
||
var findInvalidAncestorForTag = function (tag, ancestorInfo) {
|
||
switch (tag) {
|
||
case 'address':
|
||
case 'article':
|
||
case 'aside':
|
||
case 'blockquote':
|
||
case 'center':
|
||
case 'details':
|
||
case 'dialog':
|
||
case 'dir':
|
||
case 'div':
|
||
case 'dl':
|
||
case 'fieldset':
|
||
case 'figcaption':
|
||
case 'figure':
|
||
case 'footer':
|
||
case 'header':
|
||
case 'hgroup':
|
||
case 'main':
|
||
case 'menu':
|
||
case 'nav':
|
||
case 'ol':
|
||
case 'p':
|
||
case 'section':
|
||
case 'summary':
|
||
case 'ul':
|
||
case 'pre':
|
||
case 'listing':
|
||
case 'table':
|
||
case 'hr':
|
||
case 'xmp':
|
||
case 'h1':
|
||
case 'h2':
|
||
case 'h3':
|
||
case 'h4':
|
||
case 'h5':
|
||
case 'h6':
|
||
return ancestorInfo.pTagInButtonScope;
|
||
|
||
case 'form':
|
||
return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
|
||
|
||
case 'li':
|
||
return ancestorInfo.listItemTagAutoclosing;
|
||
|
||
case 'dd':
|
||
case 'dt':
|
||
return ancestorInfo.dlItemTagAutoclosing;
|
||
|
||
case 'button':
|
||
return ancestorInfo.buttonTagInScope;
|
||
|
||
case 'a':
|
||
// Spec says something about storing a list of markers, but it sounds
|
||
// equivalent to this check.
|
||
return ancestorInfo.aTagInScope;
|
||
|
||
case 'nobr':
|
||
return ancestorInfo.nobrTagInScope;
|
||
}
|
||
|
||
return null;
|
||
};
|
||
|
||
var didWarn = {};
|
||
|
||
validateDOMNesting = function (childTag, childText, ancestorInfo) {
|
||
ancestorInfo = ancestorInfo || emptyAncestorInfo;
|
||
var parentInfo = ancestorInfo.current;
|
||
var parentTag = parentInfo && parentInfo.tag;
|
||
|
||
if (childText != null) {
|
||
!(childTag == null) ? warningWithoutStack$1(false, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
|
||
childTag = '#text';
|
||
}
|
||
|
||
var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
|
||
var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
|
||
var invalidParentOrAncestor = invalidParent || invalidAncestor;
|
||
if (!invalidParentOrAncestor) {
|
||
return;
|
||
}
|
||
|
||
var ancestorTag = invalidParentOrAncestor.tag;
|
||
var addendum = getCurrentFiberStackInDev();
|
||
|
||
var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + addendum;
|
||
if (didWarn[warnKey]) {
|
||
return;
|
||
}
|
||
didWarn[warnKey] = true;
|
||
|
||
var tagDisplayName = childTag;
|
||
var whitespaceInfo = '';
|
||
if (childTag === '#text') {
|
||
if (/\S/.test(childText)) {
|
||
tagDisplayName = 'Text nodes';
|
||
} else {
|
||
tagDisplayName = 'Whitespace text nodes';
|
||
whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
|
||
}
|
||
} else {
|
||
tagDisplayName = '<' + childTag + '>';
|
||
}
|
||
|
||
if (invalidParent) {
|
||
var info = '';
|
||
if (ancestorTag === 'table' && childTag === 'tr') {
|
||
info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
|
||
}
|
||
warningWithoutStack$1(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info, addendum);
|
||
} else {
|
||
warningWithoutStack$1(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.%s', tagDisplayName, ancestorTag, addendum);
|
||
}
|
||
};
|
||
}
|
||
|
||
// Renderers that don't support persistence
|
||
// can re-export everything from this module.
|
||
|
||
function shim() {
|
||
invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');
|
||
}
|
||
|
||
// Persistence (when unsupported)
|
||
var supportsPersistence = false;
|
||
var cloneInstance = shim;
|
||
var createContainerChildSet = shim;
|
||
var appendChildToContainerChildSet = shim;
|
||
var finalizeContainerChildren = shim;
|
||
var replaceContainerChildren = shim;
|
||
var cloneHiddenInstance = shim;
|
||
var cloneUnhiddenInstance = shim;
|
||
var createHiddenTextInstance = shim;
|
||
|
||
var SUPPRESS_HYDRATION_WARNING = void 0;
|
||
{
|
||
SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';
|
||
}
|
||
|
||
var STYLE = 'style';
|
||
|
||
var eventsEnabled = null;
|
||
var selectionInformation = null;
|
||
|
||
function shouldAutoFocusHostComponent(type, props) {
|
||
switch (type) {
|
||
case 'button':
|
||
case 'input':
|
||
case 'select':
|
||
case 'textarea':
|
||
return !!props.autoFocus;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
function getRootHostContext(rootContainerInstance) {
|
||
var type = void 0;
|
||
var namespace = void 0;
|
||
var nodeType = rootContainerInstance.nodeType;
|
||
switch (nodeType) {
|
||
case DOCUMENT_NODE:
|
||
case DOCUMENT_FRAGMENT_NODE:
|
||
{
|
||
type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';
|
||
var root = rootContainerInstance.documentElement;
|
||
namespace = root ? root.namespaceURI : getChildNamespace(null, '');
|
||
break;
|
||
}
|
||
default:
|
||
{
|
||
var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;
|
||
var ownNamespace = container.namespaceURI || null;
|
||
type = container.tagName;
|
||
namespace = getChildNamespace(ownNamespace, type);
|
||
break;
|
||
}
|
||
}
|
||
{
|
||
var validatedTag = type.toLowerCase();
|
||
var _ancestorInfo = updatedAncestorInfo(null, validatedTag);
|
||
return { namespace: namespace, ancestorInfo: _ancestorInfo };
|
||
}
|
||
return namespace;
|
||
}
|
||
|
||
function getChildHostContext(parentHostContext, type, rootContainerInstance) {
|
||
{
|
||
var parentHostContextDev = parentHostContext;
|
||
var _namespace = getChildNamespace(parentHostContextDev.namespace, type);
|
||
var _ancestorInfo2 = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);
|
||
return { namespace: _namespace, ancestorInfo: _ancestorInfo2 };
|
||
}
|
||
var parentNamespace = parentHostContext;
|
||
return getChildNamespace(parentNamespace, type);
|
||
}
|
||
|
||
function getPublicInstance(instance) {
|
||
return instance;
|
||
}
|
||
|
||
function prepareForCommit(containerInfo) {
|
||
eventsEnabled = isEnabled();
|
||
selectionInformation = getSelectionInformation();
|
||
setEnabled(false);
|
||
}
|
||
|
||
function resetAfterCommit(containerInfo) {
|
||
restoreSelection(selectionInformation);
|
||
selectionInformation = null;
|
||
setEnabled(eventsEnabled);
|
||
eventsEnabled = null;
|
||
}
|
||
|
||
function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
|
||
var parentNamespace = void 0;
|
||
{
|
||
// TODO: take namespace into account when validating.
|
||
var hostContextDev = hostContext;
|
||
validateDOMNesting(type, null, hostContextDev.ancestorInfo);
|
||
if (typeof props.children === 'string' || typeof props.children === 'number') {
|
||
var string = '' + props.children;
|
||
var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
|
||
validateDOMNesting(null, string, ownAncestorInfo);
|
||
}
|
||
parentNamespace = hostContextDev.namespace;
|
||
}
|
||
var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
|
||
precacheFiberNode(internalInstanceHandle, domElement);
|
||
updateFiberProps(domElement, props);
|
||
return domElement;
|
||
}
|
||
|
||
function appendInitialChild(parentInstance, child) {
|
||
parentInstance.appendChild(child);
|
||
}
|
||
|
||
function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {
|
||
setInitialProperties(domElement, type, props, rootContainerInstance);
|
||
return shouldAutoFocusHostComponent(type, props);
|
||
}
|
||
|
||
function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {
|
||
{
|
||
var hostContextDev = hostContext;
|
||
if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {
|
||
var string = '' + newProps.children;
|
||
var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
|
||
validateDOMNesting(null, string, ownAncestorInfo);
|
||
}
|
||
}
|
||
return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance);
|
||
}
|
||
|
||
function shouldSetTextContent(type, props) {
|
||
return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
|
||
}
|
||
|
||
function shouldDeprioritizeSubtree(type, props) {
|
||
return !!props.hidden;
|
||
}
|
||
|
||
function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
|
||
{
|
||
var hostContextDev = hostContext;
|
||
validateDOMNesting(null, text, hostContextDev.ancestorInfo);
|
||
}
|
||
var textNode = createTextNode(text, rootContainerInstance);
|
||
precacheFiberNode(internalInstanceHandle, textNode);
|
||
return textNode;
|
||
}
|
||
|
||
var isPrimaryRenderer = true;
|
||
// This initialization code may run even on server environments
|
||
// if a component just imports ReactDOM (e.g. for findDOMNode).
|
||
// Some environments might not have setTimeout or clearTimeout.
|
||
var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;
|
||
var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;
|
||
var noTimeout = -1;
|
||
|
||
// -------------------
|
||
// Mutation
|
||
// -------------------
|
||
|
||
var supportsMutation = true;
|
||
|
||
function commitMount(domElement, type, newProps, internalInstanceHandle) {
|
||
// Despite the naming that might imply otherwise, this method only
|
||
// fires if there is an `Update` effect scheduled during mounting.
|
||
// This happens if `finalizeInitialChildren` returns `true` (which it
|
||
// does to implement the `autoFocus` attribute on the client). But
|
||
// there are also other cases when this might happen (such as patching
|
||
// up text content during hydration mismatch). So we'll check this again.
|
||
if (shouldAutoFocusHostComponent(type, newProps)) {
|
||
domElement.focus();
|
||
}
|
||
}
|
||
|
||
function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
|
||
// Update the props handle so that we know which props are the ones with
|
||
// with current event handlers.
|
||
updateFiberProps(domElement, newProps);
|
||
// Apply the diff to the DOM node.
|
||
updateProperties(domElement, updatePayload, type, oldProps, newProps);
|
||
}
|
||
|
||
function resetTextContent(domElement) {
|
||
setTextContent(domElement, '');
|
||
}
|
||
|
||
function commitTextUpdate(textInstance, oldText, newText) {
|
||
textInstance.nodeValue = newText;
|
||
}
|
||
|
||
function appendChild(parentInstance, child) {
|
||
parentInstance.appendChild(child);
|
||
}
|
||
|
||
function appendChildToContainer(container, child) {
|
||
var parentNode = void 0;
|
||
if (container.nodeType === COMMENT_NODE) {
|
||
parentNode = container.parentNode;
|
||
parentNode.insertBefore(child, container);
|
||
} else {
|
||
parentNode = container;
|
||
parentNode.appendChild(child);
|
||
}
|
||
// This container might be used for a portal.
|
||
// If something inside a portal is clicked, that click should bubble
|
||
// through the React tree. However, on Mobile Safari the click would
|
||
// never bubble through the *DOM* tree unless an ancestor with onclick
|
||
// event exists. So we wouldn't see it and dispatch it.
|
||
// This is why we ensure that non React root containers have inline onclick
|
||
// defined.
|
||
// https://github.com/facebook/react/issues/11918
|
||
var reactRootContainer = container._reactRootContainer;
|
||
if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {
|
||
// TODO: This cast may not be sound for SVG, MathML or custom elements.
|
||
trapClickOnNonInteractiveElement(parentNode);
|
||
}
|
||
}
|
||
|
||
function insertBefore(parentInstance, child, beforeChild) {
|
||
parentInstance.insertBefore(child, beforeChild);
|
||
}
|
||
|
||
function insertInContainerBefore(container, child, beforeChild) {
|
||
if (container.nodeType === COMMENT_NODE) {
|
||
container.parentNode.insertBefore(child, beforeChild);
|
||
} else {
|
||
container.insertBefore(child, beforeChild);
|
||
}
|
||
}
|
||
|
||
function removeChild(parentInstance, child) {
|
||
parentInstance.removeChild(child);
|
||
}
|
||
|
||
function removeChildFromContainer(container, child) {
|
||
if (container.nodeType === COMMENT_NODE) {
|
||
container.parentNode.removeChild(child);
|
||
} else {
|
||
container.removeChild(child);
|
||
}
|
||
}
|
||
|
||
function hideInstance(instance) {
|
||
// TODO: Does this work for all element types? What about MathML? Should we
|
||
// pass host context to this method?
|
||
instance = instance;
|
||
instance.style.display = 'none';
|
||
}
|
||
|
||
function hideTextInstance(textInstance) {
|
||
textInstance.nodeValue = '';
|
||
}
|
||
|
||
function unhideInstance(instance, props) {
|
||
instance = instance;
|
||
var styleProp = props[STYLE];
|
||
var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;
|
||
instance.style.display = dangerousStyleValue('display', display);
|
||
}
|
||
|
||
function unhideTextInstance(textInstance, text) {
|
||
textInstance.nodeValue = text;
|
||
}
|
||
|
||
// -------------------
|
||
// Hydration
|
||
// -------------------
|
||
|
||
var supportsHydration = true;
|
||
|
||
function canHydrateInstance(instance, type, props) {
|
||
if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
|
||
return null;
|
||
}
|
||
// This has now been refined to an element node.
|
||
return instance;
|
||
}
|
||
|
||
function canHydrateTextInstance(instance, text) {
|
||
if (text === '' || instance.nodeType !== TEXT_NODE) {
|
||
// Empty strings are not parsed by HTML so there won't be a correct match here.
|
||
return null;
|
||
}
|
||
// This has now been refined to a text node.
|
||
return instance;
|
||
}
|
||
|
||
function getNextHydratableSibling(instance) {
|
||
var node = instance.nextSibling;
|
||
// Skip non-hydratable nodes.
|
||
while (node && node.nodeType !== ELEMENT_NODE && node.nodeType !== TEXT_NODE) {
|
||
node = node.nextSibling;
|
||
}
|
||
return node;
|
||
}
|
||
|
||
function getFirstHydratableChild(parentInstance) {
|
||
var next = parentInstance.firstChild;
|
||
// Skip non-hydratable nodes.
|
||
while (next && next.nodeType !== ELEMENT_NODE && next.nodeType !== TEXT_NODE) {
|
||
next = next.nextSibling;
|
||
}
|
||
return next;
|
||
}
|
||
|
||
function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
|
||
precacheFiberNode(internalInstanceHandle, instance);
|
||
// TODO: Possibly defer this until the commit phase where all the events
|
||
// get attached.
|
||
updateFiberProps(instance, props);
|
||
var parentNamespace = void 0;
|
||
{
|
||
var hostContextDev = hostContext;
|
||
parentNamespace = hostContextDev.namespace;
|
||
}
|
||
return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance);
|
||
}
|
||
|
||
function hydrateTextInstance(textInstance, text, internalInstanceHandle) {
|
||
precacheFiberNode(internalInstanceHandle, textInstance);
|
||
return diffHydratedText(textInstance, text);
|
||
}
|
||
|
||
function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {
|
||
{
|
||
warnForUnmatchedText(textInstance, text);
|
||
}
|
||
}
|
||
|
||
function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {
|
||
if ( true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {
|
||
warnForUnmatchedText(textInstance, text);
|
||
}
|
||
}
|
||
|
||
function didNotHydrateContainerInstance(parentContainer, instance) {
|
||
{
|
||
if (instance.nodeType === ELEMENT_NODE) {
|
||
warnForDeletedHydratableElement(parentContainer, instance);
|
||
} else {
|
||
warnForDeletedHydratableText(parentContainer, instance);
|
||
}
|
||
}
|
||
}
|
||
|
||
function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {
|
||
if ( true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {
|
||
if (instance.nodeType === ELEMENT_NODE) {
|
||
warnForDeletedHydratableElement(parentInstance, instance);
|
||
} else {
|
||
warnForDeletedHydratableText(parentInstance, instance);
|
||
}
|
||
}
|
||
}
|
||
|
||
function didNotFindHydratableContainerInstance(parentContainer, type, props) {
|
||
{
|
||
warnForInsertedHydratedElement(parentContainer, type, props);
|
||
}
|
||
}
|
||
|
||
function didNotFindHydratableContainerTextInstance(parentContainer, text) {
|
||
{
|
||
warnForInsertedHydratedText(parentContainer, text);
|
||
}
|
||
}
|
||
|
||
function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {
|
||
if ( true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {
|
||
warnForInsertedHydratedElement(parentInstance, type, props);
|
||
}
|
||
}
|
||
|
||
function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {
|
||
if ( true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {
|
||
warnForInsertedHydratedText(parentInstance, text);
|
||
}
|
||
}
|
||
|
||
// Prefix measurements so that it's possible to filter them.
|
||
// Longer prefixes are hard to read in DevTools.
|
||
var reactEmoji = '\u269B';
|
||
var warningEmoji = '\u26D4';
|
||
var supportsUserTiming = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';
|
||
|
||
// Keep track of current fiber so that we know the path to unwind on pause.
|
||
// TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them?
|
||
var currentFiber = null;
|
||
// If we're in the middle of user code, which fiber and method is it?
|
||
// Reusing `currentFiber` would be confusing for this because user code fiber
|
||
// can change during commit phase too, but we don't need to unwind it (since
|
||
// lifecycles in the commit phase don't resemble a tree).
|
||
var currentPhase = null;
|
||
var currentPhaseFiber = null;
|
||
// Did lifecycle hook schedule an update? This is often a performance problem,
|
||
// so we will keep track of it, and include it in the report.
|
||
// Track commits caused by cascading updates.
|
||
var isCommitting = false;
|
||
var hasScheduledUpdateInCurrentCommit = false;
|
||
var hasScheduledUpdateInCurrentPhase = false;
|
||
var commitCountInCurrentWorkLoop = 0;
|
||
var effectCountInCurrentCommit = 0;
|
||
var isWaitingForCallback = false;
|
||
// During commits, we only show a measurement once per method name
|
||
// to avoid stretch the commit phase with measurement overhead.
|
||
var labelsInCurrentCommit = new Set();
|
||
|
||
var formatMarkName = function (markName) {
|
||
return reactEmoji + ' ' + markName;
|
||
};
|
||
|
||
var formatLabel = function (label, warning) {
|
||
var prefix = warning ? warningEmoji + ' ' : reactEmoji + ' ';
|
||
var suffix = warning ? ' Warning: ' + warning : '';
|
||
return '' + prefix + label + suffix;
|
||
};
|
||
|
||
var beginMark = function (markName) {
|
||
performance.mark(formatMarkName(markName));
|
||
};
|
||
|
||
var clearMark = function (markName) {
|
||
performance.clearMarks(formatMarkName(markName));
|
||
};
|
||
|
||
var endMark = function (label, markName, warning) {
|
||
var formattedMarkName = formatMarkName(markName);
|
||
var formattedLabel = formatLabel(label, warning);
|
||
try {
|
||
performance.measure(formattedLabel, formattedMarkName);
|
||
} catch (err) {}
|
||
// If previous mark was missing for some reason, this will throw.
|
||
// This could only happen if React crashed in an unexpected place earlier.
|
||
// Don't pile on with more errors.
|
||
|
||
// Clear marks immediately to avoid growing buffer.
|
||
performance.clearMarks(formattedMarkName);
|
||
performance.clearMeasures(formattedLabel);
|
||
};
|
||
|
||
var getFiberMarkName = function (label, debugID) {
|
||
return label + ' (#' + debugID + ')';
|
||
};
|
||
|
||
var getFiberLabel = function (componentName, isMounted, phase) {
|
||
if (phase === null) {
|
||
// These are composite component total time measurements.
|
||
return componentName + ' [' + (isMounted ? 'update' : 'mount') + ']';
|
||
} else {
|
||
// Composite component methods.
|
||
return componentName + '.' + phase;
|
||
}
|
||
};
|
||
|
||
var beginFiberMark = function (fiber, phase) {
|
||
var componentName = getComponentName(fiber.type) || 'Unknown';
|
||
var debugID = fiber._debugID;
|
||
var isMounted = fiber.alternate !== null;
|
||
var label = getFiberLabel(componentName, isMounted, phase);
|
||
|
||
if (isCommitting && labelsInCurrentCommit.has(label)) {
|
||
// During the commit phase, we don't show duplicate labels because
|
||
// there is a fixed overhead for every measurement, and we don't
|
||
// want to stretch the commit phase beyond necessary.
|
||
return false;
|
||
}
|
||
labelsInCurrentCommit.add(label);
|
||
|
||
var markName = getFiberMarkName(label, debugID);
|
||
beginMark(markName);
|
||
return true;
|
||
};
|
||
|
||
var clearFiberMark = function (fiber, phase) {
|
||
var componentName = getComponentName(fiber.type) || 'Unknown';
|
||
var debugID = fiber._debugID;
|
||
var isMounted = fiber.alternate !== null;
|
||
var label = getFiberLabel(componentName, isMounted, phase);
|
||
var markName = getFiberMarkName(label, debugID);
|
||
clearMark(markName);
|
||
};
|
||
|
||
var endFiberMark = function (fiber, phase, warning) {
|
||
var componentName = getComponentName(fiber.type) || 'Unknown';
|
||
var debugID = fiber._debugID;
|
||
var isMounted = fiber.alternate !== null;
|
||
var label = getFiberLabel(componentName, isMounted, phase);
|
||
var markName = getFiberMarkName(label, debugID);
|
||
endMark(label, markName, warning);
|
||
};
|
||
|
||
var shouldIgnoreFiber = function (fiber) {
|
||
// Host components should be skipped in the timeline.
|
||
// We could check typeof fiber.type, but does this work with RN?
|
||
switch (fiber.tag) {
|
||
case HostRoot:
|
||
case HostComponent:
|
||
case HostText:
|
||
case HostPortal:
|
||
case Fragment:
|
||
case ContextProvider:
|
||
case ContextConsumer:
|
||
case Mode:
|
||
return true;
|
||
default:
|
||
return false;
|
||
}
|
||
};
|
||
|
||
var clearPendingPhaseMeasurement = function () {
|
||
if (currentPhase !== null && currentPhaseFiber !== null) {
|
||
clearFiberMark(currentPhaseFiber, currentPhase);
|
||
}
|
||
currentPhaseFiber = null;
|
||
currentPhase = null;
|
||
hasScheduledUpdateInCurrentPhase = false;
|
||
};
|
||
|
||
var pauseTimers = function () {
|
||
// Stops all currently active measurements so that they can be resumed
|
||
// if we continue in a later deferred loop from the same unit of work.
|
||
var fiber = currentFiber;
|
||
while (fiber) {
|
||
if (fiber._debugIsCurrentlyTiming) {
|
||
endFiberMark(fiber, null, null);
|
||
}
|
||
fiber = fiber.return;
|
||
}
|
||
};
|
||
|
||
var resumeTimersRecursively = function (fiber) {
|
||
if (fiber.return !== null) {
|
||
resumeTimersRecursively(fiber.return);
|
||
}
|
||
if (fiber._debugIsCurrentlyTiming) {
|
||
beginFiberMark(fiber, null);
|
||
}
|
||
};
|
||
|
||
var resumeTimers = function () {
|
||
// Resumes all measurements that were active during the last deferred loop.
|
||
if (currentFiber !== null) {
|
||
resumeTimersRecursively(currentFiber);
|
||
}
|
||
};
|
||
|
||
function recordEffect() {
|
||
if (enableUserTimingAPI) {
|
||
effectCountInCurrentCommit++;
|
||
}
|
||
}
|
||
|
||
function recordScheduleUpdate() {
|
||
if (enableUserTimingAPI) {
|
||
if (isCommitting) {
|
||
hasScheduledUpdateInCurrentCommit = true;
|
||
}
|
||
if (currentPhase !== null && currentPhase !== 'componentWillMount' && currentPhase !== 'componentWillReceiveProps') {
|
||
hasScheduledUpdateInCurrentPhase = true;
|
||
}
|
||
}
|
||
}
|
||
|
||
function startRequestCallbackTimer() {
|
||
if (enableUserTimingAPI) {
|
||
if (supportsUserTiming && !isWaitingForCallback) {
|
||
isWaitingForCallback = true;
|
||
beginMark('(Waiting for async callback...)');
|
||
}
|
||
}
|
||
}
|
||
|
||
function stopRequestCallbackTimer(didExpire, expirationTime) {
|
||
if (enableUserTimingAPI) {
|
||
if (supportsUserTiming) {
|
||
isWaitingForCallback = false;
|
||
var warning = didExpire ? 'React was blocked by main thread' : null;
|
||
endMark('(Waiting for async callback... will force flush in ' + expirationTime + ' ms)', '(Waiting for async callback...)', warning);
|
||
}
|
||
}
|
||
}
|
||
|
||
function startWorkTimer(fiber) {
|
||
if (enableUserTimingAPI) {
|
||
if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
|
||
return;
|
||
}
|
||
// If we pause, this is the fiber to unwind from.
|
||
currentFiber = fiber;
|
||
if (!beginFiberMark(fiber, null)) {
|
||
return;
|
||
}
|
||
fiber._debugIsCurrentlyTiming = true;
|
||
}
|
||
}
|
||
|
||
function cancelWorkTimer(fiber) {
|
||
if (enableUserTimingAPI) {
|
||
if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
|
||
return;
|
||
}
|
||
// Remember we shouldn't complete measurement for this fiber.
|
||
// Otherwise flamechart will be deep even for small updates.
|
||
fiber._debugIsCurrentlyTiming = false;
|
||
clearFiberMark(fiber, null);
|
||
}
|
||
}
|
||
|
||
function stopWorkTimer(fiber) {
|
||
if (enableUserTimingAPI) {
|
||
if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
|
||
return;
|
||
}
|
||
// If we pause, its parent is the fiber to unwind from.
|
||
currentFiber = fiber.return;
|
||
if (!fiber._debugIsCurrentlyTiming) {
|
||
return;
|
||
}
|
||
fiber._debugIsCurrentlyTiming = false;
|
||
endFiberMark(fiber, null, null);
|
||
}
|
||
}
|
||
|
||
function stopFailedWorkTimer(fiber) {
|
||
if (enableUserTimingAPI) {
|
||
if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
|
||
return;
|
||
}
|
||
// If we pause, its parent is the fiber to unwind from.
|
||
currentFiber = fiber.return;
|
||
if (!fiber._debugIsCurrentlyTiming) {
|
||
return;
|
||
}
|
||
fiber._debugIsCurrentlyTiming = false;
|
||
var warning = fiber.tag === SuspenseComponent ? 'Rendering was suspended' : 'An error was thrown inside this error boundary';
|
||
endFiberMark(fiber, null, warning);
|
||
}
|
||
}
|
||
|
||
function startPhaseTimer(fiber, phase) {
|
||
if (enableUserTimingAPI) {
|
||
if (!supportsUserTiming) {
|
||
return;
|
||
}
|
||
clearPendingPhaseMeasurement();
|
||
if (!beginFiberMark(fiber, phase)) {
|
||
return;
|
||
}
|
||
currentPhaseFiber = fiber;
|
||
currentPhase = phase;
|
||
}
|
||
}
|
||
|
||
function stopPhaseTimer() {
|
||
if (enableUserTimingAPI) {
|
||
if (!supportsUserTiming) {
|
||
return;
|
||
}
|
||
if (currentPhase !== null && currentPhaseFiber !== null) {
|
||
var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;
|
||
endFiberMark(currentPhaseFiber, currentPhase, warning);
|
||
}
|
||
currentPhase = null;
|
||
currentPhaseFiber = null;
|
||
}
|
||
}
|
||
|
||
function startWorkLoopTimer(nextUnitOfWork) {
|
||
if (enableUserTimingAPI) {
|
||
currentFiber = nextUnitOfWork;
|
||
if (!supportsUserTiming) {
|
||
return;
|
||
}
|
||
commitCountInCurrentWorkLoop = 0;
|
||
// This is top level call.
|
||
// Any other measurements are performed within.
|
||
beginMark('(React Tree Reconciliation)');
|
||
// Resume any measurements that were in progress during the last loop.
|
||
resumeTimers();
|
||
}
|
||
}
|
||
|
||
function stopWorkLoopTimer(interruptedBy, didCompleteRoot) {
|
||
if (enableUserTimingAPI) {
|
||
if (!supportsUserTiming) {
|
||
return;
|
||
}
|
||
var warning = null;
|
||
if (interruptedBy !== null) {
|
||
if (interruptedBy.tag === HostRoot) {
|
||
warning = 'A top-level update interrupted the previous render';
|
||
} else {
|
||
var componentName = getComponentName(interruptedBy.type) || 'Unknown';
|
||
warning = 'An update to ' + componentName + ' interrupted the previous render';
|
||
}
|
||
} else if (commitCountInCurrentWorkLoop > 1) {
|
||
warning = 'There were cascading updates';
|
||
}
|
||
commitCountInCurrentWorkLoop = 0;
|
||
var label = didCompleteRoot ? '(React Tree Reconciliation: Completed Root)' : '(React Tree Reconciliation: Yielded)';
|
||
// Pause any measurements until the next loop.
|
||
pauseTimers();
|
||
endMark(label, '(React Tree Reconciliation)', warning);
|
||
}
|
||
}
|
||
|
||
function startCommitTimer() {
|
||
if (enableUserTimingAPI) {
|
||
if (!supportsUserTiming) {
|
||
return;
|
||
}
|
||
isCommitting = true;
|
||
hasScheduledUpdateInCurrentCommit = false;
|
||
labelsInCurrentCommit.clear();
|
||
beginMark('(Committing Changes)');
|
||
}
|
||
}
|
||
|
||
function stopCommitTimer() {
|
||
if (enableUserTimingAPI) {
|
||
if (!supportsUserTiming) {
|
||
return;
|
||
}
|
||
|
||
var warning = null;
|
||
if (hasScheduledUpdateInCurrentCommit) {
|
||
warning = 'Lifecycle hook scheduled a cascading update';
|
||
} else if (commitCountInCurrentWorkLoop > 0) {
|
||
warning = 'Caused by a cascading update in earlier commit';
|
||
}
|
||
hasScheduledUpdateInCurrentCommit = false;
|
||
commitCountInCurrentWorkLoop++;
|
||
isCommitting = false;
|
||
labelsInCurrentCommit.clear();
|
||
|
||
endMark('(Committing Changes)', '(Committing Changes)', warning);
|
||
}
|
||
}
|
||
|
||
function startCommitSnapshotEffectsTimer() {
|
||
if (enableUserTimingAPI) {
|
||
if (!supportsUserTiming) {
|
||
return;
|
||
}
|
||
effectCountInCurrentCommit = 0;
|
||
beginMark('(Committing Snapshot Effects)');
|
||
}
|
||
}
|
||
|
||
function stopCommitSnapshotEffectsTimer() {
|
||
if (enableUserTimingAPI) {
|
||
if (!supportsUserTiming) {
|
||
return;
|
||
}
|
||
var count = effectCountInCurrentCommit;
|
||
effectCountInCurrentCommit = 0;
|
||
endMark('(Committing Snapshot Effects: ' + count + ' Total)', '(Committing Snapshot Effects)', null);
|
||
}
|
||
}
|
||
|
||
function startCommitHostEffectsTimer() {
|
||
if (enableUserTimingAPI) {
|
||
if (!supportsUserTiming) {
|
||
return;
|
||
}
|
||
effectCountInCurrentCommit = 0;
|
||
beginMark('(Committing Host Effects)');
|
||
}
|
||
}
|
||
|
||
function stopCommitHostEffectsTimer() {
|
||
if (enableUserTimingAPI) {
|
||
if (!supportsUserTiming) {
|
||
return;
|
||
}
|
||
var count = effectCountInCurrentCommit;
|
||
effectCountInCurrentCommit = 0;
|
||
endMark('(Committing Host Effects: ' + count + ' Total)', '(Committing Host Effects)', null);
|
||
}
|
||
}
|
||
|
||
function startCommitLifeCyclesTimer() {
|
||
if (enableUserTimingAPI) {
|
||
if (!supportsUserTiming) {
|
||
return;
|
||
}
|
||
effectCountInCurrentCommit = 0;
|
||
beginMark('(Calling Lifecycle Methods)');
|
||
}
|
||
}
|
||
|
||
function stopCommitLifeCyclesTimer() {
|
||
if (enableUserTimingAPI) {
|
||
if (!supportsUserTiming) {
|
||
return;
|
||
}
|
||
var count = effectCountInCurrentCommit;
|
||
effectCountInCurrentCommit = 0;
|
||
endMark('(Calling Lifecycle Methods: ' + count + ' Total)', '(Calling Lifecycle Methods)', null);
|
||
}
|
||
}
|
||
|
||
var valueStack = [];
|
||
|
||
var fiberStack = void 0;
|
||
|
||
{
|
||
fiberStack = [];
|
||
}
|
||
|
||
var index = -1;
|
||
|
||
function createCursor(defaultValue) {
|
||
return {
|
||
current: defaultValue
|
||
};
|
||
}
|
||
|
||
function pop(cursor, fiber) {
|
||
if (index < 0) {
|
||
{
|
||
warningWithoutStack$1(false, 'Unexpected pop.');
|
||
}
|
||
return;
|
||
}
|
||
|
||
{
|
||
if (fiber !== fiberStack[index]) {
|
||
warningWithoutStack$1(false, 'Unexpected Fiber popped.');
|
||
}
|
||
}
|
||
|
||
cursor.current = valueStack[index];
|
||
|
||
valueStack[index] = null;
|
||
|
||
{
|
||
fiberStack[index] = null;
|
||
}
|
||
|
||
index--;
|
||
}
|
||
|
||
function push(cursor, value, fiber) {
|
||
index++;
|
||
|
||
valueStack[index] = cursor.current;
|
||
|
||
{
|
||
fiberStack[index] = fiber;
|
||
}
|
||
|
||
cursor.current = value;
|
||
}
|
||
|
||
function checkThatStackIsEmpty() {
|
||
{
|
||
if (index !== -1) {
|
||
warningWithoutStack$1(false, 'Expected an empty stack. Something was not reset properly.');
|
||
}
|
||
}
|
||
}
|
||
|
||
function resetStackAfterFatalErrorInDev() {
|
||
{
|
||
index = -1;
|
||
valueStack.length = 0;
|
||
fiberStack.length = 0;
|
||
}
|
||
}
|
||
|
||
var warnedAboutMissingGetChildContext = void 0;
|
||
|
||
{
|
||
warnedAboutMissingGetChildContext = {};
|
||
}
|
||
|
||
var emptyContextObject = {};
|
||
{
|
||
Object.freeze(emptyContextObject);
|
||
}
|
||
|
||
// A cursor to the current merged context object on the stack.
|
||
var contextStackCursor = createCursor(emptyContextObject);
|
||
// A cursor to a boolean indicating whether the context has changed.
|
||
var didPerformWorkStackCursor = createCursor(false);
|
||
// Keep track of the previous context object that was on the stack.
|
||
// We use this to get access to the parent context after we have already
|
||
// pushed the next context provider, and now need to merge their contexts.
|
||
var previousContext = emptyContextObject;
|
||
|
||
function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {
|
||
if (didPushOwnContextIfProvider && isContextProvider(Component)) {
|
||
// If the fiber is a context provider itself, when we read its context
|
||
// we may have already pushed its own child context on the stack. A context
|
||
// provider should not "see" its own child context. Therefore we read the
|
||
// previous (parent) context instead for a context provider.
|
||
return previousContext;
|
||
}
|
||
return contextStackCursor.current;
|
||
}
|
||
|
||
function cacheContext(workInProgress, unmaskedContext, maskedContext) {
|
||
var instance = workInProgress.stateNode;
|
||
instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
|
||
instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
|
||
}
|
||
|
||
function getMaskedContext(workInProgress, unmaskedContext) {
|
||
var type = workInProgress.type;
|
||
var contextTypes = type.contextTypes;
|
||
if (!contextTypes) {
|
||
return emptyContextObject;
|
||
}
|
||
|
||
// Avoid recreating masked context unless unmasked context has changed.
|
||
// Failing to do this will result in unnecessary calls to componentWillReceiveProps.
|
||
// This may trigger infinite loops if componentWillReceiveProps calls setState.
|
||
var instance = workInProgress.stateNode;
|
||
if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {
|
||
return instance.__reactInternalMemoizedMaskedChildContext;
|
||
}
|
||
|
||
var context = {};
|
||
for (var key in contextTypes) {
|
||
context[key] = unmaskedContext[key];
|
||
}
|
||
|
||
{
|
||
var name = getComponentName(type) || 'Unknown';
|
||
checkPropTypes(contextTypes, context, 'context', name, getCurrentFiberStackInDev);
|
||
}
|
||
|
||
// Cache unmasked context so we can avoid recreating masked context unless necessary.
|
||
// Context is created before the class component is instantiated so check for instance.
|
||
if (instance) {
|
||
cacheContext(workInProgress, unmaskedContext, context);
|
||
}
|
||
|
||
return context;
|
||
}
|
||
|
||
function hasContextChanged() {
|
||
return didPerformWorkStackCursor.current;
|
||
}
|
||
|
||
function isContextProvider(type) {
|
||
var childContextTypes = type.childContextTypes;
|
||
return childContextTypes !== null && childContextTypes !== undefined;
|
||
}
|
||
|
||
function popContext(fiber) {
|
||
pop(didPerformWorkStackCursor, fiber);
|
||
pop(contextStackCursor, fiber);
|
||
}
|
||
|
||
function popTopLevelContextObject(fiber) {
|
||
pop(didPerformWorkStackCursor, fiber);
|
||
pop(contextStackCursor, fiber);
|
||
}
|
||
|
||
function pushTopLevelContextObject(fiber, context, didChange) {
|
||
!(contextStackCursor.current === emptyContextObject) ? invariant(false, 'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
|
||
push(contextStackCursor, context, fiber);
|
||
push(didPerformWorkStackCursor, didChange, fiber);
|
||
}
|
||
|
||
function processChildContext(fiber, type, parentContext) {
|
||
var instance = fiber.stateNode;
|
||
var childContextTypes = type.childContextTypes;
|
||
|
||
// TODO (bvaughn) Replace this behavior with an invariant() in the future.
|
||
// It has only been added in Fiber to match the (unintentional) behavior in Stack.
|
||
if (typeof instance.getChildContext !== 'function') {
|
||
{
|
||
var componentName = getComponentName(type) || 'Unknown';
|
||
|
||
if (!warnedAboutMissingGetChildContext[componentName]) {
|
||
warnedAboutMissingGetChildContext[componentName] = true;
|
||
warningWithoutStack$1(false, '%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);
|
||
}
|
||
}
|
||
return parentContext;
|
||
}
|
||
|
||
var childContext = void 0;
|
||
{
|
||
setCurrentPhase('getChildContext');
|
||
}
|
||
startPhaseTimer(fiber, 'getChildContext');
|
||
childContext = instance.getChildContext();
|
||
stopPhaseTimer();
|
||
{
|
||
setCurrentPhase(null);
|
||
}
|
||
for (var contextKey in childContext) {
|
||
!(contextKey in childContextTypes) ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', getComponentName(type) || 'Unknown', contextKey) : void 0;
|
||
}
|
||
{
|
||
var name = getComponentName(type) || 'Unknown';
|
||
checkPropTypes(childContextTypes, childContext, 'child context', name,
|
||
// In practice, there is one case in which we won't get a stack. It's when
|
||
// somebody calls unstable_renderSubtreeIntoContainer() and we process
|
||
// context from the parent component instance. The stack will be missing
|
||
// because it's outside of the reconciliation, and so the pointer has not
|
||
// been set. This is rare and doesn't matter. We'll also remove that API.
|
||
getCurrentFiberStackInDev);
|
||
}
|
||
|
||
return _assign({}, parentContext, childContext);
|
||
}
|
||
|
||
function pushContextProvider(workInProgress) {
|
||
var instance = workInProgress.stateNode;
|
||
// We push the context as early as possible to ensure stack integrity.
|
||
// If the instance does not exist yet, we will push null at first,
|
||
// and replace it on the stack later when invalidating the context.
|
||
var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject;
|
||
|
||
// Remember the parent context so we can merge with it later.
|
||
// Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
|
||
previousContext = contextStackCursor.current;
|
||
push(contextStackCursor, memoizedMergedChildContext, workInProgress);
|
||
push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);
|
||
|
||
return true;
|
||
}
|
||
|
||
function invalidateContextProvider(workInProgress, type, didChange) {
|
||
var instance = workInProgress.stateNode;
|
||
!instance ? invariant(false, 'Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
|
||
if (didChange) {
|
||
// Merge parent and own context.
|
||
// Skip this if we're not updating due to sCU.
|
||
// This avoids unnecessarily recomputing memoized values.
|
||
var mergedContext = processChildContext(workInProgress, type, previousContext);
|
||
instance.__reactInternalMemoizedMergedChildContext = mergedContext;
|
||
|
||
// Replace the old (or empty) context with the new one.
|
||
// It is important to unwind the context in the reverse order.
|
||
pop(didPerformWorkStackCursor, workInProgress);
|
||
pop(contextStackCursor, workInProgress);
|
||
// Now push the new context and mark that it has changed.
|
||
push(contextStackCursor, mergedContext, workInProgress);
|
||
push(didPerformWorkStackCursor, didChange, workInProgress);
|
||
} else {
|
||
pop(didPerformWorkStackCursor, workInProgress);
|
||
push(didPerformWorkStackCursor, didChange, workInProgress);
|
||
}
|
||
}
|
||
|
||
function findCurrentUnmaskedContext(fiber) {
|
||
// Currently this is only used with renderSubtreeIntoContainer; not sure if it
|
||
// makes sense elsewhere
|
||
!(isFiberMounted(fiber) && fiber.tag === ClassComponent) ? invariant(false, 'Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
|
||
var node = fiber;
|
||
do {
|
||
switch (node.tag) {
|
||
case HostRoot:
|
||
return node.stateNode.context;
|
||
case ClassComponent:
|
||
{
|
||
var Component = node.type;
|
||
if (isContextProvider(Component)) {
|
||
return node.stateNode.__reactInternalMemoizedMergedChildContext;
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
node = node.return;
|
||
} while (node !== null);
|
||
invariant(false, 'Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.');
|
||
}
|
||
|
||
var onCommitFiberRoot = null;
|
||
var onCommitFiberUnmount = null;
|
||
var hasLoggedError = false;
|
||
|
||
function catchErrors(fn) {
|
||
return function (arg) {
|
||
try {
|
||
return fn(arg);
|
||
} catch (err) {
|
||
if ( true && !hasLoggedError) {
|
||
hasLoggedError = true;
|
||
warningWithoutStack$1(false, 'React DevTools encountered an error: %s', err);
|
||
}
|
||
}
|
||
};
|
||
}
|
||
|
||
var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
|
||
|
||
function injectInternals(internals) {
|
||
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
|
||
// No DevTools
|
||
return false;
|
||
}
|
||
var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||
if (hook.isDisabled) {
|
||
// This isn't a real property on the hook, but it can be set to opt out
|
||
// of DevTools integration and associated warnings and logs.
|
||
// https://github.com/facebook/react/issues/3877
|
||
return true;
|
||
}
|
||
if (!hook.supportsFiber) {
|
||
{
|
||
warningWithoutStack$1(false, 'The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');
|
||
}
|
||
// DevTools exists, even though it doesn't support Fiber.
|
||
return true;
|
||
}
|
||
try {
|
||
var rendererID = hook.inject(internals);
|
||
// We have successfully injected, so now it is safe to set up hooks.
|
||
onCommitFiberRoot = catchErrors(function (root) {
|
||
return hook.onCommitFiberRoot(rendererID, root);
|
||
});
|
||
onCommitFiberUnmount = catchErrors(function (fiber) {
|
||
return hook.onCommitFiberUnmount(rendererID, fiber);
|
||
});
|
||
} catch (err) {
|
||
// Catch all errors because it is unsafe to throw during initialization.
|
||
{
|
||
warningWithoutStack$1(false, 'React DevTools encountered an error: %s.', err);
|
||
}
|
||
}
|
||
// DevTools exists
|
||
return true;
|
||
}
|
||
|
||
function onCommitRoot(root) {
|
||
if (typeof onCommitFiberRoot === 'function') {
|
||
onCommitFiberRoot(root);
|
||
}
|
||
}
|
||
|
||
function onCommitUnmount(fiber) {
|
||
if (typeof onCommitFiberUnmount === 'function') {
|
||
onCommitFiberUnmount(fiber);
|
||
}
|
||
}
|
||
|
||
// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
|
||
// Math.pow(2, 30) - 1
|
||
// 0b111111111111111111111111111111
|
||
var maxSigned31BitInt = 1073741823;
|
||
|
||
var NoWork = 0;
|
||
var Never = 1;
|
||
var Sync = maxSigned31BitInt;
|
||
|
||
var UNIT_SIZE = 10;
|
||
var MAGIC_NUMBER_OFFSET = maxSigned31BitInt - 1;
|
||
|
||
// 1 unit of expiration time represents 10ms.
|
||
function msToExpirationTime(ms) {
|
||
// Always add an offset so that we don't clash with the magic number for NoWork.
|
||
return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);
|
||
}
|
||
|
||
function expirationTimeToMs(expirationTime) {
|
||
return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE;
|
||
}
|
||
|
||
function ceiling(num, precision) {
|
||
return ((num / precision | 0) + 1) * precision;
|
||
}
|
||
|
||
function computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) {
|
||
return MAGIC_NUMBER_OFFSET - ceiling(MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE, bucketSizeMs / UNIT_SIZE);
|
||
}
|
||
|
||
var LOW_PRIORITY_EXPIRATION = 5000;
|
||
var LOW_PRIORITY_BATCH_SIZE = 250;
|
||
|
||
function computeAsyncExpiration(currentTime) {
|
||
return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE);
|
||
}
|
||
|
||
// We intentionally set a higher expiration time for interactive updates in
|
||
// dev than in production.
|
||
//
|
||
// If the main thread is being blocked so long that you hit the expiration,
|
||
// it's a problem that could be solved with better scheduling.
|
||
//
|
||
// People will be more likely to notice this and fix it with the long
|
||
// expiration time in development.
|
||
//
|
||
// In production we opt for better UX at the risk of masking scheduling
|
||
// problems, by expiring fast.
|
||
var HIGH_PRIORITY_EXPIRATION = 500;
|
||
var HIGH_PRIORITY_BATCH_SIZE = 100;
|
||
|
||
function computeInteractiveExpiration(currentTime) {
|
||
return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE);
|
||
}
|
||
|
||
var NoContext = 0;
|
||
var ConcurrentMode = 1;
|
||
var StrictMode = 2;
|
||
var ProfileMode = 4;
|
||
|
||
var hasBadMapPolyfill = void 0;
|
||
|
||
{
|
||
hasBadMapPolyfill = false;
|
||
try {
|
||
var nonExtensibleObject = Object.preventExtensions({});
|
||
var testMap = new Map([[nonExtensibleObject, null]]);
|
||
var testSet = new Set([nonExtensibleObject]);
|
||
// This is necessary for Rollup to not consider these unused.
|
||
// https://github.com/rollup/rollup/issues/1771
|
||
// TODO: we can remove these if Rollup fixes the bug.
|
||
testMap.set(0, 0);
|
||
testSet.add(0);
|
||
} catch (e) {
|
||
// TODO: Consider warning about bad polyfills
|
||
hasBadMapPolyfill = true;
|
||
}
|
||
}
|
||
|
||
// A Fiber is work on a Component that needs to be done or was done. There can
|
||
// be more than one per component.
|
||
|
||
|
||
var debugCounter = void 0;
|
||
|
||
{
|
||
debugCounter = 1;
|
||
}
|
||
|
||
function FiberNode(tag, pendingProps, key, mode) {
|
||
// Instance
|
||
this.tag = tag;
|
||
this.key = key;
|
||
this.elementType = null;
|
||
this.type = null;
|
||
this.stateNode = null;
|
||
|
||
// Fiber
|
||
this.return = null;
|
||
this.child = null;
|
||
this.sibling = null;
|
||
this.index = 0;
|
||
|
||
this.ref = null;
|
||
|
||
this.pendingProps = pendingProps;
|
||
this.memoizedProps = null;
|
||
this.updateQueue = null;
|
||
this.memoizedState = null;
|
||
this.firstContextDependency = null;
|
||
|
||
this.mode = mode;
|
||
|
||
// Effects
|
||
this.effectTag = NoEffect;
|
||
this.nextEffect = null;
|
||
|
||
this.firstEffect = null;
|
||
this.lastEffect = null;
|
||
|
||
this.expirationTime = NoWork;
|
||
this.childExpirationTime = NoWork;
|
||
|
||
this.alternate = null;
|
||
|
||
if (enableProfilerTimer) {
|
||
// Note: The following is done to avoid a v8 performance cliff.
|
||
//
|
||
// Initializing the fields below to smis and later updating them with
|
||
// double values will cause Fibers to end up having separate shapes.
|
||
// This behavior/bug has something to do with Object.preventExtension().
|
||
// Fortunately this only impacts DEV builds.
|
||
// Unfortunately it makes React unusably slow for some applications.
|
||
// To work around this, initialize the fields below with doubles.
|
||
//
|
||
// Learn more about this here:
|
||
// https://github.com/facebook/react/issues/14365
|
||
// https://bugs.chromium.org/p/v8/issues/detail?id=8538
|
||
this.actualDuration = Number.NaN;
|
||
this.actualStartTime = Number.NaN;
|
||
this.selfBaseDuration = Number.NaN;
|
||
this.treeBaseDuration = Number.NaN;
|
||
|
||
// It's okay to replace the initial doubles with smis after initialization.
|
||
// This won't trigger the performance cliff mentioned above,
|
||
// and it simplifies other profiler code (including DevTools).
|
||
this.actualDuration = 0;
|
||
this.actualStartTime = -1;
|
||
this.selfBaseDuration = 0;
|
||
this.treeBaseDuration = 0;
|
||
}
|
||
|
||
{
|
||
this._debugID = debugCounter++;
|
||
this._debugSource = null;
|
||
this._debugOwner = null;
|
||
this._debugIsCurrentlyTiming = false;
|
||
if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {
|
||
Object.preventExtensions(this);
|
||
}
|
||
}
|
||
}
|
||
|
||
// This is a constructor function, rather than a POJO constructor, still
|
||
// please ensure we do the following:
|
||
// 1) Nobody should add any instance methods on this. Instance methods can be
|
||
// more difficult to predict when they get optimized and they are almost
|
||
// never inlined properly in static compilers.
|
||
// 2) Nobody should rely on `instanceof Fiber` for type testing. We should
|
||
// always know when it is a fiber.
|
||
// 3) We might want to experiment with using numeric keys since they are easier
|
||
// to optimize in a non-JIT environment.
|
||
// 4) We can easily go from a constructor to a createFiber object literal if that
|
||
// is faster.
|
||
// 5) It should be easy to port this to a C struct and keep a C implementation
|
||
// compatible.
|
||
var createFiber = function (tag, pendingProps, key, mode) {
|
||
// $FlowFixMe: the shapes are exact here but Flow doesn't like constructors
|
||
return new FiberNode(tag, pendingProps, key, mode);
|
||
};
|
||
|
||
function shouldConstruct(Component) {
|
||
var prototype = Component.prototype;
|
||
return !!(prototype && prototype.isReactComponent);
|
||
}
|
||
|
||
function isSimpleFunctionComponent(type) {
|
||
return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined;
|
||
}
|
||
|
||
function resolveLazyComponentTag(Component) {
|
||
if (typeof Component === 'function') {
|
||
return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
|
||
} else if (Component !== undefined && Component !== null) {
|
||
var $$typeof = Component.$$typeof;
|
||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||
return ForwardRef;
|
||
}
|
||
if ($$typeof === REACT_MEMO_TYPE) {
|
||
return MemoComponent;
|
||
}
|
||
}
|
||
return IndeterminateComponent;
|
||
}
|
||
|
||
// This is used to create an alternate fiber to do work on.
|
||
function createWorkInProgress(current, pendingProps, expirationTime) {
|
||
var workInProgress = current.alternate;
|
||
if (workInProgress === null) {
|
||
// We use a double buffering pooling technique because we know that we'll
|
||
// only ever need at most two versions of a tree. We pool the "other" unused
|
||
// node that we're free to reuse. This is lazily created to avoid allocating
|
||
// extra objects for things that are never updated. It also allow us to
|
||
// reclaim the extra memory if needed.
|
||
workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);
|
||
workInProgress.elementType = current.elementType;
|
||
workInProgress.type = current.type;
|
||
workInProgress.stateNode = current.stateNode;
|
||
|
||
{
|
||
// DEV-only fields
|
||
workInProgress._debugID = current._debugID;
|
||
workInProgress._debugSource = current._debugSource;
|
||
workInProgress._debugOwner = current._debugOwner;
|
||
}
|
||
|
||
workInProgress.alternate = current;
|
||
current.alternate = workInProgress;
|
||
} else {
|
||
workInProgress.pendingProps = pendingProps;
|
||
|
||
// We already have an alternate.
|
||
// Reset the effect tag.
|
||
workInProgress.effectTag = NoEffect;
|
||
|
||
// The effect list is no longer valid.
|
||
workInProgress.nextEffect = null;
|
||
workInProgress.firstEffect = null;
|
||
workInProgress.lastEffect = null;
|
||
|
||
if (enableProfilerTimer) {
|
||
// We intentionally reset, rather than copy, actualDuration & actualStartTime.
|
||
// This prevents time from endlessly accumulating in new commits.
|
||
// This has the downside of resetting values for different priority renders,
|
||
// But works for yielding (the common case) and should support resuming.
|
||
workInProgress.actualDuration = 0;
|
||
workInProgress.actualStartTime = -1;
|
||
}
|
||
}
|
||
|
||
workInProgress.childExpirationTime = current.childExpirationTime;
|
||
workInProgress.expirationTime = current.expirationTime;
|
||
|
||
workInProgress.child = current.child;
|
||
workInProgress.memoizedProps = current.memoizedProps;
|
||
workInProgress.memoizedState = current.memoizedState;
|
||
workInProgress.updateQueue = current.updateQueue;
|
||
workInProgress.firstContextDependency = current.firstContextDependency;
|
||
|
||
// These will be overridden during the parent's reconciliation
|
||
workInProgress.sibling = current.sibling;
|
||
workInProgress.index = current.index;
|
||
workInProgress.ref = current.ref;
|
||
|
||
if (enableProfilerTimer) {
|
||
workInProgress.selfBaseDuration = current.selfBaseDuration;
|
||
workInProgress.treeBaseDuration = current.treeBaseDuration;
|
||
}
|
||
|
||
return workInProgress;
|
||
}
|
||
|
||
function createHostRootFiber(isConcurrent) {
|
||
var mode = isConcurrent ? ConcurrentMode | StrictMode : NoContext;
|
||
|
||
if (enableProfilerTimer && isDevToolsPresent) {
|
||
// Always collect profile timings when DevTools are present.
|
||
// This enables DevTools to start capturing timing at any point–
|
||
// Without some nodes in the tree having empty base times.
|
||
mode |= ProfileMode;
|
||
}
|
||
|
||
return createFiber(HostRoot, null, null, mode);
|
||
}
|
||
|
||
function createFiberFromTypeAndProps(type, // React$ElementType
|
||
key, pendingProps, owner, mode, expirationTime) {
|
||
var fiber = void 0;
|
||
|
||
var fiberTag = IndeterminateComponent;
|
||
// The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||
var resolvedType = type;
|
||
if (typeof type === 'function') {
|
||
if (shouldConstruct(type)) {
|
||
fiberTag = ClassComponent;
|
||
}
|
||
} else if (typeof type === 'string') {
|
||
fiberTag = HostComponent;
|
||
} else {
|
||
getTag: switch (type) {
|
||
case REACT_FRAGMENT_TYPE:
|
||
return createFiberFromFragment(pendingProps.children, mode, expirationTime, key);
|
||
case REACT_CONCURRENT_MODE_TYPE:
|
||
return createFiberFromMode(pendingProps, mode | ConcurrentMode | StrictMode, expirationTime, key);
|
||
case REACT_STRICT_MODE_TYPE:
|
||
return createFiberFromMode(pendingProps, mode | StrictMode, expirationTime, key);
|
||
case REACT_PROFILER_TYPE:
|
||
return createFiberFromProfiler(pendingProps, mode, expirationTime, key);
|
||
case REACT_SUSPENSE_TYPE:
|
||
return createFiberFromSuspense(pendingProps, mode, expirationTime, key);
|
||
default:
|
||
{
|
||
if (typeof type === 'object' && type !== null) {
|
||
switch (type.$$typeof) {
|
||
case REACT_PROVIDER_TYPE:
|
||
fiberTag = ContextProvider;
|
||
break getTag;
|
||
case REACT_CONTEXT_TYPE:
|
||
// This is a consumer
|
||
fiberTag = ContextConsumer;
|
||
break getTag;
|
||
case REACT_FORWARD_REF_TYPE:
|
||
fiberTag = ForwardRef;
|
||
break getTag;
|
||
case REACT_MEMO_TYPE:
|
||
fiberTag = MemoComponent;
|
||
break getTag;
|
||
case REACT_LAZY_TYPE:
|
||
fiberTag = LazyComponent;
|
||
resolvedType = null;
|
||
break getTag;
|
||
}
|
||
}
|
||
var info = '';
|
||
{
|
||
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
||
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
|
||
}
|
||
var ownerName = owner ? getComponentName(owner.type) : null;
|
||
if (ownerName) {
|
||
info += '\n\nCheck the render method of `' + ownerName + '`.';
|
||
}
|
||
}
|
||
invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info);
|
||
}
|
||
}
|
||
}
|
||
|
||
fiber = createFiber(fiberTag, pendingProps, key, mode);
|
||
fiber.elementType = type;
|
||
fiber.type = resolvedType;
|
||
fiber.expirationTime = expirationTime;
|
||
|
||
return fiber;
|
||
}
|
||
|
||
function createFiberFromElement(element, mode, expirationTime) {
|
||
var owner = null;
|
||
{
|
||
owner = element._owner;
|
||
}
|
||
var type = element.type;
|
||
var key = element.key;
|
||
var pendingProps = element.props;
|
||
var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, expirationTime);
|
||
{
|
||
fiber._debugSource = element._source;
|
||
fiber._debugOwner = element._owner;
|
||
}
|
||
return fiber;
|
||
}
|
||
|
||
function createFiberFromFragment(elements, mode, expirationTime, key) {
|
||
var fiber = createFiber(Fragment, elements, key, mode);
|
||
fiber.expirationTime = expirationTime;
|
||
return fiber;
|
||
}
|
||
|
||
function createFiberFromProfiler(pendingProps, mode, expirationTime, key) {
|
||
{
|
||
if (typeof pendingProps.id !== 'string' || typeof pendingProps.onRender !== 'function') {
|
||
warningWithoutStack$1(false, 'Profiler must specify an "id" string and "onRender" function as props');
|
||
}
|
||
}
|
||
|
||
var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode);
|
||
// TODO: The Profiler fiber shouldn't have a type. It has a tag.
|
||
fiber.elementType = REACT_PROFILER_TYPE;
|
||
fiber.type = REACT_PROFILER_TYPE;
|
||
fiber.expirationTime = expirationTime;
|
||
|
||
return fiber;
|
||
}
|
||
|
||
function createFiberFromMode(pendingProps, mode, expirationTime, key) {
|
||
var fiber = createFiber(Mode, pendingProps, key, mode);
|
||
|
||
// TODO: The Mode fiber shouldn't have a type. It has a tag.
|
||
var type = (mode & ConcurrentMode) === NoContext ? REACT_STRICT_MODE_TYPE : REACT_CONCURRENT_MODE_TYPE;
|
||
fiber.elementType = type;
|
||
fiber.type = type;
|
||
|
||
fiber.expirationTime = expirationTime;
|
||
return fiber;
|
||
}
|
||
|
||
function createFiberFromSuspense(pendingProps, mode, expirationTime, key) {
|
||
var fiber = createFiber(SuspenseComponent, pendingProps, key, mode);
|
||
|
||
// TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.
|
||
var type = REACT_SUSPENSE_TYPE;
|
||
fiber.elementType = type;
|
||
fiber.type = type;
|
||
|
||
fiber.expirationTime = expirationTime;
|
||
return fiber;
|
||
}
|
||
|
||
function createFiberFromText(content, mode, expirationTime) {
|
||
var fiber = createFiber(HostText, content, null, mode);
|
||
fiber.expirationTime = expirationTime;
|
||
return fiber;
|
||
}
|
||
|
||
function createFiberFromHostInstanceForDeletion() {
|
||
var fiber = createFiber(HostComponent, null, null, NoContext);
|
||
// TODO: These should not need a type.
|
||
fiber.elementType = 'DELETED';
|
||
fiber.type = 'DELETED';
|
||
return fiber;
|
||
}
|
||
|
||
function createFiberFromPortal(portal, mode, expirationTime) {
|
||
var pendingProps = portal.children !== null ? portal.children : [];
|
||
var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
|
||
fiber.expirationTime = expirationTime;
|
||
fiber.stateNode = {
|
||
containerInfo: portal.containerInfo,
|
||
pendingChildren: null, // Used by persistent updates
|
||
implementation: portal.implementation
|
||
};
|
||
return fiber;
|
||
}
|
||
|
||
// Used for stashing WIP properties to replay failed work in DEV.
|
||
function assignFiberPropertiesInDEV(target, source) {
|
||
if (target === null) {
|
||
// This Fiber's initial properties will always be overwritten.
|
||
// We only use a Fiber to ensure the same hidden class so DEV isn't slow.
|
||
target = createFiber(IndeterminateComponent, null, null, NoContext);
|
||
}
|
||
|
||
// This is intentionally written as a list of all properties.
|
||
// We tried to use Object.assign() instead but this is called in
|
||
// the hottest path, and Object.assign() was too slow:
|
||
// https://github.com/facebook/react/issues/12502
|
||
// This code is DEV-only so size is not a concern.
|
||
|
||
target.tag = source.tag;
|
||
target.key = source.key;
|
||
target.elementType = source.elementType;
|
||
target.type = source.type;
|
||
target.stateNode = source.stateNode;
|
||
target.return = source.return;
|
||
target.child = source.child;
|
||
target.sibling = source.sibling;
|
||
target.index = source.index;
|
||
target.ref = source.ref;
|
||
target.pendingProps = source.pendingProps;
|
||
target.memoizedProps = source.memoizedProps;
|
||
target.updateQueue = source.updateQueue;
|
||
target.memoizedState = source.memoizedState;
|
||
target.firstContextDependency = source.firstContextDependency;
|
||
target.mode = source.mode;
|
||
target.effectTag = source.effectTag;
|
||
target.nextEffect = source.nextEffect;
|
||
target.firstEffect = source.firstEffect;
|
||
target.lastEffect = source.lastEffect;
|
||
target.expirationTime = source.expirationTime;
|
||
target.childExpirationTime = source.childExpirationTime;
|
||
target.alternate = source.alternate;
|
||
if (enableProfilerTimer) {
|
||
target.actualDuration = source.actualDuration;
|
||
target.actualStartTime = source.actualStartTime;
|
||
target.selfBaseDuration = source.selfBaseDuration;
|
||
target.treeBaseDuration = source.treeBaseDuration;
|
||
}
|
||
target._debugID = source._debugID;
|
||
target._debugSource = source._debugSource;
|
||
target._debugOwner = source._debugOwner;
|
||
target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;
|
||
return target;
|
||
}
|
||
|
||
// TODO: This should be lifted into the renderer.
|
||
|
||
|
||
// The following attributes are only used by interaction tracing builds.
|
||
// They enable interactions to be associated with their async work,
|
||
// And expose interaction metadata to the React DevTools Profiler plugin.
|
||
// Note that these attributes are only defined when the enableSchedulerTracing flag is enabled.
|
||
|
||
|
||
// Exported FiberRoot type includes all properties,
|
||
// To avoid requiring potentially error-prone :any casts throughout the project.
|
||
// Profiling properties are only safe to access in profiling builds (when enableSchedulerTracing is true).
|
||
// The types are defined separately within this file to ensure they stay in sync.
|
||
// (We don't have to use an inline :any cast when enableSchedulerTracing is disabled.)
|
||
|
||
|
||
function createFiberRoot(containerInfo, isConcurrent, hydrate) {
|
||
// Cyclic construction. This cheats the type system right now because
|
||
// stateNode is any.
|
||
var uninitializedFiber = createHostRootFiber(isConcurrent);
|
||
|
||
var root = void 0;
|
||
if (enableSchedulerTracing) {
|
||
root = {
|
||
current: uninitializedFiber,
|
||
containerInfo: containerInfo,
|
||
pendingChildren: null,
|
||
|
||
earliestPendingTime: NoWork,
|
||
latestPendingTime: NoWork,
|
||
earliestSuspendedTime: NoWork,
|
||
latestSuspendedTime: NoWork,
|
||
latestPingedTime: NoWork,
|
||
|
||
pingCache: null,
|
||
|
||
didError: false,
|
||
|
||
pendingCommitExpirationTime: NoWork,
|
||
finishedWork: null,
|
||
timeoutHandle: noTimeout,
|
||
context: null,
|
||
pendingContext: null,
|
||
hydrate: hydrate,
|
||
nextExpirationTimeToWorkOn: NoWork,
|
||
expirationTime: NoWork,
|
||
firstBatch: null,
|
||
nextScheduledRoot: null,
|
||
|
||
interactionThreadID: tracing.unstable_getThreadID(),
|
||
memoizedInteractions: new Set(),
|
||
pendingInteractionMap: new Map()
|
||
};
|
||
} else {
|
||
root = {
|
||
current: uninitializedFiber,
|
||
containerInfo: containerInfo,
|
||
pendingChildren: null,
|
||
|
||
pingCache: null,
|
||
|
||
earliestPendingTime: NoWork,
|
||
latestPendingTime: NoWork,
|
||
earliestSuspendedTime: NoWork,
|
||
latestSuspendedTime: NoWork,
|
||
latestPingedTime: NoWork,
|
||
|
||
didError: false,
|
||
|
||
pendingCommitExpirationTime: NoWork,
|
||
finishedWork: null,
|
||
timeoutHandle: noTimeout,
|
||
context: null,
|
||
pendingContext: null,
|
||
hydrate: hydrate,
|
||
nextExpirationTimeToWorkOn: NoWork,
|
||
expirationTime: NoWork,
|
||
firstBatch: null,
|
||
nextScheduledRoot: null
|
||
};
|
||
}
|
||
|
||
uninitializedFiber.stateNode = root;
|
||
|
||
// The reason for the way the Flow types are structured in this file,
|
||
// Is to avoid needing :any casts everywhere interaction tracing fields are used.
|
||
// Unfortunately that requires an :any cast for non-interaction tracing capable builds.
|
||
// $FlowFixMe Remove this :any cast and replace it with something better.
|
||
return root;
|
||
}
|
||
|
||
/**
|
||
* Forked from fbjs/warning:
|
||
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
||
*
|
||
* Only change is we use console.warn instead of console.error,
|
||
* and do nothing when 'console' is not supported.
|
||
* This really simplifies the code.
|
||
* ---
|
||
* Similar to invariant but only logs a warning if the condition is not met.
|
||
* This can be used to log issues in development environments in critical
|
||
* paths. Removing the logging code for production environments will keep the
|
||
* same logic and follow the same code paths.
|
||
*/
|
||
|
||
var lowPriorityWarning = function () {};
|
||
|
||
{
|
||
var printWarning = function (format) {
|
||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||
args[_key - 1] = arguments[_key];
|
||
}
|
||
|
||
var argIndex = 0;
|
||
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
||
return args[argIndex++];
|
||
});
|
||
if (typeof console !== 'undefined') {
|
||
console.warn(message);
|
||
}
|
||
try {
|
||
// --- Welcome to debugging React ---
|
||
// This error was thrown as a convenience so that you can use this stack
|
||
// to find the callsite that caused this warning to fire.
|
||
throw new Error(message);
|
||
} catch (x) {}
|
||
};
|
||
|
||
lowPriorityWarning = function (condition, format) {
|
||
if (format === undefined) {
|
||
throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
|
||
}
|
||
if (!condition) {
|
||
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
||
args[_key2 - 2] = arguments[_key2];
|
||
}
|
||
|
||
printWarning.apply(undefined, [format].concat(args));
|
||
}
|
||
};
|
||
}
|
||
|
||
var lowPriorityWarning$1 = lowPriorityWarning;
|
||
|
||
var ReactStrictModeWarnings = {
|
||
discardPendingWarnings: function () {},
|
||
flushPendingDeprecationWarnings: function () {},
|
||
flushPendingUnsafeLifecycleWarnings: function () {},
|
||
recordDeprecationWarnings: function (fiber, instance) {},
|
||
recordUnsafeLifecycleWarnings: function (fiber, instance) {},
|
||
recordLegacyContextWarning: function (fiber, instance) {},
|
||
flushLegacyContextWarning: function () {}
|
||
};
|
||
|
||
{
|
||
var LIFECYCLE_SUGGESTIONS = {
|
||
UNSAFE_componentWillMount: 'componentDidMount',
|
||
UNSAFE_componentWillReceiveProps: 'static getDerivedStateFromProps',
|
||
UNSAFE_componentWillUpdate: 'componentDidUpdate'
|
||
};
|
||
|
||
var pendingComponentWillMountWarnings = [];
|
||
var pendingComponentWillReceivePropsWarnings = [];
|
||
var pendingComponentWillUpdateWarnings = [];
|
||
var pendingUnsafeLifecycleWarnings = new Map();
|
||
var pendingLegacyContextWarning = new Map();
|
||
|
||
// Tracks components we have already warned about.
|
||
var didWarnAboutDeprecatedLifecycles = new Set();
|
||
var didWarnAboutUnsafeLifecycles = new Set();
|
||
var didWarnAboutLegacyContext = new Set();
|
||
|
||
var setToSortedString = function (set) {
|
||
var array = [];
|
||
set.forEach(function (value) {
|
||
array.push(value);
|
||
});
|
||
return array.sort().join(', ');
|
||
};
|
||
|
||
ReactStrictModeWarnings.discardPendingWarnings = function () {
|
||
pendingComponentWillMountWarnings = [];
|
||
pendingComponentWillReceivePropsWarnings = [];
|
||
pendingComponentWillUpdateWarnings = [];
|
||
pendingUnsafeLifecycleWarnings = new Map();
|
||
pendingLegacyContextWarning = new Map();
|
||
};
|
||
|
||
ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {
|
||
pendingUnsafeLifecycleWarnings.forEach(function (lifecycleWarningsMap, strictRoot) {
|
||
var lifecyclesWarningMesages = [];
|
||
|
||
Object.keys(lifecycleWarningsMap).forEach(function (lifecycle) {
|
||
var lifecycleWarnings = lifecycleWarningsMap[lifecycle];
|
||
if (lifecycleWarnings.length > 0) {
|
||
var componentNames = new Set();
|
||
lifecycleWarnings.forEach(function (fiber) {
|
||
componentNames.add(getComponentName(fiber.type) || 'Component');
|
||
didWarnAboutUnsafeLifecycles.add(fiber.type);
|
||
});
|
||
|
||
var formatted = lifecycle.replace('UNSAFE_', '');
|
||
var suggestion = LIFECYCLE_SUGGESTIONS[lifecycle];
|
||
var sortedComponentNames = setToSortedString(componentNames);
|
||
|
||
lifecyclesWarningMesages.push(formatted + ': Please update the following components to use ' + (suggestion + ' instead: ' + sortedComponentNames));
|
||
}
|
||
});
|
||
|
||
if (lifecyclesWarningMesages.length > 0) {
|
||
var strictRootComponentStack = getStackByFiberInDevAndProd(strictRoot);
|
||
|
||
warningWithoutStack$1(false, 'Unsafe lifecycle methods were found within a strict-mode tree:%s' + '\n\n%s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-strict-mode-warnings', strictRootComponentStack, lifecyclesWarningMesages.join('\n\n'));
|
||
}
|
||
});
|
||
|
||
pendingUnsafeLifecycleWarnings = new Map();
|
||
};
|
||
|
||
var findStrictRoot = function (fiber) {
|
||
var maybeStrictRoot = null;
|
||
|
||
var node = fiber;
|
||
while (node !== null) {
|
||
if (node.mode & StrictMode) {
|
||
maybeStrictRoot = node;
|
||
}
|
||
node = node.return;
|
||
}
|
||
|
||
return maybeStrictRoot;
|
||
};
|
||
|
||
ReactStrictModeWarnings.flushPendingDeprecationWarnings = function () {
|
||
if (pendingComponentWillMountWarnings.length > 0) {
|
||
var uniqueNames = new Set();
|
||
pendingComponentWillMountWarnings.forEach(function (fiber) {
|
||
uniqueNames.add(getComponentName(fiber.type) || 'Component');
|
||
didWarnAboutDeprecatedLifecycles.add(fiber.type);
|
||
});
|
||
|
||
var sortedNames = setToSortedString(uniqueNames);
|
||
|
||
lowPriorityWarning$1(false, 'componentWillMount is deprecated and will be removed in the next major version. ' + 'Use componentDidMount instead. As a temporary workaround, ' + 'you can rename to UNSAFE_componentWillMount.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-async-component-lifecycle-hooks', sortedNames);
|
||
|
||
pendingComponentWillMountWarnings = [];
|
||
}
|
||
|
||
if (pendingComponentWillReceivePropsWarnings.length > 0) {
|
||
var _uniqueNames = new Set();
|
||
pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {
|
||
_uniqueNames.add(getComponentName(fiber.type) || 'Component');
|
||
didWarnAboutDeprecatedLifecycles.add(fiber.type);
|
||
});
|
||
|
||
var _sortedNames = setToSortedString(_uniqueNames);
|
||
|
||
lowPriorityWarning$1(false, 'componentWillReceiveProps is deprecated and will be removed in the next major version. ' + 'Use static getDerivedStateFromProps instead.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-async-component-lifecycle-hooks', _sortedNames);
|
||
|
||
pendingComponentWillReceivePropsWarnings = [];
|
||
}
|
||
|
||
if (pendingComponentWillUpdateWarnings.length > 0) {
|
||
var _uniqueNames2 = new Set();
|
||
pendingComponentWillUpdateWarnings.forEach(function (fiber) {
|
||
_uniqueNames2.add(getComponentName(fiber.type) || 'Component');
|
||
didWarnAboutDeprecatedLifecycles.add(fiber.type);
|
||
});
|
||
|
||
var _sortedNames2 = setToSortedString(_uniqueNames2);
|
||
|
||
lowPriorityWarning$1(false, 'componentWillUpdate is deprecated and will be removed in the next major version. ' + 'Use componentDidUpdate instead. As a temporary workaround, ' + 'you can rename to UNSAFE_componentWillUpdate.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-async-component-lifecycle-hooks', _sortedNames2);
|
||
|
||
pendingComponentWillUpdateWarnings = [];
|
||
}
|
||
};
|
||
|
||
ReactStrictModeWarnings.recordDeprecationWarnings = function (fiber, instance) {
|
||
// Dedup strategy: Warn once per component.
|
||
if (didWarnAboutDeprecatedLifecycles.has(fiber.type)) {
|
||
return;
|
||
}
|
||
|
||
// Don't warn about react-lifecycles-compat polyfilled components.
|
||
if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {
|
||
pendingComponentWillMountWarnings.push(fiber);
|
||
}
|
||
if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
|
||
pendingComponentWillReceivePropsWarnings.push(fiber);
|
||
}
|
||
if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
|
||
pendingComponentWillUpdateWarnings.push(fiber);
|
||
}
|
||
};
|
||
|
||
ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {
|
||
var strictRoot = findStrictRoot(fiber);
|
||
if (strictRoot === null) {
|
||
warningWithoutStack$1(false, 'Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');
|
||
return;
|
||
}
|
||
|
||
// Dedup strategy: Warn once per component.
|
||
// This is difficult to track any other way since component names
|
||
// are often vague and are likely to collide between 3rd party libraries.
|
||
// An expand property is probably okay to use here since it's DEV-only,
|
||
// and will only be set in the event of serious warnings.
|
||
if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {
|
||
return;
|
||
}
|
||
|
||
var warningsForRoot = void 0;
|
||
if (!pendingUnsafeLifecycleWarnings.has(strictRoot)) {
|
||
warningsForRoot = {
|
||
UNSAFE_componentWillMount: [],
|
||
UNSAFE_componentWillReceiveProps: [],
|
||
UNSAFE_componentWillUpdate: []
|
||
};
|
||
|
||
pendingUnsafeLifecycleWarnings.set(strictRoot, warningsForRoot);
|
||
} else {
|
||
warningsForRoot = pendingUnsafeLifecycleWarnings.get(strictRoot);
|
||
}
|
||
|
||
var unsafeLifecycles = [];
|
||
if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true || typeof instance.UNSAFE_componentWillMount === 'function') {
|
||
unsafeLifecycles.push('UNSAFE_componentWillMount');
|
||
}
|
||
if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true || typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
|
||
unsafeLifecycles.push('UNSAFE_componentWillReceiveProps');
|
||
}
|
||
if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true || typeof instance.UNSAFE_componentWillUpdate === 'function') {
|
||
unsafeLifecycles.push('UNSAFE_componentWillUpdate');
|
||
}
|
||
|
||
if (unsafeLifecycles.length > 0) {
|
||
unsafeLifecycles.forEach(function (lifecycle) {
|
||
warningsForRoot[lifecycle].push(fiber);
|
||
});
|
||
}
|
||
};
|
||
|
||
ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {
|
||
var strictRoot = findStrictRoot(fiber);
|
||
if (strictRoot === null) {
|
||
warningWithoutStack$1(false, 'Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');
|
||
return;
|
||
}
|
||
|
||
// Dedup strategy: Warn once per component.
|
||
if (didWarnAboutLegacyContext.has(fiber.type)) {
|
||
return;
|
||
}
|
||
|
||
var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);
|
||
|
||
if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {
|
||
if (warningsForRoot === undefined) {
|
||
warningsForRoot = [];
|
||
pendingLegacyContextWarning.set(strictRoot, warningsForRoot);
|
||
}
|
||
warningsForRoot.push(fiber);
|
||
}
|
||
};
|
||
|
||
ReactStrictModeWarnings.flushLegacyContextWarning = function () {
|
||
pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {
|
||
var uniqueNames = new Set();
|
||
fiberArray.forEach(function (fiber) {
|
||
uniqueNames.add(getComponentName(fiber.type) || 'Component');
|
||
didWarnAboutLegacyContext.add(fiber.type);
|
||
});
|
||
|
||
var sortedNames = setToSortedString(uniqueNames);
|
||
var strictRootComponentStack = getStackByFiberInDevAndProd(strictRoot);
|
||
|
||
warningWithoutStack$1(false, 'Legacy context API has been detected within a strict-mode tree: %s' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-strict-mode-warnings', strictRootComponentStack, sortedNames);
|
||
});
|
||
};
|
||
}
|
||
|
||
// This lets us hook into Fiber to debug what it's doing.
|
||
// See https://github.com/facebook/react/pull/8033.
|
||
// This is not part of the public API, not even for React DevTools.
|
||
// You may only inject a debugTool if you work on React Fiber itself.
|
||
var ReactFiberInstrumentation = {
|
||
debugTool: null
|
||
};
|
||
|
||
var ReactFiberInstrumentation_1 = ReactFiberInstrumentation;
|
||
|
||
// TODO: Offscreen updates should never suspend. However, a promise that
|
||
// suspended inside an offscreen subtree should be able to ping at the priority
|
||
// of the outer render.
|
||
|
||
function markPendingPriorityLevel(root, expirationTime) {
|
||
// If there's a gap between completing a failed root and retrying it,
|
||
// additional updates may be scheduled. Clear `didError`, in case the update
|
||
// is sufficient to fix the error.
|
||
root.didError = false;
|
||
|
||
// Update the latest and earliest pending times
|
||
var earliestPendingTime = root.earliestPendingTime;
|
||
if (earliestPendingTime === NoWork) {
|
||
// No other pending updates.
|
||
root.earliestPendingTime = root.latestPendingTime = expirationTime;
|
||
} else {
|
||
if (earliestPendingTime < expirationTime) {
|
||
// This is the earliest pending update.
|
||
root.earliestPendingTime = expirationTime;
|
||
} else {
|
||
var latestPendingTime = root.latestPendingTime;
|
||
if (latestPendingTime > expirationTime) {
|
||
// This is the latest pending update
|
||
root.latestPendingTime = expirationTime;
|
||
}
|
||
}
|
||
}
|
||
findNextExpirationTimeToWorkOn(expirationTime, root);
|
||
}
|
||
|
||
function markCommittedPriorityLevels(root, earliestRemainingTime) {
|
||
root.didError = false;
|
||
|
||
if (earliestRemainingTime === NoWork) {
|
||
// Fast path. There's no remaining work. Clear everything.
|
||
root.earliestPendingTime = NoWork;
|
||
root.latestPendingTime = NoWork;
|
||
root.earliestSuspendedTime = NoWork;
|
||
root.latestSuspendedTime = NoWork;
|
||
root.latestPingedTime = NoWork;
|
||
findNextExpirationTimeToWorkOn(NoWork, root);
|
||
return;
|
||
}
|
||
|
||
if (earliestRemainingTime < root.latestPingedTime) {
|
||
root.latestPingedTime = NoWork;
|
||
}
|
||
|
||
// Let's see if the previous latest known pending level was just flushed.
|
||
var latestPendingTime = root.latestPendingTime;
|
||
if (latestPendingTime !== NoWork) {
|
||
if (latestPendingTime > earliestRemainingTime) {
|
||
// We've flushed all the known pending levels.
|
||
root.earliestPendingTime = root.latestPendingTime = NoWork;
|
||
} else {
|
||
var earliestPendingTime = root.earliestPendingTime;
|
||
if (earliestPendingTime > earliestRemainingTime) {
|
||
// We've flushed the earliest known pending level. Set this to the
|
||
// latest pending time.
|
||
root.earliestPendingTime = root.latestPendingTime;
|
||
}
|
||
}
|
||
}
|
||
|
||
// Now let's handle the earliest remaining level in the whole tree. We need to
|
||
// decide whether to treat it as a pending level or as suspended. Check
|
||
// it falls within the range of known suspended levels.
|
||
|
||
var earliestSuspendedTime = root.earliestSuspendedTime;
|
||
if (earliestSuspendedTime === NoWork) {
|
||
// There's no suspended work. Treat the earliest remaining level as a
|
||
// pending level.
|
||
markPendingPriorityLevel(root, earliestRemainingTime);
|
||
findNextExpirationTimeToWorkOn(NoWork, root);
|
||
return;
|
||
}
|
||
|
||
var latestSuspendedTime = root.latestSuspendedTime;
|
||
if (earliestRemainingTime < latestSuspendedTime) {
|
||
// The earliest remaining level is later than all the suspended work. That
|
||
// means we've flushed all the suspended work.
|
||
root.earliestSuspendedTime = NoWork;
|
||
root.latestSuspendedTime = NoWork;
|
||
root.latestPingedTime = NoWork;
|
||
|
||
// There's no suspended work. Treat the earliest remaining level as a
|
||
// pending level.
|
||
markPendingPriorityLevel(root, earliestRemainingTime);
|
||
findNextExpirationTimeToWorkOn(NoWork, root);
|
||
return;
|
||
}
|
||
|
||
if (earliestRemainingTime > earliestSuspendedTime) {
|
||
// The earliest remaining time is earlier than all the suspended work.
|
||
// Treat it as a pending update.
|
||
markPendingPriorityLevel(root, earliestRemainingTime);
|
||
findNextExpirationTimeToWorkOn(NoWork, root);
|
||
return;
|
||
}
|
||
|
||
// The earliest remaining time falls within the range of known suspended
|
||
// levels. We should treat this as suspended work.
|
||
findNextExpirationTimeToWorkOn(NoWork, root);
|
||
}
|
||
|
||
function hasLowerPriorityWork(root, erroredExpirationTime) {
|
||
var latestPendingTime = root.latestPendingTime;
|
||
var latestSuspendedTime = root.latestSuspendedTime;
|
||
var latestPingedTime = root.latestPingedTime;
|
||
return latestPendingTime !== NoWork && latestPendingTime < erroredExpirationTime || latestSuspendedTime !== NoWork && latestSuspendedTime < erroredExpirationTime || latestPingedTime !== NoWork && latestPingedTime < erroredExpirationTime;
|
||
}
|
||
|
||
function isPriorityLevelSuspended(root, expirationTime) {
|
||
var earliestSuspendedTime = root.earliestSuspendedTime;
|
||
var latestSuspendedTime = root.latestSuspendedTime;
|
||
return earliestSuspendedTime !== NoWork && expirationTime <= earliestSuspendedTime && expirationTime >= latestSuspendedTime;
|
||
}
|
||
|
||
function markSuspendedPriorityLevel(root, suspendedTime) {
|
||
root.didError = false;
|
||
clearPing(root, suspendedTime);
|
||
|
||
// First, check the known pending levels and update them if needed.
|
||
var earliestPendingTime = root.earliestPendingTime;
|
||
var latestPendingTime = root.latestPendingTime;
|
||
if (earliestPendingTime === suspendedTime) {
|
||
if (latestPendingTime === suspendedTime) {
|
||
// Both known pending levels were suspended. Clear them.
|
||
root.earliestPendingTime = root.latestPendingTime = NoWork;
|
||
} else {
|
||
// The earliest pending level was suspended. Clear by setting it to the
|
||
// latest pending level.
|
||
root.earliestPendingTime = latestPendingTime;
|
||
}
|
||
} else if (latestPendingTime === suspendedTime) {
|
||
// The latest pending level was suspended. Clear by setting it to the
|
||
// latest pending level.
|
||
root.latestPendingTime = earliestPendingTime;
|
||
}
|
||
|
||
// Finally, update the known suspended levels.
|
||
var earliestSuspendedTime = root.earliestSuspendedTime;
|
||
var latestSuspendedTime = root.latestSuspendedTime;
|
||
if (earliestSuspendedTime === NoWork) {
|
||
// No other suspended levels.
|
||
root.earliestSuspendedTime = root.latestSuspendedTime = suspendedTime;
|
||
} else {
|
||
if (earliestSuspendedTime < suspendedTime) {
|
||
// This is the earliest suspended level.
|
||
root.earliestSuspendedTime = suspendedTime;
|
||
} else if (latestSuspendedTime > suspendedTime) {
|
||
// This is the latest suspended level
|
||
root.latestSuspendedTime = suspendedTime;
|
||
}
|
||
}
|
||
|
||
findNextExpirationTimeToWorkOn(suspendedTime, root);
|
||
}
|
||
|
||
function markPingedPriorityLevel(root, pingedTime) {
|
||
root.didError = false;
|
||
|
||
// TODO: When we add back resuming, we need to ensure the progressed work
|
||
// is thrown out and not reused during the restarted render. One way to
|
||
// invalidate the progressed work is to restart at expirationTime + 1.
|
||
var latestPingedTime = root.latestPingedTime;
|
||
if (latestPingedTime === NoWork || latestPingedTime > pingedTime) {
|
||
root.latestPingedTime = pingedTime;
|
||
}
|
||
findNextExpirationTimeToWorkOn(pingedTime, root);
|
||
}
|
||
|
||
function clearPing(root, completedTime) {
|
||
var latestPingedTime = root.latestPingedTime;
|
||
if (latestPingedTime >= completedTime) {
|
||
root.latestPingedTime = NoWork;
|
||
}
|
||
}
|
||
|
||
function findEarliestOutstandingPriorityLevel(root, renderExpirationTime) {
|
||
var earliestExpirationTime = renderExpirationTime;
|
||
|
||
var earliestPendingTime = root.earliestPendingTime;
|
||
var earliestSuspendedTime = root.earliestSuspendedTime;
|
||
if (earliestPendingTime > earliestExpirationTime) {
|
||
earliestExpirationTime = earliestPendingTime;
|
||
}
|
||
if (earliestSuspendedTime > earliestExpirationTime) {
|
||
earliestExpirationTime = earliestSuspendedTime;
|
||
}
|
||
return earliestExpirationTime;
|
||
}
|
||
|
||
function didExpireAtExpirationTime(root, currentTime) {
|
||
var expirationTime = root.expirationTime;
|
||
if (expirationTime !== NoWork && currentTime <= expirationTime) {
|
||
// The root has expired. Flush all work up to the current time.
|
||
root.nextExpirationTimeToWorkOn = currentTime;
|
||
}
|
||
}
|
||
|
||
function findNextExpirationTimeToWorkOn(completedExpirationTime, root) {
|
||
var earliestSuspendedTime = root.earliestSuspendedTime;
|
||
var latestSuspendedTime = root.latestSuspendedTime;
|
||
var earliestPendingTime = root.earliestPendingTime;
|
||
var latestPingedTime = root.latestPingedTime;
|
||
|
||
// Work on the earliest pending time. Failing that, work on the latest
|
||
// pinged time.
|
||
var nextExpirationTimeToWorkOn = earliestPendingTime !== NoWork ? earliestPendingTime : latestPingedTime;
|
||
|
||
// If there is no pending or pinged work, check if there's suspended work
|
||
// that's lower priority than what we just completed.
|
||
if (nextExpirationTimeToWorkOn === NoWork && (completedExpirationTime === NoWork || latestSuspendedTime < completedExpirationTime)) {
|
||
// The lowest priority suspended work is the work most likely to be
|
||
// committed next. Let's start rendering it again, so that if it times out,
|
||
// it's ready to commit.
|
||
nextExpirationTimeToWorkOn = latestSuspendedTime;
|
||
}
|
||
|
||
var expirationTime = nextExpirationTimeToWorkOn;
|
||
if (expirationTime !== NoWork && earliestSuspendedTime > expirationTime) {
|
||
// Expire using the earliest known expiration time.
|
||
expirationTime = earliestSuspendedTime;
|
||
}
|
||
|
||
root.nextExpirationTimeToWorkOn = nextExpirationTimeToWorkOn;
|
||
root.expirationTime = expirationTime;
|
||
}
|
||
|
||
// UpdateQueue is a linked list of prioritized updates.
|
||
//
|
||
// Like fibers, update queues come in pairs: a current queue, which represents
|
||
// the visible state of the screen, and a work-in-progress queue, which is
|
||
// can be mutated and processed asynchronously before it is committed — a form
|
||
// of double buffering. If a work-in-progress render is discarded before
|
||
// finishing, we create a new work-in-progress by cloning the current queue.
|
||
//
|
||
// Both queues share a persistent, singly-linked list structure. To schedule an
|
||
// update, we append it to the end of both queues. Each queue maintains a
|
||
// pointer to first update in the persistent list that hasn't been processed.
|
||
// The work-in-progress pointer always has a position equal to or greater than
|
||
// the current queue, since we always work on that one. The current queue's
|
||
// pointer is only updated during the commit phase, when we swap in the
|
||
// work-in-progress.
|
||
//
|
||
// For example:
|
||
//
|
||
// Current pointer: A - B - C - D - E - F
|
||
// Work-in-progress pointer: D - E - F
|
||
// ^
|
||
// The work-in-progress queue has
|
||
// processed more updates than current.
|
||
//
|
||
// The reason we append to both queues is because otherwise we might drop
|
||
// updates without ever processing them. For example, if we only add updates to
|
||
// the work-in-progress queue, some updates could be lost whenever a work-in
|
||
// -progress render restarts by cloning from current. Similarly, if we only add
|
||
// updates to the current queue, the updates will be lost whenever an already
|
||
// in-progress queue commits and swaps with the current queue. However, by
|
||
// adding to both queues, we guarantee that the update will be part of the next
|
||
// work-in-progress. (And because the work-in-progress queue becomes the
|
||
// current queue once it commits, there's no danger of applying the same
|
||
// update twice.)
|
||
//
|
||
// Prioritization
|
||
// --------------
|
||
//
|
||
// Updates are not sorted by priority, but by insertion; new updates are always
|
||
// appended to the end of the list.
|
||
//
|
||
// The priority is still important, though. When processing the update queue
|
||
// during the render phase, only the updates with sufficient priority are
|
||
// included in the result. If we skip an update because it has insufficient
|
||
// priority, it remains in the queue to be processed later, during a lower
|
||
// priority render. Crucially, all updates subsequent to a skipped update also
|
||
// remain in the queue *regardless of their priority*. That means high priority
|
||
// updates are sometimes processed twice, at two separate priorities. We also
|
||
// keep track of a base state, that represents the state before the first
|
||
// update in the queue is applied.
|
||
//
|
||
// For example:
|
||
//
|
||
// Given a base state of '', and the following queue of updates
|
||
//
|
||
// A1 - B2 - C1 - D2
|
||
//
|
||
// where the number indicates the priority, and the update is applied to the
|
||
// previous state by appending a letter, React will process these updates as
|
||
// two separate renders, one per distinct priority level:
|
||
//
|
||
// First render, at priority 1:
|
||
// Base state: ''
|
||
// Updates: [A1, C1]
|
||
// Result state: 'AC'
|
||
//
|
||
// Second render, at priority 2:
|
||
// Base state: 'A' <- The base state does not include C1,
|
||
// because B2 was skipped.
|
||
// Updates: [B2, C1, D2] <- C1 was rebased on top of B2
|
||
// Result state: 'ABCD'
|
||
//
|
||
// Because we process updates in insertion order, and rebase high priority
|
||
// updates when preceding updates are skipped, the final result is deterministic
|
||
// regardless of priority. Intermediate state may vary according to system
|
||
// resources, but the final state is always the same.
|
||
|
||
var UpdateState = 0;
|
||
var ReplaceState = 1;
|
||
var ForceUpdate = 2;
|
||
var CaptureUpdate = 3;
|
||
|
||
// Global state that is reset at the beginning of calling `processUpdateQueue`.
|
||
// It should only be read right after calling `processUpdateQueue`, via
|
||
// `checkHasForceUpdateAfterProcessing`.
|
||
var hasForceUpdate = false;
|
||
|
||
var didWarnUpdateInsideUpdate = void 0;
|
||
var currentlyProcessingQueue = void 0;
|
||
var resetCurrentlyProcessingQueue = void 0;
|
||
{
|
||
didWarnUpdateInsideUpdate = false;
|
||
currentlyProcessingQueue = null;
|
||
resetCurrentlyProcessingQueue = function () {
|
||
currentlyProcessingQueue = null;
|
||
};
|
||
}
|
||
|
||
function createUpdateQueue(baseState) {
|
||
var queue = {
|
||
baseState: baseState,
|
||
firstUpdate: null,
|
||
lastUpdate: null,
|
||
firstCapturedUpdate: null,
|
||
lastCapturedUpdate: null,
|
||
firstEffect: null,
|
||
lastEffect: null,
|
||
firstCapturedEffect: null,
|
||
lastCapturedEffect: null
|
||
};
|
||
return queue;
|
||
}
|
||
|
||
function cloneUpdateQueue(currentQueue) {
|
||
var queue = {
|
||
baseState: currentQueue.baseState,
|
||
firstUpdate: currentQueue.firstUpdate,
|
||
lastUpdate: currentQueue.lastUpdate,
|
||
|
||
// TODO: With resuming, if we bail out and resuse the child tree, we should
|
||
// keep these effects.
|
||
firstCapturedUpdate: null,
|
||
lastCapturedUpdate: null,
|
||
|
||
firstEffect: null,
|
||
lastEffect: null,
|
||
|
||
firstCapturedEffect: null,
|
||
lastCapturedEffect: null
|
||
};
|
||
return queue;
|
||
}
|
||
|
||
function createUpdate(expirationTime) {
|
||
return {
|
||
expirationTime: expirationTime,
|
||
|
||
tag: UpdateState,
|
||
payload: null,
|
||
callback: null,
|
||
|
||
next: null,
|
||
nextEffect: null
|
||
};
|
||
}
|
||
|
||
function appendUpdateToQueue(queue, update) {
|
||
// Append the update to the end of the list.
|
||
if (queue.lastUpdate === null) {
|
||
// Queue is empty
|
||
queue.firstUpdate = queue.lastUpdate = update;
|
||
} else {
|
||
queue.lastUpdate.next = update;
|
||
queue.lastUpdate = update;
|
||
}
|
||
}
|
||
|
||
function enqueueUpdate(fiber, update) {
|
||
// Update queues are created lazily.
|
||
var alternate = fiber.alternate;
|
||
var queue1 = void 0;
|
||
var queue2 = void 0;
|
||
if (alternate === null) {
|
||
// There's only one fiber.
|
||
queue1 = fiber.updateQueue;
|
||
queue2 = null;
|
||
if (queue1 === null) {
|
||
queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState);
|
||
}
|
||
} else {
|
||
// There are two owners.
|
||
queue1 = fiber.updateQueue;
|
||
queue2 = alternate.updateQueue;
|
||
if (queue1 === null) {
|
||
if (queue2 === null) {
|
||
// Neither fiber has an update queue. Create new ones.
|
||
queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState);
|
||
queue2 = alternate.updateQueue = createUpdateQueue(alternate.memoizedState);
|
||
} else {
|
||
// Only one fiber has an update queue. Clone to create a new one.
|
||
queue1 = fiber.updateQueue = cloneUpdateQueue(queue2);
|
||
}
|
||
} else {
|
||
if (queue2 === null) {
|
||
// Only one fiber has an update queue. Clone to create a new one.
|
||
queue2 = alternate.updateQueue = cloneUpdateQueue(queue1);
|
||
} else {
|
||
// Both owners have an update queue.
|
||
}
|
||
}
|
||
}
|
||
if (queue2 === null || queue1 === queue2) {
|
||
// There's only a single queue.
|
||
appendUpdateToQueue(queue1, update);
|
||
} else {
|
||
// There are two queues. We need to append the update to both queues,
|
||
// while accounting for the persistent structure of the list — we don't
|
||
// want the same update to be added multiple times.
|
||
if (queue1.lastUpdate === null || queue2.lastUpdate === null) {
|
||
// One of the queues is not empty. We must add the update to both queues.
|
||
appendUpdateToQueue(queue1, update);
|
||
appendUpdateToQueue(queue2, update);
|
||
} else {
|
||
// Both queues are non-empty. The last update is the same in both lists,
|
||
// because of structural sharing. So, only append to one of the lists.
|
||
appendUpdateToQueue(queue1, update);
|
||
// But we still need to update the `lastUpdate` pointer of queue2.
|
||
queue2.lastUpdate = update;
|
||
}
|
||
}
|
||
|
||
{
|
||
if (fiber.tag === ClassComponent && (currentlyProcessingQueue === queue1 || queue2 !== null && currentlyProcessingQueue === queue2) && !didWarnUpdateInsideUpdate) {
|
||
warningWithoutStack$1(false, 'An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');
|
||
didWarnUpdateInsideUpdate = true;
|
||
}
|
||
}
|
||
}
|
||
|
||
function enqueueCapturedUpdate(workInProgress, update) {
|
||
// Captured updates go into a separate list, and only on the work-in-
|
||
// progress queue.
|
||
var workInProgressQueue = workInProgress.updateQueue;
|
||
if (workInProgressQueue === null) {
|
||
workInProgressQueue = workInProgress.updateQueue = createUpdateQueue(workInProgress.memoizedState);
|
||
} else {
|
||
// TODO: I put this here rather than createWorkInProgress so that we don't
|
||
// clone the queue unnecessarily. There's probably a better way to
|
||
// structure this.
|
||
workInProgressQueue = ensureWorkInProgressQueueIsAClone(workInProgress, workInProgressQueue);
|
||
}
|
||
|
||
// Append the update to the end of the list.
|
||
if (workInProgressQueue.lastCapturedUpdate === null) {
|
||
// This is the first render phase update
|
||
workInProgressQueue.firstCapturedUpdate = workInProgressQueue.lastCapturedUpdate = update;
|
||
} else {
|
||
workInProgressQueue.lastCapturedUpdate.next = update;
|
||
workInProgressQueue.lastCapturedUpdate = update;
|
||
}
|
||
}
|
||
|
||
function ensureWorkInProgressQueueIsAClone(workInProgress, queue) {
|
||
var current = workInProgress.alternate;
|
||
if (current !== null) {
|
||
// If the work-in-progress queue is equal to the current queue,
|
||
// we need to clone it first.
|
||
if (queue === current.updateQueue) {
|
||
queue = workInProgress.updateQueue = cloneUpdateQueue(queue);
|
||
}
|
||
}
|
||
return queue;
|
||
}
|
||
|
||
function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
|
||
switch (update.tag) {
|
||
case ReplaceState:
|
||
{
|
||
var _payload = update.payload;
|
||
if (typeof _payload === 'function') {
|
||
// Updater function
|
||
{
|
||
if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
|
||
_payload.call(instance, prevState, nextProps);
|
||
}
|
||
}
|
||
return _payload.call(instance, prevState, nextProps);
|
||
}
|
||
// State object
|
||
return _payload;
|
||
}
|
||
case CaptureUpdate:
|
||
{
|
||
workInProgress.effectTag = workInProgress.effectTag & ~ShouldCapture | DidCapture;
|
||
}
|
||
// Intentional fallthrough
|
||
case UpdateState:
|
||
{
|
||
var _payload2 = update.payload;
|
||
var partialState = void 0;
|
||
if (typeof _payload2 === 'function') {
|
||
// Updater function
|
||
{
|
||
if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
|
||
_payload2.call(instance, prevState, nextProps);
|
||
}
|
||
}
|
||
partialState = _payload2.call(instance, prevState, nextProps);
|
||
} else {
|
||
// Partial state object
|
||
partialState = _payload2;
|
||
}
|
||
if (partialState === null || partialState === undefined) {
|
||
// Null and undefined are treated as no-ops.
|
||
return prevState;
|
||
}
|
||
// Merge the partial state and the previous state.
|
||
return _assign({}, prevState, partialState);
|
||
}
|
||
case ForceUpdate:
|
||
{
|
||
hasForceUpdate = true;
|
||
return prevState;
|
||
}
|
||
}
|
||
return prevState;
|
||
}
|
||
|
||
function processUpdateQueue(workInProgress, queue, props, instance, renderExpirationTime) {
|
||
hasForceUpdate = false;
|
||
|
||
queue = ensureWorkInProgressQueueIsAClone(workInProgress, queue);
|
||
|
||
{
|
||
currentlyProcessingQueue = queue;
|
||
}
|
||
|
||
// These values may change as we process the queue.
|
||
var newBaseState = queue.baseState;
|
||
var newFirstUpdate = null;
|
||
var newExpirationTime = NoWork;
|
||
|
||
// Iterate through the list of updates to compute the result.
|
||
var update = queue.firstUpdate;
|
||
var resultState = newBaseState;
|
||
while (update !== null) {
|
||
var updateExpirationTime = update.expirationTime;
|
||
if (updateExpirationTime < renderExpirationTime) {
|
||
// This update does not have sufficient priority. Skip it.
|
||
if (newFirstUpdate === null) {
|
||
// This is the first skipped update. It will be the first update in
|
||
// the new list.
|
||
newFirstUpdate = update;
|
||
// Since this is the first update that was skipped, the current result
|
||
// is the new base state.
|
||
newBaseState = resultState;
|
||
}
|
||
// Since this update will remain in the list, update the remaining
|
||
// expiration time.
|
||
if (newExpirationTime < updateExpirationTime) {
|
||
newExpirationTime = updateExpirationTime;
|
||
}
|
||
} else {
|
||
// This update does have sufficient priority. Process it and compute
|
||
// a new result.
|
||
resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance);
|
||
var _callback = update.callback;
|
||
if (_callback !== null) {
|
||
workInProgress.effectTag |= Callback;
|
||
// Set this to null, in case it was mutated during an aborted render.
|
||
update.nextEffect = null;
|
||
if (queue.lastEffect === null) {
|
||
queue.firstEffect = queue.lastEffect = update;
|
||
} else {
|
||
queue.lastEffect.nextEffect = update;
|
||
queue.lastEffect = update;
|
||
}
|
||
}
|
||
}
|
||
// Continue to the next update.
|
||
update = update.next;
|
||
}
|
||
|
||
// Separately, iterate though the list of captured updates.
|
||
var newFirstCapturedUpdate = null;
|
||
update = queue.firstCapturedUpdate;
|
||
while (update !== null) {
|
||
var _updateExpirationTime = update.expirationTime;
|
||
if (_updateExpirationTime < renderExpirationTime) {
|
||
// This update does not have sufficient priority. Skip it.
|
||
if (newFirstCapturedUpdate === null) {
|
||
// This is the first skipped captured update. It will be the first
|
||
// update in the new list.
|
||
newFirstCapturedUpdate = update;
|
||
// If this is the first update that was skipped, the current result is
|
||
// the new base state.
|
||
if (newFirstUpdate === null) {
|
||
newBaseState = resultState;
|
||
}
|
||
}
|
||
// Since this update will remain in the list, update the remaining
|
||
// expiration time.
|
||
if (newExpirationTime < _updateExpirationTime) {
|
||
newExpirationTime = _updateExpirationTime;
|
||
}
|
||
} else {
|
||
// This update does have sufficient priority. Process it and compute
|
||
// a new result.
|
||
resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance);
|
||
var _callback2 = update.callback;
|
||
if (_callback2 !== null) {
|
||
workInProgress.effectTag |= Callback;
|
||
// Set this to null, in case it was mutated during an aborted render.
|
||
update.nextEffect = null;
|
||
if (queue.lastCapturedEffect === null) {
|
||
queue.firstCapturedEffect = queue.lastCapturedEffect = update;
|
||
} else {
|
||
queue.lastCapturedEffect.nextEffect = update;
|
||
queue.lastCapturedEffect = update;
|
||
}
|
||
}
|
||
}
|
||
update = update.next;
|
||
}
|
||
|
||
if (newFirstUpdate === null) {
|
||
queue.lastUpdate = null;
|
||
}
|
||
if (newFirstCapturedUpdate === null) {
|
||
queue.lastCapturedUpdate = null;
|
||
} else {
|
||
workInProgress.effectTag |= Callback;
|
||
}
|
||
if (newFirstUpdate === null && newFirstCapturedUpdate === null) {
|
||
// We processed every update, without skipping. That means the new base
|
||
// state is the same as the result state.
|
||
newBaseState = resultState;
|
||
}
|
||
|
||
queue.baseState = newBaseState;
|
||
queue.firstUpdate = newFirstUpdate;
|
||
queue.firstCapturedUpdate = newFirstCapturedUpdate;
|
||
|
||
// Set the remaining expiration time to be whatever is remaining in the queue.
|
||
// This should be fine because the only two other things that contribute to
|
||
// expiration time are props and context. We're already in the middle of the
|
||
// begin phase by the time we start processing the queue, so we've already
|
||
// dealt with the props. Context in components that specify
|
||
// shouldComponentUpdate is tricky; but we'll have to account for
|
||
// that regardless.
|
||
workInProgress.expirationTime = newExpirationTime;
|
||
workInProgress.memoizedState = resultState;
|
||
|
||
{
|
||
currentlyProcessingQueue = null;
|
||
}
|
||
}
|
||
|
||
function callCallback(callback, context) {
|
||
!(typeof callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', callback) : void 0;
|
||
callback.call(context);
|
||
}
|
||
|
||
function resetHasForceUpdateBeforeProcessing() {
|
||
hasForceUpdate = false;
|
||
}
|
||
|
||
function checkHasForceUpdateAfterProcessing() {
|
||
return hasForceUpdate;
|
||
}
|
||
|
||
function commitUpdateQueue(finishedWork, finishedQueue, instance, renderExpirationTime) {
|
||
// If the finished render included captured updates, and there are still
|
||
// lower priority updates left over, we need to keep the captured updates
|
||
// in the queue so that they are rebased and not dropped once we process the
|
||
// queue again at the lower priority.
|
||
if (finishedQueue.firstCapturedUpdate !== null) {
|
||
// Join the captured update list to the end of the normal list.
|
||
if (finishedQueue.lastUpdate !== null) {
|
||
finishedQueue.lastUpdate.next = finishedQueue.firstCapturedUpdate;
|
||
finishedQueue.lastUpdate = finishedQueue.lastCapturedUpdate;
|
||
}
|
||
// Clear the list of captured updates.
|
||
finishedQueue.firstCapturedUpdate = finishedQueue.lastCapturedUpdate = null;
|
||
}
|
||
|
||
// Commit the effects
|
||
commitUpdateEffects(finishedQueue.firstEffect, instance);
|
||
finishedQueue.firstEffect = finishedQueue.lastEffect = null;
|
||
|
||
commitUpdateEffects(finishedQueue.firstCapturedEffect, instance);
|
||
finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null;
|
||
}
|
||
|
||
function commitUpdateEffects(effect, instance) {
|
||
while (effect !== null) {
|
||
var _callback3 = effect.callback;
|
||
if (_callback3 !== null) {
|
||
effect.callback = null;
|
||
callCallback(_callback3, instance);
|
||
}
|
||
effect = effect.nextEffect;
|
||
}
|
||
}
|
||
|
||
function createCapturedValue(value, source) {
|
||
// If the value is an error, call this function immediately after it is thrown
|
||
// so the stack is accurate.
|
||
return {
|
||
value: value,
|
||
source: source,
|
||
stack: getStackByFiberInDevAndProd(source)
|
||
};
|
||
}
|
||
|
||
var valueCursor = createCursor(null);
|
||
|
||
var rendererSigil = void 0;
|
||
{
|
||
// Use this to detect multiple renderers using the same context
|
||
rendererSigil = {};
|
||
}
|
||
|
||
var currentlyRenderingFiber = null;
|
||
var lastContextDependency = null;
|
||
var lastContextWithAllBitsObserved = null;
|
||
|
||
function resetContextDependences() {
|
||
// This is called right before React yields execution, to ensure `readContext`
|
||
// cannot be called outside the render phase.
|
||
currentlyRenderingFiber = null;
|
||
lastContextDependency = null;
|
||
lastContextWithAllBitsObserved = null;
|
||
}
|
||
|
||
function pushProvider(providerFiber, nextValue) {
|
||
var context = providerFiber.type._context;
|
||
|
||
if (isPrimaryRenderer) {
|
||
push(valueCursor, context._currentValue, providerFiber);
|
||
|
||
context._currentValue = nextValue;
|
||
{
|
||
!(context._currentRenderer === undefined || context._currentRenderer === null || context._currentRenderer === rendererSigil) ? warningWithoutStack$1(false, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.') : void 0;
|
||
context._currentRenderer = rendererSigil;
|
||
}
|
||
} else {
|
||
push(valueCursor, context._currentValue2, providerFiber);
|
||
|
||
context._currentValue2 = nextValue;
|
||
{
|
||
!(context._currentRenderer2 === undefined || context._currentRenderer2 === null || context._currentRenderer2 === rendererSigil) ? warningWithoutStack$1(false, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.') : void 0;
|
||
context._currentRenderer2 = rendererSigil;
|
||
}
|
||
}
|
||
}
|
||
|
||
function popProvider(providerFiber) {
|
||
var currentValue = valueCursor.current;
|
||
|
||
pop(valueCursor, providerFiber);
|
||
|
||
var context = providerFiber.type._context;
|
||
if (isPrimaryRenderer) {
|
||
context._currentValue = currentValue;
|
||
} else {
|
||
context._currentValue2 = currentValue;
|
||
}
|
||
}
|
||
|
||
function calculateChangedBits(context, newValue, oldValue) {
|
||
// Use Object.is to compare the new context value to the old value. Inlined
|
||
// Object.is polyfill.
|
||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
||
if (oldValue === newValue && (oldValue !== 0 || 1 / oldValue === 1 / newValue) || oldValue !== oldValue && newValue !== newValue // eslint-disable-line no-self-compare
|
||
) {
|
||
// No change
|
||
return 0;
|
||
} else {
|
||
var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : maxSigned31BitInt;
|
||
|
||
{
|
||
!((changedBits & maxSigned31BitInt) === changedBits) ? warning$1(false, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits) : void 0;
|
||
}
|
||
return changedBits | 0;
|
||
}
|
||
}
|
||
|
||
function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {
|
||
var fiber = workInProgress.child;
|
||
if (fiber !== null) {
|
||
// Set the return pointer of the child to the work-in-progress fiber.
|
||
fiber.return = workInProgress;
|
||
}
|
||
while (fiber !== null) {
|
||
var nextFiber = void 0;
|
||
|
||
// Visit this fiber.
|
||
var dependency = fiber.firstContextDependency;
|
||
if (dependency !== null) {
|
||
do {
|
||
// Check if the context matches.
|
||
if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {
|
||
// Match! Schedule an update on this fiber.
|
||
|
||
if (fiber.tag === ClassComponent) {
|
||
// Schedule a force update on the work-in-progress.
|
||
var update = createUpdate(renderExpirationTime);
|
||
update.tag = ForceUpdate;
|
||
// TODO: Because we don't have a work-in-progress, this will add the
|
||
// update to the current fiber, too, which means it will persist even if
|
||
// this render is thrown away. Since it's a race condition, not sure it's
|
||
// worth fixing.
|
||
enqueueUpdate(fiber, update);
|
||
}
|
||
|
||
if (fiber.expirationTime < renderExpirationTime) {
|
||
fiber.expirationTime = renderExpirationTime;
|
||
}
|
||
var alternate = fiber.alternate;
|
||
if (alternate !== null && alternate.expirationTime < renderExpirationTime) {
|
||
alternate.expirationTime = renderExpirationTime;
|
||
}
|
||
// Update the child expiration time of all the ancestors, including
|
||
// the alternates.
|
||
var node = fiber.return;
|
||
while (node !== null) {
|
||
alternate = node.alternate;
|
||
if (node.childExpirationTime < renderExpirationTime) {
|
||
node.childExpirationTime = renderExpirationTime;
|
||
if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
|
||
alternate.childExpirationTime = renderExpirationTime;
|
||
}
|
||
} else if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
|
||
alternate.childExpirationTime = renderExpirationTime;
|
||
} else {
|
||
// Neither alternate was updated, which means the rest of the
|
||
// ancestor path already has sufficient priority.
|
||
break;
|
||
}
|
||
node = node.return;
|
||
}
|
||
}
|
||
nextFiber = fiber.child;
|
||
dependency = dependency.next;
|
||
} while (dependency !== null);
|
||
} else if (fiber.tag === ContextProvider) {
|
||
// Don't scan deeper if this is a matching provider
|
||
nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
|
||
} else {
|
||
// Traverse down.
|
||
nextFiber = fiber.child;
|
||
}
|
||
|
||
if (nextFiber !== null) {
|
||
// Set the return pointer of the child to the work-in-progress fiber.
|
||
nextFiber.return = fiber;
|
||
} else {
|
||
// No child. Traverse to next sibling.
|
||
nextFiber = fiber;
|
||
while (nextFiber !== null) {
|
||
if (nextFiber === workInProgress) {
|
||
// We're back to the root of this subtree. Exit.
|
||
nextFiber = null;
|
||
break;
|
||
}
|
||
var sibling = nextFiber.sibling;
|
||
if (sibling !== null) {
|
||
// Set the return pointer of the sibling to the work-in-progress fiber.
|
||
sibling.return = nextFiber.return;
|
||
nextFiber = sibling;
|
||
break;
|
||
}
|
||
// No more siblings. Traverse up.
|
||
nextFiber = nextFiber.return;
|
||
}
|
||
}
|
||
fiber = nextFiber;
|
||
}
|
||
}
|
||
|
||
function prepareToReadContext(workInProgress, renderExpirationTime) {
|
||
currentlyRenderingFiber = workInProgress;
|
||
lastContextDependency = null;
|
||
lastContextWithAllBitsObserved = null;
|
||
|
||
// Reset the work-in-progress list
|
||
workInProgress.firstContextDependency = null;
|
||
}
|
||
|
||
function readContext(context, observedBits) {
|
||
if (lastContextWithAllBitsObserved === context) {
|
||
// Nothing to do. We already observe everything in this context.
|
||
} else if (observedBits === false || observedBits === 0) {
|
||
// Do not observe any updates.
|
||
} else {
|
||
var resolvedObservedBits = void 0; // Avoid deopting on observable arguments or heterogeneous types.
|
||
if (typeof observedBits !== 'number' || observedBits === maxSigned31BitInt) {
|
||
// Observe all updates.
|
||
lastContextWithAllBitsObserved = context;
|
||
resolvedObservedBits = maxSigned31BitInt;
|
||
} else {
|
||
resolvedObservedBits = observedBits;
|
||
}
|
||
|
||
var contextItem = {
|
||
context: context,
|
||
observedBits: resolvedObservedBits,
|
||
next: null
|
||
};
|
||
|
||
if (lastContextDependency === null) {
|
||
!(currentlyRenderingFiber !== null) ? invariant(false, 'Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.') : void 0;
|
||
// This is the first dependency in the list
|
||
currentlyRenderingFiber.firstContextDependency = lastContextDependency = contextItem;
|
||
} else {
|
||
// Append a new context item.
|
||
lastContextDependency = lastContextDependency.next = contextItem;
|
||
}
|
||
}
|
||
return isPrimaryRenderer ? context._currentValue : context._currentValue2;
|
||
}
|
||
|
||
var NoEffect$1 = /* */0;
|
||
var UnmountSnapshot = /* */2;
|
||
var UnmountMutation = /* */4;
|
||
var MountMutation = /* */8;
|
||
var UnmountLayout = /* */16;
|
||
var MountLayout = /* */32;
|
||
var MountPassive = /* */64;
|
||
var UnmountPassive = /* */128;
|
||
|
||
function areHookInputsEqual(arr1, arr2) {
|
||
// Don't bother comparing lengths in prod because these arrays should be
|
||
// passed inline.
|
||
{
|
||
!(arr1.length === arr2.length) ? warning$1(false, 'Detected a variable number of hook dependencies. The length of the ' + 'dependencies array should be constant between renders.\n\n' + 'Previous: %s\n' + 'Incoming: %s', arr1.join(', '), arr2.join(', ')) : void 0;
|
||
}
|
||
for (var i = 0; i < arr1.length; i++) {
|
||
// Inlined Object.is polyfill.
|
||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
||
var val1 = arr1[i];
|
||
var val2 = arr2[i];
|
||
if (val1 === val2 && (val1 !== 0 || 1 / val1 === 1 / val2) || val1 !== val1 && val2 !== val2 // eslint-disable-line no-self-compare
|
||
) {
|
||
continue;
|
||
}
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
|
||
// These are set right before calling the component.
|
||
var renderExpirationTime = NoWork;
|
||
// The work-in-progress fiber. I've named it differently to distinguish it from
|
||
// the work-in-progress hook.
|
||
var currentlyRenderingFiber$1 = null;
|
||
|
||
// Hooks are stored as a linked list on the fiber's memoizedState field. The
|
||
// current hook list is the list that belongs to the current fiber. The
|
||
// work-in-progress hook list is a new list that will be added to the
|
||
// work-in-progress fiber.
|
||
var firstCurrentHook = null;
|
||
var currentHook = null;
|
||
var firstWorkInProgressHook = null;
|
||
var workInProgressHook = null;
|
||
|
||
var remainingExpirationTime = NoWork;
|
||
var componentUpdateQueue = null;
|
||
|
||
// Updates scheduled during render will trigger an immediate re-render at the
|
||
// end of the current pass. We can't store these updates on the normal queue,
|
||
// because if the work is aborted, they should be discarded. Because this is
|
||
// a relatively rare case, we also don't want to add an additional field to
|
||
// either the hook or queue object types. So we store them in a lazily create
|
||
// map of queue -> render-phase updates, which are discarded once the component
|
||
// completes without re-rendering.
|
||
|
||
// Whether the work-in-progress hook is a re-rendered hook
|
||
var isReRender = false;
|
||
// Whether an update was scheduled during the currently executing render pass.
|
||
var didScheduleRenderPhaseUpdate = false;
|
||
// Lazily created map of render-phase updates
|
||
var renderPhaseUpdates = null;
|
||
// Counter to prevent infinite loops.
|
||
var numberOfReRenders = 0;
|
||
var RE_RENDER_LIMIT = 25;
|
||
|
||
function resolveCurrentlyRenderingFiber() {
|
||
!(currentlyRenderingFiber$1 !== null) ? invariant(false, 'Hooks can only be called inside the body of a function component.') : void 0;
|
||
return currentlyRenderingFiber$1;
|
||
}
|
||
|
||
function prepareToUseHooks(current, workInProgress, nextRenderExpirationTime) {
|
||
if (!enableHooks) {
|
||
return;
|
||
}
|
||
renderExpirationTime = nextRenderExpirationTime;
|
||
currentlyRenderingFiber$1 = workInProgress;
|
||
firstCurrentHook = current !== null ? current.memoizedState : null;
|
||
|
||
// The following should have already been reset
|
||
// currentHook = null;
|
||
// workInProgressHook = null;
|
||
|
||
// remainingExpirationTime = NoWork;
|
||
// componentUpdateQueue = null;
|
||
|
||
// isReRender = false;
|
||
// didScheduleRenderPhaseUpdate = false;
|
||
// renderPhaseUpdates = null;
|
||
// numberOfReRenders = 0;
|
||
}
|
||
|
||
function finishHooks(Component, props, children, refOrContext) {
|
||
if (!enableHooks) {
|
||
return children;
|
||
}
|
||
|
||
// This must be called after every function component to prevent hooks from
|
||
// being used in classes.
|
||
|
||
while (didScheduleRenderPhaseUpdate) {
|
||
// Updates were scheduled during the render phase. They are stored in
|
||
// the `renderPhaseUpdates` map. Call the component again, reusing the
|
||
// work-in-progress hooks and applying the additional updates on top. Keep
|
||
// restarting until no more updates are scheduled.
|
||
didScheduleRenderPhaseUpdate = false;
|
||
numberOfReRenders += 1;
|
||
|
||
// Start over from the beginning of the list
|
||
currentHook = null;
|
||
workInProgressHook = null;
|
||
componentUpdateQueue = null;
|
||
|
||
children = Component(props, refOrContext);
|
||
}
|
||
renderPhaseUpdates = null;
|
||
numberOfReRenders = 0;
|
||
|
||
var renderedWork = currentlyRenderingFiber$1;
|
||
|
||
renderedWork.memoizedState = firstWorkInProgressHook;
|
||
renderedWork.expirationTime = remainingExpirationTime;
|
||
renderedWork.updateQueue = componentUpdateQueue;
|
||
|
||
var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;
|
||
|
||
renderExpirationTime = NoWork;
|
||
currentlyRenderingFiber$1 = null;
|
||
|
||
firstCurrentHook = null;
|
||
currentHook = null;
|
||
firstWorkInProgressHook = null;
|
||
workInProgressHook = null;
|
||
|
||
remainingExpirationTime = NoWork;
|
||
componentUpdateQueue = null;
|
||
|
||
// Always set during createWorkInProgress
|
||
// isReRender = false;
|
||
|
||
// These were reset above
|
||
// didScheduleRenderPhaseUpdate = false;
|
||
// renderPhaseUpdates = null;
|
||
// numberOfReRenders = 0;
|
||
|
||
!!didRenderTooFewHooks ? invariant(false, 'Rendered fewer hooks than expected. This may be caused by an accidental early return statement.') : void 0;
|
||
|
||
return children;
|
||
}
|
||
|
||
function resetHooks() {
|
||
if (!enableHooks) {
|
||
return;
|
||
}
|
||
|
||
// This is called instead of `finishHooks` if the component throws. It's also
|
||
// called inside mountIndeterminateComponent if we determine the component
|
||
// is a module-style component.
|
||
renderExpirationTime = NoWork;
|
||
currentlyRenderingFiber$1 = null;
|
||
|
||
firstCurrentHook = null;
|
||
currentHook = null;
|
||
firstWorkInProgressHook = null;
|
||
workInProgressHook = null;
|
||
|
||
remainingExpirationTime = NoWork;
|
||
componentUpdateQueue = null;
|
||
|
||
// Always set during createWorkInProgress
|
||
// isReRender = false;
|
||
|
||
didScheduleRenderPhaseUpdate = false;
|
||
renderPhaseUpdates = null;
|
||
numberOfReRenders = 0;
|
||
}
|
||
|
||
function createHook() {
|
||
return {
|
||
memoizedState: null,
|
||
|
||
baseState: null,
|
||
queue: null,
|
||
baseUpdate: null,
|
||
|
||
next: null
|
||
};
|
||
}
|
||
|
||
function cloneHook(hook) {
|
||
return {
|
||
memoizedState: hook.memoizedState,
|
||
|
||
baseState: hook.baseState,
|
||
queue: hook.queue,
|
||
baseUpdate: hook.baseUpdate,
|
||
|
||
next: null
|
||
};
|
||
}
|
||
|
||
function createWorkInProgressHook() {
|
||
if (workInProgressHook === null) {
|
||
// This is the first hook in the list
|
||
if (firstWorkInProgressHook === null) {
|
||
isReRender = false;
|
||
currentHook = firstCurrentHook;
|
||
if (currentHook === null) {
|
||
// This is a newly mounted hook
|
||
workInProgressHook = createHook();
|
||
} else {
|
||
// Clone the current hook.
|
||
workInProgressHook = cloneHook(currentHook);
|
||
}
|
||
firstWorkInProgressHook = workInProgressHook;
|
||
} else {
|
||
// There's already a work-in-progress. Reuse it.
|
||
isReRender = true;
|
||
currentHook = firstCurrentHook;
|
||
workInProgressHook = firstWorkInProgressHook;
|
||
}
|
||
} else {
|
||
if (workInProgressHook.next === null) {
|
||
isReRender = false;
|
||
var hook = void 0;
|
||
if (currentHook === null) {
|
||
// This is a newly mounted hook
|
||
hook = createHook();
|
||
} else {
|
||
currentHook = currentHook.next;
|
||
if (currentHook === null) {
|
||
// This is a newly mounted hook
|
||
hook = createHook();
|
||
} else {
|
||
// Clone the current hook.
|
||
hook = cloneHook(currentHook);
|
||
}
|
||
}
|
||
// Append to the end of the list
|
||
workInProgressHook = workInProgressHook.next = hook;
|
||
} else {
|
||
// There's already a work-in-progress. Reuse it.
|
||
isReRender = true;
|
||
workInProgressHook = workInProgressHook.next;
|
||
currentHook = currentHook !== null ? currentHook.next : null;
|
||
}
|
||
}
|
||
return workInProgressHook;
|
||
}
|
||
|
||
function createFunctionComponentUpdateQueue() {
|
||
return {
|
||
lastEffect: null
|
||
};
|
||
}
|
||
|
||
function basicStateReducer(state, action) {
|
||
return typeof action === 'function' ? action(state) : action;
|
||
}
|
||
|
||
function useContext(context, observedBits) {
|
||
// Ensure we're in a function component (class components support only the
|
||
// .unstable_read() form)
|
||
resolveCurrentlyRenderingFiber();
|
||
return readContext(context, observedBits);
|
||
}
|
||
|
||
function useState(initialState) {
|
||
return useReducer(basicStateReducer,
|
||
// useReducer has a special case to support lazy useState initializers
|
||
initialState);
|
||
}
|
||
|
||
function useReducer(reducer, initialState, initialAction) {
|
||
currentlyRenderingFiber$1 = resolveCurrentlyRenderingFiber();
|
||
workInProgressHook = createWorkInProgressHook();
|
||
var queue = workInProgressHook.queue;
|
||
if (queue !== null) {
|
||
// Already have a queue, so this is an update.
|
||
if (isReRender) {
|
||
// This is a re-render. Apply the new render phase updates to the previous
|
||
var _dispatch2 = queue.dispatch;
|
||
if (renderPhaseUpdates !== null) {
|
||
// Render phase updates are stored in a map of queue -> linked list
|
||
var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
|
||
if (firstRenderPhaseUpdate !== undefined) {
|
||
renderPhaseUpdates.delete(queue);
|
||
var newState = workInProgressHook.memoizedState;
|
||
var update = firstRenderPhaseUpdate;
|
||
do {
|
||
// Process this render phase update. We don't have to check the
|
||
// priority because it will always be the same as the current
|
||
// render's.
|
||
var _action = update.action;
|
||
newState = reducer(newState, _action);
|
||
update = update.next;
|
||
} while (update !== null);
|
||
|
||
workInProgressHook.memoizedState = newState;
|
||
|
||
// Don't persist the state accumlated from the render phase updates to
|
||
// the base state unless the queue is empty.
|
||
// TODO: Not sure if this is the desired semantics, but it's what we
|
||
// do for gDSFP. I can't remember why.
|
||
if (workInProgressHook.baseUpdate === queue.last) {
|
||
workInProgressHook.baseState = newState;
|
||
}
|
||
|
||
return [newState, _dispatch2];
|
||
}
|
||
}
|
||
return [workInProgressHook.memoizedState, _dispatch2];
|
||
}
|
||
|
||
// The last update in the entire queue
|
||
var _last = queue.last;
|
||
// The last update that is part of the base state.
|
||
var _baseUpdate = workInProgressHook.baseUpdate;
|
||
|
||
// Find the first unprocessed update.
|
||
var first = void 0;
|
||
if (_baseUpdate !== null) {
|
||
if (_last !== null) {
|
||
// For the first update, the queue is a circular linked list where
|
||
// `queue.last.next = queue.first`. Once the first update commits, and
|
||
// the `baseUpdate` is no longer empty, we can unravel the list.
|
||
_last.next = null;
|
||
}
|
||
first = _baseUpdate.next;
|
||
} else {
|
||
first = _last !== null ? _last.next : null;
|
||
}
|
||
if (first !== null) {
|
||
var _newState = workInProgressHook.baseState;
|
||
var newBaseState = null;
|
||
var newBaseUpdate = null;
|
||
var prevUpdate = _baseUpdate;
|
||
var _update = first;
|
||
var didSkip = false;
|
||
do {
|
||
var updateExpirationTime = _update.expirationTime;
|
||
if (updateExpirationTime < renderExpirationTime) {
|
||
// Priority is insufficient. Skip this update. If this is the first
|
||
// skipped update, the previous update/state is the new base
|
||
// update/state.
|
||
if (!didSkip) {
|
||
didSkip = true;
|
||
newBaseUpdate = prevUpdate;
|
||
newBaseState = _newState;
|
||
}
|
||
// Update the remaining priority in the queue.
|
||
if (updateExpirationTime > remainingExpirationTime) {
|
||
remainingExpirationTime = updateExpirationTime;
|
||
}
|
||
} else {
|
||
// Process this update.
|
||
var _action2 = _update.action;
|
||
_newState = reducer(_newState, _action2);
|
||
}
|
||
prevUpdate = _update;
|
||
_update = _update.next;
|
||
} while (_update !== null && _update !== first);
|
||
|
||
if (!didSkip) {
|
||
newBaseUpdate = prevUpdate;
|
||
newBaseState = _newState;
|
||
}
|
||
|
||
workInProgressHook.memoizedState = _newState;
|
||
workInProgressHook.baseUpdate = newBaseUpdate;
|
||
workInProgressHook.baseState = newBaseState;
|
||
}
|
||
|
||
var _dispatch = queue.dispatch;
|
||
return [workInProgressHook.memoizedState, _dispatch];
|
||
}
|
||
|
||
// There's no existing queue, so this is the initial render.
|
||
if (reducer === basicStateReducer) {
|
||
// Special case for `useState`.
|
||
if (typeof initialState === 'function') {
|
||
initialState = initialState();
|
||
}
|
||
} else if (initialAction !== undefined && initialAction !== null) {
|
||
initialState = reducer(initialState, initialAction);
|
||
}
|
||
workInProgressHook.memoizedState = workInProgressHook.baseState = initialState;
|
||
queue = workInProgressHook.queue = {
|
||
last: null,
|
||
dispatch: null
|
||
};
|
||
var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);
|
||
return [workInProgressHook.memoizedState, dispatch];
|
||
}
|
||
|
||
function pushEffect(tag, create, destroy, inputs) {
|
||
var effect = {
|
||
tag: tag,
|
||
create: create,
|
||
destroy: destroy,
|
||
inputs: inputs,
|
||
// Circular
|
||
next: null
|
||
};
|
||
if (componentUpdateQueue === null) {
|
||
componentUpdateQueue = createFunctionComponentUpdateQueue();
|
||
componentUpdateQueue.lastEffect = effect.next = effect;
|
||
} else {
|
||
var _lastEffect = componentUpdateQueue.lastEffect;
|
||
if (_lastEffect === null) {
|
||
componentUpdateQueue.lastEffect = effect.next = effect;
|
||
} else {
|
||
var firstEffect = _lastEffect.next;
|
||
_lastEffect.next = effect;
|
||
effect.next = firstEffect;
|
||
componentUpdateQueue.lastEffect = effect;
|
||
}
|
||
}
|
||
return effect;
|
||
}
|
||
|
||
function useRef(initialValue) {
|
||
currentlyRenderingFiber$1 = resolveCurrentlyRenderingFiber();
|
||
workInProgressHook = createWorkInProgressHook();
|
||
var ref = void 0;
|
||
|
||
if (workInProgressHook.memoizedState === null) {
|
||
ref = { current: initialValue };
|
||
{
|
||
Object.seal(ref);
|
||
}
|
||
workInProgressHook.memoizedState = ref;
|
||
} else {
|
||
ref = workInProgressHook.memoizedState;
|
||
}
|
||
return ref;
|
||
}
|
||
|
||
function useLayoutEffect(create, inputs) {
|
||
useEffectImpl(Update, UnmountMutation | MountLayout, create, inputs);
|
||
}
|
||
|
||
function useEffect(create, inputs) {
|
||
useEffectImpl(Update | Passive, UnmountPassive | MountPassive, create, inputs);
|
||
}
|
||
|
||
function useEffectImpl(fiberEffectTag, hookEffectTag, create, inputs) {
|
||
currentlyRenderingFiber$1 = resolveCurrentlyRenderingFiber();
|
||
workInProgressHook = createWorkInProgressHook();
|
||
|
||
var nextInputs = inputs !== undefined && inputs !== null ? inputs : [create];
|
||
var destroy = null;
|
||
if (currentHook !== null) {
|
||
var prevEffect = currentHook.memoizedState;
|
||
destroy = prevEffect.destroy;
|
||
if (areHookInputsEqual(nextInputs, prevEffect.inputs)) {
|
||
pushEffect(NoEffect$1, create, destroy, nextInputs);
|
||
return;
|
||
}
|
||
}
|
||
|
||
currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
|
||
workInProgressHook.memoizedState = pushEffect(hookEffectTag, create, destroy, nextInputs);
|
||
}
|
||
|
||
function useImperativeMethods(ref, create, inputs) {
|
||
// TODO: If inputs are provided, should we skip comparing the ref itself?
|
||
var nextInputs = inputs !== null && inputs !== undefined ? inputs.concat([ref]) : [ref, create];
|
||
|
||
// TODO: I've implemented this on top of useEffect because it's almost the
|
||
// same thing, and it would require an equal amount of code. It doesn't seem
|
||
// like a common enough use case to justify the additional size.
|
||
useLayoutEffect(function () {
|
||
if (typeof ref === 'function') {
|
||
var refCallback = ref;
|
||
var _inst = create();
|
||
refCallback(_inst);
|
||
return function () {
|
||
return refCallback(null);
|
||
};
|
||
} else if (ref !== null && ref !== undefined) {
|
||
var refObject = ref;
|
||
var _inst2 = create();
|
||
refObject.current = _inst2;
|
||
return function () {
|
||
refObject.current = null;
|
||
};
|
||
}
|
||
}, nextInputs);
|
||
}
|
||
|
||
function useCallback(callback, inputs) {
|
||
currentlyRenderingFiber$1 = resolveCurrentlyRenderingFiber();
|
||
workInProgressHook = createWorkInProgressHook();
|
||
|
||
var nextInputs = inputs !== undefined && inputs !== null ? inputs : [callback];
|
||
|
||
var prevState = workInProgressHook.memoizedState;
|
||
if (prevState !== null) {
|
||
var prevInputs = prevState[1];
|
||
if (areHookInputsEqual(nextInputs, prevInputs)) {
|
||
return prevState[0];
|
||
}
|
||
}
|
||
workInProgressHook.memoizedState = [callback, nextInputs];
|
||
return callback;
|
||
}
|
||
|
||
function useMemo(nextCreate, inputs) {
|
||
currentlyRenderingFiber$1 = resolveCurrentlyRenderingFiber();
|
||
workInProgressHook = createWorkInProgressHook();
|
||
|
||
var nextInputs = inputs !== undefined && inputs !== null ? inputs : [nextCreate];
|
||
|
||
var prevState = workInProgressHook.memoizedState;
|
||
if (prevState !== null) {
|
||
var prevInputs = prevState[1];
|
||
if (areHookInputsEqual(nextInputs, prevInputs)) {
|
||
return prevState[0];
|
||
}
|
||
}
|
||
|
||
var nextValue = nextCreate();
|
||
workInProgressHook.memoizedState = [nextValue, nextInputs];
|
||
return nextValue;
|
||
}
|
||
|
||
function dispatchAction(fiber, queue, action) {
|
||
!(numberOfReRenders < RE_RENDER_LIMIT) ? invariant(false, 'Too many re-renders. React limits the number of renders to prevent an infinite loop.') : void 0;
|
||
|
||
var alternate = fiber.alternate;
|
||
if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) {
|
||
// This is a render phase update. Stash it in a lazily-created map of
|
||
// queue -> linked list of updates. After this render pass, we'll restart
|
||
// and apply the stashed updates on top of the work-in-progress hook.
|
||
didScheduleRenderPhaseUpdate = true;
|
||
var update = {
|
||
expirationTime: renderExpirationTime,
|
||
action: action,
|
||
next: null
|
||
};
|
||
if (renderPhaseUpdates === null) {
|
||
renderPhaseUpdates = new Map();
|
||
}
|
||
var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
|
||
if (firstRenderPhaseUpdate === undefined) {
|
||
renderPhaseUpdates.set(queue, update);
|
||
} else {
|
||
// Append the update to the end of the list.
|
||
var lastRenderPhaseUpdate = firstRenderPhaseUpdate;
|
||
while (lastRenderPhaseUpdate.next !== null) {
|
||
lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
|
||
}
|
||
lastRenderPhaseUpdate.next = update;
|
||
}
|
||
} else {
|
||
var currentTime = requestCurrentTime();
|
||
var _expirationTime = computeExpirationForFiber(currentTime, fiber);
|
||
var _update2 = {
|
||
expirationTime: _expirationTime,
|
||
action: action,
|
||
next: null
|
||
};
|
||
flushPassiveEffects();
|
||
// Append the update to the end of the list.
|
||
var _last2 = queue.last;
|
||
if (_last2 === null) {
|
||
// This is the first update. Create a circular list.
|
||
_update2.next = _update2;
|
||
} else {
|
||
var first = _last2.next;
|
||
if (first !== null) {
|
||
// Still circular.
|
||
_update2.next = first;
|
||
}
|
||
_last2.next = _update2;
|
||
}
|
||
queue.last = _update2;
|
||
scheduleWork(fiber, _expirationTime);
|
||
}
|
||
}
|
||
|
||
var NO_CONTEXT = {};
|
||
|
||
var contextStackCursor$1 = createCursor(NO_CONTEXT);
|
||
var contextFiberStackCursor = createCursor(NO_CONTEXT);
|
||
var rootInstanceStackCursor = createCursor(NO_CONTEXT);
|
||
|
||
function requiredContext(c) {
|
||
!(c !== NO_CONTEXT) ? invariant(false, 'Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
return c;
|
||
}
|
||
|
||
function getRootHostContainer() {
|
||
var rootInstance = requiredContext(rootInstanceStackCursor.current);
|
||
return rootInstance;
|
||
}
|
||
|
||
function pushHostContainer(fiber, nextRootInstance) {
|
||
// Push current root instance onto the stack;
|
||
// This allows us to reset root when portals are popped.
|
||
push(rootInstanceStackCursor, nextRootInstance, fiber);
|
||
// Track the context and the Fiber that provided it.
|
||
// This enables us to pop only Fibers that provide unique contexts.
|
||
push(contextFiberStackCursor, fiber, fiber);
|
||
|
||
// Finally, we need to push the host context to the stack.
|
||
// However, we can't just call getRootHostContext() and push it because
|
||
// we'd have a different number of entries on the stack depending on
|
||
// whether getRootHostContext() throws somewhere in renderer code or not.
|
||
// So we push an empty value first. This lets us safely unwind on errors.
|
||
push(contextStackCursor$1, NO_CONTEXT, fiber);
|
||
var nextRootContext = getRootHostContext(nextRootInstance);
|
||
// Now that we know this function doesn't throw, replace it.
|
||
pop(contextStackCursor$1, fiber);
|
||
push(contextStackCursor$1, nextRootContext, fiber);
|
||
}
|
||
|
||
function popHostContainer(fiber) {
|
||
pop(contextStackCursor$1, fiber);
|
||
pop(contextFiberStackCursor, fiber);
|
||
pop(rootInstanceStackCursor, fiber);
|
||
}
|
||
|
||
function getHostContext() {
|
||
var context = requiredContext(contextStackCursor$1.current);
|
||
return context;
|
||
}
|
||
|
||
function pushHostContext(fiber) {
|
||
var rootInstance = requiredContext(rootInstanceStackCursor.current);
|
||
var context = requiredContext(contextStackCursor$1.current);
|
||
var nextContext = getChildHostContext(context, fiber.type, rootInstance);
|
||
|
||
// Don't push this Fiber's context unless it's unique.
|
||
if (context === nextContext) {
|
||
return;
|
||
}
|
||
|
||
// Track the context and the Fiber that provided it.
|
||
// This enables us to pop only Fibers that provide unique contexts.
|
||
push(contextFiberStackCursor, fiber, fiber);
|
||
push(contextStackCursor$1, nextContext, fiber);
|
||
}
|
||
|
||
function popHostContext(fiber) {
|
||
// Do not pop unless this Fiber provided the current context.
|
||
// pushHostContext() only pushes Fibers that provide unique contexts.
|
||
if (contextFiberStackCursor.current !== fiber) {
|
||
return;
|
||
}
|
||
|
||
pop(contextStackCursor$1, fiber);
|
||
pop(contextFiberStackCursor, fiber);
|
||
}
|
||
|
||
var commitTime = 0;
|
||
var profilerStartTime = -1;
|
||
|
||
function getCommitTime() {
|
||
return commitTime;
|
||
}
|
||
|
||
function recordCommitTime() {
|
||
if (!enableProfilerTimer) {
|
||
return;
|
||
}
|
||
commitTime = scheduler.unstable_now();
|
||
}
|
||
|
||
function startProfilerTimer(fiber) {
|
||
if (!enableProfilerTimer) {
|
||
return;
|
||
}
|
||
|
||
profilerStartTime = scheduler.unstable_now();
|
||
|
||
if (fiber.actualStartTime < 0) {
|
||
fiber.actualStartTime = scheduler.unstable_now();
|
||
}
|
||
}
|
||
|
||
function stopProfilerTimerIfRunning(fiber) {
|
||
if (!enableProfilerTimer) {
|
||
return;
|
||
}
|
||
profilerStartTime = -1;
|
||
}
|
||
|
||
function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
|
||
if (!enableProfilerTimer) {
|
||
return;
|
||
}
|
||
|
||
if (profilerStartTime >= 0) {
|
||
var elapsedTime = scheduler.unstable_now() - profilerStartTime;
|
||
fiber.actualDuration += elapsedTime;
|
||
if (overrideBaseTime) {
|
||
fiber.selfBaseDuration = elapsedTime;
|
||
}
|
||
profilerStartTime = -1;
|
||
}
|
||
}
|
||
|
||
function resolveDefaultProps(Component, baseProps) {
|
||
if (Component && Component.defaultProps) {
|
||
// Resolve default props. Taken from ReactElement
|
||
var props = _assign({}, baseProps);
|
||
var defaultProps = Component.defaultProps;
|
||
for (var propName in defaultProps) {
|
||
if (props[propName] === undefined) {
|
||
props[propName] = defaultProps[propName];
|
||
}
|
||
}
|
||
return props;
|
||
}
|
||
return baseProps;
|
||
}
|
||
|
||
function readLazyComponentType(lazyComponent) {
|
||
var status = lazyComponent._status;
|
||
var result = lazyComponent._result;
|
||
switch (status) {
|
||
case Resolved:
|
||
{
|
||
var Component = result;
|
||
return Component;
|
||
}
|
||
case Rejected:
|
||
{
|
||
var error = result;
|
||
throw error;
|
||
}
|
||
case Pending:
|
||
{
|
||
var thenable = result;
|
||
throw thenable;
|
||
}
|
||
default:
|
||
{
|
||
lazyComponent._status = Pending;
|
||
var ctor = lazyComponent._ctor;
|
||
var _thenable = ctor();
|
||
_thenable.then(function (moduleObject) {
|
||
if (lazyComponent._status === Pending) {
|
||
var defaultExport = moduleObject.default;
|
||
{
|
||
if (defaultExport === undefined) {
|
||
warning$1(false, 'lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
|
||
}
|
||
}
|
||
lazyComponent._status = Resolved;
|
||
lazyComponent._result = defaultExport;
|
||
}
|
||
}, function (error) {
|
||
if (lazyComponent._status === Pending) {
|
||
lazyComponent._status = Rejected;
|
||
lazyComponent._result = error;
|
||
}
|
||
});
|
||
lazyComponent._result = _thenable;
|
||
throw _thenable;
|
||
}
|
||
}
|
||
}
|
||
|
||
var ReactCurrentOwner$4 = ReactSharedInternals.ReactCurrentOwner;
|
||
|
||
function readContext$1(contextType) {
|
||
var dispatcher = ReactCurrentOwner$4.currentDispatcher;
|
||
return dispatcher.readContext(contextType);
|
||
}
|
||
|
||
var fakeInternalInstance = {};
|
||
var isArray$1 = Array.isArray;
|
||
|
||
// React.Component uses a shared frozen object by default.
|
||
// We'll use it to determine whether we need to initialize legacy refs.
|
||
var emptyRefsObject = new React.Component().refs;
|
||
|
||
var didWarnAboutStateAssignmentForComponent = void 0;
|
||
var didWarnAboutUninitializedState = void 0;
|
||
var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = void 0;
|
||
var didWarnAboutLegacyLifecyclesAndDerivedState = void 0;
|
||
var didWarnAboutUndefinedDerivedState = void 0;
|
||
var warnOnUndefinedDerivedState = void 0;
|
||
var warnOnInvalidCallback$1 = void 0;
|
||
var didWarnAboutDirectlyAssigningPropsToState = void 0;
|
||
var didWarnAboutContextTypeAndContextTypes = void 0;
|
||
var didWarnAboutInvalidateContextType = void 0;
|
||
|
||
{
|
||
didWarnAboutStateAssignmentForComponent = new Set();
|
||
didWarnAboutUninitializedState = new Set();
|
||
didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();
|
||
didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
|
||
didWarnAboutDirectlyAssigningPropsToState = new Set();
|
||
didWarnAboutUndefinedDerivedState = new Set();
|
||
didWarnAboutContextTypeAndContextTypes = new Set();
|
||
didWarnAboutInvalidateContextType = new Set();
|
||
|
||
var didWarnOnInvalidCallback = new Set();
|
||
|
||
warnOnInvalidCallback$1 = function (callback, callerName) {
|
||
if (callback === null || typeof callback === 'function') {
|
||
return;
|
||
}
|
||
var key = callerName + '_' + callback;
|
||
if (!didWarnOnInvalidCallback.has(key)) {
|
||
didWarnOnInvalidCallback.add(key);
|
||
warningWithoutStack$1(false, '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
|
||
}
|
||
};
|
||
|
||
warnOnUndefinedDerivedState = function (type, partialState) {
|
||
if (partialState === undefined) {
|
||
var componentName = getComponentName(type) || 'Component';
|
||
if (!didWarnAboutUndefinedDerivedState.has(componentName)) {
|
||
didWarnAboutUndefinedDerivedState.add(componentName);
|
||
warningWithoutStack$1(false, '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
|
||
}
|
||
}
|
||
};
|
||
|
||
// This is so gross but it's at least non-critical and can be removed if
|
||
// it causes problems. This is meant to give a nicer error message for
|
||
// ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
|
||
// ...)) which otherwise throws a "_processChildContext is not a function"
|
||
// exception.
|
||
Object.defineProperty(fakeInternalInstance, '_processChildContext', {
|
||
enumerable: false,
|
||
value: function () {
|
||
invariant(false, '_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn\'t supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).');
|
||
}
|
||
});
|
||
Object.freeze(fakeInternalInstance);
|
||
}
|
||
|
||
function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
|
||
var prevState = workInProgress.memoizedState;
|
||
|
||
{
|
||
if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
|
||
// Invoke the function an extra time to help detect side-effects.
|
||
getDerivedStateFromProps(nextProps, prevState);
|
||
}
|
||
}
|
||
|
||
var partialState = getDerivedStateFromProps(nextProps, prevState);
|
||
|
||
{
|
||
warnOnUndefinedDerivedState(ctor, partialState);
|
||
}
|
||
// Merge the partial state and the previous state.
|
||
var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);
|
||
workInProgress.memoizedState = memoizedState;
|
||
|
||
// Once the update queue is empty, persist the derived state onto the
|
||
// base state.
|
||
var updateQueue = workInProgress.updateQueue;
|
||
if (updateQueue !== null && workInProgress.expirationTime === NoWork) {
|
||
updateQueue.baseState = memoizedState;
|
||
}
|
||
}
|
||
|
||
var classComponentUpdater = {
|
||
isMounted: isMounted,
|
||
enqueueSetState: function (inst, payload, callback) {
|
||
var fiber = get(inst);
|
||
var currentTime = requestCurrentTime();
|
||
var expirationTime = computeExpirationForFiber(currentTime, fiber);
|
||
|
||
var update = createUpdate(expirationTime);
|
||
update.payload = payload;
|
||
if (callback !== undefined && callback !== null) {
|
||
{
|
||
warnOnInvalidCallback$1(callback, 'setState');
|
||
}
|
||
update.callback = callback;
|
||
}
|
||
|
||
flushPassiveEffects();
|
||
enqueueUpdate(fiber, update);
|
||
scheduleWork(fiber, expirationTime);
|
||
},
|
||
enqueueReplaceState: function (inst, payload, callback) {
|
||
var fiber = get(inst);
|
||
var currentTime = requestCurrentTime();
|
||
var expirationTime = computeExpirationForFiber(currentTime, fiber);
|
||
|
||
var update = createUpdate(expirationTime);
|
||
update.tag = ReplaceState;
|
||
update.payload = payload;
|
||
|
||
if (callback !== undefined && callback !== null) {
|
||
{
|
||
warnOnInvalidCallback$1(callback, 'replaceState');
|
||
}
|
||
update.callback = callback;
|
||
}
|
||
|
||
flushPassiveEffects();
|
||
enqueueUpdate(fiber, update);
|
||
scheduleWork(fiber, expirationTime);
|
||
},
|
||
enqueueForceUpdate: function (inst, callback) {
|
||
var fiber = get(inst);
|
||
var currentTime = requestCurrentTime();
|
||
var expirationTime = computeExpirationForFiber(currentTime, fiber);
|
||
|
||
var update = createUpdate(expirationTime);
|
||
update.tag = ForceUpdate;
|
||
|
||
if (callback !== undefined && callback !== null) {
|
||
{
|
||
warnOnInvalidCallback$1(callback, 'forceUpdate');
|
||
}
|
||
update.callback = callback;
|
||
}
|
||
|
||
flushPassiveEffects();
|
||
enqueueUpdate(fiber, update);
|
||
scheduleWork(fiber, expirationTime);
|
||
}
|
||
};
|
||
|
||
function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {
|
||
var instance = workInProgress.stateNode;
|
||
if (typeof instance.shouldComponentUpdate === 'function') {
|
||
startPhaseTimer(workInProgress, 'shouldComponentUpdate');
|
||
var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
|
||
stopPhaseTimer();
|
||
|
||
{
|
||
!(shouldUpdate !== undefined) ? warningWithoutStack$1(false, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component') : void 0;
|
||
}
|
||
|
||
return shouldUpdate;
|
||
}
|
||
|
||
if (ctor.prototype && ctor.prototype.isPureReactComponent) {
|
||
return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
|
||
}
|
||
|
||
return true;
|
||
}
|
||
|
||
function checkClassInstance(workInProgress, ctor, newProps) {
|
||
var instance = workInProgress.stateNode;
|
||
{
|
||
var name = getComponentName(ctor) || 'Component';
|
||
var renderPresent = instance.render;
|
||
|
||
if (!renderPresent) {
|
||
if (ctor.prototype && typeof ctor.prototype.render === 'function') {
|
||
warningWithoutStack$1(false, '%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
|
||
} else {
|
||
warningWithoutStack$1(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
|
||
}
|
||
}
|
||
|
||
var noGetInitialStateOnES6 = !instance.getInitialState || instance.getInitialState.isReactClassApproved || instance.state;
|
||
!noGetInitialStateOnES6 ? warningWithoutStack$1(false, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name) : void 0;
|
||
var noGetDefaultPropsOnES6 = !instance.getDefaultProps || instance.getDefaultProps.isReactClassApproved;
|
||
!noGetDefaultPropsOnES6 ? warningWithoutStack$1(false, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name) : void 0;
|
||
var noInstancePropTypes = !instance.propTypes;
|
||
!noInstancePropTypes ? warningWithoutStack$1(false, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name) : void 0;
|
||
var noInstanceContextType = !instance.contextType;
|
||
!noInstanceContextType ? warningWithoutStack$1(false, 'contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name) : void 0;
|
||
var noInstanceContextTypes = !instance.contextTypes;
|
||
!noInstanceContextTypes ? warningWithoutStack$1(false, 'contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name) : void 0;
|
||
|
||
if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {
|
||
didWarnAboutContextTypeAndContextTypes.add(ctor);
|
||
warningWithoutStack$1(false, '%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);
|
||
}
|
||
|
||
var noComponentShouldUpdate = typeof instance.componentShouldUpdate !== 'function';
|
||
!noComponentShouldUpdate ? warningWithoutStack$1(false, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name) : void 0;
|
||
if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
|
||
warningWithoutStack$1(false, '%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');
|
||
}
|
||
var noComponentDidUnmount = typeof instance.componentDidUnmount !== 'function';
|
||
!noComponentDidUnmount ? warningWithoutStack$1(false, '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name) : void 0;
|
||
var noComponentDidReceiveProps = typeof instance.componentDidReceiveProps !== 'function';
|
||
!noComponentDidReceiveProps ? warningWithoutStack$1(false, '%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name) : void 0;
|
||
var noComponentWillRecieveProps = typeof instance.componentWillRecieveProps !== 'function';
|
||
!noComponentWillRecieveProps ? warningWithoutStack$1(false, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name) : void 0;
|
||
var noUnsafeComponentWillRecieveProps = typeof instance.UNSAFE_componentWillRecieveProps !== 'function';
|
||
!noUnsafeComponentWillRecieveProps ? warningWithoutStack$1(false, '%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name) : void 0;
|
||
var hasMutatedProps = instance.props !== newProps;
|
||
!(instance.props === undefined || !hasMutatedProps) ? warningWithoutStack$1(false, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name) : void 0;
|
||
var noInstanceDefaultProps = !instance.defaultProps;
|
||
!noInstanceDefaultProps ? warningWithoutStack$1(false, 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name) : void 0;
|
||
|
||
if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
|
||
didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);
|
||
warningWithoutStack$1(false, '%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));
|
||
}
|
||
|
||
var noInstanceGetDerivedStateFromProps = typeof instance.getDerivedStateFromProps !== 'function';
|
||
!noInstanceGetDerivedStateFromProps ? warningWithoutStack$1(false, '%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
|
||
var noInstanceGetDerivedStateFromCatch = typeof instance.getDerivedStateFromError !== 'function';
|
||
!noInstanceGetDerivedStateFromCatch ? warningWithoutStack$1(false, '%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
|
||
var noStaticGetSnapshotBeforeUpdate = typeof ctor.getSnapshotBeforeUpdate !== 'function';
|
||
!noStaticGetSnapshotBeforeUpdate ? warningWithoutStack$1(false, '%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name) : void 0;
|
||
var _state = instance.state;
|
||
if (_state && (typeof _state !== 'object' || isArray$1(_state))) {
|
||
warningWithoutStack$1(false, '%s.state: must be set to an object or null', name);
|
||
}
|
||
if (typeof instance.getChildContext === 'function') {
|
||
!(typeof ctor.childContextTypes === 'object') ? warningWithoutStack$1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name) : void 0;
|
||
}
|
||
}
|
||
}
|
||
|
||
function adoptClassInstance(workInProgress, instance) {
|
||
instance.updater = classComponentUpdater;
|
||
workInProgress.stateNode = instance;
|
||
// The instance needs access to the fiber so that it can schedule updates
|
||
set(instance, workInProgress);
|
||
{
|
||
instance._reactInternalInstance = fakeInternalInstance;
|
||
}
|
||
}
|
||
|
||
function constructClassInstance(workInProgress, ctor, props, renderExpirationTime) {
|
||
var isLegacyContextConsumer = false;
|
||
var unmaskedContext = emptyContextObject;
|
||
var context = null;
|
||
var contextType = ctor.contextType;
|
||
if (typeof contextType === 'object' && contextType !== null) {
|
||
{
|
||
if (contextType.$$typeof !== REACT_CONTEXT_TYPE && !didWarnAboutInvalidateContextType.has(ctor)) {
|
||
didWarnAboutInvalidateContextType.add(ctor);
|
||
warningWithoutStack$1(false, '%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext(). ' + 'Did you accidentally pass the Context.Provider instead?', getComponentName(ctor) || 'Component');
|
||
}
|
||
}
|
||
|
||
context = readContext$1(contextType);
|
||
} else {
|
||
unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
|
||
var contextTypes = ctor.contextTypes;
|
||
isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;
|
||
context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;
|
||
}
|
||
|
||
// Instantiate twice to help detect side-effects.
|
||
{
|
||
if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
|
||
new ctor(props, context); // eslint-disable-line no-new
|
||
}
|
||
}
|
||
|
||
var instance = new ctor(props, context);
|
||
var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;
|
||
adoptClassInstance(workInProgress, instance);
|
||
|
||
{
|
||
if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {
|
||
var componentName = getComponentName(ctor) || 'Component';
|
||
if (!didWarnAboutUninitializedState.has(componentName)) {
|
||
didWarnAboutUninitializedState.add(componentName);
|
||
warningWithoutStack$1(false, '`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);
|
||
}
|
||
}
|
||
|
||
// If new component APIs are defined, "unsafe" lifecycles won't be called.
|
||
// Warn about these lifecycles if they are present.
|
||
// Don't warn about react-lifecycles-compat polyfilled methods though.
|
||
if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {
|
||
var foundWillMountName = null;
|
||
var foundWillReceivePropsName = null;
|
||
var foundWillUpdateName = null;
|
||
if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {
|
||
foundWillMountName = 'componentWillMount';
|
||
} else if (typeof instance.UNSAFE_componentWillMount === 'function') {
|
||
foundWillMountName = 'UNSAFE_componentWillMount';
|
||
}
|
||
if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
|
||
foundWillReceivePropsName = 'componentWillReceiveProps';
|
||
} else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
|
||
foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
|
||
}
|
||
if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
|
||
foundWillUpdateName = 'componentWillUpdate';
|
||
} else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
|
||
foundWillUpdateName = 'UNSAFE_componentWillUpdate';
|
||
}
|
||
if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
|
||
var _componentName = getComponentName(ctor) || 'Component';
|
||
var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
|
||
if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
|
||
didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);
|
||
warningWithoutStack$1(false, 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks', _componentName, newApiName, foundWillMountName !== null ? '\n ' + foundWillMountName : '', foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '', foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '');
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
// Cache unmasked context so we can avoid recreating masked context unless necessary.
|
||
// ReactFiberContext usually updates this cache but can't for newly-created instances.
|
||
if (isLegacyContextConsumer) {
|
||
cacheContext(workInProgress, unmaskedContext, context);
|
||
}
|
||
|
||
return instance;
|
||
}
|
||
|
||
function callComponentWillMount(workInProgress, instance) {
|
||
startPhaseTimer(workInProgress, 'componentWillMount');
|
||
var oldState = instance.state;
|
||
|
||
if (typeof instance.componentWillMount === 'function') {
|
||
instance.componentWillMount();
|
||
}
|
||
if (typeof instance.UNSAFE_componentWillMount === 'function') {
|
||
instance.UNSAFE_componentWillMount();
|
||
}
|
||
|
||
stopPhaseTimer();
|
||
|
||
if (oldState !== instance.state) {
|
||
{
|
||
warningWithoutStack$1(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');
|
||
}
|
||
classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
|
||
}
|
||
}
|
||
|
||
function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
|
||
var oldState = instance.state;
|
||
startPhaseTimer(workInProgress, 'componentWillReceiveProps');
|
||
if (typeof instance.componentWillReceiveProps === 'function') {
|
||
instance.componentWillReceiveProps(newProps, nextContext);
|
||
}
|
||
if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
|
||
instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
|
||
}
|
||
stopPhaseTimer();
|
||
|
||
if (instance.state !== oldState) {
|
||
{
|
||
var componentName = getComponentName(workInProgress.type) || 'Component';
|
||
if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {
|
||
didWarnAboutStateAssignmentForComponent.add(componentName);
|
||
warningWithoutStack$1(false, '%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
|
||
}
|
||
}
|
||
classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
|
||
}
|
||
}
|
||
|
||
// Invokes the mount life-cycles on a previously never rendered instance.
|
||
function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
|
||
{
|
||
checkClassInstance(workInProgress, ctor, newProps);
|
||
}
|
||
|
||
var instance = workInProgress.stateNode;
|
||
instance.props = newProps;
|
||
instance.state = workInProgress.memoizedState;
|
||
instance.refs = emptyRefsObject;
|
||
|
||
var contextType = ctor.contextType;
|
||
if (typeof contextType === 'object' && contextType !== null) {
|
||
instance.context = readContext$1(contextType);
|
||
} else {
|
||
var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
|
||
instance.context = getMaskedContext(workInProgress, unmaskedContext);
|
||
}
|
||
|
||
{
|
||
if (instance.state === newProps) {
|
||
var componentName = getComponentName(ctor) || 'Component';
|
||
if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
|
||
didWarnAboutDirectlyAssigningPropsToState.add(componentName);
|
||
warningWithoutStack$1(false, '%s: It is not recommended to assign props directly to state ' + "because updates to props won't be reflected in state. " + 'In most cases, it is better to use props directly.', componentName);
|
||
}
|
||
}
|
||
|
||
if (workInProgress.mode & StrictMode) {
|
||
ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);
|
||
|
||
ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);
|
||
}
|
||
|
||
if (warnAboutDeprecatedLifecycles) {
|
||
ReactStrictModeWarnings.recordDeprecationWarnings(workInProgress, instance);
|
||
}
|
||
}
|
||
|
||
var updateQueue = workInProgress.updateQueue;
|
||
if (updateQueue !== null) {
|
||
processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
|
||
instance.state = workInProgress.memoizedState;
|
||
}
|
||
|
||
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
|
||
if (typeof getDerivedStateFromProps === 'function') {
|
||
applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
|
||
instance.state = workInProgress.memoizedState;
|
||
}
|
||
|
||
// In order to support react-lifecycles-compat polyfilled components,
|
||
// Unsafe lifecycles should not be invoked for components using the new APIs.
|
||
if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
|
||
callComponentWillMount(workInProgress, instance);
|
||
// If we had additional state updates during this life-cycle, let's
|
||
// process them now.
|
||
updateQueue = workInProgress.updateQueue;
|
||
if (updateQueue !== null) {
|
||
processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
|
||
instance.state = workInProgress.memoizedState;
|
||
}
|
||
}
|
||
|
||
if (typeof instance.componentDidMount === 'function') {
|
||
workInProgress.effectTag |= Update;
|
||
}
|
||
}
|
||
|
||
function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
|
||
var instance = workInProgress.stateNode;
|
||
|
||
var oldProps = workInProgress.memoizedProps;
|
||
instance.props = oldProps;
|
||
|
||
var oldContext = instance.context;
|
||
var contextType = ctor.contextType;
|
||
var nextContext = void 0;
|
||
if (typeof contextType === 'object' && contextType !== null) {
|
||
nextContext = readContext$1(contextType);
|
||
} else {
|
||
var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
|
||
nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
|
||
}
|
||
|
||
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
|
||
var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function';
|
||
|
||
// Note: During these life-cycles, instance.props/instance.state are what
|
||
// ever the previously attempted to render - not the "current". However,
|
||
// during componentDidUpdate we pass the "current" props.
|
||
|
||
// In order to support react-lifecycles-compat polyfilled components,
|
||
// Unsafe lifecycles should not be invoked for components using the new APIs.
|
||
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
|
||
if (oldProps !== newProps || oldContext !== nextContext) {
|
||
callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
|
||
}
|
||
}
|
||
|
||
resetHasForceUpdateBeforeProcessing();
|
||
|
||
var oldState = workInProgress.memoizedState;
|
||
var newState = instance.state = oldState;
|
||
var updateQueue = workInProgress.updateQueue;
|
||
if (updateQueue !== null) {
|
||
processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
|
||
newState = workInProgress.memoizedState;
|
||
}
|
||
if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
|
||
// If an update was already in progress, we should schedule an Update
|
||
// effect even though we're bailing out, so that cWU/cDU are called.
|
||
if (typeof instance.componentDidMount === 'function') {
|
||
workInProgress.effectTag |= Update;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
if (typeof getDerivedStateFromProps === 'function') {
|
||
applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
|
||
newState = workInProgress.memoizedState;
|
||
}
|
||
|
||
var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);
|
||
|
||
if (shouldUpdate) {
|
||
// In order to support react-lifecycles-compat polyfilled components,
|
||
// Unsafe lifecycles should not be invoked for components using the new APIs.
|
||
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
|
||
startPhaseTimer(workInProgress, 'componentWillMount');
|
||
if (typeof instance.componentWillMount === 'function') {
|
||
instance.componentWillMount();
|
||
}
|
||
if (typeof instance.UNSAFE_componentWillMount === 'function') {
|
||
instance.UNSAFE_componentWillMount();
|
||
}
|
||
stopPhaseTimer();
|
||
}
|
||
if (typeof instance.componentDidMount === 'function') {
|
||
workInProgress.effectTag |= Update;
|
||
}
|
||
} else {
|
||
// If an update was already in progress, we should schedule an Update
|
||
// effect even though we're bailing out, so that cWU/cDU are called.
|
||
if (typeof instance.componentDidMount === 'function') {
|
||
workInProgress.effectTag |= Update;
|
||
}
|
||
|
||
// If shouldComponentUpdate returned false, we should still update the
|
||
// memoized state to indicate that this work can be reused.
|
||
workInProgress.memoizedProps = newProps;
|
||
workInProgress.memoizedState = newState;
|
||
}
|
||
|
||
// Update the existing instance's state, props, and context pointers even
|
||
// if shouldComponentUpdate returns false.
|
||
instance.props = newProps;
|
||
instance.state = newState;
|
||
instance.context = nextContext;
|
||
|
||
return shouldUpdate;
|
||
}
|
||
|
||
// Invokes the update life-cycles and returns false if it shouldn't rerender.
|
||
function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) {
|
||
var instance = workInProgress.stateNode;
|
||
|
||
var oldProps = workInProgress.memoizedProps;
|
||
instance.props = workInProgress.type === workInProgress.elementType ? oldProps : resolveDefaultProps(workInProgress.type, oldProps);
|
||
|
||
var oldContext = instance.context;
|
||
var contextType = ctor.contextType;
|
||
var nextContext = void 0;
|
||
if (typeof contextType === 'object' && contextType !== null) {
|
||
nextContext = readContext$1(contextType);
|
||
} else {
|
||
var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
|
||
nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);
|
||
}
|
||
|
||
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
|
||
var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function';
|
||
|
||
// Note: During these life-cycles, instance.props/instance.state are what
|
||
// ever the previously attempted to render - not the "current". However,
|
||
// during componentDidUpdate we pass the "current" props.
|
||
|
||
// In order to support react-lifecycles-compat polyfilled components,
|
||
// Unsafe lifecycles should not be invoked for components using the new APIs.
|
||
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
|
||
if (oldProps !== newProps || oldContext !== nextContext) {
|
||
callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
|
||
}
|
||
}
|
||
|
||
resetHasForceUpdateBeforeProcessing();
|
||
|
||
var oldState = workInProgress.memoizedState;
|
||
var newState = instance.state = oldState;
|
||
var updateQueue = workInProgress.updateQueue;
|
||
if (updateQueue !== null) {
|
||
processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
|
||
newState = workInProgress.memoizedState;
|
||
}
|
||
|
||
if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
|
||
// If an update was already in progress, we should schedule an Update
|
||
// effect even though we're bailing out, so that cWU/cDU are called.
|
||
if (typeof instance.componentDidUpdate === 'function') {
|
||
if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
|
||
workInProgress.effectTag |= Update;
|
||
}
|
||
}
|
||
if (typeof instance.getSnapshotBeforeUpdate === 'function') {
|
||
if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
|
||
workInProgress.effectTag |= Snapshot;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
|
||
if (typeof getDerivedStateFromProps === 'function') {
|
||
applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
|
||
newState = workInProgress.memoizedState;
|
||
}
|
||
|
||
var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);
|
||
|
||
if (shouldUpdate) {
|
||
// In order to support react-lifecycles-compat polyfilled components,
|
||
// Unsafe lifecycles should not be invoked for components using the new APIs.
|
||
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {
|
||
startPhaseTimer(workInProgress, 'componentWillUpdate');
|
||
if (typeof instance.componentWillUpdate === 'function') {
|
||
instance.componentWillUpdate(newProps, newState, nextContext);
|
||
}
|
||
if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
|
||
instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
|
||
}
|
||
stopPhaseTimer();
|
||
}
|
||
if (typeof instance.componentDidUpdate === 'function') {
|
||
workInProgress.effectTag |= Update;
|
||
}
|
||
if (typeof instance.getSnapshotBeforeUpdate === 'function') {
|
||
workInProgress.effectTag |= Snapshot;
|
||
}
|
||
} else {
|
||
// If an update was already in progress, we should schedule an Update
|
||
// effect even though we're bailing out, so that cWU/cDU are called.
|
||
if (typeof instance.componentDidUpdate === 'function') {
|
||
if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
|
||
workInProgress.effectTag |= Update;
|
||
}
|
||
}
|
||
if (typeof instance.getSnapshotBeforeUpdate === 'function') {
|
||
if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
|
||
workInProgress.effectTag |= Snapshot;
|
||
}
|
||
}
|
||
|
||
// If shouldComponentUpdate returned false, we should still update the
|
||
// memoized props/state to indicate that this work can be reused.
|
||
workInProgress.memoizedProps = newProps;
|
||
workInProgress.memoizedState = newState;
|
||
}
|
||
|
||
// Update the existing instance's state, props, and context pointers even
|
||
// if shouldComponentUpdate returns false.
|
||
instance.props = newProps;
|
||
instance.state = newState;
|
||
instance.context = nextContext;
|
||
|
||
return shouldUpdate;
|
||
}
|
||
|
||
var didWarnAboutMaps = void 0;
|
||
var didWarnAboutGenerators = void 0;
|
||
var didWarnAboutStringRefInStrictMode = void 0;
|
||
var ownerHasKeyUseWarning = void 0;
|
||
var ownerHasFunctionTypeWarning = void 0;
|
||
var warnForMissingKey = function (child) {};
|
||
|
||
{
|
||
didWarnAboutMaps = false;
|
||
didWarnAboutGenerators = false;
|
||
didWarnAboutStringRefInStrictMode = {};
|
||
|
||
/**
|
||
* Warn if there's no key explicitly set on dynamic arrays of children or
|
||
* object keys are not valid. This allows us to keep track of children between
|
||
* updates.
|
||
*/
|
||
ownerHasKeyUseWarning = {};
|
||
ownerHasFunctionTypeWarning = {};
|
||
|
||
warnForMissingKey = function (child) {
|
||
if (child === null || typeof child !== 'object') {
|
||
return;
|
||
}
|
||
if (!child._store || child._store.validated || child.key != null) {
|
||
return;
|
||
}
|
||
!(typeof child._store === 'object') ? invariant(false, 'React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
child._store.validated = true;
|
||
|
||
var currentComponentErrorInfo = 'Each child in an array or iterator should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + getCurrentFiberStackInDev();
|
||
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
||
return;
|
||
}
|
||
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
|
||
|
||
warning$1(false, 'Each child in an array or iterator should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.');
|
||
};
|
||
}
|
||
|
||
var isArray = Array.isArray;
|
||
|
||
function coerceRef(returnFiber, current$$1, element) {
|
||
var mixedRef = element.ref;
|
||
if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {
|
||
{
|
||
if (returnFiber.mode & StrictMode) {
|
||
var componentName = getComponentName(returnFiber.type) || 'Component';
|
||
if (!didWarnAboutStringRefInStrictMode[componentName]) {
|
||
warningWithoutStack$1(false, 'A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using createRef() instead.' + '\n%s' + '\n\nLearn more about using refs safely here:' + '\nhttps://fb.me/react-strict-mode-string-ref', mixedRef, getStackByFiberInDevAndProd(returnFiber));
|
||
didWarnAboutStringRefInStrictMode[componentName] = true;
|
||
}
|
||
}
|
||
}
|
||
|
||
if (element._owner) {
|
||
var owner = element._owner;
|
||
var inst = void 0;
|
||
if (owner) {
|
||
var ownerFiber = owner;
|
||
!(ownerFiber.tag === ClassComponent) ? invariant(false, 'Function components cannot have refs.') : void 0;
|
||
inst = ownerFiber.stateNode;
|
||
}
|
||
!inst ? invariant(false, 'Missing owner for string ref %s. This error is likely caused by a bug in React. Please file an issue.', mixedRef) : void 0;
|
||
var stringRef = '' + mixedRef;
|
||
// Check if previous string ref matches new string ref
|
||
if (current$$1 !== null && current$$1.ref !== null && typeof current$$1.ref === 'function' && current$$1.ref._stringRef === stringRef) {
|
||
return current$$1.ref;
|
||
}
|
||
var ref = function (value) {
|
||
var refs = inst.refs;
|
||
if (refs === emptyRefsObject) {
|
||
// This is a lazy pooled frozen object, so we need to initialize.
|
||
refs = inst.refs = {};
|
||
}
|
||
if (value === null) {
|
||
delete refs[stringRef];
|
||
} else {
|
||
refs[stringRef] = value;
|
||
}
|
||
};
|
||
ref._stringRef = stringRef;
|
||
return ref;
|
||
} else {
|
||
!(typeof mixedRef === 'string') ? invariant(false, 'Expected ref to be a function, a string, an object returned by React.createRef(), or null.') : void 0;
|
||
!element._owner ? invariant(false, 'Element ref was specified as a string (%s) but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component\'s render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information.', mixedRef) : void 0;
|
||
}
|
||
}
|
||
return mixedRef;
|
||
}
|
||
|
||
function throwOnInvalidObjectType(returnFiber, newChild) {
|
||
if (returnFiber.type !== 'textarea') {
|
||
var addendum = '';
|
||
{
|
||
addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getCurrentFiberStackInDev();
|
||
}
|
||
invariant(false, 'Objects are not valid as a React child (found: %s).%s', Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild, addendum);
|
||
}
|
||
}
|
||
|
||
function warnOnFunctionType() {
|
||
var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.' + getCurrentFiberStackInDev();
|
||
|
||
if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) {
|
||
return;
|
||
}
|
||
ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true;
|
||
|
||
warning$1(false, 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');
|
||
}
|
||
|
||
// This wrapper function exists because I expect to clone the code in each path
|
||
// to be able to optimize each path individually by branching early. This needs
|
||
// a compiler or we can do it manually. Helpers that don't need this branching
|
||
// live outside of this function.
|
||
function ChildReconciler(shouldTrackSideEffects) {
|
||
function deleteChild(returnFiber, childToDelete) {
|
||
if (!shouldTrackSideEffects) {
|
||
// Noop.
|
||
return;
|
||
}
|
||
// Deletions are added in reversed order so we add it to the front.
|
||
// At this point, the return fiber's effect list is empty except for
|
||
// deletions, so we can just append the deletion to the list. The remaining
|
||
// effects aren't added until the complete phase. Once we implement
|
||
// resuming, this may not be true.
|
||
var last = returnFiber.lastEffect;
|
||
if (last !== null) {
|
||
last.nextEffect = childToDelete;
|
||
returnFiber.lastEffect = childToDelete;
|
||
} else {
|
||
returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
|
||
}
|
||
childToDelete.nextEffect = null;
|
||
childToDelete.effectTag = Deletion;
|
||
}
|
||
|
||
function deleteRemainingChildren(returnFiber, currentFirstChild) {
|
||
if (!shouldTrackSideEffects) {
|
||
// Noop.
|
||
return null;
|
||
}
|
||
|
||
// TODO: For the shouldClone case, this could be micro-optimized a bit by
|
||
// assuming that after the first child we've already added everything.
|
||
var childToDelete = currentFirstChild;
|
||
while (childToDelete !== null) {
|
||
deleteChild(returnFiber, childToDelete);
|
||
childToDelete = childToDelete.sibling;
|
||
}
|
||
return null;
|
||
}
|
||
|
||
function mapRemainingChildren(returnFiber, currentFirstChild) {
|
||
// Add the remaining children to a temporary map so that we can find them by
|
||
// keys quickly. Implicit (null) keys get added to this set with their index
|
||
var existingChildren = new Map();
|
||
|
||
var existingChild = currentFirstChild;
|
||
while (existingChild !== null) {
|
||
if (existingChild.key !== null) {
|
||
existingChildren.set(existingChild.key, existingChild);
|
||
} else {
|
||
existingChildren.set(existingChild.index, existingChild);
|
||
}
|
||
existingChild = existingChild.sibling;
|
||
}
|
||
return existingChildren;
|
||
}
|
||
|
||
function useFiber(fiber, pendingProps, expirationTime) {
|
||
// We currently set sibling to null and index to 0 here because it is easy
|
||
// to forget to do before returning it. E.g. for the single child case.
|
||
var clone = createWorkInProgress(fiber, pendingProps, expirationTime);
|
||
clone.index = 0;
|
||
clone.sibling = null;
|
||
return clone;
|
||
}
|
||
|
||
function placeChild(newFiber, lastPlacedIndex, newIndex) {
|
||
newFiber.index = newIndex;
|
||
if (!shouldTrackSideEffects) {
|
||
// Noop.
|
||
return lastPlacedIndex;
|
||
}
|
||
var current$$1 = newFiber.alternate;
|
||
if (current$$1 !== null) {
|
||
var oldIndex = current$$1.index;
|
||
if (oldIndex < lastPlacedIndex) {
|
||
// This is a move.
|
||
newFiber.effectTag = Placement;
|
||
return lastPlacedIndex;
|
||
} else {
|
||
// This item can stay in place.
|
||
return oldIndex;
|
||
}
|
||
} else {
|
||
// This is an insertion.
|
||
newFiber.effectTag = Placement;
|
||
return lastPlacedIndex;
|
||
}
|
||
}
|
||
|
||
function placeSingleChild(newFiber) {
|
||
// This is simpler for the single child case. We only need to do a
|
||
// placement for inserting new children.
|
||
if (shouldTrackSideEffects && newFiber.alternate === null) {
|
||
newFiber.effectTag = Placement;
|
||
}
|
||
return newFiber;
|
||
}
|
||
|
||
function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {
|
||
if (current$$1 === null || current$$1.tag !== HostText) {
|
||
// Insert
|
||
var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
|
||
created.return = returnFiber;
|
||
return created;
|
||
} else {
|
||
// Update
|
||
var existing = useFiber(current$$1, textContent, expirationTime);
|
||
existing.return = returnFiber;
|
||
return existing;
|
||
}
|
||
}
|
||
|
||
function updateElement(returnFiber, current$$1, element, expirationTime) {
|
||
if (current$$1 !== null && current$$1.elementType === element.type) {
|
||
// Move based on index
|
||
var existing = useFiber(current$$1, element.props, expirationTime);
|
||
existing.ref = coerceRef(returnFiber, current$$1, element);
|
||
existing.return = returnFiber;
|
||
{
|
||
existing._debugSource = element._source;
|
||
existing._debugOwner = element._owner;
|
||
}
|
||
return existing;
|
||
} else {
|
||
// Insert
|
||
var created = createFiberFromElement(element, returnFiber.mode, expirationTime);
|
||
created.ref = coerceRef(returnFiber, current$$1, element);
|
||
created.return = returnFiber;
|
||
return created;
|
||
}
|
||
}
|
||
|
||
function updatePortal(returnFiber, current$$1, portal, expirationTime) {
|
||
if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {
|
||
// Insert
|
||
var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
|
||
created.return = returnFiber;
|
||
return created;
|
||
} else {
|
||
// Update
|
||
var existing = useFiber(current$$1, portal.children || [], expirationTime);
|
||
existing.return = returnFiber;
|
||
return existing;
|
||
}
|
||
}
|
||
|
||
function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {
|
||
if (current$$1 === null || current$$1.tag !== Fragment) {
|
||
// Insert
|
||
var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);
|
||
created.return = returnFiber;
|
||
return created;
|
||
} else {
|
||
// Update
|
||
var existing = useFiber(current$$1, fragment, expirationTime);
|
||
existing.return = returnFiber;
|
||
return existing;
|
||
}
|
||
}
|
||
|
||
function createChild(returnFiber, newChild, expirationTime) {
|
||
if (typeof newChild === 'string' || typeof newChild === 'number') {
|
||
// Text nodes don't have keys. If the previous node is implicitly keyed
|
||
// we can continue to replace it without aborting even if it is not a text
|
||
// node.
|
||
var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);
|
||
created.return = returnFiber;
|
||
return created;
|
||
}
|
||
|
||
if (typeof newChild === 'object' && newChild !== null) {
|
||
switch (newChild.$$typeof) {
|
||
case REACT_ELEMENT_TYPE:
|
||
{
|
||
var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);
|
||
_created.ref = coerceRef(returnFiber, null, newChild);
|
||
_created.return = returnFiber;
|
||
return _created;
|
||
}
|
||
case REACT_PORTAL_TYPE:
|
||
{
|
||
var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);
|
||
_created2.return = returnFiber;
|
||
return _created2;
|
||
}
|
||
}
|
||
|
||
if (isArray(newChild) || getIteratorFn(newChild)) {
|
||
var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);
|
||
_created3.return = returnFiber;
|
||
return _created3;
|
||
}
|
||
|
||
throwOnInvalidObjectType(returnFiber, newChild);
|
||
}
|
||
|
||
{
|
||
if (typeof newChild === 'function') {
|
||
warnOnFunctionType();
|
||
}
|
||
}
|
||
|
||
return null;
|
||
}
|
||
|
||
function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
|
||
// Update the fiber if the keys match, otherwise return null.
|
||
|
||
var key = oldFiber !== null ? oldFiber.key : null;
|
||
|
||
if (typeof newChild === 'string' || typeof newChild === 'number') {
|
||
// Text nodes don't have keys. If the previous node is implicitly keyed
|
||
// we can continue to replace it without aborting even if it is not a text
|
||
// node.
|
||
if (key !== null) {
|
||
return null;
|
||
}
|
||
return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);
|
||
}
|
||
|
||
if (typeof newChild === 'object' && newChild !== null) {
|
||
switch (newChild.$$typeof) {
|
||
case REACT_ELEMENT_TYPE:
|
||
{
|
||
if (newChild.key === key) {
|
||
if (newChild.type === REACT_FRAGMENT_TYPE) {
|
||
return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);
|
||
}
|
||
return updateElement(returnFiber, oldFiber, newChild, expirationTime);
|
||
} else {
|
||
return null;
|
||
}
|
||
}
|
||
case REACT_PORTAL_TYPE:
|
||
{
|
||
if (newChild.key === key) {
|
||
return updatePortal(returnFiber, oldFiber, newChild, expirationTime);
|
||
} else {
|
||
return null;
|
||
}
|
||
}
|
||
}
|
||
|
||
if (isArray(newChild) || getIteratorFn(newChild)) {
|
||
if (key !== null) {
|
||
return null;
|
||
}
|
||
|
||
return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);
|
||
}
|
||
|
||
throwOnInvalidObjectType(returnFiber, newChild);
|
||
}
|
||
|
||
{
|
||
if (typeof newChild === 'function') {
|
||
warnOnFunctionType();
|
||
}
|
||
}
|
||
|
||
return null;
|
||
}
|
||
|
||
function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {
|
||
if (typeof newChild === 'string' || typeof newChild === 'number') {
|
||
// Text nodes don't have keys, so we neither have to check the old nor
|
||
// new node for the key. If both are text nodes, they match.
|
||
var matchedFiber = existingChildren.get(newIdx) || null;
|
||
return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);
|
||
}
|
||
|
||
if (typeof newChild === 'object' && newChild !== null) {
|
||
switch (newChild.$$typeof) {
|
||
case REACT_ELEMENT_TYPE:
|
||
{
|
||
var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
|
||
if (newChild.type === REACT_FRAGMENT_TYPE) {
|
||
return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);
|
||
}
|
||
return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);
|
||
}
|
||
case REACT_PORTAL_TYPE:
|
||
{
|
||
var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
|
||
return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);
|
||
}
|
||
}
|
||
|
||
if (isArray(newChild) || getIteratorFn(newChild)) {
|
||
var _matchedFiber3 = existingChildren.get(newIdx) || null;
|
||
return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);
|
||
}
|
||
|
||
throwOnInvalidObjectType(returnFiber, newChild);
|
||
}
|
||
|
||
{
|
||
if (typeof newChild === 'function') {
|
||
warnOnFunctionType();
|
||
}
|
||
}
|
||
|
||
return null;
|
||
}
|
||
|
||
/**
|
||
* Warns if there is a duplicate or missing key
|
||
*/
|
||
function warnOnInvalidKey(child, knownKeys) {
|
||
{
|
||
if (typeof child !== 'object' || child === null) {
|
||
return knownKeys;
|
||
}
|
||
switch (child.$$typeof) {
|
||
case REACT_ELEMENT_TYPE:
|
||
case REACT_PORTAL_TYPE:
|
||
warnForMissingKey(child);
|
||
var key = child.key;
|
||
if (typeof key !== 'string') {
|
||
break;
|
||
}
|
||
if (knownKeys === null) {
|
||
knownKeys = new Set();
|
||
knownKeys.add(key);
|
||
break;
|
||
}
|
||
if (!knownKeys.has(key)) {
|
||
knownKeys.add(key);
|
||
break;
|
||
}
|
||
warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
}
|
||
return knownKeys;
|
||
}
|
||
|
||
function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {
|
||
// This algorithm can't optimize by searching from boths ends since we
|
||
// don't have backpointers on fibers. I'm trying to see how far we can get
|
||
// with that model. If it ends up not being worth the tradeoffs, we can
|
||
// add it later.
|
||
|
||
// Even with a two ended optimization, we'd want to optimize for the case
|
||
// where there are few changes and brute force the comparison instead of
|
||
// going for the Map. It'd like to explore hitting that path first in
|
||
// forward-only mode and only go for the Map once we notice that we need
|
||
// lots of look ahead. This doesn't handle reversal as well as two ended
|
||
// search but that's unusual. Besides, for the two ended optimization to
|
||
// work on Iterables, we'd need to copy the whole set.
|
||
|
||
// In this first iteration, we'll just live with hitting the bad case
|
||
// (adding everything to a Map) in for every insert/move.
|
||
|
||
// If you change this code, also update reconcileChildrenIterator() which
|
||
// uses the same algorithm.
|
||
|
||
{
|
||
// First, validate keys.
|
||
var knownKeys = null;
|
||
for (var i = 0; i < newChildren.length; i++) {
|
||
var child = newChildren[i];
|
||
knownKeys = warnOnInvalidKey(child, knownKeys);
|
||
}
|
||
}
|
||
|
||
var resultingFirstChild = null;
|
||
var previousNewFiber = null;
|
||
|
||
var oldFiber = currentFirstChild;
|
||
var lastPlacedIndex = 0;
|
||
var newIdx = 0;
|
||
var nextOldFiber = null;
|
||
for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {
|
||
if (oldFiber.index > newIdx) {
|
||
nextOldFiber = oldFiber;
|
||
oldFiber = null;
|
||
} else {
|
||
nextOldFiber = oldFiber.sibling;
|
||
}
|
||
var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);
|
||
if (newFiber === null) {
|
||
// TODO: This breaks on empty slots like null children. That's
|
||
// unfortunate because it triggers the slow path all the time. We need
|
||
// a better way to communicate whether this was a miss or null,
|
||
// boolean, undefined, etc.
|
||
if (oldFiber === null) {
|
||
oldFiber = nextOldFiber;
|
||
}
|
||
break;
|
||
}
|
||
if (shouldTrackSideEffects) {
|
||
if (oldFiber && newFiber.alternate === null) {
|
||
// We matched the slot, but we didn't reuse the existing fiber, so we
|
||
// need to delete the existing child.
|
||
deleteChild(returnFiber, oldFiber);
|
||
}
|
||
}
|
||
lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
|
||
if (previousNewFiber === null) {
|
||
// TODO: Move out of the loop. This only happens for the first run.
|
||
resultingFirstChild = newFiber;
|
||
} else {
|
||
// TODO: Defer siblings if we're not at the right index for this slot.
|
||
// I.e. if we had null values before, then we want to defer this
|
||
// for each null value. However, we also don't want to call updateSlot
|
||
// with the previous one.
|
||
previousNewFiber.sibling = newFiber;
|
||
}
|
||
previousNewFiber = newFiber;
|
||
oldFiber = nextOldFiber;
|
||
}
|
||
|
||
if (newIdx === newChildren.length) {
|
||
// We've reached the end of the new children. We can delete the rest.
|
||
deleteRemainingChildren(returnFiber, oldFiber);
|
||
return resultingFirstChild;
|
||
}
|
||
|
||
if (oldFiber === null) {
|
||
// If we don't have any more existing children we can choose a fast path
|
||
// since the rest will all be insertions.
|
||
for (; newIdx < newChildren.length; newIdx++) {
|
||
var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);
|
||
if (!_newFiber) {
|
||
continue;
|
||
}
|
||
lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);
|
||
if (previousNewFiber === null) {
|
||
// TODO: Move out of the loop. This only happens for the first run.
|
||
resultingFirstChild = _newFiber;
|
||
} else {
|
||
previousNewFiber.sibling = _newFiber;
|
||
}
|
||
previousNewFiber = _newFiber;
|
||
}
|
||
return resultingFirstChild;
|
||
}
|
||
|
||
// Add all children to a key map for quick lookups.
|
||
var existingChildren = mapRemainingChildren(returnFiber, oldFiber);
|
||
|
||
// Keep scanning and use the map to restore deleted items as moves.
|
||
for (; newIdx < newChildren.length; newIdx++) {
|
||
var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);
|
||
if (_newFiber2) {
|
||
if (shouldTrackSideEffects) {
|
||
if (_newFiber2.alternate !== null) {
|
||
// The new fiber is a work in progress, but if there exists a
|
||
// current, that means that we reused the fiber. We need to delete
|
||
// it from the child list so that we don't add it to the deletion
|
||
// list.
|
||
existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);
|
||
}
|
||
}
|
||
lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);
|
||
if (previousNewFiber === null) {
|
||
resultingFirstChild = _newFiber2;
|
||
} else {
|
||
previousNewFiber.sibling = _newFiber2;
|
||
}
|
||
previousNewFiber = _newFiber2;
|
||
}
|
||
}
|
||
|
||
if (shouldTrackSideEffects) {
|
||
// Any existing children that weren't consumed above were deleted. We need
|
||
// to add them to the deletion list.
|
||
existingChildren.forEach(function (child) {
|
||
return deleteChild(returnFiber, child);
|
||
});
|
||
}
|
||
|
||
return resultingFirstChild;
|
||
}
|
||
|
||
function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {
|
||
// This is the same implementation as reconcileChildrenArray(),
|
||
// but using the iterator instead.
|
||
|
||
var iteratorFn = getIteratorFn(newChildrenIterable);
|
||
!(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
|
||
{
|
||
// We don't support rendering Generators because it's a mutation.
|
||
// See https://github.com/facebook/react/issues/12995
|
||
if (typeof Symbol === 'function' &&
|
||
// $FlowFixMe Flow doesn't know about toStringTag
|
||
newChildrenIterable[Symbol.toStringTag] === 'Generator') {
|
||
!didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;
|
||
didWarnAboutGenerators = true;
|
||
}
|
||
|
||
// Warn about using Maps as children
|
||
if (newChildrenIterable.entries === iteratorFn) {
|
||
!didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;
|
||
didWarnAboutMaps = true;
|
||
}
|
||
|
||
// First, validate keys.
|
||
// We'll get a different iterator later for the main pass.
|
||
var _newChildren = iteratorFn.call(newChildrenIterable);
|
||
if (_newChildren) {
|
||
var knownKeys = null;
|
||
var _step = _newChildren.next();
|
||
for (; !_step.done; _step = _newChildren.next()) {
|
||
var child = _step.value;
|
||
knownKeys = warnOnInvalidKey(child, knownKeys);
|
||
}
|
||
}
|
||
}
|
||
|
||
var newChildren = iteratorFn.call(newChildrenIterable);
|
||
!(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;
|
||
|
||
var resultingFirstChild = null;
|
||
var previousNewFiber = null;
|
||
|
||
var oldFiber = currentFirstChild;
|
||
var lastPlacedIndex = 0;
|
||
var newIdx = 0;
|
||
var nextOldFiber = null;
|
||
|
||
var step = newChildren.next();
|
||
for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
|
||
if (oldFiber.index > newIdx) {
|
||
nextOldFiber = oldFiber;
|
||
oldFiber = null;
|
||
} else {
|
||
nextOldFiber = oldFiber.sibling;
|
||
}
|
||
var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);
|
||
if (newFiber === null) {
|
||
// TODO: This breaks on empty slots like null children. That's
|
||
// unfortunate because it triggers the slow path all the time. We need
|
||
// a better way to communicate whether this was a miss or null,
|
||
// boolean, undefined, etc.
|
||
if (!oldFiber) {
|
||
oldFiber = nextOldFiber;
|
||
}
|
||
break;
|
||
}
|
||
if (shouldTrackSideEffects) {
|
||
if (oldFiber && newFiber.alternate === null) {
|
||
// We matched the slot, but we didn't reuse the existing fiber, so we
|
||
// need to delete the existing child.
|
||
deleteChild(returnFiber, oldFiber);
|
||
}
|
||
}
|
||
lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
|
||
if (previousNewFiber === null) {
|
||
// TODO: Move out of the loop. This only happens for the first run.
|
||
resultingFirstChild = newFiber;
|
||
} else {
|
||
// TODO: Defer siblings if we're not at the right index for this slot.
|
||
// I.e. if we had null values before, then we want to defer this
|
||
// for each null value. However, we also don't want to call updateSlot
|
||
// with the previous one.
|
||
previousNewFiber.sibling = newFiber;
|
||
}
|
||
previousNewFiber = newFiber;
|
||
oldFiber = nextOldFiber;
|
||
}
|
||
|
||
if (step.done) {
|
||
// We've reached the end of the new children. We can delete the rest.
|
||
deleteRemainingChildren(returnFiber, oldFiber);
|
||
return resultingFirstChild;
|
||
}
|
||
|
||
if (oldFiber === null) {
|
||
// If we don't have any more existing children we can choose a fast path
|
||
// since the rest will all be insertions.
|
||
for (; !step.done; newIdx++, step = newChildren.next()) {
|
||
var _newFiber3 = createChild(returnFiber, step.value, expirationTime);
|
||
if (_newFiber3 === null) {
|
||
continue;
|
||
}
|
||
lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);
|
||
if (previousNewFiber === null) {
|
||
// TODO: Move out of the loop. This only happens for the first run.
|
||
resultingFirstChild = _newFiber3;
|
||
} else {
|
||
previousNewFiber.sibling = _newFiber3;
|
||
}
|
||
previousNewFiber = _newFiber3;
|
||
}
|
||
return resultingFirstChild;
|
||
}
|
||
|
||
// Add all children to a key map for quick lookups.
|
||
var existingChildren = mapRemainingChildren(returnFiber, oldFiber);
|
||
|
||
// Keep scanning and use the map to restore deleted items as moves.
|
||
for (; !step.done; newIdx++, step = newChildren.next()) {
|
||
var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);
|
||
if (_newFiber4 !== null) {
|
||
if (shouldTrackSideEffects) {
|
||
if (_newFiber4.alternate !== null) {
|
||
// The new fiber is a work in progress, but if there exists a
|
||
// current, that means that we reused the fiber. We need to delete
|
||
// it from the child list so that we don't add it to the deletion
|
||
// list.
|
||
existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);
|
||
}
|
||
}
|
||
lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);
|
||
if (previousNewFiber === null) {
|
||
resultingFirstChild = _newFiber4;
|
||
} else {
|
||
previousNewFiber.sibling = _newFiber4;
|
||
}
|
||
previousNewFiber = _newFiber4;
|
||
}
|
||
}
|
||
|
||
if (shouldTrackSideEffects) {
|
||
// Any existing children that weren't consumed above were deleted. We need
|
||
// to add them to the deletion list.
|
||
existingChildren.forEach(function (child) {
|
||
return deleteChild(returnFiber, child);
|
||
});
|
||
}
|
||
|
||
return resultingFirstChild;
|
||
}
|
||
|
||
function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {
|
||
// There's no need to check for keys on text nodes since we don't have a
|
||
// way to define them.
|
||
if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
|
||
// We already have an existing node so let's just update it and delete
|
||
// the rest.
|
||
deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
|
||
var existing = useFiber(currentFirstChild, textContent, expirationTime);
|
||
existing.return = returnFiber;
|
||
return existing;
|
||
}
|
||
// The existing first child is not a text node so we need to create one
|
||
// and delete the existing ones.
|
||
deleteRemainingChildren(returnFiber, currentFirstChild);
|
||
var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
|
||
created.return = returnFiber;
|
||
return created;
|
||
}
|
||
|
||
function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {
|
||
var key = element.key;
|
||
var child = currentFirstChild;
|
||
while (child !== null) {
|
||
// TODO: If key === null and child.key === null, then this only applies to
|
||
// the first item in the list.
|
||
if (child.key === key) {
|
||
if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type) {
|
||
deleteRemainingChildren(returnFiber, child.sibling);
|
||
var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);
|
||
existing.ref = coerceRef(returnFiber, child, element);
|
||
existing.return = returnFiber;
|
||
{
|
||
existing._debugSource = element._source;
|
||
existing._debugOwner = element._owner;
|
||
}
|
||
return existing;
|
||
} else {
|
||
deleteRemainingChildren(returnFiber, child);
|
||
break;
|
||
}
|
||
} else {
|
||
deleteChild(returnFiber, child);
|
||
}
|
||
child = child.sibling;
|
||
}
|
||
|
||
if (element.type === REACT_FRAGMENT_TYPE) {
|
||
var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);
|
||
created.return = returnFiber;
|
||
return created;
|
||
} else {
|
||
var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);
|
||
_created4.ref = coerceRef(returnFiber, currentFirstChild, element);
|
||
_created4.return = returnFiber;
|
||
return _created4;
|
||
}
|
||
}
|
||
|
||
function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {
|
||
var key = portal.key;
|
||
var child = currentFirstChild;
|
||
while (child !== null) {
|
||
// TODO: If key === null and child.key === null, then this only applies to
|
||
// the first item in the list.
|
||
if (child.key === key) {
|
||
if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {
|
||
deleteRemainingChildren(returnFiber, child.sibling);
|
||
var existing = useFiber(child, portal.children || [], expirationTime);
|
||
existing.return = returnFiber;
|
||
return existing;
|
||
} else {
|
||
deleteRemainingChildren(returnFiber, child);
|
||
break;
|
||
}
|
||
} else {
|
||
deleteChild(returnFiber, child);
|
||
}
|
||
child = child.sibling;
|
||
}
|
||
|
||
var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
|
||
created.return = returnFiber;
|
||
return created;
|
||
}
|
||
|
||
// This API will tag the children with the side-effect of the reconciliation
|
||
// itself. They will be added to the side-effect list as we pass through the
|
||
// children and the parent.
|
||
function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {
|
||
// This function is not recursive.
|
||
// If the top level item is an array, we treat it as a set of children,
|
||
// not as a fragment. Nested arrays on the other hand will be treated as
|
||
// fragment nodes. Recursion happens at the normal flow.
|
||
|
||
// Handle top level unkeyed fragments as if they were arrays.
|
||
// This leads to an ambiguity between <>{[...]}</> and <>...</>.
|
||
// We treat the ambiguous cases above the same.
|
||
var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;
|
||
if (isUnkeyedTopLevelFragment) {
|
||
newChild = newChild.props.children;
|
||
}
|
||
|
||
// Handle object types
|
||
var isObject = typeof newChild === 'object' && newChild !== null;
|
||
|
||
if (isObject) {
|
||
switch (newChild.$$typeof) {
|
||
case REACT_ELEMENT_TYPE:
|
||
return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));
|
||
case REACT_PORTAL_TYPE:
|
||
return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));
|
||
}
|
||
}
|
||
|
||
if (typeof newChild === 'string' || typeof newChild === 'number') {
|
||
return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));
|
||
}
|
||
|
||
if (isArray(newChild)) {
|
||
return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);
|
||
}
|
||
|
||
if (getIteratorFn(newChild)) {
|
||
return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);
|
||
}
|
||
|
||
if (isObject) {
|
||
throwOnInvalidObjectType(returnFiber, newChild);
|
||
}
|
||
|
||
{
|
||
if (typeof newChild === 'function') {
|
||
warnOnFunctionType();
|
||
}
|
||
}
|
||
if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {
|
||
// If the new child is undefined, and the return fiber is a composite
|
||
// component, throw an error. If Fiber return types are disabled,
|
||
// we already threw above.
|
||
switch (returnFiber.tag) {
|
||
case ClassComponent:
|
||
{
|
||
{
|
||
var instance = returnFiber.stateNode;
|
||
if (instance.render._isMockFunction) {
|
||
// We allow auto-mocks to proceed as if they're returning null.
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
// Intentionally fall through to the next case, which handles both
|
||
// functions and classes
|
||
// eslint-disable-next-lined no-fallthrough
|
||
case FunctionComponent:
|
||
{
|
||
var Component = returnFiber.type;
|
||
invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');
|
||
}
|
||
}
|
||
}
|
||
|
||
// Remaining cases are all treated as empty.
|
||
return deleteRemainingChildren(returnFiber, currentFirstChild);
|
||
}
|
||
|
||
return reconcileChildFibers;
|
||
}
|
||
|
||
var reconcileChildFibers = ChildReconciler(true);
|
||
var mountChildFibers = ChildReconciler(false);
|
||
|
||
function cloneChildFibers(current$$1, workInProgress) {
|
||
!(current$$1 === null || workInProgress.child === current$$1.child) ? invariant(false, 'Resuming work not yet implemented.') : void 0;
|
||
|
||
if (workInProgress.child === null) {
|
||
return;
|
||
}
|
||
|
||
var currentChild = workInProgress.child;
|
||
var newChild = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);
|
||
workInProgress.child = newChild;
|
||
|
||
newChild.return = workInProgress;
|
||
while (currentChild.sibling !== null) {
|
||
currentChild = currentChild.sibling;
|
||
newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);
|
||
newChild.return = workInProgress;
|
||
}
|
||
newChild.sibling = null;
|
||
}
|
||
|
||
// The deepest Fiber on the stack involved in a hydration context.
|
||
// This may have been an insertion or a hydration.
|
||
var hydrationParentFiber = null;
|
||
var nextHydratableInstance = null;
|
||
var isHydrating = false;
|
||
|
||
function enterHydrationState(fiber) {
|
||
if (!supportsHydration) {
|
||
return false;
|
||
}
|
||
|
||
var parentInstance = fiber.stateNode.containerInfo;
|
||
nextHydratableInstance = getFirstHydratableChild(parentInstance);
|
||
hydrationParentFiber = fiber;
|
||
isHydrating = true;
|
||
return true;
|
||
}
|
||
|
||
function deleteHydratableInstance(returnFiber, instance) {
|
||
{
|
||
switch (returnFiber.tag) {
|
||
case HostRoot:
|
||
didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);
|
||
break;
|
||
case HostComponent:
|
||
didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);
|
||
break;
|
||
}
|
||
}
|
||
|
||
var childToDelete = createFiberFromHostInstanceForDeletion();
|
||
childToDelete.stateNode = instance;
|
||
childToDelete.return = returnFiber;
|
||
childToDelete.effectTag = Deletion;
|
||
|
||
// This might seem like it belongs on progressedFirstDeletion. However,
|
||
// these children are not part of the reconciliation list of children.
|
||
// Even if we abort and rereconcile the children, that will try to hydrate
|
||
// again and the nodes are still in the host tree so these will be
|
||
// recreated.
|
||
if (returnFiber.lastEffect !== null) {
|
||
returnFiber.lastEffect.nextEffect = childToDelete;
|
||
returnFiber.lastEffect = childToDelete;
|
||
} else {
|
||
returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
|
||
}
|
||
}
|
||
|
||
function insertNonHydratedInstance(returnFiber, fiber) {
|
||
fiber.effectTag |= Placement;
|
||
{
|
||
switch (returnFiber.tag) {
|
||
case HostRoot:
|
||
{
|
||
var parentContainer = returnFiber.stateNode.containerInfo;
|
||
switch (fiber.tag) {
|
||
case HostComponent:
|
||
var type = fiber.type;
|
||
var props = fiber.pendingProps;
|
||
didNotFindHydratableContainerInstance(parentContainer, type, props);
|
||
break;
|
||
case HostText:
|
||
var text = fiber.pendingProps;
|
||
didNotFindHydratableContainerTextInstance(parentContainer, text);
|
||
break;
|
||
}
|
||
break;
|
||
}
|
||
case HostComponent:
|
||
{
|
||
var parentType = returnFiber.type;
|
||
var parentProps = returnFiber.memoizedProps;
|
||
var parentInstance = returnFiber.stateNode;
|
||
switch (fiber.tag) {
|
||
case HostComponent:
|
||
var _type = fiber.type;
|
||
var _props = fiber.pendingProps;
|
||
didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props);
|
||
break;
|
||
case HostText:
|
||
var _text = fiber.pendingProps;
|
||
didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);
|
||
break;
|
||
}
|
||
break;
|
||
}
|
||
default:
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
|
||
function tryHydrate(fiber, nextInstance) {
|
||
switch (fiber.tag) {
|
||
case HostComponent:
|
||
{
|
||
var type = fiber.type;
|
||
var props = fiber.pendingProps;
|
||
var instance = canHydrateInstance(nextInstance, type, props);
|
||
if (instance !== null) {
|
||
fiber.stateNode = instance;
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
case HostText:
|
||
{
|
||
var text = fiber.pendingProps;
|
||
var textInstance = canHydrateTextInstance(nextInstance, text);
|
||
if (textInstance !== null) {
|
||
fiber.stateNode = textInstance;
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
default:
|
||
return false;
|
||
}
|
||
}
|
||
|
||
function tryToClaimNextHydratableInstance(fiber) {
|
||
if (!isHydrating) {
|
||
return;
|
||
}
|
||
var nextInstance = nextHydratableInstance;
|
||
if (!nextInstance) {
|
||
// Nothing to hydrate. Make it an insertion.
|
||
insertNonHydratedInstance(hydrationParentFiber, fiber);
|
||
isHydrating = false;
|
||
hydrationParentFiber = fiber;
|
||
return;
|
||
}
|
||
var firstAttemptedInstance = nextInstance;
|
||
if (!tryHydrate(fiber, nextInstance)) {
|
||
// If we can't hydrate this instance let's try the next one.
|
||
// We use this as a heuristic. It's based on intuition and not data so it
|
||
// might be flawed or unnecessary.
|
||
nextInstance = getNextHydratableSibling(firstAttemptedInstance);
|
||
if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
|
||
// Nothing to hydrate. Make it an insertion.
|
||
insertNonHydratedInstance(hydrationParentFiber, fiber);
|
||
isHydrating = false;
|
||
hydrationParentFiber = fiber;
|
||
return;
|
||
}
|
||
// We matched the next one, we'll now assume that the first one was
|
||
// superfluous and we'll delete it. Since we can't eagerly delete it
|
||
// we'll have to schedule a deletion. To do that, this node needs a dummy
|
||
// fiber associated with it.
|
||
deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);
|
||
}
|
||
hydrationParentFiber = fiber;
|
||
nextHydratableInstance = getFirstHydratableChild(nextInstance);
|
||
}
|
||
|
||
function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
|
||
if (!supportsHydration) {
|
||
invariant(false, 'Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');
|
||
}
|
||
|
||
var instance = fiber.stateNode;
|
||
var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber);
|
||
// TODO: Type this specific to this type of component.
|
||
fiber.updateQueue = updatePayload;
|
||
// If the update payload indicates that there is a change or if there
|
||
// is a new ref we mark this as an update.
|
||
if (updatePayload !== null) {
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
function prepareToHydrateHostTextInstance(fiber) {
|
||
if (!supportsHydration) {
|
||
invariant(false, 'Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');
|
||
}
|
||
|
||
var textInstance = fiber.stateNode;
|
||
var textContent = fiber.memoizedProps;
|
||
var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
|
||
{
|
||
if (shouldUpdate) {
|
||
// We assume that prepareToHydrateHostTextInstance is called in a context where the
|
||
// hydration parent is the parent host component of this host text.
|
||
var returnFiber = hydrationParentFiber;
|
||
if (returnFiber !== null) {
|
||
switch (returnFiber.tag) {
|
||
case HostRoot:
|
||
{
|
||
var parentContainer = returnFiber.stateNode.containerInfo;
|
||
didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);
|
||
break;
|
||
}
|
||
case HostComponent:
|
||
{
|
||
var parentType = returnFiber.type;
|
||
var parentProps = returnFiber.memoizedProps;
|
||
var parentInstance = returnFiber.stateNode;
|
||
didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return shouldUpdate;
|
||
}
|
||
|
||
function popToNextHostParent(fiber) {
|
||
var parent = fiber.return;
|
||
while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot) {
|
||
parent = parent.return;
|
||
}
|
||
hydrationParentFiber = parent;
|
||
}
|
||
|
||
function popHydrationState(fiber) {
|
||
if (!supportsHydration) {
|
||
return false;
|
||
}
|
||
if (fiber !== hydrationParentFiber) {
|
||
// We're deeper than the current hydration context, inside an inserted
|
||
// tree.
|
||
return false;
|
||
}
|
||
if (!isHydrating) {
|
||
// If we're not currently hydrating but we're in a hydration context, then
|
||
// we were an insertion and now need to pop up reenter hydration of our
|
||
// siblings.
|
||
popToNextHostParent(fiber);
|
||
isHydrating = true;
|
||
return false;
|
||
}
|
||
|
||
var type = fiber.type;
|
||
|
||
// If we have any remaining hydratable nodes, we need to delete them now.
|
||
// We only do this deeper than head and body since they tend to have random
|
||
// other nodes in them. We also ignore components with pure text content in
|
||
// side of them.
|
||
// TODO: Better heuristic.
|
||
if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {
|
||
var nextInstance = nextHydratableInstance;
|
||
while (nextInstance) {
|
||
deleteHydratableInstance(fiber, nextInstance);
|
||
nextInstance = getNextHydratableSibling(nextInstance);
|
||
}
|
||
}
|
||
|
||
popToNextHostParent(fiber);
|
||
nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
|
||
return true;
|
||
}
|
||
|
||
function resetHydrationState() {
|
||
if (!supportsHydration) {
|
||
return;
|
||
}
|
||
|
||
hydrationParentFiber = null;
|
||
nextHydratableInstance = null;
|
||
isHydrating = false;
|
||
}
|
||
|
||
var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;
|
||
|
||
var didWarnAboutBadClass = void 0;
|
||
var didWarnAboutContextTypeOnFunctionComponent = void 0;
|
||
var didWarnAboutGetDerivedStateOnFunctionComponent = void 0;
|
||
var didWarnAboutFunctionRefs = void 0;
|
||
var didWarnAboutReassigningProps = void 0;
|
||
|
||
{
|
||
didWarnAboutBadClass = {};
|
||
didWarnAboutContextTypeOnFunctionComponent = {};
|
||
didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
||
didWarnAboutFunctionRefs = {};
|
||
didWarnAboutReassigningProps = false;
|
||
}
|
||
|
||
function reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime) {
|
||
if (current$$1 === null) {
|
||
// If this is a fresh new component that hasn't been rendered yet, we
|
||
// won't update its child set by applying minimal side-effects. Instead,
|
||
// we will add them all to the child before it gets rendered. That means
|
||
// we can optimize this reconciliation pass by not tracking side-effects.
|
||
workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
|
||
} else {
|
||
// If the current child is the same as the work in progress, it means that
|
||
// we haven't yet started any work on these children. Therefore, we use
|
||
// the clone algorithm to create a copy of all the current children.
|
||
|
||
// If we had any progressed work already, that is invalid at this point so
|
||
// let's throw it out.
|
||
workInProgress.child = reconcileChildFibers(workInProgress, current$$1.child, nextChildren, renderExpirationTime);
|
||
}
|
||
}
|
||
|
||
function forceUnmountCurrentAndReconcile(current$$1, workInProgress, nextChildren, renderExpirationTime) {
|
||
// This function is fork of reconcileChildren. It's used in cases where we
|
||
// want to reconcile without matching against the existing set. This has the
|
||
// effect of all current children being unmounted; even if the type and key
|
||
// are the same, the old child is unmounted and a new child is created.
|
||
//
|
||
// To do this, we're going to go through the reconcile algorithm twice. In
|
||
// the first pass, we schedule a deletion for all the current children by
|
||
// passing null.
|
||
workInProgress.child = reconcileChildFibers(workInProgress, current$$1.child, null, renderExpirationTime);
|
||
// In the second pass, we mount the new children. The trick here is that we
|
||
// pass null in place of where we usually pass the current child set. This has
|
||
// the effect of remounting all children regardless of whether their their
|
||
// identity matches.
|
||
workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
|
||
}
|
||
|
||
function updateForwardRef(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
|
||
{
|
||
if (workInProgress.type !== workInProgress.elementType) {
|
||
// Lazy component props can't be validated in createElement
|
||
// because they're only guaranteed to be resolved here.
|
||
var innerPropTypes = Component.propTypes;
|
||
if (innerPropTypes) {
|
||
checkPropTypes(innerPropTypes, nextProps, // Resolved props
|
||
'prop', getComponentName(Component), getCurrentFiberStackInDev);
|
||
}
|
||
}
|
||
}
|
||
|
||
var render = Component.render;
|
||
var ref = workInProgress.ref;
|
||
|
||
// The rest is a fork of updateFunctionComponent
|
||
var nextChildren = void 0;
|
||
prepareToReadContext(workInProgress, renderExpirationTime);
|
||
prepareToUseHooks(current$$1, workInProgress, renderExpirationTime);
|
||
{
|
||
ReactCurrentOwner$3.current = workInProgress;
|
||
setCurrentPhase('render');
|
||
nextChildren = render(nextProps, ref);
|
||
setCurrentPhase(null);
|
||
}
|
||
nextChildren = finishHooks(render, nextProps, nextChildren, ref);
|
||
|
||
// React DevTools reads this flag.
|
||
workInProgress.effectTag |= PerformedWork;
|
||
reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
|
||
return workInProgress.child;
|
||
}
|
||
|
||
function updateMemoComponent(current$$1, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
|
||
if (current$$1 === null) {
|
||
var type = Component.type;
|
||
if (isSimpleFunctionComponent(type) && Component.compare === null &&
|
||
// SimpleMemoComponent codepath doesn't resolve outer props either.
|
||
Component.defaultProps === undefined) {
|
||
// If this is a plain function component without default props,
|
||
// and with only the default shallow comparison, we upgrade it
|
||
// to a SimpleMemoComponent to allow fast path updates.
|
||
workInProgress.tag = SimpleMemoComponent;
|
||
workInProgress.type = type;
|
||
{
|
||
validateFunctionComponentInDev(workInProgress, type);
|
||
}
|
||
return updateSimpleMemoComponent(current$$1, workInProgress, type, nextProps, updateExpirationTime, renderExpirationTime);
|
||
}
|
||
{
|
||
var innerPropTypes = type.propTypes;
|
||
if (innerPropTypes) {
|
||
// Inner memo component props aren't currently validated in createElement.
|
||
// We could move it there, but we'd still need this for lazy code path.
|
||
checkPropTypes(innerPropTypes, nextProps, // Resolved props
|
||
'prop', getComponentName(type), getCurrentFiberStackInDev);
|
||
}
|
||
}
|
||
var child = createFiberFromTypeAndProps(Component.type, null, nextProps, null, workInProgress.mode, renderExpirationTime);
|
||
child.ref = workInProgress.ref;
|
||
child.return = workInProgress;
|
||
workInProgress.child = child;
|
||
return child;
|
||
}
|
||
{
|
||
var _type = Component.type;
|
||
var _innerPropTypes = _type.propTypes;
|
||
if (_innerPropTypes) {
|
||
// Inner memo component props aren't currently validated in createElement.
|
||
// We could move it there, but we'd still need this for lazy code path.
|
||
checkPropTypes(_innerPropTypes, nextProps, // Resolved props
|
||
'prop', getComponentName(_type), getCurrentFiberStackInDev);
|
||
}
|
||
}
|
||
var currentChild = current$$1.child; // This is always exactly one child
|
||
if (updateExpirationTime < renderExpirationTime) {
|
||
// This will be the props with resolved defaultProps,
|
||
// unlike current.memoizedProps which will be the unresolved ones.
|
||
var prevProps = currentChild.memoizedProps;
|
||
// Default to shallow comparison
|
||
var compare = Component.compare;
|
||
compare = compare !== null ? compare : shallowEqual;
|
||
if (compare(prevProps, nextProps) && current$$1.ref === workInProgress.ref) {
|
||
return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
|
||
}
|
||
}
|
||
// React DevTools reads this flag.
|
||
workInProgress.effectTag |= PerformedWork;
|
||
var newChild = createWorkInProgress(currentChild, nextProps, renderExpirationTime);
|
||
newChild.ref = workInProgress.ref;
|
||
newChild.return = workInProgress;
|
||
workInProgress.child = newChild;
|
||
return newChild;
|
||
}
|
||
|
||
function updateSimpleMemoComponent(current$$1, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
|
||
{
|
||
if (workInProgress.type !== workInProgress.elementType) {
|
||
// Lazy component props can't be validated in createElement
|
||
// because they're only guaranteed to be resolved here.
|
||
var outerMemoType = workInProgress.elementType;
|
||
if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {
|
||
// We warn when you define propTypes on lazy()
|
||
// so let's just skip over it to find memo() outer wrapper.
|
||
// Inner props for memo are validated later.
|
||
outerMemoType = refineResolvedLazyComponent(outerMemoType);
|
||
}
|
||
var outerPropTypes = outerMemoType && outerMemoType.propTypes;
|
||
if (outerPropTypes) {
|
||
checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
|
||
'prop', getComponentName(outerMemoType), getCurrentFiberStackInDev);
|
||
}
|
||
// Inner propTypes will be validated in the function component path.
|
||
}
|
||
}
|
||
if (current$$1 !== null && updateExpirationTime < renderExpirationTime) {
|
||
var prevProps = current$$1.memoizedProps;
|
||
if (shallowEqual(prevProps, nextProps) && current$$1.ref === workInProgress.ref) {
|
||
return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
|
||
}
|
||
}
|
||
return updateFunctionComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime);
|
||
}
|
||
|
||
function updateFragment(current$$1, workInProgress, renderExpirationTime) {
|
||
var nextChildren = workInProgress.pendingProps;
|
||
reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
|
||
return workInProgress.child;
|
||
}
|
||
|
||
function updateMode(current$$1, workInProgress, renderExpirationTime) {
|
||
var nextChildren = workInProgress.pendingProps.children;
|
||
reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
|
||
return workInProgress.child;
|
||
}
|
||
|
||
function updateProfiler(current$$1, workInProgress, renderExpirationTime) {
|
||
if (enableProfilerTimer) {
|
||
workInProgress.effectTag |= Update;
|
||
}
|
||
var nextProps = workInProgress.pendingProps;
|
||
var nextChildren = nextProps.children;
|
||
reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
|
||
return workInProgress.child;
|
||
}
|
||
|
||
function markRef(current$$1, workInProgress) {
|
||
var ref = workInProgress.ref;
|
||
if (current$$1 === null && ref !== null || current$$1 !== null && current$$1.ref !== ref) {
|
||
// Schedule a Ref effect
|
||
workInProgress.effectTag |= Ref;
|
||
}
|
||
}
|
||
|
||
function updateFunctionComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
|
||
{
|
||
if (workInProgress.type !== workInProgress.elementType) {
|
||
// Lazy component props can't be validated in createElement
|
||
// because they're only guaranteed to be resolved here.
|
||
var innerPropTypes = Component.propTypes;
|
||
if (innerPropTypes) {
|
||
checkPropTypes(innerPropTypes, nextProps, // Resolved props
|
||
'prop', getComponentName(Component), getCurrentFiberStackInDev);
|
||
}
|
||
}
|
||
}
|
||
|
||
var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);
|
||
var context = getMaskedContext(workInProgress, unmaskedContext);
|
||
|
||
var nextChildren = void 0;
|
||
prepareToReadContext(workInProgress, renderExpirationTime);
|
||
prepareToUseHooks(current$$1, workInProgress, renderExpirationTime);
|
||
{
|
||
ReactCurrentOwner$3.current = workInProgress;
|
||
setCurrentPhase('render');
|
||
nextChildren = Component(nextProps, context);
|
||
setCurrentPhase(null);
|
||
}
|
||
nextChildren = finishHooks(Component, nextProps, nextChildren, context);
|
||
|
||
// React DevTools reads this flag.
|
||
workInProgress.effectTag |= PerformedWork;
|
||
reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
|
||
return workInProgress.child;
|
||
}
|
||
|
||
function updateClassComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
|
||
{
|
||
if (workInProgress.type !== workInProgress.elementType) {
|
||
// Lazy component props can't be validated in createElement
|
||
// because they're only guaranteed to be resolved here.
|
||
var innerPropTypes = Component.propTypes;
|
||
if (innerPropTypes) {
|
||
checkPropTypes(innerPropTypes, nextProps, // Resolved props
|
||
'prop', getComponentName(Component), getCurrentFiberStackInDev);
|
||
}
|
||
}
|
||
}
|
||
|
||
// Push context providers early to prevent context stack mismatches.
|
||
// During mounting we don't know the child context yet as the instance doesn't exist.
|
||
// We will invalidate the child context in finishClassComponent() right after rendering.
|
||
var hasContext = void 0;
|
||
if (isContextProvider(Component)) {
|
||
hasContext = true;
|
||
pushContextProvider(workInProgress);
|
||
} else {
|
||
hasContext = false;
|
||
}
|
||
prepareToReadContext(workInProgress, renderExpirationTime);
|
||
|
||
var instance = workInProgress.stateNode;
|
||
var shouldUpdate = void 0;
|
||
if (instance === null) {
|
||
if (current$$1 !== null) {
|
||
// An class component without an instance only mounts if it suspended
|
||
// inside a non- concurrent tree, in an inconsistent state. We want to
|
||
// tree it like a new mount, even though an empty version of it already
|
||
// committed. Disconnect the alternate pointers.
|
||
current$$1.alternate = null;
|
||
workInProgress.alternate = null;
|
||
// Since this is conceptually a new fiber, schedule a Placement effect
|
||
workInProgress.effectTag |= Placement;
|
||
}
|
||
// In the initial pass we might need to construct the instance.
|
||
constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
|
||
mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
|
||
shouldUpdate = true;
|
||
} else if (current$$1 === null) {
|
||
// In a resume, we'll already have an instance we can reuse.
|
||
shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
|
||
} else {
|
||
shouldUpdate = updateClassInstance(current$$1, workInProgress, Component, nextProps, renderExpirationTime);
|
||
}
|
||
var nextUnitOfWork = finishClassComponent(current$$1, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime);
|
||
{
|
||
var inst = workInProgress.stateNode;
|
||
if (inst.props !== nextProps) {
|
||
!didWarnAboutReassigningProps ? warning$1(false, 'It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentName(workInProgress.type) || 'a component') : void 0;
|
||
didWarnAboutReassigningProps = true;
|
||
}
|
||
}
|
||
return nextUnitOfWork;
|
||
}
|
||
|
||
function finishClassComponent(current$$1, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime) {
|
||
// Refs should update even if shouldComponentUpdate returns false
|
||
markRef(current$$1, workInProgress);
|
||
|
||
var didCaptureError = (workInProgress.effectTag & DidCapture) !== NoEffect;
|
||
|
||
if (!shouldUpdate && !didCaptureError) {
|
||
// Context providers should defer to sCU for rendering
|
||
if (hasContext) {
|
||
invalidateContextProvider(workInProgress, Component, false);
|
||
}
|
||
|
||
return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
|
||
}
|
||
|
||
var instance = workInProgress.stateNode;
|
||
|
||
// Rerender
|
||
ReactCurrentOwner$3.current = workInProgress;
|
||
var nextChildren = void 0;
|
||
if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {
|
||
// If we captured an error, but getDerivedStateFrom catch is not defined,
|
||
// unmount all the children. componentDidCatch will schedule an update to
|
||
// re-render a fallback. This is temporary until we migrate everyone to
|
||
// the new API.
|
||
// TODO: Warn in a future release.
|
||
nextChildren = null;
|
||
|
||
if (enableProfilerTimer) {
|
||
stopProfilerTimerIfRunning(workInProgress);
|
||
}
|
||
} else {
|
||
{
|
||
setCurrentPhase('render');
|
||
nextChildren = instance.render();
|
||
if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
|
||
instance.render();
|
||
}
|
||
setCurrentPhase(null);
|
||
}
|
||
}
|
||
|
||
// React DevTools reads this flag.
|
||
workInProgress.effectTag |= PerformedWork;
|
||
if (current$$1 !== null && didCaptureError) {
|
||
// If we're recovering from an error, reconcile without reusing any of
|
||
// the existing children. Conceptually, the normal children and the children
|
||
// that are shown on error are two different sets, so we shouldn't reuse
|
||
// normal children even if their identities match.
|
||
forceUnmountCurrentAndReconcile(current$$1, workInProgress, nextChildren, renderExpirationTime);
|
||
} else {
|
||
reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
|
||
}
|
||
|
||
// Memoize state using the values we just used to render.
|
||
// TODO: Restructure so we never read values from the instance.
|
||
workInProgress.memoizedState = instance.state;
|
||
|
||
// The context might have changed so we need to recalculate it.
|
||
if (hasContext) {
|
||
invalidateContextProvider(workInProgress, Component, true);
|
||
}
|
||
|
||
return workInProgress.child;
|
||
}
|
||
|
||
function pushHostRootContext(workInProgress) {
|
||
var root = workInProgress.stateNode;
|
||
if (root.pendingContext) {
|
||
pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);
|
||
} else if (root.context) {
|
||
// Should always be set
|
||
pushTopLevelContextObject(workInProgress, root.context, false);
|
||
}
|
||
pushHostContainer(workInProgress, root.containerInfo);
|
||
}
|
||
|
||
function updateHostRoot(current$$1, workInProgress, renderExpirationTime) {
|
||
pushHostRootContext(workInProgress);
|
||
var updateQueue = workInProgress.updateQueue;
|
||
!(updateQueue !== null) ? invariant(false, 'If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
var nextProps = workInProgress.pendingProps;
|
||
var prevState = workInProgress.memoizedState;
|
||
var prevChildren = prevState !== null ? prevState.element : null;
|
||
processUpdateQueue(workInProgress, updateQueue, nextProps, null, renderExpirationTime);
|
||
var nextState = workInProgress.memoizedState;
|
||
// Caution: React DevTools currently depends on this property
|
||
// being called "element".
|
||
var nextChildren = nextState.element;
|
||
if (nextChildren === prevChildren) {
|
||
// If the state is the same as before, that's a bailout because we had
|
||
// no work that expires at this time.
|
||
resetHydrationState();
|
||
return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
|
||
}
|
||
var root = workInProgress.stateNode;
|
||
if ((current$$1 === null || current$$1.child === null) && root.hydrate && enterHydrationState(workInProgress)) {
|
||
// If we don't have any current children this might be the first pass.
|
||
// We always try to hydrate. If this isn't a hydration pass there won't
|
||
// be any children to hydrate which is effectively the same thing as
|
||
// not hydrating.
|
||
|
||
// This is a bit of a hack. We track the host root as a placement to
|
||
// know that we're currently in a mounting state. That way isMounted
|
||
// works as expected. We must reset this before committing.
|
||
// TODO: Delete this when we delete isMounted and findDOMNode.
|
||
workInProgress.effectTag |= Placement;
|
||
|
||
// Ensure that children mount into this root without tracking
|
||
// side-effects. This ensures that we don't store Placement effects on
|
||
// nodes that will be hydrated.
|
||
workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
|
||
} else {
|
||
// Otherwise reset hydration state in case we aborted and resumed another
|
||
// root.
|
||
reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
|
||
resetHydrationState();
|
||
}
|
||
return workInProgress.child;
|
||
}
|
||
|
||
function updateHostComponent(current$$1, workInProgress, renderExpirationTime) {
|
||
pushHostContext(workInProgress);
|
||
|
||
if (current$$1 === null) {
|
||
tryToClaimNextHydratableInstance(workInProgress);
|
||
}
|
||
|
||
var type = workInProgress.type;
|
||
var nextProps = workInProgress.pendingProps;
|
||
var prevProps = current$$1 !== null ? current$$1.memoizedProps : null;
|
||
|
||
var nextChildren = nextProps.children;
|
||
var isDirectTextChild = shouldSetTextContent(type, nextProps);
|
||
|
||
if (isDirectTextChild) {
|
||
// We special case a direct text child of a host node. This is a common
|
||
// case. We won't handle it as a reified child. We will instead handle
|
||
// this in the host environment that also have access to this prop. That
|
||
// avoids allocating another HostText fiber and traversing it.
|
||
nextChildren = null;
|
||
} else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
|
||
// If we're switching from a direct text child to a normal child, or to
|
||
// empty, we need to schedule the text content to be reset.
|
||
workInProgress.effectTag |= ContentReset;
|
||
}
|
||
|
||
markRef(current$$1, workInProgress);
|
||
|
||
// Check the host config to see if the children are offscreen/hidden.
|
||
if (renderExpirationTime !== Never && workInProgress.mode & ConcurrentMode && shouldDeprioritizeSubtree(type, nextProps)) {
|
||
// Schedule this fiber to re-render at offscreen priority. Then bailout.
|
||
workInProgress.expirationTime = Never;
|
||
return null;
|
||
}
|
||
|
||
reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
|
||
return workInProgress.child;
|
||
}
|
||
|
||
function updateHostText(current$$1, workInProgress) {
|
||
if (current$$1 === null) {
|
||
tryToClaimNextHydratableInstance(workInProgress);
|
||
}
|
||
// Nothing to do here. This is terminal. We'll do the completion step
|
||
// immediately after.
|
||
return null;
|
||
}
|
||
|
||
function mountLazyComponent(_current, workInProgress, elementType, updateExpirationTime, renderExpirationTime) {
|
||
if (_current !== null) {
|
||
// An lazy component only mounts if it suspended inside a non-
|
||
// concurrent tree, in an inconsistent state. We want to treat it like
|
||
// a new mount, even though an empty version of it already committed.
|
||
// Disconnect the alternate pointers.
|
||
_current.alternate = null;
|
||
workInProgress.alternate = null;
|
||
// Since this is conceptually a new fiber, schedule a Placement effect
|
||
workInProgress.effectTag |= Placement;
|
||
}
|
||
|
||
var props = workInProgress.pendingProps;
|
||
// We can't start a User Timing measurement with correct label yet.
|
||
// Cancel and resume right after we know the tag.
|
||
cancelWorkTimer(workInProgress);
|
||
var Component = readLazyComponentType(elementType);
|
||
// Store the unwrapped component in the type.
|
||
workInProgress.type = Component;
|
||
var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);
|
||
startWorkTimer(workInProgress);
|
||
var resolvedProps = resolveDefaultProps(Component, props);
|
||
var child = void 0;
|
||
switch (resolvedTag) {
|
||
case FunctionComponent:
|
||
{
|
||
child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
|
||
break;
|
||
}
|
||
case ClassComponent:
|
||
{
|
||
child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
|
||
break;
|
||
}
|
||
case ForwardRef:
|
||
{
|
||
child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderExpirationTime);
|
||
break;
|
||
}
|
||
case MemoComponent:
|
||
{
|
||
{
|
||
if (workInProgress.type !== workInProgress.elementType) {
|
||
var outerPropTypes = Component.propTypes;
|
||
if (outerPropTypes) {
|
||
checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only
|
||
'prop', getComponentName(Component), getCurrentFiberStackInDev);
|
||
}
|
||
}
|
||
}
|
||
child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
|
||
updateExpirationTime, renderExpirationTime);
|
||
break;
|
||
}
|
||
default:
|
||
{
|
||
var hint = '';
|
||
{
|
||
if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {
|
||
hint = ' Did you wrap a component in React.lazy() more than once?';
|
||
}
|
||
}
|
||
// This message intentionally doesn't mention ForwardRef or MemoComponent
|
||
// because the fact that it's a separate type of work is an
|
||
// implementation detail.
|
||
invariant(false, 'Element type is invalid. Received a promise that resolves to: %s. Lazy element type must resolve to a class or function.%s', Component, hint);
|
||
}
|
||
}
|
||
return child;
|
||
}
|
||
|
||
function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderExpirationTime) {
|
||
if (_current !== null) {
|
||
// An incomplete component only mounts if it suspended inside a non-
|
||
// concurrent tree, in an inconsistent state. We want to treat it like
|
||
// a new mount, even though an empty version of it already committed.
|
||
// Disconnect the alternate pointers.
|
||
_current.alternate = null;
|
||
workInProgress.alternate = null;
|
||
// Since this is conceptually a new fiber, schedule a Placement effect
|
||
workInProgress.effectTag |= Placement;
|
||
}
|
||
|
||
// Promote the fiber to a class and try rendering again.
|
||
workInProgress.tag = ClassComponent;
|
||
|
||
// The rest of this function is a fork of `updateClassComponent`
|
||
|
||
// Push context providers early to prevent context stack mismatches.
|
||
// During mounting we don't know the child context yet as the instance doesn't exist.
|
||
// We will invalidate the child context in finishClassComponent() right after rendering.
|
||
var hasContext = void 0;
|
||
if (isContextProvider(Component)) {
|
||
hasContext = true;
|
||
pushContextProvider(workInProgress);
|
||
} else {
|
||
hasContext = false;
|
||
}
|
||
prepareToReadContext(workInProgress, renderExpirationTime);
|
||
|
||
constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
|
||
mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
|
||
|
||
return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
|
||
}
|
||
|
||
function mountIndeterminateComponent(_current, workInProgress, Component, renderExpirationTime) {
|
||
if (_current !== null) {
|
||
// An indeterminate component only mounts if it suspended inside a non-
|
||
// concurrent tree, in an inconsistent state. We want to treat it like
|
||
// a new mount, even though an empty version of it already committed.
|
||
// Disconnect the alternate pointers.
|
||
_current.alternate = null;
|
||
workInProgress.alternate = null;
|
||
// Since this is conceptually a new fiber, schedule a Placement effect
|
||
workInProgress.effectTag |= Placement;
|
||
}
|
||
|
||
var props = workInProgress.pendingProps;
|
||
var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);
|
||
var context = getMaskedContext(workInProgress, unmaskedContext);
|
||
|
||
prepareToReadContext(workInProgress, renderExpirationTime);
|
||
prepareToUseHooks(null, workInProgress, renderExpirationTime);
|
||
|
||
var value = void 0;
|
||
|
||
{
|
||
if (Component.prototype && typeof Component.prototype.render === 'function') {
|
||
var componentName = getComponentName(Component) || 'Unknown';
|
||
|
||
if (!didWarnAboutBadClass[componentName]) {
|
||
warningWithoutStack$1(false, "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);
|
||
didWarnAboutBadClass[componentName] = true;
|
||
}
|
||
}
|
||
|
||
if (workInProgress.mode & StrictMode) {
|
||
ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);
|
||
}
|
||
|
||
ReactCurrentOwner$3.current = workInProgress;
|
||
value = Component(props, context);
|
||
}
|
||
// React DevTools reads this flag.
|
||
workInProgress.effectTag |= PerformedWork;
|
||
|
||
if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
|
||
// Proceed under the assumption that this is a class instance
|
||
workInProgress.tag = ClassComponent;
|
||
|
||
// Throw out any hooks that were used.
|
||
resetHooks();
|
||
|
||
// Push context providers early to prevent context stack mismatches.
|
||
// During mounting we don't know the child context yet as the instance doesn't exist.
|
||
// We will invalidate the child context in finishClassComponent() right after rendering.
|
||
var hasContext = false;
|
||
if (isContextProvider(Component)) {
|
||
hasContext = true;
|
||
pushContextProvider(workInProgress);
|
||
} else {
|
||
hasContext = false;
|
||
}
|
||
|
||
workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;
|
||
|
||
var getDerivedStateFromProps = Component.getDerivedStateFromProps;
|
||
if (typeof getDerivedStateFromProps === 'function') {
|
||
applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);
|
||
}
|
||
|
||
adoptClassInstance(workInProgress, value);
|
||
mountClassInstance(workInProgress, Component, props, renderExpirationTime);
|
||
return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
|
||
} else {
|
||
// Proceed under the assumption that this is a function component
|
||
workInProgress.tag = FunctionComponent;
|
||
value = finishHooks(Component, props, value, context);
|
||
reconcileChildren(null, workInProgress, value, renderExpirationTime);
|
||
{
|
||
validateFunctionComponentInDev(workInProgress, Component);
|
||
}
|
||
return workInProgress.child;
|
||
}
|
||
}
|
||
|
||
function validateFunctionComponentInDev(workInProgress, Component) {
|
||
if (Component) {
|
||
!!Component.childContextTypes ? warningWithoutStack$1(false, '%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component') : void 0;
|
||
}
|
||
if (workInProgress.ref !== null) {
|
||
var info = '';
|
||
var ownerName = getCurrentFiberOwnerNameInDevOrNull();
|
||
if (ownerName) {
|
||
info += '\n\nCheck the render method of `' + ownerName + '`.';
|
||
}
|
||
|
||
var warningKey = ownerName || workInProgress._debugID || '';
|
||
var debugSource = workInProgress._debugSource;
|
||
if (debugSource) {
|
||
warningKey = debugSource.fileName + ':' + debugSource.lineNumber;
|
||
}
|
||
if (!didWarnAboutFunctionRefs[warningKey]) {
|
||
didWarnAboutFunctionRefs[warningKey] = true;
|
||
warning$1(false, 'Function components cannot be given refs. ' + 'Attempts to access this ref will fail.%s', info);
|
||
}
|
||
}
|
||
|
||
if (typeof Component.getDerivedStateFromProps === 'function') {
|
||
var componentName = getComponentName(Component) || 'Unknown';
|
||
|
||
if (!didWarnAboutGetDerivedStateOnFunctionComponent[componentName]) {
|
||
warningWithoutStack$1(false, '%s: Function components do not support getDerivedStateFromProps.', componentName);
|
||
didWarnAboutGetDerivedStateOnFunctionComponent[componentName] = true;
|
||
}
|
||
}
|
||
|
||
if (typeof Component.contextType === 'object' && Component.contextType !== null) {
|
||
var _componentName = getComponentName(Component) || 'Unknown';
|
||
|
||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName]) {
|
||
warningWithoutStack$1(false, '%s: Function components do not support contextType.', _componentName);
|
||
didWarnAboutContextTypeOnFunctionComponent[_componentName] = true;
|
||
}
|
||
}
|
||
}
|
||
|
||
function updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime) {
|
||
var mode = workInProgress.mode;
|
||
var nextProps = workInProgress.pendingProps;
|
||
|
||
// We should attempt to render the primary children unless this boundary
|
||
// already suspended during this render (`alreadyCaptured` is true).
|
||
var nextState = workInProgress.memoizedState;
|
||
|
||
var nextDidTimeout = void 0;
|
||
if ((workInProgress.effectTag & DidCapture) === NoEffect) {
|
||
// This is the first attempt.
|
||
nextState = null;
|
||
nextDidTimeout = false;
|
||
} else {
|
||
// Something in this boundary's subtree already suspended. Switch to
|
||
// rendering the fallback children.
|
||
nextState = {
|
||
timedOutAt: nextState !== null ? nextState.timedOutAt : NoWork
|
||
};
|
||
nextDidTimeout = true;
|
||
workInProgress.effectTag &= ~DidCapture;
|
||
}
|
||
|
||
// This next part is a bit confusing. If the children timeout, we switch to
|
||
// showing the fallback children in place of the "primary" children.
|
||
// However, we don't want to delete the primary children because then their
|
||
// state will be lost (both the React state and the host state, e.g.
|
||
// uncontrolled form inputs). Instead we keep them mounted and hide them.
|
||
// Both the fallback children AND the primary children are rendered at the
|
||
// same time. Once the primary children are un-suspended, we can delete
|
||
// the fallback children — don't need to preserve their state.
|
||
//
|
||
// The two sets of children are siblings in the host environment, but
|
||
// semantically, for purposes of reconciliation, they are two separate sets.
|
||
// So we store them using two fragment fibers.
|
||
//
|
||
// However, we want to avoid allocating extra fibers for every placeholder.
|
||
// They're only necessary when the children time out, because that's the
|
||
// only time when both sets are mounted.
|
||
//
|
||
// So, the extra fragment fibers are only used if the children time out.
|
||
// Otherwise, we render the primary children directly. This requires some
|
||
// custom reconciliation logic to preserve the state of the primary
|
||
// children. It's essentially a very basic form of re-parenting.
|
||
|
||
// `child` points to the child fiber. In the normal case, this is the first
|
||
// fiber of the primary children set. In the timed-out case, it's a
|
||
// a fragment fiber containing the primary children.
|
||
var child = void 0;
|
||
// `next` points to the next fiber React should render. In the normal case,
|
||
// it's the same as `child`: the first fiber of the primary children set.
|
||
// In the timed-out case, it's a fragment fiber containing the *fallback*
|
||
// children -- we skip over the primary children entirely.
|
||
var next = void 0;
|
||
if (current$$1 === null) {
|
||
// This is the initial mount. This branch is pretty simple because there's
|
||
// no previous state that needs to be preserved.
|
||
if (nextDidTimeout) {
|
||
// Mount separate fragments for primary and fallback children.
|
||
var nextFallbackChildren = nextProps.fallback;
|
||
var primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null);
|
||
|
||
if ((workInProgress.mode & ConcurrentMode) === NoContext) {
|
||
// Outside of concurrent mode, we commit the effects from the
|
||
var progressedState = workInProgress.memoizedState;
|
||
var progressedPrimaryChild = progressedState !== null ? workInProgress.child.child : workInProgress.child;
|
||
primaryChildFragment.child = progressedPrimaryChild;
|
||
}
|
||
|
||
var fallbackChildFragment = createFiberFromFragment(nextFallbackChildren, mode, renderExpirationTime, null);
|
||
primaryChildFragment.sibling = fallbackChildFragment;
|
||
child = primaryChildFragment;
|
||
// Skip the primary children, and continue working on the
|
||
// fallback children.
|
||
next = fallbackChildFragment;
|
||
child.return = next.return = workInProgress;
|
||
} else {
|
||
// Mount the primary children without an intermediate fragment fiber.
|
||
var nextPrimaryChildren = nextProps.children;
|
||
child = next = mountChildFibers(workInProgress, null, nextPrimaryChildren, renderExpirationTime);
|
||
}
|
||
} else {
|
||
// This is an update. This branch is more complicated because we need to
|
||
// ensure the state of the primary children is preserved.
|
||
var prevState = current$$1.memoizedState;
|
||
var prevDidTimeout = prevState !== null;
|
||
if (prevDidTimeout) {
|
||
// The current tree already timed out. That means each child set is
|
||
var currentPrimaryChildFragment = current$$1.child;
|
||
var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
|
||
if (nextDidTimeout) {
|
||
// Still timed out. Reuse the current primary children by cloning
|
||
// its fragment. We're going to skip over these entirely.
|
||
var _nextFallbackChildren = nextProps.fallback;
|
||
var _primaryChildFragment = createWorkInProgress(currentPrimaryChildFragment, currentPrimaryChildFragment.pendingProps, NoWork);
|
||
|
||
if ((workInProgress.mode & ConcurrentMode) === NoContext) {
|
||
// Outside of concurrent mode, we commit the effects from the
|
||
var _progressedState = workInProgress.memoizedState;
|
||
var _progressedPrimaryChild = _progressedState !== null ? workInProgress.child.child : workInProgress.child;
|
||
if (_progressedPrimaryChild !== currentPrimaryChildFragment.child) {
|
||
_primaryChildFragment.child = _progressedPrimaryChild;
|
||
}
|
||
}
|
||
|
||
// Because primaryChildFragment is a new fiber that we're inserting as the
|
||
// parent of a new tree, we need to set its treeBaseDuration.
|
||
if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
|
||
// treeBaseDuration is the sum of all the child tree base durations.
|
||
var treeBaseDuration = 0;
|
||
var hiddenChild = _primaryChildFragment.child;
|
||
while (hiddenChild !== null) {
|
||
treeBaseDuration += hiddenChild.treeBaseDuration;
|
||
hiddenChild = hiddenChild.sibling;
|
||
}
|
||
_primaryChildFragment.treeBaseDuration = treeBaseDuration;
|
||
}
|
||
|
||
// Clone the fallback child fragment, too. These we'll continue
|
||
// working on.
|
||
var _fallbackChildFragment = _primaryChildFragment.sibling = createWorkInProgress(currentFallbackChildFragment, _nextFallbackChildren, currentFallbackChildFragment.expirationTime);
|
||
child = _primaryChildFragment;
|
||
_primaryChildFragment.childExpirationTime = NoWork;
|
||
// Skip the primary children, and continue working on the
|
||
// fallback children.
|
||
next = _fallbackChildFragment;
|
||
child.return = next.return = workInProgress;
|
||
} else {
|
||
// No longer suspended. Switch back to showing the primary children,
|
||
// and remove the intermediate fragment fiber.
|
||
var _nextPrimaryChildren = nextProps.children;
|
||
var currentPrimaryChild = currentPrimaryChildFragment.child;
|
||
var primaryChild = reconcileChildFibers(workInProgress, currentPrimaryChild, _nextPrimaryChildren, renderExpirationTime);
|
||
|
||
// If this render doesn't suspend, we need to delete the fallback
|
||
// children. Wait until the complete phase, after we've confirmed the
|
||
// fallback is no longer needed.
|
||
// TODO: Would it be better to store the fallback fragment on
|
||
// the stateNode?
|
||
|
||
// Continue rendering the children, like we normally do.
|
||
child = next = primaryChild;
|
||
}
|
||
} else {
|
||
// The current tree has not already timed out. That means the primary
|
||
// children are not wrapped in a fragment fiber.
|
||
var _currentPrimaryChild = current$$1.child;
|
||
if (nextDidTimeout) {
|
||
// Timed out. Wrap the children in a fragment fiber to keep them
|
||
// separate from the fallback children.
|
||
var _nextFallbackChildren2 = nextProps.fallback;
|
||
var _primaryChildFragment2 = createFiberFromFragment(
|
||
// It shouldn't matter what the pending props are because we aren't
|
||
// going to render this fragment.
|
||
null, mode, NoWork, null);
|
||
_primaryChildFragment2.child = _currentPrimaryChild;
|
||
|
||
// Even though we're creating a new fiber, there are no new children,
|
||
// because we're reusing an already mounted tree. So we don't need to
|
||
// schedule a placement.
|
||
// primaryChildFragment.effectTag |= Placement;
|
||
|
||
if ((workInProgress.mode & ConcurrentMode) === NoContext) {
|
||
// Outside of concurrent mode, we commit the effects from the
|
||
var _progressedState2 = workInProgress.memoizedState;
|
||
var _progressedPrimaryChild2 = _progressedState2 !== null ? workInProgress.child.child : workInProgress.child;
|
||
_primaryChildFragment2.child = _progressedPrimaryChild2;
|
||
}
|
||
|
||
// Because primaryChildFragment is a new fiber that we're inserting as the
|
||
// parent of a new tree, we need to set its treeBaseDuration.
|
||
if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
|
||
// treeBaseDuration is the sum of all the child tree base durations.
|
||
var _treeBaseDuration = 0;
|
||
var _hiddenChild = _primaryChildFragment2.child;
|
||
while (_hiddenChild !== null) {
|
||
_treeBaseDuration += _hiddenChild.treeBaseDuration;
|
||
_hiddenChild = _hiddenChild.sibling;
|
||
}
|
||
_primaryChildFragment2.treeBaseDuration = _treeBaseDuration;
|
||
}
|
||
|
||
// Create a fragment from the fallback children, too.
|
||
var _fallbackChildFragment2 = _primaryChildFragment2.sibling = createFiberFromFragment(_nextFallbackChildren2, mode, renderExpirationTime, null);
|
||
_fallbackChildFragment2.effectTag |= Placement;
|
||
child = _primaryChildFragment2;
|
||
_primaryChildFragment2.childExpirationTime = NoWork;
|
||
// Skip the primary children, and continue working on the
|
||
// fallback children.
|
||
next = _fallbackChildFragment2;
|
||
child.return = next.return = workInProgress;
|
||
} else {
|
||
// Still haven't timed out. Continue rendering the children, like we
|
||
// normally do.
|
||
var _nextPrimaryChildren2 = nextProps.children;
|
||
next = child = reconcileChildFibers(workInProgress, _currentPrimaryChild, _nextPrimaryChildren2, renderExpirationTime);
|
||
}
|
||
}
|
||
workInProgress.stateNode = current$$1.stateNode;
|
||
}
|
||
|
||
workInProgress.memoizedState = nextState;
|
||
workInProgress.child = child;
|
||
return next;
|
||
}
|
||
|
||
function updatePortalComponent(current$$1, workInProgress, renderExpirationTime) {
|
||
pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
|
||
var nextChildren = workInProgress.pendingProps;
|
||
if (current$$1 === null) {
|
||
// Portals are special because we don't append the children during mount
|
||
// but at commit. Therefore we need to track insertions which the normal
|
||
// flow doesn't do during mount. This doesn't happen at the root because
|
||
// the root always starts with a "current" with a null child.
|
||
// TODO: Consider unifying this with how the root works.
|
||
workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
|
||
} else {
|
||
reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
|
||
}
|
||
return workInProgress.child;
|
||
}
|
||
|
||
function updateContextProvider(current$$1, workInProgress, renderExpirationTime) {
|
||
var providerType = workInProgress.type;
|
||
var context = providerType._context;
|
||
|
||
var newProps = workInProgress.pendingProps;
|
||
var oldProps = workInProgress.memoizedProps;
|
||
|
||
var newValue = newProps.value;
|
||
|
||
{
|
||
var providerPropTypes = workInProgress.type.propTypes;
|
||
|
||
if (providerPropTypes) {
|
||
checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider', getCurrentFiberStackInDev);
|
||
}
|
||
}
|
||
|
||
pushProvider(workInProgress, newValue);
|
||
|
||
if (oldProps !== null) {
|
||
var oldValue = oldProps.value;
|
||
var changedBits = calculateChangedBits(context, newValue, oldValue);
|
||
if (changedBits === 0) {
|
||
// No change. Bailout early if children are the same.
|
||
if (oldProps.children === newProps.children && !hasContextChanged()) {
|
||
return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
|
||
}
|
||
} else {
|
||
// The context value changed. Search for matching consumers and schedule
|
||
// them to update.
|
||
propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
|
||
}
|
||
}
|
||
|
||
var newChildren = newProps.children;
|
||
reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);
|
||
return workInProgress.child;
|
||
}
|
||
|
||
var hasWarnedAboutUsingContextAsConsumer = false;
|
||
|
||
function updateContextConsumer(current$$1, workInProgress, renderExpirationTime) {
|
||
var context = workInProgress.type;
|
||
// The logic below for Context differs depending on PROD or DEV mode. In
|
||
// DEV mode, we create a separate object for Context.Consumer that acts
|
||
// like a proxy to Context. This proxy object adds unnecessary code in PROD
|
||
// so we use the old behaviour (Context.Consumer references Context) to
|
||
// reduce size and overhead. The separate object references context via
|
||
// a property called "_context", which also gives us the ability to check
|
||
// in DEV mode if this property exists or not and warn if it does not.
|
||
{
|
||
if (context._context === undefined) {
|
||
// This may be because it's a Context (rather than a Consumer).
|
||
// Or it may be because it's older React where they're the same thing.
|
||
// We only want to warn if we're sure it's a new React.
|
||
if (context !== context.Consumer) {
|
||
if (!hasWarnedAboutUsingContextAsConsumer) {
|
||
hasWarnedAboutUsingContextAsConsumer = true;
|
||
warning$1(false, 'Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
|
||
}
|
||
}
|
||
} else {
|
||
context = context._context;
|
||
}
|
||
}
|
||
var newProps = workInProgress.pendingProps;
|
||
var render = newProps.children;
|
||
|
||
{
|
||
!(typeof render === 'function') ? warningWithoutStack$1(false, 'A context consumer was rendered with multiple children, or a child ' + "that isn't a function. A context consumer expects a single child " + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.') : void 0;
|
||
}
|
||
|
||
prepareToReadContext(workInProgress, renderExpirationTime);
|
||
var newValue = readContext(context, newProps.unstable_observedBits);
|
||
var newChildren = void 0;
|
||
{
|
||
ReactCurrentOwner$3.current = workInProgress;
|
||
setCurrentPhase('render');
|
||
newChildren = render(newValue);
|
||
setCurrentPhase(null);
|
||
}
|
||
|
||
// React DevTools reads this flag.
|
||
workInProgress.effectTag |= PerformedWork;
|
||
reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);
|
||
return workInProgress.child;
|
||
}
|
||
|
||
function bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime) {
|
||
cancelWorkTimer(workInProgress);
|
||
|
||
if (current$$1 !== null) {
|
||
// Reuse previous context list
|
||
workInProgress.firstContextDependency = current$$1.firstContextDependency;
|
||
}
|
||
|
||
if (enableProfilerTimer) {
|
||
// Don't update "base" render times for bailouts.
|
||
stopProfilerTimerIfRunning(workInProgress);
|
||
}
|
||
|
||
// Check if the children have any pending work.
|
||
var childExpirationTime = workInProgress.childExpirationTime;
|
||
if (childExpirationTime < renderExpirationTime) {
|
||
// The children don't have any work either. We can skip them.
|
||
// TODO: Once we add back resuming, we should check if the children are
|
||
// a work-in-progress set. If so, we need to transfer their effects.
|
||
return null;
|
||
} else {
|
||
// This fiber doesn't have work, but its subtree does. Clone the child
|
||
// fibers and continue.
|
||
cloneChildFibers(current$$1, workInProgress);
|
||
return workInProgress.child;
|
||
}
|
||
}
|
||
|
||
function beginWork(current$$1, workInProgress, renderExpirationTime) {
|
||
var updateExpirationTime = workInProgress.expirationTime;
|
||
|
||
if (current$$1 !== null) {
|
||
var oldProps = current$$1.memoizedProps;
|
||
var newProps = workInProgress.pendingProps;
|
||
if (oldProps === newProps && !hasContextChanged() && updateExpirationTime < renderExpirationTime) {
|
||
// This fiber does not have any pending work. Bailout without entering
|
||
// the begin phase. There's still some bookkeeping we that needs to be done
|
||
// in this optimized path, mostly pushing stuff onto the stack.
|
||
switch (workInProgress.tag) {
|
||
case HostRoot:
|
||
pushHostRootContext(workInProgress);
|
||
resetHydrationState();
|
||
break;
|
||
case HostComponent:
|
||
pushHostContext(workInProgress);
|
||
break;
|
||
case ClassComponent:
|
||
{
|
||
var Component = workInProgress.type;
|
||
if (isContextProvider(Component)) {
|
||
pushContextProvider(workInProgress);
|
||
}
|
||
break;
|
||
}
|
||
case HostPortal:
|
||
pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
|
||
break;
|
||
case ContextProvider:
|
||
{
|
||
var newValue = workInProgress.memoizedProps.value;
|
||
pushProvider(workInProgress, newValue);
|
||
break;
|
||
}
|
||
case Profiler:
|
||
if (enableProfilerTimer) {
|
||
workInProgress.effectTag |= Update;
|
||
}
|
||
break;
|
||
case SuspenseComponent:
|
||
{
|
||
var state = workInProgress.memoizedState;
|
||
var didTimeout = state !== null;
|
||
if (didTimeout) {
|
||
// If this boundary is currently timed out, we need to decide
|
||
// whether to retry the primary children, or to skip over it and
|
||
// go straight to the fallback. Check the priority of the primary
|
||
var primaryChildFragment = workInProgress.child;
|
||
var primaryChildExpirationTime = primaryChildFragment.childExpirationTime;
|
||
if (primaryChildExpirationTime !== NoWork && primaryChildExpirationTime >= renderExpirationTime) {
|
||
// The primary children have pending work. Use the normal path
|
||
// to attempt to render the primary children again.
|
||
return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime);
|
||
} else {
|
||
// The primary children do not have pending work with sufficient
|
||
// priority. Bailout.
|
||
var child = bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
|
||
if (child !== null) {
|
||
// The fallback children have pending work. Skip over the
|
||
// primary children and work on the fallback.
|
||
return child.sibling;
|
||
} else {
|
||
return null;
|
||
}
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
|
||
}
|
||
}
|
||
|
||
// Before entering the begin phase, clear the expiration time.
|
||
workInProgress.expirationTime = NoWork;
|
||
|
||
switch (workInProgress.tag) {
|
||
case IndeterminateComponent:
|
||
{
|
||
var elementType = workInProgress.elementType;
|
||
return mountIndeterminateComponent(current$$1, workInProgress, elementType, renderExpirationTime);
|
||
}
|
||
case LazyComponent:
|
||
{
|
||
var _elementType = workInProgress.elementType;
|
||
return mountLazyComponent(current$$1, workInProgress, _elementType, updateExpirationTime, renderExpirationTime);
|
||
}
|
||
case FunctionComponent:
|
||
{
|
||
var _Component = workInProgress.type;
|
||
var unresolvedProps = workInProgress.pendingProps;
|
||
var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);
|
||
return updateFunctionComponent(current$$1, workInProgress, _Component, resolvedProps, renderExpirationTime);
|
||
}
|
||
case ClassComponent:
|
||
{
|
||
var _Component2 = workInProgress.type;
|
||
var _unresolvedProps = workInProgress.pendingProps;
|
||
var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);
|
||
return updateClassComponent(current$$1, workInProgress, _Component2, _resolvedProps, renderExpirationTime);
|
||
}
|
||
case HostRoot:
|
||
return updateHostRoot(current$$1, workInProgress, renderExpirationTime);
|
||
case HostComponent:
|
||
return updateHostComponent(current$$1, workInProgress, renderExpirationTime);
|
||
case HostText:
|
||
return updateHostText(current$$1, workInProgress);
|
||
case SuspenseComponent:
|
||
return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime);
|
||
case HostPortal:
|
||
return updatePortalComponent(current$$1, workInProgress, renderExpirationTime);
|
||
case ForwardRef:
|
||
{
|
||
var type = workInProgress.type;
|
||
var _unresolvedProps2 = workInProgress.pendingProps;
|
||
var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
|
||
return updateForwardRef(current$$1, workInProgress, type, _resolvedProps2, renderExpirationTime);
|
||
}
|
||
case Fragment:
|
||
return updateFragment(current$$1, workInProgress, renderExpirationTime);
|
||
case Mode:
|
||
return updateMode(current$$1, workInProgress, renderExpirationTime);
|
||
case Profiler:
|
||
return updateProfiler(current$$1, workInProgress, renderExpirationTime);
|
||
case ContextProvider:
|
||
return updateContextProvider(current$$1, workInProgress, renderExpirationTime);
|
||
case ContextConsumer:
|
||
return updateContextConsumer(current$$1, workInProgress, renderExpirationTime);
|
||
case MemoComponent:
|
||
{
|
||
var _type2 = workInProgress.type;
|
||
var _unresolvedProps3 = workInProgress.pendingProps;
|
||
// Resolve outer props first, then resolve inner props.
|
||
var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);
|
||
{
|
||
if (workInProgress.type !== workInProgress.elementType) {
|
||
var outerPropTypes = _type2.propTypes;
|
||
if (outerPropTypes) {
|
||
checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only
|
||
'prop', getComponentName(_type2), getCurrentFiberStackInDev);
|
||
}
|
||
}
|
||
}
|
||
_resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
|
||
return updateMemoComponent(current$$1, workInProgress, _type2, _resolvedProps3, updateExpirationTime, renderExpirationTime);
|
||
}
|
||
case SimpleMemoComponent:
|
||
{
|
||
return updateSimpleMemoComponent(current$$1, workInProgress, workInProgress.type, workInProgress.pendingProps, updateExpirationTime, renderExpirationTime);
|
||
}
|
||
case IncompleteClassComponent:
|
||
{
|
||
var _Component3 = workInProgress.type;
|
||
var _unresolvedProps4 = workInProgress.pendingProps;
|
||
var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);
|
||
return mountIncompleteClassComponent(current$$1, workInProgress, _Component3, _resolvedProps4, renderExpirationTime);
|
||
}
|
||
default:
|
||
invariant(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');
|
||
}
|
||
}
|
||
|
||
function markUpdate(workInProgress) {
|
||
// Tag the fiber with an update effect. This turns a Placement into
|
||
// a PlacementAndUpdate.
|
||
workInProgress.effectTag |= Update;
|
||
}
|
||
|
||
function markRef$1(workInProgress) {
|
||
workInProgress.effectTag |= Ref;
|
||
}
|
||
|
||
var appendAllChildren = void 0;
|
||
var updateHostContainer = void 0;
|
||
var updateHostComponent$1 = void 0;
|
||
var updateHostText$1 = void 0;
|
||
if (supportsMutation) {
|
||
// Mutation mode
|
||
|
||
appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {
|
||
// We only have the top Fiber that was created but we need recurse down its
|
||
// children to find all the terminal nodes.
|
||
var node = workInProgress.child;
|
||
while (node !== null) {
|
||
if (node.tag === HostComponent || node.tag === HostText) {
|
||
appendInitialChild(parent, node.stateNode);
|
||
} else if (node.tag === HostPortal) {
|
||
// If we have a portal child, then we don't want to traverse
|
||
// down its children. Instead, we'll get insertions from each child in
|
||
// the portal directly.
|
||
} else if (node.child !== null) {
|
||
node.child.return = node;
|
||
node = node.child;
|
||
continue;
|
||
}
|
||
if (node === workInProgress) {
|
||
return;
|
||
}
|
||
while (node.sibling === null) {
|
||
if (node.return === null || node.return === workInProgress) {
|
||
return;
|
||
}
|
||
node = node.return;
|
||
}
|
||
node.sibling.return = node.return;
|
||
node = node.sibling;
|
||
}
|
||
};
|
||
|
||
updateHostContainer = function (workInProgress) {
|
||
// Noop
|
||
};
|
||
updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
|
||
// If we have an alternate, that means this is an update and we need to
|
||
// schedule a side-effect to do the updates.
|
||
var oldProps = current.memoizedProps;
|
||
if (oldProps === newProps) {
|
||
// In mutation mode, this is sufficient for a bailout because
|
||
// we won't touch this node even if children changed.
|
||
return;
|
||
}
|
||
|
||
// If we get updated because one of our children updated, we don't
|
||
// have newProps so we'll have to reuse them.
|
||
// TODO: Split the update API as separate for the props vs. children.
|
||
// Even better would be if children weren't special cased at all tho.
|
||
var instance = workInProgress.stateNode;
|
||
var currentHostContext = getHostContext();
|
||
// TODO: Experiencing an error where oldProps is null. Suggests a host
|
||
// component is hitting the resume path. Figure out why. Possibly
|
||
// related to `hidden`.
|
||
var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext);
|
||
// TODO: Type this specific to this type of component.
|
||
workInProgress.updateQueue = updatePayload;
|
||
// If the update payload indicates that there is a change or if there
|
||
// is a new ref we mark this as an update. All the work is done in commitWork.
|
||
if (updatePayload) {
|
||
markUpdate(workInProgress);
|
||
}
|
||
};
|
||
updateHostText$1 = function (current, workInProgress, oldText, newText) {
|
||
// If the text differs, mark it as an update. All the work in done in commitWork.
|
||
if (oldText !== newText) {
|
||
markUpdate(workInProgress);
|
||
}
|
||
};
|
||
} else if (supportsPersistence) {
|
||
// Persistent host tree mode
|
||
|
||
appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {
|
||
// We only have the top Fiber that was created but we need recurse down its
|
||
// children to find all the terminal nodes.
|
||
var node = workInProgress.child;
|
||
while (node !== null) {
|
||
// eslint-disable-next-line no-labels
|
||
branches: if (node.tag === HostComponent) {
|
||
var instance = node.stateNode;
|
||
if (needsVisibilityToggle) {
|
||
var props = node.memoizedProps;
|
||
var type = node.type;
|
||
if (isHidden) {
|
||
// This child is inside a timed out tree. Hide it.
|
||
instance = cloneHiddenInstance(instance, type, props, node);
|
||
} else {
|
||
// This child was previously inside a timed out tree. If it was not
|
||
// updated during this render, it may need to be unhidden. Clone
|
||
// again to be sure.
|
||
instance = cloneUnhiddenInstance(instance, type, props, node);
|
||
}
|
||
node.stateNode = instance;
|
||
}
|
||
appendInitialChild(parent, instance);
|
||
} else if (node.tag === HostText) {
|
||
var _instance = node.stateNode;
|
||
if (needsVisibilityToggle) {
|
||
var text = node.memoizedProps;
|
||
var rootContainerInstance = getRootHostContainer();
|
||
var currentHostContext = getHostContext();
|
||
if (isHidden) {
|
||
_instance = createHiddenTextInstance(text, rootContainerInstance, currentHostContext, workInProgress);
|
||
} else {
|
||
_instance = createTextInstance(text, rootContainerInstance, currentHostContext, workInProgress);
|
||
}
|
||
node.stateNode = _instance;
|
||
}
|
||
appendInitialChild(parent, _instance);
|
||
} else if (node.tag === HostPortal) {
|
||
// If we have a portal child, then we don't want to traverse
|
||
// down its children. Instead, we'll get insertions from each child in
|
||
// the portal directly.
|
||
} else if (node.tag === SuspenseComponent) {
|
||
var current = node.alternate;
|
||
if (current !== null) {
|
||
var oldState = current.memoizedState;
|
||
var newState = node.memoizedState;
|
||
var oldIsHidden = oldState !== null;
|
||
var newIsHidden = newState !== null;
|
||
if (oldIsHidden !== newIsHidden) {
|
||
// The placeholder either just timed out or switched back to the normal
|
||
// children after having previously timed out. Toggle the visibility of
|
||
// the direct host children.
|
||
var primaryChildParent = newIsHidden ? node.child : node;
|
||
if (primaryChildParent !== null) {
|
||
appendAllChildren(parent, primaryChildParent, true, newIsHidden);
|
||
}
|
||
// eslint-disable-next-line no-labels
|
||
break branches;
|
||
}
|
||
}
|
||
if (node.child !== null) {
|
||
// Continue traversing like normal
|
||
node.child.return = node;
|
||
node = node.child;
|
||
continue;
|
||
}
|
||
} else if (node.child !== null) {
|
||
node.child.return = node;
|
||
node = node.child;
|
||
continue;
|
||
}
|
||
// $FlowFixMe This is correct but Flow is confused by the labeled break.
|
||
node = node;
|
||
if (node === workInProgress) {
|
||
return;
|
||
}
|
||
while (node.sibling === null) {
|
||
if (node.return === null || node.return === workInProgress) {
|
||
return;
|
||
}
|
||
node = node.return;
|
||
}
|
||
node.sibling.return = node.return;
|
||
node = node.sibling;
|
||
}
|
||
};
|
||
|
||
// An unfortunate fork of appendAllChildren because we have two different parent types.
|
||
var appendAllChildrenToContainer = function (containerChildSet, workInProgress, needsVisibilityToggle, isHidden) {
|
||
// We only have the top Fiber that was created but we need recurse down its
|
||
// children to find all the terminal nodes.
|
||
var node = workInProgress.child;
|
||
while (node !== null) {
|
||
// eslint-disable-next-line no-labels
|
||
branches: if (node.tag === HostComponent) {
|
||
var instance = node.stateNode;
|
||
if (needsVisibilityToggle) {
|
||
var props = node.memoizedProps;
|
||
var type = node.type;
|
||
if (isHidden) {
|
||
// This child is inside a timed out tree. Hide it.
|
||
instance = cloneHiddenInstance(instance, type, props, node);
|
||
} else {
|
||
// This child was previously inside a timed out tree. If it was not
|
||
// updated during this render, it may need to be unhidden. Clone
|
||
// again to be sure.
|
||
instance = cloneUnhiddenInstance(instance, type, props, node);
|
||
}
|
||
node.stateNode = instance;
|
||
}
|
||
appendChildToContainerChildSet(containerChildSet, instance);
|
||
} else if (node.tag === HostText) {
|
||
var _instance2 = node.stateNode;
|
||
if (needsVisibilityToggle) {
|
||
var text = node.memoizedProps;
|
||
var rootContainerInstance = getRootHostContainer();
|
||
var currentHostContext = getHostContext();
|
||
if (isHidden) {
|
||
_instance2 = createHiddenTextInstance(text, rootContainerInstance, currentHostContext, workInProgress);
|
||
} else {
|
||
_instance2 = createTextInstance(text, rootContainerInstance, currentHostContext, workInProgress);
|
||
}
|
||
node.stateNode = _instance2;
|
||
}
|
||
appendChildToContainerChildSet(containerChildSet, _instance2);
|
||
} else if (node.tag === HostPortal) {
|
||
// If we have a portal child, then we don't want to traverse
|
||
// down its children. Instead, we'll get insertions from each child in
|
||
// the portal directly.
|
||
} else if (node.tag === SuspenseComponent) {
|
||
var current = node.alternate;
|
||
if (current !== null) {
|
||
var oldState = current.memoizedState;
|
||
var newState = node.memoizedState;
|
||
var oldIsHidden = oldState !== null;
|
||
var newIsHidden = newState !== null;
|
||
if (oldIsHidden !== newIsHidden) {
|
||
// The placeholder either just timed out or switched back to the normal
|
||
// children after having previously timed out. Toggle the visibility of
|
||
// the direct host children.
|
||
var primaryChildParent = newIsHidden ? node.child : node;
|
||
if (primaryChildParent !== null) {
|
||
appendAllChildrenToContainer(containerChildSet, primaryChildParent, true, newIsHidden);
|
||
}
|
||
// eslint-disable-next-line no-labels
|
||
break branches;
|
||
}
|
||
}
|
||
if (node.child !== null) {
|
||
// Continue traversing like normal
|
||
node.child.return = node;
|
||
node = node.child;
|
||
continue;
|
||
}
|
||
} else if (node.child !== null) {
|
||
node.child.return = node;
|
||
node = node.child;
|
||
continue;
|
||
}
|
||
// $FlowFixMe This is correct but Flow is confused by the labeled break.
|
||
node = node;
|
||
if (node === workInProgress) {
|
||
return;
|
||
}
|
||
while (node.sibling === null) {
|
||
if (node.return === null || node.return === workInProgress) {
|
||
return;
|
||
}
|
||
node = node.return;
|
||
}
|
||
node.sibling.return = node.return;
|
||
node = node.sibling;
|
||
}
|
||
};
|
||
updateHostContainer = function (workInProgress) {
|
||
var portalOrRoot = workInProgress.stateNode;
|
||
var childrenUnchanged = workInProgress.firstEffect === null;
|
||
if (childrenUnchanged) {
|
||
// No changes, just reuse the existing instance.
|
||
} else {
|
||
var container = portalOrRoot.containerInfo;
|
||
var newChildSet = createContainerChildSet(container);
|
||
// If children might have changed, we have to add them all to the set.
|
||
appendAllChildrenToContainer(newChildSet, workInProgress, false, false);
|
||
portalOrRoot.pendingChildren = newChildSet;
|
||
// Schedule an update on the container to swap out the container.
|
||
markUpdate(workInProgress);
|
||
finalizeContainerChildren(container, newChildSet);
|
||
}
|
||
};
|
||
updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
|
||
var currentInstance = current.stateNode;
|
||
var oldProps = current.memoizedProps;
|
||
// If there are no effects associated with this node, then none of our children had any updates.
|
||
// This guarantees that we can reuse all of them.
|
||
var childrenUnchanged = workInProgress.firstEffect === null;
|
||
if (childrenUnchanged && oldProps === newProps) {
|
||
// No changes, just reuse the existing instance.
|
||
// Note that this might release a previous clone.
|
||
workInProgress.stateNode = currentInstance;
|
||
return;
|
||
}
|
||
var recyclableInstance = workInProgress.stateNode;
|
||
var currentHostContext = getHostContext();
|
||
var updatePayload = null;
|
||
if (oldProps !== newProps) {
|
||
updatePayload = prepareUpdate(recyclableInstance, type, oldProps, newProps, rootContainerInstance, currentHostContext);
|
||
}
|
||
if (childrenUnchanged && updatePayload === null) {
|
||
// No changes, just reuse the existing instance.
|
||
// Note that this might release a previous clone.
|
||
workInProgress.stateNode = currentInstance;
|
||
return;
|
||
}
|
||
var newInstance = cloneInstance(currentInstance, updatePayload, type, oldProps, newProps, workInProgress, childrenUnchanged, recyclableInstance);
|
||
if (finalizeInitialChildren(newInstance, type, newProps, rootContainerInstance, currentHostContext)) {
|
||
markUpdate(workInProgress);
|
||
}
|
||
workInProgress.stateNode = newInstance;
|
||
if (childrenUnchanged) {
|
||
// If there are no other effects in this tree, we need to flag this node as having one.
|
||
// Even though we're not going to use it for anything.
|
||
// Otherwise parents won't know that there are new children to propagate upwards.
|
||
markUpdate(workInProgress);
|
||
} else {
|
||
// If children might have changed, we have to add them all to the set.
|
||
appendAllChildren(newInstance, workInProgress, false, false);
|
||
}
|
||
};
|
||
updateHostText$1 = function (current, workInProgress, oldText, newText) {
|
||
if (oldText !== newText) {
|
||
// If the text content differs, we'll create a new text instance for it.
|
||
var rootContainerInstance = getRootHostContainer();
|
||
var currentHostContext = getHostContext();
|
||
workInProgress.stateNode = createTextInstance(newText, rootContainerInstance, currentHostContext, workInProgress);
|
||
// We'll have to mark it as having an effect, even though we won't use the effect for anything.
|
||
// This lets the parents know that at least one of their children has changed.
|
||
markUpdate(workInProgress);
|
||
}
|
||
};
|
||
} else {
|
||
// No host operations
|
||
updateHostContainer = function (workInProgress) {
|
||
// Noop
|
||
};
|
||
updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
|
||
// Noop
|
||
};
|
||
updateHostText$1 = function (current, workInProgress, oldText, newText) {
|
||
// Noop
|
||
};
|
||
}
|
||
|
||
function completeWork(current, workInProgress, renderExpirationTime) {
|
||
var newProps = workInProgress.pendingProps;
|
||
|
||
switch (workInProgress.tag) {
|
||
case IndeterminateComponent:
|
||
break;
|
||
case LazyComponent:
|
||
break;
|
||
case SimpleMemoComponent:
|
||
case FunctionComponent:
|
||
break;
|
||
case ClassComponent:
|
||
{
|
||
var Component = workInProgress.type;
|
||
if (isContextProvider(Component)) {
|
||
popContext(workInProgress);
|
||
}
|
||
break;
|
||
}
|
||
case HostRoot:
|
||
{
|
||
popHostContainer(workInProgress);
|
||
popTopLevelContextObject(workInProgress);
|
||
var fiberRoot = workInProgress.stateNode;
|
||
if (fiberRoot.pendingContext) {
|
||
fiberRoot.context = fiberRoot.pendingContext;
|
||
fiberRoot.pendingContext = null;
|
||
}
|
||
if (current === null || current.child === null) {
|
||
// If we hydrated, pop so that we can delete any remaining children
|
||
// that weren't hydrated.
|
||
popHydrationState(workInProgress);
|
||
// This resets the hacky state to fix isMounted before committing.
|
||
// TODO: Delete this when we delete isMounted and findDOMNode.
|
||
workInProgress.effectTag &= ~Placement;
|
||
}
|
||
updateHostContainer(workInProgress);
|
||
break;
|
||
}
|
||
case HostComponent:
|
||
{
|
||
popHostContext(workInProgress);
|
||
var rootContainerInstance = getRootHostContainer();
|
||
var type = workInProgress.type;
|
||
if (current !== null && workInProgress.stateNode != null) {
|
||
updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);
|
||
|
||
if (current.ref !== workInProgress.ref) {
|
||
markRef$1(workInProgress);
|
||
}
|
||
} else {
|
||
if (!newProps) {
|
||
!(workInProgress.stateNode !== null) ? invariant(false, 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
// This can happen when we abort work.
|
||
break;
|
||
}
|
||
|
||
var currentHostContext = getHostContext();
|
||
// TODO: Move createInstance to beginWork and keep it on a context
|
||
// "stack" as the parent. Then append children as we go in beginWork
|
||
// or completeWork depending on we want to add then top->down or
|
||
// bottom->up. Top->down is faster in IE11.
|
||
var wasHydrated = popHydrationState(workInProgress);
|
||
if (wasHydrated) {
|
||
// TODO: Move this and createInstance step into the beginPhase
|
||
// to consolidate.
|
||
if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {
|
||
// If changes to the hydrated node needs to be applied at the
|
||
// commit-phase we mark this as such.
|
||
markUpdate(workInProgress);
|
||
}
|
||
} else {
|
||
var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);
|
||
|
||
appendAllChildren(instance, workInProgress, false, false);
|
||
|
||
// Certain renderers require commit-time effects for initial mount.
|
||
// (eg DOM renderer supports auto-focus for certain elements).
|
||
// Make sure such renderers get scheduled for later work.
|
||
if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance, currentHostContext)) {
|
||
markUpdate(workInProgress);
|
||
}
|
||
workInProgress.stateNode = instance;
|
||
}
|
||
|
||
if (workInProgress.ref !== null) {
|
||
// If there is a ref on a host node we need to schedule a callback
|
||
markRef$1(workInProgress);
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
case HostText:
|
||
{
|
||
var newText = newProps;
|
||
if (current && workInProgress.stateNode != null) {
|
||
var oldText = current.memoizedProps;
|
||
// If we have an alternate, that means this is an update and we need
|
||
// to schedule a side-effect to do the updates.
|
||
updateHostText$1(current, workInProgress, oldText, newText);
|
||
} else {
|
||
if (typeof newText !== 'string') {
|
||
!(workInProgress.stateNode !== null) ? invariant(false, 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
// This can happen when we abort work.
|
||
}
|
||
var _rootContainerInstance = getRootHostContainer();
|
||
var _currentHostContext = getHostContext();
|
||
var _wasHydrated = popHydrationState(workInProgress);
|
||
if (_wasHydrated) {
|
||
if (prepareToHydrateHostTextInstance(workInProgress)) {
|
||
markUpdate(workInProgress);
|
||
}
|
||
} else {
|
||
workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
case ForwardRef:
|
||
break;
|
||
case SuspenseComponent:
|
||
{
|
||
var nextState = workInProgress.memoizedState;
|
||
if ((workInProgress.effectTag & DidCapture) !== NoEffect) {
|
||
// Something suspended. Re-render with the fallback children.
|
||
workInProgress.expirationTime = renderExpirationTime;
|
||
// Do not reset the effect list.
|
||
return workInProgress;
|
||
}
|
||
|
||
var nextDidTimeout = nextState !== null;
|
||
var prevDidTimeout = current !== null && current.memoizedState !== null;
|
||
|
||
if (current !== null && !nextDidTimeout && prevDidTimeout) {
|
||
// We just switched from the fallback to the normal children. Delete
|
||
// the fallback.
|
||
// TODO: Would it be better to store the fallback fragment on
|
||
var currentFallbackChild = current.child.sibling;
|
||
if (currentFallbackChild !== null) {
|
||
// Deletions go at the beginning of the return fiber's effect list
|
||
var first = workInProgress.firstEffect;
|
||
if (first !== null) {
|
||
workInProgress.firstEffect = currentFallbackChild;
|
||
currentFallbackChild.nextEffect = first;
|
||
} else {
|
||
workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChild;
|
||
currentFallbackChild.nextEffect = null;
|
||
}
|
||
currentFallbackChild.effectTag = Deletion;
|
||
}
|
||
}
|
||
|
||
// The children either timed out after previously being visible, or
|
||
// were restored after previously being hidden. Schedule an effect
|
||
// to update their visiblity.
|
||
if (
|
||
//
|
||
nextDidTimeout !== prevDidTimeout ||
|
||
// Outside concurrent mode, the primary children commit in an
|
||
// inconsistent state, even if they are hidden. So if they are hidden,
|
||
// we need to schedule an effect to re-hide them, just in case.
|
||
(workInProgress.effectTag & ConcurrentMode) === NoContext && nextDidTimeout) {
|
||
workInProgress.effectTag |= Update;
|
||
}
|
||
break;
|
||
}
|
||
case Fragment:
|
||
break;
|
||
case Mode:
|
||
break;
|
||
case Profiler:
|
||
break;
|
||
case HostPortal:
|
||
popHostContainer(workInProgress);
|
||
updateHostContainer(workInProgress);
|
||
break;
|
||
case ContextProvider:
|
||
// Pop provider fiber
|
||
popProvider(workInProgress);
|
||
break;
|
||
case ContextConsumer:
|
||
break;
|
||
case MemoComponent:
|
||
break;
|
||
case IncompleteClassComponent:
|
||
{
|
||
// Same as class component case. I put it down here so that the tags are
|
||
// sequential to ensure this switch is compiled to a jump table.
|
||
var _Component = workInProgress.type;
|
||
if (isContextProvider(_Component)) {
|
||
popContext(workInProgress);
|
||
}
|
||
break;
|
||
}
|
||
default:
|
||
invariant(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');
|
||
}
|
||
|
||
return null;
|
||
}
|
||
|
||
function shouldCaptureSuspense(workInProgress) {
|
||
// In order to capture, the Suspense component must have a fallback prop.
|
||
if (workInProgress.memoizedProps.fallback === undefined) {
|
||
return false;
|
||
}
|
||
// If it was the primary children that just suspended, capture and render the
|
||
// fallback. Otherwise, don't capture and bubble to the next boundary.
|
||
var nextState = workInProgress.memoizedState;
|
||
return nextState === null;
|
||
}
|
||
|
||
// This module is forked in different environments.
|
||
// By default, return `true` to log errors to the console.
|
||
// Forks can return `false` if this isn't desirable.
|
||
function showErrorDialog(capturedError) {
|
||
return true;
|
||
}
|
||
|
||
function logCapturedError(capturedError) {
|
||
var logError = showErrorDialog(capturedError);
|
||
|
||
// Allow injected showErrorDialog() to prevent default console.error logging.
|
||
// This enables renderers like ReactNative to better manage redbox behavior.
|
||
if (logError === false) {
|
||
return;
|
||
}
|
||
|
||
var error = capturedError.error;
|
||
{
|
||
var componentName = capturedError.componentName,
|
||
componentStack = capturedError.componentStack,
|
||
errorBoundaryName = capturedError.errorBoundaryName,
|
||
errorBoundaryFound = capturedError.errorBoundaryFound,
|
||
willRetry = capturedError.willRetry;
|
||
|
||
// Browsers support silencing uncaught errors by calling
|
||
// `preventDefault()` in window `error` handler.
|
||
// We record this information as an expando on the error.
|
||
|
||
if (error != null && error._suppressLogging) {
|
||
if (errorBoundaryFound && willRetry) {
|
||
// The error is recoverable and was silenced.
|
||
// Ignore it and don't print the stack addendum.
|
||
// This is handy for testing error boundaries without noise.
|
||
return;
|
||
}
|
||
// The error is fatal. Since the silencing might have
|
||
// been accidental, we'll surface it anyway.
|
||
// However, the browser would have silenced the original error
|
||
// so we'll print it first, and then print the stack addendum.
|
||
console.error(error);
|
||
// For a more detailed description of this block, see:
|
||
// https://github.com/facebook/react/pull/13384
|
||
}
|
||
|
||
var componentNameMessage = componentName ? 'The above error occurred in the <' + componentName + '> component:' : 'The above error occurred in one of your React components:';
|
||
|
||
var errorBoundaryMessage = void 0;
|
||
// errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow.
|
||
if (errorBoundaryFound && errorBoundaryName) {
|
||
if (willRetry) {
|
||
errorBoundaryMessage = 'React will try to recreate this component tree from scratch ' + ('using the error boundary you provided, ' + errorBoundaryName + '.');
|
||
} else {
|
||
errorBoundaryMessage = 'This error was initially handled by the error boundary ' + errorBoundaryName + '.\n' + 'Recreating the tree from scratch failed so React will unmount the tree.';
|
||
}
|
||
} else {
|
||
errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.';
|
||
}
|
||
var combinedMessage = '' + componentNameMessage + componentStack + '\n\n' + ('' + errorBoundaryMessage);
|
||
|
||
// In development, we provide our own message with just the component stack.
|
||
// We don't include the original error message and JS stack because the browser
|
||
// has already printed it. Even if the application swallows the error, it is still
|
||
// displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
|
||
console.error(combinedMessage);
|
||
}
|
||
}
|
||
|
||
var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
|
||
{
|
||
didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
|
||
}
|
||
|
||
var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
|
||
|
||
function logError(boundary, errorInfo) {
|
||
var source = errorInfo.source;
|
||
var stack = errorInfo.stack;
|
||
if (stack === null && source !== null) {
|
||
stack = getStackByFiberInDevAndProd(source);
|
||
}
|
||
|
||
var capturedError = {
|
||
componentName: source !== null ? getComponentName(source.type) : null,
|
||
componentStack: stack !== null ? stack : '',
|
||
error: errorInfo.value,
|
||
errorBoundary: null,
|
||
errorBoundaryName: null,
|
||
errorBoundaryFound: false,
|
||
willRetry: false
|
||
};
|
||
|
||
if (boundary !== null && boundary.tag === ClassComponent) {
|
||
capturedError.errorBoundary = boundary.stateNode;
|
||
capturedError.errorBoundaryName = getComponentName(boundary.type);
|
||
capturedError.errorBoundaryFound = true;
|
||
capturedError.willRetry = true;
|
||
}
|
||
|
||
try {
|
||
logCapturedError(capturedError);
|
||
} catch (e) {
|
||
// This method must not throw, or React internal state will get messed up.
|
||
// If console.error is overridden, or logCapturedError() shows a dialog that throws,
|
||
// we want to report this error outside of the normal stack as a last resort.
|
||
// https://github.com/facebook/react/issues/13188
|
||
setTimeout(function () {
|
||
throw e;
|
||
});
|
||
}
|
||
}
|
||
|
||
var callComponentWillUnmountWithTimer = function (current$$1, instance) {
|
||
startPhaseTimer(current$$1, 'componentWillUnmount');
|
||
instance.props = current$$1.memoizedProps;
|
||
instance.state = current$$1.memoizedState;
|
||
instance.componentWillUnmount();
|
||
stopPhaseTimer();
|
||
};
|
||
|
||
// Capture errors so they don't interrupt unmounting.
|
||
function safelyCallComponentWillUnmount(current$$1, instance) {
|
||
{
|
||
invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance);
|
||
if (hasCaughtError()) {
|
||
var unmountError = clearCaughtError();
|
||
captureCommitPhaseError(current$$1, unmountError);
|
||
}
|
||
}
|
||
}
|
||
|
||
function safelyDetachRef(current$$1) {
|
||
var ref = current$$1.ref;
|
||
if (ref !== null) {
|
||
if (typeof ref === 'function') {
|
||
{
|
||
invokeGuardedCallback(null, ref, null, null);
|
||
if (hasCaughtError()) {
|
||
var refError = clearCaughtError();
|
||
captureCommitPhaseError(current$$1, refError);
|
||
}
|
||
}
|
||
} else {
|
||
ref.current = null;
|
||
}
|
||
}
|
||
}
|
||
|
||
function safelyCallDestroy(current$$1, destroy) {
|
||
{
|
||
invokeGuardedCallback(null, destroy, null);
|
||
if (hasCaughtError()) {
|
||
var error = clearCaughtError();
|
||
captureCommitPhaseError(current$$1, error);
|
||
}
|
||
}
|
||
}
|
||
|
||
function commitBeforeMutationLifeCycles(current$$1, finishedWork) {
|
||
switch (finishedWork.tag) {
|
||
case FunctionComponent:
|
||
case ForwardRef:
|
||
case SimpleMemoComponent:
|
||
{
|
||
commitHookEffectList(UnmountSnapshot, NoEffect$1, finishedWork);
|
||
return;
|
||
}
|
||
case ClassComponent:
|
||
{
|
||
if (finishedWork.effectTag & Snapshot) {
|
||
if (current$$1 !== null) {
|
||
var prevProps = current$$1.memoizedProps;
|
||
var prevState = current$$1.memoizedState;
|
||
startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate');
|
||
var instance = finishedWork.stateNode;
|
||
// We could update instance props and state here,
|
||
// but instead we rely on them being set during last render.
|
||
// TODO: revisit this when we implement resuming.
|
||
{
|
||
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
|
||
!(instance.props === finishedWork.memoizedProps) ? warning$1(false, 'Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
|
||
!(instance.state === finishedWork.memoizedState) ? warning$1(false, 'Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
|
||
}
|
||
}
|
||
var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);
|
||
{
|
||
var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;
|
||
if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {
|
||
didWarnSet.add(finishedWork.type);
|
||
warningWithoutStack$1(false, '%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));
|
||
}
|
||
}
|
||
instance.__reactInternalSnapshotBeforeUpdate = snapshot;
|
||
stopPhaseTimer();
|
||
}
|
||
}
|
||
return;
|
||
}
|
||
case HostRoot:
|
||
case HostComponent:
|
||
case HostText:
|
||
case HostPortal:
|
||
case IncompleteClassComponent:
|
||
// Nothing to do for these component types
|
||
return;
|
||
default:
|
||
{
|
||
invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
|
||
}
|
||
}
|
||
}
|
||
|
||
function commitHookEffectList(unmountTag, mountTag, finishedWork) {
|
||
if (!enableHooks) {
|
||
return;
|
||
}
|
||
var updateQueue = finishedWork.updateQueue;
|
||
var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
|
||
if (lastEffect !== null) {
|
||
var firstEffect = lastEffect.next;
|
||
var effect = firstEffect;
|
||
do {
|
||
if ((effect.tag & unmountTag) !== NoEffect$1) {
|
||
// Unmount
|
||
var destroy = effect.destroy;
|
||
effect.destroy = null;
|
||
if (destroy !== null) {
|
||
destroy();
|
||
}
|
||
}
|
||
if ((effect.tag & mountTag) !== NoEffect$1) {
|
||
// Mount
|
||
var create = effect.create;
|
||
var _destroy = create();
|
||
if (typeof _destroy !== 'function') {
|
||
{
|
||
if (_destroy !== null && _destroy !== undefined) {
|
||
warningWithoutStack$1(false, 'useEffect function must return a cleanup function or ' + 'nothing.%s%s', typeof _destroy.then === 'function' ? '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, you may write an async function separately ' + 'and then call it from inside the effect:\n\n' + 'async function fetchComment(commentId) {\n' + ' // You can await here\n' + '}\n\n' + 'useEffect(() => {\n' + ' fetchComment(commentId);\n' + '}, [commentId]);\n\n' + 'In the future, React will provide a more idiomatic solution for data fetching ' + "that doesn't involve writing effects manually." : '', getStackByFiberInDevAndProd(finishedWork));
|
||
}
|
||
}
|
||
_destroy = null;
|
||
}
|
||
effect.destroy = _destroy;
|
||
}
|
||
effect = effect.next;
|
||
} while (effect !== firstEffect);
|
||
}
|
||
}
|
||
|
||
function commitPassiveHookEffects(finishedWork) {
|
||
commitHookEffectList(UnmountPassive, NoEffect$1, finishedWork);
|
||
commitHookEffectList(NoEffect$1, MountPassive, finishedWork);
|
||
}
|
||
|
||
function commitLifeCycles(finishedRoot, current$$1, finishedWork, committedExpirationTime) {
|
||
switch (finishedWork.tag) {
|
||
case FunctionComponent:
|
||
case ForwardRef:
|
||
case SimpleMemoComponent:
|
||
{
|
||
commitHookEffectList(UnmountLayout, MountLayout, finishedWork);
|
||
break;
|
||
}
|
||
case ClassComponent:
|
||
{
|
||
var instance = finishedWork.stateNode;
|
||
if (finishedWork.effectTag & Update) {
|
||
if (current$$1 === null) {
|
||
startPhaseTimer(finishedWork, 'componentDidMount');
|
||
// We could update instance props and state here,
|
||
// but instead we rely on them being set during last render.
|
||
// TODO: revisit this when we implement resuming.
|
||
{
|
||
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
|
||
!(instance.props === finishedWork.memoizedProps) ? warning$1(false, 'Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
|
||
!(instance.state === finishedWork.memoizedState) ? warning$1(false, 'Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
|
||
}
|
||
}
|
||
instance.componentDidMount();
|
||
stopPhaseTimer();
|
||
} else {
|
||
var prevProps = finishedWork.elementType === finishedWork.type ? current$$1.memoizedProps : resolveDefaultProps(finishedWork.type, current$$1.memoizedProps);
|
||
var prevState = current$$1.memoizedState;
|
||
startPhaseTimer(finishedWork, 'componentDidUpdate');
|
||
// We could update instance props and state here,
|
||
// but instead we rely on them being set during last render.
|
||
// TODO: revisit this when we implement resuming.
|
||
{
|
||
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
|
||
!(instance.props === finishedWork.memoizedProps) ? warning$1(false, 'Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
|
||
!(instance.state === finishedWork.memoizedState) ? warning$1(false, 'Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
|
||
}
|
||
}
|
||
instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
|
||
stopPhaseTimer();
|
||
}
|
||
}
|
||
var updateQueue = finishedWork.updateQueue;
|
||
if (updateQueue !== null) {
|
||
{
|
||
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
|
||
!(instance.props === finishedWork.memoizedProps) ? warning$1(false, 'Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
|
||
!(instance.state === finishedWork.memoizedState) ? warning$1(false, 'Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
|
||
}
|
||
}
|
||
// We could update instance props and state here,
|
||
// but instead we rely on them being set during last render.
|
||
// TODO: revisit this when we implement resuming.
|
||
commitUpdateQueue(finishedWork, updateQueue, instance, committedExpirationTime);
|
||
}
|
||
return;
|
||
}
|
||
case HostRoot:
|
||
{
|
||
var _updateQueue = finishedWork.updateQueue;
|
||
if (_updateQueue !== null) {
|
||
var _instance = null;
|
||
if (finishedWork.child !== null) {
|
||
switch (finishedWork.child.tag) {
|
||
case HostComponent:
|
||
_instance = getPublicInstance(finishedWork.child.stateNode);
|
||
break;
|
||
case ClassComponent:
|
||
_instance = finishedWork.child.stateNode;
|
||
break;
|
||
}
|
||
}
|
||
commitUpdateQueue(finishedWork, _updateQueue, _instance, committedExpirationTime);
|
||
}
|
||
return;
|
||
}
|
||
case HostComponent:
|
||
{
|
||
var _instance2 = finishedWork.stateNode;
|
||
|
||
// Renderers may schedule work to be done after host components are mounted
|
||
// (eg DOM renderer may schedule auto-focus for inputs and form controls).
|
||
// These effects should only be committed when components are first mounted,
|
||
// aka when there is no current/alternate.
|
||
if (current$$1 === null && finishedWork.effectTag & Update) {
|
||
var type = finishedWork.type;
|
||
var props = finishedWork.memoizedProps;
|
||
commitMount(_instance2, type, props, finishedWork);
|
||
}
|
||
|
||
return;
|
||
}
|
||
case HostText:
|
||
{
|
||
// We have no life-cycles associated with text.
|
||
return;
|
||
}
|
||
case HostPortal:
|
||
{
|
||
// We have no life-cycles associated with portals.
|
||
return;
|
||
}
|
||
case Profiler:
|
||
{
|
||
if (enableProfilerTimer) {
|
||
var onRender = finishedWork.memoizedProps.onRender;
|
||
|
||
if (enableSchedulerTracing) {
|
||
onRender(finishedWork.memoizedProps.id, current$$1 === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime(), finishedRoot.memoizedInteractions);
|
||
} else {
|
||
onRender(finishedWork.memoizedProps.id, current$$1 === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime());
|
||
}
|
||
}
|
||
return;
|
||
}
|
||
case SuspenseComponent:
|
||
break;
|
||
case IncompleteClassComponent:
|
||
break;
|
||
default:
|
||
{
|
||
invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
|
||
}
|
||
}
|
||
}
|
||
|
||
function hideOrUnhideAllChildren(finishedWork, isHidden) {
|
||
if (supportsMutation) {
|
||
// We only have the top Fiber that was inserted but we need recurse down its
|
||
var node = finishedWork;
|
||
while (true) {
|
||
if (node.tag === HostComponent) {
|
||
var instance = node.stateNode;
|
||
if (isHidden) {
|
||
hideInstance(instance);
|
||
} else {
|
||
unhideInstance(node.stateNode, node.memoizedProps);
|
||
}
|
||
} else if (node.tag === HostText) {
|
||
var _instance3 = node.stateNode;
|
||
if (isHidden) {
|
||
hideTextInstance(_instance3);
|
||
} else {
|
||
unhideTextInstance(_instance3, node.memoizedProps);
|
||
}
|
||
} else if (node.tag === SuspenseComponent && node.memoizedState !== null) {
|
||
// Found a nested Suspense component that timed out. Skip over the
|
||
var fallbackChildFragment = node.child.sibling;
|
||
fallbackChildFragment.return = node;
|
||
node = fallbackChildFragment;
|
||
continue;
|
||
} else if (node.child !== null) {
|
||
node.child.return = node;
|
||
node = node.child;
|
||
continue;
|
||
}
|
||
if (node === finishedWork) {
|
||
return;
|
||
}
|
||
while (node.sibling === null) {
|
||
if (node.return === null || node.return === finishedWork) {
|
||
return;
|
||
}
|
||
node = node.return;
|
||
}
|
||
node.sibling.return = node.return;
|
||
node = node.sibling;
|
||
}
|
||
}
|
||
}
|
||
|
||
function commitAttachRef(finishedWork) {
|
||
var ref = finishedWork.ref;
|
||
if (ref !== null) {
|
||
var instance = finishedWork.stateNode;
|
||
var instanceToUse = void 0;
|
||
switch (finishedWork.tag) {
|
||
case HostComponent:
|
||
instanceToUse = getPublicInstance(instance);
|
||
break;
|
||
default:
|
||
instanceToUse = instance;
|
||
}
|
||
if (typeof ref === 'function') {
|
||
ref(instanceToUse);
|
||
} else {
|
||
{
|
||
if (!ref.hasOwnProperty('current')) {
|
||
warningWithoutStack$1(false, 'Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork.type), getStackByFiberInDevAndProd(finishedWork));
|
||
}
|
||
}
|
||
|
||
ref.current = instanceToUse;
|
||
}
|
||
}
|
||
}
|
||
|
||
function commitDetachRef(current$$1) {
|
||
var currentRef = current$$1.ref;
|
||
if (currentRef !== null) {
|
||
if (typeof currentRef === 'function') {
|
||
currentRef(null);
|
||
} else {
|
||
currentRef.current = null;
|
||
}
|
||
}
|
||
}
|
||
|
||
// User-originating errors (lifecycles and refs) should not interrupt
|
||
// deletion, so don't let them throw. Host-originating errors should
|
||
// interrupt deletion, so it's okay
|
||
function commitUnmount(current$$1) {
|
||
onCommitUnmount(current$$1);
|
||
|
||
switch (current$$1.tag) {
|
||
case FunctionComponent:
|
||
case ForwardRef:
|
||
case MemoComponent:
|
||
case SimpleMemoComponent:
|
||
{
|
||
var updateQueue = current$$1.updateQueue;
|
||
if (updateQueue !== null) {
|
||
var lastEffect = updateQueue.lastEffect;
|
||
if (lastEffect !== null) {
|
||
var firstEffect = lastEffect.next;
|
||
var effect = firstEffect;
|
||
do {
|
||
var destroy = effect.destroy;
|
||
if (destroy !== null) {
|
||
safelyCallDestroy(current$$1, destroy);
|
||
}
|
||
effect = effect.next;
|
||
} while (effect !== firstEffect);
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
case ClassComponent:
|
||
{
|
||
safelyDetachRef(current$$1);
|
||
var instance = current$$1.stateNode;
|
||
if (typeof instance.componentWillUnmount === 'function') {
|
||
safelyCallComponentWillUnmount(current$$1, instance);
|
||
}
|
||
return;
|
||
}
|
||
case HostComponent:
|
||
{
|
||
safelyDetachRef(current$$1);
|
||
return;
|
||
}
|
||
case HostPortal:
|
||
{
|
||
// TODO: this is recursive.
|
||
// We are also not using this parent because
|
||
// the portal will get pushed immediately.
|
||
if (supportsMutation) {
|
||
unmountHostComponents(current$$1);
|
||
} else if (supportsPersistence) {
|
||
emptyPortalContainer(current$$1);
|
||
}
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
|
||
function commitNestedUnmounts(root) {
|
||
// While we're inside a removed host node we don't want to call
|
||
// removeChild on the inner nodes because they're removed by the top
|
||
// call anyway. We also want to call componentWillUnmount on all
|
||
// composites before this host node is removed from the tree. Therefore
|
||
var node = root;
|
||
while (true) {
|
||
commitUnmount(node);
|
||
// Visit children because they may contain more composite or host nodes.
|
||
// Skip portals because commitUnmount() currently visits them recursively.
|
||
if (node.child !== null && (
|
||
// If we use mutation we drill down into portals using commitUnmount above.
|
||
// If we don't use mutation we drill down into portals here instead.
|
||
!supportsMutation || node.tag !== HostPortal)) {
|
||
node.child.return = node;
|
||
node = node.child;
|
||
continue;
|
||
}
|
||
if (node === root) {
|
||
return;
|
||
}
|
||
while (node.sibling === null) {
|
||
if (node.return === null || node.return === root) {
|
||
return;
|
||
}
|
||
node = node.return;
|
||
}
|
||
node.sibling.return = node.return;
|
||
node = node.sibling;
|
||
}
|
||
}
|
||
|
||
function detachFiber(current$$1) {
|
||
// Cut off the return pointers to disconnect it from the tree. Ideally, we
|
||
// should clear the child pointer of the parent alternate to let this
|
||
// get GC:ed but we don't know which for sure which parent is the current
|
||
// one so we'll settle for GC:ing the subtree of this child. This child
|
||
// itself will be GC:ed when the parent updates the next time.
|
||
current$$1.return = null;
|
||
current$$1.child = null;
|
||
current$$1.memoizedState = null;
|
||
current$$1.updateQueue = null;
|
||
var alternate = current$$1.alternate;
|
||
if (alternate !== null) {
|
||
alternate.return = null;
|
||
alternate.child = null;
|
||
alternate.memoizedState = null;
|
||
alternate.updateQueue = null;
|
||
}
|
||
}
|
||
|
||
function emptyPortalContainer(current$$1) {
|
||
if (!supportsPersistence) {
|
||
return;
|
||
}
|
||
|
||
var portal = current$$1.stateNode;
|
||
var containerInfo = portal.containerInfo;
|
||
|
||
var emptyChildSet = createContainerChildSet(containerInfo);
|
||
replaceContainerChildren(containerInfo, emptyChildSet);
|
||
}
|
||
|
||
function commitContainer(finishedWork) {
|
||
if (!supportsPersistence) {
|
||
return;
|
||
}
|
||
|
||
switch (finishedWork.tag) {
|
||
case ClassComponent:
|
||
{
|
||
return;
|
||
}
|
||
case HostComponent:
|
||
{
|
||
return;
|
||
}
|
||
case HostText:
|
||
{
|
||
return;
|
||
}
|
||
case HostRoot:
|
||
case HostPortal:
|
||
{
|
||
var portalOrRoot = finishedWork.stateNode;
|
||
var containerInfo = portalOrRoot.containerInfo,
|
||
_pendingChildren = portalOrRoot.pendingChildren;
|
||
|
||
replaceContainerChildren(containerInfo, _pendingChildren);
|
||
return;
|
||
}
|
||
default:
|
||
{
|
||
invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
|
||
}
|
||
}
|
||
}
|
||
|
||
function getHostParentFiber(fiber) {
|
||
var parent = fiber.return;
|
||
while (parent !== null) {
|
||
if (isHostParent(parent)) {
|
||
return parent;
|
||
}
|
||
parent = parent.return;
|
||
}
|
||
invariant(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.');
|
||
}
|
||
|
||
function isHostParent(fiber) {
|
||
return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;
|
||
}
|
||
|
||
function getHostSibling(fiber) {
|
||
// We're going to search forward into the tree until we find a sibling host
|
||
// node. Unfortunately, if multiple insertions are done in a row we have to
|
||
// search past them. This leads to exponential search for the next sibling.
|
||
var node = fiber;
|
||
siblings: while (true) {
|
||
// If we didn't find anything, let's try the next sibling.
|
||
while (node.sibling === null) {
|
||
if (node.return === null || isHostParent(node.return)) {
|
||
// If we pop out of the root or hit the parent the fiber we are the
|
||
// last sibling.
|
||
return null;
|
||
}
|
||
node = node.return;
|
||
}
|
||
node.sibling.return = node.return;
|
||
node = node.sibling;
|
||
while (node.tag !== HostComponent && node.tag !== HostText) {
|
||
// If it is not host node and, we might have a host node inside it.
|
||
// Try to search down until we find one.
|
||
if (node.effectTag & Placement) {
|
||
// If we don't have a child, try the siblings instead.
|
||
continue siblings;
|
||
}
|
||
// If we don't have a child, try the siblings instead.
|
||
// We also skip portals because they are not part of this host tree.
|
||
if (node.child === null || node.tag === HostPortal) {
|
||
continue siblings;
|
||
} else {
|
||
node.child.return = node;
|
||
node = node.child;
|
||
}
|
||
}
|
||
// Check if this host node is stable or about to be placed.
|
||
if (!(node.effectTag & Placement)) {
|
||
// Found it!
|
||
return node.stateNode;
|
||
}
|
||
}
|
||
}
|
||
|
||
function commitPlacement(finishedWork) {
|
||
if (!supportsMutation) {
|
||
return;
|
||
}
|
||
|
||
// Recursively insert all host nodes into the parent.
|
||
var parentFiber = getHostParentFiber(finishedWork);
|
||
|
||
// Note: these two variables *must* always be updated together.
|
||
var parent = void 0;
|
||
var isContainer = void 0;
|
||
|
||
switch (parentFiber.tag) {
|
||
case HostComponent:
|
||
parent = parentFiber.stateNode;
|
||
isContainer = false;
|
||
break;
|
||
case HostRoot:
|
||
parent = parentFiber.stateNode.containerInfo;
|
||
isContainer = true;
|
||
break;
|
||
case HostPortal:
|
||
parent = parentFiber.stateNode.containerInfo;
|
||
isContainer = true;
|
||
break;
|
||
default:
|
||
invariant(false, 'Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.');
|
||
}
|
||
if (parentFiber.effectTag & ContentReset) {
|
||
// Reset the text content of the parent before doing any insertions
|
||
resetTextContent(parent);
|
||
// Clear ContentReset from the effect tag
|
||
parentFiber.effectTag &= ~ContentReset;
|
||
}
|
||
|
||
var before = getHostSibling(finishedWork);
|
||
// We only have the top Fiber that was inserted but we need recurse down its
|
||
// children to find all the terminal nodes.
|
||
var node = finishedWork;
|
||
while (true) {
|
||
if (node.tag === HostComponent || node.tag === HostText) {
|
||
if (before) {
|
||
if (isContainer) {
|
||
insertInContainerBefore(parent, node.stateNode, before);
|
||
} else {
|
||
insertBefore(parent, node.stateNode, before);
|
||
}
|
||
} else {
|
||
if (isContainer) {
|
||
appendChildToContainer(parent, node.stateNode);
|
||
} else {
|
||
appendChild(parent, node.stateNode);
|
||
}
|
||
}
|
||
} else if (node.tag === HostPortal) {
|
||
// If the insertion itself is a portal, then we don't want to traverse
|
||
// down its children. Instead, we'll get insertions from each child in
|
||
// the portal directly.
|
||
} else if (node.child !== null) {
|
||
node.child.return = node;
|
||
node = node.child;
|
||
continue;
|
||
}
|
||
if (node === finishedWork) {
|
||
return;
|
||
}
|
||
while (node.sibling === null) {
|
||
if (node.return === null || node.return === finishedWork) {
|
||
return;
|
||
}
|
||
node = node.return;
|
||
}
|
||
node.sibling.return = node.return;
|
||
node = node.sibling;
|
||
}
|
||
}
|
||
|
||
function unmountHostComponents(current$$1) {
|
||
// We only have the top Fiber that was deleted but we need recurse down its
|
||
var node = current$$1;
|
||
|
||
// Each iteration, currentParent is populated with node's host parent if not
|
||
// currentParentIsValid.
|
||
var currentParentIsValid = false;
|
||
|
||
// Note: these two variables *must* always be updated together.
|
||
var currentParent = void 0;
|
||
var currentParentIsContainer = void 0;
|
||
|
||
while (true) {
|
||
if (!currentParentIsValid) {
|
||
var parent = node.return;
|
||
findParent: while (true) {
|
||
!(parent !== null) ? invariant(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
switch (parent.tag) {
|
||
case HostComponent:
|
||
currentParent = parent.stateNode;
|
||
currentParentIsContainer = false;
|
||
break findParent;
|
||
case HostRoot:
|
||
currentParent = parent.stateNode.containerInfo;
|
||
currentParentIsContainer = true;
|
||
break findParent;
|
||
case HostPortal:
|
||
currentParent = parent.stateNode.containerInfo;
|
||
currentParentIsContainer = true;
|
||
break findParent;
|
||
}
|
||
parent = parent.return;
|
||
}
|
||
currentParentIsValid = true;
|
||
}
|
||
|
||
if (node.tag === HostComponent || node.tag === HostText) {
|
||
commitNestedUnmounts(node);
|
||
// After all the children have unmounted, it is now safe to remove the
|
||
// node from the tree.
|
||
if (currentParentIsContainer) {
|
||
removeChildFromContainer(currentParent, node.stateNode);
|
||
} else {
|
||
removeChild(currentParent, node.stateNode);
|
||
}
|
||
// Don't visit children because we already visited them.
|
||
} else if (node.tag === HostPortal) {
|
||
// When we go into a portal, it becomes the parent to remove from.
|
||
// We will reassign it back when we pop the portal on the way up.
|
||
currentParent = node.stateNode.containerInfo;
|
||
currentParentIsContainer = true;
|
||
// Visit children because portals might contain host components.
|
||
if (node.child !== null) {
|
||
node.child.return = node;
|
||
node = node.child;
|
||
continue;
|
||
}
|
||
} else {
|
||
commitUnmount(node);
|
||
// Visit children because we may find more host components below.
|
||
if (node.child !== null) {
|
||
node.child.return = node;
|
||
node = node.child;
|
||
continue;
|
||
}
|
||
}
|
||
if (node === current$$1) {
|
||
return;
|
||
}
|
||
while (node.sibling === null) {
|
||
if (node.return === null || node.return === current$$1) {
|
||
return;
|
||
}
|
||
node = node.return;
|
||
if (node.tag === HostPortal) {
|
||
// When we go out of the portal, we need to restore the parent.
|
||
// Since we don't keep a stack of them, we will search for it.
|
||
currentParentIsValid = false;
|
||
}
|
||
}
|
||
node.sibling.return = node.return;
|
||
node = node.sibling;
|
||
}
|
||
}
|
||
|
||
function commitDeletion(current$$1) {
|
||
if (supportsMutation) {
|
||
// Recursively delete all host nodes from the parent.
|
||
// Detach refs and call componentWillUnmount() on the whole subtree.
|
||
unmountHostComponents(current$$1);
|
||
} else {
|
||
// Detach refs and call componentWillUnmount() on the whole subtree.
|
||
commitNestedUnmounts(current$$1);
|
||
}
|
||
detachFiber(current$$1);
|
||
}
|
||
|
||
function commitWork(current$$1, finishedWork) {
|
||
if (!supportsMutation) {
|
||
switch (finishedWork.tag) {
|
||
case FunctionComponent:
|
||
case ForwardRef:
|
||
case MemoComponent:
|
||
case SimpleMemoComponent:
|
||
{
|
||
// Note: We currently never use MountMutation, but useLayout uses
|
||
// UnmountMutation.
|
||
commitHookEffectList(UnmountMutation, MountMutation, finishedWork);
|
||
return;
|
||
}
|
||
}
|
||
|
||
commitContainer(finishedWork);
|
||
return;
|
||
}
|
||
|
||
switch (finishedWork.tag) {
|
||
case FunctionComponent:
|
||
case ForwardRef:
|
||
case MemoComponent:
|
||
case SimpleMemoComponent:
|
||
{
|
||
// Note: We currently never use MountMutation, but useLayout uses
|
||
// UnmountMutation.
|
||
commitHookEffectList(UnmountMutation, MountMutation, finishedWork);
|
||
return;
|
||
}
|
||
case ClassComponent:
|
||
{
|
||
return;
|
||
}
|
||
case HostComponent:
|
||
{
|
||
var instance = finishedWork.stateNode;
|
||
if (instance != null) {
|
||
// Commit the work prepared earlier.
|
||
var newProps = finishedWork.memoizedProps;
|
||
// For hydration we reuse the update path but we treat the oldProps
|
||
// as the newProps. The updatePayload will contain the real change in
|
||
// this case.
|
||
var oldProps = current$$1 !== null ? current$$1.memoizedProps : newProps;
|
||
var type = finishedWork.type;
|
||
// TODO: Type the updateQueue to be specific to host components.
|
||
var updatePayload = finishedWork.updateQueue;
|
||
finishedWork.updateQueue = null;
|
||
if (updatePayload !== null) {
|
||
commitUpdate(instance, updatePayload, type, oldProps, newProps, finishedWork);
|
||
}
|
||
}
|
||
return;
|
||
}
|
||
case HostText:
|
||
{
|
||
!(finishedWork.stateNode !== null) ? invariant(false, 'This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
var textInstance = finishedWork.stateNode;
|
||
var newText = finishedWork.memoizedProps;
|
||
// For hydration we reuse the update path but we treat the oldProps
|
||
// as the newProps. The updatePayload will contain the real change in
|
||
// this case.
|
||
var oldText = current$$1 !== null ? current$$1.memoizedProps : newText;
|
||
commitTextUpdate(textInstance, oldText, newText);
|
||
return;
|
||
}
|
||
case HostRoot:
|
||
{
|
||
return;
|
||
}
|
||
case Profiler:
|
||
{
|
||
return;
|
||
}
|
||
case SuspenseComponent:
|
||
{
|
||
var newState = finishedWork.memoizedState;
|
||
|
||
var newDidTimeout = void 0;
|
||
var primaryChildParent = finishedWork;
|
||
if (newState === null) {
|
||
newDidTimeout = false;
|
||
} else {
|
||
newDidTimeout = true;
|
||
primaryChildParent = finishedWork.child;
|
||
if (newState.timedOutAt === NoWork) {
|
||
// If the children had not already timed out, record the time.
|
||
// This is used to compute the elapsed time during subsequent
|
||
// attempts to render the children.
|
||
newState.timedOutAt = requestCurrentTime();
|
||
}
|
||
}
|
||
|
||
if (primaryChildParent !== null) {
|
||
hideOrUnhideAllChildren(primaryChildParent, newDidTimeout);
|
||
}
|
||
|
||
// If this boundary just timed out, then it will have a set of thenables.
|
||
// For each thenable, attach a listener so that when it resolves, React
|
||
// attempts to re-render the boundary in the primary (pre-timeout) state.
|
||
var thenables = finishedWork.updateQueue;
|
||
if (thenables !== null) {
|
||
finishedWork.updateQueue = null;
|
||
var retryCache = finishedWork.stateNode;
|
||
if (retryCache === null) {
|
||
retryCache = finishedWork.stateNode = new PossiblyWeakSet();
|
||
}
|
||
thenables.forEach(function (thenable) {
|
||
// Memoize using the boundary fiber to prevent redundant listeners.
|
||
var retry = retryTimedOutBoundary.bind(null, finishedWork, thenable);
|
||
if (enableSchedulerTracing) {
|
||
retry = tracing.unstable_wrap(retry);
|
||
}
|
||
if (!retryCache.has(thenable)) {
|
||
retryCache.add(thenable);
|
||
thenable.then(retry, retry);
|
||
}
|
||
});
|
||
}
|
||
|
||
return;
|
||
}
|
||
case IncompleteClassComponent:
|
||
{
|
||
return;
|
||
}
|
||
default:
|
||
{
|
||
invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');
|
||
}
|
||
}
|
||
}
|
||
|
||
function commitResetTextContent(current$$1) {
|
||
if (!supportsMutation) {
|
||
return;
|
||
}
|
||
resetTextContent(current$$1.stateNode);
|
||
}
|
||
|
||
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
|
||
|
||
function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
|
||
var update = createUpdate(expirationTime);
|
||
// Unmount the root by rendering null.
|
||
update.tag = CaptureUpdate;
|
||
// Caution: React DevTools currently depends on this property
|
||
// being called "element".
|
||
update.payload = { element: null };
|
||
var error = errorInfo.value;
|
||
update.callback = function () {
|
||
onUncaughtError(error);
|
||
logError(fiber, errorInfo);
|
||
};
|
||
return update;
|
||
}
|
||
|
||
function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
|
||
var update = createUpdate(expirationTime);
|
||
update.tag = CaptureUpdate;
|
||
var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
|
||
if (typeof getDerivedStateFromError === 'function') {
|
||
var error = errorInfo.value;
|
||
update.payload = function () {
|
||
return getDerivedStateFromError(error);
|
||
};
|
||
}
|
||
|
||
var inst = fiber.stateNode;
|
||
if (inst !== null && typeof inst.componentDidCatch === 'function') {
|
||
update.callback = function callback() {
|
||
if (typeof getDerivedStateFromError !== 'function') {
|
||
// To preserve the preexisting retry behavior of error boundaries,
|
||
// we keep track of which ones already failed during this batch.
|
||
// This gets reset before we yield back to the browser.
|
||
// TODO: Warn in strict mode if getDerivedStateFromError is
|
||
// not defined.
|
||
markLegacyErrorBoundaryAsFailed(this);
|
||
}
|
||
var error = errorInfo.value;
|
||
var stack = errorInfo.stack;
|
||
logError(fiber, errorInfo);
|
||
this.componentDidCatch(error, {
|
||
componentStack: stack !== null ? stack : ''
|
||
});
|
||
{
|
||
if (typeof getDerivedStateFromError !== 'function') {
|
||
// If componentDidCatch is the only error boundary method defined,
|
||
// then it needs to call setState to recover from errors.
|
||
// If no state update is scheduled then the boundary will swallow the error.
|
||
!(fiber.expirationTime === Sync) ? warningWithoutStack$1(false, '%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown') : void 0;
|
||
}
|
||
}
|
||
};
|
||
}
|
||
return update;
|
||
}
|
||
|
||
function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) {
|
||
// The source fiber did not complete.
|
||
sourceFiber.effectTag |= Incomplete;
|
||
// Its effect list is no longer valid.
|
||
sourceFiber.firstEffect = sourceFiber.lastEffect = null;
|
||
|
||
if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
|
||
// This is a thenable.
|
||
var thenable = value;
|
||
|
||
// Find the earliest timeout threshold of all the placeholders in the
|
||
// ancestor path. We could avoid this traversal by storing the thresholds on
|
||
// the stack, but we choose not to because we only hit this path if we're
|
||
// IO-bound (i.e. if something suspends). Whereas the stack is used even in
|
||
// the non-IO- bound case.
|
||
var _workInProgress = returnFiber;
|
||
var earliestTimeoutMs = -1;
|
||
var startTimeMs = -1;
|
||
do {
|
||
if (_workInProgress.tag === SuspenseComponent) {
|
||
var current$$1 = _workInProgress.alternate;
|
||
if (current$$1 !== null) {
|
||
var currentState = current$$1.memoizedState;
|
||
if (currentState !== null) {
|
||
// Reached a boundary that already timed out. Do not search
|
||
// any further.
|
||
var timedOutAt = currentState.timedOutAt;
|
||
startTimeMs = expirationTimeToMs(timedOutAt);
|
||
// Do not search any further.
|
||
break;
|
||
}
|
||
}
|
||
var timeoutPropMs = _workInProgress.pendingProps.maxDuration;
|
||
if (typeof timeoutPropMs === 'number') {
|
||
if (timeoutPropMs <= 0) {
|
||
earliestTimeoutMs = 0;
|
||
} else if (earliestTimeoutMs === -1 || timeoutPropMs < earliestTimeoutMs) {
|
||
earliestTimeoutMs = timeoutPropMs;
|
||
}
|
||
}
|
||
}
|
||
_workInProgress = _workInProgress.return;
|
||
} while (_workInProgress !== null);
|
||
|
||
// Schedule the nearest Suspense to re-render the timed out view.
|
||
_workInProgress = returnFiber;
|
||
do {
|
||
if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress)) {
|
||
// Found the nearest boundary.
|
||
|
||
// Stash the promise on the boundary fiber. If the boundary times out, we'll
|
||
var thenables = _workInProgress.updateQueue;
|
||
if (thenables === null) {
|
||
_workInProgress.updateQueue = new Set([thenable]);
|
||
} else {
|
||
thenables.add(thenable);
|
||
}
|
||
|
||
// If the boundary is outside of concurrent mode, we should *not*
|
||
// suspend the commit. Pretend as if the suspended component rendered
|
||
// null and keep rendering. In the commit phase, we'll schedule a
|
||
// subsequent synchronous update to re-render the Suspense.
|
||
//
|
||
// Note: It doesn't matter whether the component that suspended was
|
||
// inside a concurrent mode tree. If the Suspense is outside of it, we
|
||
// should *not* suspend the commit.
|
||
if ((_workInProgress.mode & ConcurrentMode) === NoEffect) {
|
||
_workInProgress.effectTag |= DidCapture;
|
||
|
||
// We're going to commit this fiber even though it didn't complete.
|
||
// But we shouldn't call any lifecycle methods or callbacks. Remove
|
||
// all lifecycle effect tags.
|
||
sourceFiber.effectTag &= ~(LifecycleEffectMask | Incomplete);
|
||
|
||
if (sourceFiber.tag === ClassComponent) {
|
||
var currentSourceFiber = sourceFiber.alternate;
|
||
if (currentSourceFiber === null) {
|
||
// This is a new mount. Change the tag so it's not mistaken for a
|
||
// completed class component. For example, we should not call
|
||
// componentWillUnmount if it is deleted.
|
||
sourceFiber.tag = IncompleteClassComponent;
|
||
} else {
|
||
// When we try rendering again, we should not reuse the current fiber,
|
||
// since it's known to be in an inconsistent state. Use a force updte to
|
||
// prevent a bail out.
|
||
var update = createUpdate(Sync);
|
||
update.tag = ForceUpdate;
|
||
enqueueUpdate(sourceFiber, update);
|
||
}
|
||
}
|
||
|
||
// The source fiber did not complete. Mark it with Sync priority to
|
||
// indicate that it still has pending work.
|
||
sourceFiber.expirationTime = Sync;
|
||
|
||
// Exit without suspending.
|
||
return;
|
||
}
|
||
|
||
// Confirmed that the boundary is in a concurrent mode tree. Continue
|
||
// with the normal suspend path.
|
||
|
||
// Attach a listener to the promise to "ping" the root and retry. But
|
||
// only if one does not already exist for the current render expiration
|
||
// time (which acts like a "thread ID" here).
|
||
var pingCache = root.pingCache;
|
||
var threadIDs = void 0;
|
||
if (pingCache === null) {
|
||
pingCache = root.pingCache = new PossiblyWeakMap();
|
||
threadIDs = new Set();
|
||
pingCache.set(thenable, threadIDs);
|
||
} else {
|
||
threadIDs = pingCache.get(thenable);
|
||
if (threadIDs === undefined) {
|
||
threadIDs = new Set();
|
||
pingCache.set(thenable, threadIDs);
|
||
}
|
||
}
|
||
if (!threadIDs.has(renderExpirationTime)) {
|
||
// Memoize using the thread ID to prevent redundant listeners.
|
||
threadIDs.add(renderExpirationTime);
|
||
var ping = pingSuspendedRoot.bind(null, root, thenable, renderExpirationTime);
|
||
if (enableSchedulerTracing) {
|
||
ping = tracing.unstable_wrap(ping);
|
||
}
|
||
thenable.then(ping, ping);
|
||
}
|
||
|
||
var absoluteTimeoutMs = void 0;
|
||
if (earliestTimeoutMs === -1) {
|
||
// If no explicit threshold is given, default to an abitrarily large
|
||
// value. The actual size doesn't matter because the threshold for the
|
||
// whole tree will be clamped to the expiration time.
|
||
absoluteTimeoutMs = maxSigned31BitInt;
|
||
} else {
|
||
if (startTimeMs === -1) {
|
||
// This suspend happened outside of any already timed-out
|
||
// placeholders. We don't know exactly when the update was
|
||
// scheduled, but we can infer an approximate start time from the
|
||
// expiration time. First, find the earliest uncommitted expiration
|
||
// time in the tree, including work that is suspended. Then subtract
|
||
// the offset used to compute an async update's expiration time.
|
||
// This will cause high priority (interactive) work to expire
|
||
// earlier than necessary, but we can account for this by adjusting
|
||
// for the Just Noticeable Difference.
|
||
var earliestExpirationTime = findEarliestOutstandingPriorityLevel(root, renderExpirationTime);
|
||
var earliestExpirationTimeMs = expirationTimeToMs(earliestExpirationTime);
|
||
startTimeMs = earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION;
|
||
}
|
||
absoluteTimeoutMs = startTimeMs + earliestTimeoutMs;
|
||
}
|
||
|
||
// Mark the earliest timeout in the suspended fiber's ancestor path.
|
||
// After completing the root, we'll take the largest of all the
|
||
// suspended fiber's timeouts and use it to compute a timeout for the
|
||
// whole tree.
|
||
renderDidSuspend(root, absoluteTimeoutMs, renderExpirationTime);
|
||
|
||
_workInProgress.effectTag |= ShouldCapture;
|
||
_workInProgress.expirationTime = renderExpirationTime;
|
||
return;
|
||
}
|
||
// This boundary already captured during this render. Continue to the next
|
||
// boundary.
|
||
_workInProgress = _workInProgress.return;
|
||
} while (_workInProgress !== null);
|
||
// No boundary was found. Fallthrough to error mode.
|
||
// TODO: Use invariant so the message is stripped in prod?
|
||
value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n' + '\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.' + getStackByFiberInDevAndProd(sourceFiber));
|
||
}
|
||
|
||
// We didn't find a boundary that could handle this type of exception. Start
|
||
// over and traverse parent path again, this time treating the exception
|
||
// as an error.
|
||
renderDidError();
|
||
value = createCapturedValue(value, sourceFiber);
|
||
var workInProgress = returnFiber;
|
||
do {
|
||
switch (workInProgress.tag) {
|
||
case HostRoot:
|
||
{
|
||
var _errorInfo = value;
|
||
workInProgress.effectTag |= ShouldCapture;
|
||
workInProgress.expirationTime = renderExpirationTime;
|
||
var _update = createRootErrorUpdate(workInProgress, _errorInfo, renderExpirationTime);
|
||
enqueueCapturedUpdate(workInProgress, _update);
|
||
return;
|
||
}
|
||
case ClassComponent:
|
||
// Capture and retry
|
||
var errorInfo = value;
|
||
var ctor = workInProgress.type;
|
||
var instance = workInProgress.stateNode;
|
||
if ((workInProgress.effectTag & DidCapture) === NoEffect && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
|
||
workInProgress.effectTag |= ShouldCapture;
|
||
workInProgress.expirationTime = renderExpirationTime;
|
||
// Schedule the error boundary to re-render using updated state
|
||
var _update2 = createClassErrorUpdate(workInProgress, errorInfo, renderExpirationTime);
|
||
enqueueCapturedUpdate(workInProgress, _update2);
|
||
return;
|
||
}
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
workInProgress = workInProgress.return;
|
||
} while (workInProgress !== null);
|
||
}
|
||
|
||
function unwindWork(workInProgress, renderExpirationTime) {
|
||
switch (workInProgress.tag) {
|
||
case ClassComponent:
|
||
{
|
||
var Component = workInProgress.type;
|
||
if (isContextProvider(Component)) {
|
||
popContext(workInProgress);
|
||
}
|
||
var effectTag = workInProgress.effectTag;
|
||
if (effectTag & ShouldCapture) {
|
||
workInProgress.effectTag = effectTag & ~ShouldCapture | DidCapture;
|
||
return workInProgress;
|
||
}
|
||
return null;
|
||
}
|
||
case HostRoot:
|
||
{
|
||
popHostContainer(workInProgress);
|
||
popTopLevelContextObject(workInProgress);
|
||
var _effectTag = workInProgress.effectTag;
|
||
!((_effectTag & DidCapture) === NoEffect) ? invariant(false, 'The root failed to unmount after an error. This is likely a bug in React. Please file an issue.') : void 0;
|
||
workInProgress.effectTag = _effectTag & ~ShouldCapture | DidCapture;
|
||
return workInProgress;
|
||
}
|
||
case HostComponent:
|
||
{
|
||
popHostContext(workInProgress);
|
||
return null;
|
||
}
|
||
case SuspenseComponent:
|
||
{
|
||
var _effectTag2 = workInProgress.effectTag;
|
||
if (_effectTag2 & ShouldCapture) {
|
||
workInProgress.effectTag = _effectTag2 & ~ShouldCapture | DidCapture;
|
||
// Captured a suspense effect. Re-render the boundary.
|
||
return workInProgress;
|
||
}
|
||
return null;
|
||
}
|
||
case HostPortal:
|
||
popHostContainer(workInProgress);
|
||
return null;
|
||
case ContextProvider:
|
||
popProvider(workInProgress);
|
||
return null;
|
||
default:
|
||
return null;
|
||
}
|
||
}
|
||
|
||
function unwindInterruptedWork(interruptedWork) {
|
||
switch (interruptedWork.tag) {
|
||
case ClassComponent:
|
||
{
|
||
var childContextTypes = interruptedWork.type.childContextTypes;
|
||
if (childContextTypes !== null && childContextTypes !== undefined) {
|
||
popContext(interruptedWork);
|
||
}
|
||
break;
|
||
}
|
||
case HostRoot:
|
||
{
|
||
popHostContainer(interruptedWork);
|
||
popTopLevelContextObject(interruptedWork);
|
||
break;
|
||
}
|
||
case HostComponent:
|
||
{
|
||
popHostContext(interruptedWork);
|
||
break;
|
||
}
|
||
case HostPortal:
|
||
popHostContainer(interruptedWork);
|
||
break;
|
||
case ContextProvider:
|
||
popProvider(interruptedWork);
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
}
|
||
|
||
var Dispatcher = {
|
||
readContext: readContext,
|
||
useCallback: useCallback,
|
||
useContext: useContext,
|
||
useEffect: useEffect,
|
||
useImperativeMethods: useImperativeMethods,
|
||
useLayoutEffect: useLayoutEffect,
|
||
useMemo: useMemo,
|
||
useReducer: useReducer,
|
||
useRef: useRef,
|
||
useState: useState
|
||
};
|
||
var DispatcherWithoutHooks = {
|
||
readContext: readContext
|
||
};
|
||
|
||
var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner;
|
||
|
||
|
||
var didWarnAboutStateTransition = void 0;
|
||
var didWarnSetStateChildContext = void 0;
|
||
var warnAboutUpdateOnUnmounted = void 0;
|
||
var warnAboutInvalidUpdates = void 0;
|
||
|
||
if (enableSchedulerTracing) {
|
||
// Provide explicit error message when production+profiling bundle of e.g. react-dom
|
||
// is used with production (non-profiling) bundle of scheduler/tracing
|
||
!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null) ? invariant(false, 'It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling') : void 0;
|
||
}
|
||
|
||
{
|
||
didWarnAboutStateTransition = false;
|
||
didWarnSetStateChildContext = false;
|
||
var didWarnStateUpdateForUnmountedComponent = {};
|
||
|
||
warnAboutUpdateOnUnmounted = function (fiber, isClass) {
|
||
// We show the whole stack but dedupe on the top component's name because
|
||
// the problematic code almost always lies inside that component.
|
||
var componentName = getComponentName(fiber.type) || 'ReactComponent';
|
||
if (didWarnStateUpdateForUnmountedComponent[componentName]) {
|
||
return;
|
||
}
|
||
warningWithoutStack$1(false, "Can't perform a React state update on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.%s', isClass ? 'the componentWillUnmount method' : 'a useEffect cleanup function', getStackByFiberInDevAndProd(fiber));
|
||
didWarnStateUpdateForUnmountedComponent[componentName] = true;
|
||
};
|
||
|
||
warnAboutInvalidUpdates = function (instance) {
|
||
switch (phase) {
|
||
case 'getChildContext':
|
||
if (didWarnSetStateChildContext) {
|
||
return;
|
||
}
|
||
warningWithoutStack$1(false, 'setState(...): Cannot call setState() inside getChildContext()');
|
||
didWarnSetStateChildContext = true;
|
||
break;
|
||
case 'render':
|
||
if (didWarnAboutStateTransition) {
|
||
return;
|
||
}
|
||
warningWithoutStack$1(false, 'Cannot update during an existing state transition (such as within ' + '`render`). Render methods should be a pure function of props and state.');
|
||
didWarnAboutStateTransition = true;
|
||
break;
|
||
}
|
||
};
|
||
}
|
||
|
||
// Used to ensure computeUniqueAsyncExpiration is monotonically decreasing.
|
||
var lastUniqueAsyncExpiration = Sync - 1;
|
||
|
||
// Represents the expiration time that incoming updates should use. (If this
|
||
// is NoWork, use the default strategy: async updates in async mode, sync
|
||
// updates in sync mode.)
|
||
var expirationContext = NoWork;
|
||
|
||
var isWorking = false;
|
||
|
||
// The next work in progress fiber that we're currently working on.
|
||
var nextUnitOfWork = null;
|
||
var nextRoot = null;
|
||
// The time at which we're currently rendering work.
|
||
var nextRenderExpirationTime = NoWork;
|
||
var nextLatestAbsoluteTimeoutMs = -1;
|
||
var nextRenderDidError = false;
|
||
|
||
// The next fiber with an effect that we're currently committing.
|
||
var nextEffect = null;
|
||
|
||
var isCommitting$1 = false;
|
||
var rootWithPendingPassiveEffects = null;
|
||
var passiveEffectCallbackHandle = null;
|
||
var passiveEffectCallback = null;
|
||
|
||
var legacyErrorBoundariesThatAlreadyFailed = null;
|
||
|
||
// Used for performance tracking.
|
||
var interruptedBy = null;
|
||
|
||
var stashedWorkInProgressProperties = void 0;
|
||
var replayUnitOfWork = void 0;
|
||
var mayReplayFailedUnitOfWork = void 0;
|
||
var isReplayingFailedUnitOfWork = void 0;
|
||
var originalReplayError = void 0;
|
||
var rethrowOriginalError = void 0;
|
||
if ( true && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
|
||
stashedWorkInProgressProperties = null;
|
||
mayReplayFailedUnitOfWork = true;
|
||
isReplayingFailedUnitOfWork = false;
|
||
originalReplayError = null;
|
||
replayUnitOfWork = function (failedUnitOfWork, thrownValue, isYieldy) {
|
||
if (thrownValue !== null && typeof thrownValue === 'object' && typeof thrownValue.then === 'function') {
|
||
// Don't replay promises. Treat everything else like an error.
|
||
// TODO: Need to figure out a different strategy if/when we add
|
||
// support for catching other types.
|
||
return;
|
||
}
|
||
|
||
// Restore the original state of the work-in-progress
|
||
if (stashedWorkInProgressProperties === null) {
|
||
// This should never happen. Don't throw because this code is DEV-only.
|
||
warningWithoutStack$1(false, 'Could not replay rendering after an error. This is likely a bug in React. ' + 'Please file an issue.');
|
||
return;
|
||
}
|
||
assignFiberPropertiesInDEV(failedUnitOfWork, stashedWorkInProgressProperties);
|
||
|
||
switch (failedUnitOfWork.tag) {
|
||
case HostRoot:
|
||
popHostContainer(failedUnitOfWork);
|
||
popTopLevelContextObject(failedUnitOfWork);
|
||
break;
|
||
case HostComponent:
|
||
popHostContext(failedUnitOfWork);
|
||
break;
|
||
case ClassComponent:
|
||
{
|
||
var Component = failedUnitOfWork.type;
|
||
if (isContextProvider(Component)) {
|
||
popContext(failedUnitOfWork);
|
||
}
|
||
break;
|
||
}
|
||
case HostPortal:
|
||
popHostContainer(failedUnitOfWork);
|
||
break;
|
||
case ContextProvider:
|
||
popProvider(failedUnitOfWork);
|
||
break;
|
||
}
|
||
// Replay the begin phase.
|
||
isReplayingFailedUnitOfWork = true;
|
||
originalReplayError = thrownValue;
|
||
invokeGuardedCallback(null, workLoop, null, isYieldy);
|
||
isReplayingFailedUnitOfWork = false;
|
||
originalReplayError = null;
|
||
if (hasCaughtError()) {
|
||
var replayError = clearCaughtError();
|
||
if (replayError != null && thrownValue != null) {
|
||
try {
|
||
// Reading the expando property is intentionally
|
||
// inside `try` because it might be a getter or Proxy.
|
||
if (replayError._suppressLogging) {
|
||
// Also suppress logging for the original error.
|
||
thrownValue._suppressLogging = true;
|
||
}
|
||
} catch (inner) {
|
||
// Ignore.
|
||
}
|
||
}
|
||
} else {
|
||
// If the begin phase did not fail the second time, set this pointer
|
||
// back to the original value.
|
||
nextUnitOfWork = failedUnitOfWork;
|
||
}
|
||
};
|
||
rethrowOriginalError = function () {
|
||
throw originalReplayError;
|
||
};
|
||
}
|
||
|
||
function resetStack() {
|
||
if (nextUnitOfWork !== null) {
|
||
var interruptedWork = nextUnitOfWork.return;
|
||
while (interruptedWork !== null) {
|
||
unwindInterruptedWork(interruptedWork);
|
||
interruptedWork = interruptedWork.return;
|
||
}
|
||
}
|
||
|
||
{
|
||
ReactStrictModeWarnings.discardPendingWarnings();
|
||
checkThatStackIsEmpty();
|
||
}
|
||
|
||
nextRoot = null;
|
||
nextRenderExpirationTime = NoWork;
|
||
nextLatestAbsoluteTimeoutMs = -1;
|
||
nextRenderDidError = false;
|
||
nextUnitOfWork = null;
|
||
}
|
||
|
||
function commitAllHostEffects() {
|
||
while (nextEffect !== null) {
|
||
{
|
||
setCurrentFiber(nextEffect);
|
||
}
|
||
recordEffect();
|
||
|
||
var effectTag = nextEffect.effectTag;
|
||
|
||
if (effectTag & ContentReset) {
|
||
commitResetTextContent(nextEffect);
|
||
}
|
||
|
||
if (effectTag & Ref) {
|
||
var current$$1 = nextEffect.alternate;
|
||
if (current$$1 !== null) {
|
||
commitDetachRef(current$$1);
|
||
}
|
||
}
|
||
|
||
// The following switch statement is only concerned about placement,
|
||
// updates, and deletions. To avoid needing to add a case for every
|
||
// possible bitmap value, we remove the secondary effects from the
|
||
// effect tag and switch on that value.
|
||
var primaryEffectTag = effectTag & (Placement | Update | Deletion);
|
||
switch (primaryEffectTag) {
|
||
case Placement:
|
||
{
|
||
commitPlacement(nextEffect);
|
||
// Clear the "placement" from effect tag so that we know that this is inserted, before
|
||
// any life-cycles like componentDidMount gets called.
|
||
// TODO: findDOMNode doesn't rely on this any more but isMounted
|
||
// does and isMounted is deprecated anyway so we should be able
|
||
// to kill this.
|
||
nextEffect.effectTag &= ~Placement;
|
||
break;
|
||
}
|
||
case PlacementAndUpdate:
|
||
{
|
||
// Placement
|
||
commitPlacement(nextEffect);
|
||
// Clear the "placement" from effect tag so that we know that this is inserted, before
|
||
// any life-cycles like componentDidMount gets called.
|
||
nextEffect.effectTag &= ~Placement;
|
||
|
||
// Update
|
||
var _current = nextEffect.alternate;
|
||
commitWork(_current, nextEffect);
|
||
break;
|
||
}
|
||
case Update:
|
||
{
|
||
var _current2 = nextEffect.alternate;
|
||
commitWork(_current2, nextEffect);
|
||
break;
|
||
}
|
||
case Deletion:
|
||
{
|
||
commitDeletion(nextEffect);
|
||
break;
|
||
}
|
||
}
|
||
nextEffect = nextEffect.nextEffect;
|
||
}
|
||
|
||
{
|
||
resetCurrentFiber();
|
||
}
|
||
}
|
||
|
||
function commitBeforeMutationLifecycles() {
|
||
while (nextEffect !== null) {
|
||
{
|
||
setCurrentFiber(nextEffect);
|
||
}
|
||
|
||
var effectTag = nextEffect.effectTag;
|
||
if (effectTag & Snapshot) {
|
||
recordEffect();
|
||
var current$$1 = nextEffect.alternate;
|
||
commitBeforeMutationLifeCycles(current$$1, nextEffect);
|
||
}
|
||
|
||
nextEffect = nextEffect.nextEffect;
|
||
}
|
||
|
||
{
|
||
resetCurrentFiber();
|
||
}
|
||
}
|
||
|
||
function commitAllLifeCycles(finishedRoot, committedExpirationTime) {
|
||
{
|
||
ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
|
||
ReactStrictModeWarnings.flushLegacyContextWarning();
|
||
|
||
if (warnAboutDeprecatedLifecycles) {
|
||
ReactStrictModeWarnings.flushPendingDeprecationWarnings();
|
||
}
|
||
}
|
||
while (nextEffect !== null) {
|
||
var effectTag = nextEffect.effectTag;
|
||
|
||
if (effectTag & (Update | Callback)) {
|
||
recordEffect();
|
||
var current$$1 = nextEffect.alternate;
|
||
commitLifeCycles(finishedRoot, current$$1, nextEffect, committedExpirationTime);
|
||
}
|
||
|
||
if (effectTag & Ref) {
|
||
recordEffect();
|
||
commitAttachRef(nextEffect);
|
||
}
|
||
|
||
if (enableHooks && effectTag & Passive) {
|
||
rootWithPendingPassiveEffects = finishedRoot;
|
||
}
|
||
|
||
nextEffect = nextEffect.nextEffect;
|
||
}
|
||
}
|
||
|
||
function commitPassiveEffects(root, firstEffect) {
|
||
rootWithPendingPassiveEffects = null;
|
||
passiveEffectCallbackHandle = null;
|
||
passiveEffectCallback = null;
|
||
|
||
// Set this to true to prevent re-entrancy
|
||
var previousIsRendering = isRendering;
|
||
isRendering = true;
|
||
|
||
var effect = firstEffect;
|
||
do {
|
||
if (effect.effectTag & Passive) {
|
||
var didError = false;
|
||
var error = void 0;
|
||
{
|
||
invokeGuardedCallback(null, commitPassiveHookEffects, null, effect);
|
||
if (hasCaughtError()) {
|
||
didError = true;
|
||
error = clearCaughtError();
|
||
}
|
||
}
|
||
if (didError) {
|
||
captureCommitPhaseError(effect, error);
|
||
}
|
||
}
|
||
effect = effect.nextEffect;
|
||
} while (effect !== null);
|
||
|
||
isRendering = previousIsRendering;
|
||
|
||
// Check if work was scheduled by one of the effects
|
||
var rootExpirationTime = root.expirationTime;
|
||
if (rootExpirationTime !== NoWork) {
|
||
requestWork(root, rootExpirationTime);
|
||
}
|
||
}
|
||
|
||
function isAlreadyFailedLegacyErrorBoundary(instance) {
|
||
return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);
|
||
}
|
||
|
||
function markLegacyErrorBoundaryAsFailed(instance) {
|
||
if (legacyErrorBoundariesThatAlreadyFailed === null) {
|
||
legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);
|
||
} else {
|
||
legacyErrorBoundariesThatAlreadyFailed.add(instance);
|
||
}
|
||
}
|
||
|
||
function flushPassiveEffects() {
|
||
if (passiveEffectCallback !== null) {
|
||
scheduler.unstable_cancelCallback(passiveEffectCallbackHandle);
|
||
// We call the scheduled callback instead of commitPassiveEffects directly
|
||
// to ensure tracing works correctly.
|
||
passiveEffectCallback();
|
||
}
|
||
}
|
||
|
||
function commitRoot(root, finishedWork) {
|
||
isWorking = true;
|
||
isCommitting$1 = true;
|
||
startCommitTimer();
|
||
|
||
!(root.current !== finishedWork) ? invariant(false, 'Cannot commit the same tree as before. This is probably a bug related to the return field. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
var committedExpirationTime = root.pendingCommitExpirationTime;
|
||
!(committedExpirationTime !== NoWork) ? invariant(false, 'Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
root.pendingCommitExpirationTime = NoWork;
|
||
|
||
// Update the pending priority levels to account for the work that we are
|
||
// about to commit. This needs to happen before calling the lifecycles, since
|
||
// they may schedule additional updates.
|
||
var updateExpirationTimeBeforeCommit = finishedWork.expirationTime;
|
||
var childExpirationTimeBeforeCommit = finishedWork.childExpirationTime;
|
||
var earliestRemainingTimeBeforeCommit = childExpirationTimeBeforeCommit > updateExpirationTimeBeforeCommit ? childExpirationTimeBeforeCommit : updateExpirationTimeBeforeCommit;
|
||
markCommittedPriorityLevels(root, earliestRemainingTimeBeforeCommit);
|
||
|
||
var prevInteractions = null;
|
||
if (enableSchedulerTracing) {
|
||
// Restore any pending interactions at this point,
|
||
// So that cascading work triggered during the render phase will be accounted for.
|
||
prevInteractions = tracing.__interactionsRef.current;
|
||
tracing.__interactionsRef.current = root.memoizedInteractions;
|
||
}
|
||
|
||
// Reset this to null before calling lifecycles
|
||
ReactCurrentOwner$2.current = null;
|
||
|
||
var firstEffect = void 0;
|
||
if (finishedWork.effectTag > PerformedWork) {
|
||
// A fiber's effect list consists only of its children, not itself. So if
|
||
// the root has an effect, we need to add it to the end of the list. The
|
||
// resulting list is the set that would belong to the root's parent, if
|
||
// it had one; that is, all the effects in the tree including the root.
|
||
if (finishedWork.lastEffect !== null) {
|
||
finishedWork.lastEffect.nextEffect = finishedWork;
|
||
firstEffect = finishedWork.firstEffect;
|
||
} else {
|
||
firstEffect = finishedWork;
|
||
}
|
||
} else {
|
||
// There is no effect on the root.
|
||
firstEffect = finishedWork.firstEffect;
|
||
}
|
||
|
||
prepareForCommit(root.containerInfo);
|
||
|
||
// Invoke instances of getSnapshotBeforeUpdate before mutation.
|
||
nextEffect = firstEffect;
|
||
startCommitSnapshotEffectsTimer();
|
||
while (nextEffect !== null) {
|
||
var didError = false;
|
||
var error = void 0;
|
||
{
|
||
invokeGuardedCallback(null, commitBeforeMutationLifecycles, null);
|
||
if (hasCaughtError()) {
|
||
didError = true;
|
||
error = clearCaughtError();
|
||
}
|
||
}
|
||
if (didError) {
|
||
!(nextEffect !== null) ? invariant(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
captureCommitPhaseError(nextEffect, error);
|
||
// Clean-up
|
||
if (nextEffect !== null) {
|
||
nextEffect = nextEffect.nextEffect;
|
||
}
|
||
}
|
||
}
|
||
stopCommitSnapshotEffectsTimer();
|
||
|
||
if (enableProfilerTimer) {
|
||
// Mark the current commit time to be shared by all Profilers in this batch.
|
||
// This enables them to be grouped later.
|
||
recordCommitTime();
|
||
}
|
||
|
||
// Commit all the side-effects within a tree. We'll do this in two passes.
|
||
// The first pass performs all the host insertions, updates, deletions and
|
||
// ref unmounts.
|
||
nextEffect = firstEffect;
|
||
startCommitHostEffectsTimer();
|
||
while (nextEffect !== null) {
|
||
var _didError = false;
|
||
var _error = void 0;
|
||
{
|
||
invokeGuardedCallback(null, commitAllHostEffects, null);
|
||
if (hasCaughtError()) {
|
||
_didError = true;
|
||
_error = clearCaughtError();
|
||
}
|
||
}
|
||
if (_didError) {
|
||
!(nextEffect !== null) ? invariant(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
captureCommitPhaseError(nextEffect, _error);
|
||
// Clean-up
|
||
if (nextEffect !== null) {
|
||
nextEffect = nextEffect.nextEffect;
|
||
}
|
||
}
|
||
}
|
||
stopCommitHostEffectsTimer();
|
||
|
||
resetAfterCommit(root.containerInfo);
|
||
|
||
// The work-in-progress tree is now the current tree. This must come after
|
||
// the first pass of the commit phase, so that the previous tree is still
|
||
// current during componentWillUnmount, but before the second pass, so that
|
||
// the finished work is current during componentDidMount/Update.
|
||
root.current = finishedWork;
|
||
|
||
// In the second pass we'll perform all life-cycles and ref callbacks.
|
||
// Life-cycles happen as a separate pass so that all placements, updates,
|
||
// and deletions in the entire tree have already been invoked.
|
||
// This pass also triggers any renderer-specific initial effects.
|
||
nextEffect = firstEffect;
|
||
startCommitLifeCyclesTimer();
|
||
while (nextEffect !== null) {
|
||
var _didError2 = false;
|
||
var _error2 = void 0;
|
||
{
|
||
invokeGuardedCallback(null, commitAllLifeCycles, null, root, committedExpirationTime);
|
||
if (hasCaughtError()) {
|
||
_didError2 = true;
|
||
_error2 = clearCaughtError();
|
||
}
|
||
}
|
||
if (_didError2) {
|
||
!(nextEffect !== null) ? invariant(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
captureCommitPhaseError(nextEffect, _error2);
|
||
if (nextEffect !== null) {
|
||
nextEffect = nextEffect.nextEffect;
|
||
}
|
||
}
|
||
}
|
||
|
||
if (enableHooks && firstEffect !== null && rootWithPendingPassiveEffects !== null) {
|
||
// This commit included a passive effect. These do not need to fire until
|
||
// after the next paint. Schedule an callback to fire them in an async
|
||
// event. To ensure serial execution, the callback will be flushed early if
|
||
// we enter rootWithPendingPassiveEffects commit phase before then.
|
||
var callback = commitPassiveEffects.bind(null, root, firstEffect);
|
||
if (enableSchedulerTracing) {
|
||
// TODO: Avoid this extra callback by mutating the tracing ref directly,
|
||
// like we do at the beginning of commitRoot. I've opted not to do that
|
||
// here because that code is still in flux.
|
||
callback = tracing.unstable_wrap(callback);
|
||
}
|
||
passiveEffectCallbackHandle = scheduler.unstable_scheduleCallback(callback);
|
||
passiveEffectCallback = callback;
|
||
}
|
||
|
||
isCommitting$1 = false;
|
||
isWorking = false;
|
||
stopCommitLifeCyclesTimer();
|
||
stopCommitTimer();
|
||
onCommitRoot(finishedWork.stateNode);
|
||
if ( true && ReactFiberInstrumentation_1.debugTool) {
|
||
ReactFiberInstrumentation_1.debugTool.onCommitWork(finishedWork);
|
||
}
|
||
|
||
var updateExpirationTimeAfterCommit = finishedWork.expirationTime;
|
||
var childExpirationTimeAfterCommit = finishedWork.childExpirationTime;
|
||
var earliestRemainingTimeAfterCommit = childExpirationTimeAfterCommit > updateExpirationTimeAfterCommit ? childExpirationTimeAfterCommit : updateExpirationTimeAfterCommit;
|
||
if (earliestRemainingTimeAfterCommit === NoWork) {
|
||
// If there's no remaining work, we can clear the set of already failed
|
||
// error boundaries.
|
||
legacyErrorBoundariesThatAlreadyFailed = null;
|
||
}
|
||
onCommit(root, earliestRemainingTimeAfterCommit);
|
||
|
||
if (enableSchedulerTracing) {
|
||
tracing.__interactionsRef.current = prevInteractions;
|
||
|
||
var subscriber = void 0;
|
||
|
||
try {
|
||
subscriber = tracing.__subscriberRef.current;
|
||
if (subscriber !== null && root.memoizedInteractions.size > 0) {
|
||
var threadID = computeThreadID(committedExpirationTime, root.interactionThreadID);
|
||
subscriber.onWorkStopped(root.memoizedInteractions, threadID);
|
||
}
|
||
} catch (error) {
|
||
// It's not safe for commitRoot() to throw.
|
||
// Store the error for now and we'll re-throw in finishRendering().
|
||
if (!hasUnhandledError) {
|
||
hasUnhandledError = true;
|
||
unhandledError = error;
|
||
}
|
||
} finally {
|
||
// Clear completed interactions from the pending Map.
|
||
// Unless the render was suspended or cascading work was scheduled,
|
||
// In which case– leave pending interactions until the subsequent render.
|
||
var pendingInteractionMap = root.pendingInteractionMap;
|
||
pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
|
||
// Only decrement the pending interaction count if we're done.
|
||
// If there's still work at the current priority,
|
||
// That indicates that we are waiting for suspense data.
|
||
if (scheduledExpirationTime > earliestRemainingTimeAfterCommit) {
|
||
pendingInteractionMap.delete(scheduledExpirationTime);
|
||
|
||
scheduledInteractions.forEach(function (interaction) {
|
||
interaction.__count--;
|
||
|
||
if (subscriber !== null && interaction.__count === 0) {
|
||
try {
|
||
subscriber.onInteractionScheduledWorkCompleted(interaction);
|
||
} catch (error) {
|
||
// It's not safe for commitRoot() to throw.
|
||
// Store the error for now and we'll re-throw in finishRendering().
|
||
if (!hasUnhandledError) {
|
||
hasUnhandledError = true;
|
||
unhandledError = error;
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
});
|
||
}
|
||
}
|
||
}
|
||
|
||
function resetChildExpirationTime(workInProgress, renderTime) {
|
||
if (renderTime !== Never && workInProgress.childExpirationTime === Never) {
|
||
// The children of this component are hidden. Don't bubble their
|
||
// expiration times.
|
||
return;
|
||
}
|
||
|
||
var newChildExpirationTime = NoWork;
|
||
|
||
// Bubble up the earliest expiration time.
|
||
if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
|
||
// We're in profiling mode.
|
||
// Let's use this same traversal to update the render durations.
|
||
var actualDuration = workInProgress.actualDuration;
|
||
var treeBaseDuration = workInProgress.selfBaseDuration;
|
||
|
||
// When a fiber is cloned, its actualDuration is reset to 0.
|
||
// This value will only be updated if work is done on the fiber (i.e. it doesn't bailout).
|
||
// When work is done, it should bubble to the parent's actualDuration.
|
||
// If the fiber has not been cloned though, (meaning no work was done),
|
||
// Then this value will reflect the amount of time spent working on a previous render.
|
||
// In that case it should not bubble.
|
||
// We determine whether it was cloned by comparing the child pointer.
|
||
var shouldBubbleActualDurations = workInProgress.alternate === null || workInProgress.child !== workInProgress.alternate.child;
|
||
|
||
var child = workInProgress.child;
|
||
while (child !== null) {
|
||
var childUpdateExpirationTime = child.expirationTime;
|
||
var childChildExpirationTime = child.childExpirationTime;
|
||
if (childUpdateExpirationTime > newChildExpirationTime) {
|
||
newChildExpirationTime = childUpdateExpirationTime;
|
||
}
|
||
if (childChildExpirationTime > newChildExpirationTime) {
|
||
newChildExpirationTime = childChildExpirationTime;
|
||
}
|
||
if (shouldBubbleActualDurations) {
|
||
actualDuration += child.actualDuration;
|
||
}
|
||
treeBaseDuration += child.treeBaseDuration;
|
||
child = child.sibling;
|
||
}
|
||
workInProgress.actualDuration = actualDuration;
|
||
workInProgress.treeBaseDuration = treeBaseDuration;
|
||
} else {
|
||
var _child = workInProgress.child;
|
||
while (_child !== null) {
|
||
var _childUpdateExpirationTime = _child.expirationTime;
|
||
var _childChildExpirationTime = _child.childExpirationTime;
|
||
if (_childUpdateExpirationTime > newChildExpirationTime) {
|
||
newChildExpirationTime = _childUpdateExpirationTime;
|
||
}
|
||
if (_childChildExpirationTime > newChildExpirationTime) {
|
||
newChildExpirationTime = _childChildExpirationTime;
|
||
}
|
||
_child = _child.sibling;
|
||
}
|
||
}
|
||
|
||
workInProgress.childExpirationTime = newChildExpirationTime;
|
||
}
|
||
|
||
function completeUnitOfWork(workInProgress) {
|
||
// Attempt to complete the current unit of work, then move to the
|
||
// next sibling. If there are no more siblings, return to the
|
||
// parent fiber.
|
||
while (true) {
|
||
// The current, flushed, state of this fiber is the alternate.
|
||
// Ideally nothing should rely on this, but relying on it here
|
||
// means that we don't need an additional field on the work in
|
||
// progress.
|
||
var current$$1 = workInProgress.alternate;
|
||
{
|
||
setCurrentFiber(workInProgress);
|
||
}
|
||
|
||
var returnFiber = workInProgress.return;
|
||
var siblingFiber = workInProgress.sibling;
|
||
|
||
if ((workInProgress.effectTag & Incomplete) === NoEffect) {
|
||
if ( true && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
|
||
// Don't replay if it fails during completion phase.
|
||
mayReplayFailedUnitOfWork = false;
|
||
}
|
||
// This fiber completed.
|
||
// Remember we're completing this unit so we can find a boundary if it fails.
|
||
nextUnitOfWork = workInProgress;
|
||
if (enableProfilerTimer) {
|
||
if (workInProgress.mode & ProfileMode) {
|
||
startProfilerTimer(workInProgress);
|
||
}
|
||
nextUnitOfWork = completeWork(current$$1, workInProgress, nextRenderExpirationTime);
|
||
if (workInProgress.mode & ProfileMode) {
|
||
// Update render duration assuming we didn't error.
|
||
stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);
|
||
}
|
||
} else {
|
||
nextUnitOfWork = completeWork(current$$1, workInProgress, nextRenderExpirationTime);
|
||
}
|
||
if ( true && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
|
||
// We're out of completion phase so replaying is fine now.
|
||
mayReplayFailedUnitOfWork = true;
|
||
}
|
||
stopWorkTimer(workInProgress);
|
||
resetChildExpirationTime(workInProgress, nextRenderExpirationTime);
|
||
{
|
||
resetCurrentFiber();
|
||
}
|
||
|
||
if (nextUnitOfWork !== null) {
|
||
// Completing this fiber spawned new work. Work on that next.
|
||
return nextUnitOfWork;
|
||
}
|
||
|
||
if (returnFiber !== null &&
|
||
// Do not append effects to parents if a sibling failed to complete
|
||
(returnFiber.effectTag & Incomplete) === NoEffect) {
|
||
// Append all the effects of the subtree and this fiber onto the effect
|
||
// list of the parent. The completion order of the children affects the
|
||
// side-effect order.
|
||
if (returnFiber.firstEffect === null) {
|
||
returnFiber.firstEffect = workInProgress.firstEffect;
|
||
}
|
||
if (workInProgress.lastEffect !== null) {
|
||
if (returnFiber.lastEffect !== null) {
|
||
returnFiber.lastEffect.nextEffect = workInProgress.firstEffect;
|
||
}
|
||
returnFiber.lastEffect = workInProgress.lastEffect;
|
||
}
|
||
|
||
// If this fiber had side-effects, we append it AFTER the children's
|
||
// side-effects. We can perform certain side-effects earlier if
|
||
// needed, by doing multiple passes over the effect list. We don't want
|
||
// to schedule our own side-effect on our own list because if end up
|
||
// reusing children we'll schedule this effect onto itself since we're
|
||
// at the end.
|
||
var effectTag = workInProgress.effectTag;
|
||
// Skip both NoWork and PerformedWork tags when creating the effect list.
|
||
// PerformedWork effect is read by React DevTools but shouldn't be committed.
|
||
if (effectTag > PerformedWork) {
|
||
if (returnFiber.lastEffect !== null) {
|
||
returnFiber.lastEffect.nextEffect = workInProgress;
|
||
} else {
|
||
returnFiber.firstEffect = workInProgress;
|
||
}
|
||
returnFiber.lastEffect = workInProgress;
|
||
}
|
||
}
|
||
|
||
if ( true && ReactFiberInstrumentation_1.debugTool) {
|
||
ReactFiberInstrumentation_1.debugTool.onCompleteWork(workInProgress);
|
||
}
|
||
|
||
if (siblingFiber !== null) {
|
||
// If there is more work to do in this returnFiber, do that next.
|
||
return siblingFiber;
|
||
} else if (returnFiber !== null) {
|
||
// If there's no more work in this returnFiber. Complete the returnFiber.
|
||
workInProgress = returnFiber;
|
||
continue;
|
||
} else {
|
||
// We've reached the root.
|
||
return null;
|
||
}
|
||
} else {
|
||
if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
|
||
// Record the render duration for the fiber that errored.
|
||
stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);
|
||
|
||
// Include the time spent working on failed children before continuing.
|
||
var actualDuration = workInProgress.actualDuration;
|
||
var child = workInProgress.child;
|
||
while (child !== null) {
|
||
actualDuration += child.actualDuration;
|
||
child = child.sibling;
|
||
}
|
||
workInProgress.actualDuration = actualDuration;
|
||
}
|
||
|
||
// This fiber did not complete because something threw. Pop values off
|
||
// the stack without entering the complete phase. If this is a boundary,
|
||
// capture values if possible.
|
||
var next = unwindWork(workInProgress, nextRenderExpirationTime);
|
||
// Because this fiber did not complete, don't reset its expiration time.
|
||
if (workInProgress.effectTag & DidCapture) {
|
||
// Restarting an error boundary
|
||
stopFailedWorkTimer(workInProgress);
|
||
} else {
|
||
stopWorkTimer(workInProgress);
|
||
}
|
||
|
||
{
|
||
resetCurrentFiber();
|
||
}
|
||
|
||
if (next !== null) {
|
||
stopWorkTimer(workInProgress);
|
||
if ( true && ReactFiberInstrumentation_1.debugTool) {
|
||
ReactFiberInstrumentation_1.debugTool.onCompleteWork(workInProgress);
|
||
}
|
||
|
||
// If completing this work spawned new work, do that next. We'll come
|
||
// back here again.
|
||
// Since we're restarting, remove anything that is not a host effect
|
||
// from the effect tag.
|
||
next.effectTag &= HostEffectMask;
|
||
return next;
|
||
}
|
||
|
||
if (returnFiber !== null) {
|
||
// Mark the parent fiber as incomplete and clear its effect list.
|
||
returnFiber.firstEffect = returnFiber.lastEffect = null;
|
||
returnFiber.effectTag |= Incomplete;
|
||
}
|
||
|
||
if ( true && ReactFiberInstrumentation_1.debugTool) {
|
||
ReactFiberInstrumentation_1.debugTool.onCompleteWork(workInProgress);
|
||
}
|
||
|
||
if (siblingFiber !== null) {
|
||
// If there is more work to do in this returnFiber, do that next.
|
||
return siblingFiber;
|
||
} else if (returnFiber !== null) {
|
||
// If there's no more work in this returnFiber. Complete the returnFiber.
|
||
workInProgress = returnFiber;
|
||
continue;
|
||
} else {
|
||
return null;
|
||
}
|
||
}
|
||
}
|
||
|
||
// Without this explicit null return Flow complains of invalid return type
|
||
// TODO Remove the above while(true) loop
|
||
// eslint-disable-next-line no-unreachable
|
||
return null;
|
||
}
|
||
|
||
function performUnitOfWork(workInProgress) {
|
||
// The current, flushed, state of this fiber is the alternate.
|
||
// Ideally nothing should rely on this, but relying on it here
|
||
// means that we don't need an additional field on the work in
|
||
// progress.
|
||
var current$$1 = workInProgress.alternate;
|
||
|
||
// See if beginning this work spawns more work.
|
||
startWorkTimer(workInProgress);
|
||
{
|
||
setCurrentFiber(workInProgress);
|
||
}
|
||
|
||
if ( true && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
|
||
stashedWorkInProgressProperties = assignFiberPropertiesInDEV(stashedWorkInProgressProperties, workInProgress);
|
||
}
|
||
|
||
var next = void 0;
|
||
if (enableProfilerTimer) {
|
||
if (workInProgress.mode & ProfileMode) {
|
||
startProfilerTimer(workInProgress);
|
||
}
|
||
|
||
next = beginWork(current$$1, workInProgress, nextRenderExpirationTime);
|
||
workInProgress.memoizedProps = workInProgress.pendingProps;
|
||
|
||
if (workInProgress.mode & ProfileMode) {
|
||
// Record the render duration assuming we didn't bailout (or error).
|
||
stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true);
|
||
}
|
||
} else {
|
||
next = beginWork(current$$1, workInProgress, nextRenderExpirationTime);
|
||
workInProgress.memoizedProps = workInProgress.pendingProps;
|
||
}
|
||
|
||
{
|
||
resetCurrentFiber();
|
||
if (isReplayingFailedUnitOfWork) {
|
||
// Currently replaying a failed unit of work. This should be unreachable,
|
||
// because the render phase is meant to be idempotent, and it should
|
||
// have thrown again. Since it didn't, rethrow the original error, so
|
||
// React's internal stack is not misaligned.
|
||
rethrowOriginalError();
|
||
}
|
||
}
|
||
if ( true && ReactFiberInstrumentation_1.debugTool) {
|
||
ReactFiberInstrumentation_1.debugTool.onBeginWork(workInProgress);
|
||
}
|
||
|
||
if (next === null) {
|
||
// If this doesn't spawn new work, complete the current work.
|
||
next = completeUnitOfWork(workInProgress);
|
||
}
|
||
|
||
ReactCurrentOwner$2.current = null;
|
||
|
||
return next;
|
||
}
|
||
|
||
function workLoop(isYieldy) {
|
||
if (!isYieldy) {
|
||
// Flush work without yielding
|
||
while (nextUnitOfWork !== null) {
|
||
nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
|
||
}
|
||
} else {
|
||
// Flush asynchronous work until there's a higher priority event
|
||
while (nextUnitOfWork !== null && !shouldYieldToRenderer()) {
|
||
nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
|
||
}
|
||
}
|
||
}
|
||
|
||
function renderRoot(root, isYieldy) {
|
||
!!isWorking ? invariant(false, 'renderRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
|
||
flushPassiveEffects();
|
||
|
||
isWorking = true;
|
||
if (enableHooks) {
|
||
ReactCurrentOwner$2.currentDispatcher = Dispatcher;
|
||
} else {
|
||
ReactCurrentOwner$2.currentDispatcher = DispatcherWithoutHooks;
|
||
}
|
||
|
||
var expirationTime = root.nextExpirationTimeToWorkOn;
|
||
|
||
// Check if we're starting from a fresh stack, or if we're resuming from
|
||
// previously yielded work.
|
||
if (expirationTime !== nextRenderExpirationTime || root !== nextRoot || nextUnitOfWork === null) {
|
||
// Reset the stack and start working from the root.
|
||
resetStack();
|
||
nextRoot = root;
|
||
nextRenderExpirationTime = expirationTime;
|
||
nextUnitOfWork = createWorkInProgress(nextRoot.current, null, nextRenderExpirationTime);
|
||
root.pendingCommitExpirationTime = NoWork;
|
||
|
||
if (enableSchedulerTracing) {
|
||
// Determine which interactions this batch of work currently includes,
|
||
// So that we can accurately attribute time spent working on it,
|
||
var interactions = new Set();
|
||
root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
|
||
if (scheduledExpirationTime >= expirationTime) {
|
||
scheduledInteractions.forEach(function (interaction) {
|
||
return interactions.add(interaction);
|
||
});
|
||
}
|
||
});
|
||
|
||
// Store the current set of interactions on the FiberRoot for a few reasons:
|
||
// We can re-use it in hot functions like renderRoot() without having to recalculate it.
|
||
// We will also use it in commitWork() to pass to any Profiler onRender() hooks.
|
||
// This also provides DevTools with a way to access it when the onCommitRoot() hook is called.
|
||
root.memoizedInteractions = interactions;
|
||
|
||
if (interactions.size > 0) {
|
||
var subscriber = tracing.__subscriberRef.current;
|
||
if (subscriber !== null) {
|
||
var threadID = computeThreadID(expirationTime, root.interactionThreadID);
|
||
try {
|
||
subscriber.onWorkStarted(interactions, threadID);
|
||
} catch (error) {
|
||
// Work thrown by an interaction tracing subscriber should be rethrown,
|
||
// But only once it's safe (to avoid leaveing the scheduler in an invalid state).
|
||
// Store the error for now and we'll re-throw in finishRendering().
|
||
if (!hasUnhandledError) {
|
||
hasUnhandledError = true;
|
||
unhandledError = error;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
var prevInteractions = null;
|
||
if (enableSchedulerTracing) {
|
||
// We're about to start new traced work.
|
||
// Restore pending interactions so cascading work triggered during the render phase will be accounted for.
|
||
prevInteractions = tracing.__interactionsRef.current;
|
||
tracing.__interactionsRef.current = root.memoizedInteractions;
|
||
}
|
||
|
||
var didFatal = false;
|
||
|
||
startWorkLoopTimer(nextUnitOfWork);
|
||
|
||
do {
|
||
try {
|
||
workLoop(isYieldy);
|
||
} catch (thrownValue) {
|
||
resetContextDependences();
|
||
resetHooks();
|
||
|
||
// Reset in case completion throws.
|
||
// This is only used in DEV and when replaying is on.
|
||
var mayReplay = void 0;
|
||
if ( true && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
|
||
mayReplay = mayReplayFailedUnitOfWork;
|
||
mayReplayFailedUnitOfWork = true;
|
||
}
|
||
|
||
if (nextUnitOfWork === null) {
|
||
// This is a fatal error.
|
||
didFatal = true;
|
||
onUncaughtError(thrownValue);
|
||
} else {
|
||
if (enableProfilerTimer && nextUnitOfWork.mode & ProfileMode) {
|
||
// Record the time spent rendering before an error was thrown.
|
||
// This avoids inaccurate Profiler durations in the case of a suspended render.
|
||
stopProfilerTimerIfRunningAndRecordDelta(nextUnitOfWork, true);
|
||
}
|
||
|
||
{
|
||
// Reset global debug state
|
||
// We assume this is defined in DEV
|
||
resetCurrentlyProcessingQueue();
|
||
}
|
||
|
||
if ( true && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
|
||
if (mayReplay) {
|
||
var failedUnitOfWork = nextUnitOfWork;
|
||
replayUnitOfWork(failedUnitOfWork, thrownValue, isYieldy);
|
||
}
|
||
}
|
||
|
||
// TODO: we already know this isn't true in some cases.
|
||
// At least this shows a nicer error message until we figure out the cause.
|
||
// https://github.com/facebook/react/issues/12449#issuecomment-386727431
|
||
!(nextUnitOfWork !== null) ? invariant(false, 'Failed to replay rendering after an error. This is likely caused by a bug in React. Please file an issue with a reproducing case to help us find it.') : void 0;
|
||
|
||
var sourceFiber = nextUnitOfWork;
|
||
var returnFiber = sourceFiber.return;
|
||
if (returnFiber === null) {
|
||
// This is the root. The root could capture its own errors. However,
|
||
// we don't know if it errors before or after we pushed the host
|
||
// context. This information is needed to avoid a stack mismatch.
|
||
// Because we're not sure, treat this as a fatal error. We could track
|
||
// which phase it fails in, but doesn't seem worth it. At least
|
||
// for now.
|
||
didFatal = true;
|
||
onUncaughtError(thrownValue);
|
||
} else {
|
||
throwException(root, returnFiber, sourceFiber, thrownValue, nextRenderExpirationTime);
|
||
nextUnitOfWork = completeUnitOfWork(sourceFiber);
|
||
continue;
|
||
}
|
||
}
|
||
}
|
||
break;
|
||
} while (true);
|
||
|
||
if (enableSchedulerTracing) {
|
||
// Traced work is done for now; restore the previous interactions.
|
||
tracing.__interactionsRef.current = prevInteractions;
|
||
}
|
||
|
||
// We're done performing work. Time to clean up.
|
||
isWorking = false;
|
||
ReactCurrentOwner$2.currentDispatcher = null;
|
||
resetContextDependences();
|
||
resetHooks();
|
||
|
||
// Yield back to main thread.
|
||
if (didFatal) {
|
||
var _didCompleteRoot = false;
|
||
stopWorkLoopTimer(interruptedBy, _didCompleteRoot);
|
||
interruptedBy = null;
|
||
// There was a fatal error.
|
||
{
|
||
resetStackAfterFatalErrorInDev();
|
||
}
|
||
// `nextRoot` points to the in-progress root. A non-null value indicates
|
||
// that we're in the middle of an async render. Set it to null to indicate
|
||
// there's no more work to be done in the current batch.
|
||
nextRoot = null;
|
||
onFatal(root);
|
||
return;
|
||
}
|
||
|
||
if (nextUnitOfWork !== null) {
|
||
// There's still remaining async work in this tree, but we ran out of time
|
||
// in the current frame. Yield back to the renderer. Unless we're
|
||
// interrupted by a higher priority update, we'll continue later from where
|
||
// we left off.
|
||
var _didCompleteRoot2 = false;
|
||
stopWorkLoopTimer(interruptedBy, _didCompleteRoot2);
|
||
interruptedBy = null;
|
||
onYield(root);
|
||
return;
|
||
}
|
||
|
||
// We completed the whole tree.
|
||
var didCompleteRoot = true;
|
||
stopWorkLoopTimer(interruptedBy, didCompleteRoot);
|
||
var rootWorkInProgress = root.current.alternate;
|
||
!(rootWorkInProgress !== null) ? invariant(false, 'Finished root should have a work-in-progress. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
|
||
// `nextRoot` points to the in-progress root. A non-null value indicates
|
||
// that we're in the middle of an async render. Set it to null to indicate
|
||
// there's no more work to be done in the current batch.
|
||
nextRoot = null;
|
||
interruptedBy = null;
|
||
|
||
if (nextRenderDidError) {
|
||
// There was an error
|
||
if (hasLowerPriorityWork(root, expirationTime)) {
|
||
// There's lower priority work. If so, it may have the effect of fixing
|
||
// the exception that was just thrown. Exit without committing. This is
|
||
// similar to a suspend, but without a timeout because we're not waiting
|
||
// for a promise to resolve. React will restart at the lower
|
||
// priority level.
|
||
markSuspendedPriorityLevel(root, expirationTime);
|
||
var suspendedExpirationTime = expirationTime;
|
||
var rootExpirationTime = root.expirationTime;
|
||
onSuspend(root, rootWorkInProgress, suspendedExpirationTime, rootExpirationTime, -1 // Indicates no timeout
|
||
);
|
||
return;
|
||
} else if (
|
||
// There's no lower priority work, but we're rendering asynchronously.
|
||
// Synchronsouly attempt to render the same level one more time. This is
|
||
// similar to a suspend, but without a timeout because we're not waiting
|
||
// for a promise to resolve.
|
||
!root.didError && isYieldy) {
|
||
root.didError = true;
|
||
var _suspendedExpirationTime = root.nextExpirationTimeToWorkOn = expirationTime;
|
||
var _rootExpirationTime = root.expirationTime = Sync;
|
||
onSuspend(root, rootWorkInProgress, _suspendedExpirationTime, _rootExpirationTime, -1 // Indicates no timeout
|
||
);
|
||
return;
|
||
}
|
||
}
|
||
|
||
if (isYieldy && nextLatestAbsoluteTimeoutMs !== -1) {
|
||
// The tree was suspended.
|
||
var _suspendedExpirationTime2 = expirationTime;
|
||
markSuspendedPriorityLevel(root, _suspendedExpirationTime2);
|
||
|
||
// Find the earliest uncommitted expiration time in the tree, including
|
||
// work that is suspended. The timeout threshold cannot be longer than
|
||
// the overall expiration.
|
||
var earliestExpirationTime = findEarliestOutstandingPriorityLevel(root, expirationTime);
|
||
var earliestExpirationTimeMs = expirationTimeToMs(earliestExpirationTime);
|
||
if (earliestExpirationTimeMs < nextLatestAbsoluteTimeoutMs) {
|
||
nextLatestAbsoluteTimeoutMs = earliestExpirationTimeMs;
|
||
}
|
||
|
||
// Subtract the current time from the absolute timeout to get the number
|
||
// of milliseconds until the timeout. In other words, convert an absolute
|
||
// timestamp to a relative time. This is the value that is passed
|
||
// to `setTimeout`.
|
||
var currentTimeMs = expirationTimeToMs(requestCurrentTime());
|
||
var msUntilTimeout = nextLatestAbsoluteTimeoutMs - currentTimeMs;
|
||
msUntilTimeout = msUntilTimeout < 0 ? 0 : msUntilTimeout;
|
||
|
||
// TODO: Account for the Just Noticeable Difference
|
||
|
||
var _rootExpirationTime2 = root.expirationTime;
|
||
onSuspend(root, rootWorkInProgress, _suspendedExpirationTime2, _rootExpirationTime2, msUntilTimeout);
|
||
return;
|
||
}
|
||
|
||
// Ready to commit.
|
||
onComplete(root, rootWorkInProgress, expirationTime);
|
||
}
|
||
|
||
function captureCommitPhaseError(sourceFiber, value) {
|
||
var expirationTime = Sync;
|
||
var fiber = sourceFiber.return;
|
||
while (fiber !== null) {
|
||
switch (fiber.tag) {
|
||
case ClassComponent:
|
||
var ctor = fiber.type;
|
||
var instance = fiber.stateNode;
|
||
if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
|
||
var errorInfo = createCapturedValue(value, sourceFiber);
|
||
var update = createClassErrorUpdate(fiber, errorInfo, expirationTime);
|
||
enqueueUpdate(fiber, update);
|
||
scheduleWork(fiber, expirationTime);
|
||
return;
|
||
}
|
||
break;
|
||
case HostRoot:
|
||
{
|
||
var _errorInfo = createCapturedValue(value, sourceFiber);
|
||
var _update = createRootErrorUpdate(fiber, _errorInfo, expirationTime);
|
||
enqueueUpdate(fiber, _update);
|
||
scheduleWork(fiber, expirationTime);
|
||
return;
|
||
}
|
||
}
|
||
fiber = fiber.return;
|
||
}
|
||
|
||
if (sourceFiber.tag === HostRoot) {
|
||
// Error was thrown at the root. There is no parent, so the root
|
||
// itself should capture it.
|
||
var rootFiber = sourceFiber;
|
||
var _errorInfo2 = createCapturedValue(value, rootFiber);
|
||
var _update2 = createRootErrorUpdate(rootFiber, _errorInfo2, expirationTime);
|
||
enqueueUpdate(rootFiber, _update2);
|
||
scheduleWork(rootFiber, expirationTime);
|
||
}
|
||
}
|
||
|
||
function computeThreadID(expirationTime, interactionThreadID) {
|
||
// Interaction threads are unique per root and expiration time.
|
||
return expirationTime * 1000 + interactionThreadID;
|
||
}
|
||
|
||
// Creates a unique async expiration time.
|
||
function computeUniqueAsyncExpiration() {
|
||
var currentTime = requestCurrentTime();
|
||
var result = computeAsyncExpiration(currentTime);
|
||
if (result >= lastUniqueAsyncExpiration) {
|
||
// Since we assume the current time monotonically increases, we only hit
|
||
// this branch when computeUniqueAsyncExpiration is fired multiple times
|
||
// within a 200ms window (or whatever the async bucket size is).
|
||
result = lastUniqueAsyncExpiration - 1;
|
||
}
|
||
lastUniqueAsyncExpiration = result;
|
||
return lastUniqueAsyncExpiration;
|
||
}
|
||
|
||
function computeExpirationForFiber(currentTime, fiber) {
|
||
var expirationTime = void 0;
|
||
if (expirationContext !== NoWork) {
|
||
// An explicit expiration context was set;
|
||
expirationTime = expirationContext;
|
||
} else if (isWorking) {
|
||
if (isCommitting$1) {
|
||
// Updates that occur during the commit phase should have sync priority
|
||
// by default.
|
||
expirationTime = Sync;
|
||
} else {
|
||
// Updates during the render phase should expire at the same time as
|
||
// the work that is being rendered.
|
||
expirationTime = nextRenderExpirationTime;
|
||
}
|
||
} else {
|
||
// No explicit expiration context was set, and we're not currently
|
||
// performing work. Calculate a new expiration time.
|
||
if (fiber.mode & ConcurrentMode) {
|
||
if (isBatchingInteractiveUpdates) {
|
||
// This is an interactive update
|
||
expirationTime = computeInteractiveExpiration(currentTime);
|
||
} else {
|
||
// This is an async update
|
||
expirationTime = computeAsyncExpiration(currentTime);
|
||
}
|
||
// If we're in the middle of rendering a tree, do not update at the same
|
||
// expiration time that is already rendering.
|
||
if (nextRoot !== null && expirationTime === nextRenderExpirationTime) {
|
||
expirationTime -= 1;
|
||
}
|
||
} else {
|
||
// This is a sync update
|
||
expirationTime = Sync;
|
||
}
|
||
}
|
||
if (isBatchingInteractiveUpdates) {
|
||
// This is an interactive update. Keep track of the lowest pending
|
||
// interactive expiration time. This allows us to synchronously flush
|
||
// all interactive updates when needed.
|
||
if (lowestPriorityPendingInteractiveExpirationTime === NoWork || expirationTime < lowestPriorityPendingInteractiveExpirationTime) {
|
||
lowestPriorityPendingInteractiveExpirationTime = expirationTime;
|
||
}
|
||
}
|
||
return expirationTime;
|
||
}
|
||
|
||
function renderDidSuspend(root, absoluteTimeoutMs, suspendedTime) {
|
||
// Schedule the timeout.
|
||
if (absoluteTimeoutMs >= 0 && nextLatestAbsoluteTimeoutMs < absoluteTimeoutMs) {
|
||
nextLatestAbsoluteTimeoutMs = absoluteTimeoutMs;
|
||
}
|
||
}
|
||
|
||
function renderDidError() {
|
||
nextRenderDidError = true;
|
||
}
|
||
|
||
function pingSuspendedRoot(root, thenable, pingTime) {
|
||
// A promise that previously suspended React from committing has resolved.
|
||
// If React is still suspended, try again at the previous level (pingTime).
|
||
|
||
var pingCache = root.pingCache;
|
||
if (pingCache !== null) {
|
||
// The thenable resolved, so we no longer need to memoize, because it will
|
||
// never be thrown again.
|
||
pingCache.delete(thenable);
|
||
}
|
||
|
||
if (nextRoot !== null && nextRenderExpirationTime === pingTime) {
|
||
// Received a ping at the same priority level at which we're currently
|
||
// rendering. Restart from the root.
|
||
nextRoot = null;
|
||
} else {
|
||
// Confirm that the root is still suspended at this level. Otherwise exit.
|
||
if (isPriorityLevelSuspended(root, pingTime)) {
|
||
// Ping at the original level
|
||
markPingedPriorityLevel(root, pingTime);
|
||
var rootExpirationTime = root.expirationTime;
|
||
if (rootExpirationTime !== NoWork) {
|
||
requestWork(root, rootExpirationTime);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
function retryTimedOutBoundary(boundaryFiber, thenable) {
|
||
// The boundary fiber (a Suspense component) previously timed out and was
|
||
// rendered in its fallback state. One of the promises that suspended it has
|
||
// resolved, which means at least part of the tree was likely unblocked. Try
|
||
var retryCache = boundaryFiber.stateNode;
|
||
if (retryCache !== null) {
|
||
// The thenable resolved, so we no longer need to memoize, because it will
|
||
// never be thrown again.
|
||
retryCache.delete(thenable);
|
||
}
|
||
|
||
var currentTime = requestCurrentTime();
|
||
var retryTime = computeExpirationForFiber(currentTime, boundaryFiber);
|
||
var root = scheduleWorkToRoot(boundaryFiber, retryTime);
|
||
if (root !== null) {
|
||
markPendingPriorityLevel(root, retryTime);
|
||
var rootExpirationTime = root.expirationTime;
|
||
if (rootExpirationTime !== NoWork) {
|
||
requestWork(root, rootExpirationTime);
|
||
}
|
||
}
|
||
}
|
||
|
||
function scheduleWorkToRoot(fiber, expirationTime) {
|
||
recordScheduleUpdate();
|
||
|
||
{
|
||
if (fiber.tag === ClassComponent) {
|
||
var instance = fiber.stateNode;
|
||
warnAboutInvalidUpdates(instance);
|
||
}
|
||
}
|
||
|
||
// Update the source fiber's expiration time
|
||
if (fiber.expirationTime < expirationTime) {
|
||
fiber.expirationTime = expirationTime;
|
||
}
|
||
var alternate = fiber.alternate;
|
||
if (alternate !== null && alternate.expirationTime < expirationTime) {
|
||
alternate.expirationTime = expirationTime;
|
||
}
|
||
// Walk the parent path to the root and update the child expiration time.
|
||
var node = fiber.return;
|
||
var root = null;
|
||
if (node === null && fiber.tag === HostRoot) {
|
||
root = fiber.stateNode;
|
||
} else {
|
||
while (node !== null) {
|
||
alternate = node.alternate;
|
||
if (node.childExpirationTime < expirationTime) {
|
||
node.childExpirationTime = expirationTime;
|
||
if (alternate !== null && alternate.childExpirationTime < expirationTime) {
|
||
alternate.childExpirationTime = expirationTime;
|
||
}
|
||
} else if (alternate !== null && alternate.childExpirationTime < expirationTime) {
|
||
alternate.childExpirationTime = expirationTime;
|
||
}
|
||
if (node.return === null && node.tag === HostRoot) {
|
||
root = node.stateNode;
|
||
break;
|
||
}
|
||
node = node.return;
|
||
}
|
||
}
|
||
|
||
if (enableSchedulerTracing) {
|
||
if (root !== null) {
|
||
var interactions = tracing.__interactionsRef.current;
|
||
if (interactions.size > 0) {
|
||
var pendingInteractionMap = root.pendingInteractionMap;
|
||
var pendingInteractions = pendingInteractionMap.get(expirationTime);
|
||
if (pendingInteractions != null) {
|
||
interactions.forEach(function (interaction) {
|
||
if (!pendingInteractions.has(interaction)) {
|
||
// Update the pending async work count for previously unscheduled interaction.
|
||
interaction.__count++;
|
||
}
|
||
|
||
pendingInteractions.add(interaction);
|
||
});
|
||
} else {
|
||
pendingInteractionMap.set(expirationTime, new Set(interactions));
|
||
|
||
// Update the pending async work count for the current interactions.
|
||
interactions.forEach(function (interaction) {
|
||
interaction.__count++;
|
||
});
|
||
}
|
||
|
||
var subscriber = tracing.__subscriberRef.current;
|
||
if (subscriber !== null) {
|
||
var threadID = computeThreadID(expirationTime, root.interactionThreadID);
|
||
subscriber.onWorkScheduled(interactions, threadID);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return root;
|
||
}
|
||
|
||
function scheduleWork(fiber, expirationTime) {
|
||
var root = scheduleWorkToRoot(fiber, expirationTime);
|
||
if (root === null) {
|
||
{
|
||
switch (fiber.tag) {
|
||
case ClassComponent:
|
||
warnAboutUpdateOnUnmounted(fiber, true);
|
||
break;
|
||
case FunctionComponent:
|
||
case ForwardRef:
|
||
case MemoComponent:
|
||
case SimpleMemoComponent:
|
||
warnAboutUpdateOnUnmounted(fiber, false);
|
||
break;
|
||
}
|
||
}
|
||
return;
|
||
}
|
||
|
||
if (!isWorking && nextRenderExpirationTime !== NoWork && expirationTime > nextRenderExpirationTime) {
|
||
// This is an interruption. (Used for performance tracking.)
|
||
interruptedBy = fiber;
|
||
resetStack();
|
||
}
|
||
markPendingPriorityLevel(root, expirationTime);
|
||
if (
|
||
// If we're in the render phase, we don't need to schedule this root
|
||
// for an update, because we'll do it before we exit...
|
||
!isWorking || isCommitting$1 ||
|
||
// ...unless this is a different root than the one we're rendering.
|
||
nextRoot !== root) {
|
||
var rootExpirationTime = root.expirationTime;
|
||
requestWork(root, rootExpirationTime);
|
||
}
|
||
if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
|
||
// Reset this back to zero so subsequent updates don't throw.
|
||
nestedUpdateCount = 0;
|
||
invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');
|
||
}
|
||
}
|
||
|
||
function syncUpdates(fn, a, b, c, d) {
|
||
var previousExpirationContext = expirationContext;
|
||
expirationContext = Sync;
|
||
try {
|
||
return fn(a, b, c, d);
|
||
} finally {
|
||
expirationContext = previousExpirationContext;
|
||
}
|
||
}
|
||
|
||
// TODO: Everything below this is written as if it has been lifted to the
|
||
// renderers. I'll do this in a follow-up.
|
||
|
||
// Linked-list of roots
|
||
var firstScheduledRoot = null;
|
||
var lastScheduledRoot = null;
|
||
|
||
var callbackExpirationTime = NoWork;
|
||
var callbackID = void 0;
|
||
var isRendering = false;
|
||
var nextFlushedRoot = null;
|
||
var nextFlushedExpirationTime = NoWork;
|
||
var lowestPriorityPendingInteractiveExpirationTime = NoWork;
|
||
var hasUnhandledError = false;
|
||
var unhandledError = null;
|
||
|
||
var isBatchingUpdates = false;
|
||
var isUnbatchingUpdates = false;
|
||
var isBatchingInteractiveUpdates = false;
|
||
|
||
var completedBatches = null;
|
||
|
||
var originalStartTimeMs = scheduler.unstable_now();
|
||
var currentRendererTime = msToExpirationTime(originalStartTimeMs);
|
||
var currentSchedulerTime = currentRendererTime;
|
||
|
||
// Use these to prevent an infinite loop of nested updates
|
||
var NESTED_UPDATE_LIMIT = 50;
|
||
var nestedUpdateCount = 0;
|
||
var lastCommittedRootDuringThisBatch = null;
|
||
|
||
function recomputeCurrentRendererTime() {
|
||
var currentTimeMs = scheduler.unstable_now() - originalStartTimeMs;
|
||
currentRendererTime = msToExpirationTime(currentTimeMs);
|
||
}
|
||
|
||
function scheduleCallbackWithExpirationTime(root, expirationTime) {
|
||
if (callbackExpirationTime !== NoWork) {
|
||
// A callback is already scheduled. Check its expiration time (timeout).
|
||
if (expirationTime < callbackExpirationTime) {
|
||
// Existing callback has sufficient timeout. Exit.
|
||
return;
|
||
} else {
|
||
if (callbackID !== null) {
|
||
// Existing callback has insufficient timeout. Cancel and schedule a
|
||
// new one.
|
||
scheduler.unstable_cancelCallback(callbackID);
|
||
}
|
||
}
|
||
// The request callback timer is already running. Don't start a new one.
|
||
} else {
|
||
startRequestCallbackTimer();
|
||
}
|
||
|
||
callbackExpirationTime = expirationTime;
|
||
var currentMs = scheduler.unstable_now() - originalStartTimeMs;
|
||
var expirationTimeMs = expirationTimeToMs(expirationTime);
|
||
var timeout = expirationTimeMs - currentMs;
|
||
callbackID = scheduler.unstable_scheduleCallback(performAsyncWork, { timeout: timeout });
|
||
}
|
||
|
||
// For every call to renderRoot, one of onFatal, onComplete, onSuspend, and
|
||
// onYield is called upon exiting. We use these in lieu of returning a tuple.
|
||
// I've also chosen not to inline them into renderRoot because these will
|
||
// eventually be lifted into the renderer.
|
||
function onFatal(root) {
|
||
root.finishedWork = null;
|
||
}
|
||
|
||
function onComplete(root, finishedWork, expirationTime) {
|
||
root.pendingCommitExpirationTime = expirationTime;
|
||
root.finishedWork = finishedWork;
|
||
}
|
||
|
||
function onSuspend(root, finishedWork, suspendedExpirationTime, rootExpirationTime, msUntilTimeout) {
|
||
root.expirationTime = rootExpirationTime;
|
||
if (msUntilTimeout === 0 && !shouldYieldToRenderer()) {
|
||
// Don't wait an additional tick. Commit the tree immediately.
|
||
root.pendingCommitExpirationTime = suspendedExpirationTime;
|
||
root.finishedWork = finishedWork;
|
||
} else if (msUntilTimeout > 0) {
|
||
// Wait `msUntilTimeout` milliseconds before committing.
|
||
root.timeoutHandle = scheduleTimeout(onTimeout.bind(null, root, finishedWork, suspendedExpirationTime), msUntilTimeout);
|
||
}
|
||
}
|
||
|
||
function onYield(root) {
|
||
root.finishedWork = null;
|
||
}
|
||
|
||
function onTimeout(root, finishedWork, suspendedExpirationTime) {
|
||
// The root timed out. Commit it.
|
||
root.pendingCommitExpirationTime = suspendedExpirationTime;
|
||
root.finishedWork = finishedWork;
|
||
// Read the current time before entering the commit phase. We can be
|
||
// certain this won't cause tearing related to batching of event updates
|
||
// because we're at the top of a timer event.
|
||
recomputeCurrentRendererTime();
|
||
currentSchedulerTime = currentRendererTime;
|
||
flushRoot(root, suspendedExpirationTime);
|
||
}
|
||
|
||
function onCommit(root, expirationTime) {
|
||
root.expirationTime = expirationTime;
|
||
root.finishedWork = null;
|
||
}
|
||
|
||
function requestCurrentTime() {
|
||
// requestCurrentTime is called by the scheduler to compute an expiration
|
||
// time.
|
||
//
|
||
// Expiration times are computed by adding to the current time (the start
|
||
// time). However, if two updates are scheduled within the same event, we
|
||
// should treat their start times as simultaneous, even if the actual clock
|
||
// time has advanced between the first and second call.
|
||
|
||
// In other words, because expiration times determine how updates are batched,
|
||
// we want all updates of like priority that occur within the same event to
|
||
// receive the same expiration time. Otherwise we get tearing.
|
||
//
|
||
// We keep track of two separate times: the current "renderer" time and the
|
||
// current "scheduler" time. The renderer time can be updated whenever; it
|
||
// only exists to minimize the calls performance.now.
|
||
//
|
||
// But the scheduler time can only be updated if there's no pending work, or
|
||
// if we know for certain that we're not in the middle of an event.
|
||
|
||
if (isRendering) {
|
||
// We're already rendering. Return the most recently read time.
|
||
return currentSchedulerTime;
|
||
}
|
||
// Check if there's pending work.
|
||
findHighestPriorityRoot();
|
||
if (nextFlushedExpirationTime === NoWork || nextFlushedExpirationTime === Never) {
|
||
// If there's no pending work, or if the pending work is offscreen, we can
|
||
// read the current time without risk of tearing.
|
||
recomputeCurrentRendererTime();
|
||
currentSchedulerTime = currentRendererTime;
|
||
return currentSchedulerTime;
|
||
}
|
||
// There's already pending work. We might be in the middle of a browser
|
||
// event. If we were to read the current time, it could cause multiple updates
|
||
// within the same event to receive different expiration times, leading to
|
||
// tearing. Return the last read time. During the next idle callback, the
|
||
// time will be updated.
|
||
return currentSchedulerTime;
|
||
}
|
||
|
||
// requestWork is called by the scheduler whenever a root receives an update.
|
||
// It's up to the renderer to call renderRoot at some point in the future.
|
||
function requestWork(root, expirationTime) {
|
||
addRootToSchedule(root, expirationTime);
|
||
if (isRendering) {
|
||
// Prevent reentrancy. Remaining work will be scheduled at the end of
|
||
// the currently rendering batch.
|
||
return;
|
||
}
|
||
|
||
if (isBatchingUpdates) {
|
||
// Flush work at the end of the batch.
|
||
if (isUnbatchingUpdates) {
|
||
// ...unless we're inside unbatchedUpdates, in which case we should
|
||
// flush it now.
|
||
nextFlushedRoot = root;
|
||
nextFlushedExpirationTime = Sync;
|
||
performWorkOnRoot(root, Sync, false);
|
||
}
|
||
return;
|
||
}
|
||
|
||
// TODO: Get rid of Sync and use current time?
|
||
if (expirationTime === Sync) {
|
||
performSyncWork();
|
||
} else {
|
||
scheduleCallbackWithExpirationTime(root, expirationTime);
|
||
}
|
||
}
|
||
|
||
function addRootToSchedule(root, expirationTime) {
|
||
// Add the root to the schedule.
|
||
// Check if this root is already part of the schedule.
|
||
if (root.nextScheduledRoot === null) {
|
||
// This root is not already scheduled. Add it.
|
||
root.expirationTime = expirationTime;
|
||
if (lastScheduledRoot === null) {
|
||
firstScheduledRoot = lastScheduledRoot = root;
|
||
root.nextScheduledRoot = root;
|
||
} else {
|
||
lastScheduledRoot.nextScheduledRoot = root;
|
||
lastScheduledRoot = root;
|
||
lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;
|
||
}
|
||
} else {
|
||
// This root is already scheduled, but its priority may have increased.
|
||
var remainingExpirationTime = root.expirationTime;
|
||
if (expirationTime > remainingExpirationTime) {
|
||
// Update the priority.
|
||
root.expirationTime = expirationTime;
|
||
}
|
||
}
|
||
}
|
||
|
||
function findHighestPriorityRoot() {
|
||
var highestPriorityWork = NoWork;
|
||
var highestPriorityRoot = null;
|
||
if (lastScheduledRoot !== null) {
|
||
var previousScheduledRoot = lastScheduledRoot;
|
||
var root = firstScheduledRoot;
|
||
while (root !== null) {
|
||
var remainingExpirationTime = root.expirationTime;
|
||
if (remainingExpirationTime === NoWork) {
|
||
// This root no longer has work. Remove it from the scheduler.
|
||
|
||
// TODO: This check is redudant, but Flow is confused by the branch
|
||
// below where we set lastScheduledRoot to null, even though we break
|
||
// from the loop right after.
|
||
!(previousScheduledRoot !== null && lastScheduledRoot !== null) ? invariant(false, 'Should have a previous and last root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
if (root === root.nextScheduledRoot) {
|
||
// This is the only root in the list.
|
||
root.nextScheduledRoot = null;
|
||
firstScheduledRoot = lastScheduledRoot = null;
|
||
break;
|
||
} else if (root === firstScheduledRoot) {
|
||
// This is the first root in the list.
|
||
var next = root.nextScheduledRoot;
|
||
firstScheduledRoot = next;
|
||
lastScheduledRoot.nextScheduledRoot = next;
|
||
root.nextScheduledRoot = null;
|
||
} else if (root === lastScheduledRoot) {
|
||
// This is the last root in the list.
|
||
lastScheduledRoot = previousScheduledRoot;
|
||
lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;
|
||
root.nextScheduledRoot = null;
|
||
break;
|
||
} else {
|
||
previousScheduledRoot.nextScheduledRoot = root.nextScheduledRoot;
|
||
root.nextScheduledRoot = null;
|
||
}
|
||
root = previousScheduledRoot.nextScheduledRoot;
|
||
} else {
|
||
if (remainingExpirationTime > highestPriorityWork) {
|
||
// Update the priority, if it's higher
|
||
highestPriorityWork = remainingExpirationTime;
|
||
highestPriorityRoot = root;
|
||
}
|
||
if (root === lastScheduledRoot) {
|
||
break;
|
||
}
|
||
if (highestPriorityWork === Sync) {
|
||
// Sync is highest priority by definition so
|
||
// we can stop searching.
|
||
break;
|
||
}
|
||
previousScheduledRoot = root;
|
||
root = root.nextScheduledRoot;
|
||
}
|
||
}
|
||
}
|
||
|
||
nextFlushedRoot = highestPriorityRoot;
|
||
nextFlushedExpirationTime = highestPriorityWork;
|
||
}
|
||
|
||
// TODO: This wrapper exists because many of the older tests (the ones that use
|
||
// flushDeferredPri) rely on the number of times `shouldYield` is called. We
|
||
// should get rid of it.
|
||
var didYield = false;
|
||
function shouldYieldToRenderer() {
|
||
if (didYield) {
|
||
return true;
|
||
}
|
||
if (scheduler.unstable_shouldYield()) {
|
||
didYield = true;
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
function performAsyncWork() {
|
||
try {
|
||
if (!shouldYieldToRenderer()) {
|
||
// The callback timed out. That means at least one update has expired.
|
||
// Iterate through the root schedule. If they contain expired work, set
|
||
// the next render expiration time to the current time. This has the effect
|
||
// of flushing all expired work in a single batch, instead of flushing each
|
||
// level one at a time.
|
||
if (firstScheduledRoot !== null) {
|
||
recomputeCurrentRendererTime();
|
||
var root = firstScheduledRoot;
|
||
do {
|
||
didExpireAtExpirationTime(root, currentRendererTime);
|
||
// The root schedule is circular, so this is never null.
|
||
root = root.nextScheduledRoot;
|
||
} while (root !== firstScheduledRoot);
|
||
}
|
||
}
|
||
performWork(NoWork, true);
|
||
} finally {
|
||
didYield = false;
|
||
}
|
||
}
|
||
|
||
function performSyncWork() {
|
||
performWork(Sync, false);
|
||
}
|
||
|
||
function performWork(minExpirationTime, isYieldy) {
|
||
// Keep working on roots until there's no more work, or until there's a higher
|
||
// priority event.
|
||
findHighestPriorityRoot();
|
||
|
||
if (isYieldy) {
|
||
recomputeCurrentRendererTime();
|
||
currentSchedulerTime = currentRendererTime;
|
||
|
||
if (enableUserTimingAPI) {
|
||
var didExpire = nextFlushedExpirationTime > currentRendererTime;
|
||
var timeout = expirationTimeToMs(nextFlushedExpirationTime);
|
||
stopRequestCallbackTimer(didExpire, timeout);
|
||
}
|
||
|
||
while (nextFlushedRoot !== null && nextFlushedExpirationTime !== NoWork && minExpirationTime <= nextFlushedExpirationTime && !(didYield && currentRendererTime > nextFlushedExpirationTime)) {
|
||
performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime, currentRendererTime > nextFlushedExpirationTime);
|
||
findHighestPriorityRoot();
|
||
recomputeCurrentRendererTime();
|
||
currentSchedulerTime = currentRendererTime;
|
||
}
|
||
} else {
|
||
while (nextFlushedRoot !== null && nextFlushedExpirationTime !== NoWork && minExpirationTime <= nextFlushedExpirationTime) {
|
||
performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime, false);
|
||
findHighestPriorityRoot();
|
||
}
|
||
}
|
||
|
||
// We're done flushing work. Either we ran out of time in this callback,
|
||
// or there's no more work left with sufficient priority.
|
||
|
||
// If we're inside a callback, set this to false since we just completed it.
|
||
if (isYieldy) {
|
||
callbackExpirationTime = NoWork;
|
||
callbackID = null;
|
||
}
|
||
// If there's work left over, schedule a new callback.
|
||
if (nextFlushedExpirationTime !== NoWork) {
|
||
scheduleCallbackWithExpirationTime(nextFlushedRoot, nextFlushedExpirationTime);
|
||
}
|
||
|
||
// Clean-up.
|
||
finishRendering();
|
||
}
|
||
|
||
function flushRoot(root, expirationTime) {
|
||
!!isRendering ? invariant(false, 'work.commit(): Cannot commit while already rendering. This likely means you attempted to commit from inside a lifecycle method.') : void 0;
|
||
// Perform work on root as if the given expiration time is the current time.
|
||
// This has the effect of synchronously flushing all work up to and
|
||
// including the given time.
|
||
nextFlushedRoot = root;
|
||
nextFlushedExpirationTime = expirationTime;
|
||
performWorkOnRoot(root, expirationTime, false);
|
||
// Flush any sync work that was scheduled by lifecycles
|
||
performSyncWork();
|
||
}
|
||
|
||
function finishRendering() {
|
||
nestedUpdateCount = 0;
|
||
lastCommittedRootDuringThisBatch = null;
|
||
|
||
if (completedBatches !== null) {
|
||
var batches = completedBatches;
|
||
completedBatches = null;
|
||
for (var i = 0; i < batches.length; i++) {
|
||
var batch = batches[i];
|
||
try {
|
||
batch._onComplete();
|
||
} catch (error) {
|
||
if (!hasUnhandledError) {
|
||
hasUnhandledError = true;
|
||
unhandledError = error;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
if (hasUnhandledError) {
|
||
var error = unhandledError;
|
||
unhandledError = null;
|
||
hasUnhandledError = false;
|
||
throw error;
|
||
}
|
||
}
|
||
|
||
function performWorkOnRoot(root, expirationTime, isYieldy) {
|
||
!!isRendering ? invariant(false, 'performWorkOnRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
|
||
isRendering = true;
|
||
|
||
// Check if this is async work or sync/expired work.
|
||
if (!isYieldy) {
|
||
// Flush work without yielding.
|
||
// TODO: Non-yieldy work does not necessarily imply expired work. A renderer
|
||
// may want to perform some work without yielding, but also without
|
||
// requiring the root to complete (by triggering placeholders).
|
||
|
||
var finishedWork = root.finishedWork;
|
||
if (finishedWork !== null) {
|
||
// This root is already complete. We can commit it.
|
||
completeRoot(root, finishedWork, expirationTime);
|
||
} else {
|
||
root.finishedWork = null;
|
||
// If this root previously suspended, clear its existing timeout, since
|
||
// we're about to try rendering again.
|
||
var timeoutHandle = root.timeoutHandle;
|
||
if (timeoutHandle !== noTimeout) {
|
||
root.timeoutHandle = noTimeout;
|
||
// $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
|
||
cancelTimeout(timeoutHandle);
|
||
}
|
||
renderRoot(root, isYieldy);
|
||
finishedWork = root.finishedWork;
|
||
if (finishedWork !== null) {
|
||
// We've completed the root. Commit it.
|
||
completeRoot(root, finishedWork, expirationTime);
|
||
}
|
||
}
|
||
} else {
|
||
// Flush async work.
|
||
var _finishedWork = root.finishedWork;
|
||
if (_finishedWork !== null) {
|
||
// This root is already complete. We can commit it.
|
||
completeRoot(root, _finishedWork, expirationTime);
|
||
} else {
|
||
root.finishedWork = null;
|
||
// If this root previously suspended, clear its existing timeout, since
|
||
// we're about to try rendering again.
|
||
var _timeoutHandle = root.timeoutHandle;
|
||
if (_timeoutHandle !== noTimeout) {
|
||
root.timeoutHandle = noTimeout;
|
||
// $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
|
||
cancelTimeout(_timeoutHandle);
|
||
}
|
||
renderRoot(root, isYieldy);
|
||
_finishedWork = root.finishedWork;
|
||
if (_finishedWork !== null) {
|
||
// We've completed the root. Check the if we should yield one more time
|
||
// before committing.
|
||
if (!shouldYieldToRenderer()) {
|
||
// Still time left. Commit the root.
|
||
completeRoot(root, _finishedWork, expirationTime);
|
||
} else {
|
||
// There's no time left. Mark this root as complete. We'll come
|
||
// back and commit it later.
|
||
root.finishedWork = _finishedWork;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
isRendering = false;
|
||
}
|
||
|
||
function completeRoot(root, finishedWork, expirationTime) {
|
||
// Check if there's a batch that matches this expiration time.
|
||
var firstBatch = root.firstBatch;
|
||
if (firstBatch !== null && firstBatch._expirationTime >= expirationTime) {
|
||
if (completedBatches === null) {
|
||
completedBatches = [firstBatch];
|
||
} else {
|
||
completedBatches.push(firstBatch);
|
||
}
|
||
if (firstBatch._defer) {
|
||
// This root is blocked from committing by a batch. Unschedule it until
|
||
// we receive another update.
|
||
root.finishedWork = finishedWork;
|
||
root.expirationTime = NoWork;
|
||
return;
|
||
}
|
||
}
|
||
|
||
// Commit the root.
|
||
root.finishedWork = null;
|
||
|
||
// Check if this is a nested update (a sync update scheduled during the
|
||
// commit phase).
|
||
if (root === lastCommittedRootDuringThisBatch) {
|
||
// If the next root is the same as the previous root, this is a nested
|
||
// update. To prevent an infinite loop, increment the nested update count.
|
||
nestedUpdateCount++;
|
||
} else {
|
||
// Reset whenever we switch roots.
|
||
lastCommittedRootDuringThisBatch = root;
|
||
nestedUpdateCount = 0;
|
||
}
|
||
commitRoot(root, finishedWork);
|
||
}
|
||
|
||
function onUncaughtError(error) {
|
||
!(nextFlushedRoot !== null) ? invariant(false, 'Should be working on a root. This error is likely caused by a bug in React. Please file an issue.') : void 0;
|
||
// Unschedule this root so we don't work on it again until there's
|
||
// another update.
|
||
nextFlushedRoot.expirationTime = NoWork;
|
||
if (!hasUnhandledError) {
|
||
hasUnhandledError = true;
|
||
unhandledError = error;
|
||
}
|
||
}
|
||
|
||
// TODO: Batching should be implemented at the renderer level, not inside
|
||
// the reconciler.
|
||
function batchedUpdates$1(fn, a) {
|
||
var previousIsBatchingUpdates = isBatchingUpdates;
|
||
isBatchingUpdates = true;
|
||
try {
|
||
return fn(a);
|
||
} finally {
|
||
isBatchingUpdates = previousIsBatchingUpdates;
|
||
if (!isBatchingUpdates && !isRendering) {
|
||
performSyncWork();
|
||
}
|
||
}
|
||
}
|
||
|
||
// TODO: Batching should be implemented at the renderer level, not inside
|
||
// the reconciler.
|
||
function unbatchedUpdates(fn, a) {
|
||
if (isBatchingUpdates && !isUnbatchingUpdates) {
|
||
isUnbatchingUpdates = true;
|
||
try {
|
||
return fn(a);
|
||
} finally {
|
||
isUnbatchingUpdates = false;
|
||
}
|
||
}
|
||
return fn(a);
|
||
}
|
||
|
||
// TODO: Batching should be implemented at the renderer level, not within
|
||
// the reconciler.
|
||
function flushSync(fn, a) {
|
||
!!isRendering ? invariant(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0;
|
||
var previousIsBatchingUpdates = isBatchingUpdates;
|
||
isBatchingUpdates = true;
|
||
try {
|
||
return syncUpdates(fn, a);
|
||
} finally {
|
||
isBatchingUpdates = previousIsBatchingUpdates;
|
||
performSyncWork();
|
||
}
|
||
}
|
||
|
||
function interactiveUpdates$1(fn, a, b) {
|
||
if (isBatchingInteractiveUpdates) {
|
||
return fn(a, b);
|
||
}
|
||
// If there are any pending interactive updates, synchronously flush them.
|
||
// This needs to happen before we read any handlers, because the effect of
|
||
// the previous event may influence which handlers are called during
|
||
// this event.
|
||
if (!isBatchingUpdates && !isRendering && lowestPriorityPendingInteractiveExpirationTime !== NoWork) {
|
||
// Synchronously flush pending interactive updates.
|
||
performWork(lowestPriorityPendingInteractiveExpirationTime, false);
|
||
lowestPriorityPendingInteractiveExpirationTime = NoWork;
|
||
}
|
||
var previousIsBatchingInteractiveUpdates = isBatchingInteractiveUpdates;
|
||
var previousIsBatchingUpdates = isBatchingUpdates;
|
||
isBatchingInteractiveUpdates = true;
|
||
isBatchingUpdates = true;
|
||
try {
|
||
return fn(a, b);
|
||
} finally {
|
||
isBatchingInteractiveUpdates = previousIsBatchingInteractiveUpdates;
|
||
isBatchingUpdates = previousIsBatchingUpdates;
|
||
if (!isBatchingUpdates && !isRendering) {
|
||
performSyncWork();
|
||
}
|
||
}
|
||
}
|
||
|
||
function flushInteractiveUpdates$1() {
|
||
if (!isRendering && lowestPriorityPendingInteractiveExpirationTime !== NoWork) {
|
||
// Synchronously flush pending interactive updates.
|
||
performWork(lowestPriorityPendingInteractiveExpirationTime, false);
|
||
lowestPriorityPendingInteractiveExpirationTime = NoWork;
|
||
}
|
||
}
|
||
|
||
function flushControlled(fn) {
|
||
var previousIsBatchingUpdates = isBatchingUpdates;
|
||
isBatchingUpdates = true;
|
||
try {
|
||
syncUpdates(fn);
|
||
} finally {
|
||
isBatchingUpdates = previousIsBatchingUpdates;
|
||
if (!isBatchingUpdates && !isRendering) {
|
||
performSyncWork();
|
||
}
|
||
}
|
||
}
|
||
|
||
// 0 is PROD, 1 is DEV.
|
||
// Might add PROFILE later.
|
||
|
||
|
||
var didWarnAboutNestedUpdates = void 0;
|
||
var didWarnAboutFindNodeInStrictMode = void 0;
|
||
|
||
{
|
||
didWarnAboutNestedUpdates = false;
|
||
didWarnAboutFindNodeInStrictMode = {};
|
||
}
|
||
|
||
function getContextForSubtree(parentComponent) {
|
||
if (!parentComponent) {
|
||
return emptyContextObject;
|
||
}
|
||
|
||
var fiber = get(parentComponent);
|
||
var parentContext = findCurrentUnmaskedContext(fiber);
|
||
|
||
if (fiber.tag === ClassComponent) {
|
||
var Component = fiber.type;
|
||
if (isContextProvider(Component)) {
|
||
return processChildContext(fiber, Component, parentContext);
|
||
}
|
||
}
|
||
|
||
return parentContext;
|
||
}
|
||
|
||
function scheduleRootUpdate(current$$1, element, expirationTime, callback) {
|
||
{
|
||
if (phase === 'render' && current !== null && !didWarnAboutNestedUpdates) {
|
||
didWarnAboutNestedUpdates = true;
|
||
warningWithoutStack$1(false, 'Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');
|
||
}
|
||
}
|
||
|
||
var update = createUpdate(expirationTime);
|
||
// Caution: React DevTools currently depends on this property
|
||
// being called "element".
|
||
update.payload = { element: element };
|
||
|
||
callback = callback === undefined ? null : callback;
|
||
if (callback !== null) {
|
||
!(typeof callback === 'function') ? warningWithoutStack$1(false, 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback) : void 0;
|
||
update.callback = callback;
|
||
}
|
||
|
||
flushPassiveEffects();
|
||
enqueueUpdate(current$$1, update);
|
||
scheduleWork(current$$1, expirationTime);
|
||
|
||
return expirationTime;
|
||
}
|
||
|
||
function updateContainerAtExpirationTime(element, container, parentComponent, expirationTime, callback) {
|
||
// TODO: If this is a nested container, this won't be the root.
|
||
var current$$1 = container.current;
|
||
|
||
{
|
||
if (ReactFiberInstrumentation_1.debugTool) {
|
||
if (current$$1.alternate === null) {
|
||
ReactFiberInstrumentation_1.debugTool.onMountContainer(container);
|
||
} else if (element === null) {
|
||
ReactFiberInstrumentation_1.debugTool.onUnmountContainer(container);
|
||
} else {
|
||
ReactFiberInstrumentation_1.debugTool.onUpdateContainer(container);
|
||
}
|
||
}
|
||
}
|
||
|
||
var context = getContextForSubtree(parentComponent);
|
||
if (container.context === null) {
|
||
container.context = context;
|
||
} else {
|
||
container.pendingContext = context;
|
||
}
|
||
|
||
return scheduleRootUpdate(current$$1, element, expirationTime, callback);
|
||
}
|
||
|
||
function findHostInstance(component) {
|
||
var fiber = get(component);
|
||
if (fiber === undefined) {
|
||
if (typeof component.render === 'function') {
|
||
invariant(false, 'Unable to find node on an unmounted component.');
|
||
} else {
|
||
invariant(false, 'Argument appears to not be a ReactComponent. Keys: %s', Object.keys(component));
|
||
}
|
||
}
|
||
var hostFiber = findCurrentHostFiber(fiber);
|
||
if (hostFiber === null) {
|
||
return null;
|
||
}
|
||
return hostFiber.stateNode;
|
||
}
|
||
|
||
function findHostInstanceWithWarning(component, methodName) {
|
||
{
|
||
var fiber = get(component);
|
||
if (fiber === undefined) {
|
||
if (typeof component.render === 'function') {
|
||
invariant(false, 'Unable to find node on an unmounted component.');
|
||
} else {
|
||
invariant(false, 'Argument appears to not be a ReactComponent. Keys: %s', Object.keys(component));
|
||
}
|
||
}
|
||
var hostFiber = findCurrentHostFiber(fiber);
|
||
if (hostFiber === null) {
|
||
return null;
|
||
}
|
||
if (hostFiber.mode & StrictMode) {
|
||
var componentName = getComponentName(fiber.type) || 'Component';
|
||
if (!didWarnAboutFindNodeInStrictMode[componentName]) {
|
||
didWarnAboutFindNodeInStrictMode[componentName] = true;
|
||
if (fiber.mode & StrictMode) {
|
||
warningWithoutStack$1(false, '%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference.' + '\n%s' + '\n\nLearn more about using refs safely here:' + '\nhttps://fb.me/react-strict-mode-find-node', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
|
||
} else {
|
||
warningWithoutStack$1(false, '%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference.' + '\n%s' + '\n\nLearn more about using refs safely here:' + '\nhttps://fb.me/react-strict-mode-find-node', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
|
||
}
|
||
}
|
||
}
|
||
return hostFiber.stateNode;
|
||
}
|
||
return findHostInstance(component);
|
||
}
|
||
|
||
function createContainer(containerInfo, isConcurrent, hydrate) {
|
||
return createFiberRoot(containerInfo, isConcurrent, hydrate);
|
||
}
|
||
|
||
function updateContainer(element, container, parentComponent, callback) {
|
||
var current$$1 = container.current;
|
||
var currentTime = requestCurrentTime();
|
||
var expirationTime = computeExpirationForFiber(currentTime, current$$1);
|
||
return updateContainerAtExpirationTime(element, container, parentComponent, expirationTime, callback);
|
||
}
|
||
|
||
function getPublicRootInstance(container) {
|
||
var containerFiber = container.current;
|
||
if (!containerFiber.child) {
|
||
return null;
|
||
}
|
||
switch (containerFiber.child.tag) {
|
||
case HostComponent:
|
||
return getPublicInstance(containerFiber.child.stateNode);
|
||
default:
|
||
return containerFiber.child.stateNode;
|
||
}
|
||
}
|
||
|
||
function findHostInstanceWithNoPortals(fiber) {
|
||
var hostFiber = findCurrentHostFiberWithNoPortals(fiber);
|
||
if (hostFiber === null) {
|
||
return null;
|
||
}
|
||
return hostFiber.stateNode;
|
||
}
|
||
|
||
var overrideProps = null;
|
||
|
||
{
|
||
var copyWithSetImpl = function (obj, path, idx, value) {
|
||
if (idx >= path.length) {
|
||
return value;
|
||
}
|
||
var key = path[idx];
|
||
var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);
|
||
// $FlowFixMe number or string is fine here
|
||
updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value);
|
||
return updated;
|
||
};
|
||
|
||
var copyWithSet = function (obj, path, value) {
|
||
return copyWithSetImpl(obj, path, 0, value);
|
||
};
|
||
|
||
// Support DevTools props for function components, forwardRef, memo, host components, etc.
|
||
overrideProps = function (fiber, path, value) {
|
||
flushPassiveEffects();
|
||
fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);
|
||
if (fiber.alternate) {
|
||
fiber.alternate.pendingProps = fiber.pendingProps;
|
||
}
|
||
scheduleWork(fiber, Sync);
|
||
};
|
||
}
|
||
|
||
function injectIntoDevTools(devToolsConfig) {
|
||
var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
|
||
|
||
return injectInternals(_assign({}, devToolsConfig, {
|
||
overrideProps: overrideProps,
|
||
findHostInstanceByFiber: function (fiber) {
|
||
var hostFiber = findCurrentHostFiber(fiber);
|
||
if (hostFiber === null) {
|
||
return null;
|
||
}
|
||
return hostFiber.stateNode;
|
||
},
|
||
findFiberByHostInstance: function (instance) {
|
||
if (!findFiberByHostInstance) {
|
||
// Might not be implemented by the renderer.
|
||
return null;
|
||
}
|
||
return findFiberByHostInstance(instance);
|
||
}
|
||
}));
|
||
}
|
||
|
||
// This file intentionally does *not* have the Flow annotation.
|
||
// Don't add it. See `./inline-typed.js` for an explanation.
|
||
|
||
function createPortal$1(children, containerInfo,
|
||
// TODO: figure out the API for cross-renderer implementation.
|
||
implementation) {
|
||
var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
||
|
||
return {
|
||
// This tag allow us to uniquely identify this as a React Portal
|
||
$$typeof: REACT_PORTAL_TYPE,
|
||
key: key == null ? null : '' + key,
|
||
children: children,
|
||
containerInfo: containerInfo,
|
||
implementation: implementation
|
||
};
|
||
}
|
||
|
||
// TODO: this is special because it gets imported during build.
|
||
|
||
var ReactVersion = '16.7.0';
|
||
|
||
// TODO: This type is shared between the reconciler and ReactDOM, but will
|
||
// eventually be lifted out to the renderer.
|
||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
||
|
||
var topLevelUpdateWarnings = void 0;
|
||
var warnOnInvalidCallback = void 0;
|
||
var didWarnAboutUnstableCreatePortal = false;
|
||
|
||
{
|
||
if (typeof Map !== 'function' ||
|
||
// $FlowIssue Flow incorrectly thinks Map has no prototype
|
||
Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' ||
|
||
// $FlowIssue Flow incorrectly thinks Set has no prototype
|
||
Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
|
||
warningWithoutStack$1(false, 'React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
|
||
}
|
||
|
||
topLevelUpdateWarnings = function (container) {
|
||
if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {
|
||
var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);
|
||
if (hostInstance) {
|
||
!(hostInstance.parentNode === container) ? warningWithoutStack$1(false, 'render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.') : void 0;
|
||
}
|
||
}
|
||
|
||
var isRootRenderedBySomeReact = !!container._reactRootContainer;
|
||
var rootEl = getReactRootElementInContainer(container);
|
||
var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl));
|
||
|
||
!(!hasNonRootReactChild || isRootRenderedBySomeReact) ? warningWithoutStack$1(false, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0;
|
||
|
||
!(container.nodeType !== ELEMENT_NODE || !container.tagName || container.tagName.toUpperCase() !== 'BODY') ? warningWithoutStack$1(false, 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;
|
||
};
|
||
|
||
warnOnInvalidCallback = function (callback, callerName) {
|
||
!(callback === null || typeof callback === 'function') ? warningWithoutStack$1(false, '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback) : void 0;
|
||
};
|
||
}
|
||
|
||
setRestoreImplementation(restoreControlledState$1);
|
||
|
||
function ReactBatch(root) {
|
||
var expirationTime = computeUniqueAsyncExpiration();
|
||
this._expirationTime = expirationTime;
|
||
this._root = root;
|
||
this._next = null;
|
||
this._callbacks = null;
|
||
this._didComplete = false;
|
||
this._hasChildren = false;
|
||
this._children = null;
|
||
this._defer = true;
|
||
}
|
||
ReactBatch.prototype.render = function (children) {
|
||
!this._defer ? invariant(false, 'batch.render: Cannot render a batch that already committed.') : void 0;
|
||
this._hasChildren = true;
|
||
this._children = children;
|
||
var internalRoot = this._root._internalRoot;
|
||
var expirationTime = this._expirationTime;
|
||
var work = new ReactWork();
|
||
updateContainerAtExpirationTime(children, internalRoot, null, expirationTime, work._onCommit);
|
||
return work;
|
||
};
|
||
ReactBatch.prototype.then = function (onComplete) {
|
||
if (this._didComplete) {
|
||
onComplete();
|
||
return;
|
||
}
|
||
var callbacks = this._callbacks;
|
||
if (callbacks === null) {
|
||
callbacks = this._callbacks = [];
|
||
}
|
||
callbacks.push(onComplete);
|
||
};
|
||
ReactBatch.prototype.commit = function () {
|
||
var internalRoot = this._root._internalRoot;
|
||
var firstBatch = internalRoot.firstBatch;
|
||
!(this._defer && firstBatch !== null) ? invariant(false, 'batch.commit: Cannot commit a batch multiple times.') : void 0;
|
||
|
||
if (!this._hasChildren) {
|
||
// This batch is empty. Return.
|
||
this._next = null;
|
||
this._defer = false;
|
||
return;
|
||
}
|
||
|
||
var expirationTime = this._expirationTime;
|
||
|
||
// Ensure this is the first batch in the list.
|
||
if (firstBatch !== this) {
|
||
// This batch is not the earliest batch. We need to move it to the front.
|
||
// Update its expiration time to be the expiration time of the earliest
|
||
// batch, so that we can flush it without flushing the other batches.
|
||
if (this._hasChildren) {
|
||
expirationTime = this._expirationTime = firstBatch._expirationTime;
|
||
// Rendering this batch again ensures its children will be the final state
|
||
// when we flush (updates are processed in insertion order: last
|
||
// update wins).
|
||
// TODO: This forces a restart. Should we print a warning?
|
||
this.render(this._children);
|
||
}
|
||
|
||
// Remove the batch from the list.
|
||
var previous = null;
|
||
var batch = firstBatch;
|
||
while (batch !== this) {
|
||
previous = batch;
|
||
batch = batch._next;
|
||
}
|
||
!(previous !== null) ? invariant(false, 'batch.commit: Cannot commit a batch multiple times.') : void 0;
|
||
previous._next = batch._next;
|
||
|
||
// Add it to the front.
|
||
this._next = firstBatch;
|
||
firstBatch = internalRoot.firstBatch = this;
|
||
}
|
||
|
||
// Synchronously flush all the work up to this batch's expiration time.
|
||
this._defer = false;
|
||
flushRoot(internalRoot, expirationTime);
|
||
|
||
// Pop the batch from the list.
|
||
var next = this._next;
|
||
this._next = null;
|
||
firstBatch = internalRoot.firstBatch = next;
|
||
|
||
// Append the next earliest batch's children to the update queue.
|
||
if (firstBatch !== null && firstBatch._hasChildren) {
|
||
firstBatch.render(firstBatch._children);
|
||
}
|
||
};
|
||
ReactBatch.prototype._onComplete = function () {
|
||
if (this._didComplete) {
|
||
return;
|
||
}
|
||
this._didComplete = true;
|
||
var callbacks = this._callbacks;
|
||
if (callbacks === null) {
|
||
return;
|
||
}
|
||
// TODO: Error handling.
|
||
for (var i = 0; i < callbacks.length; i++) {
|
||
var _callback = callbacks[i];
|
||
_callback();
|
||
}
|
||
};
|
||
|
||
function ReactWork() {
|
||
this._callbacks = null;
|
||
this._didCommit = false;
|
||
// TODO: Avoid need to bind by replacing callbacks in the update queue with
|
||
// list of Work objects.
|
||
this._onCommit = this._onCommit.bind(this);
|
||
}
|
||
ReactWork.prototype.then = function (onCommit) {
|
||
if (this._didCommit) {
|
||
onCommit();
|
||
return;
|
||
}
|
||
var callbacks = this._callbacks;
|
||
if (callbacks === null) {
|
||
callbacks = this._callbacks = [];
|
||
}
|
||
callbacks.push(onCommit);
|
||
};
|
||
ReactWork.prototype._onCommit = function () {
|
||
if (this._didCommit) {
|
||
return;
|
||
}
|
||
this._didCommit = true;
|
||
var callbacks = this._callbacks;
|
||
if (callbacks === null) {
|
||
return;
|
||
}
|
||
// TODO: Error handling.
|
||
for (var i = 0; i < callbacks.length; i++) {
|
||
var _callback2 = callbacks[i];
|
||
!(typeof _callback2 === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback2) : void 0;
|
||
_callback2();
|
||
}
|
||
};
|
||
|
||
function ReactRoot(container, isConcurrent, hydrate) {
|
||
var root = createContainer(container, isConcurrent, hydrate);
|
||
this._internalRoot = root;
|
||
}
|
||
ReactRoot.prototype.render = function (children, callback) {
|
||
var root = this._internalRoot;
|
||
var work = new ReactWork();
|
||
callback = callback === undefined ? null : callback;
|
||
{
|
||
warnOnInvalidCallback(callback, 'render');
|
||
}
|
||
if (callback !== null) {
|
||
work.then(callback);
|
||
}
|
||
updateContainer(children, root, null, work._onCommit);
|
||
return work;
|
||
};
|
||
ReactRoot.prototype.unmount = function (callback) {
|
||
var root = this._internalRoot;
|
||
var work = new ReactWork();
|
||
callback = callback === undefined ? null : callback;
|
||
{
|
||
warnOnInvalidCallback(callback, 'render');
|
||
}
|
||
if (callback !== null) {
|
||
work.then(callback);
|
||
}
|
||
updateContainer(null, root, null, work._onCommit);
|
||
return work;
|
||
};
|
||
ReactRoot.prototype.legacy_renderSubtreeIntoContainer = function (parentComponent, children, callback) {
|
||
var root = this._internalRoot;
|
||
var work = new ReactWork();
|
||
callback = callback === undefined ? null : callback;
|
||
{
|
||
warnOnInvalidCallback(callback, 'render');
|
||
}
|
||
if (callback !== null) {
|
||
work.then(callback);
|
||
}
|
||
updateContainer(children, root, parentComponent, work._onCommit);
|
||
return work;
|
||
};
|
||
ReactRoot.prototype.createBatch = function () {
|
||
var batch = new ReactBatch(this);
|
||
var expirationTime = batch._expirationTime;
|
||
|
||
var internalRoot = this._internalRoot;
|
||
var firstBatch = internalRoot.firstBatch;
|
||
if (firstBatch === null) {
|
||
internalRoot.firstBatch = batch;
|
||
batch._next = null;
|
||
} else {
|
||
// Insert sorted by expiration time then insertion order
|
||
var insertAfter = null;
|
||
var insertBefore = firstBatch;
|
||
while (insertBefore !== null && insertBefore._expirationTime >= expirationTime) {
|
||
insertAfter = insertBefore;
|
||
insertBefore = insertBefore._next;
|
||
}
|
||
batch._next = insertBefore;
|
||
if (insertAfter !== null) {
|
||
insertAfter._next = batch;
|
||
}
|
||
}
|
||
|
||
return batch;
|
||
};
|
||
|
||
/**
|
||
* True if the supplied DOM node is a valid node element.
|
||
*
|
||
* @param {?DOMElement} node The candidate DOM node.
|
||
* @return {boolean} True if the DOM is a valid DOM node.
|
||
* @internal
|
||
*/
|
||
function isValidContainer(node) {
|
||
return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));
|
||
}
|
||
|
||
function getReactRootElementInContainer(container) {
|
||
if (!container) {
|
||
return null;
|
||
}
|
||
|
||
if (container.nodeType === DOCUMENT_NODE) {
|
||
return container.documentElement;
|
||
} else {
|
||
return container.firstChild;
|
||
}
|
||
}
|
||
|
||
function shouldHydrateDueToLegacyHeuristic(container) {
|
||
var rootElement = getReactRootElementInContainer(container);
|
||
return !!(rootElement && rootElement.nodeType === ELEMENT_NODE && rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME));
|
||
}
|
||
|
||
setBatchingImplementation(batchedUpdates$1, interactiveUpdates$1, flushInteractiveUpdates$1);
|
||
|
||
var warnedAboutHydrateAPI = false;
|
||
|
||
function legacyCreateRootFromDOMContainer(container, forceHydrate) {
|
||
var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container);
|
||
// First clear any existing content.
|
||
if (!shouldHydrate) {
|
||
var warned = false;
|
||
var rootSibling = void 0;
|
||
while (rootSibling = container.lastChild) {
|
||
{
|
||
if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) {
|
||
warned = true;
|
||
warningWithoutStack$1(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.');
|
||
}
|
||
}
|
||
container.removeChild(rootSibling);
|
||
}
|
||
}
|
||
{
|
||
if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {
|
||
warnedAboutHydrateAPI = true;
|
||
lowPriorityWarning$1(false, 'render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v17. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');
|
||
}
|
||
}
|
||
// Legacy roots are not async by default.
|
||
var isConcurrent = false;
|
||
return new ReactRoot(container, isConcurrent, shouldHydrate);
|
||
}
|
||
|
||
function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {
|
||
// TODO: Ensure all entry points contain this check
|
||
!isValidContainer(container) ? invariant(false, 'Target container is not a DOM element.') : void 0;
|
||
|
||
{
|
||
topLevelUpdateWarnings(container);
|
||
}
|
||
|
||
// TODO: Without `any` type, Flow says "Property cannot be accessed on any
|
||
// member of intersection type." Whyyyyyy.
|
||
var root = container._reactRootContainer;
|
||
if (!root) {
|
||
// Initial mount
|
||
root = container._reactRootContainer = legacyCreateRootFromDOMContainer(container, forceHydrate);
|
||
if (typeof callback === 'function') {
|
||
var originalCallback = callback;
|
||
callback = function () {
|
||
var instance = getPublicRootInstance(root._internalRoot);
|
||
originalCallback.call(instance);
|
||
};
|
||
}
|
||
// Initial mount should not be batched.
|
||
unbatchedUpdates(function () {
|
||
if (parentComponent != null) {
|
||
root.legacy_renderSubtreeIntoContainer(parentComponent, children, callback);
|
||
} else {
|
||
root.render(children, callback);
|
||
}
|
||
});
|
||
} else {
|
||
if (typeof callback === 'function') {
|
||
var _originalCallback = callback;
|
||
callback = function () {
|
||
var instance = getPublicRootInstance(root._internalRoot);
|
||
_originalCallback.call(instance);
|
||
};
|
||
}
|
||
// Update
|
||
if (parentComponent != null) {
|
||
root.legacy_renderSubtreeIntoContainer(parentComponent, children, callback);
|
||
} else {
|
||
root.render(children, callback);
|
||
}
|
||
}
|
||
return getPublicRootInstance(root._internalRoot);
|
||
}
|
||
|
||
function createPortal$$1(children, container) {
|
||
var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
||
|
||
!isValidContainer(container) ? invariant(false, 'Target container is not a DOM element.') : void 0;
|
||
// TODO: pass ReactDOM portal implementation as third argument
|
||
return createPortal$1(children, container, null, key);
|
||
}
|
||
|
||
var ReactDOM = {
|
||
createPortal: createPortal$$1,
|
||
|
||
findDOMNode: function (componentOrElement) {
|
||
{
|
||
var owner = ReactCurrentOwner.current;
|
||
if (owner !== null && owner.stateNode !== null) {
|
||
var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;
|
||
!warnedAboutRefsInRender ? warningWithoutStack$1(false, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner.type) || 'A component') : void 0;
|
||
owner.stateNode._warnedAboutRefsInRender = true;
|
||
}
|
||
}
|
||
if (componentOrElement == null) {
|
||
return null;
|
||
}
|
||
if (componentOrElement.nodeType === ELEMENT_NODE) {
|
||
return componentOrElement;
|
||
}
|
||
{
|
||
return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');
|
||
}
|
||
return findHostInstance(componentOrElement);
|
||
},
|
||
hydrate: function (element, container, callback) {
|
||
// TODO: throw or warn if we couldn't hydrate?
|
||
return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);
|
||
},
|
||
render: function (element, container, callback) {
|
||
return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);
|
||
},
|
||
unstable_renderSubtreeIntoContainer: function (parentComponent, element, containerNode, callback) {
|
||
!(parentComponent != null && has(parentComponent)) ? invariant(false, 'parentComponent must be a valid React Component') : void 0;
|
||
return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);
|
||
},
|
||
unmountComponentAtNode: function (container) {
|
||
!isValidContainer(container) ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : void 0;
|
||
|
||
if (container._reactRootContainer) {
|
||
{
|
||
var rootEl = getReactRootElementInContainer(container);
|
||
var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl);
|
||
!!renderedByDifferentReact ? warningWithoutStack$1(false, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.') : void 0;
|
||
}
|
||
|
||
// Unmount should not be batched.
|
||
unbatchedUpdates(function () {
|
||
legacyRenderSubtreeIntoContainer(null, null, container, false, function () {
|
||
container._reactRootContainer = null;
|
||
});
|
||
});
|
||
// If you call unmountComponentAtNode twice in quick succession, you'll
|
||
// get `true` twice. That's probably fine?
|
||
return true;
|
||
} else {
|
||
{
|
||
var _rootEl = getReactRootElementInContainer(container);
|
||
var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode$1(_rootEl));
|
||
|
||
// Check if the container itself is a React root node.
|
||
var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;
|
||
|
||
!!hasNonRootReactChild ? warningWithoutStack$1(false, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;
|
||
}
|
||
|
||
return false;
|
||
}
|
||
},
|
||
|
||
|
||
// Temporary alias since we already shipped React 16 RC with it.
|
||
// TODO: remove in React 17.
|
||
unstable_createPortal: function () {
|
||
if (!didWarnAboutUnstableCreatePortal) {
|
||
didWarnAboutUnstableCreatePortal = true;
|
||
lowPriorityWarning$1(false, 'The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
|
||
}
|
||
return createPortal$$1.apply(undefined, arguments);
|
||
},
|
||
|
||
|
||
unstable_batchedUpdates: batchedUpdates$1,
|
||
|
||
unstable_interactiveUpdates: interactiveUpdates$1,
|
||
|
||
flushSync: flushSync,
|
||
|
||
unstable_createRoot: createRoot,
|
||
unstable_flushControlled: flushControlled,
|
||
|
||
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
|
||
// Keep in sync with ReactDOMUnstableNativeDependencies.js
|
||
// and ReactTestUtils.js. This is an array for better minification.
|
||
Events: [getInstanceFromNode$1, getNodeFromInstance$1, getFiberCurrentPropsFromNode$1, injection.injectEventPluginsByName, eventNameDispatchConfigs, accumulateTwoPhaseDispatches, accumulateDirectDispatches, enqueueStateRestore, restoreStateIfNeeded, dispatchEvent, runEventsInBatch]
|
||
}
|
||
};
|
||
|
||
function createRoot(container, options) {
|
||
var functionName = enableStableConcurrentModeAPIs ? 'createRoot' : 'unstable_createRoot';
|
||
!isValidContainer(container) ? invariant(false, '%s(...): Target container is not a DOM element.', functionName) : void 0;
|
||
var hydrate = options != null && options.hydrate === true;
|
||
return new ReactRoot(container, true, hydrate);
|
||
}
|
||
|
||
if (enableStableConcurrentModeAPIs) {
|
||
ReactDOM.createRoot = createRoot;
|
||
ReactDOM.unstable_createRoot = undefined;
|
||
}
|
||
|
||
var foundDevTools = injectIntoDevTools({
|
||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||
bundleType: 1,
|
||
version: ReactVersion,
|
||
rendererPackageName: 'react-dom'
|
||
});
|
||
|
||
{
|
||
if (!foundDevTools && canUseDOM && window.top === window.self) {
|
||
// If we're in Chrome or Firefox, provide a download link if not installed.
|
||
if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
|
||
var protocol = window.location.protocol;
|
||
// Don't warn in exotic cases like chrome-extension://.
|
||
if (/^(https?|file):$/.test(protocol)) {
|
||
console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://fb.me/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://fb.me/react-devtools-faq' : ''), 'font-weight:bold');
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
|
||
var ReactDOM$2 = Object.freeze({
|
||
default: ReactDOM
|
||
});
|
||
|
||
var ReactDOM$3 = ( ReactDOM$2 && ReactDOM ) || ReactDOM$2;
|
||
|
||
// TODO: decide on the top-level export form.
|
||
// This is hacky but makes it work with both Rollup and Jest.
|
||
var reactDom = ReactDOM$3.default || ReactDOM$3;
|
||
|
||
module.exports = reactDom;
|
||
})();
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-dom/index.js":
|
||
/*!*****************************************!*\
|
||
!*** ./node_modules/react-dom/index.js ***!
|
||
\*****************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
function checkDCE() {
|
||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||
if (
|
||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
|
||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
|
||
) {
|
||
return;
|
||
}
|
||
if (true) {
|
||
// This branch is unreachable because this function is only called
|
||
// in production, but the condition is true only in development.
|
||
// Therefore if the branch is still here, dead code elimination wasn't
|
||
// properly applied.
|
||
// Don't change the message. React DevTools relies on it. Also make sure
|
||
// this message doesn't occur elsewhere in this function, or it will cause
|
||
// a false positive.
|
||
throw new Error('^_^');
|
||
}
|
||
try {
|
||
// Verify that the code above has been dead code eliminated (DCE'd).
|
||
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
|
||
} catch (err) {
|
||
// DevTools shouldn't crash React, no matter what.
|
||
// We should still report in case we break this code.
|
||
console.error(err);
|
||
}
|
||
}
|
||
|
||
if (false) {} else {
|
||
module.exports = __webpack_require__(/*! ./cjs/react-dom.development.js */ "./node_modules/react-dom/cjs/react-dom.development.js");
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-is/cjs/react-is.development.js":
|
||
/*!***********************************************************!*\
|
||
!*** ./node_modules/react-is/cjs/react-is.development.js ***!
|
||
\***********************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/** @license React v16.7.0
|
||
* react-is.development.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
if (true) {
|
||
(function() {
|
||
'use strict';
|
||
|
||
Object.defineProperty(exports, '__esModule', { value: true });
|
||
|
||
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
||
// nor polyfill, then a plain number is used for performance.
|
||
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
||
|
||
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
||
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
||
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
||
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
||
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
||
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
||
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
|
||
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
||
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
||
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
||
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
||
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
||
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
||
|
||
function isValidElementType(type) {
|
||
return typeof type === 'string' || typeof type === 'function' ||
|
||
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
||
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
|
||
}
|
||
|
||
/**
|
||
* Forked from fbjs/warning:
|
||
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
||
*
|
||
* Only change is we use console.warn instead of console.error,
|
||
* and do nothing when 'console' is not supported.
|
||
* This really simplifies the code.
|
||
* ---
|
||
* Similar to invariant but only logs a warning if the condition is not met.
|
||
* This can be used to log issues in development environments in critical
|
||
* paths. Removing the logging code for production environments will keep the
|
||
* same logic and follow the same code paths.
|
||
*/
|
||
|
||
var lowPriorityWarning = function () {};
|
||
|
||
{
|
||
var printWarning = function (format) {
|
||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||
args[_key - 1] = arguments[_key];
|
||
}
|
||
|
||
var argIndex = 0;
|
||
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
||
return args[argIndex++];
|
||
});
|
||
if (typeof console !== 'undefined') {
|
||
console.warn(message);
|
||
}
|
||
try {
|
||
// --- Welcome to debugging React ---
|
||
// This error was thrown as a convenience so that you can use this stack
|
||
// to find the callsite that caused this warning to fire.
|
||
throw new Error(message);
|
||
} catch (x) {}
|
||
};
|
||
|
||
lowPriorityWarning = function (condition, format) {
|
||
if (format === undefined) {
|
||
throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
|
||
}
|
||
if (!condition) {
|
||
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
||
args[_key2 - 2] = arguments[_key2];
|
||
}
|
||
|
||
printWarning.apply(undefined, [format].concat(args));
|
||
}
|
||
};
|
||
}
|
||
|
||
var lowPriorityWarning$1 = lowPriorityWarning;
|
||
|
||
function typeOf(object) {
|
||
if (typeof object === 'object' && object !== null) {
|
||
var $$typeof = object.$$typeof;
|
||
switch ($$typeof) {
|
||
case REACT_ELEMENT_TYPE:
|
||
var type = object.type;
|
||
|
||
switch (type) {
|
||
case REACT_ASYNC_MODE_TYPE:
|
||
case REACT_CONCURRENT_MODE_TYPE:
|
||
case REACT_FRAGMENT_TYPE:
|
||
case REACT_PROFILER_TYPE:
|
||
case REACT_STRICT_MODE_TYPE:
|
||
case REACT_SUSPENSE_TYPE:
|
||
return type;
|
||
default:
|
||
var $$typeofType = type && type.$$typeof;
|
||
|
||
switch ($$typeofType) {
|
||
case REACT_CONTEXT_TYPE:
|
||
case REACT_FORWARD_REF_TYPE:
|
||
case REACT_PROVIDER_TYPE:
|
||
return $$typeofType;
|
||
default:
|
||
return $$typeof;
|
||
}
|
||
}
|
||
case REACT_LAZY_TYPE:
|
||
case REACT_MEMO_TYPE:
|
||
case REACT_PORTAL_TYPE:
|
||
return $$typeof;
|
||
}
|
||
}
|
||
|
||
return undefined;
|
||
}
|
||
|
||
// AsyncMode is deprecated along with isAsyncMode
|
||
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
||
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
||
var ContextConsumer = REACT_CONTEXT_TYPE;
|
||
var ContextProvider = REACT_PROVIDER_TYPE;
|
||
var Element = REACT_ELEMENT_TYPE;
|
||
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
||
var Fragment = REACT_FRAGMENT_TYPE;
|
||
var Lazy = REACT_LAZY_TYPE;
|
||
var Memo = REACT_MEMO_TYPE;
|
||
var Portal = REACT_PORTAL_TYPE;
|
||
var Profiler = REACT_PROFILER_TYPE;
|
||
var StrictMode = REACT_STRICT_MODE_TYPE;
|
||
var Suspense = REACT_SUSPENSE_TYPE;
|
||
|
||
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
||
|
||
// AsyncMode should be deprecated
|
||
function isAsyncMode(object) {
|
||
{
|
||
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
||
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
||
lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
||
}
|
||
}
|
||
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
||
}
|
||
function isConcurrentMode(object) {
|
||
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
||
}
|
||
function isContextConsumer(object) {
|
||
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||
}
|
||
function isContextProvider(object) {
|
||
return typeOf(object) === REACT_PROVIDER_TYPE;
|
||
}
|
||
function isElement(object) {
|
||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
||
}
|
||
function isForwardRef(object) {
|
||
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
||
}
|
||
function isFragment(object) {
|
||
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
||
}
|
||
function isLazy(object) {
|
||
return typeOf(object) === REACT_LAZY_TYPE;
|
||
}
|
||
function isMemo(object) {
|
||
return typeOf(object) === REACT_MEMO_TYPE;
|
||
}
|
||
function isPortal(object) {
|
||
return typeOf(object) === REACT_PORTAL_TYPE;
|
||
}
|
||
function isProfiler(object) {
|
||
return typeOf(object) === REACT_PROFILER_TYPE;
|
||
}
|
||
function isStrictMode(object) {
|
||
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
||
}
|
||
function isSuspense(object) {
|
||
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
||
}
|
||
|
||
exports.typeOf = typeOf;
|
||
exports.AsyncMode = AsyncMode;
|
||
exports.ConcurrentMode = ConcurrentMode;
|
||
exports.ContextConsumer = ContextConsumer;
|
||
exports.ContextProvider = ContextProvider;
|
||
exports.Element = Element;
|
||
exports.ForwardRef = ForwardRef;
|
||
exports.Fragment = Fragment;
|
||
exports.Lazy = Lazy;
|
||
exports.Memo = Memo;
|
||
exports.Portal = Portal;
|
||
exports.Profiler = Profiler;
|
||
exports.StrictMode = StrictMode;
|
||
exports.Suspense = Suspense;
|
||
exports.isValidElementType = isValidElementType;
|
||
exports.isAsyncMode = isAsyncMode;
|
||
exports.isConcurrentMode = isConcurrentMode;
|
||
exports.isContextConsumer = isContextConsumer;
|
||
exports.isContextProvider = isContextProvider;
|
||
exports.isElement = isElement;
|
||
exports.isForwardRef = isForwardRef;
|
||
exports.isFragment = isFragment;
|
||
exports.isLazy = isLazy;
|
||
exports.isMemo = isMemo;
|
||
exports.isPortal = isPortal;
|
||
exports.isProfiler = isProfiler;
|
||
exports.isStrictMode = isStrictMode;
|
||
exports.isSuspense = isSuspense;
|
||
})();
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-is/index.js":
|
||
/*!****************************************!*\
|
||
!*** ./node_modules/react-is/index.js ***!
|
||
\****************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
if (false) {} else {
|
||
module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-measure/dist/index.esm.js":
|
||
/*!******************************************************!*\
|
||
!*** ./node_modules/react-measure/dist/index.esm.js ***!
|
||
\******************************************************/
|
||
/*! exports provided: default, withContentRect */
|
||
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/ts/app/components/PokemonExplorer/LeagueStatsList.tsx (referenced with cjs require), ./src/ts/app/components/PokemonSelectList/PokemonSelectList.tsx (referenced with cjs require) */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withContentRect", function() { return withContentRect; });
|
||
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
|
||
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");
|
||
/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");
|
||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
|
||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
||
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
|
||
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
|
||
/* harmony import */ var resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! resize-observer-polyfill */ "./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js");
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var types = ['client', 'offset', 'scroll', 'bounds', 'margin'];
|
||
function getTypes(props) {
|
||
var allowedTypes = [];
|
||
types.forEach(function (type) {
|
||
if (props[type]) {
|
||
allowedTypes.push(type);
|
||
}
|
||
});
|
||
return allowedTypes;
|
||
}
|
||
|
||
function getContentRect(node, types) {
|
||
var calculations = {};
|
||
|
||
if (types.indexOf('client') > -1) {
|
||
calculations.client = {
|
||
top: node.clientTop,
|
||
left: node.clientLeft,
|
||
width: node.clientWidth,
|
||
height: node.clientHeight
|
||
};
|
||
}
|
||
|
||
if (types.indexOf('offset') > -1) {
|
||
calculations.offset = {
|
||
top: node.offsetTop,
|
||
left: node.offsetLeft,
|
||
width: node.offsetWidth,
|
||
height: node.offsetHeight
|
||
};
|
||
}
|
||
|
||
if (types.indexOf('scroll') > -1) {
|
||
calculations.scroll = {
|
||
top: node.scrollTop,
|
||
left: node.scrollLeft,
|
||
width: node.scrollWidth,
|
||
height: node.scrollHeight
|
||
};
|
||
}
|
||
|
||
if (types.indexOf('bounds') > -1) {
|
||
var rect = node.getBoundingClientRect();
|
||
calculations.bounds = {
|
||
top: rect.top,
|
||
right: rect.right,
|
||
bottom: rect.bottom,
|
||
left: rect.left,
|
||
width: rect.width,
|
||
height: rect.height
|
||
};
|
||
}
|
||
|
||
if (types.indexOf('margin') > -1) {
|
||
var styles = getComputedStyle(node);
|
||
calculations.margin = {
|
||
top: styles ? parseInt(styles.marginTop) : 0,
|
||
right: styles ? parseInt(styles.marginRight) : 0,
|
||
bottom: styles ? parseInt(styles.marginBottom) : 0,
|
||
left: styles ? parseInt(styles.marginLeft) : 0
|
||
};
|
||
}
|
||
|
||
return calculations;
|
||
}
|
||
|
||
function withContentRect(types) {
|
||
return function (WrappedComponent) {
|
||
var _class, _temp;
|
||
|
||
return _temp = _class =
|
||
/*#__PURE__*/
|
||
function (_Component) {
|
||
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__["default"])(WithContentRect, _Component);
|
||
|
||
function WithContentRect() {
|
||
var _this;
|
||
|
||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
|
||
_this = _Component.call.apply(_Component, [this].concat(args)) || this;
|
||
_this.state = {
|
||
contentRect: {
|
||
entry: {},
|
||
client: {},
|
||
offset: {},
|
||
scroll: {},
|
||
bounds: {},
|
||
margin: {}
|
||
}
|
||
};
|
||
_this._animationFrameID = null;
|
||
_this._resizeObserver = new resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_5__["default"](function () {
|
||
_this.measure();
|
||
});
|
||
|
||
_this.measure = function (entries) {
|
||
var contentRect = getContentRect(_this._node, types || getTypes(_this.props));
|
||
|
||
if (entries) {
|
||
contentRect.entry = entries[0].contentRect;
|
||
}
|
||
|
||
_this._animationFrameID = window.requestAnimationFrame(function () {
|
||
if (_this._resizeObserver) {
|
||
_this.setState({
|
||
contentRect: contentRect
|
||
});
|
||
}
|
||
});
|
||
|
||
if (typeof _this.props.onResize === 'function') {
|
||
_this.props.onResize(contentRect);
|
||
}
|
||
};
|
||
|
||
_this._handleRef = function (node) {
|
||
if (_this._resizeObserver) {
|
||
if (node) {
|
||
_this._resizeObserver.observe(node);
|
||
} else {
|
||
_this._resizeObserver.unobserve(_this._node);
|
||
}
|
||
}
|
||
|
||
_this._node = node;
|
||
|
||
if (typeof _this.props.innerRef === 'function') {
|
||
_this.props.innerRef(node);
|
||
}
|
||
};
|
||
|
||
return _this;
|
||
}
|
||
|
||
var _proto = WithContentRect.prototype;
|
||
|
||
_proto.componentWillUnmount = function componentWillUnmount() {
|
||
if (this._resizeObserver) {
|
||
this._resizeObserver.disconnect();
|
||
|
||
this._resizeObserver = null;
|
||
}
|
||
|
||
window.cancelAnimationFrame(this._animationFrameID);
|
||
};
|
||
|
||
_proto.render = function render() {
|
||
var _this$props = this.props,
|
||
innerRef = _this$props.innerRef,
|
||
onResize = _this$props.onResize,
|
||
props = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_this$props, ["innerRef", "onResize"]);
|
||
|
||
return Object(react__WEBPACK_IMPORTED_MODULE_3__["createElement"])(WrappedComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, {
|
||
measureRef: this._handleRef,
|
||
measure: this.measure,
|
||
contentRect: this.state.contentRect
|
||
}));
|
||
};
|
||
|
||
return WithContentRect;
|
||
}(react__WEBPACK_IMPORTED_MODULE_3__["Component"]), _class.propTypes = {
|
||
client: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,
|
||
offset: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,
|
||
scroll: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,
|
||
bounds: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,
|
||
margin: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,
|
||
innerRef: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,
|
||
onResize: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func
|
||
}, _temp;
|
||
};
|
||
}
|
||
|
||
var Measure = withContentRect()(function (_ref) {
|
||
var measure = _ref.measure,
|
||
measureRef = _ref.measureRef,
|
||
contentRect = _ref.contentRect,
|
||
children = _ref.children;
|
||
return children({
|
||
measure: measure,
|
||
measureRef: measureRef,
|
||
contentRect: contentRect
|
||
});
|
||
});
|
||
Measure.displayName = 'Measure';
|
||
Measure.propTypes.children = prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func;
|
||
|
||
/* harmony default export */ __webpack_exports__["default"] = (Measure);
|
||
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-redux/es/index.js":
|
||
/*!***********************************************************!*\
|
||
!*** ./node_modules/react-redux/es/index.js + 14 modules ***!
|
||
\***********************************************************/
|
||
/*! exports provided: Provider, connectAdvanced, ReactReduxContext, connect */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js because of ./node_modules/react-window/dist/index.esm.js */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js because of ./node_modules/react-measure/dist/index.esm.js */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js because of ./node_modules/react-measure/dist/index.esm.js */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js because of ./node_modules/react-measure/dist/index.esm.js */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js (<- Module is not an ECMAScript module) */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/invariant/browser.js (<- Module is not an ECMAScript module) */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/prop-types/index.js (<- Module is not an ECMAScript module) */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-is/index.js (<- Module is not an ECMAScript module) */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/redux/es/redux.js (<- Module is referenced from these modules with unsupported syntax: ./src/ts/app/index.tsx (referenced with cjs require)) */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
||
var inheritsLoose = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");
|
||
|
||
// EXTERNAL MODULE: ./node_modules/react/index.js
|
||
var react = __webpack_require__("./node_modules/react/index.js");
|
||
var react_default = /*#__PURE__*/__webpack_require__.n(react);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/prop-types/index.js
|
||
var prop_types = __webpack_require__("./node_modules/prop-types/index.js");
|
||
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
||
|
||
// CONCATENATED MODULE: ./node_modules/react-redux/es/components/Context.js
|
||
|
||
var ReactReduxContext = react_default.a.createContext(null);
|
||
/* harmony default export */ var components_Context = (ReactReduxContext);
|
||
// CONCATENATED MODULE: ./node_modules/react-redux/es/components/Provider.js
|
||
|
||
|
||
|
||
|
||
|
||
var Provider_Provider =
|
||
/*#__PURE__*/
|
||
function (_Component) {
|
||
Object(inheritsLoose["default"])(Provider, _Component);
|
||
|
||
function Provider(props) {
|
||
var _this;
|
||
|
||
_this = _Component.call(this, props) || this;
|
||
var store = props.store;
|
||
_this.state = {
|
||
storeState: store.getState(),
|
||
store: store
|
||
};
|
||
return _this;
|
||
}
|
||
|
||
var _proto = Provider.prototype;
|
||
|
||
_proto.componentDidMount = function componentDidMount() {
|
||
this._isMounted = true;
|
||
this.subscribe();
|
||
};
|
||
|
||
_proto.componentWillUnmount = function componentWillUnmount() {
|
||
if (this.unsubscribe) this.unsubscribe();
|
||
this._isMounted = false;
|
||
};
|
||
|
||
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
||
if (this.props.store !== prevProps.store) {
|
||
if (this.unsubscribe) this.unsubscribe();
|
||
this.subscribe();
|
||
}
|
||
};
|
||
|
||
_proto.subscribe = function subscribe() {
|
||
var _this2 = this;
|
||
|
||
var store = this.props.store;
|
||
this.unsubscribe = store.subscribe(function () {
|
||
var newStoreState = store.getState();
|
||
|
||
if (!_this2._isMounted) {
|
||
return;
|
||
}
|
||
|
||
_this2.setState(function (providerState) {
|
||
// If the value is the same, skip the unnecessary state update.
|
||
if (providerState.storeState === newStoreState) {
|
||
return null;
|
||
}
|
||
|
||
return {
|
||
storeState: newStoreState
|
||
};
|
||
});
|
||
}); // Actions might have been dispatched between render and mount - handle those
|
||
|
||
var postMountStoreState = store.getState();
|
||
|
||
if (postMountStoreState !== this.state.storeState) {
|
||
this.setState({
|
||
storeState: postMountStoreState
|
||
});
|
||
}
|
||
};
|
||
|
||
_proto.render = function render() {
|
||
var Context = this.props.context || ReactReduxContext;
|
||
return react_default.a.createElement(Context.Provider, {
|
||
value: this.state
|
||
}, this.props.children);
|
||
};
|
||
|
||
return Provider;
|
||
}(react["Component"]);
|
||
|
||
Provider_Provider.propTypes = {
|
||
store: prop_types_default.a.shape({
|
||
subscribe: prop_types_default.a.func.isRequired,
|
||
dispatch: prop_types_default.a.func.isRequired,
|
||
getState: prop_types_default.a.func.isRequired
|
||
}),
|
||
context: prop_types_default.a.object,
|
||
children: prop_types_default.a.any
|
||
};
|
||
/* harmony default export */ var components_Provider = (Provider_Provider);
|
||
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
||
var assertThisInitialized = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
|
||
|
||
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||
var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
|
||
|
||
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
||
var objectWithoutPropertiesLoose = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");
|
||
|
||
// EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
|
||
var hoist_non_react_statics_cjs = __webpack_require__("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js");
|
||
var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/invariant/browser.js
|
||
var browser = __webpack_require__("./node_modules/invariant/browser.js");
|
||
var browser_default = /*#__PURE__*/__webpack_require__.n(browser);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/react-is/index.js
|
||
var react_is = __webpack_require__("./node_modules/react-is/index.js");
|
||
|
||
// CONCATENATED MODULE: ./node_modules/react-redux/es/components/connectAdvanced.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
function connectAdvanced(
|
||
/*
|
||
selectorFactory is a func that is responsible for returning the selector function used to
|
||
compute new props from state, props, and dispatch. For example:
|
||
export default connectAdvanced((dispatch, options) => (state, props) => ({
|
||
thing: state.things[props.thingId],
|
||
saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),
|
||
}))(YourComponent)
|
||
Access to dispatch is provided to the factory so selectorFactories can bind actionCreators
|
||
outside of their selector as an optimization. Options passed to connectAdvanced are passed to
|
||
the selectorFactory, along with displayName and WrappedComponent, as the second argument.
|
||
Note that selectorFactory is responsible for all caching/memoization of inbound and outbound
|
||
props. Do not use connectAdvanced directly without memoizing results between calls to your
|
||
selector, otherwise the Connect component will re-render on every state or props change.
|
||
*/
|
||
selectorFactory, // options object:
|
||
_ref) {
|
||
if (_ref === void 0) {
|
||
_ref = {};
|
||
}
|
||
|
||
var _ref2 = _ref,
|
||
_ref2$getDisplayName = _ref2.getDisplayName,
|
||
getDisplayName = _ref2$getDisplayName === void 0 ? function (name) {
|
||
return "ConnectAdvanced(" + name + ")";
|
||
} : _ref2$getDisplayName,
|
||
_ref2$methodName = _ref2.methodName,
|
||
methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName,
|
||
_ref2$renderCountProp = _ref2.renderCountProp,
|
||
renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp,
|
||
_ref2$shouldHandleSta = _ref2.shouldHandleStateChanges,
|
||
shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta,
|
||
_ref2$storeKey = _ref2.storeKey,
|
||
storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey,
|
||
_ref2$withRef = _ref2.withRef,
|
||
withRef = _ref2$withRef === void 0 ? false : _ref2$withRef,
|
||
_ref2$forwardRef = _ref2.forwardRef,
|
||
forwardRef = _ref2$forwardRef === void 0 ? false : _ref2$forwardRef,
|
||
_ref2$context = _ref2.context,
|
||
context = _ref2$context === void 0 ? ReactReduxContext : _ref2$context,
|
||
connectOptions = Object(objectWithoutPropertiesLoose["default"])(_ref2, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef", "forwardRef", "context"]);
|
||
|
||
browser_default()(renderCountProp === undefined, "renderCountProp is removed. render counting is built into the latest React dev tools profiling extension");
|
||
browser_default()(!withRef, 'withRef is removed. To access the wrapped instance, use a ref on the connected component');
|
||
var customStoreWarningMessage = 'To use a custom Redux store for specific components, create a custom React context with ' + "React.createContext(), and pass the context object to React-Redux's Provider and specific components" + ' like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. ' + 'You may also pass a {context : MyContext} option to connect';
|
||
browser_default()(storeKey === 'store', 'storeKey has been removed and does not do anything. ' + customStoreWarningMessage);
|
||
var Context = context;
|
||
return function wrapWithConnect(WrappedComponent) {
|
||
if (true) {
|
||
browser_default()(Object(react_is["isValidElementType"])(WrappedComponent), "You must pass a component to the function returned by " + (methodName + ". Instead received " + JSON.stringify(WrappedComponent)));
|
||
}
|
||
|
||
var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
||
var displayName = getDisplayName(wrappedComponentName);
|
||
|
||
var selectorFactoryOptions = Object(esm_extends["default"])({}, connectOptions, {
|
||
getDisplayName: getDisplayName,
|
||
methodName: methodName,
|
||
renderCountProp: renderCountProp,
|
||
shouldHandleStateChanges: shouldHandleStateChanges,
|
||
storeKey: storeKey,
|
||
displayName: displayName,
|
||
wrappedComponentName: wrappedComponentName,
|
||
WrappedComponent: WrappedComponent
|
||
});
|
||
|
||
var pure = connectOptions.pure;
|
||
var OuterBaseComponent = react["Component"];
|
||
var FinalWrappedComponent = WrappedComponent;
|
||
|
||
if (pure) {
|
||
OuterBaseComponent = react["PureComponent"];
|
||
}
|
||
|
||
function makeDerivedPropsSelector() {
|
||
var lastProps;
|
||
var lastState;
|
||
var lastDerivedProps;
|
||
var lastStore;
|
||
var sourceSelector;
|
||
return function selectDerivedProps(state, props, store) {
|
||
if (pure && lastProps === props && lastState === state) {
|
||
return lastDerivedProps;
|
||
}
|
||
|
||
if (store !== lastStore) {
|
||
lastStore = store;
|
||
sourceSelector = selectorFactory(store.dispatch, selectorFactoryOptions);
|
||
}
|
||
|
||
lastProps = props;
|
||
lastState = state;
|
||
var nextProps = sourceSelector(state, props);
|
||
|
||
if (lastDerivedProps === nextProps) {
|
||
return lastDerivedProps;
|
||
}
|
||
|
||
lastDerivedProps = nextProps;
|
||
return lastDerivedProps;
|
||
};
|
||
}
|
||
|
||
function makeChildElementSelector() {
|
||
var lastChildProps, lastForwardRef, lastChildElement;
|
||
return function selectChildElement(childProps, forwardRef) {
|
||
if (childProps !== lastChildProps || forwardRef !== lastForwardRef) {
|
||
lastChildProps = childProps;
|
||
lastForwardRef = forwardRef;
|
||
lastChildElement = react_default.a.createElement(FinalWrappedComponent, Object(esm_extends["default"])({}, childProps, {
|
||
ref: forwardRef
|
||
}));
|
||
}
|
||
|
||
return lastChildElement;
|
||
};
|
||
}
|
||
|
||
var Connect =
|
||
/*#__PURE__*/
|
||
function (_OuterBaseComponent) {
|
||
Object(inheritsLoose["default"])(Connect, _OuterBaseComponent);
|
||
|
||
function Connect(props) {
|
||
var _this;
|
||
|
||
_this = _OuterBaseComponent.call(this, props) || this;
|
||
browser_default()(forwardRef ? !props.wrapperProps[storeKey] : !props[storeKey], 'Passing redux store in props has been removed and does not do anything. ' + customStoreWarningMessage);
|
||
_this.selectDerivedProps = makeDerivedPropsSelector();
|
||
_this.selectChildElement = makeChildElementSelector();
|
||
_this.renderWrappedComponent = _this.renderWrappedComponent.bind(Object(assertThisInitialized["default"])(Object(assertThisInitialized["default"])(_this)));
|
||
return _this;
|
||
}
|
||
|
||
var _proto = Connect.prototype;
|
||
|
||
_proto.renderWrappedComponent = function renderWrappedComponent(value) {
|
||
browser_default()(value, "Could not find \"store\" in the context of " + ("\"" + displayName + "\". Either wrap the root component in a <Provider>, ") + "or pass a custom React context provider to <Provider> and the corresponding " + ("React context consumer to " + displayName + " in connect options."));
|
||
var storeState = value.storeState,
|
||
store = value.store;
|
||
var wrapperProps = this.props;
|
||
var forwardedRef;
|
||
|
||
if (forwardRef) {
|
||
wrapperProps = this.props.wrapperProps;
|
||
forwardedRef = this.props.forwardedRef;
|
||
}
|
||
|
||
var derivedProps = this.selectDerivedProps(storeState, wrapperProps, store);
|
||
return this.selectChildElement(derivedProps, forwardedRef);
|
||
};
|
||
|
||
_proto.render = function render() {
|
||
var ContextToUse = this.props.context || Context;
|
||
return react_default.a.createElement(ContextToUse.Consumer, null, this.renderWrappedComponent);
|
||
};
|
||
|
||
return Connect;
|
||
}(OuterBaseComponent);
|
||
|
||
Connect.WrappedComponent = WrappedComponent;
|
||
Connect.displayName = displayName;
|
||
|
||
if (forwardRef) {
|
||
var forwarded = react_default.a.forwardRef(function forwardConnectRef(props, ref) {
|
||
return react_default.a.createElement(Connect, {
|
||
wrapperProps: props,
|
||
forwardedRef: ref
|
||
});
|
||
});
|
||
forwarded.displayName = displayName;
|
||
forwarded.WrappedComponent = WrappedComponent;
|
||
return hoist_non_react_statics_cjs_default()(forwarded, WrappedComponent);
|
||
}
|
||
|
||
return hoist_non_react_statics_cjs_default()(Connect, WrappedComponent);
|
||
};
|
||
}
|
||
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/shallowEqual.js
|
||
var hasOwn = Object.prototype.hasOwnProperty;
|
||
|
||
function is(x, y) {
|
||
if (x === y) {
|
||
return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
||
} else {
|
||
return x !== x && y !== y;
|
||
}
|
||
}
|
||
|
||
function shallowEqual(objA, objB) {
|
||
if (is(objA, objB)) return true;
|
||
|
||
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
|
||
return false;
|
||
}
|
||
|
||
var keysA = Object.keys(objA);
|
||
var keysB = Object.keys(objB);
|
||
if (keysA.length !== keysB.length) return false;
|
||
|
||
for (var i = 0; i < keysA.length; i++) {
|
||
if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
|
||
return false;
|
||
}
|
||
}
|
||
|
||
return true;
|
||
}
|
||
// EXTERNAL MODULE: ./node_modules/redux/es/redux.js
|
||
var redux = __webpack_require__("./node_modules/redux/es/redux.js");
|
||
|
||
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/isPlainObject.js
|
||
/**
|
||
* @param {any} obj The object to inspect.
|
||
* @returns {boolean} True if the argument appears to be a plain object.
|
||
*/
|
||
function isPlainObject(obj) {
|
||
if (typeof obj !== 'object' || obj === null) return false;
|
||
var proto = Object.getPrototypeOf(obj);
|
||
if (proto === null) return true;
|
||
var baseProto = proto;
|
||
|
||
while (Object.getPrototypeOf(baseProto) !== null) {
|
||
baseProto = Object.getPrototypeOf(baseProto);
|
||
}
|
||
|
||
return proto === baseProto;
|
||
}
|
||
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/warning.js
|
||
/**
|
||
* Prints a warning in the console if it exists.
|
||
*
|
||
* @param {String} message The warning message.
|
||
* @returns {void}
|
||
*/
|
||
function warning(message) {
|
||
/* eslint-disable no-console */
|
||
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
||
console.error(message);
|
||
}
|
||
/* eslint-enable no-console */
|
||
|
||
|
||
try {
|
||
// This error was thrown as a convenience so that if you enable
|
||
// "break on all exceptions" in your console,
|
||
// it would pause the execution at this line.
|
||
throw new Error(message);
|
||
/* eslint-disable no-empty */
|
||
} catch (e) {}
|
||
/* eslint-enable no-empty */
|
||
|
||
}
|
||
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/verifyPlainObject.js
|
||
|
||
|
||
function verifyPlainObject(value, displayName, methodName) {
|
||
if (!isPlainObject(value)) {
|
||
warning(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + ".");
|
||
}
|
||
}
|
||
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/wrapMapToProps.js
|
||
|
||
function wrapMapToPropsConstant(getConstant) {
|
||
return function initConstantSelector(dispatch, options) {
|
||
var constant = getConstant(dispatch, options);
|
||
|
||
function constantSelector() {
|
||
return constant;
|
||
}
|
||
|
||
constantSelector.dependsOnOwnProps = false;
|
||
return constantSelector;
|
||
};
|
||
} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args
|
||
// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine
|
||
// whether mapToProps needs to be invoked when props have changed.
|
||
//
|
||
// A length of one signals that mapToProps does not depend on props from the parent component.
|
||
// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and
|
||
// therefore not reporting its length accurately..
|
||
|
||
function getDependsOnOwnProps(mapToProps) {
|
||
return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;
|
||
} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,
|
||
// this function wraps mapToProps in a proxy function which does several things:
|
||
//
|
||
// * Detects whether the mapToProps function being called depends on props, which
|
||
// is used by selectorFactory to decide if it should reinvoke on props changes.
|
||
//
|
||
// * On first call, handles mapToProps if returns another function, and treats that
|
||
// new function as the true mapToProps for subsequent calls.
|
||
//
|
||
// * On first call, verifies the first result is a plain object, in order to warn
|
||
// the developer that their mapToProps function is not returning a valid result.
|
||
//
|
||
|
||
function wrapMapToPropsFunc(mapToProps, methodName) {
|
||
return function initProxySelector(dispatch, _ref) {
|
||
var displayName = _ref.displayName;
|
||
|
||
var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {
|
||
return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);
|
||
}; // allow detectFactoryAndVerify to get ownProps
|
||
|
||
|
||
proxy.dependsOnOwnProps = true;
|
||
|
||
proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {
|
||
proxy.mapToProps = mapToProps;
|
||
proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);
|
||
var props = proxy(stateOrDispatch, ownProps);
|
||
|
||
if (typeof props === 'function') {
|
||
proxy.mapToProps = props;
|
||
proxy.dependsOnOwnProps = getDependsOnOwnProps(props);
|
||
props = proxy(stateOrDispatch, ownProps);
|
||
}
|
||
|
||
if (true) verifyPlainObject(props, displayName, methodName);
|
||
return props;
|
||
};
|
||
|
||
return proxy;
|
||
};
|
||
}
|
||
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mapDispatchToProps.js
|
||
|
||
|
||
function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {
|
||
return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined;
|
||
}
|
||
function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {
|
||
return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) {
|
||
return {
|
||
dispatch: dispatch
|
||
};
|
||
}) : undefined;
|
||
}
|
||
function whenMapDispatchToPropsIsObject(mapDispatchToProps) {
|
||
return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? wrapMapToPropsConstant(function (dispatch) {
|
||
return Object(redux["bindActionCreators"])(mapDispatchToProps, dispatch);
|
||
}) : undefined;
|
||
}
|
||
/* harmony default export */ var connect_mapDispatchToProps = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]);
|
||
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mapStateToProps.js
|
||
|
||
function whenMapStateToPropsIsFunction(mapStateToProps) {
|
||
return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined;
|
||
}
|
||
function whenMapStateToPropsIsMissing(mapStateToProps) {
|
||
return !mapStateToProps ? wrapMapToPropsConstant(function () {
|
||
return {};
|
||
}) : undefined;
|
||
}
|
||
/* harmony default export */ var connect_mapStateToProps = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]);
|
||
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mergeProps.js
|
||
|
||
|
||
function defaultMergeProps(stateProps, dispatchProps, ownProps) {
|
||
return Object(esm_extends["default"])({}, ownProps, stateProps, dispatchProps);
|
||
}
|
||
function wrapMergePropsFunc(mergeProps) {
|
||
return function initMergePropsProxy(dispatch, _ref) {
|
||
var displayName = _ref.displayName,
|
||
pure = _ref.pure,
|
||
areMergedPropsEqual = _ref.areMergedPropsEqual;
|
||
var hasRunOnce = false;
|
||
var mergedProps;
|
||
return function mergePropsProxy(stateProps, dispatchProps, ownProps) {
|
||
var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);
|
||
|
||
if (hasRunOnce) {
|
||
if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;
|
||
} else {
|
||
hasRunOnce = true;
|
||
mergedProps = nextMergedProps;
|
||
if (true) verifyPlainObject(mergedProps, displayName, 'mergeProps');
|
||
}
|
||
|
||
return mergedProps;
|
||
};
|
||
};
|
||
}
|
||
function whenMergePropsIsFunction(mergeProps) {
|
||
return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;
|
||
}
|
||
function whenMergePropsIsOmitted(mergeProps) {
|
||
return !mergeProps ? function () {
|
||
return defaultMergeProps;
|
||
} : undefined;
|
||
}
|
||
/* harmony default export */ var connect_mergeProps = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]);
|
||
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/verifySubselectors.js
|
||
|
||
|
||
function verify(selector, methodName, displayName) {
|
||
if (!selector) {
|
||
throw new Error("Unexpected value for " + methodName + " in " + displayName + ".");
|
||
} else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {
|
||
if (!selector.hasOwnProperty('dependsOnOwnProps')) {
|
||
warning("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps.");
|
||
}
|
||
}
|
||
}
|
||
|
||
function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {
|
||
verify(mapStateToProps, 'mapStateToProps', displayName);
|
||
verify(mapDispatchToProps, 'mapDispatchToProps', displayName);
|
||
verify(mergeProps, 'mergeProps', displayName);
|
||
}
|
||
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/selectorFactory.js
|
||
|
||
|
||
function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {
|
||
return function impureFinalPropsSelector(state, ownProps) {
|
||
return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);
|
||
};
|
||
}
|
||
function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {
|
||
var areStatesEqual = _ref.areStatesEqual,
|
||
areOwnPropsEqual = _ref.areOwnPropsEqual,
|
||
areStatePropsEqual = _ref.areStatePropsEqual;
|
||
var hasRunAtLeastOnce = false;
|
||
var state;
|
||
var ownProps;
|
||
var stateProps;
|
||
var dispatchProps;
|
||
var mergedProps;
|
||
|
||
function handleFirstCall(firstState, firstOwnProps) {
|
||
state = firstState;
|
||
ownProps = firstOwnProps;
|
||
stateProps = mapStateToProps(state, ownProps);
|
||
dispatchProps = mapDispatchToProps(dispatch, ownProps);
|
||
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
|
||
hasRunAtLeastOnce = true;
|
||
return mergedProps;
|
||
}
|
||
|
||
function handleNewPropsAndNewState() {
|
||
stateProps = mapStateToProps(state, ownProps);
|
||
if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
|
||
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
|
||
return mergedProps;
|
||
}
|
||
|
||
function handleNewProps() {
|
||
if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);
|
||
if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
|
||
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
|
||
return mergedProps;
|
||
}
|
||
|
||
function handleNewState() {
|
||
var nextStateProps = mapStateToProps(state, ownProps);
|
||
var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);
|
||
stateProps = nextStateProps;
|
||
if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
|
||
return mergedProps;
|
||
}
|
||
|
||
function handleSubsequentCalls(nextState, nextOwnProps) {
|
||
var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);
|
||
var stateChanged = !areStatesEqual(nextState, state);
|
||
state = nextState;
|
||
ownProps = nextOwnProps;
|
||
if (propsChanged && stateChanged) return handleNewPropsAndNewState();
|
||
if (propsChanged) return handleNewProps();
|
||
if (stateChanged) return handleNewState();
|
||
return mergedProps;
|
||
}
|
||
|
||
return function pureFinalPropsSelector(nextState, nextOwnProps) {
|
||
return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);
|
||
};
|
||
} // TODO: Add more comments
|
||
// If pure is true, the selector returned by selectorFactory will memoize its results,
|
||
// allowing connectAdvanced's shouldComponentUpdate to return false if final
|
||
// props have not changed. If false, the selector will always return a new
|
||
// object and shouldComponentUpdate will always return true.
|
||
|
||
function finalPropsSelectorFactory(dispatch, _ref2) {
|
||
var initMapStateToProps = _ref2.initMapStateToProps,
|
||
initMapDispatchToProps = _ref2.initMapDispatchToProps,
|
||
initMergeProps = _ref2.initMergeProps,
|
||
options = Object(objectWithoutPropertiesLoose["default"])(_ref2, ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]);
|
||
|
||
var mapStateToProps = initMapStateToProps(dispatch, options);
|
||
var mapDispatchToProps = initMapDispatchToProps(dispatch, options);
|
||
var mergeProps = initMergeProps(dispatch, options);
|
||
|
||
if (true) {
|
||
verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);
|
||
}
|
||
|
||
var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;
|
||
return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);
|
||
}
|
||
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/connect.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/*
|
||
connect is a facade over connectAdvanced. It turns its args into a compatible
|
||
selectorFactory, which has the signature:
|
||
|
||
(dispatch, options) => (nextState, nextOwnProps) => nextFinalProps
|
||
|
||
connect passes its args to connectAdvanced as options, which will in turn pass them to
|
||
selectorFactory each time a Connect component instance is instantiated or hot reloaded.
|
||
|
||
selectorFactory returns a final props selector from its mapStateToProps,
|
||
mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,
|
||
mergePropsFactories, and pure args.
|
||
|
||
The resulting final props selector is called by the Connect component instance whenever
|
||
it receives new props or store state.
|
||
*/
|
||
|
||
function match(arg, factories, name) {
|
||
for (var i = factories.length - 1; i >= 0; i--) {
|
||
var result = factories[i](arg);
|
||
if (result) return result;
|
||
}
|
||
|
||
return function (dispatch, options) {
|
||
throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + ".");
|
||
};
|
||
}
|
||
|
||
function strictEqual(a, b) {
|
||
return a === b;
|
||
} // createConnect with default args builds the 'official' connect behavior. Calling it with
|
||
// different options opens up some testing and extensibility scenarios
|
||
|
||
|
||
function createConnect(_temp) {
|
||
var _ref = _temp === void 0 ? {} : _temp,
|
||
_ref$connectHOC = _ref.connectHOC,
|
||
connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,
|
||
_ref$mapStateToPropsF = _ref.mapStateToPropsFactories,
|
||
mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? connect_mapStateToProps : _ref$mapStateToPropsF,
|
||
_ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,
|
||
mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? connect_mapDispatchToProps : _ref$mapDispatchToPro,
|
||
_ref$mergePropsFactor = _ref.mergePropsFactories,
|
||
mergePropsFactories = _ref$mergePropsFactor === void 0 ? connect_mergeProps : _ref$mergePropsFactor,
|
||
_ref$selectorFactory = _ref.selectorFactory,
|
||
selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory;
|
||
|
||
return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {
|
||
if (_ref2 === void 0) {
|
||
_ref2 = {};
|
||
}
|
||
|
||
var _ref3 = _ref2,
|
||
_ref3$pure = _ref3.pure,
|
||
pure = _ref3$pure === void 0 ? true : _ref3$pure,
|
||
_ref3$areStatesEqual = _ref3.areStatesEqual,
|
||
areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,
|
||
_ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,
|
||
areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,
|
||
_ref3$areStatePropsEq = _ref3.areStatePropsEqual,
|
||
areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,
|
||
_ref3$areMergedPropsE = _ref3.areMergedPropsEqual,
|
||
areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,
|
||
extraOptions = Object(objectWithoutPropertiesLoose["default"])(_ref3, ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]);
|
||
|
||
var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');
|
||
var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');
|
||
var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');
|
||
return connectHOC(selectorFactory, Object(esm_extends["default"])({
|
||
// used in error messages
|
||
methodName: 'connect',
|
||
// used to compute Connect's displayName from the wrapped component's displayName.
|
||
getDisplayName: function getDisplayName(name) {
|
||
return "Connect(" + name + ")";
|
||
},
|
||
// if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes
|
||
shouldHandleStateChanges: Boolean(mapStateToProps),
|
||
// passed through to selectorFactory
|
||
initMapStateToProps: initMapStateToProps,
|
||
initMapDispatchToProps: initMapDispatchToProps,
|
||
initMergeProps: initMergeProps,
|
||
pure: pure,
|
||
areStatesEqual: areStatesEqual,
|
||
areOwnPropsEqual: areOwnPropsEqual,
|
||
areStatePropsEqual: areStatePropsEqual,
|
||
areMergedPropsEqual: areMergedPropsEqual
|
||
}, extraOptions));
|
||
};
|
||
}
|
||
/* harmony default export */ var connect_connect = (createConnect());
|
||
// CONCATENATED MODULE: ./node_modules/react-redux/es/index.js
|
||
/* concated harmony reexport Provider */__webpack_require__.d(__webpack_exports__, "Provider", function() { return components_Provider; });
|
||
/* concated harmony reexport connectAdvanced */__webpack_require__.d(__webpack_exports__, "connectAdvanced", function() { return connectAdvanced; });
|
||
/* concated harmony reexport ReactReduxContext */__webpack_require__.d(__webpack_exports__, "ReactReduxContext", function() { return ReactReduxContext; });
|
||
/* concated harmony reexport connect */__webpack_require__.d(__webpack_exports__, "connect", function() { return connect_connect; });
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router-dom/es/index.js":
|
||
/*!****************************************************************!*\
|
||
!*** ./node_modules/react-router-dom/es/index.js + 34 modules ***!
|
||
\****************************************************************/
|
||
/*! exports provided: BrowserRouter, HashRouter, Link, MemoryRouter, NavLink, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, withRouter */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/history/node_modules/warning/browser.js (<- Module is not an ECMAScript module) */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/invariant/browser.js (<- Module is not an ECMAScript module) */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router-dom/node_modules/prop-types/index.js (<- Module is not an ECMAScript module) */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js (<- Module is not an ECMAScript module) */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/node_modules/path-to-regexp/index.js (<- Module is not an ECMAScript module) */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/node_modules/prop-types/index.js (<- Module is not an ECMAScript module) */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/warning/warning.js (<- Module is not an ECMAScript module) */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
// EXTERNAL MODULE: ./node_modules/warning/warning.js
|
||
var warning = __webpack_require__("./node_modules/warning/warning.js");
|
||
var warning_default = /*#__PURE__*/__webpack_require__.n(warning);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/react/index.js
|
||
var react = __webpack_require__("./node_modules/react/index.js");
|
||
var react_default = /*#__PURE__*/__webpack_require__.n(react);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/react-router-dom/node_modules/prop-types/index.js
|
||
var prop_types = __webpack_require__("./node_modules/react-router-dom/node_modules/prop-types/index.js");
|
||
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/history/node_modules/warning/browser.js
|
||
var browser = __webpack_require__("./node_modules/history/node_modules/warning/browser.js");
|
||
var browser_default = /*#__PURE__*/__webpack_require__.n(browser);
|
||
|
||
// EXTERNAL MODULE: ./node_modules/invariant/browser.js
|
||
var invariant_browser = __webpack_require__("./node_modules/invariant/browser.js");
|
||
var invariant_browser_default = /*#__PURE__*/__webpack_require__.n(invariant_browser);
|
||
|
||
// CONCATENATED MODULE: ./node_modules/resolve-pathname/index.js
|
||
function isAbsolute(pathname) {
|
||
return pathname.charAt(0) === '/';
|
||
}
|
||
|
||
// About 1.5x faster than the two-arg version of Array#splice()
|
||
function spliceOne(list, index) {
|
||
for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
|
||
list[i] = list[k];
|
||
}
|
||
|
||
list.pop();
|
||
}
|
||
|
||
// This implementation is based heavily on node's url.parse
|
||
function resolvePathname(to) {
|
||
var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||
|
||
var toParts = to && to.split('/') || [];
|
||
var fromParts = from && from.split('/') || [];
|
||
|
||
var isToAbs = to && isAbsolute(to);
|
||
var isFromAbs = from && isAbsolute(from);
|
||
var mustEndAbs = isToAbs || isFromAbs;
|
||
|
||
if (to && isAbsolute(to)) {
|
||
// to is absolute
|
||
fromParts = toParts;
|
||
} else if (toParts.length) {
|
||
// to is relative, drop the filename
|
||
fromParts.pop();
|
||
fromParts = fromParts.concat(toParts);
|
||
}
|
||
|
||
if (!fromParts.length) return '/';
|
||
|
||
var hasTrailingSlash = void 0;
|
||
if (fromParts.length) {
|
||
var last = fromParts[fromParts.length - 1];
|
||
hasTrailingSlash = last === '.' || last === '..' || last === '';
|
||
} else {
|
||
hasTrailingSlash = false;
|
||
}
|
||
|
||
var up = 0;
|
||
for (var i = fromParts.length; i >= 0; i--) {
|
||
var part = fromParts[i];
|
||
|
||
if (part === '.') {
|
||
spliceOne(fromParts, i);
|
||
} else if (part === '..') {
|
||
spliceOne(fromParts, i);
|
||
up++;
|
||
} else if (up) {
|
||
spliceOne(fromParts, i);
|
||
up--;
|
||
}
|
||
}
|
||
|
||
if (!mustEndAbs) for (; up--; up) {
|
||
fromParts.unshift('..');
|
||
}if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');
|
||
|
||
var result = fromParts.join('/');
|
||
|
||
if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';
|
||
|
||
return result;
|
||
}
|
||
|
||
/* harmony default export */ var resolve_pathname = (resolvePathname);
|
||
// CONCATENATED MODULE: ./node_modules/value-equal/index.js
|
||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||
|
||
function valueEqual(a, b) {
|
||
if (a === b) return true;
|
||
|
||
if (a == null || b == null) return false;
|
||
|
||
if (Array.isArray(a)) {
|
||
return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {
|
||
return valueEqual(item, b[index]);
|
||
});
|
||
}
|
||
|
||
var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);
|
||
var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);
|
||
|
||
if (aType !== bType) return false;
|
||
|
||
if (aType === 'object') {
|
||
var aValue = a.valueOf();
|
||
var bValue = b.valueOf();
|
||
|
||
if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);
|
||
|
||
var aKeys = Object.keys(a);
|
||
var bKeys = Object.keys(b);
|
||
|
||
if (aKeys.length !== bKeys.length) return false;
|
||
|
||
return aKeys.every(function (key) {
|
||
return valueEqual(a[key], b[key]);
|
||
});
|
||
}
|
||
|
||
return false;
|
||
}
|
||
|
||
/* harmony default export */ var value_equal = (valueEqual);
|
||
// CONCATENATED MODULE: ./node_modules/history/es/PathUtils.js
|
||
var addLeadingSlash = function addLeadingSlash(path) {
|
||
return path.charAt(0) === '/' ? path : '/' + path;
|
||
};
|
||
|
||
var stripLeadingSlash = function stripLeadingSlash(path) {
|
||
return path.charAt(0) === '/' ? path.substr(1) : path;
|
||
};
|
||
|
||
var hasBasename = function hasBasename(path, prefix) {
|
||
return new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path);
|
||
};
|
||
|
||
var stripBasename = function stripBasename(path, prefix) {
|
||
return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
|
||
};
|
||
|
||
var stripTrailingSlash = function stripTrailingSlash(path) {
|
||
return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
|
||
};
|
||
|
||
var parsePath = function parsePath(path) {
|
||
var pathname = path || '/';
|
||
var search = '';
|
||
var hash = '';
|
||
|
||
var hashIndex = pathname.indexOf('#');
|
||
if (hashIndex !== -1) {
|
||
hash = pathname.substr(hashIndex);
|
||
pathname = pathname.substr(0, hashIndex);
|
||
}
|
||
|
||
var searchIndex = pathname.indexOf('?');
|
||
if (searchIndex !== -1) {
|
||
search = pathname.substr(searchIndex);
|
||
pathname = pathname.substr(0, searchIndex);
|
||
}
|
||
|
||
return {
|
||
pathname: pathname,
|
||
search: search === '?' ? '' : search,
|
||
hash: hash === '#' ? '' : hash
|
||
};
|
||
};
|
||
|
||
var createPath = function createPath(location) {
|
||
var pathname = location.pathname,
|
||
search = location.search,
|
||
hash = location.hash;
|
||
|
||
|
||
var path = pathname || '/';
|
||
|
||
if (search && search !== '?') path += search.charAt(0) === '?' ? search : '?' + search;
|
||
|
||
if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : '#' + hash;
|
||
|
||
return path;
|
||
};
|
||
// CONCATENATED MODULE: ./node_modules/history/es/LocationUtils.js
|
||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||
|
||
|
||
|
||
|
||
|
||
var LocationUtils_createLocation = function createLocation(path, state, key, currentLocation) {
|
||
var location = void 0;
|
||
if (typeof path === 'string') {
|
||
// Two-arg form: push(path, state)
|
||
location = parsePath(path);
|
||
location.state = state;
|
||
} else {
|
||
// One-arg form: push(location)
|
||
location = _extends({}, path);
|
||
|
||
if (location.pathname === undefined) location.pathname = '';
|
||
|
||
if (location.search) {
|
||
if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
|
||
} else {
|
||
location.search = '';
|
||
}
|
||
|
||
if (location.hash) {
|
||
if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
|
||
} else {
|
||
location.hash = '';
|
||
}
|
||
|
||
if (state !== undefined && location.state === undefined) location.state = state;
|
||
}
|
||
|
||
try {
|
||
location.pathname = decodeURI(location.pathname);
|
||
} catch (e) {
|
||
if (e instanceof URIError) {
|
||
throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
|
||
} else {
|
||
throw e;
|
||
}
|
||
}
|
||
|
||
if (key) location.key = key;
|
||
|
||
if (currentLocation) {
|
||
// Resolve incomplete/relative pathname relative to current location.
|
||
if (!location.pathname) {
|
||
location.pathname = currentLocation.pathname;
|
||
} else if (location.pathname.charAt(0) !== '/') {
|
||
location.pathname = resolve_pathname(location.pathname, currentLocation.pathname);
|
||
}
|
||
} else {
|
||
// When there is no prior location and pathname is empty, set it to /
|
||
if (!location.pathname) {
|
||
location.pathname = '/';
|
||
}
|
||
}
|
||
|
||
return location;
|
||
};
|
||
|
||
var LocationUtils_locationsAreEqual = function locationsAreEqual(a, b) {
|
||
return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && value_equal(a.state, b.state);
|
||
};
|
||
// CONCATENATED MODULE: ./node_modules/history/es/createTransitionManager.js
|
||
|
||
|
||
var createTransitionManager_createTransitionManager = function createTransitionManager() {
|
||
var prompt = null;
|
||
|
||
var setPrompt = function setPrompt(nextPrompt) {
|
||
browser_default()(prompt == null, 'A history supports only one prompt at a time');
|
||
|
||
prompt = nextPrompt;
|
||
|
||
return function () {
|
||
if (prompt === nextPrompt) prompt = null;
|
||
};
|
||
};
|
||
|
||
var confirmTransitionTo = function confirmTransitionTo(location, action, getUserConfirmation, callback) {
|
||
// TODO: If another transition starts while we're still confirming
|
||
// the previous one, we may end up in a weird state. Figure out the
|
||
// best way to handle this.
|
||
if (prompt != null) {
|
||
var result = typeof prompt === 'function' ? prompt(location, action) : prompt;
|
||
|
||
if (typeof result === 'string') {
|
||
if (typeof getUserConfirmation === 'function') {
|
||
getUserConfirmation(result, callback);
|
||
} else {
|
||
browser_default()(false, 'A history needs a getUserConfirmation function in order to use a prompt message');
|
||
|
||
callback(true);
|
||
}
|
||
} else {
|
||
// Return false from a transition hook to cancel the transition.
|
||
callback(result !== false);
|
||
}
|
||
} else {
|
||
callback(true);
|
||
}
|
||
};
|
||
|
||
var listeners = [];
|
||
|
||
var appendListener = function appendListener(fn) {
|
||
var isActive = true;
|
||
|
||
var listener = function listener() {
|
||
if (isActive) fn.apply(undefined, arguments);
|
||
};
|
||
|
||
listeners.push(listener);
|
||
|
||
return function () {
|
||
isActive = false;
|
||
listeners = listeners.filter(function (item) {
|
||
return item !== listener;
|
||
});
|
||
};
|
||
};
|
||
|
||
var notifyListeners = function notifyListeners() {
|
||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
|
||
listeners.forEach(function (listener) {
|
||
return listener.apply(undefined, args);
|
||
});
|
||
};
|
||
|
||
return {
|
||
setPrompt: setPrompt,
|
||
confirmTransitionTo: confirmTransitionTo,
|
||
appendListener: appendListener,
|
||
notifyListeners: notifyListeners
|
||
};
|
||
};
|
||
|
||
/* harmony default export */ var es_createTransitionManager = (createTransitionManager_createTransitionManager);
|
||
// CONCATENATED MODULE: ./node_modules/history/es/DOMUtils.js
|
||
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
||
|
||
var addEventListener = function addEventListener(node, event, listener) {
|
||
return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);
|
||
};
|
||
|
||
var removeEventListener = function removeEventListener(node, event, listener) {
|
||
return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);
|
||
};
|
||
|
||
var getConfirmation = function getConfirmation(message, callback) {
|
||
return callback(window.confirm(message));
|
||
}; // eslint-disable-line no-alert
|
||
|
||
/**
|
||
* Returns true if the HTML5 history API is supported. Taken from Modernizr.
|
||
*
|
||
* https://github.com/Modernizr/Modernizr/blob/master/LICENSE
|
||
* https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
|
||
* changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586
|
||
*/
|
||
var supportsHistory = function supportsHistory() {
|
||
var ua = window.navigator.userAgent;
|
||
|
||
if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;
|
||
|
||
return window.history && 'pushState' in window.history;
|
||
};
|
||
|
||
/**
|
||
* Returns true if browser fires popstate on hash change.
|
||
* IE10 and IE11 do not.
|
||
*/
|
||
var supportsPopStateOnHashChange = function supportsPopStateOnHashChange() {
|
||
return window.navigator.userAgent.indexOf('Trident') === -1;
|
||
};
|
||
|
||
/**
|
||
* Returns false if using go(n) with hash history causes a full page reload.
|
||
*/
|
||
var supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {
|
||
return window.navigator.userAgent.indexOf('Firefox') === -1;
|
||
};
|
||
|
||
/**
|
||
* Returns true if a given popstate event is an extraneous WebKit event.
|
||
* Accounts for the fact that Chrome on iOS fires real popstate events
|
||
* containing undefined state when pressing the back button.
|
||
*/
|
||
var isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {
|
||
return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;
|
||
};
|
||
// CONCATENATED MODULE: ./node_modules/history/es/createBrowserHistory.js
|
||
var createBrowserHistory_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||
|
||
var createBrowserHistory_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var PopStateEvent = 'popstate';
|
||
var HashChangeEvent = 'hashchange';
|
||
|
||
var getHistoryState = function getHistoryState() {
|
||
try {
|
||
return window.history.state || {};
|
||
} catch (e) {
|
||
// IE 11 sometimes throws when accessing window.history.state
|
||
// See https://github.com/ReactTraining/history/pull/289
|
||
return {};
|
||
}
|
||
};
|
||
|
||
/**
|
||
* Creates a history object that uses the HTML5 history API including
|
||
* pushState, replaceState, and the popstate event.
|
||
*/
|
||
var createBrowserHistory_createBrowserHistory = function createBrowserHistory() {
|
||
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||
|
||
invariant_browser_default()(canUseDOM, 'Browser history needs a DOM');
|
||
|
||
var globalHistory = window.history;
|
||
var canUseHistory = supportsHistory();
|
||
var needsHashChangeListener = !supportsPopStateOnHashChange();
|
||
|
||
var _props$forceRefresh = props.forceRefresh,
|
||
forceRefresh = _props$forceRefresh === undefined ? false : _props$forceRefresh,
|
||
_props$getUserConfirm = props.getUserConfirmation,
|
||
getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,
|
||
_props$keyLength = props.keyLength,
|
||
keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;
|
||
|
||
var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
|
||
|
||
var getDOMLocation = function getDOMLocation(historyState) {
|
||
var _ref = historyState || {},
|
||
key = _ref.key,
|
||
state = _ref.state;
|
||
|
||
var _window$location = window.location,
|
||
pathname = _window$location.pathname,
|
||
search = _window$location.search,
|
||
hash = _window$location.hash;
|
||
|
||
|
||
var path = pathname + search + hash;
|
||
|
||
browser_default()(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".');
|
||
|
||
if (basename) path = stripBasename(path, basename);
|
||
|
||
return LocationUtils_createLocation(path, state, key);
|
||
};
|
||
|
||
var createKey = function createKey() {
|
||
return Math.random().toString(36).substr(2, keyLength);
|
||
};
|
||
|
||
var transitionManager = es_createTransitionManager();
|
||
|
||
var setState = function setState(nextState) {
|
||
createBrowserHistory_extends(history, nextState);
|
||
|
||
history.length = globalHistory.length;
|
||
|
||
transitionManager.notifyListeners(history.location, history.action);
|
||
};
|
||
|
||
var handlePopState = function handlePopState(event) {
|
||
// Ignore extraneous popstate events in WebKit.
|
||
if (isExtraneousPopstateEvent(event)) return;
|
||
|
||
handlePop(getDOMLocation(event.state));
|
||
};
|
||
|
||
var handleHashChange = function handleHashChange() {
|
||
handlePop(getDOMLocation(getHistoryState()));
|
||
};
|
||
|
||
var forceNextPop = false;
|
||
|
||
var handlePop = function handlePop(location) {
|
||
if (forceNextPop) {
|
||
forceNextPop = false;
|
||
setState();
|
||
} else {
|
||
var action = 'POP';
|
||
|
||
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
||
if (ok) {
|
||
setState({ action: action, location: location });
|
||
} else {
|
||
revertPop(location);
|
||
}
|
||
});
|
||
}
|
||
};
|
||
|
||
var revertPop = function revertPop(fromLocation) {
|
||
var toLocation = history.location;
|
||
|
||
// TODO: We could probably make this more reliable by
|
||
// keeping a list of keys we've seen in sessionStorage.
|
||
// Instead, we just default to 0 for keys we don't know.
|
||
|
||
var toIndex = allKeys.indexOf(toLocation.key);
|
||
|
||
if (toIndex === -1) toIndex = 0;
|
||
|
||
var fromIndex = allKeys.indexOf(fromLocation.key);
|
||
|
||
if (fromIndex === -1) fromIndex = 0;
|
||
|
||
var delta = toIndex - fromIndex;
|
||
|
||
if (delta) {
|
||
forceNextPop = true;
|
||
go(delta);
|
||
}
|
||
};
|
||
|
||
var initialLocation = getDOMLocation(getHistoryState());
|
||
var allKeys = [initialLocation.key];
|
||
|
||
// Public interface
|
||
|
||
var createHref = function createHref(location) {
|
||
return basename + createPath(location);
|
||
};
|
||
|
||
var push = function push(path, state) {
|
||
browser_default()(!((typeof path === 'undefined' ? 'undefined' : createBrowserHistory_typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');
|
||
|
||
var action = 'PUSH';
|
||
var location = LocationUtils_createLocation(path, state, createKey(), history.location);
|
||
|
||
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
||
if (!ok) return;
|
||
|
||
var href = createHref(location);
|
||
var key = location.key,
|
||
state = location.state;
|
||
|
||
|
||
if (canUseHistory) {
|
||
globalHistory.pushState({ key: key, state: state }, null, href);
|
||
|
||
if (forceRefresh) {
|
||
window.location.href = href;
|
||
} else {
|
||
var prevIndex = allKeys.indexOf(history.location.key);
|
||
var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);
|
||
|
||
nextKeys.push(location.key);
|
||
allKeys = nextKeys;
|
||
|
||
setState({ action: action, location: location });
|
||
}
|
||
} else {
|
||
browser_default()(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history');
|
||
|
||
window.location.href = href;
|
||
}
|
||
});
|
||
};
|
||
|
||
var replace = function replace(path, state) {
|
||
browser_default()(!((typeof path === 'undefined' ? 'undefined' : createBrowserHistory_typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');
|
||
|
||
var action = 'REPLACE';
|
||
var location = LocationUtils_createLocation(path, state, createKey(), history.location);
|
||
|
||
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
||
if (!ok) return;
|
||
|
||
var href = createHref(location);
|
||
var key = location.key,
|
||
state = location.state;
|
||
|
||
|
||
if (canUseHistory) {
|
||
globalHistory.replaceState({ key: key, state: state }, null, href);
|
||
|
||
if (forceRefresh) {
|
||
window.location.replace(href);
|
||
} else {
|
||
var prevIndex = allKeys.indexOf(history.location.key);
|
||
|
||
if (prevIndex !== -1) allKeys[prevIndex] = location.key;
|
||
|
||
setState({ action: action, location: location });
|
||
}
|
||
} else {
|
||
browser_default()(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history');
|
||
|
||
window.location.replace(href);
|
||
}
|
||
});
|
||
};
|
||
|
||
var go = function go(n) {
|
||
globalHistory.go(n);
|
||
};
|
||
|
||
var goBack = function goBack() {
|
||
return go(-1);
|
||
};
|
||
|
||
var goForward = function goForward() {
|
||
return go(1);
|
||
};
|
||
|
||
var listenerCount = 0;
|
||
|
||
var checkDOMListeners = function checkDOMListeners(delta) {
|
||
listenerCount += delta;
|
||
|
||
if (listenerCount === 1) {
|
||
addEventListener(window, PopStateEvent, handlePopState);
|
||
|
||
if (needsHashChangeListener) addEventListener(window, HashChangeEvent, handleHashChange);
|
||
} else if (listenerCount === 0) {
|
||
removeEventListener(window, PopStateEvent, handlePopState);
|
||
|
||
if (needsHashChangeListener) removeEventListener(window, HashChangeEvent, handleHashChange);
|
||
}
|
||
};
|
||
|
||
var isBlocked = false;
|
||
|
||
var block = function block() {
|
||
var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||
|
||
var unblock = transitionManager.setPrompt(prompt);
|
||
|
||
if (!isBlocked) {
|
||
checkDOMListeners(1);
|
||
isBlocked = true;
|
||
}
|
||
|
||
return function () {
|
||
if (isBlocked) {
|
||
isBlocked = false;
|
||
checkDOMListeners(-1);
|
||
}
|
||
|
||
return unblock();
|
||
};
|
||
};
|
||
|
||
var listen = function listen(listener) {
|
||
var unlisten = transitionManager.appendListener(listener);
|
||
checkDOMListeners(1);
|
||
|
||
return function () {
|
||
checkDOMListeners(-1);
|
||
unlisten();
|
||
};
|
||
};
|
||
|
||
var history = {
|
||
length: globalHistory.length,
|
||
action: 'POP',
|
||
location: initialLocation,
|
||
createHref: createHref,
|
||
push: push,
|
||
replace: replace,
|
||
go: go,
|
||
goBack: goBack,
|
||
goForward: goForward,
|
||
block: block,
|
||
listen: listen
|
||
};
|
||
|
||
return history;
|
||
};
|
||
|
||
/* harmony default export */ var es_createBrowserHistory = (createBrowserHistory_createBrowserHistory);
|
||
// CONCATENATED MODULE: ./node_modules/history/es/createHashHistory.js
|
||
var createHashHistory_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var createHashHistory_HashChangeEvent = 'hashchange';
|
||
|
||
var HashPathCoders = {
|
||
hashbang: {
|
||
encodePath: function encodePath(path) {
|
||
return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);
|
||
},
|
||
decodePath: function decodePath(path) {
|
||
return path.charAt(0) === '!' ? path.substr(1) : path;
|
||
}
|
||
},
|
||
noslash: {
|
||
encodePath: stripLeadingSlash,
|
||
decodePath: addLeadingSlash
|
||
},
|
||
slash: {
|
||
encodePath: addLeadingSlash,
|
||
decodePath: addLeadingSlash
|
||
}
|
||
};
|
||
|
||
var getHashPath = function getHashPath() {
|
||
// We can't use window.location.hash here because it's not
|
||
// consistent across browsers - Firefox will pre-decode it!
|
||
var href = window.location.href;
|
||
var hashIndex = href.indexOf('#');
|
||
return hashIndex === -1 ? '' : href.substring(hashIndex + 1);
|
||
};
|
||
|
||
var pushHashPath = function pushHashPath(path) {
|
||
return window.location.hash = path;
|
||
};
|
||
|
||
var replaceHashPath = function replaceHashPath(path) {
|
||
var hashIndex = window.location.href.indexOf('#');
|
||
|
||
window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);
|
||
};
|
||
|
||
var createHashHistory_createHashHistory = function createHashHistory() {
|
||
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||
|
||
invariant_browser_default()(canUseDOM, 'Hash history needs a DOM');
|
||
|
||
var globalHistory = window.history;
|
||
var canGoWithoutReload = supportsGoWithoutReloadUsingHash();
|
||
|
||
var _props$getUserConfirm = props.getUserConfirmation,
|
||
getUserConfirmation = _props$getUserConfirm === undefined ? getConfirmation : _props$getUserConfirm,
|
||
_props$hashType = props.hashType,
|
||
hashType = _props$hashType === undefined ? 'slash' : _props$hashType;
|
||
|
||
var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
|
||
|
||
var _HashPathCoders$hashT = HashPathCoders[hashType],
|
||
encodePath = _HashPathCoders$hashT.encodePath,
|
||
decodePath = _HashPathCoders$hashT.decodePath;
|
||
|
||
|
||
var getDOMLocation = function getDOMLocation() {
|
||
var path = decodePath(getHashPath());
|
||
|
||
browser_default()(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".');
|
||
|
||
if (basename) path = stripBasename(path, basename);
|
||
|
||
return LocationUtils_createLocation(path);
|
||
};
|
||
|
||
var transitionManager = es_createTransitionManager();
|
||
|
||
var setState = function setState(nextState) {
|
||
createHashHistory_extends(history, nextState);
|
||
|
||
history.length = globalHistory.length;
|
||
|
||
transitionManager.notifyListeners(history.location, history.action);
|
||
};
|
||
|
||
var forceNextPop = false;
|
||
var ignorePath = null;
|
||
|
||
var handleHashChange = function handleHashChange() {
|
||
var path = getHashPath();
|
||
var encodedPath = encodePath(path);
|
||
|
||
if (path !== encodedPath) {
|
||
// Ensure we always have a properly-encoded hash.
|
||
replaceHashPath(encodedPath);
|
||
} else {
|
||
var location = getDOMLocation();
|
||
var prevLocation = history.location;
|
||
|
||
if (!forceNextPop && LocationUtils_locationsAreEqual(prevLocation, location)) return; // A hashchange doesn't always == location change.
|
||
|
||
if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.
|
||
|
||
ignorePath = null;
|
||
|
||
handlePop(location);
|
||
}
|
||
};
|
||
|
||
var handlePop = function handlePop(location) {
|
||
if (forceNextPop) {
|
||
forceNextPop = false;
|
||
setState();
|
||
} else {
|
||
var action = 'POP';
|
||
|
||
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
||
if (ok) {
|
||
setState({ action: action, location: location });
|
||
} else {
|
||
revertPop(location);
|
||
}
|
||
});
|
||
}
|
||
};
|
||
|
||
var revertPop = function revertPop(fromLocation) {
|
||
var toLocation = history.location;
|
||
|
||
// TODO: We could probably make this more reliable by
|
||
// keeping a list of paths we've seen in sessionStorage.
|
||
// Instead, we just default to 0 for paths we don't know.
|
||
|
||
var toIndex = allPaths.lastIndexOf(createPath(toLocation));
|
||
|
||
if (toIndex === -1) toIndex = 0;
|
||
|
||
var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));
|
||
|
||
if (fromIndex === -1) fromIndex = 0;
|
||
|
||
var delta = toIndex - fromIndex;
|
||
|
||
if (delta) {
|
||
forceNextPop = true;
|
||
go(delta);
|
||
}
|
||
};
|
||
|
||
// Ensure the hash is encoded properly before doing anything else.
|
||
var path = getHashPath();
|
||
var encodedPath = encodePath(path);
|
||
|
||
if (path !== encodedPath) replaceHashPath(encodedPath);
|
||
|
||
var initialLocation = getDOMLocation();
|
||
var allPaths = [createPath(initialLocation)];
|
||
|
||
// Public interface
|
||
|
||
var createHref = function createHref(location) {
|
||
return '#' + encodePath(basename + createPath(location));
|
||
};
|
||
|
||
var push = function push(path, state) {
|
||
browser_default()(state === undefined, 'Hash history cannot push state; it is ignored');
|
||
|
||
var action = 'PUSH';
|
||
var location = LocationUtils_createLocation(path, undefined, undefined, history.location);
|
||
|
||
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
||
if (!ok) return;
|
||
|
||
var path = createPath(location);
|
||
var encodedPath = encodePath(basename + path);
|
||
var hashChanged = getHashPath() !== encodedPath;
|
||
|
||
if (hashChanged) {
|
||
// We cannot tell if a hashchange was caused by a PUSH, so we'd
|
||
// rather setState here and ignore the hashchange. The caveat here
|
||
// is that other hash histories in the page will consider it a POP.
|
||
ignorePath = path;
|
||
pushHashPath(encodedPath);
|
||
|
||
var prevIndex = allPaths.lastIndexOf(createPath(history.location));
|
||
var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);
|
||
|
||
nextPaths.push(path);
|
||
allPaths = nextPaths;
|
||
|
||
setState({ action: action, location: location });
|
||
} else {
|
||
browser_default()(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack');
|
||
|
||
setState();
|
||
}
|
||
});
|
||
};
|
||
|
||
var replace = function replace(path, state) {
|
||
browser_default()(state === undefined, 'Hash history cannot replace state; it is ignored');
|
||
|
||
var action = 'REPLACE';
|
||
var location = LocationUtils_createLocation(path, undefined, undefined, history.location);
|
||
|
||
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
||
if (!ok) return;
|
||
|
||
var path = createPath(location);
|
||
var encodedPath = encodePath(basename + path);
|
||
var hashChanged = getHashPath() !== encodedPath;
|
||
|
||
if (hashChanged) {
|
||
// We cannot tell if a hashchange was caused by a REPLACE, so we'd
|
||
// rather setState here and ignore the hashchange. The caveat here
|
||
// is that other hash histories in the page will consider it a POP.
|
||
ignorePath = path;
|
||
replaceHashPath(encodedPath);
|
||
}
|
||
|
||
var prevIndex = allPaths.indexOf(createPath(history.location));
|
||
|
||
if (prevIndex !== -1) allPaths[prevIndex] = path;
|
||
|
||
setState({ action: action, location: location });
|
||
});
|
||
};
|
||
|
||
var go = function go(n) {
|
||
browser_default()(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser');
|
||
|
||
globalHistory.go(n);
|
||
};
|
||
|
||
var goBack = function goBack() {
|
||
return go(-1);
|
||
};
|
||
|
||
var goForward = function goForward() {
|
||
return go(1);
|
||
};
|
||
|
||
var listenerCount = 0;
|
||
|
||
var checkDOMListeners = function checkDOMListeners(delta) {
|
||
listenerCount += delta;
|
||
|
||
if (listenerCount === 1) {
|
||
addEventListener(window, createHashHistory_HashChangeEvent, handleHashChange);
|
||
} else if (listenerCount === 0) {
|
||
removeEventListener(window, createHashHistory_HashChangeEvent, handleHashChange);
|
||
}
|
||
};
|
||
|
||
var isBlocked = false;
|
||
|
||
var block = function block() {
|
||
var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||
|
||
var unblock = transitionManager.setPrompt(prompt);
|
||
|
||
if (!isBlocked) {
|
||
checkDOMListeners(1);
|
||
isBlocked = true;
|
||
}
|
||
|
||
return function () {
|
||
if (isBlocked) {
|
||
isBlocked = false;
|
||
checkDOMListeners(-1);
|
||
}
|
||
|
||
return unblock();
|
||
};
|
||
};
|
||
|
||
var listen = function listen(listener) {
|
||
var unlisten = transitionManager.appendListener(listener);
|
||
checkDOMListeners(1);
|
||
|
||
return function () {
|
||
checkDOMListeners(-1);
|
||
unlisten();
|
||
};
|
||
};
|
||
|
||
var history = {
|
||
length: globalHistory.length,
|
||
action: 'POP',
|
||
location: initialLocation,
|
||
createHref: createHref,
|
||
push: push,
|
||
replace: replace,
|
||
go: go,
|
||
goBack: goBack,
|
||
goForward: goForward,
|
||
block: block,
|
||
listen: listen
|
||
};
|
||
|
||
return history;
|
||
};
|
||
|
||
/* harmony default export */ var es_createHashHistory = (createHashHistory_createHashHistory);
|
||
// CONCATENATED MODULE: ./node_modules/history/es/createMemoryHistory.js
|
||
var createMemoryHistory_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||
|
||
var createMemoryHistory_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var clamp = function clamp(n, lowerBound, upperBound) {
|
||
return Math.min(Math.max(n, lowerBound), upperBound);
|
||
};
|
||
|
||
/**
|
||
* Creates a history object that stores locations in memory.
|
||
*/
|
||
var createMemoryHistory_createMemoryHistory = function createMemoryHistory() {
|
||
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||
var getUserConfirmation = props.getUserConfirmation,
|
||
_props$initialEntries = props.initialEntries,
|
||
initialEntries = _props$initialEntries === undefined ? ['/'] : _props$initialEntries,
|
||
_props$initialIndex = props.initialIndex,
|
||
initialIndex = _props$initialIndex === undefined ? 0 : _props$initialIndex,
|
||
_props$keyLength = props.keyLength,
|
||
keyLength = _props$keyLength === undefined ? 6 : _props$keyLength;
|
||
|
||
|
||
var transitionManager = es_createTransitionManager();
|
||
|
||
var setState = function setState(nextState) {
|
||
createMemoryHistory_extends(history, nextState);
|
||
|
||
history.length = history.entries.length;
|
||
|
||
transitionManager.notifyListeners(history.location, history.action);
|
||
};
|
||
|
||
var createKey = function createKey() {
|
||
return Math.random().toString(36).substr(2, keyLength);
|
||
};
|
||
|
||
var index = clamp(initialIndex, 0, initialEntries.length - 1);
|
||
var entries = initialEntries.map(function (entry) {
|
||
return typeof entry === 'string' ? LocationUtils_createLocation(entry, undefined, createKey()) : LocationUtils_createLocation(entry, undefined, entry.key || createKey());
|
||
});
|
||
|
||
// Public interface
|
||
|
||
var createHref = createPath;
|
||
|
||
var push = function push(path, state) {
|
||
browser_default()(!((typeof path === 'undefined' ? 'undefined' : createMemoryHistory_typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored');
|
||
|
||
var action = 'PUSH';
|
||
var location = LocationUtils_createLocation(path, state, createKey(), history.location);
|
||
|
||
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
||
if (!ok) return;
|
||
|
||
var prevIndex = history.index;
|
||
var nextIndex = prevIndex + 1;
|
||
|
||
var nextEntries = history.entries.slice(0);
|
||
if (nextEntries.length > nextIndex) {
|
||
nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);
|
||
} else {
|
||
nextEntries.push(location);
|
||
}
|
||
|
||
setState({
|
||
action: action,
|
||
location: location,
|
||
index: nextIndex,
|
||
entries: nextEntries
|
||
});
|
||
});
|
||
};
|
||
|
||
var replace = function replace(path, state) {
|
||
browser_default()(!((typeof path === 'undefined' ? 'undefined' : createMemoryHistory_typeof(path)) === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored');
|
||
|
||
var action = 'REPLACE';
|
||
var location = LocationUtils_createLocation(path, state, createKey(), history.location);
|
||
|
||
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
||
if (!ok) return;
|
||
|
||
history.entries[history.index] = location;
|
||
|
||
setState({ action: action, location: location });
|
||
});
|
||
};
|
||
|
||
var go = function go(n) {
|
||
var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);
|
||
|
||
var action = 'POP';
|
||
var location = history.entries[nextIndex];
|
||
|
||
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
||
if (ok) {
|
||
setState({
|
||
action: action,
|
||
location: location,
|
||
index: nextIndex
|
||
});
|
||
} else {
|
||
// Mimic the behavior of DOM histories by
|
||
// causing a render after a cancelled POP.
|
||
setState();
|
||
}
|
||
});
|
||
};
|
||
|
||
var goBack = function goBack() {
|
||
return go(-1);
|
||
};
|
||
|
||
var goForward = function goForward() {
|
||
return go(1);
|
||
};
|
||
|
||
var canGo = function canGo(n) {
|
||
var nextIndex = history.index + n;
|
||
return nextIndex >= 0 && nextIndex < history.entries.length;
|
||
};
|
||
|
||
var block = function block() {
|
||
var prompt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||
return transitionManager.setPrompt(prompt);
|
||
};
|
||
|
||
var listen = function listen(listener) {
|
||
return transitionManager.appendListener(listener);
|
||
};
|
||
|
||
var history = {
|
||
length: entries.length,
|
||
action: 'POP',
|
||
location: entries[index],
|
||
index: index,
|
||
entries: entries,
|
||
createHref: createHref,
|
||
push: push,
|
||
replace: replace,
|
||
go: go,
|
||
goBack: goBack,
|
||
goForward: goForward,
|
||
canGo: canGo,
|
||
block: block,
|
||
listen: listen
|
||
};
|
||
|
||
return history;
|
||
};
|
||
|
||
/* harmony default export */ var es_createMemoryHistory = (createMemoryHistory_createMemoryHistory);
|
||
// CONCATENATED MODULE: ./node_modules/history/es/index.js
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// EXTERNAL MODULE: ./node_modules/react-router/node_modules/prop-types/index.js
|
||
var node_modules_prop_types = __webpack_require__("./node_modules/react-router/node_modules/prop-types/index.js");
|
||
var node_modules_prop_types_default = /*#__PURE__*/__webpack_require__.n(node_modules_prop_types);
|
||
|
||
// CONCATENATED MODULE: ./node_modules/react-router/es/Router.js
|
||
var Router_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/**
|
||
* The public API for putting history on context.
|
||
*/
|
||
|
||
var Router_Router = function (_React$Component) {
|
||
_inherits(Router, _React$Component);
|
||
|
||
function Router() {
|
||
var _temp, _this, _ret;
|
||
|
||
_classCallCheck(this, Router);
|
||
|
||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
|
||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
|
||
match: _this.computeMatch(_this.props.history.location.pathname)
|
||
}, _temp), _possibleConstructorReturn(_this, _ret);
|
||
}
|
||
|
||
Router.prototype.getChildContext = function getChildContext() {
|
||
return {
|
||
router: Router_extends({}, this.context.router, {
|
||
history: this.props.history,
|
||
route: {
|
||
location: this.props.history.location,
|
||
match: this.state.match
|
||
}
|
||
})
|
||
};
|
||
};
|
||
|
||
Router.prototype.computeMatch = function computeMatch(pathname) {
|
||
return {
|
||
path: "/",
|
||
url: "/",
|
||
params: {},
|
||
isExact: pathname === "/"
|
||
};
|
||
};
|
||
|
||
Router.prototype.componentWillMount = function componentWillMount() {
|
||
var _this2 = this;
|
||
|
||
var _props = this.props,
|
||
children = _props.children,
|
||
history = _props.history;
|
||
|
||
|
||
invariant_browser_default()(children == null || react_default.a.Children.count(children) === 1, "A <Router> may have only one child element");
|
||
|
||
// Do this here so we can setState when a <Redirect> changes the
|
||
// location in componentWillMount. This happens e.g. when doing
|
||
// server rendering using a <StaticRouter>.
|
||
this.unlisten = history.listen(function () {
|
||
_this2.setState({
|
||
match: _this2.computeMatch(history.location.pathname)
|
||
});
|
||
});
|
||
};
|
||
|
||
Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
||
warning_default()(this.props.history === nextProps.history, "You cannot change <Router history>");
|
||
};
|
||
|
||
Router.prototype.componentWillUnmount = function componentWillUnmount() {
|
||
this.unlisten();
|
||
};
|
||
|
||
Router.prototype.render = function render() {
|
||
var children = this.props.children;
|
||
|
||
return children ? react_default.a.Children.only(children) : null;
|
||
};
|
||
|
||
return Router;
|
||
}(react_default.a.Component);
|
||
|
||
Router_Router.propTypes = {
|
||
history: node_modules_prop_types_default.a.object.isRequired,
|
||
children: node_modules_prop_types_default.a.node
|
||
};
|
||
Router_Router.contextTypes = {
|
||
router: node_modules_prop_types_default.a.object
|
||
};
|
||
Router_Router.childContextTypes = {
|
||
router: node_modules_prop_types_default.a.object.isRequired
|
||
};
|
||
|
||
|
||
/* harmony default export */ var es_Router = (Router_Router);
|
||
// CONCATENATED MODULE: ./node_modules/react-router-dom/es/Router.js
|
||
// Written in this round about way for babel-transform-imports
|
||
|
||
|
||
/* harmony default export */ var react_router_dom_es_Router = (es_Router);
|
||
// CONCATENATED MODULE: ./node_modules/react-router-dom/es/BrowserRouter.js
|
||
function BrowserRouter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function BrowserRouter_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function BrowserRouter_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/**
|
||
* The public API for a <Router> that uses HTML5 history.
|
||
*/
|
||
|
||
var BrowserRouter_BrowserRouter = function (_React$Component) {
|
||
BrowserRouter_inherits(BrowserRouter, _React$Component);
|
||
|
||
function BrowserRouter() {
|
||
var _temp, _this, _ret;
|
||
|
||
BrowserRouter_classCallCheck(this, BrowserRouter);
|
||
|
||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
|
||
return _ret = (_temp = (_this = BrowserRouter_possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = es_createBrowserHistory(_this.props), _temp), BrowserRouter_possibleConstructorReturn(_this, _ret);
|
||
}
|
||
|
||
BrowserRouter.prototype.componentWillMount = function componentWillMount() {
|
||
warning_default()(!this.props.history, "<BrowserRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { BrowserRouter as Router }`.");
|
||
};
|
||
|
||
BrowserRouter.prototype.render = function render() {
|
||
return react_default.a.createElement(react_router_dom_es_Router, { history: this.history, children: this.props.children });
|
||
};
|
||
|
||
return BrowserRouter;
|
||
}(react_default.a.Component);
|
||
|
||
BrowserRouter_BrowserRouter.propTypes = {
|
||
basename: prop_types_default.a.string,
|
||
forceRefresh: prop_types_default.a.bool,
|
||
getUserConfirmation: prop_types_default.a.func,
|
||
keyLength: prop_types_default.a.number,
|
||
children: prop_types_default.a.node
|
||
};
|
||
|
||
|
||
/* harmony default export */ var es_BrowserRouter = (BrowserRouter_BrowserRouter);
|
||
// CONCATENATED MODULE: ./node_modules/react-router-dom/es/HashRouter.js
|
||
function HashRouter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function HashRouter_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function HashRouter_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/**
|
||
* The public API for a <Router> that uses window.location.hash.
|
||
*/
|
||
|
||
var HashRouter_HashRouter = function (_React$Component) {
|
||
HashRouter_inherits(HashRouter, _React$Component);
|
||
|
||
function HashRouter() {
|
||
var _temp, _this, _ret;
|
||
|
||
HashRouter_classCallCheck(this, HashRouter);
|
||
|
||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
|
||
return _ret = (_temp = (_this = HashRouter_possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = es_createHashHistory(_this.props), _temp), HashRouter_possibleConstructorReturn(_this, _ret);
|
||
}
|
||
|
||
HashRouter.prototype.componentWillMount = function componentWillMount() {
|
||
warning_default()(!this.props.history, "<HashRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { HashRouter as Router }`.");
|
||
};
|
||
|
||
HashRouter.prototype.render = function render() {
|
||
return react_default.a.createElement(react_router_dom_es_Router, { history: this.history, children: this.props.children });
|
||
};
|
||
|
||
return HashRouter;
|
||
}(react_default.a.Component);
|
||
|
||
HashRouter_HashRouter.propTypes = {
|
||
basename: prop_types_default.a.string,
|
||
getUserConfirmation: prop_types_default.a.func,
|
||
hashType: prop_types_default.a.oneOf(["hashbang", "noslash", "slash"]),
|
||
children: prop_types_default.a.node
|
||
};
|
||
|
||
|
||
/* harmony default export */ var es_HashRouter = (HashRouter_HashRouter);
|
||
// CONCATENATED MODULE: ./node_modules/react-router-dom/es/Link.js
|
||
var Link_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||
|
||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
||
|
||
function Link_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function Link_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function Link_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var isModifiedEvent = function isModifiedEvent(event) {
|
||
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
||
};
|
||
|
||
/**
|
||
* The public API for rendering a history-aware <a>.
|
||
*/
|
||
|
||
var Link_Link = function (_React$Component) {
|
||
Link_inherits(Link, _React$Component);
|
||
|
||
function Link() {
|
||
var _temp, _this, _ret;
|
||
|
||
Link_classCallCheck(this, Link);
|
||
|
||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
|
||
return _ret = (_temp = (_this = Link_possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {
|
||
if (_this.props.onClick) _this.props.onClick(event);
|
||
|
||
if (!event.defaultPrevented && // onClick prevented default
|
||
event.button === 0 && // ignore everything but left clicks
|
||
!_this.props.target && // let browser handle "target=_blank" etc.
|
||
!isModifiedEvent(event) // ignore clicks with modifier keys
|
||
) {
|
||
event.preventDefault();
|
||
|
||
var history = _this.context.router.history;
|
||
var _this$props = _this.props,
|
||
replace = _this$props.replace,
|
||
to = _this$props.to;
|
||
|
||
|
||
if (replace) {
|
||
history.replace(to);
|
||
} else {
|
||
history.push(to);
|
||
}
|
||
}
|
||
}, _temp), Link_possibleConstructorReturn(_this, _ret);
|
||
}
|
||
|
||
Link.prototype.render = function render() {
|
||
var _props = this.props,
|
||
replace = _props.replace,
|
||
to = _props.to,
|
||
innerRef = _props.innerRef,
|
||
props = _objectWithoutProperties(_props, ["replace", "to", "innerRef"]); // eslint-disable-line no-unused-vars
|
||
|
||
invariant_browser_default()(this.context.router, "You should not use <Link> outside a <Router>");
|
||
|
||
invariant_browser_default()(to !== undefined, 'You must specify the "to" property');
|
||
|
||
var history = this.context.router.history;
|
||
|
||
var location = typeof to === "string" ? LocationUtils_createLocation(to, null, null, history.location) : to;
|
||
|
||
var href = history.createHref(location);
|
||
return react_default.a.createElement("a", Link_extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));
|
||
};
|
||
|
||
return Link;
|
||
}(react_default.a.Component);
|
||
|
||
Link_Link.propTypes = {
|
||
onClick: prop_types_default.a.func,
|
||
target: prop_types_default.a.string,
|
||
replace: prop_types_default.a.bool,
|
||
to: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.object]).isRequired,
|
||
innerRef: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.func])
|
||
};
|
||
Link_Link.defaultProps = {
|
||
replace: false
|
||
};
|
||
Link_Link.contextTypes = {
|
||
router: prop_types_default.a.shape({
|
||
history: prop_types_default.a.shape({
|
||
push: prop_types_default.a.func.isRequired,
|
||
replace: prop_types_default.a.func.isRequired,
|
||
createHref: prop_types_default.a.func.isRequired
|
||
}).isRequired
|
||
}).isRequired
|
||
};
|
||
|
||
|
||
/* harmony default export */ var es_Link = (Link_Link);
|
||
// CONCATENATED MODULE: ./node_modules/react-router/es/MemoryRouter.js
|
||
function MemoryRouter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function MemoryRouter_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function MemoryRouter_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/**
|
||
* The public API for a <Router> that stores location in memory.
|
||
*/
|
||
|
||
var MemoryRouter_MemoryRouter = function (_React$Component) {
|
||
MemoryRouter_inherits(MemoryRouter, _React$Component);
|
||
|
||
function MemoryRouter() {
|
||
var _temp, _this, _ret;
|
||
|
||
MemoryRouter_classCallCheck(this, MemoryRouter);
|
||
|
||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
|
||
return _ret = (_temp = (_this = MemoryRouter_possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = es_createMemoryHistory(_this.props), _temp), MemoryRouter_possibleConstructorReturn(_this, _ret);
|
||
}
|
||
|
||
MemoryRouter.prototype.componentWillMount = function componentWillMount() {
|
||
warning_default()(!this.props.history, "<MemoryRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { MemoryRouter as Router }`.");
|
||
};
|
||
|
||
MemoryRouter.prototype.render = function render() {
|
||
return react_default.a.createElement(es_Router, { history: this.history, children: this.props.children });
|
||
};
|
||
|
||
return MemoryRouter;
|
||
}(react_default.a.Component);
|
||
|
||
MemoryRouter_MemoryRouter.propTypes = {
|
||
initialEntries: node_modules_prop_types_default.a.array,
|
||
initialIndex: node_modules_prop_types_default.a.number,
|
||
getUserConfirmation: node_modules_prop_types_default.a.func,
|
||
keyLength: node_modules_prop_types_default.a.number,
|
||
children: node_modules_prop_types_default.a.node
|
||
};
|
||
|
||
|
||
/* harmony default export */ var es_MemoryRouter = (MemoryRouter_MemoryRouter);
|
||
// CONCATENATED MODULE: ./node_modules/react-router-dom/es/MemoryRouter.js
|
||
// Written in this round about way for babel-transform-imports
|
||
|
||
|
||
/* harmony default export */ var react_router_dom_es_MemoryRouter = (es_MemoryRouter);
|
||
// EXTERNAL MODULE: ./node_modules/react-router/node_modules/path-to-regexp/index.js
|
||
var path_to_regexp = __webpack_require__("./node_modules/react-router/node_modules/path-to-regexp/index.js");
|
||
var path_to_regexp_default = /*#__PURE__*/__webpack_require__.n(path_to_regexp);
|
||
|
||
// CONCATENATED MODULE: ./node_modules/react-router/es/matchPath.js
|
||
|
||
|
||
var patternCache = {};
|
||
var cacheLimit = 10000;
|
||
var cacheCount = 0;
|
||
|
||
var matchPath_compilePath = function compilePath(pattern, options) {
|
||
var cacheKey = "" + options.end + options.strict + options.sensitive;
|
||
var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});
|
||
|
||
if (cache[pattern]) return cache[pattern];
|
||
|
||
var keys = [];
|
||
var re = path_to_regexp_default()(pattern, keys, options);
|
||
var compiledPattern = { re: re, keys: keys };
|
||
|
||
if (cacheCount < cacheLimit) {
|
||
cache[pattern] = compiledPattern;
|
||
cacheCount++;
|
||
}
|
||
|
||
return compiledPattern;
|
||
};
|
||
|
||
/**
|
||
* Public API for matching a URL pathname to a path pattern.
|
||
*/
|
||
var matchPath = function matchPath(pathname) {
|
||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||
var parent = arguments[2];
|
||
|
||
if (typeof options === "string") options = { path: options };
|
||
|
||
var _options = options,
|
||
path = _options.path,
|
||
_options$exact = _options.exact,
|
||
exact = _options$exact === undefined ? false : _options$exact,
|
||
_options$strict = _options.strict,
|
||
strict = _options$strict === undefined ? false : _options$strict,
|
||
_options$sensitive = _options.sensitive,
|
||
sensitive = _options$sensitive === undefined ? false : _options$sensitive;
|
||
|
||
|
||
if (path == null) return parent;
|
||
|
||
var _compilePath = matchPath_compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),
|
||
re = _compilePath.re,
|
||
keys = _compilePath.keys;
|
||
|
||
var match = re.exec(pathname);
|
||
|
||
if (!match) return null;
|
||
|
||
var url = match[0],
|
||
values = match.slice(1);
|
||
|
||
var isExact = pathname === url;
|
||
|
||
if (exact && !isExact) return null;
|
||
|
||
return {
|
||
path: path, // the path pattern used to match
|
||
url: path === "/" && url === "" ? "/" : url, // the matched portion of the URL
|
||
isExact: isExact, // whether or not we matched exactly
|
||
params: keys.reduce(function (memo, key, index) {
|
||
memo[key.name] = values[index];
|
||
return memo;
|
||
}, {})
|
||
};
|
||
};
|
||
|
||
/* harmony default export */ var es_matchPath = (matchPath);
|
||
// CONCATENATED MODULE: ./node_modules/react-router/es/Route.js
|
||
var Route_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||
|
||
function Route_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function Route_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function Route_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var Route_isEmptyChildren = function isEmptyChildren(children) {
|
||
return react_default.a.Children.count(children) === 0;
|
||
};
|
||
|
||
/**
|
||
* The public API for matching a single path and rendering.
|
||
*/
|
||
|
||
var Route_Route = function (_React$Component) {
|
||
Route_inherits(Route, _React$Component);
|
||
|
||
function Route() {
|
||
var _temp, _this, _ret;
|
||
|
||
Route_classCallCheck(this, Route);
|
||
|
||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
|
||
return _ret = (_temp = (_this = Route_possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
|
||
match: _this.computeMatch(_this.props, _this.context.router)
|
||
}, _temp), Route_possibleConstructorReturn(_this, _ret);
|
||
}
|
||
|
||
Route.prototype.getChildContext = function getChildContext() {
|
||
return {
|
||
router: Route_extends({}, this.context.router, {
|
||
route: {
|
||
location: this.props.location || this.context.router.route.location,
|
||
match: this.state.match
|
||
}
|
||
})
|
||
};
|
||
};
|
||
|
||
Route.prototype.computeMatch = function computeMatch(_ref, router) {
|
||
var computedMatch = _ref.computedMatch,
|
||
location = _ref.location,
|
||
path = _ref.path,
|
||
strict = _ref.strict,
|
||
exact = _ref.exact,
|
||
sensitive = _ref.sensitive;
|
||
|
||
if (computedMatch) return computedMatch; // <Switch> already computed the match for us
|
||
|
||
invariant_browser_default()(router, "You should not use <Route> or withRouter() outside a <Router>");
|
||
|
||
var route = router.route;
|
||
|
||
var pathname = (location || route.location).pathname;
|
||
|
||
return es_matchPath(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);
|
||
};
|
||
|
||
Route.prototype.componentWillMount = function componentWillMount() {
|
||
warning_default()(!(this.props.component && this.props.render), "You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored");
|
||
|
||
warning_default()(!(this.props.component && this.props.children && !Route_isEmptyChildren(this.props.children)), "You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored");
|
||
|
||
warning_default()(!(this.props.render && this.props.children && !Route_isEmptyChildren(this.props.children)), "You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored");
|
||
};
|
||
|
||
Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {
|
||
warning_default()(!(nextProps.location && !this.props.location), '<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.');
|
||
|
||
warning_default()(!(!nextProps.location && this.props.location), '<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.');
|
||
|
||
this.setState({
|
||
match: this.computeMatch(nextProps, nextContext.router)
|
||
});
|
||
};
|
||
|
||
Route.prototype.render = function render() {
|
||
var match = this.state.match;
|
||
var _props = this.props,
|
||
children = _props.children,
|
||
component = _props.component,
|
||
render = _props.render;
|
||
var _context$router = this.context.router,
|
||
history = _context$router.history,
|
||
route = _context$router.route,
|
||
staticContext = _context$router.staticContext;
|
||
|
||
var location = this.props.location || route.location;
|
||
var props = { match: match, location: location, history: history, staticContext: staticContext };
|
||
|
||
if (component) return match ? react_default.a.createElement(component, props) : null;
|
||
|
||
if (render) return match ? render(props) : null;
|
||
|
||
if (typeof children === "function") return children(props);
|
||
|
||
if (children && !Route_isEmptyChildren(children)) return react_default.a.Children.only(children);
|
||
|
||
return null;
|
||
};
|
||
|
||
return Route;
|
||
}(react_default.a.Component);
|
||
|
||
Route_Route.propTypes = {
|
||
computedMatch: node_modules_prop_types_default.a.object, // private, from <Switch>
|
||
path: node_modules_prop_types_default.a.string,
|
||
exact: node_modules_prop_types_default.a.bool,
|
||
strict: node_modules_prop_types_default.a.bool,
|
||
sensitive: node_modules_prop_types_default.a.bool,
|
||
component: node_modules_prop_types_default.a.func,
|
||
render: node_modules_prop_types_default.a.func,
|
||
children: node_modules_prop_types_default.a.oneOfType([node_modules_prop_types_default.a.func, node_modules_prop_types_default.a.node]),
|
||
location: node_modules_prop_types_default.a.object
|
||
};
|
||
Route_Route.contextTypes = {
|
||
router: node_modules_prop_types_default.a.shape({
|
||
history: node_modules_prop_types_default.a.object.isRequired,
|
||
route: node_modules_prop_types_default.a.object.isRequired,
|
||
staticContext: node_modules_prop_types_default.a.object
|
||
})
|
||
};
|
||
Route_Route.childContextTypes = {
|
||
router: node_modules_prop_types_default.a.object.isRequired
|
||
};
|
||
|
||
|
||
/* harmony default export */ var es_Route = (Route_Route);
|
||
// CONCATENATED MODULE: ./node_modules/react-router-dom/es/Route.js
|
||
// Written in this round about way for babel-transform-imports
|
||
|
||
|
||
/* harmony default export */ var react_router_dom_es_Route = (es_Route);
|
||
// CONCATENATED MODULE: ./node_modules/react-router-dom/es/NavLink.js
|
||
var NavLink_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||
|
||
var NavLink_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||
|
||
function NavLink_objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/**
|
||
* A <Link> wrapper that knows if it's "active" or not.
|
||
*/
|
||
var NavLink_NavLink = function NavLink(_ref) {
|
||
var to = _ref.to,
|
||
exact = _ref.exact,
|
||
strict = _ref.strict,
|
||
location = _ref.location,
|
||
activeClassName = _ref.activeClassName,
|
||
className = _ref.className,
|
||
activeStyle = _ref.activeStyle,
|
||
style = _ref.style,
|
||
getIsActive = _ref.isActive,
|
||
ariaCurrent = _ref["aria-current"],
|
||
rest = NavLink_objectWithoutProperties(_ref, ["to", "exact", "strict", "location", "activeClassName", "className", "activeStyle", "style", "isActive", "aria-current"]);
|
||
|
||
var path = (typeof to === "undefined" ? "undefined" : NavLink_typeof(to)) === "object" ? to.pathname : to;
|
||
|
||
// Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202
|
||
var escapedPath = path && path.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
|
||
|
||
return react_default.a.createElement(react_router_dom_es_Route, {
|
||
path: escapedPath,
|
||
exact: exact,
|
||
strict: strict,
|
||
location: location,
|
||
children: function children(_ref2) {
|
||
var location = _ref2.location,
|
||
match = _ref2.match;
|
||
|
||
var isActive = !!(getIsActive ? getIsActive(match, location) : match);
|
||
|
||
return react_default.a.createElement(es_Link, NavLink_extends({
|
||
to: to,
|
||
className: isActive ? [className, activeClassName].filter(function (i) {
|
||
return i;
|
||
}).join(" ") : className,
|
||
style: isActive ? NavLink_extends({}, style, activeStyle) : style,
|
||
"aria-current": isActive && ariaCurrent || null
|
||
}, rest));
|
||
}
|
||
});
|
||
};
|
||
|
||
NavLink_NavLink.propTypes = {
|
||
to: es_Link.propTypes.to,
|
||
exact: prop_types_default.a.bool,
|
||
strict: prop_types_default.a.bool,
|
||
location: prop_types_default.a.object,
|
||
activeClassName: prop_types_default.a.string,
|
||
className: prop_types_default.a.string,
|
||
activeStyle: prop_types_default.a.object,
|
||
style: prop_types_default.a.object,
|
||
isActive: prop_types_default.a.func,
|
||
"aria-current": prop_types_default.a.oneOf(["page", "step", "location", "date", "time", "true"])
|
||
};
|
||
|
||
NavLink_NavLink.defaultProps = {
|
||
activeClassName: "active",
|
||
"aria-current": "page"
|
||
};
|
||
|
||
/* harmony default export */ var es_NavLink = (NavLink_NavLink);
|
||
// CONCATENATED MODULE: ./node_modules/react-router/es/Prompt.js
|
||
function Prompt_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function Prompt_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function Prompt_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
|
||
|
||
|
||
|
||
/**
|
||
* The public API for prompting the user before navigating away
|
||
* from a screen with a component.
|
||
*/
|
||
|
||
var Prompt_Prompt = function (_React$Component) {
|
||
Prompt_inherits(Prompt, _React$Component);
|
||
|
||
function Prompt() {
|
||
Prompt_classCallCheck(this, Prompt);
|
||
|
||
return Prompt_possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
||
}
|
||
|
||
Prompt.prototype.enable = function enable(message) {
|
||
if (this.unblock) this.unblock();
|
||
|
||
this.unblock = this.context.router.history.block(message);
|
||
};
|
||
|
||
Prompt.prototype.disable = function disable() {
|
||
if (this.unblock) {
|
||
this.unblock();
|
||
this.unblock = null;
|
||
}
|
||
};
|
||
|
||
Prompt.prototype.componentWillMount = function componentWillMount() {
|
||
invariant_browser_default()(this.context.router, "You should not use <Prompt> outside a <Router>");
|
||
|
||
if (this.props.when) this.enable(this.props.message);
|
||
};
|
||
|
||
Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
||
if (nextProps.when) {
|
||
if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);
|
||
} else {
|
||
this.disable();
|
||
}
|
||
};
|
||
|
||
Prompt.prototype.componentWillUnmount = function componentWillUnmount() {
|
||
this.disable();
|
||
};
|
||
|
||
Prompt.prototype.render = function render() {
|
||
return null;
|
||
};
|
||
|
||
return Prompt;
|
||
}(react_default.a.Component);
|
||
|
||
Prompt_Prompt.propTypes = {
|
||
when: node_modules_prop_types_default.a.bool,
|
||
message: node_modules_prop_types_default.a.oneOfType([node_modules_prop_types_default.a.func, node_modules_prop_types_default.a.string]).isRequired
|
||
};
|
||
Prompt_Prompt.defaultProps = {
|
||
when: true
|
||
};
|
||
Prompt_Prompt.contextTypes = {
|
||
router: node_modules_prop_types_default.a.shape({
|
||
history: node_modules_prop_types_default.a.shape({
|
||
block: node_modules_prop_types_default.a.func.isRequired
|
||
}).isRequired
|
||
}).isRequired
|
||
};
|
||
|
||
|
||
/* harmony default export */ var es_Prompt = (Prompt_Prompt);
|
||
// CONCATENATED MODULE: ./node_modules/react-router-dom/es/Prompt.js
|
||
// Written in this round about way for babel-transform-imports
|
||
|
||
|
||
/* harmony default export */ var react_router_dom_es_Prompt = (es_Prompt);
|
||
// CONCATENATED MODULE: ./node_modules/react-router/es/generatePath.js
|
||
|
||
|
||
var generatePath_patternCache = {};
|
||
var generatePath_cacheLimit = 10000;
|
||
var generatePath_cacheCount = 0;
|
||
|
||
var generatePath_compileGenerator = function compileGenerator(pattern) {
|
||
var cacheKey = pattern;
|
||
var cache = generatePath_patternCache[cacheKey] || (generatePath_patternCache[cacheKey] = {});
|
||
|
||
if (cache[pattern]) return cache[pattern];
|
||
|
||
var compiledGenerator = path_to_regexp_default.a.compile(pattern);
|
||
|
||
if (generatePath_cacheCount < generatePath_cacheLimit) {
|
||
cache[pattern] = compiledGenerator;
|
||
generatePath_cacheCount++;
|
||
}
|
||
|
||
return compiledGenerator;
|
||
};
|
||
|
||
/**
|
||
* Public API for generating a URL pathname from a pattern and parameters.
|
||
*/
|
||
var generatePath = function generatePath() {
|
||
var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "/";
|
||
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||
|
||
if (pattern === "/") {
|
||
return pattern;
|
||
}
|
||
var generator = generatePath_compileGenerator(pattern);
|
||
return generator(params, { pretty: true });
|
||
};
|
||
|
||
/* harmony default export */ var es_generatePath = (generatePath);
|
||
// CONCATENATED MODULE: ./node_modules/react-router/es/Redirect.js
|
||
var Redirect_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||
|
||
function Redirect_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function Redirect_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function Redirect_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/**
|
||
* The public API for updating the location programmatically
|
||
* with a component.
|
||
*/
|
||
|
||
var Redirect_Redirect = function (_React$Component) {
|
||
Redirect_inherits(Redirect, _React$Component);
|
||
|
||
function Redirect() {
|
||
Redirect_classCallCheck(this, Redirect);
|
||
|
||
return Redirect_possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
||
}
|
||
|
||
Redirect.prototype.isStatic = function isStatic() {
|
||
return this.context.router && this.context.router.staticContext;
|
||
};
|
||
|
||
Redirect.prototype.componentWillMount = function componentWillMount() {
|
||
invariant_browser_default()(this.context.router, "You should not use <Redirect> outside a <Router>");
|
||
|
||
if (this.isStatic()) this.perform();
|
||
};
|
||
|
||
Redirect.prototype.componentDidMount = function componentDidMount() {
|
||
if (!this.isStatic()) this.perform();
|
||
};
|
||
|
||
Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
|
||
var prevTo = LocationUtils_createLocation(prevProps.to);
|
||
var nextTo = LocationUtils_createLocation(this.props.to);
|
||
|
||
if (LocationUtils_locationsAreEqual(prevTo, nextTo)) {
|
||
warning_default()(false, "You tried to redirect to the same route you're currently on: " + ("\"" + nextTo.pathname + nextTo.search + "\""));
|
||
return;
|
||
}
|
||
|
||
this.perform();
|
||
};
|
||
|
||
Redirect.prototype.computeTo = function computeTo(_ref) {
|
||
var computedMatch = _ref.computedMatch,
|
||
to = _ref.to;
|
||
|
||
if (computedMatch) {
|
||
if (typeof to === "string") {
|
||
return es_generatePath(to, computedMatch.params);
|
||
} else {
|
||
return Redirect_extends({}, to, {
|
||
pathname: es_generatePath(to.pathname, computedMatch.params)
|
||
});
|
||
}
|
||
}
|
||
|
||
return to;
|
||
};
|
||
|
||
Redirect.prototype.perform = function perform() {
|
||
var history = this.context.router.history;
|
||
var push = this.props.push;
|
||
|
||
var to = this.computeTo(this.props);
|
||
|
||
if (push) {
|
||
history.push(to);
|
||
} else {
|
||
history.replace(to);
|
||
}
|
||
};
|
||
|
||
Redirect.prototype.render = function render() {
|
||
return null;
|
||
};
|
||
|
||
return Redirect;
|
||
}(react_default.a.Component);
|
||
|
||
Redirect_Redirect.propTypes = {
|
||
computedMatch: node_modules_prop_types_default.a.object, // private, from <Switch>
|
||
push: node_modules_prop_types_default.a.bool,
|
||
from: node_modules_prop_types_default.a.string,
|
||
to: node_modules_prop_types_default.a.oneOfType([node_modules_prop_types_default.a.string, node_modules_prop_types_default.a.object]).isRequired
|
||
};
|
||
Redirect_Redirect.defaultProps = {
|
||
push: false
|
||
};
|
||
Redirect_Redirect.contextTypes = {
|
||
router: node_modules_prop_types_default.a.shape({
|
||
history: node_modules_prop_types_default.a.shape({
|
||
push: node_modules_prop_types_default.a.func.isRequired,
|
||
replace: node_modules_prop_types_default.a.func.isRequired
|
||
}).isRequired,
|
||
staticContext: node_modules_prop_types_default.a.object
|
||
}).isRequired
|
||
};
|
||
|
||
|
||
/* harmony default export */ var es_Redirect = (Redirect_Redirect);
|
||
// CONCATENATED MODULE: ./node_modules/react-router-dom/es/Redirect.js
|
||
// Written in this round about way for babel-transform-imports
|
||
|
||
|
||
/* harmony default export */ var react_router_dom_es_Redirect = (es_Redirect);
|
||
// CONCATENATED MODULE: ./node_modules/react-router/es/StaticRouter.js
|
||
var StaticRouter_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||
|
||
function StaticRouter_objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
||
|
||
function StaticRouter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function StaticRouter_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function StaticRouter_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var StaticRouter_addLeadingSlash = function addLeadingSlash(path) {
|
||
return path.charAt(0) === "/" ? path : "/" + path;
|
||
};
|
||
|
||
var addBasename = function addBasename(basename, location) {
|
||
if (!basename) return location;
|
||
|
||
return StaticRouter_extends({}, location, {
|
||
pathname: StaticRouter_addLeadingSlash(basename) + location.pathname
|
||
});
|
||
};
|
||
|
||
var StaticRouter_stripBasename = function stripBasename(basename, location) {
|
||
if (!basename) return location;
|
||
|
||
var base = StaticRouter_addLeadingSlash(basename);
|
||
|
||
if (location.pathname.indexOf(base) !== 0) return location;
|
||
|
||
return StaticRouter_extends({}, location, {
|
||
pathname: location.pathname.substr(base.length)
|
||
});
|
||
};
|
||
|
||
var StaticRouter_createURL = function createURL(location) {
|
||
return typeof location === "string" ? location : createPath(location);
|
||
};
|
||
|
||
var StaticRouter_staticHandler = function staticHandler(methodName) {
|
||
return function () {
|
||
invariant_browser_default()(false, "You cannot %s with <StaticRouter>", methodName);
|
||
};
|
||
};
|
||
|
||
var noop = function noop() {};
|
||
|
||
/**
|
||
* The public top-level API for a "static" <Router>, so-called because it
|
||
* can't actually change the current location. Instead, it just records
|
||
* location changes in a context object. Useful mainly in testing and
|
||
* server-rendering scenarios.
|
||
*/
|
||
|
||
var StaticRouter_StaticRouter = function (_React$Component) {
|
||
StaticRouter_inherits(StaticRouter, _React$Component);
|
||
|
||
function StaticRouter() {
|
||
var _temp, _this, _ret;
|
||
|
||
StaticRouter_classCallCheck(this, StaticRouter);
|
||
|
||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
|
||
return _ret = (_temp = (_this = StaticRouter_possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {
|
||
return StaticRouter_addLeadingSlash(_this.props.basename + StaticRouter_createURL(path));
|
||
}, _this.handlePush = function (location) {
|
||
var _this$props = _this.props,
|
||
basename = _this$props.basename,
|
||
context = _this$props.context;
|
||
|
||
context.action = "PUSH";
|
||
context.location = addBasename(basename, LocationUtils_createLocation(location));
|
||
context.url = StaticRouter_createURL(context.location);
|
||
}, _this.handleReplace = function (location) {
|
||
var _this$props2 = _this.props,
|
||
basename = _this$props2.basename,
|
||
context = _this$props2.context;
|
||
|
||
context.action = "REPLACE";
|
||
context.location = addBasename(basename, LocationUtils_createLocation(location));
|
||
context.url = StaticRouter_createURL(context.location);
|
||
}, _this.handleListen = function () {
|
||
return noop;
|
||
}, _this.handleBlock = function () {
|
||
return noop;
|
||
}, _temp), StaticRouter_possibleConstructorReturn(_this, _ret);
|
||
}
|
||
|
||
StaticRouter.prototype.getChildContext = function getChildContext() {
|
||
return {
|
||
router: {
|
||
staticContext: this.props.context
|
||
}
|
||
};
|
||
};
|
||
|
||
StaticRouter.prototype.componentWillMount = function componentWillMount() {
|
||
warning_default()(!this.props.history, "<StaticRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { StaticRouter as Router }`.");
|
||
};
|
||
|
||
StaticRouter.prototype.render = function render() {
|
||
var _props = this.props,
|
||
basename = _props.basename,
|
||
context = _props.context,
|
||
location = _props.location,
|
||
props = StaticRouter_objectWithoutProperties(_props, ["basename", "context", "location"]);
|
||
|
||
var history = {
|
||
createHref: this.createHref,
|
||
action: "POP",
|
||
location: StaticRouter_stripBasename(basename, LocationUtils_createLocation(location)),
|
||
push: this.handlePush,
|
||
replace: this.handleReplace,
|
||
go: StaticRouter_staticHandler("go"),
|
||
goBack: StaticRouter_staticHandler("goBack"),
|
||
goForward: StaticRouter_staticHandler("goForward"),
|
||
listen: this.handleListen,
|
||
block: this.handleBlock
|
||
};
|
||
|
||
return react_default.a.createElement(es_Router, StaticRouter_extends({}, props, { history: history }));
|
||
};
|
||
|
||
return StaticRouter;
|
||
}(react_default.a.Component);
|
||
|
||
StaticRouter_StaticRouter.propTypes = {
|
||
basename: node_modules_prop_types_default.a.string,
|
||
context: node_modules_prop_types_default.a.object.isRequired,
|
||
location: node_modules_prop_types_default.a.oneOfType([node_modules_prop_types_default.a.string, node_modules_prop_types_default.a.object])
|
||
};
|
||
StaticRouter_StaticRouter.defaultProps = {
|
||
basename: "",
|
||
location: "/"
|
||
};
|
||
StaticRouter_StaticRouter.childContextTypes = {
|
||
router: node_modules_prop_types_default.a.object.isRequired
|
||
};
|
||
|
||
|
||
/* harmony default export */ var es_StaticRouter = (StaticRouter_StaticRouter);
|
||
// CONCATENATED MODULE: ./node_modules/react-router-dom/es/StaticRouter.js
|
||
// Written in this round about way for babel-transform-imports
|
||
|
||
|
||
/* harmony default export */ var react_router_dom_es_StaticRouter = (es_StaticRouter);
|
||
// CONCATENATED MODULE: ./node_modules/react-router/es/Switch.js
|
||
function Switch_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function Switch_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||
|
||
function Switch_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/**
|
||
* The public API for rendering the first <Route> that matches.
|
||
*/
|
||
|
||
var Switch_Switch = function (_React$Component) {
|
||
Switch_inherits(Switch, _React$Component);
|
||
|
||
function Switch() {
|
||
Switch_classCallCheck(this, Switch);
|
||
|
||
return Switch_possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
||
}
|
||
|
||
Switch.prototype.componentWillMount = function componentWillMount() {
|
||
invariant_browser_default()(this.context.router, "You should not use <Switch> outside a <Router>");
|
||
};
|
||
|
||
Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
||
warning_default()(!(nextProps.location && !this.props.location), '<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.');
|
||
|
||
warning_default()(!(!nextProps.location && this.props.location), '<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.');
|
||
};
|
||
|
||
Switch.prototype.render = function render() {
|
||
var route = this.context.router.route;
|
||
var children = this.props.children;
|
||
|
||
var location = this.props.location || route.location;
|
||
|
||
var match = void 0,
|
||
child = void 0;
|
||
react_default.a.Children.forEach(children, function (element) {
|
||
if (match == null && react_default.a.isValidElement(element)) {
|
||
var _element$props = element.props,
|
||
pathProp = _element$props.path,
|
||
exact = _element$props.exact,
|
||
strict = _element$props.strict,
|
||
sensitive = _element$props.sensitive,
|
||
from = _element$props.from;
|
||
|
||
var path = pathProp || from;
|
||
|
||
child = element;
|
||
match = es_matchPath(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);
|
||
}
|
||
});
|
||
|
||
return match ? react_default.a.cloneElement(child, { location: location, computedMatch: match }) : null;
|
||
};
|
||
|
||
return Switch;
|
||
}(react_default.a.Component);
|
||
|
||
Switch_Switch.contextTypes = {
|
||
router: node_modules_prop_types_default.a.shape({
|
||
route: node_modules_prop_types_default.a.object.isRequired
|
||
}).isRequired
|
||
};
|
||
Switch_Switch.propTypes = {
|
||
children: node_modules_prop_types_default.a.node,
|
||
location: node_modules_prop_types_default.a.object
|
||
};
|
||
|
||
|
||
/* harmony default export */ var es_Switch = (Switch_Switch);
|
||
// CONCATENATED MODULE: ./node_modules/react-router-dom/es/Switch.js
|
||
// Written in this round about way for babel-transform-imports
|
||
|
||
|
||
/* harmony default export */ var react_router_dom_es_Switch = (es_Switch);
|
||
// CONCATENATED MODULE: ./node_modules/react-router-dom/es/generatePath.js
|
||
// Written in this round about way for babel-transform-imports
|
||
|
||
|
||
/* harmony default export */ var react_router_dom_es_generatePath = (es_generatePath);
|
||
// CONCATENATED MODULE: ./node_modules/react-router-dom/es/matchPath.js
|
||
// Written in this round about way for babel-transform-imports
|
||
|
||
|
||
/* harmony default export */ var react_router_dom_es_matchPath = (es_matchPath);
|
||
// EXTERNAL MODULE: ./node_modules/react-router/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
|
||
var hoist_non_react_statics_cjs = __webpack_require__("./node_modules/react-router/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js");
|
||
var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
|
||
|
||
// CONCATENATED MODULE: ./node_modules/react-router/es/withRouter.js
|
||
var withRouter_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||
|
||
function withRouter_objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/**
|
||
* A public higher-order component to access the imperative API
|
||
*/
|
||
var withRouter_withRouter = function withRouter(Component) {
|
||
var C = function C(props) {
|
||
var wrappedComponentRef = props.wrappedComponentRef,
|
||
remainingProps = withRouter_objectWithoutProperties(props, ["wrappedComponentRef"]);
|
||
|
||
return react_default.a.createElement(es_Route, {
|
||
children: function children(routeComponentProps) {
|
||
return react_default.a.createElement(Component, withRouter_extends({}, remainingProps, routeComponentProps, {
|
||
ref: wrappedComponentRef
|
||
}));
|
||
}
|
||
});
|
||
};
|
||
|
||
C.displayName = "withRouter(" + (Component.displayName || Component.name) + ")";
|
||
C.WrappedComponent = Component;
|
||
C.propTypes = {
|
||
wrappedComponentRef: node_modules_prop_types_default.a.func
|
||
};
|
||
|
||
return hoist_non_react_statics_cjs_default()(C, Component);
|
||
};
|
||
|
||
/* harmony default export */ var es_withRouter = (withRouter_withRouter);
|
||
// CONCATENATED MODULE: ./node_modules/react-router-dom/es/withRouter.js
|
||
// Written in this round about way for babel-transform-imports
|
||
|
||
|
||
/* harmony default export */ var react_router_dom_es_withRouter = (es_withRouter);
|
||
// CONCATENATED MODULE: ./node_modules/react-router-dom/es/index.js
|
||
/* concated harmony reexport BrowserRouter */__webpack_require__.d(__webpack_exports__, "BrowserRouter", function() { return es_BrowserRouter; });
|
||
/* concated harmony reexport HashRouter */__webpack_require__.d(__webpack_exports__, "HashRouter", function() { return es_HashRouter; });
|
||
/* concated harmony reexport Link */__webpack_require__.d(__webpack_exports__, "Link", function() { return es_Link; });
|
||
/* concated harmony reexport MemoryRouter */__webpack_require__.d(__webpack_exports__, "MemoryRouter", function() { return react_router_dom_es_MemoryRouter; });
|
||
/* concated harmony reexport NavLink */__webpack_require__.d(__webpack_exports__, "NavLink", function() { return es_NavLink; });
|
||
/* concated harmony reexport Prompt */__webpack_require__.d(__webpack_exports__, "Prompt", function() { return react_router_dom_es_Prompt; });
|
||
/* concated harmony reexport Redirect */__webpack_require__.d(__webpack_exports__, "Redirect", function() { return react_router_dom_es_Redirect; });
|
||
/* concated harmony reexport Route */__webpack_require__.d(__webpack_exports__, "Route", function() { return react_router_dom_es_Route; });
|
||
/* concated harmony reexport Router */__webpack_require__.d(__webpack_exports__, "Router", function() { return react_router_dom_es_Router; });
|
||
/* concated harmony reexport StaticRouter */__webpack_require__.d(__webpack_exports__, "StaticRouter", function() { return react_router_dom_es_StaticRouter; });
|
||
/* concated harmony reexport Switch */__webpack_require__.d(__webpack_exports__, "Switch", function() { return react_router_dom_es_Switch; });
|
||
/* concated harmony reexport generatePath */__webpack_require__.d(__webpack_exports__, "generatePath", function() { return react_router_dom_es_generatePath; });
|
||
/* concated harmony reexport matchPath */__webpack_require__.d(__webpack_exports__, "matchPath", function() { return react_router_dom_es_matchPath; });
|
||
/* concated harmony reexport withRouter */__webpack_require__.d(__webpack_exports__, "withRouter", function() { return react_router_dom_es_withRouter; });
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router-dom/node_modules/prop-types/checkPropTypes.js":
|
||
/*!*********************************************************************************!*\
|
||
!*** ./node_modules/react-router-dom/node_modules/prop-types/checkPropTypes.js ***!
|
||
\*********************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
var printWarning = function() {};
|
||
|
||
if (true) {
|
||
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/react-router-dom/node_modules/prop-types/lib/ReactPropTypesSecret.js");
|
||
var loggedTypeFailures = {};
|
||
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
||
|
||
printWarning = function(text) {
|
||
var message = 'Warning: ' + text;
|
||
if (typeof console !== 'undefined') {
|
||
console.error(message);
|
||
}
|
||
try {
|
||
// --- Welcome to debugging React ---
|
||
// This error was thrown as a convenience so that you can use this stack
|
||
// to find the callsite that caused this warning to fire.
|
||
throw new Error(message);
|
||
} catch (x) {}
|
||
};
|
||
}
|
||
|
||
/**
|
||
* Assert that the values match with the type specs.
|
||
* Error messages are memorized and will only be shown once.
|
||
*
|
||
* @param {object} typeSpecs Map of name to a ReactPropType
|
||
* @param {object} values Runtime values that need to be type-checked
|
||
* @param {string} location e.g. "prop", "context", "child context"
|
||
* @param {string} componentName Name of the component for error messages.
|
||
* @param {?Function} getStack Returns the component stack.
|
||
* @private
|
||
*/
|
||
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
||
if (true) {
|
||
for (var typeSpecName in typeSpecs) {
|
||
if (has(typeSpecs, typeSpecName)) {
|
||
var error;
|
||
// Prop type validation may throw. In case they do, we don't want to
|
||
// fail the render phase where it didn't fail before. So we log it.
|
||
// After these have been cleaned up, we'll let them throw.
|
||
try {
|
||
// This is intentionally an invariant that gets caught. It's the same
|
||
// behavior as without this statement except with a better message.
|
||
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
||
var err = Error(
|
||
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
||
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
||
);
|
||
err.name = 'Invariant Violation';
|
||
throw err;
|
||
}
|
||
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
||
} catch (ex) {
|
||
error = ex;
|
||
}
|
||
if (error && !(error instanceof Error)) {
|
||
printWarning(
|
||
(componentName || 'React class') + ': type specification of ' +
|
||
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
||
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
||
'You may have forgotten to pass an argument to the type checker ' +
|
||
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
||
'shape all require an argument).'
|
||
);
|
||
}
|
||
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
||
// Only monitor this failure once because there tends to be a lot of the
|
||
// same error.
|
||
loggedTypeFailures[error.message] = true;
|
||
|
||
var stack = getStack ? getStack() : '';
|
||
|
||
printWarning(
|
||
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
||
);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Resets warning cache when testing.
|
||
*
|
||
* @private
|
||
*/
|
||
checkPropTypes.resetWarningCache = function() {
|
||
if (true) {
|
||
loggedTypeFailures = {};
|
||
}
|
||
}
|
||
|
||
module.exports = checkPropTypes;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router-dom/node_modules/prop-types/factoryWithTypeCheckers.js":
|
||
/*!******************************************************************************************!*\
|
||
!*** ./node_modules/react-router-dom/node_modules/prop-types/factoryWithTypeCheckers.js ***!
|
||
\******************************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-router-dom/node_modules/react-is/index.js");
|
||
var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
|
||
|
||
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/react-router-dom/node_modules/prop-types/lib/ReactPropTypesSecret.js");
|
||
var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/react-router-dom/node_modules/prop-types/checkPropTypes.js");
|
||
|
||
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
||
var printWarning = function() {};
|
||
|
||
if (true) {
|
||
printWarning = function(text) {
|
||
var message = 'Warning: ' + text;
|
||
if (typeof console !== 'undefined') {
|
||
console.error(message);
|
||
}
|
||
try {
|
||
// --- Welcome to debugging React ---
|
||
// This error was thrown as a convenience so that you can use this stack
|
||
// to find the callsite that caused this warning to fire.
|
||
throw new Error(message);
|
||
} catch (x) {}
|
||
};
|
||
}
|
||
|
||
function emptyFunctionThatReturnsNull() {
|
||
return null;
|
||
}
|
||
|
||
module.exports = function(isValidElement, throwOnDirectAccess) {
|
||
/* global Symbol */
|
||
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
||
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
||
|
||
/**
|
||
* Returns the iterator method function contained on the iterable object.
|
||
*
|
||
* Be sure to invoke the function with the iterable as context:
|
||
*
|
||
* var iteratorFn = getIteratorFn(myIterable);
|
||
* if (iteratorFn) {
|
||
* var iterator = iteratorFn.call(myIterable);
|
||
* ...
|
||
* }
|
||
*
|
||
* @param {?object} maybeIterable
|
||
* @return {?function}
|
||
*/
|
||
function getIteratorFn(maybeIterable) {
|
||
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
||
if (typeof iteratorFn === 'function') {
|
||
return iteratorFn;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Collection of methods that allow declaration and validation of props that are
|
||
* supplied to React components. Example usage:
|
||
*
|
||
* var Props = require('ReactPropTypes');
|
||
* var MyArticle = React.createClass({
|
||
* propTypes: {
|
||
* // An optional string prop named "description".
|
||
* description: Props.string,
|
||
*
|
||
* // A required enum prop named "category".
|
||
* category: Props.oneOf(['News','Photos']).isRequired,
|
||
*
|
||
* // A prop named "dialog" that requires an instance of Dialog.
|
||
* dialog: Props.instanceOf(Dialog).isRequired
|
||
* },
|
||
* render: function() { ... }
|
||
* });
|
||
*
|
||
* A more formal specification of how these methods are used:
|
||
*
|
||
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
||
* decl := ReactPropTypes.{type}(.isRequired)?
|
||
*
|
||
* Each and every declaration produces a function with the same signature. This
|
||
* allows the creation of custom validation functions. For example:
|
||
*
|
||
* var MyLink = React.createClass({
|
||
* propTypes: {
|
||
* // An optional string or URI prop named "href".
|
||
* href: function(props, propName, componentName) {
|
||
* var propValue = props[propName];
|
||
* if (propValue != null && typeof propValue !== 'string' &&
|
||
* !(propValue instanceof URI)) {
|
||
* return new Error(
|
||
* 'Expected a string or an URI for ' + propName + ' in ' +
|
||
* componentName
|
||
* );
|
||
* }
|
||
* }
|
||
* },
|
||
* render: function() {...}
|
||
* });
|
||
*
|
||
* @internal
|
||
*/
|
||
|
||
var ANONYMOUS = '<<anonymous>>';
|
||
|
||
// Important!
|
||
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
||
var ReactPropTypes = {
|
||
array: createPrimitiveTypeChecker('array'),
|
||
bool: createPrimitiveTypeChecker('boolean'),
|
||
func: createPrimitiveTypeChecker('function'),
|
||
number: createPrimitiveTypeChecker('number'),
|
||
object: createPrimitiveTypeChecker('object'),
|
||
string: createPrimitiveTypeChecker('string'),
|
||
symbol: createPrimitiveTypeChecker('symbol'),
|
||
|
||
any: createAnyTypeChecker(),
|
||
arrayOf: createArrayOfTypeChecker,
|
||
element: createElementTypeChecker(),
|
||
elementType: createElementTypeTypeChecker(),
|
||
instanceOf: createInstanceTypeChecker,
|
||
node: createNodeChecker(),
|
||
objectOf: createObjectOfTypeChecker,
|
||
oneOf: createEnumTypeChecker,
|
||
oneOfType: createUnionTypeChecker,
|
||
shape: createShapeTypeChecker,
|
||
exact: createStrictShapeTypeChecker,
|
||
};
|
||
|
||
/**
|
||
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
||
*/
|
||
/*eslint-disable no-self-compare*/
|
||
function is(x, y) {
|
||
// SameValue algorithm
|
||
if (x === y) {
|
||
// Steps 1-5, 7-10
|
||
// Steps 6.b-6.e: +0 != -0
|
||
return x !== 0 || 1 / x === 1 / y;
|
||
} else {
|
||
// Step 6.a: NaN == NaN
|
||
return x !== x && y !== y;
|
||
}
|
||
}
|
||
/*eslint-enable no-self-compare*/
|
||
|
||
/**
|
||
* We use an Error-like object for backward compatibility as people may call
|
||
* PropTypes directly and inspect their output. However, we don't use real
|
||
* Errors anymore. We don't inspect their stack anyway, and creating them
|
||
* is prohibitively expensive if they are created too often, such as what
|
||
* happens in oneOfType() for any type before the one that matched.
|
||
*/
|
||
function PropTypeError(message) {
|
||
this.message = message;
|
||
this.stack = '';
|
||
}
|
||
// Make `instanceof Error` still work for returned errors.
|
||
PropTypeError.prototype = Error.prototype;
|
||
|
||
function createChainableTypeChecker(validate) {
|
||
if (true) {
|
||
var manualPropTypeCallCache = {};
|
||
var manualPropTypeWarningCount = 0;
|
||
}
|
||
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
||
componentName = componentName || ANONYMOUS;
|
||
propFullName = propFullName || propName;
|
||
|
||
if (secret !== ReactPropTypesSecret) {
|
||
if (throwOnDirectAccess) {
|
||
// New behavior only for users of `prop-types` package
|
||
var err = new Error(
|
||
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
||
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
||
'Read more at http://fb.me/use-check-prop-types'
|
||
);
|
||
err.name = 'Invariant Violation';
|
||
throw err;
|
||
} else if ( true && typeof console !== 'undefined') {
|
||
// Old behavior for people using React.PropTypes
|
||
var cacheKey = componentName + ':' + propName;
|
||
if (
|
||
!manualPropTypeCallCache[cacheKey] &&
|
||
// Avoid spamming the console because they are often not actionable except for lib authors
|
||
manualPropTypeWarningCount < 3
|
||
) {
|
||
printWarning(
|
||
'You are manually calling a React.PropTypes validation ' +
|
||
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
||
'and will throw in the standalone `prop-types` package. ' +
|
||
'You may be seeing this warning due to a third-party PropTypes ' +
|
||
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
||
);
|
||
manualPropTypeCallCache[cacheKey] = true;
|
||
manualPropTypeWarningCount++;
|
||
}
|
||
}
|
||
}
|
||
if (props[propName] == null) {
|
||
if (isRequired) {
|
||
if (props[propName] === null) {
|
||
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
||
}
|
||
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
||
}
|
||
return null;
|
||
} else {
|
||
return validate(props, propName, componentName, location, propFullName);
|
||
}
|
||
}
|
||
|
||
var chainedCheckType = checkType.bind(null, false);
|
||
chainedCheckType.isRequired = checkType.bind(null, true);
|
||
|
||
return chainedCheckType;
|
||
}
|
||
|
||
function createPrimitiveTypeChecker(expectedType) {
|
||
function validate(props, propName, componentName, location, propFullName, secret) {
|
||
var propValue = props[propName];
|
||
var propType = getPropType(propValue);
|
||
if (propType !== expectedType) {
|
||
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
||
// check, but we can offer a more precise error message here rather than
|
||
// 'of type `object`'.
|
||
var preciseType = getPreciseType(propValue);
|
||
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createAnyTypeChecker() {
|
||
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
||
}
|
||
|
||
function createArrayOfTypeChecker(typeChecker) {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
if (typeof typeChecker !== 'function') {
|
||
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
||
}
|
||
var propValue = props[propName];
|
||
if (!Array.isArray(propValue)) {
|
||
var propType = getPropType(propValue);
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
||
}
|
||
for (var i = 0; i < propValue.length; i++) {
|
||
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
||
if (error instanceof Error) {
|
||
return error;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createElementTypeChecker() {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
var propValue = props[propName];
|
||
if (!isValidElement(propValue)) {
|
||
var propType = getPropType(propValue);
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createElementTypeTypeChecker() {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
var propValue = props[propName];
|
||
if (!ReactIs.isValidElementType(propValue)) {
|
||
var propType = getPropType(propValue);
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createInstanceTypeChecker(expectedClass) {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
if (!(props[propName] instanceof expectedClass)) {
|
||
var expectedClassName = expectedClass.name || ANONYMOUS;
|
||
var actualClassName = getClassName(props[propName]);
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createEnumTypeChecker(expectedValues) {
|
||
if (!Array.isArray(expectedValues)) {
|
||
if (true) {
|
||
if (arguments.length > 1) {
|
||
printWarning(
|
||
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
||
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
||
);
|
||
} else {
|
||
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
||
}
|
||
}
|
||
return emptyFunctionThatReturnsNull;
|
||
}
|
||
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
var propValue = props[propName];
|
||
for (var i = 0; i < expectedValues.length; i++) {
|
||
if (is(propValue, expectedValues[i])) {
|
||
return null;
|
||
}
|
||
}
|
||
|
||
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
||
var type = getPreciseType(value);
|
||
if (type === 'symbol') {
|
||
return String(value);
|
||
}
|
||
return value;
|
||
});
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createObjectOfTypeChecker(typeChecker) {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
if (typeof typeChecker !== 'function') {
|
||
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
||
}
|
||
var propValue = props[propName];
|
||
var propType = getPropType(propValue);
|
||
if (propType !== 'object') {
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
||
}
|
||
for (var key in propValue) {
|
||
if (has(propValue, key)) {
|
||
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
||
if (error instanceof Error) {
|
||
return error;
|
||
}
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
||
if (!Array.isArray(arrayOfTypeCheckers)) {
|
||
true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : undefined;
|
||
return emptyFunctionThatReturnsNull;
|
||
}
|
||
|
||
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
||
var checker = arrayOfTypeCheckers[i];
|
||
if (typeof checker !== 'function') {
|
||
printWarning(
|
||
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
||
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
||
);
|
||
return emptyFunctionThatReturnsNull;
|
||
}
|
||
}
|
||
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
||
var checker = arrayOfTypeCheckers[i];
|
||
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
||
return null;
|
||
}
|
||
}
|
||
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createNodeChecker() {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
if (!isNode(props[propName])) {
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createShapeTypeChecker(shapeTypes) {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
var propValue = props[propName];
|
||
var propType = getPropType(propValue);
|
||
if (propType !== 'object') {
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
||
}
|
||
for (var key in shapeTypes) {
|
||
var checker = shapeTypes[key];
|
||
if (!checker) {
|
||
continue;
|
||
}
|
||
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
||
if (error) {
|
||
return error;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createStrictShapeTypeChecker(shapeTypes) {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
var propValue = props[propName];
|
||
var propType = getPropType(propValue);
|
||
if (propType !== 'object') {
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
||
}
|
||
// We need to check all keys in case some are required but missing from
|
||
// props.
|
||
var allKeys = assign({}, props[propName], shapeTypes);
|
||
for (var key in allKeys) {
|
||
var checker = shapeTypes[key];
|
||
if (!checker) {
|
||
return new PropTypeError(
|
||
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
||
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
||
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
||
);
|
||
}
|
||
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
||
if (error) {
|
||
return error;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function isNode(propValue) {
|
||
switch (typeof propValue) {
|
||
case 'number':
|
||
case 'string':
|
||
case 'undefined':
|
||
return true;
|
||
case 'boolean':
|
||
return !propValue;
|
||
case 'object':
|
||
if (Array.isArray(propValue)) {
|
||
return propValue.every(isNode);
|
||
}
|
||
if (propValue === null || isValidElement(propValue)) {
|
||
return true;
|
||
}
|
||
|
||
var iteratorFn = getIteratorFn(propValue);
|
||
if (iteratorFn) {
|
||
var iterator = iteratorFn.call(propValue);
|
||
var step;
|
||
if (iteratorFn !== propValue.entries) {
|
||
while (!(step = iterator.next()).done) {
|
||
if (!isNode(step.value)) {
|
||
return false;
|
||
}
|
||
}
|
||
} else {
|
||
// Iterator will provide entry [k,v] tuples rather than values.
|
||
while (!(step = iterator.next()).done) {
|
||
var entry = step.value;
|
||
if (entry) {
|
||
if (!isNode(entry[1])) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
} else {
|
||
return false;
|
||
}
|
||
|
||
return true;
|
||
default:
|
||
return false;
|
||
}
|
||
}
|
||
|
||
function isSymbol(propType, propValue) {
|
||
// Native Symbol.
|
||
if (propType === 'symbol') {
|
||
return true;
|
||
}
|
||
|
||
// falsy value can't be a Symbol
|
||
if (!propValue) {
|
||
return false;
|
||
}
|
||
|
||
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
||
if (propValue['@@toStringTag'] === 'Symbol') {
|
||
return true;
|
||
}
|
||
|
||
// Fallback for non-spec compliant Symbols which are polyfilled.
|
||
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
||
return true;
|
||
}
|
||
|
||
return false;
|
||
}
|
||
|
||
// Equivalent of `typeof` but with special handling for array and regexp.
|
||
function getPropType(propValue) {
|
||
var propType = typeof propValue;
|
||
if (Array.isArray(propValue)) {
|
||
return 'array';
|
||
}
|
||
if (propValue instanceof RegExp) {
|
||
// Old webkits (at least until Android 4.0) return 'function' rather than
|
||
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
||
// passes PropTypes.object.
|
||
return 'object';
|
||
}
|
||
if (isSymbol(propType, propValue)) {
|
||
return 'symbol';
|
||
}
|
||
return propType;
|
||
}
|
||
|
||
// This handles more types than `getPropType`. Only used for error messages.
|
||
// See `createPrimitiveTypeChecker`.
|
||
function getPreciseType(propValue) {
|
||
if (typeof propValue === 'undefined' || propValue === null) {
|
||
return '' + propValue;
|
||
}
|
||
var propType = getPropType(propValue);
|
||
if (propType === 'object') {
|
||
if (propValue instanceof Date) {
|
||
return 'date';
|
||
} else if (propValue instanceof RegExp) {
|
||
return 'regexp';
|
||
}
|
||
}
|
||
return propType;
|
||
}
|
||
|
||
// Returns a string that is postfixed to a warning about an invalid type.
|
||
// For example, "undefined" or "of type array"
|
||
function getPostfixForTypeWarning(value) {
|
||
var type = getPreciseType(value);
|
||
switch (type) {
|
||
case 'array':
|
||
case 'object':
|
||
return 'an ' + type;
|
||
case 'boolean':
|
||
case 'date':
|
||
case 'regexp':
|
||
return 'a ' + type;
|
||
default:
|
||
return type;
|
||
}
|
||
}
|
||
|
||
// Returns class name of the object, if any.
|
||
function getClassName(propValue) {
|
||
if (!propValue.constructor || !propValue.constructor.name) {
|
||
return ANONYMOUS;
|
||
}
|
||
return propValue.constructor.name;
|
||
}
|
||
|
||
ReactPropTypes.checkPropTypes = checkPropTypes;
|
||
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
||
ReactPropTypes.PropTypes = ReactPropTypes;
|
||
|
||
return ReactPropTypes;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router-dom/node_modules/prop-types/index.js":
|
||
/*!************************************************************************!*\
|
||
!*** ./node_modules/react-router-dom/node_modules/prop-types/index.js ***!
|
||
\************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
if (true) {
|
||
var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-router-dom/node_modules/react-is/index.js");
|
||
|
||
// By explicitly using `prop-types` you are opting into new development behavior.
|
||
// http://fb.me/prop-types-in-prod
|
||
var throwOnDirectAccess = true;
|
||
module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/react-router-dom/node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
|
||
} else {}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router-dom/node_modules/prop-types/lib/ReactPropTypesSecret.js":
|
||
/*!*******************************************************************************************!*\
|
||
!*** ./node_modules/react-router-dom/node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
|
||
\*******************************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
||
|
||
module.exports = ReactPropTypesSecret;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router-dom/node_modules/react-is/cjs/react-is.development.js":
|
||
/*!*****************************************************************************************!*\
|
||
!*** ./node_modules/react-router-dom/node_modules/react-is/cjs/react-is.development.js ***!
|
||
\*****************************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/** @license React v16.8.2
|
||
* react-is.development.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
if (true) {
|
||
(function() {
|
||
'use strict';
|
||
|
||
Object.defineProperty(exports, '__esModule', { value: true });
|
||
|
||
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
||
// nor polyfill, then a plain number is used for performance.
|
||
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
||
|
||
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
||
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
||
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
||
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
||
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
||
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
||
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
|
||
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
||
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
||
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
||
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
||
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
||
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
||
|
||
function isValidElementType(type) {
|
||
return typeof type === 'string' || typeof type === 'function' ||
|
||
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
||
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
|
||
}
|
||
|
||
/**
|
||
* Forked from fbjs/warning:
|
||
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
||
*
|
||
* Only change is we use console.warn instead of console.error,
|
||
* and do nothing when 'console' is not supported.
|
||
* This really simplifies the code.
|
||
* ---
|
||
* Similar to invariant but only logs a warning if the condition is not met.
|
||
* This can be used to log issues in development environments in critical
|
||
* paths. Removing the logging code for production environments will keep the
|
||
* same logic and follow the same code paths.
|
||
*/
|
||
|
||
var lowPriorityWarning = function () {};
|
||
|
||
{
|
||
var printWarning = function (format) {
|
||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||
args[_key - 1] = arguments[_key];
|
||
}
|
||
|
||
var argIndex = 0;
|
||
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
||
return args[argIndex++];
|
||
});
|
||
if (typeof console !== 'undefined') {
|
||
console.warn(message);
|
||
}
|
||
try {
|
||
// --- Welcome to debugging React ---
|
||
// This error was thrown as a convenience so that you can use this stack
|
||
// to find the callsite that caused this warning to fire.
|
||
throw new Error(message);
|
||
} catch (x) {}
|
||
};
|
||
|
||
lowPriorityWarning = function (condition, format) {
|
||
if (format === undefined) {
|
||
throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
|
||
}
|
||
if (!condition) {
|
||
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
||
args[_key2 - 2] = arguments[_key2];
|
||
}
|
||
|
||
printWarning.apply(undefined, [format].concat(args));
|
||
}
|
||
};
|
||
}
|
||
|
||
var lowPriorityWarning$1 = lowPriorityWarning;
|
||
|
||
function typeOf(object) {
|
||
if (typeof object === 'object' && object !== null) {
|
||
var $$typeof = object.$$typeof;
|
||
switch ($$typeof) {
|
||
case REACT_ELEMENT_TYPE:
|
||
var type = object.type;
|
||
|
||
switch (type) {
|
||
case REACT_ASYNC_MODE_TYPE:
|
||
case REACT_CONCURRENT_MODE_TYPE:
|
||
case REACT_FRAGMENT_TYPE:
|
||
case REACT_PROFILER_TYPE:
|
||
case REACT_STRICT_MODE_TYPE:
|
||
case REACT_SUSPENSE_TYPE:
|
||
return type;
|
||
default:
|
||
var $$typeofType = type && type.$$typeof;
|
||
|
||
switch ($$typeofType) {
|
||
case REACT_CONTEXT_TYPE:
|
||
case REACT_FORWARD_REF_TYPE:
|
||
case REACT_PROVIDER_TYPE:
|
||
return $$typeofType;
|
||
default:
|
||
return $$typeof;
|
||
}
|
||
}
|
||
case REACT_LAZY_TYPE:
|
||
case REACT_MEMO_TYPE:
|
||
case REACT_PORTAL_TYPE:
|
||
return $$typeof;
|
||
}
|
||
}
|
||
|
||
return undefined;
|
||
}
|
||
|
||
// AsyncMode is deprecated along with isAsyncMode
|
||
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
||
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
||
var ContextConsumer = REACT_CONTEXT_TYPE;
|
||
var ContextProvider = REACT_PROVIDER_TYPE;
|
||
var Element = REACT_ELEMENT_TYPE;
|
||
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
||
var Fragment = REACT_FRAGMENT_TYPE;
|
||
var Lazy = REACT_LAZY_TYPE;
|
||
var Memo = REACT_MEMO_TYPE;
|
||
var Portal = REACT_PORTAL_TYPE;
|
||
var Profiler = REACT_PROFILER_TYPE;
|
||
var StrictMode = REACT_STRICT_MODE_TYPE;
|
||
var Suspense = REACT_SUSPENSE_TYPE;
|
||
|
||
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
||
|
||
// AsyncMode should be deprecated
|
||
function isAsyncMode(object) {
|
||
{
|
||
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
||
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
||
lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
||
}
|
||
}
|
||
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
||
}
|
||
function isConcurrentMode(object) {
|
||
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
||
}
|
||
function isContextConsumer(object) {
|
||
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||
}
|
||
function isContextProvider(object) {
|
||
return typeOf(object) === REACT_PROVIDER_TYPE;
|
||
}
|
||
function isElement(object) {
|
||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
||
}
|
||
function isForwardRef(object) {
|
||
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
||
}
|
||
function isFragment(object) {
|
||
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
||
}
|
||
function isLazy(object) {
|
||
return typeOf(object) === REACT_LAZY_TYPE;
|
||
}
|
||
function isMemo(object) {
|
||
return typeOf(object) === REACT_MEMO_TYPE;
|
||
}
|
||
function isPortal(object) {
|
||
return typeOf(object) === REACT_PORTAL_TYPE;
|
||
}
|
||
function isProfiler(object) {
|
||
return typeOf(object) === REACT_PROFILER_TYPE;
|
||
}
|
||
function isStrictMode(object) {
|
||
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
||
}
|
||
function isSuspense(object) {
|
||
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
||
}
|
||
|
||
exports.typeOf = typeOf;
|
||
exports.AsyncMode = AsyncMode;
|
||
exports.ConcurrentMode = ConcurrentMode;
|
||
exports.ContextConsumer = ContextConsumer;
|
||
exports.ContextProvider = ContextProvider;
|
||
exports.Element = Element;
|
||
exports.ForwardRef = ForwardRef;
|
||
exports.Fragment = Fragment;
|
||
exports.Lazy = Lazy;
|
||
exports.Memo = Memo;
|
||
exports.Portal = Portal;
|
||
exports.Profiler = Profiler;
|
||
exports.StrictMode = StrictMode;
|
||
exports.Suspense = Suspense;
|
||
exports.isValidElementType = isValidElementType;
|
||
exports.isAsyncMode = isAsyncMode;
|
||
exports.isConcurrentMode = isConcurrentMode;
|
||
exports.isContextConsumer = isContextConsumer;
|
||
exports.isContextProvider = isContextProvider;
|
||
exports.isElement = isElement;
|
||
exports.isForwardRef = isForwardRef;
|
||
exports.isFragment = isFragment;
|
||
exports.isLazy = isLazy;
|
||
exports.isMemo = isMemo;
|
||
exports.isPortal = isPortal;
|
||
exports.isProfiler = isProfiler;
|
||
exports.isStrictMode = isStrictMode;
|
||
exports.isSuspense = isSuspense;
|
||
})();
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router-dom/node_modules/react-is/index.js":
|
||
/*!**********************************************************************!*\
|
||
!*** ./node_modules/react-router-dom/node_modules/react-is/index.js ***!
|
||
\**********************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
if (false) {} else {
|
||
module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-router-dom/node_modules/react-is/cjs/react-is.development.js");
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":
|
||
/*!************************************************************************************************************!*\
|
||
!*** ./node_modules/react-router/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***!
|
||
\************************************************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
/**
|
||
* Copyright 2015, Yahoo! Inc.
|
||
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
||
*/
|
||
var REACT_STATICS = {
|
||
childContextTypes: true,
|
||
contextTypes: true,
|
||
defaultProps: true,
|
||
displayName: true,
|
||
getDefaultProps: true,
|
||
getDerivedStateFromProps: true,
|
||
mixins: true,
|
||
propTypes: true,
|
||
type: true
|
||
};
|
||
|
||
var KNOWN_STATICS = {
|
||
name: true,
|
||
length: true,
|
||
prototype: true,
|
||
caller: true,
|
||
callee: true,
|
||
arguments: true,
|
||
arity: true
|
||
};
|
||
|
||
var defineProperty = Object.defineProperty;
|
||
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
||
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||
var getPrototypeOf = Object.getPrototypeOf;
|
||
var objectPrototype = getPrototypeOf && getPrototypeOf(Object);
|
||
|
||
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
||
if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
|
||
|
||
if (objectPrototype) {
|
||
var inheritedComponent = getPrototypeOf(sourceComponent);
|
||
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
||
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
||
}
|
||
}
|
||
|
||
var keys = getOwnPropertyNames(sourceComponent);
|
||
|
||
if (getOwnPropertySymbols) {
|
||
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
||
}
|
||
|
||
for (var i = 0; i < keys.length; ++i) {
|
||
var key = keys[i];
|
||
if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
|
||
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
||
try { // Avoid failures from read-only properties
|
||
defineProperty(targetComponent, key, descriptor);
|
||
} catch (e) {}
|
||
}
|
||
}
|
||
|
||
return targetComponent;
|
||
}
|
||
|
||
return targetComponent;
|
||
}
|
||
|
||
module.exports = hoistNonReactStatics;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router/node_modules/isarray/index.js":
|
||
/*!*****************************************************************!*\
|
||
!*** ./node_modules/react-router/node_modules/isarray/index.js ***!
|
||
\*****************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = Array.isArray || function (arr) {
|
||
return Object.prototype.toString.call(arr) == '[object Array]';
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router/node_modules/path-to-regexp/index.js":
|
||
/*!************************************************************************!*\
|
||
!*** ./node_modules/react-router/node_modules/path-to-regexp/index.js ***!
|
||
\************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
var isarray = __webpack_require__(/*! isarray */ "./node_modules/react-router/node_modules/isarray/index.js")
|
||
|
||
/**
|
||
* Expose `pathToRegexp`.
|
||
*/
|
||
module.exports = pathToRegexp
|
||
module.exports.parse = parse
|
||
module.exports.compile = compile
|
||
module.exports.tokensToFunction = tokensToFunction
|
||
module.exports.tokensToRegExp = tokensToRegExp
|
||
|
||
/**
|
||
* The main path matching regexp utility.
|
||
*
|
||
* @type {RegExp}
|
||
*/
|
||
var PATH_REGEXP = new RegExp([
|
||
// Match escaped characters that would otherwise appear in future matches.
|
||
// This allows the user to escape special characters that won't transform.
|
||
'(\\\\.)',
|
||
// Match Express-style parameters and un-named parameters with a prefix
|
||
// and optional suffixes. Matches appear as:
|
||
//
|
||
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
|
||
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
|
||
// "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
|
||
'([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
|
||
].join('|'), 'g')
|
||
|
||
/**
|
||
* Parse a string for the raw tokens.
|
||
*
|
||
* @param {string} str
|
||
* @param {Object=} options
|
||
* @return {!Array}
|
||
*/
|
||
function parse (str, options) {
|
||
var tokens = []
|
||
var key = 0
|
||
var index = 0
|
||
var path = ''
|
||
var defaultDelimiter = options && options.delimiter || '/'
|
||
var res
|
||
|
||
while ((res = PATH_REGEXP.exec(str)) != null) {
|
||
var m = res[0]
|
||
var escaped = res[1]
|
||
var offset = res.index
|
||
path += str.slice(index, offset)
|
||
index = offset + m.length
|
||
|
||
// Ignore already escaped sequences.
|
||
if (escaped) {
|
||
path += escaped[1]
|
||
continue
|
||
}
|
||
|
||
var next = str[index]
|
||
var prefix = res[2]
|
||
var name = res[3]
|
||
var capture = res[4]
|
||
var group = res[5]
|
||
var modifier = res[6]
|
||
var asterisk = res[7]
|
||
|
||
// Push the current path onto the tokens.
|
||
if (path) {
|
||
tokens.push(path)
|
||
path = ''
|
||
}
|
||
|
||
var partial = prefix != null && next != null && next !== prefix
|
||
var repeat = modifier === '+' || modifier === '*'
|
||
var optional = modifier === '?' || modifier === '*'
|
||
var delimiter = res[2] || defaultDelimiter
|
||
var pattern = capture || group
|
||
|
||
tokens.push({
|
||
name: name || key++,
|
||
prefix: prefix || '',
|
||
delimiter: delimiter,
|
||
optional: optional,
|
||
repeat: repeat,
|
||
partial: partial,
|
||
asterisk: !!asterisk,
|
||
pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
|
||
})
|
||
}
|
||
|
||
// Match any characters still remaining.
|
||
if (index < str.length) {
|
||
path += str.substr(index)
|
||
}
|
||
|
||
// If the path exists, push it onto the end.
|
||
if (path) {
|
||
tokens.push(path)
|
||
}
|
||
|
||
return tokens
|
||
}
|
||
|
||
/**
|
||
* Compile a string to a template function for the path.
|
||
*
|
||
* @param {string} str
|
||
* @param {Object=} options
|
||
* @return {!function(Object=, Object=)}
|
||
*/
|
||
function compile (str, options) {
|
||
return tokensToFunction(parse(str, options))
|
||
}
|
||
|
||
/**
|
||
* Prettier encoding of URI path segments.
|
||
*
|
||
* @param {string}
|
||
* @return {string}
|
||
*/
|
||
function encodeURIComponentPretty (str) {
|
||
return encodeURI(str).replace(/[\/?#]/g, function (c) {
|
||
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
||
})
|
||
}
|
||
|
||
/**
|
||
* Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
|
||
*
|
||
* @param {string}
|
||
* @return {string}
|
||
*/
|
||
function encodeAsterisk (str) {
|
||
return encodeURI(str).replace(/[?#]/g, function (c) {
|
||
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
||
})
|
||
}
|
||
|
||
/**
|
||
* Expose a method for transforming tokens into the path function.
|
||
*/
|
||
function tokensToFunction (tokens) {
|
||
// Compile all the tokens into regexps.
|
||
var matches = new Array(tokens.length)
|
||
|
||
// Compile all the patterns before compilation.
|
||
for (var i = 0; i < tokens.length; i++) {
|
||
if (typeof tokens[i] === 'object') {
|
||
matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')
|
||
}
|
||
}
|
||
|
||
return function (obj, opts) {
|
||
var path = ''
|
||
var data = obj || {}
|
||
var options = opts || {}
|
||
var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent
|
||
|
||
for (var i = 0; i < tokens.length; i++) {
|
||
var token = tokens[i]
|
||
|
||
if (typeof token === 'string') {
|
||
path += token
|
||
|
||
continue
|
||
}
|
||
|
||
var value = data[token.name]
|
||
var segment
|
||
|
||
if (value == null) {
|
||
if (token.optional) {
|
||
// Prepend partial segment prefixes.
|
||
if (token.partial) {
|
||
path += token.prefix
|
||
}
|
||
|
||
continue
|
||
} else {
|
||
throw new TypeError('Expected "' + token.name + '" to be defined')
|
||
}
|
||
}
|
||
|
||
if (isarray(value)) {
|
||
if (!token.repeat) {
|
||
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
|
||
}
|
||
|
||
if (value.length === 0) {
|
||
if (token.optional) {
|
||
continue
|
||
} else {
|
||
throw new TypeError('Expected "' + token.name + '" to not be empty')
|
||
}
|
||
}
|
||
|
||
for (var j = 0; j < value.length; j++) {
|
||
segment = encode(value[j])
|
||
|
||
if (!matches[i].test(segment)) {
|
||
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
|
||
}
|
||
|
||
path += (j === 0 ? token.prefix : token.delimiter) + segment
|
||
}
|
||
|
||
continue
|
||
}
|
||
|
||
segment = token.asterisk ? encodeAsterisk(value) : encode(value)
|
||
|
||
if (!matches[i].test(segment)) {
|
||
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
|
||
}
|
||
|
||
path += token.prefix + segment
|
||
}
|
||
|
||
return path
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Escape a regular expression string.
|
||
*
|
||
* @param {string} str
|
||
* @return {string}
|
||
*/
|
||
function escapeString (str) {
|
||
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
|
||
}
|
||
|
||
/**
|
||
* Escape the capturing group by escaping special characters and meaning.
|
||
*
|
||
* @param {string} group
|
||
* @return {string}
|
||
*/
|
||
function escapeGroup (group) {
|
||
return group.replace(/([=!:$\/()])/g, '\\$1')
|
||
}
|
||
|
||
/**
|
||
* Attach the keys as a property of the regexp.
|
||
*
|
||
* @param {!RegExp} re
|
||
* @param {Array} keys
|
||
* @return {!RegExp}
|
||
*/
|
||
function attachKeys (re, keys) {
|
||
re.keys = keys
|
||
return re
|
||
}
|
||
|
||
/**
|
||
* Get the flags for a regexp from the options.
|
||
*
|
||
* @param {Object} options
|
||
* @return {string}
|
||
*/
|
||
function flags (options) {
|
||
return options.sensitive ? '' : 'i'
|
||
}
|
||
|
||
/**
|
||
* Pull out keys from a regexp.
|
||
*
|
||
* @param {!RegExp} path
|
||
* @param {!Array} keys
|
||
* @return {!RegExp}
|
||
*/
|
||
function regexpToRegexp (path, keys) {
|
||
// Use a negative lookahead to match only capturing groups.
|
||
var groups = path.source.match(/\((?!\?)/g)
|
||
|
||
if (groups) {
|
||
for (var i = 0; i < groups.length; i++) {
|
||
keys.push({
|
||
name: i,
|
||
prefix: null,
|
||
delimiter: null,
|
||
optional: false,
|
||
repeat: false,
|
||
partial: false,
|
||
asterisk: false,
|
||
pattern: null
|
||
})
|
||
}
|
||
}
|
||
|
||
return attachKeys(path, keys)
|
||
}
|
||
|
||
/**
|
||
* Transform an array into a regexp.
|
||
*
|
||
* @param {!Array} path
|
||
* @param {Array} keys
|
||
* @param {!Object} options
|
||
* @return {!RegExp}
|
||
*/
|
||
function arrayToRegexp (path, keys, options) {
|
||
var parts = []
|
||
|
||
for (var i = 0; i < path.length; i++) {
|
||
parts.push(pathToRegexp(path[i], keys, options).source)
|
||
}
|
||
|
||
var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
|
||
|
||
return attachKeys(regexp, keys)
|
||
}
|
||
|
||
/**
|
||
* Create a path regexp from string input.
|
||
*
|
||
* @param {string} path
|
||
* @param {!Array} keys
|
||
* @param {!Object} options
|
||
* @return {!RegExp}
|
||
*/
|
||
function stringToRegexp (path, keys, options) {
|
||
return tokensToRegExp(parse(path, options), keys, options)
|
||
}
|
||
|
||
/**
|
||
* Expose a function for taking tokens and returning a RegExp.
|
||
*
|
||
* @param {!Array} tokens
|
||
* @param {(Array|Object)=} keys
|
||
* @param {Object=} options
|
||
* @return {!RegExp}
|
||
*/
|
||
function tokensToRegExp (tokens, keys, options) {
|
||
if (!isarray(keys)) {
|
||
options = /** @type {!Object} */ (keys || options)
|
||
keys = []
|
||
}
|
||
|
||
options = options || {}
|
||
|
||
var strict = options.strict
|
||
var end = options.end !== false
|
||
var route = ''
|
||
|
||
// Iterate over the tokens and create our regexp string.
|
||
for (var i = 0; i < tokens.length; i++) {
|
||
var token = tokens[i]
|
||
|
||
if (typeof token === 'string') {
|
||
route += escapeString(token)
|
||
} else {
|
||
var prefix = escapeString(token.prefix)
|
||
var capture = '(?:' + token.pattern + ')'
|
||
|
||
keys.push(token)
|
||
|
||
if (token.repeat) {
|
||
capture += '(?:' + prefix + capture + ')*'
|
||
}
|
||
|
||
if (token.optional) {
|
||
if (!token.partial) {
|
||
capture = '(?:' + prefix + '(' + capture + '))?'
|
||
} else {
|
||
capture = prefix + '(' + capture + ')?'
|
||
}
|
||
} else {
|
||
capture = prefix + '(' + capture + ')'
|
||
}
|
||
|
||
route += capture
|
||
}
|
||
}
|
||
|
||
var delimiter = escapeString(options.delimiter || '/')
|
||
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter
|
||
|
||
// In non-strict mode we allow a slash at the end of match. If the path to
|
||
// match already ends with a slash, we remove it for consistency. The slash
|
||
// is valid at the end of a path match, not in the middle. This is important
|
||
// in non-ending mode, where "/test/" shouldn't match "/test//route".
|
||
if (!strict) {
|
||
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'
|
||
}
|
||
|
||
if (end) {
|
||
route += '$'
|
||
} else {
|
||
// In non-ending mode, we need the capturing groups to match as much as
|
||
// possible by using a positive lookahead to the end or next path segment.
|
||
route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'
|
||
}
|
||
|
||
return attachKeys(new RegExp('^' + route, flags(options)), keys)
|
||
}
|
||
|
||
/**
|
||
* Normalize the given path string, returning a regular expression.
|
||
*
|
||
* An empty array can be passed in for the keys, which will hold the
|
||
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
|
||
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
|
||
*
|
||
* @param {(string|RegExp|Array)} path
|
||
* @param {(Array|Object)=} keys
|
||
* @param {Object=} options
|
||
* @return {!RegExp}
|
||
*/
|
||
function pathToRegexp (path, keys, options) {
|
||
if (!isarray(keys)) {
|
||
options = /** @type {!Object} */ (keys || options)
|
||
keys = []
|
||
}
|
||
|
||
options = options || {}
|
||
|
||
if (path instanceof RegExp) {
|
||
return regexpToRegexp(path, /** @type {!Array} */ (keys))
|
||
}
|
||
|
||
if (isarray(path)) {
|
||
return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
|
||
}
|
||
|
||
return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router/node_modules/prop-types/checkPropTypes.js":
|
||
/*!*****************************************************************************!*\
|
||
!*** ./node_modules/react-router/node_modules/prop-types/checkPropTypes.js ***!
|
||
\*****************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
var printWarning = function() {};
|
||
|
||
if (true) {
|
||
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/react-router/node_modules/prop-types/lib/ReactPropTypesSecret.js");
|
||
var loggedTypeFailures = {};
|
||
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
||
|
||
printWarning = function(text) {
|
||
var message = 'Warning: ' + text;
|
||
if (typeof console !== 'undefined') {
|
||
console.error(message);
|
||
}
|
||
try {
|
||
// --- Welcome to debugging React ---
|
||
// This error was thrown as a convenience so that you can use this stack
|
||
// to find the callsite that caused this warning to fire.
|
||
throw new Error(message);
|
||
} catch (x) {}
|
||
};
|
||
}
|
||
|
||
/**
|
||
* Assert that the values match with the type specs.
|
||
* Error messages are memorized and will only be shown once.
|
||
*
|
||
* @param {object} typeSpecs Map of name to a ReactPropType
|
||
* @param {object} values Runtime values that need to be type-checked
|
||
* @param {string} location e.g. "prop", "context", "child context"
|
||
* @param {string} componentName Name of the component for error messages.
|
||
* @param {?Function} getStack Returns the component stack.
|
||
* @private
|
||
*/
|
||
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
||
if (true) {
|
||
for (var typeSpecName in typeSpecs) {
|
||
if (has(typeSpecs, typeSpecName)) {
|
||
var error;
|
||
// Prop type validation may throw. In case they do, we don't want to
|
||
// fail the render phase where it didn't fail before. So we log it.
|
||
// After these have been cleaned up, we'll let them throw.
|
||
try {
|
||
// This is intentionally an invariant that gets caught. It's the same
|
||
// behavior as without this statement except with a better message.
|
||
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
||
var err = Error(
|
||
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
||
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
||
);
|
||
err.name = 'Invariant Violation';
|
||
throw err;
|
||
}
|
||
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
||
} catch (ex) {
|
||
error = ex;
|
||
}
|
||
if (error && !(error instanceof Error)) {
|
||
printWarning(
|
||
(componentName || 'React class') + ': type specification of ' +
|
||
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
||
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
||
'You may have forgotten to pass an argument to the type checker ' +
|
||
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
||
'shape all require an argument).'
|
||
);
|
||
}
|
||
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
||
// Only monitor this failure once because there tends to be a lot of the
|
||
// same error.
|
||
loggedTypeFailures[error.message] = true;
|
||
|
||
var stack = getStack ? getStack() : '';
|
||
|
||
printWarning(
|
||
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
||
);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Resets warning cache when testing.
|
||
*
|
||
* @private
|
||
*/
|
||
checkPropTypes.resetWarningCache = function() {
|
||
if (true) {
|
||
loggedTypeFailures = {};
|
||
}
|
||
}
|
||
|
||
module.exports = checkPropTypes;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router/node_modules/prop-types/factoryWithTypeCheckers.js":
|
||
/*!**************************************************************************************!*\
|
||
!*** ./node_modules/react-router/node_modules/prop-types/factoryWithTypeCheckers.js ***!
|
||
\**************************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-router/node_modules/react-is/index.js");
|
||
var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
|
||
|
||
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/react-router/node_modules/prop-types/lib/ReactPropTypesSecret.js");
|
||
var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/react-router/node_modules/prop-types/checkPropTypes.js");
|
||
|
||
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
||
var printWarning = function() {};
|
||
|
||
if (true) {
|
||
printWarning = function(text) {
|
||
var message = 'Warning: ' + text;
|
||
if (typeof console !== 'undefined') {
|
||
console.error(message);
|
||
}
|
||
try {
|
||
// --- Welcome to debugging React ---
|
||
// This error was thrown as a convenience so that you can use this stack
|
||
// to find the callsite that caused this warning to fire.
|
||
throw new Error(message);
|
||
} catch (x) {}
|
||
};
|
||
}
|
||
|
||
function emptyFunctionThatReturnsNull() {
|
||
return null;
|
||
}
|
||
|
||
module.exports = function(isValidElement, throwOnDirectAccess) {
|
||
/* global Symbol */
|
||
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
||
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
||
|
||
/**
|
||
* Returns the iterator method function contained on the iterable object.
|
||
*
|
||
* Be sure to invoke the function with the iterable as context:
|
||
*
|
||
* var iteratorFn = getIteratorFn(myIterable);
|
||
* if (iteratorFn) {
|
||
* var iterator = iteratorFn.call(myIterable);
|
||
* ...
|
||
* }
|
||
*
|
||
* @param {?object} maybeIterable
|
||
* @return {?function}
|
||
*/
|
||
function getIteratorFn(maybeIterable) {
|
||
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
||
if (typeof iteratorFn === 'function') {
|
||
return iteratorFn;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Collection of methods that allow declaration and validation of props that are
|
||
* supplied to React components. Example usage:
|
||
*
|
||
* var Props = require('ReactPropTypes');
|
||
* var MyArticle = React.createClass({
|
||
* propTypes: {
|
||
* // An optional string prop named "description".
|
||
* description: Props.string,
|
||
*
|
||
* // A required enum prop named "category".
|
||
* category: Props.oneOf(['News','Photos']).isRequired,
|
||
*
|
||
* // A prop named "dialog" that requires an instance of Dialog.
|
||
* dialog: Props.instanceOf(Dialog).isRequired
|
||
* },
|
||
* render: function() { ... }
|
||
* });
|
||
*
|
||
* A more formal specification of how these methods are used:
|
||
*
|
||
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
||
* decl := ReactPropTypes.{type}(.isRequired)?
|
||
*
|
||
* Each and every declaration produces a function with the same signature. This
|
||
* allows the creation of custom validation functions. For example:
|
||
*
|
||
* var MyLink = React.createClass({
|
||
* propTypes: {
|
||
* // An optional string or URI prop named "href".
|
||
* href: function(props, propName, componentName) {
|
||
* var propValue = props[propName];
|
||
* if (propValue != null && typeof propValue !== 'string' &&
|
||
* !(propValue instanceof URI)) {
|
||
* return new Error(
|
||
* 'Expected a string or an URI for ' + propName + ' in ' +
|
||
* componentName
|
||
* );
|
||
* }
|
||
* }
|
||
* },
|
||
* render: function() {...}
|
||
* });
|
||
*
|
||
* @internal
|
||
*/
|
||
|
||
var ANONYMOUS = '<<anonymous>>';
|
||
|
||
// Important!
|
||
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
||
var ReactPropTypes = {
|
||
array: createPrimitiveTypeChecker('array'),
|
||
bool: createPrimitiveTypeChecker('boolean'),
|
||
func: createPrimitiveTypeChecker('function'),
|
||
number: createPrimitiveTypeChecker('number'),
|
||
object: createPrimitiveTypeChecker('object'),
|
||
string: createPrimitiveTypeChecker('string'),
|
||
symbol: createPrimitiveTypeChecker('symbol'),
|
||
|
||
any: createAnyTypeChecker(),
|
||
arrayOf: createArrayOfTypeChecker,
|
||
element: createElementTypeChecker(),
|
||
elementType: createElementTypeTypeChecker(),
|
||
instanceOf: createInstanceTypeChecker,
|
||
node: createNodeChecker(),
|
||
objectOf: createObjectOfTypeChecker,
|
||
oneOf: createEnumTypeChecker,
|
||
oneOfType: createUnionTypeChecker,
|
||
shape: createShapeTypeChecker,
|
||
exact: createStrictShapeTypeChecker,
|
||
};
|
||
|
||
/**
|
||
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
||
*/
|
||
/*eslint-disable no-self-compare*/
|
||
function is(x, y) {
|
||
// SameValue algorithm
|
||
if (x === y) {
|
||
// Steps 1-5, 7-10
|
||
// Steps 6.b-6.e: +0 != -0
|
||
return x !== 0 || 1 / x === 1 / y;
|
||
} else {
|
||
// Step 6.a: NaN == NaN
|
||
return x !== x && y !== y;
|
||
}
|
||
}
|
||
/*eslint-enable no-self-compare*/
|
||
|
||
/**
|
||
* We use an Error-like object for backward compatibility as people may call
|
||
* PropTypes directly and inspect their output. However, we don't use real
|
||
* Errors anymore. We don't inspect their stack anyway, and creating them
|
||
* is prohibitively expensive if they are created too often, such as what
|
||
* happens in oneOfType() for any type before the one that matched.
|
||
*/
|
||
function PropTypeError(message) {
|
||
this.message = message;
|
||
this.stack = '';
|
||
}
|
||
// Make `instanceof Error` still work for returned errors.
|
||
PropTypeError.prototype = Error.prototype;
|
||
|
||
function createChainableTypeChecker(validate) {
|
||
if (true) {
|
||
var manualPropTypeCallCache = {};
|
||
var manualPropTypeWarningCount = 0;
|
||
}
|
||
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
||
componentName = componentName || ANONYMOUS;
|
||
propFullName = propFullName || propName;
|
||
|
||
if (secret !== ReactPropTypesSecret) {
|
||
if (throwOnDirectAccess) {
|
||
// New behavior only for users of `prop-types` package
|
||
var err = new Error(
|
||
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
||
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
||
'Read more at http://fb.me/use-check-prop-types'
|
||
);
|
||
err.name = 'Invariant Violation';
|
||
throw err;
|
||
} else if ( true && typeof console !== 'undefined') {
|
||
// Old behavior for people using React.PropTypes
|
||
var cacheKey = componentName + ':' + propName;
|
||
if (
|
||
!manualPropTypeCallCache[cacheKey] &&
|
||
// Avoid spamming the console because they are often not actionable except for lib authors
|
||
manualPropTypeWarningCount < 3
|
||
) {
|
||
printWarning(
|
||
'You are manually calling a React.PropTypes validation ' +
|
||
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
||
'and will throw in the standalone `prop-types` package. ' +
|
||
'You may be seeing this warning due to a third-party PropTypes ' +
|
||
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
||
);
|
||
manualPropTypeCallCache[cacheKey] = true;
|
||
manualPropTypeWarningCount++;
|
||
}
|
||
}
|
||
}
|
||
if (props[propName] == null) {
|
||
if (isRequired) {
|
||
if (props[propName] === null) {
|
||
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
||
}
|
||
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
||
}
|
||
return null;
|
||
} else {
|
||
return validate(props, propName, componentName, location, propFullName);
|
||
}
|
||
}
|
||
|
||
var chainedCheckType = checkType.bind(null, false);
|
||
chainedCheckType.isRequired = checkType.bind(null, true);
|
||
|
||
return chainedCheckType;
|
||
}
|
||
|
||
function createPrimitiveTypeChecker(expectedType) {
|
||
function validate(props, propName, componentName, location, propFullName, secret) {
|
||
var propValue = props[propName];
|
||
var propType = getPropType(propValue);
|
||
if (propType !== expectedType) {
|
||
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
||
// check, but we can offer a more precise error message here rather than
|
||
// 'of type `object`'.
|
||
var preciseType = getPreciseType(propValue);
|
||
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createAnyTypeChecker() {
|
||
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
||
}
|
||
|
||
function createArrayOfTypeChecker(typeChecker) {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
if (typeof typeChecker !== 'function') {
|
||
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
||
}
|
||
var propValue = props[propName];
|
||
if (!Array.isArray(propValue)) {
|
||
var propType = getPropType(propValue);
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
||
}
|
||
for (var i = 0; i < propValue.length; i++) {
|
||
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
||
if (error instanceof Error) {
|
||
return error;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createElementTypeChecker() {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
var propValue = props[propName];
|
||
if (!isValidElement(propValue)) {
|
||
var propType = getPropType(propValue);
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createElementTypeTypeChecker() {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
var propValue = props[propName];
|
||
if (!ReactIs.isValidElementType(propValue)) {
|
||
var propType = getPropType(propValue);
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createInstanceTypeChecker(expectedClass) {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
if (!(props[propName] instanceof expectedClass)) {
|
||
var expectedClassName = expectedClass.name || ANONYMOUS;
|
||
var actualClassName = getClassName(props[propName]);
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createEnumTypeChecker(expectedValues) {
|
||
if (!Array.isArray(expectedValues)) {
|
||
if (true) {
|
||
if (arguments.length > 1) {
|
||
printWarning(
|
||
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
||
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
||
);
|
||
} else {
|
||
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
||
}
|
||
}
|
||
return emptyFunctionThatReturnsNull;
|
||
}
|
||
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
var propValue = props[propName];
|
||
for (var i = 0; i < expectedValues.length; i++) {
|
||
if (is(propValue, expectedValues[i])) {
|
||
return null;
|
||
}
|
||
}
|
||
|
||
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
||
var type = getPreciseType(value);
|
||
if (type === 'symbol') {
|
||
return String(value);
|
||
}
|
||
return value;
|
||
});
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createObjectOfTypeChecker(typeChecker) {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
if (typeof typeChecker !== 'function') {
|
||
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
||
}
|
||
var propValue = props[propName];
|
||
var propType = getPropType(propValue);
|
||
if (propType !== 'object') {
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
||
}
|
||
for (var key in propValue) {
|
||
if (has(propValue, key)) {
|
||
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
||
if (error instanceof Error) {
|
||
return error;
|
||
}
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
||
if (!Array.isArray(arrayOfTypeCheckers)) {
|
||
true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : undefined;
|
||
return emptyFunctionThatReturnsNull;
|
||
}
|
||
|
||
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
||
var checker = arrayOfTypeCheckers[i];
|
||
if (typeof checker !== 'function') {
|
||
printWarning(
|
||
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
||
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
||
);
|
||
return emptyFunctionThatReturnsNull;
|
||
}
|
||
}
|
||
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
||
var checker = arrayOfTypeCheckers[i];
|
||
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
||
return null;
|
||
}
|
||
}
|
||
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createNodeChecker() {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
if (!isNode(props[propName])) {
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createShapeTypeChecker(shapeTypes) {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
var propValue = props[propName];
|
||
var propType = getPropType(propValue);
|
||
if (propType !== 'object') {
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
||
}
|
||
for (var key in shapeTypes) {
|
||
var checker = shapeTypes[key];
|
||
if (!checker) {
|
||
continue;
|
||
}
|
||
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
||
if (error) {
|
||
return error;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function createStrictShapeTypeChecker(shapeTypes) {
|
||
function validate(props, propName, componentName, location, propFullName) {
|
||
var propValue = props[propName];
|
||
var propType = getPropType(propValue);
|
||
if (propType !== 'object') {
|
||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
||
}
|
||
// We need to check all keys in case some are required but missing from
|
||
// props.
|
||
var allKeys = assign({}, props[propName], shapeTypes);
|
||
for (var key in allKeys) {
|
||
var checker = shapeTypes[key];
|
||
if (!checker) {
|
||
return new PropTypeError(
|
||
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
||
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
||
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
||
);
|
||
}
|
||
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
||
if (error) {
|
||
return error;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
|
||
return createChainableTypeChecker(validate);
|
||
}
|
||
|
||
function isNode(propValue) {
|
||
switch (typeof propValue) {
|
||
case 'number':
|
||
case 'string':
|
||
case 'undefined':
|
||
return true;
|
||
case 'boolean':
|
||
return !propValue;
|
||
case 'object':
|
||
if (Array.isArray(propValue)) {
|
||
return propValue.every(isNode);
|
||
}
|
||
if (propValue === null || isValidElement(propValue)) {
|
||
return true;
|
||
}
|
||
|
||
var iteratorFn = getIteratorFn(propValue);
|
||
if (iteratorFn) {
|
||
var iterator = iteratorFn.call(propValue);
|
||
var step;
|
||
if (iteratorFn !== propValue.entries) {
|
||
while (!(step = iterator.next()).done) {
|
||
if (!isNode(step.value)) {
|
||
return false;
|
||
}
|
||
}
|
||
} else {
|
||
// Iterator will provide entry [k,v] tuples rather than values.
|
||
while (!(step = iterator.next()).done) {
|
||
var entry = step.value;
|
||
if (entry) {
|
||
if (!isNode(entry[1])) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
} else {
|
||
return false;
|
||
}
|
||
|
||
return true;
|
||
default:
|
||
return false;
|
||
}
|
||
}
|
||
|
||
function isSymbol(propType, propValue) {
|
||
// Native Symbol.
|
||
if (propType === 'symbol') {
|
||
return true;
|
||
}
|
||
|
||
// falsy value can't be a Symbol
|
||
if (!propValue) {
|
||
return false;
|
||
}
|
||
|
||
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
||
if (propValue['@@toStringTag'] === 'Symbol') {
|
||
return true;
|
||
}
|
||
|
||
// Fallback for non-spec compliant Symbols which are polyfilled.
|
||
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
||
return true;
|
||
}
|
||
|
||
return false;
|
||
}
|
||
|
||
// Equivalent of `typeof` but with special handling for array and regexp.
|
||
function getPropType(propValue) {
|
||
var propType = typeof propValue;
|
||
if (Array.isArray(propValue)) {
|
||
return 'array';
|
||
}
|
||
if (propValue instanceof RegExp) {
|
||
// Old webkits (at least until Android 4.0) return 'function' rather than
|
||
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
||
// passes PropTypes.object.
|
||
return 'object';
|
||
}
|
||
if (isSymbol(propType, propValue)) {
|
||
return 'symbol';
|
||
}
|
||
return propType;
|
||
}
|
||
|
||
// This handles more types than `getPropType`. Only used for error messages.
|
||
// See `createPrimitiveTypeChecker`.
|
||
function getPreciseType(propValue) {
|
||
if (typeof propValue === 'undefined' || propValue === null) {
|
||
return '' + propValue;
|
||
}
|
||
var propType = getPropType(propValue);
|
||
if (propType === 'object') {
|
||
if (propValue instanceof Date) {
|
||
return 'date';
|
||
} else if (propValue instanceof RegExp) {
|
||
return 'regexp';
|
||
}
|
||
}
|
||
return propType;
|
||
}
|
||
|
||
// Returns a string that is postfixed to a warning about an invalid type.
|
||
// For example, "undefined" or "of type array"
|
||
function getPostfixForTypeWarning(value) {
|
||
var type = getPreciseType(value);
|
||
switch (type) {
|
||
case 'array':
|
||
case 'object':
|
||
return 'an ' + type;
|
||
case 'boolean':
|
||
case 'date':
|
||
case 'regexp':
|
||
return 'a ' + type;
|
||
default:
|
||
return type;
|
||
}
|
||
}
|
||
|
||
// Returns class name of the object, if any.
|
||
function getClassName(propValue) {
|
||
if (!propValue.constructor || !propValue.constructor.name) {
|
||
return ANONYMOUS;
|
||
}
|
||
return propValue.constructor.name;
|
||
}
|
||
|
||
ReactPropTypes.checkPropTypes = checkPropTypes;
|
||
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
||
ReactPropTypes.PropTypes = ReactPropTypes;
|
||
|
||
return ReactPropTypes;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router/node_modules/prop-types/index.js":
|
||
/*!********************************************************************!*\
|
||
!*** ./node_modules/react-router/node_modules/prop-types/index.js ***!
|
||
\********************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
if (true) {
|
||
var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-router/node_modules/react-is/index.js");
|
||
|
||
// By explicitly using `prop-types` you are opting into new development behavior.
|
||
// http://fb.me/prop-types-in-prod
|
||
var throwOnDirectAccess = true;
|
||
module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/react-router/node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
|
||
} else {}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router/node_modules/prop-types/lib/ReactPropTypesSecret.js":
|
||
/*!***************************************************************************************!*\
|
||
!*** ./node_modules/react-router/node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
|
||
\***************************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright (c) 2013-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
||
|
||
module.exports = ReactPropTypesSecret;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router/node_modules/react-is/cjs/react-is.development.js":
|
||
/*!*************************************************************************************!*\
|
||
!*** ./node_modules/react-router/node_modules/react-is/cjs/react-is.development.js ***!
|
||
\*************************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/** @license React v16.8.2
|
||
* react-is.development.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
if (true) {
|
||
(function() {
|
||
'use strict';
|
||
|
||
Object.defineProperty(exports, '__esModule', { value: true });
|
||
|
||
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
||
// nor polyfill, then a plain number is used for performance.
|
||
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
||
|
||
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
||
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
||
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
||
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
||
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
||
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
||
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
|
||
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
||
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
||
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
||
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
||
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
||
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
||
|
||
function isValidElementType(type) {
|
||
return typeof type === 'string' || typeof type === 'function' ||
|
||
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
||
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
|
||
}
|
||
|
||
/**
|
||
* Forked from fbjs/warning:
|
||
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
||
*
|
||
* Only change is we use console.warn instead of console.error,
|
||
* and do nothing when 'console' is not supported.
|
||
* This really simplifies the code.
|
||
* ---
|
||
* Similar to invariant but only logs a warning if the condition is not met.
|
||
* This can be used to log issues in development environments in critical
|
||
* paths. Removing the logging code for production environments will keep the
|
||
* same logic and follow the same code paths.
|
||
*/
|
||
|
||
var lowPriorityWarning = function () {};
|
||
|
||
{
|
||
var printWarning = function (format) {
|
||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||
args[_key - 1] = arguments[_key];
|
||
}
|
||
|
||
var argIndex = 0;
|
||
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
||
return args[argIndex++];
|
||
});
|
||
if (typeof console !== 'undefined') {
|
||
console.warn(message);
|
||
}
|
||
try {
|
||
// --- Welcome to debugging React ---
|
||
// This error was thrown as a convenience so that you can use this stack
|
||
// to find the callsite that caused this warning to fire.
|
||
throw new Error(message);
|
||
} catch (x) {}
|
||
};
|
||
|
||
lowPriorityWarning = function (condition, format) {
|
||
if (format === undefined) {
|
||
throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
|
||
}
|
||
if (!condition) {
|
||
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
||
args[_key2 - 2] = arguments[_key2];
|
||
}
|
||
|
||
printWarning.apply(undefined, [format].concat(args));
|
||
}
|
||
};
|
||
}
|
||
|
||
var lowPriorityWarning$1 = lowPriorityWarning;
|
||
|
||
function typeOf(object) {
|
||
if (typeof object === 'object' && object !== null) {
|
||
var $$typeof = object.$$typeof;
|
||
switch ($$typeof) {
|
||
case REACT_ELEMENT_TYPE:
|
||
var type = object.type;
|
||
|
||
switch (type) {
|
||
case REACT_ASYNC_MODE_TYPE:
|
||
case REACT_CONCURRENT_MODE_TYPE:
|
||
case REACT_FRAGMENT_TYPE:
|
||
case REACT_PROFILER_TYPE:
|
||
case REACT_STRICT_MODE_TYPE:
|
||
case REACT_SUSPENSE_TYPE:
|
||
return type;
|
||
default:
|
||
var $$typeofType = type && type.$$typeof;
|
||
|
||
switch ($$typeofType) {
|
||
case REACT_CONTEXT_TYPE:
|
||
case REACT_FORWARD_REF_TYPE:
|
||
case REACT_PROVIDER_TYPE:
|
||
return $$typeofType;
|
||
default:
|
||
return $$typeof;
|
||
}
|
||
}
|
||
case REACT_LAZY_TYPE:
|
||
case REACT_MEMO_TYPE:
|
||
case REACT_PORTAL_TYPE:
|
||
return $$typeof;
|
||
}
|
||
}
|
||
|
||
return undefined;
|
||
}
|
||
|
||
// AsyncMode is deprecated along with isAsyncMode
|
||
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
||
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
||
var ContextConsumer = REACT_CONTEXT_TYPE;
|
||
var ContextProvider = REACT_PROVIDER_TYPE;
|
||
var Element = REACT_ELEMENT_TYPE;
|
||
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
||
var Fragment = REACT_FRAGMENT_TYPE;
|
||
var Lazy = REACT_LAZY_TYPE;
|
||
var Memo = REACT_MEMO_TYPE;
|
||
var Portal = REACT_PORTAL_TYPE;
|
||
var Profiler = REACT_PROFILER_TYPE;
|
||
var StrictMode = REACT_STRICT_MODE_TYPE;
|
||
var Suspense = REACT_SUSPENSE_TYPE;
|
||
|
||
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
||
|
||
// AsyncMode should be deprecated
|
||
function isAsyncMode(object) {
|
||
{
|
||
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
||
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
||
lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
||
}
|
||
}
|
||
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
||
}
|
||
function isConcurrentMode(object) {
|
||
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
||
}
|
||
function isContextConsumer(object) {
|
||
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||
}
|
||
function isContextProvider(object) {
|
||
return typeOf(object) === REACT_PROVIDER_TYPE;
|
||
}
|
||
function isElement(object) {
|
||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
||
}
|
||
function isForwardRef(object) {
|
||
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
||
}
|
||
function isFragment(object) {
|
||
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
||
}
|
||
function isLazy(object) {
|
||
return typeOf(object) === REACT_LAZY_TYPE;
|
||
}
|
||
function isMemo(object) {
|
||
return typeOf(object) === REACT_MEMO_TYPE;
|
||
}
|
||
function isPortal(object) {
|
||
return typeOf(object) === REACT_PORTAL_TYPE;
|
||
}
|
||
function isProfiler(object) {
|
||
return typeOf(object) === REACT_PROFILER_TYPE;
|
||
}
|
||
function isStrictMode(object) {
|
||
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
||
}
|
||
function isSuspense(object) {
|
||
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
||
}
|
||
|
||
exports.typeOf = typeOf;
|
||
exports.AsyncMode = AsyncMode;
|
||
exports.ConcurrentMode = ConcurrentMode;
|
||
exports.ContextConsumer = ContextConsumer;
|
||
exports.ContextProvider = ContextProvider;
|
||
exports.Element = Element;
|
||
exports.ForwardRef = ForwardRef;
|
||
exports.Fragment = Fragment;
|
||
exports.Lazy = Lazy;
|
||
exports.Memo = Memo;
|
||
exports.Portal = Portal;
|
||
exports.Profiler = Profiler;
|
||
exports.StrictMode = StrictMode;
|
||
exports.Suspense = Suspense;
|
||
exports.isValidElementType = isValidElementType;
|
||
exports.isAsyncMode = isAsyncMode;
|
||
exports.isConcurrentMode = isConcurrentMode;
|
||
exports.isContextConsumer = isContextConsumer;
|
||
exports.isContextProvider = isContextProvider;
|
||
exports.isElement = isElement;
|
||
exports.isForwardRef = isForwardRef;
|
||
exports.isFragment = isFragment;
|
||
exports.isLazy = isLazy;
|
||
exports.isMemo = isMemo;
|
||
exports.isPortal = isPortal;
|
||
exports.isProfiler = isProfiler;
|
||
exports.isStrictMode = isStrictMode;
|
||
exports.isSuspense = isSuspense;
|
||
})();
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-router/node_modules/react-is/index.js":
|
||
/*!******************************************************************!*\
|
||
!*** ./node_modules/react-router/node_modules/react-is/index.js ***!
|
||
\******************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
if (false) {} else {
|
||
module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-router/node_modules/react-is/cjs/react-is.development.js");
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react-window/dist/index.esm.js":
|
||
/*!*****************************************************************!*\
|
||
!*** ./node_modules/react-window/dist/index.esm.js + 1 modules ***!
|
||
\*****************************************************************/
|
||
/*! exports provided: VariableSizeGrid, VariableSizeList, FixedSizeGrid, FixedSizeList, areEqual, shouldComponentUpdate */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js because of ./node_modules/react-redux/es/index.js */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js because of ./node_modules/react-redux/es/index.js */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js because of ./node_modules/react-redux/es/index.js */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js because of ./node_modules/react-measure/dist/index.esm.js */
|
||
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
||
var esm_extends = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/extends.js");
|
||
|
||
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
||
var inheritsLoose = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");
|
||
|
||
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
||
var assertThisInitialized = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
|
||
|
||
// CONCATENATED MODULE: ./node_modules/memoize-one/esm/index.js
|
||
|
||
|
||
var simpleIsEqual = function simpleIsEqual(a, b) {
|
||
return a === b;
|
||
};
|
||
|
||
/* harmony default export */ var esm = (function (resultFn) {
|
||
var isEqual = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : simpleIsEqual;
|
||
|
||
var lastThis = void 0;
|
||
var lastArgs = [];
|
||
var lastResult = void 0;
|
||
var calledOnce = false;
|
||
|
||
var isNewArgEqualToLast = function isNewArgEqualToLast(newArg, index) {
|
||
return isEqual(newArg, lastArgs[index]);
|
||
};
|
||
|
||
var result = function result() {
|
||
for (var _len = arguments.length, newArgs = Array(_len), _key = 0; _key < _len; _key++) {
|
||
newArgs[_key] = arguments[_key];
|
||
}
|
||
|
||
if (calledOnce && lastThis === this && newArgs.length === lastArgs.length && newArgs.every(isNewArgEqualToLast)) {
|
||
return lastResult;
|
||
}
|
||
|
||
calledOnce = true;
|
||
lastThis = this;
|
||
lastArgs = newArgs;
|
||
lastResult = resultFn.apply(this, newArgs);
|
||
return lastResult;
|
||
};
|
||
|
||
return result;
|
||
});
|
||
// EXTERNAL MODULE: ./node_modules/react/index.js
|
||
var react = __webpack_require__("./node_modules/react/index.js");
|
||
|
||
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
||
var objectWithoutPropertiesLoose = __webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");
|
||
|
||
// CONCATENATED MODULE: ./node_modules/react-window/dist/index.esm.js
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VariableSizeGrid", function() { return VariableSizeGrid; });
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VariableSizeList", function() { return VariableSizeList; });
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FixedSizeGrid", function() { return FixedSizeGrid; });
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FixedSizeList", function() { return FixedSizeList; });
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areEqual", function() { return areEqual; });
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shouldComponentUpdate", function() { return shouldComponentUpdate; });
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// Animation frame based implementation of setTimeout.
|
||
// Inspired by Joe Lambert, https://gist.github.com/joelambert/1002116#file-requesttimeout-js
|
||
var hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
|
||
var now = hasNativePerformanceNow ? function () {
|
||
return performance.now();
|
||
} : function () {
|
||
return Date.now();
|
||
};
|
||
function cancelTimeout(timeoutID) {
|
||
cancelAnimationFrame(timeoutID.id);
|
||
}
|
||
function requestTimeout(callback, delay) {
|
||
var start = now();
|
||
|
||
function tick() {
|
||
if (now() - start >= delay) {
|
||
callback.call(null);
|
||
} else {
|
||
timeoutID.id = requestAnimationFrame(tick);
|
||
}
|
||
}
|
||
|
||
var timeoutID = {
|
||
id: requestAnimationFrame(tick)
|
||
};
|
||
return timeoutID;
|
||
}
|
||
|
||
var IS_SCROLLING_DEBOUNCE_INTERVAL = 150;
|
||
|
||
var defaultItemKey = function defaultItemKey(_ref) {
|
||
var columnIndex = _ref.columnIndex,
|
||
data = _ref.data,
|
||
rowIndex = _ref.rowIndex;
|
||
return rowIndex + ":" + columnIndex;
|
||
};
|
||
|
||
function createGridComponent(_ref2) {
|
||
var _class, _temp;
|
||
|
||
var getColumnOffset = _ref2.getColumnOffset,
|
||
getColumnStartIndexForOffset = _ref2.getColumnStartIndexForOffset,
|
||
getColumnStopIndexForStartIndex = _ref2.getColumnStopIndexForStartIndex,
|
||
getColumnWidth = _ref2.getColumnWidth,
|
||
getEstimatedTotalHeight = _ref2.getEstimatedTotalHeight,
|
||
getEstimatedTotalWidth = _ref2.getEstimatedTotalWidth,
|
||
getOffsetForColumnAndAlignment = _ref2.getOffsetForColumnAndAlignment,
|
||
getOffsetForRowAndAlignment = _ref2.getOffsetForRowAndAlignment,
|
||
getRowHeight = _ref2.getRowHeight,
|
||
getRowOffset = _ref2.getRowOffset,
|
||
getRowStartIndexForOffset = _ref2.getRowStartIndexForOffset,
|
||
getRowStopIndexForStartIndex = _ref2.getRowStopIndexForStartIndex,
|
||
initInstanceProps = _ref2.initInstanceProps,
|
||
shouldResetStyleCacheOnItemSizeChange = _ref2.shouldResetStyleCacheOnItemSizeChange,
|
||
validateProps = _ref2.validateProps;
|
||
return _temp = _class =
|
||
/*#__PURE__*/
|
||
function (_PureComponent) {
|
||
Object(inheritsLoose["default"])(Grid, _PureComponent);
|
||
|
||
// Always use explicit constructor for React components.
|
||
// It produces less code after transpilation. (#26)
|
||
// eslint-disable-next-line no-useless-constructor
|
||
function Grid(props) {
|
||
var _this;
|
||
|
||
_this = _PureComponent.call(this, props) || this;
|
||
_this._instanceProps = initInstanceProps(_this.props, Object(assertThisInitialized["default"])(Object(assertThisInitialized["default"])(_this)));
|
||
_this._resetIsScrollingTimeoutId = null;
|
||
_this._outerRef = void 0;
|
||
_this.state = {
|
||
isScrolling: false,
|
||
horizontalScrollDirection: 'forward',
|
||
scrollLeft: typeof _this.props.initialScrollLeft === 'number' ? _this.props.initialScrollLeft : 0,
|
||
scrollTop: typeof _this.props.initialScrollTop === 'number' ? _this.props.initialScrollTop : 0,
|
||
scrollUpdateWasRequested: false,
|
||
verticalScrollDirection: 'forward'
|
||
};
|
||
_this._callOnItemsRendered = void 0;
|
||
_this._callOnItemsRendered = esm(function (overscanColumnStartIndex, overscanColumnStopIndex, overscanRowStartIndex, overscanRowStopIndex, visibleColumnStartIndex, visibleColumnStopIndex, visibleRowStartIndex, visibleRowStopIndex) {
|
||
return _this.props.onItemsRendered({
|
||
overscanColumnStartIndex: overscanColumnStartIndex,
|
||
overscanColumnStopIndex: overscanColumnStopIndex,
|
||
overscanRowStartIndex: overscanRowStartIndex,
|
||
overscanRowStopIndex: overscanRowStopIndex,
|
||
visibleColumnStartIndex: visibleColumnStartIndex,
|
||
visibleColumnStopIndex: visibleColumnStopIndex,
|
||
visibleRowStartIndex: visibleRowStartIndex,
|
||
visibleRowStopIndex: visibleRowStopIndex
|
||
});
|
||
});
|
||
_this._callOnScroll = void 0;
|
||
_this._callOnScroll = esm(function (scrollLeft, scrollTop, horizontalScrollDirection, verticalScrollDirection, scrollUpdateWasRequested) {
|
||
return _this.props.onScroll({
|
||
horizontalScrollDirection: horizontalScrollDirection,
|
||
scrollLeft: scrollLeft,
|
||
scrollTop: scrollTop,
|
||
verticalScrollDirection: verticalScrollDirection,
|
||
scrollUpdateWasRequested: scrollUpdateWasRequested
|
||
});
|
||
});
|
||
_this._getItemStyle = void 0;
|
||
|
||
_this._getItemStyle = function (rowIndex, columnIndex) {
|
||
var key = rowIndex + ":" + columnIndex;
|
||
|
||
var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && _this.props.columnWidth, shouldResetStyleCacheOnItemSizeChange && _this.props.rowHeight);
|
||
|
||
var style;
|
||
|
||
if (itemStyleCache.hasOwnProperty(key)) {
|
||
style = itemStyleCache[key];
|
||
} else {
|
||
itemStyleCache[key] = style = {
|
||
position: 'absolute',
|
||
left: getColumnOffset(_this.props, columnIndex, _this._instanceProps),
|
||
top: getRowOffset(_this.props, rowIndex, _this._instanceProps),
|
||
height: getRowHeight(_this.props, rowIndex, _this._instanceProps),
|
||
width: getColumnWidth(_this.props, columnIndex, _this._instanceProps)
|
||
};
|
||
}
|
||
|
||
return style;
|
||
};
|
||
|
||
_this._getItemStyleCache = void 0;
|
||
_this._getItemStyleCache = esm(function (_, __) {
|
||
return {};
|
||
});
|
||
|
||
_this._onScroll = function (event) {
|
||
var _event$currentTarget = event.currentTarget,
|
||
scrollLeft = _event$currentTarget.scrollLeft,
|
||
scrollTop = _event$currentTarget.scrollTop;
|
||
|
||
_this.setState(function (prevState) {
|
||
if (prevState.scrollLeft === scrollLeft && prevState.scrollTop === scrollTop) {
|
||
// Scroll position may have been updated by cDM/cDU,
|
||
// In which case we don't need to trigger another render,
|
||
// And we don't want to update state.isScrolling.
|
||
return null;
|
||
}
|
||
|
||
return {
|
||
isScrolling: true,
|
||
horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',
|
||
scrollLeft: scrollLeft,
|
||
scrollTop: scrollTop,
|
||
verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward',
|
||
scrollUpdateWasRequested: false
|
||
};
|
||
}, _this._resetIsScrollingDebounced);
|
||
};
|
||
|
||
_this._outerRefSetter = function (ref) {
|
||
var outerRef = _this.props.outerRef;
|
||
_this._outerRef = ref;
|
||
|
||
if (typeof outerRef === 'function') {
|
||
outerRef(ref);
|
||
} else if (outerRef != null && typeof outerRef === 'object' && outerRef.hasOwnProperty('current')) {
|
||
outerRef.current = ref;
|
||
}
|
||
};
|
||
|
||
_this._resetIsScrollingDebounced = function () {
|
||
if (_this._resetIsScrollingTimeoutId !== null) {
|
||
cancelTimeout(_this._resetIsScrollingTimeoutId);
|
||
}
|
||
|
||
_this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL);
|
||
};
|
||
|
||
_this._resetIsScrolling = function () {
|
||
_this._resetIsScrollingTimeoutId = null;
|
||
|
||
_this.setState({
|
||
isScrolling: false
|
||
}, function () {
|
||
// Clear style cache after state update has been committed.
|
||
// This way we don't break pure sCU for items that don't use isScrolling param.
|
||
_this._getItemStyleCache(-1);
|
||
});
|
||
};
|
||
|
||
return _this;
|
||
}
|
||
|
||
Grid.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {
|
||
validateSharedProps(nextProps);
|
||
validateProps(nextProps);
|
||
return null;
|
||
};
|
||
|
||
var _proto = Grid.prototype;
|
||
|
||
_proto.scrollTo = function scrollTo(_ref3) {
|
||
var scrollLeft = _ref3.scrollLeft,
|
||
scrollTop = _ref3.scrollTop;
|
||
this.setState(function (prevState) {
|
||
if (scrollLeft === undefined) {
|
||
scrollLeft = prevState.scrollLeft;
|
||
}
|
||
|
||
if (scrollTop === undefined) {
|
||
scrollTop = prevState.scrollTop;
|
||
}
|
||
|
||
return {
|
||
horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',
|
||
scrollLeft: scrollLeft,
|
||
scrollTop: scrollTop,
|
||
scrollUpdateWasRequested: true,
|
||
verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward'
|
||
};
|
||
}, this._resetIsScrollingDebounced);
|
||
};
|
||
|
||
_proto.scrollToItem = function scrollToItem(_ref4) {
|
||
var _ref4$align = _ref4.align,
|
||
align = _ref4$align === void 0 ? 'auto' : _ref4$align,
|
||
columnIndex = _ref4.columnIndex,
|
||
rowIndex = _ref4.rowIndex;
|
||
var _this$state = this.state,
|
||
scrollLeft = _this$state.scrollLeft,
|
||
scrollTop = _this$state.scrollTop;
|
||
this.scrollTo({
|
||
scrollLeft: getOffsetForColumnAndAlignment(this.props, columnIndex, align, scrollLeft, this._instanceProps),
|
||
scrollTop: getOffsetForRowAndAlignment(this.props, rowIndex, align, scrollTop, this._instanceProps)
|
||
});
|
||
};
|
||
|
||
_proto.componentDidMount = function componentDidMount() {
|
||
var _this$props = this.props,
|
||
initialScrollLeft = _this$props.initialScrollLeft,
|
||
initialScrollTop = _this$props.initialScrollTop;
|
||
|
||
if (typeof initialScrollLeft === 'number' && this._outerRef != null) {
|
||
this._outerRef.scrollLeft = initialScrollLeft;
|
||
}
|
||
|
||
if (typeof initialScrollTop === 'number' && this._outerRef != null) {
|
||
this._outerRef.scrollTop = initialScrollTop;
|
||
}
|
||
|
||
this._callPropsCallbacks();
|
||
};
|
||
|
||
_proto.componentDidUpdate = function componentDidUpdate() {
|
||
var _this$state2 = this.state,
|
||
scrollLeft = _this$state2.scrollLeft,
|
||
scrollTop = _this$state2.scrollTop,
|
||
scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;
|
||
|
||
if (scrollUpdateWasRequested && this._outerRef !== null) {
|
||
this._outerRef.scrollLeft = scrollLeft;
|
||
this._outerRef.scrollTop = scrollTop;
|
||
}
|
||
|
||
this._callPropsCallbacks();
|
||
};
|
||
|
||
_proto.componentWillUnmount = function componentWillUnmount() {
|
||
if (this._resetIsScrollingTimeoutId !== null) {
|
||
cancelTimeout(this._resetIsScrollingTimeoutId);
|
||
}
|
||
};
|
||
|
||
_proto.render = function render() {
|
||
var _this$props2 = this.props,
|
||
children = _this$props2.children,
|
||
className = _this$props2.className,
|
||
columnCount = _this$props2.columnCount,
|
||
height = _this$props2.height,
|
||
innerRef = _this$props2.innerRef,
|
||
innerElementType = _this$props2.innerElementType,
|
||
innerTagName = _this$props2.innerTagName,
|
||
itemData = _this$props2.itemData,
|
||
_this$props2$itemKey = _this$props2.itemKey,
|
||
itemKey = _this$props2$itemKey === void 0 ? defaultItemKey : _this$props2$itemKey,
|
||
outerElementType = _this$props2.outerElementType,
|
||
outerTagName = _this$props2.outerTagName,
|
||
rowCount = _this$props2.rowCount,
|
||
style = _this$props2.style,
|
||
useIsScrolling = _this$props2.useIsScrolling,
|
||
width = _this$props2.width;
|
||
var isScrolling = this.state.isScrolling;
|
||
|
||
var _this$_getHorizontalR = this._getHorizontalRangeToRender(),
|
||
columnStartIndex = _this$_getHorizontalR[0],
|
||
columnStopIndex = _this$_getHorizontalR[1];
|
||
|
||
var _this$_getVerticalRan = this._getVerticalRangeToRender(),
|
||
rowStartIndex = _this$_getVerticalRan[0],
|
||
rowStopIndex = _this$_getVerticalRan[1];
|
||
|
||
var items = [];
|
||
|
||
if (columnCount > 0 && rowCount) {
|
||
for (var _rowIndex = rowStartIndex; _rowIndex <= rowStopIndex; _rowIndex++) {
|
||
for (var _columnIndex = columnStartIndex; _columnIndex <= columnStopIndex; _columnIndex++) {
|
||
items.push(Object(react["createElement"])(children, {
|
||
columnIndex: _columnIndex,
|
||
data: itemData,
|
||
isScrolling: useIsScrolling ? isScrolling : undefined,
|
||
key: itemKey({
|
||
columnIndex: _columnIndex,
|
||
data: itemData,
|
||
rowIndex: _rowIndex
|
||
}),
|
||
rowIndex: _rowIndex,
|
||
style: this._getItemStyle(_rowIndex, _columnIndex)
|
||
}));
|
||
}
|
||
}
|
||
} // Read this value AFTER items have been created,
|
||
// So their actual sizes (if variable) are taken into consideration.
|
||
|
||
|
||
var estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);
|
||
var estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps);
|
||
return Object(react["createElement"])(outerElementType || outerTagName || 'div', {
|
||
className: className,
|
||
onScroll: this._onScroll,
|
||
ref: this._outerRefSetter,
|
||
style: Object(esm_extends["default"])({
|
||
position: 'relative',
|
||
height: height,
|
||
width: width,
|
||
overflow: 'auto',
|
||
WebkitOverflowScrolling: 'touch',
|
||
willChange: 'transform'
|
||
}, style)
|
||
}, Object(react["createElement"])(innerElementType || innerTagName || 'div', {
|
||
children: items,
|
||
ref: innerRef,
|
||
style: {
|
||
height: estimatedTotalHeight,
|
||
pointerEvents: isScrolling ? 'none' : '',
|
||
width: estimatedTotalWidth
|
||
}
|
||
}));
|
||
};
|
||
|
||
_proto._callPropsCallbacks = function _callPropsCallbacks() {
|
||
var _this$props3 = this.props,
|
||
columnCount = _this$props3.columnCount,
|
||
onItemsRendered = _this$props3.onItemsRendered,
|
||
onScroll = _this$props3.onScroll,
|
||
rowCount = _this$props3.rowCount;
|
||
|
||
if (typeof onItemsRendered === 'function') {
|
||
if (columnCount > 0 && rowCount > 0) {
|
||
var _this$_getHorizontalR2 = this._getHorizontalRangeToRender(),
|
||
_overscanColumnStartIndex = _this$_getHorizontalR2[0],
|
||
_overscanColumnStopIndex = _this$_getHorizontalR2[1],
|
||
_visibleColumnStartIndex = _this$_getHorizontalR2[2],
|
||
_visibleColumnStopIndex = _this$_getHorizontalR2[3];
|
||
|
||
var _this$_getVerticalRan2 = this._getVerticalRangeToRender(),
|
||
_overscanRowStartIndex = _this$_getVerticalRan2[0],
|
||
_overscanRowStopIndex = _this$_getVerticalRan2[1],
|
||
_visibleRowStartIndex = _this$_getVerticalRan2[2],
|
||
_visibleRowStopIndex = _this$_getVerticalRan2[3];
|
||
|
||
this._callOnItemsRendered(_overscanColumnStartIndex, _overscanColumnStopIndex, _overscanRowStartIndex, _overscanRowStopIndex, _visibleColumnStartIndex, _visibleColumnStopIndex, _visibleRowStartIndex, _visibleRowStopIndex);
|
||
}
|
||
}
|
||
|
||
if (typeof onScroll === 'function') {
|
||
var _this$state3 = this.state,
|
||
_horizontalScrollDirection = _this$state3.horizontalScrollDirection,
|
||
_scrollLeft = _this$state3.scrollLeft,
|
||
_scrollTop = _this$state3.scrollTop,
|
||
_scrollUpdateWasRequested = _this$state3.scrollUpdateWasRequested,
|
||
_verticalScrollDirection = _this$state3.verticalScrollDirection;
|
||
|
||
this._callOnScroll(_scrollLeft, _scrollTop, _horizontalScrollDirection, _verticalScrollDirection, _scrollUpdateWasRequested);
|
||
}
|
||
}; // Lazily create and cache item styles while scrolling,
|
||
// So that pure component sCU will prevent re-renders.
|
||
// We maintain this cache, and pass a style prop rather than index,
|
||
// So that List can clear cached styles and force item re-render if necessary.
|
||
|
||
|
||
_proto._getHorizontalRangeToRender = function _getHorizontalRangeToRender() {
|
||
var _this$props4 = this.props,
|
||
columnCount = _this$props4.columnCount,
|
||
overscanColumnsCount = _this$props4.overscanColumnsCount,
|
||
overscanCount = _this$props4.overscanCount,
|
||
rowCount = _this$props4.rowCount;
|
||
var _this$state4 = this.state,
|
||
horizontalScrollDirection = _this$state4.horizontalScrollDirection,
|
||
isScrolling = _this$state4.isScrolling,
|
||
scrollLeft = _this$state4.scrollLeft;
|
||
var overscanCountResolved = overscanColumnsCount || overscanCount || 1;
|
||
|
||
if (columnCount === 0 || rowCount === 0) {
|
||
return [0, 0, 0, 0];
|
||
}
|
||
|
||
var startIndex = getColumnStartIndexForOffset(this.props, scrollLeft, this._instanceProps);
|
||
var stopIndex = getColumnStopIndexForStartIndex(this.props, startIndex, scrollLeft, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.
|
||
// If there isn't at least one extra item, tab loops back around.
|
||
|
||
var overscanBackward = !isScrolling || horizontalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;
|
||
var overscanForward = !isScrolling || horizontalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;
|
||
return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(columnCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];
|
||
};
|
||
|
||
_proto._getVerticalRangeToRender = function _getVerticalRangeToRender() {
|
||
var _this$props5 = this.props,
|
||
columnCount = _this$props5.columnCount,
|
||
overscanCount = _this$props5.overscanCount,
|
||
overscanRowsCount = _this$props5.overscanRowsCount,
|
||
rowCount = _this$props5.rowCount;
|
||
var _this$state5 = this.state,
|
||
isScrolling = _this$state5.isScrolling,
|
||
verticalScrollDirection = _this$state5.verticalScrollDirection,
|
||
scrollTop = _this$state5.scrollTop;
|
||
var overscanCountResolved = overscanRowsCount || overscanCount || 1;
|
||
|
||
if (columnCount === 0 || rowCount === 0) {
|
||
return [0, 0, 0, 0];
|
||
}
|
||
|
||
var startIndex = getRowStartIndexForOffset(this.props, scrollTop, this._instanceProps);
|
||
var stopIndex = getRowStopIndexForStartIndex(this.props, startIndex, scrollTop, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.
|
||
// If there isn't at least one extra item, tab loops back around.
|
||
|
||
var overscanBackward = !isScrolling || verticalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;
|
||
var overscanForward = !isScrolling || verticalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;
|
||
return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(rowCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];
|
||
};
|
||
|
||
return Grid;
|
||
}(react["PureComponent"]), _class.defaultProps = {
|
||
itemData: undefined,
|
||
useIsScrolling: false
|
||
}, _temp;
|
||
}
|
||
|
||
var validateSharedProps = function validateSharedProps(_ref5) {
|
||
var children = _ref5.children,
|
||
height = _ref5.height,
|
||
innerTagName = _ref5.innerTagName,
|
||
outerTagName = _ref5.outerTagName,
|
||
overscanCount = _ref5.overscanCount,
|
||
width = _ref5.width;
|
||
|
||
if (true) {
|
||
if (typeof overscanCount === 'number') {
|
||
console.warn('The overscanCount prop has been deprecated. ' + 'Please use the overscanColumnsCount and overscanRowsCount props instead.');
|
||
}
|
||
|
||
if (innerTagName != null || outerTagName != null) {
|
||
console.warn('The innerTagName and outerTagName props have been deprecated. ' + 'Please use the innerElementType and outerElementType props instead.');
|
||
}
|
||
|
||
if (children == null) {
|
||
throw Error('An invalid "children" prop has been specified. ' + 'Value should be a React component. ' + ("\"" + (children === null ? 'null' : typeof children) + "\" was specified."));
|
||
}
|
||
|
||
if (typeof width !== 'number') {
|
||
throw Error('An invalid "width" prop has been specified. ' + 'Grids must specify a number for width. ' + ("\"" + (width === null ? 'null' : typeof width) + "\" was specified."));
|
||
}
|
||
|
||
if (typeof height !== 'number') {
|
||
throw Error('An invalid "height" prop has been specified. ' + 'Grids must specify a number for height. ' + ("\"" + (height === null ? 'null' : typeof height) + "\" was specified."));
|
||
}
|
||
}
|
||
};
|
||
|
||
var DEFAULT_ESTIMATED_ITEM_SIZE = 50;
|
||
|
||
var index_esm_getEstimatedTotalHeight = function getEstimatedTotalHeight(_ref, _ref2) {
|
||
var rowCount = _ref.rowCount;
|
||
var rowMetadataMap = _ref2.rowMetadataMap,
|
||
estimatedRowHeight = _ref2.estimatedRowHeight,
|
||
lastMeasuredRowIndex = _ref2.lastMeasuredRowIndex;
|
||
var totalSizeOfMeasuredRows = 0;
|
||
|
||
if (lastMeasuredRowIndex >= 0) {
|
||
var itemMetadata = rowMetadataMap[lastMeasuredRowIndex];
|
||
totalSizeOfMeasuredRows = itemMetadata.offset + itemMetadata.size;
|
||
}
|
||
|
||
var numUnmeasuredItems = rowCount - lastMeasuredRowIndex - 1;
|
||
var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedRowHeight;
|
||
return totalSizeOfMeasuredRows + totalSizeOfUnmeasuredItems;
|
||
};
|
||
|
||
var index_esm_getEstimatedTotalWidth = function getEstimatedTotalWidth(_ref3, _ref4) {
|
||
var columnCount = _ref3.columnCount;
|
||
var columnMetadataMap = _ref4.columnMetadataMap,
|
||
estimatedColumnWidth = _ref4.estimatedColumnWidth,
|
||
lastMeasuredColumnIndex = _ref4.lastMeasuredColumnIndex;
|
||
var totalSizeOfMeasuredRows = 0;
|
||
|
||
if (lastMeasuredColumnIndex >= 0) {
|
||
var itemMetadata = columnMetadataMap[lastMeasuredColumnIndex];
|
||
totalSizeOfMeasuredRows = itemMetadata.offset + itemMetadata.size;
|
||
}
|
||
|
||
var numUnmeasuredItems = columnCount - lastMeasuredColumnIndex - 1;
|
||
var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedColumnWidth;
|
||
return totalSizeOfMeasuredRows + totalSizeOfUnmeasuredItems;
|
||
};
|
||
|
||
var getItemMetadata = function getItemMetadata(itemType, props, index, instanceProps) {
|
||
var itemMetadataMap, itemSize, lastMeasuredIndex;
|
||
|
||
if (itemType === 'column') {
|
||
itemMetadataMap = instanceProps.columnMetadataMap;
|
||
itemSize = props.columnWidth;
|
||
lastMeasuredIndex = instanceProps.lastMeasuredColumnIndex;
|
||
} else {
|
||
itemMetadataMap = instanceProps.rowMetadataMap;
|
||
itemSize = props.rowHeight;
|
||
lastMeasuredIndex = instanceProps.lastMeasuredRowIndex;
|
||
}
|
||
|
||
if (index > lastMeasuredIndex) {
|
||
var offset = 0;
|
||
|
||
if (lastMeasuredIndex >= 0) {
|
||
var itemMetadata = itemMetadataMap[lastMeasuredIndex];
|
||
offset = itemMetadata.offset + itemMetadata.size;
|
||
}
|
||
|
||
for (var i = lastMeasuredIndex + 1; i <= index; i++) {
|
||
var size = itemSize(i);
|
||
itemMetadataMap[i] = {
|
||
offset: offset,
|
||
size: size
|
||
};
|
||
offset += size;
|
||
}
|
||
|
||
if (itemType === 'column') {
|
||
instanceProps.lastMeasuredColumnIndex = index;
|
||
} else {
|
||
instanceProps.lastMeasuredRowIndex = index;
|
||
}
|
||
}
|
||
|
||
return itemMetadataMap[index];
|
||
};
|
||
|
||
var findNearestItem = function findNearestItem(itemType, props, instanceProps, offset) {
|
||
var itemMetadataMap, lastMeasuredIndex;
|
||
|
||
if (itemType === 'column') {
|
||
itemMetadataMap = instanceProps.columnMetadataMap;
|
||
lastMeasuredIndex = instanceProps.lastMeasuredColumnIndex;
|
||
} else {
|
||
itemMetadataMap = instanceProps.rowMetadataMap;
|
||
lastMeasuredIndex = instanceProps.lastMeasuredRowIndex;
|
||
}
|
||
|
||
var lastMeasuredItemOffset = lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;
|
||
|
||
if (lastMeasuredItemOffset >= offset) {
|
||
// If we've already measured items within this range just use a binary search as it's faster.
|
||
return findNearestItemBinarySearch(itemType, props, instanceProps, lastMeasuredIndex, 0, offset);
|
||
} else {
|
||
// If we haven't yet measured this high, fallback to an exponential search with an inner binary search.
|
||
// The exponential search avoids pre-computing sizes for the full set of items as a binary search would.
|
||
// The overall complexity for this approach is O(log n).
|
||
return findNearestItemExponentialSearch(itemType, props, instanceProps, Math.max(0, lastMeasuredIndex), offset);
|
||
}
|
||
};
|
||
|
||
var findNearestItemBinarySearch = function findNearestItemBinarySearch(itemType, props, instanceProps, high, low, offset) {
|
||
while (low <= high) {
|
||
var middle = low + Math.floor((high - low) / 2);
|
||
var currentOffset = getItemMetadata(itemType, props, middle, instanceProps).offset;
|
||
|
||
if (currentOffset === offset) {
|
||
return middle;
|
||
} else if (currentOffset < offset) {
|
||
low = middle + 1;
|
||
} else if (currentOffset > offset) {
|
||
high = middle - 1;
|
||
}
|
||
}
|
||
|
||
if (low > 0) {
|
||
return low - 1;
|
||
} else {
|
||
return 0;
|
||
}
|
||
};
|
||
|
||
var findNearestItemExponentialSearch = function findNearestItemExponentialSearch(itemType, props, instanceProps, index, offset) {
|
||
var itemCount = itemType === 'column' ? props.columnCount : props.rowCount;
|
||
var interval = 1;
|
||
|
||
while (index < itemCount && getItemMetadata(itemType, props, index, instanceProps).offset < offset) {
|
||
index += interval;
|
||
interval *= 2;
|
||
}
|
||
|
||
return findNearestItemBinarySearch(itemType, props, instanceProps, Math.min(index, itemCount - 1), Math.floor(index / 2), offset);
|
||
};
|
||
|
||
var index_esm_getOffsetForIndexAndAlignment = function getOffsetForIndexAndAlignment(itemType, props, index, align, scrollOffset, instanceProps) {
|
||
var size = itemType === 'column' ? props.width : props.height;
|
||
var itemMetadata = getItemMetadata(itemType, props, index, instanceProps); // Get estimated total size after ItemMetadata is computed,
|
||
// To ensure it reflects actual measurements instead of just estimates.
|
||
|
||
var estimatedTotalSize = itemType === 'column' ? index_esm_getEstimatedTotalWidth(props, instanceProps) : index_esm_getEstimatedTotalHeight(props, instanceProps);
|
||
var maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, itemMetadata.offset));
|
||
var minOffset = Math.max(0, itemMetadata.offset - size + itemMetadata.size);
|
||
|
||
switch (align) {
|
||
case 'start':
|
||
return maxOffset;
|
||
|
||
case 'end':
|
||
return minOffset;
|
||
|
||
case 'center':
|
||
return Math.round(minOffset + (maxOffset - minOffset) / 2);
|
||
|
||
case 'auto':
|
||
default:
|
||
if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
|
||
return scrollOffset;
|
||
} else if (scrollOffset - minOffset < maxOffset - scrollOffset) {
|
||
return minOffset;
|
||
} else {
|
||
return maxOffset;
|
||
}
|
||
|
||
}
|
||
};
|
||
|
||
var VariableSizeGrid =
|
||
/*#__PURE__*/
|
||
createGridComponent({
|
||
getColumnOffset: function getColumnOffset(props, index, instanceProps) {
|
||
return getItemMetadata('column', props, index, instanceProps).offset;
|
||
},
|
||
getColumnStartIndexForOffset: function getColumnStartIndexForOffset(props, scrollLeft, instanceProps) {
|
||
return findNearestItem('column', props, instanceProps, scrollLeft);
|
||
},
|
||
getColumnStopIndexForStartIndex: function getColumnStopIndexForStartIndex(props, startIndex, scrollLeft, instanceProps) {
|
||
var columnCount = props.columnCount,
|
||
width = props.width;
|
||
var itemMetadata = getItemMetadata('column', props, startIndex, instanceProps);
|
||
var maxOffset = scrollLeft + width;
|
||
var offset = itemMetadata.offset + itemMetadata.size;
|
||
var stopIndex = startIndex;
|
||
|
||
while (stopIndex < columnCount - 1 && offset < maxOffset) {
|
||
stopIndex++;
|
||
offset += getItemMetadata('column', props, stopIndex, instanceProps).size;
|
||
}
|
||
|
||
return stopIndex;
|
||
},
|
||
getColumnWidth: function getColumnWidth(props, index, instanceProps) {
|
||
return instanceProps.columnMetadataMap[index].size;
|
||
},
|
||
getEstimatedTotalHeight: index_esm_getEstimatedTotalHeight,
|
||
getEstimatedTotalWidth: index_esm_getEstimatedTotalWidth,
|
||
getOffsetForColumnAndAlignment: function getOffsetForColumnAndAlignment(props, index, align, scrollOffset, instanceProps) {
|
||
return index_esm_getOffsetForIndexAndAlignment('column', props, index, align, scrollOffset, instanceProps);
|
||
},
|
||
getOffsetForRowAndAlignment: function getOffsetForRowAndAlignment(props, index, align, scrollOffset, instanceProps) {
|
||
return index_esm_getOffsetForIndexAndAlignment('row', props, index, align, scrollOffset, instanceProps);
|
||
},
|
||
getRowOffset: function getRowOffset(props, index, instanceProps) {
|
||
return getItemMetadata('row', props, index, instanceProps).offset;
|
||
},
|
||
getRowHeight: function getRowHeight(props, index, instanceProps) {
|
||
return instanceProps.rowMetadataMap[index].size;
|
||
},
|
||
getRowStartIndexForOffset: function getRowStartIndexForOffset(props, scrollTop, instanceProps) {
|
||
return findNearestItem('row', props, instanceProps, scrollTop);
|
||
},
|
||
getRowStopIndexForStartIndex: function getRowStopIndexForStartIndex(props, startIndex, scrollTop, instanceProps) {
|
||
var rowCount = props.rowCount,
|
||
height = props.height;
|
||
var itemMetadata = getItemMetadata('row', props, startIndex, instanceProps);
|
||
var maxOffset = scrollTop + height;
|
||
var offset = itemMetadata.offset + itemMetadata.size;
|
||
var stopIndex = startIndex;
|
||
|
||
while (stopIndex < rowCount - 1 && offset < maxOffset) {
|
||
stopIndex++;
|
||
offset += getItemMetadata('row', props, stopIndex, instanceProps).size;
|
||
}
|
||
|
||
return stopIndex;
|
||
},
|
||
initInstanceProps: function initInstanceProps(props, instance) {
|
||
var _ref5 = props,
|
||
estimatedColumnWidth = _ref5.estimatedColumnWidth,
|
||
estimatedRowHeight = _ref5.estimatedRowHeight;
|
||
var instanceProps = {
|
||
columnMetadataMap: {},
|
||
estimatedColumnWidth: estimatedColumnWidth || DEFAULT_ESTIMATED_ITEM_SIZE,
|
||
estimatedRowHeight: estimatedRowHeight || DEFAULT_ESTIMATED_ITEM_SIZE,
|
||
lastMeasuredColumnIndex: -1,
|
||
lastMeasuredRowIndex: -1,
|
||
rowMetadataMap: {}
|
||
};
|
||
|
||
instance.resetAfterColumnIndex = function (columnIndex, shouldForceUpdate) {
|
||
if (shouldForceUpdate === void 0) {
|
||
shouldForceUpdate = true;
|
||
}
|
||
|
||
instance.resetAfterIndices({
|
||
columnIndex: columnIndex,
|
||
shouldForceUpdate: shouldForceUpdate
|
||
});
|
||
};
|
||
|
||
instance.resetAfterRowIndex = function (rowIndex, shouldForceUpdate) {
|
||
if (shouldForceUpdate === void 0) {
|
||
shouldForceUpdate = true;
|
||
}
|
||
|
||
instance.resetAfterIndices({
|
||
rowIndex: rowIndex,
|
||
shouldForceUpdate: shouldForceUpdate
|
||
});
|
||
};
|
||
|
||
instance.resetAfterIndices = function (_ref6) {
|
||
var columnIndex = _ref6.columnIndex,
|
||
rowIndex = _ref6.rowIndex,
|
||
_ref6$shouldForceUpda = _ref6.shouldForceUpdate,
|
||
shouldForceUpdate = _ref6$shouldForceUpda === void 0 ? true : _ref6$shouldForceUpda;
|
||
|
||
if (typeof columnIndex === 'number') {
|
||
instanceProps.lastMeasuredColumnIndex = Math.min(instanceProps.lastMeasuredColumnIndex, columnIndex - 1);
|
||
}
|
||
|
||
if (typeof rowIndex === 'number') {
|
||
instanceProps.lastMeasuredRowIndex = Math.min(instanceProps.lastMeasuredRowIndex, rowIndex - 1);
|
||
} // We could potentially optimize further by only evicting styles after this index,
|
||
// But since styles are only cached while scrolling is in progress-
|
||
// It seems an unnecessary optimization.
|
||
// It's unlikely that resetAfterIndex() will be called while a user is scrolling.
|
||
|
||
|
||
instance._getItemStyleCache(-1);
|
||
|
||
if (shouldForceUpdate) {
|
||
instance.forceUpdate();
|
||
}
|
||
};
|
||
|
||
return instanceProps;
|
||
},
|
||
shouldResetStyleCacheOnItemSizeChange: false,
|
||
validateProps: function validateProps(_ref7) {
|
||
var columnWidth = _ref7.columnWidth,
|
||
rowHeight = _ref7.rowHeight;
|
||
|
||
if (true) {
|
||
if (typeof columnWidth !== 'function') {
|
||
throw Error('An invalid "columnWidth" prop has been specified. ' + 'Value should be a function. ' + ("\"" + (columnWidth === null ? 'null' : typeof columnWidth) + "\" was specified."));
|
||
} else if (typeof rowHeight !== 'function') {
|
||
throw Error('An invalid "rowHeight" prop has been specified. ' + 'Value should be a function. ' + ("\"" + (rowHeight === null ? 'null' : typeof rowHeight) + "\" was specified."));
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
var IS_SCROLLING_DEBOUNCE_INTERVAL$1 = 150;
|
||
|
||
var defaultItemKey$1 = function defaultItemKey(index, data) {
|
||
return index;
|
||
};
|
||
|
||
function createListComponent(_ref) {
|
||
var _class, _temp;
|
||
|
||
var getItemOffset = _ref.getItemOffset,
|
||
getEstimatedTotalSize = _ref.getEstimatedTotalSize,
|
||
getItemSize = _ref.getItemSize,
|
||
getOffsetForIndexAndAlignment = _ref.getOffsetForIndexAndAlignment,
|
||
getStartIndexForOffset = _ref.getStartIndexForOffset,
|
||
getStopIndexForStartIndex = _ref.getStopIndexForStartIndex,
|
||
initInstanceProps = _ref.initInstanceProps,
|
||
shouldResetStyleCacheOnItemSizeChange = _ref.shouldResetStyleCacheOnItemSizeChange,
|
||
validateProps = _ref.validateProps;
|
||
return _temp = _class =
|
||
/*#__PURE__*/
|
||
function (_PureComponent) {
|
||
Object(inheritsLoose["default"])(List, _PureComponent);
|
||
|
||
// Always use explicit constructor for React components.
|
||
// It produces less code after transpilation. (#26)
|
||
// eslint-disable-next-line no-useless-constructor
|
||
function List(props) {
|
||
var _this;
|
||
|
||
_this = _PureComponent.call(this, props) || this;
|
||
_this._instanceProps = initInstanceProps(_this.props, Object(assertThisInitialized["default"])(Object(assertThisInitialized["default"])(_this)));
|
||
_this._outerRef = void 0;
|
||
_this._resetIsScrollingTimeoutId = null;
|
||
_this.state = {
|
||
isScrolling: false,
|
||
scrollDirection: 'forward',
|
||
scrollOffset: typeof _this.props.initialScrollOffset === 'number' ? _this.props.initialScrollOffset : 0,
|
||
scrollUpdateWasRequested: false
|
||
};
|
||
_this._callOnItemsRendered = void 0;
|
||
_this._callOnItemsRendered = esm(function (overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex) {
|
||
return _this.props.onItemsRendered({
|
||
overscanStartIndex: overscanStartIndex,
|
||
overscanStopIndex: overscanStopIndex,
|
||
visibleStartIndex: visibleStartIndex,
|
||
visibleStopIndex: visibleStopIndex
|
||
});
|
||
});
|
||
_this._callOnScroll = void 0;
|
||
_this._callOnScroll = esm(function (scrollDirection, scrollOffset, scrollUpdateWasRequested) {
|
||
return _this.props.onScroll({
|
||
scrollDirection: scrollDirection,
|
||
scrollOffset: scrollOffset,
|
||
scrollUpdateWasRequested: scrollUpdateWasRequested
|
||
});
|
||
});
|
||
_this._getItemStyle = void 0;
|
||
|
||
_this._getItemStyle = function (index) {
|
||
var _this$props = _this.props,
|
||
direction = _this$props.direction,
|
||
itemSize = _this$props.itemSize;
|
||
|
||
var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && itemSize, shouldResetStyleCacheOnItemSizeChange && direction);
|
||
|
||
var style;
|
||
|
||
if (itemStyleCache.hasOwnProperty(index)) {
|
||
style = itemStyleCache[index];
|
||
} else {
|
||
var _offset = getItemOffset(_this.props, index, _this._instanceProps);
|
||
|
||
var size = getItemSize(_this.props, index, _this._instanceProps);
|
||
itemStyleCache[index] = style = {
|
||
position: 'absolute',
|
||
left: direction === 'horizontal' ? _offset : 0,
|
||
top: direction === 'vertical' ? _offset : 0,
|
||
height: direction === 'vertical' ? size : '100%',
|
||
width: direction === 'horizontal' ? size : '100%'
|
||
};
|
||
}
|
||
|
||
return style;
|
||
};
|
||
|
||
_this._getItemStyleCache = void 0;
|
||
_this._getItemStyleCache = esm(function (_, __) {
|
||
return {};
|
||
});
|
||
|
||
_this._onScrollHorizontal = function (event) {
|
||
var scrollLeft = event.currentTarget.scrollLeft;
|
||
|
||
_this.setState(function (prevState) {
|
||
if (prevState.scrollOffset === scrollLeft) {
|
||
// Scroll position may have been updated by cDM/cDU,
|
||
// In which case we don't need to trigger another render,
|
||
// And we don't want to update state.isScrolling.
|
||
return null;
|
||
}
|
||
|
||
return {
|
||
isScrolling: true,
|
||
scrollDirection: prevState.scrollOffset < scrollLeft ? 'forward' : 'backward',
|
||
scrollOffset: scrollLeft,
|
||
scrollUpdateWasRequested: false
|
||
};
|
||
}, _this._resetIsScrollingDebounced);
|
||
};
|
||
|
||
_this._onScrollVertical = function (event) {
|
||
var scrollTop = event.currentTarget.scrollTop;
|
||
|
||
_this.setState(function (prevState) {
|
||
if (prevState.scrollOffset === scrollTop) {
|
||
// Scroll position may have been updated by cDM/cDU,
|
||
// In which case we don't need to trigger another render,
|
||
// And we don't want to update state.isScrolling.
|
||
return null;
|
||
}
|
||
|
||
return {
|
||
isScrolling: true,
|
||
scrollDirection: prevState.scrollOffset < scrollTop ? 'forward' : 'backward',
|
||
scrollOffset: scrollTop,
|
||
scrollUpdateWasRequested: false
|
||
};
|
||
}, _this._resetIsScrollingDebounced);
|
||
};
|
||
|
||
_this._outerRefSetter = function (ref) {
|
||
var outerRef = _this.props.outerRef;
|
||
_this._outerRef = ref;
|
||
|
||
if (typeof outerRef === 'function') {
|
||
outerRef(ref);
|
||
} else if (outerRef != null && typeof outerRef === 'object' && outerRef.hasOwnProperty('current')) {
|
||
outerRef.current = ref;
|
||
}
|
||
};
|
||
|
||
_this._resetIsScrollingDebounced = function () {
|
||
if (_this._resetIsScrollingTimeoutId !== null) {
|
||
cancelTimeout(_this._resetIsScrollingTimeoutId);
|
||
}
|
||
|
||
_this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL$1);
|
||
};
|
||
|
||
_this._resetIsScrolling = function () {
|
||
_this._resetIsScrollingTimeoutId = null;
|
||
|
||
_this.setState({
|
||
isScrolling: false
|
||
}, function () {
|
||
// Clear style cache after state update has been committed.
|
||
// This way we don't break pure sCU for items that don't use isScrolling param.
|
||
_this._getItemStyleCache(-1, null);
|
||
});
|
||
};
|
||
|
||
return _this;
|
||
}
|
||
|
||
List.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {
|
||
validateSharedProps$1(props);
|
||
validateProps(props);
|
||
return null;
|
||
};
|
||
|
||
var _proto = List.prototype;
|
||
|
||
_proto.scrollTo = function scrollTo(scrollOffset) {
|
||
this.setState(function (prevState) {
|
||
return {
|
||
scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',
|
||
scrollOffset: scrollOffset,
|
||
scrollUpdateWasRequested: true
|
||
};
|
||
}, this._resetIsScrollingDebounced);
|
||
};
|
||
|
||
_proto.scrollToItem = function scrollToItem(index, align) {
|
||
if (align === void 0) {
|
||
align = 'auto';
|
||
}
|
||
|
||
var scrollOffset = this.state.scrollOffset;
|
||
this.scrollTo(getOffsetForIndexAndAlignment(this.props, index, align, scrollOffset, this._instanceProps));
|
||
};
|
||
|
||
_proto.componentDidMount = function componentDidMount() {
|
||
var _this$props2 = this.props,
|
||
initialScrollOffset = _this$props2.initialScrollOffset,
|
||
direction = _this$props2.direction;
|
||
|
||
if (typeof initialScrollOffset === 'number' && this._outerRef !== null) {
|
||
if (direction === 'horizontal') {
|
||
this._outerRef.scrollLeft = initialScrollOffset;
|
||
} else {
|
||
this._outerRef.scrollTop = initialScrollOffset;
|
||
}
|
||
}
|
||
|
||
this._callPropsCallbacks();
|
||
};
|
||
|
||
_proto.componentDidUpdate = function componentDidUpdate() {
|
||
var direction = this.props.direction;
|
||
var _this$state = this.state,
|
||
scrollOffset = _this$state.scrollOffset,
|
||
scrollUpdateWasRequested = _this$state.scrollUpdateWasRequested;
|
||
|
||
if (scrollUpdateWasRequested && this._outerRef !== null) {
|
||
if (direction === 'horizontal') {
|
||
this._outerRef.scrollLeft = scrollOffset;
|
||
} else {
|
||
this._outerRef.scrollTop = scrollOffset;
|
||
}
|
||
}
|
||
|
||
this._callPropsCallbacks();
|
||
};
|
||
|
||
_proto.componentWillUnmount = function componentWillUnmount() {
|
||
if (this._resetIsScrollingTimeoutId !== null) {
|
||
cancelTimeout(this._resetIsScrollingTimeoutId);
|
||
}
|
||
};
|
||
|
||
_proto.render = function render() {
|
||
var _this$props3 = this.props,
|
||
children = _this$props3.children,
|
||
className = _this$props3.className,
|
||
direction = _this$props3.direction,
|
||
height = _this$props3.height,
|
||
innerRef = _this$props3.innerRef,
|
||
innerElementType = _this$props3.innerElementType,
|
||
innerTagName = _this$props3.innerTagName,
|
||
itemCount = _this$props3.itemCount,
|
||
itemData = _this$props3.itemData,
|
||
_this$props3$itemKey = _this$props3.itemKey,
|
||
itemKey = _this$props3$itemKey === void 0 ? defaultItemKey$1 : _this$props3$itemKey,
|
||
outerElementType = _this$props3.outerElementType,
|
||
outerTagName = _this$props3.outerTagName,
|
||
style = _this$props3.style,
|
||
useIsScrolling = _this$props3.useIsScrolling,
|
||
width = _this$props3.width;
|
||
var isScrolling = this.state.isScrolling;
|
||
var onScroll = direction === 'vertical' ? this._onScrollVertical : this._onScrollHorizontal;
|
||
|
||
var _this$_getRangeToRend = this._getRangeToRender(),
|
||
startIndex = _this$_getRangeToRend[0],
|
||
stopIndex = _this$_getRangeToRend[1];
|
||
|
||
var items = [];
|
||
|
||
if (itemCount > 0) {
|
||
for (var _index = startIndex; _index <= stopIndex; _index++) {
|
||
items.push(Object(react["createElement"])(children, {
|
||
data: itemData,
|
||
key: itemKey(_index, itemData),
|
||
index: _index,
|
||
isScrolling: useIsScrolling ? isScrolling : undefined,
|
||
style: this._getItemStyle(_index)
|
||
}));
|
||
}
|
||
} // Read this value AFTER items have been created,
|
||
// So their actual sizes (if variable) are taken into consideration.
|
||
|
||
|
||
var estimatedTotalSize = getEstimatedTotalSize(this.props, this._instanceProps);
|
||
return Object(react["createElement"])(outerElementType || outerTagName || 'div', {
|
||
className: className,
|
||
onScroll: onScroll,
|
||
ref: this._outerRefSetter,
|
||
style: Object(esm_extends["default"])({
|
||
position: 'relative',
|
||
height: height,
|
||
width: width,
|
||
overflow: 'auto',
|
||
WebkitOverflowScrolling: 'touch',
|
||
willChange: 'transform'
|
||
}, style)
|
||
}, Object(react["createElement"])(innerElementType || innerTagName || 'div', {
|
||
children: items,
|
||
ref: innerRef,
|
||
style: {
|
||
height: direction === 'horizontal' ? '100%' : estimatedTotalSize,
|
||
pointerEvents: isScrolling ? 'none' : '',
|
||
width: direction === 'horizontal' ? estimatedTotalSize : '100%'
|
||
}
|
||
}));
|
||
};
|
||
|
||
_proto._callPropsCallbacks = function _callPropsCallbacks() {
|
||
if (typeof this.props.onItemsRendered === 'function') {
|
||
var itemCount = this.props.itemCount;
|
||
|
||
if (itemCount > 0) {
|
||
var _this$_getRangeToRend2 = this._getRangeToRender(),
|
||
_overscanStartIndex = _this$_getRangeToRend2[0],
|
||
_overscanStopIndex = _this$_getRangeToRend2[1],
|
||
_visibleStartIndex = _this$_getRangeToRend2[2],
|
||
_visibleStopIndex = _this$_getRangeToRend2[3];
|
||
|
||
this._callOnItemsRendered(_overscanStartIndex, _overscanStopIndex, _visibleStartIndex, _visibleStopIndex);
|
||
}
|
||
}
|
||
|
||
if (typeof this.props.onScroll === 'function') {
|
||
var _this$state2 = this.state,
|
||
_scrollDirection = _this$state2.scrollDirection,
|
||
_scrollOffset = _this$state2.scrollOffset,
|
||
_scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;
|
||
|
||
this._callOnScroll(_scrollDirection, _scrollOffset, _scrollUpdateWasRequested);
|
||
}
|
||
}; // Lazily create and cache item styles while scrolling,
|
||
// So that pure component sCU will prevent re-renders.
|
||
// We maintain this cache, and pass a style prop rather than index,
|
||
// So that List can clear cached styles and force item re-render if necessary.
|
||
|
||
|
||
_proto._getRangeToRender = function _getRangeToRender() {
|
||
var _this$props4 = this.props,
|
||
itemCount = _this$props4.itemCount,
|
||
overscanCount = _this$props4.overscanCount;
|
||
var _this$state3 = this.state,
|
||
isScrolling = _this$state3.isScrolling,
|
||
scrollDirection = _this$state3.scrollDirection,
|
||
scrollOffset = _this$state3.scrollOffset;
|
||
|
||
if (itemCount === 0) {
|
||
return [0, 0, 0, 0];
|
||
}
|
||
|
||
var startIndex = getStartIndexForOffset(this.props, scrollOffset, this._instanceProps);
|
||
var stopIndex = getStopIndexForStartIndex(this.props, startIndex, scrollOffset, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.
|
||
// If there isn't at least one extra item, tab loops back around.
|
||
|
||
var overscanBackward = !isScrolling || scrollDirection === 'backward' ? Math.max(1, overscanCount) : 1;
|
||
var overscanForward = !isScrolling || scrollDirection === 'forward' ? Math.max(1, overscanCount) : 1;
|
||
return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];
|
||
};
|
||
|
||
return List;
|
||
}(react["PureComponent"]), _class.defaultProps = {
|
||
direction: 'vertical',
|
||
itemData: undefined,
|
||
overscanCount: 2,
|
||
useIsScrolling: false
|
||
}, _temp;
|
||
} // NOTE: I considered further wrapping individual items with a pure ListItem component.
|
||
// This would avoid ever calling the render function for the same index more than once,
|
||
// But it would also add the overhead of a lot of components/fibers.
|
||
// I assume people already do this (render function returning a class component),
|
||
// So my doing it would just unnecessarily double the wrappers.
|
||
|
||
var validateSharedProps$1 = function validateSharedProps(_ref2) {
|
||
var children = _ref2.children,
|
||
direction = _ref2.direction,
|
||
height = _ref2.height,
|
||
innerTagName = _ref2.innerTagName,
|
||
outerTagName = _ref2.outerTagName,
|
||
width = _ref2.width;
|
||
|
||
if (true) {
|
||
if (innerTagName != null || outerTagName != null) {
|
||
console.warn('The innerTagName and outerTagName props have been deprecated. ' + 'Please use the innerElementType and outerElementType props instead.');
|
||
}
|
||
|
||
if (direction !== 'horizontal' && direction !== 'vertical') {
|
||
throw Error('An invalid "direction" prop has been specified. ' + 'Value should be either "horizontal" or "vertical". ' + ("\"" + direction + "\" was specified."));
|
||
}
|
||
|
||
if (children == null) {
|
||
throw Error('An invalid "children" prop has been specified. ' + 'Value should be a React component. ' + ("\"" + (children === null ? 'null' : typeof children) + "\" was specified."));
|
||
}
|
||
|
||
if (direction === 'horizontal' && typeof width !== 'number') {
|
||
throw Error('An invalid "width" prop has been specified. ' + 'Horizontal lists must specify a number for width. ' + ("\"" + (width === null ? 'null' : typeof width) + "\" was specified."));
|
||
} else if (direction === 'vertical' && typeof height !== 'number') {
|
||
throw Error('An invalid "height" prop has been specified. ' + 'Vertical lists must specify a number for height. ' + ("\"" + (height === null ? 'null' : typeof height) + "\" was specified."));
|
||
}
|
||
}
|
||
};
|
||
|
||
var DEFAULT_ESTIMATED_ITEM_SIZE$1 = 50;
|
||
|
||
var getItemMetadata$1 = function getItemMetadata(props, index, instanceProps) {
|
||
var _ref = props,
|
||
itemSize = _ref.itemSize;
|
||
var itemMetadataMap = instanceProps.itemMetadataMap,
|
||
lastMeasuredIndex = instanceProps.lastMeasuredIndex;
|
||
|
||
if (index > lastMeasuredIndex) {
|
||
var offset = 0;
|
||
|
||
if (lastMeasuredIndex >= 0) {
|
||
var itemMetadata = itemMetadataMap[lastMeasuredIndex];
|
||
offset = itemMetadata.offset + itemMetadata.size;
|
||
}
|
||
|
||
for (var i = lastMeasuredIndex + 1; i <= index; i++) {
|
||
var size = itemSize(i);
|
||
itemMetadataMap[i] = {
|
||
offset: offset,
|
||
size: size
|
||
};
|
||
offset += size;
|
||
}
|
||
|
||
instanceProps.lastMeasuredIndex = index;
|
||
}
|
||
|
||
return itemMetadataMap[index];
|
||
};
|
||
|
||
var findNearestItem$1 = function findNearestItem(props, instanceProps, offset) {
|
||
var itemMetadataMap = instanceProps.itemMetadataMap,
|
||
lastMeasuredIndex = instanceProps.lastMeasuredIndex;
|
||
var lastMeasuredItemOffset = lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;
|
||
|
||
if (lastMeasuredItemOffset >= offset) {
|
||
// If we've already measured items within this range just use a binary search as it's faster.
|
||
return findNearestItemBinarySearch$1(props, instanceProps, lastMeasuredIndex, 0, offset);
|
||
} else {
|
||
// If we haven't yet measured this high, fallback to an exponential search with an inner binary search.
|
||
// The exponential search avoids pre-computing sizes for the full set of items as a binary search would.
|
||
// The overall complexity for this approach is O(log n).
|
||
return findNearestItemExponentialSearch$1(props, instanceProps, Math.max(0, lastMeasuredIndex), offset);
|
||
}
|
||
};
|
||
|
||
var findNearestItemBinarySearch$1 = function findNearestItemBinarySearch(props, instanceProps, high, low, offset) {
|
||
while (low <= high) {
|
||
var middle = low + Math.floor((high - low) / 2);
|
||
var currentOffset = getItemMetadata$1(props, middle, instanceProps).offset;
|
||
|
||
if (currentOffset === offset) {
|
||
return middle;
|
||
} else if (currentOffset < offset) {
|
||
low = middle + 1;
|
||
} else if (currentOffset > offset) {
|
||
high = middle - 1;
|
||
}
|
||
}
|
||
|
||
if (low > 0) {
|
||
return low - 1;
|
||
} else {
|
||
return 0;
|
||
}
|
||
};
|
||
|
||
var findNearestItemExponentialSearch$1 = function findNearestItemExponentialSearch(props, instanceProps, index, offset) {
|
||
var itemCount = props.itemCount;
|
||
var interval = 1;
|
||
|
||
while (index < itemCount && getItemMetadata$1(props, index, instanceProps).offset < offset) {
|
||
index += interval;
|
||
interval *= 2;
|
||
}
|
||
|
||
return findNearestItemBinarySearch$1(props, instanceProps, Math.min(index, itemCount - 1), Math.floor(index / 2), offset);
|
||
};
|
||
|
||
var index_esm_getEstimatedTotalSize = function getEstimatedTotalSize(_ref2, _ref3) {
|
||
var itemCount = _ref2.itemCount;
|
||
var itemMetadataMap = _ref3.itemMetadataMap,
|
||
estimatedItemSize = _ref3.estimatedItemSize,
|
||
lastMeasuredIndex = _ref3.lastMeasuredIndex;
|
||
var totalSizeOfMeasuredItems = 0;
|
||
|
||
if (lastMeasuredIndex >= 0) {
|
||
var itemMetadata = itemMetadataMap[lastMeasuredIndex];
|
||
totalSizeOfMeasuredItems = itemMetadata.offset + itemMetadata.size;
|
||
}
|
||
|
||
var numUnmeasuredItems = itemCount - lastMeasuredIndex - 1;
|
||
var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize;
|
||
return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;
|
||
};
|
||
|
||
var VariableSizeList =
|
||
/*#__PURE__*/
|
||
createListComponent({
|
||
getItemOffset: function getItemOffset(props, index, instanceProps) {
|
||
return getItemMetadata$1(props, index, instanceProps).offset;
|
||
},
|
||
getItemSize: function getItemSize(props, index, instanceProps) {
|
||
return instanceProps.itemMetadataMap[index].size;
|
||
},
|
||
getEstimatedTotalSize: index_esm_getEstimatedTotalSize,
|
||
getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment(props, index, align, scrollOffset, instanceProps) {
|
||
var direction = props.direction,
|
||
height = props.height,
|
||
width = props.width;
|
||
var size = direction === 'horizontal' ? width : height;
|
||
var itemMetadata = getItemMetadata$1(props, index, instanceProps); // Get estimated total size after ItemMetadata is computed,
|
||
// To ensure it reflects actual measurements instead of just estimates.
|
||
|
||
var estimatedTotalSize = index_esm_getEstimatedTotalSize(props, instanceProps);
|
||
var maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, itemMetadata.offset));
|
||
var minOffset = Math.max(0, itemMetadata.offset - size + itemMetadata.size);
|
||
|
||
switch (align) {
|
||
case 'start':
|
||
return maxOffset;
|
||
|
||
case 'end':
|
||
return minOffset;
|
||
|
||
case 'center':
|
||
return Math.round(minOffset + (maxOffset - minOffset) / 2);
|
||
|
||
case 'auto':
|
||
default:
|
||
if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
|
||
return scrollOffset;
|
||
} else if (scrollOffset - minOffset < maxOffset - scrollOffset) {
|
||
return minOffset;
|
||
} else {
|
||
return maxOffset;
|
||
}
|
||
|
||
}
|
||
},
|
||
getStartIndexForOffset: function getStartIndexForOffset(props, offset, instanceProps) {
|
||
return findNearestItem$1(props, instanceProps, offset);
|
||
},
|
||
getStopIndexForStartIndex: function getStopIndexForStartIndex(props, startIndex, scrollOffset, instanceProps) {
|
||
var direction = props.direction,
|
||
height = props.height,
|
||
itemCount = props.itemCount,
|
||
width = props.width;
|
||
var size = direction === 'horizontal' ? width : height;
|
||
var itemMetadata = getItemMetadata$1(props, startIndex, instanceProps);
|
||
var maxOffset = scrollOffset + size;
|
||
var offset = itemMetadata.offset + itemMetadata.size;
|
||
var stopIndex = startIndex;
|
||
|
||
while (stopIndex < itemCount - 1 && offset < maxOffset) {
|
||
stopIndex++;
|
||
offset += getItemMetadata$1(props, stopIndex, instanceProps).size;
|
||
}
|
||
|
||
return stopIndex;
|
||
},
|
||
initInstanceProps: function initInstanceProps(props, instance) {
|
||
var _ref4 = props,
|
||
estimatedItemSize = _ref4.estimatedItemSize;
|
||
var instanceProps = {
|
||
itemMetadataMap: {},
|
||
estimatedItemSize: estimatedItemSize || DEFAULT_ESTIMATED_ITEM_SIZE$1,
|
||
lastMeasuredIndex: -1
|
||
};
|
||
|
||
instance.resetAfterIndex = function (index, shouldForceUpdate) {
|
||
if (shouldForceUpdate === void 0) {
|
||
shouldForceUpdate = true;
|
||
}
|
||
|
||
instanceProps.lastMeasuredIndex = Math.min(instanceProps.lastMeasuredIndex, index - 1); // We could potentially optimize further by only evicting styles after this index,
|
||
// But since styles are only cached while scrolling is in progress-
|
||
// It seems an unnecessary optimization.
|
||
// It's unlikely that resetAfterIndex() will be called while a user is scrolling.
|
||
|
||
instance._getItemStyleCache(-1);
|
||
|
||
if (shouldForceUpdate) {
|
||
instance.forceUpdate();
|
||
}
|
||
};
|
||
|
||
return instanceProps;
|
||
},
|
||
shouldResetStyleCacheOnItemSizeChange: false,
|
||
validateProps: function validateProps(_ref5) {
|
||
var itemSize = _ref5.itemSize;
|
||
|
||
if (true) {
|
||
if (typeof itemSize !== 'function') {
|
||
throw Error('An invalid "itemSize" prop has been specified. ' + 'Value should be a function. ' + ("\"" + (itemSize === null ? 'null' : typeof itemSize) + "\" was specified."));
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
var FixedSizeGrid =
|
||
/*#__PURE__*/
|
||
createGridComponent({
|
||
getColumnOffset: function getColumnOffset(_ref, index) {
|
||
var columnWidth = _ref.columnWidth;
|
||
return index * columnWidth;
|
||
},
|
||
getColumnWidth: function getColumnWidth(_ref2, index) {
|
||
var columnWidth = _ref2.columnWidth;
|
||
return columnWidth;
|
||
},
|
||
getRowOffset: function getRowOffset(_ref3, index) {
|
||
var rowHeight = _ref3.rowHeight;
|
||
return index * rowHeight;
|
||
},
|
||
getRowHeight: function getRowHeight(_ref4, index) {
|
||
var rowHeight = _ref4.rowHeight;
|
||
return rowHeight;
|
||
},
|
||
getEstimatedTotalHeight: function getEstimatedTotalHeight(_ref5) {
|
||
var rowCount = _ref5.rowCount,
|
||
rowHeight = _ref5.rowHeight;
|
||
return rowHeight * rowCount;
|
||
},
|
||
getEstimatedTotalWidth: function getEstimatedTotalWidth(_ref6) {
|
||
var columnCount = _ref6.columnCount,
|
||
columnWidth = _ref6.columnWidth;
|
||
return columnWidth * columnCount;
|
||
},
|
||
getOffsetForColumnAndAlignment: function getOffsetForColumnAndAlignment(_ref7, columnIndex, align, scrollLeft) {
|
||
var columnCount = _ref7.columnCount,
|
||
columnWidth = _ref7.columnWidth,
|
||
width = _ref7.width;
|
||
var maxOffset = Math.max(0, Math.min(columnCount * columnWidth - width, columnIndex * columnWidth));
|
||
var minOffset = Math.max(0, columnIndex * columnWidth - width + columnWidth);
|
||
|
||
switch (align) {
|
||
case 'start':
|
||
return maxOffset;
|
||
|
||
case 'end':
|
||
return minOffset;
|
||
|
||
case 'center':
|
||
return Math.round(minOffset + (maxOffset - minOffset) / 2);
|
||
|
||
case 'auto':
|
||
default:
|
||
if (scrollLeft >= minOffset && scrollLeft <= maxOffset) {
|
||
return scrollLeft;
|
||
} else if (scrollLeft - minOffset < maxOffset - scrollLeft) {
|
||
return minOffset;
|
||
} else {
|
||
return maxOffset;
|
||
}
|
||
|
||
}
|
||
},
|
||
getOffsetForRowAndAlignment: function getOffsetForRowAndAlignment(_ref8, rowIndex, align, scrollTop) {
|
||
var rowHeight = _ref8.rowHeight,
|
||
height = _ref8.height,
|
||
rowCount = _ref8.rowCount;
|
||
var maxOffset = Math.max(0, Math.min(rowCount * rowHeight - height, rowIndex * rowHeight));
|
||
var minOffset = Math.max(0, rowIndex * rowHeight - height + rowHeight);
|
||
|
||
switch (align) {
|
||
case 'start':
|
||
return maxOffset;
|
||
|
||
case 'end':
|
||
return minOffset;
|
||
|
||
case 'center':
|
||
return Math.round(minOffset + (maxOffset - minOffset) / 2);
|
||
|
||
case 'auto':
|
||
default:
|
||
if (scrollTop >= minOffset && scrollTop <= maxOffset) {
|
||
return scrollTop;
|
||
} else if (scrollTop - minOffset < maxOffset - scrollTop) {
|
||
return minOffset;
|
||
} else {
|
||
return maxOffset;
|
||
}
|
||
|
||
}
|
||
},
|
||
getColumnStartIndexForOffset: function getColumnStartIndexForOffset(_ref9, scrollLeft) {
|
||
var columnWidth = _ref9.columnWidth,
|
||
columnCount = _ref9.columnCount;
|
||
return Math.max(0, Math.min(columnCount - 1, Math.floor(scrollLeft / columnWidth)));
|
||
},
|
||
getColumnStopIndexForStartIndex: function getColumnStopIndexForStartIndex(_ref10, startIndex, scrollLeft) {
|
||
var columnWidth = _ref10.columnWidth,
|
||
columnCount = _ref10.columnCount,
|
||
width = _ref10.width;
|
||
var left = startIndex * columnWidth;
|
||
return Math.max(0, Math.min(columnCount - 1, startIndex + Math.floor((width + (scrollLeft - left)) / columnWidth)));
|
||
},
|
||
getRowStartIndexForOffset: function getRowStartIndexForOffset(_ref11, scrollTop) {
|
||
var rowHeight = _ref11.rowHeight,
|
||
rowCount = _ref11.rowCount;
|
||
return Math.max(0, Math.min(rowCount - 1, Math.floor(scrollTop / rowHeight)));
|
||
},
|
||
getRowStopIndexForStartIndex: function getRowStopIndexForStartIndex(_ref12, startIndex, scrollTop) {
|
||
var rowHeight = _ref12.rowHeight,
|
||
rowCount = _ref12.rowCount,
|
||
height = _ref12.height;
|
||
var left = startIndex * rowHeight;
|
||
return Math.max(0, Math.min(rowCount - 1, startIndex + Math.floor((height + (scrollTop - left)) / rowHeight)));
|
||
},
|
||
initInstanceProps: function initInstanceProps(props) {// Noop
|
||
},
|
||
shouldResetStyleCacheOnItemSizeChange: true,
|
||
validateProps: function validateProps(_ref13) {
|
||
var columnWidth = _ref13.columnWidth,
|
||
rowHeight = _ref13.rowHeight;
|
||
|
||
if (true) {
|
||
if (typeof columnWidth !== 'number') {
|
||
throw Error('An invalid "columnWidth" prop has been specified. ' + 'Value should be a number. ' + ("\"" + (columnWidth === null ? 'null' : typeof columnWidth) + "\" was specified."));
|
||
}
|
||
|
||
if (typeof rowHeight !== 'number') {
|
||
throw Error('An invalid "rowHeight" prop has been specified. ' + 'Value should be a number. ' + ("\"" + (rowHeight === null ? 'null' : typeof rowHeight) + "\" was specified."));
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
var FixedSizeList =
|
||
/*#__PURE__*/
|
||
createListComponent({
|
||
getItemOffset: function getItemOffset(_ref, index) {
|
||
var itemSize = _ref.itemSize,
|
||
size = _ref.size;
|
||
return index * itemSize;
|
||
},
|
||
getItemSize: function getItemSize(_ref2, index) {
|
||
var itemSize = _ref2.itemSize,
|
||
size = _ref2.size;
|
||
return itemSize;
|
||
},
|
||
getEstimatedTotalSize: function getEstimatedTotalSize(_ref3) {
|
||
var itemCount = _ref3.itemCount,
|
||
itemSize = _ref3.itemSize;
|
||
return itemSize * itemCount;
|
||
},
|
||
getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment(_ref4, index, align, scrollOffset) {
|
||
var direction = _ref4.direction,
|
||
height = _ref4.height,
|
||
itemCount = _ref4.itemCount,
|
||
itemSize = _ref4.itemSize,
|
||
width = _ref4.width;
|
||
var size = direction === 'horizontal' ? width : height;
|
||
var maxOffset = Math.max(0, Math.min(itemCount * itemSize - size, index * itemSize));
|
||
var minOffset = Math.max(0, index * itemSize - size + itemSize);
|
||
|
||
switch (align) {
|
||
case 'start':
|
||
return maxOffset;
|
||
|
||
case 'end':
|
||
return minOffset;
|
||
|
||
case 'center':
|
||
return Math.round(minOffset + (maxOffset - minOffset) / 2);
|
||
|
||
case 'auto':
|
||
default:
|
||
if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
|
||
return scrollOffset;
|
||
} else if (scrollOffset - minOffset < maxOffset - scrollOffset) {
|
||
return minOffset;
|
||
} else {
|
||
return maxOffset;
|
||
}
|
||
|
||
}
|
||
},
|
||
getStartIndexForOffset: function getStartIndexForOffset(_ref5, offset) {
|
||
var itemCount = _ref5.itemCount,
|
||
itemSize = _ref5.itemSize;
|
||
return Math.max(0, Math.min(itemCount - 1, Math.floor(offset / itemSize)));
|
||
},
|
||
getStopIndexForStartIndex: function getStopIndexForStartIndex(_ref6, startIndex, scrollOffset) {
|
||
var direction = _ref6.direction,
|
||
height = _ref6.height,
|
||
itemCount = _ref6.itemCount,
|
||
itemSize = _ref6.itemSize,
|
||
width = _ref6.width;
|
||
var offset = startIndex * itemSize;
|
||
var size = direction === 'horizontal' ? width : height;
|
||
return Math.max(0, Math.min(itemCount - 1, startIndex + Math.floor((size + (scrollOffset - offset)) / itemSize)));
|
||
},
|
||
initInstanceProps: function initInstanceProps(props) {// Noop
|
||
},
|
||
shouldResetStyleCacheOnItemSizeChange: true,
|
||
validateProps: function validateProps(_ref7) {
|
||
var itemSize = _ref7.itemSize;
|
||
|
||
if (true) {
|
||
if (typeof itemSize !== 'number') {
|
||
throw Error('An invalid "itemSize" prop has been specified. ' + 'Value should be a number. ' + ("\"" + (itemSize === null ? 'null' : typeof itemSize) + "\" was specified."));
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
// Pulled from react-compat
|
||
// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349
|
||
function shallowDiffers(prev, next) {
|
||
for (var attribute in prev) {
|
||
if (!(attribute in next)) {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
for (var _attribute in next) {
|
||
if (prev[_attribute] !== next[_attribute]) {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
return false;
|
||
}
|
||
|
||
// It knows to compare individual style props and ignore the wrapper object.
|
||
// See https://reactjs.org/docs/react-api.html#reactmemo
|
||
|
||
function areEqual(prevProps, nextProps) {
|
||
var prevStyle = prevProps.style,
|
||
prevRest = Object(objectWithoutPropertiesLoose["default"])(prevProps, ["style"]);
|
||
|
||
var nextStyle = nextProps.style,
|
||
nextRest = Object(objectWithoutPropertiesLoose["default"])(nextProps, ["style"]);
|
||
|
||
return !shallowDiffers(prevStyle, nextStyle) && !shallowDiffers(prevRest, nextRest);
|
||
}
|
||
|
||
// It knows to compare individual style props and ignore the wrapper object.
|
||
// See https://reactjs.org/docs/react-component.html#shouldcomponentupdate
|
||
|
||
function shouldComponentUpdate(nextProps, nextState) {
|
||
return !areEqual(this.props, nextProps) || shallowDiffers(this.state, nextState);
|
||
}
|
||
|
||
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react/cjs/react.development.js":
|
||
/*!*****************************************************!*\
|
||
!*** ./node_modules/react/cjs/react.development.js ***!
|
||
\*****************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/** @license React v16.7.0
|
||
* react.development.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
if (true) {
|
||
(function() {
|
||
'use strict';
|
||
|
||
var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
|
||
var checkPropTypes = __webpack_require__(/*! prop-types/checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
|
||
|
||
// TODO: this is special because it gets imported during build.
|
||
|
||
var ReactVersion = '16.7.0';
|
||
|
||
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
||
// nor polyfill, then a plain number is used for performance.
|
||
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
||
|
||
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
||
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
||
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
||
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
||
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
||
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
||
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
|
||
|
||
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
||
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
||
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
||
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
||
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
||
|
||
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
||
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
||
|
||
function getIteratorFn(maybeIterable) {
|
||
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
||
return null;
|
||
}
|
||
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
||
if (typeof maybeIterator === 'function') {
|
||
return maybeIterator;
|
||
}
|
||
return null;
|
||
}
|
||
|
||
var enableHooks = false;
|
||
// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
|
||
|
||
|
||
// In some cases, StrictMode should also double-render lifecycles.
|
||
// This can be confusing for tests though,
|
||
// And it can be bad for performance in production.
|
||
// This feature flag can be used to control the behavior:
|
||
|
||
|
||
// To preserve the "Pause on caught exceptions" behavior of the debugger, we
|
||
// replay the begin phase of a failed component inside invokeGuardedCallback.
|
||
|
||
|
||
// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
|
||
|
||
|
||
// Gather advanced timing metrics for Profiler subtrees.
|
||
|
||
|
||
// Trace which interactions trigger each commit.
|
||
|
||
|
||
// Only used in www builds.
|
||
// TODO: true? Here it might just be false.
|
||
|
||
// Only used in www builds.
|
||
|
||
|
||
// Only used in www builds.
|
||
|
||
|
||
// React Fire: prevent the value and checked attributes from syncing
|
||
// with their related DOM properties
|
||
|
||
|
||
// These APIs will no longer be "unstable" in the upcoming 16.7 release,
|
||
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
|
||
var enableStableConcurrentModeAPIs = false;
|
||
|
||
/**
|
||
* Use invariant() to assert state which your program assumes to be true.
|
||
*
|
||
* Provide sprintf-style format (only %s is supported) and arguments
|
||
* to provide information about what broke and what you were
|
||
* expecting.
|
||
*
|
||
* The invariant message will be stripped in production, but the invariant
|
||
* will remain to ensure logic does not differ in production.
|
||
*/
|
||
|
||
var validateFormat = function () {};
|
||
|
||
{
|
||
validateFormat = function (format) {
|
||
if (format === undefined) {
|
||
throw new Error('invariant requires an error message argument');
|
||
}
|
||
};
|
||
}
|
||
|
||
function invariant(condition, format, a, b, c, d, e, f) {
|
||
validateFormat(format);
|
||
|
||
if (!condition) {
|
||
var error = void 0;
|
||
if (format === undefined) {
|
||
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
||
} else {
|
||
var args = [a, b, c, d, e, f];
|
||
var argIndex = 0;
|
||
error = new Error(format.replace(/%s/g, function () {
|
||
return args[argIndex++];
|
||
}));
|
||
error.name = 'Invariant Violation';
|
||
}
|
||
|
||
error.framesToPop = 1; // we don't care about invariant's own frame
|
||
throw error;
|
||
}
|
||
}
|
||
|
||
// Relying on the `invariant()` implementation lets us
|
||
// preserve the format and params in the www builds.
|
||
|
||
/**
|
||
* Forked from fbjs/warning:
|
||
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
||
*
|
||
* Only change is we use console.warn instead of console.error,
|
||
* and do nothing when 'console' is not supported.
|
||
* This really simplifies the code.
|
||
* ---
|
||
* Similar to invariant but only logs a warning if the condition is not met.
|
||
* This can be used to log issues in development environments in critical
|
||
* paths. Removing the logging code for production environments will keep the
|
||
* same logic and follow the same code paths.
|
||
*/
|
||
|
||
var lowPriorityWarning = function () {};
|
||
|
||
{
|
||
var printWarning = function (format) {
|
||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||
args[_key - 1] = arguments[_key];
|
||
}
|
||
|
||
var argIndex = 0;
|
||
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
||
return args[argIndex++];
|
||
});
|
||
if (typeof console !== 'undefined') {
|
||
console.warn(message);
|
||
}
|
||
try {
|
||
// --- Welcome to debugging React ---
|
||
// This error was thrown as a convenience so that you can use this stack
|
||
// to find the callsite that caused this warning to fire.
|
||
throw new Error(message);
|
||
} catch (x) {}
|
||
};
|
||
|
||
lowPriorityWarning = function (condition, format) {
|
||
if (format === undefined) {
|
||
throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
|
||
}
|
||
if (!condition) {
|
||
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
||
args[_key2 - 2] = arguments[_key2];
|
||
}
|
||
|
||
printWarning.apply(undefined, [format].concat(args));
|
||
}
|
||
};
|
||
}
|
||
|
||
var lowPriorityWarning$1 = lowPriorityWarning;
|
||
|
||
/**
|
||
* Similar to invariant but only logs a warning if the condition is not met.
|
||
* This can be used to log issues in development environments in critical
|
||
* paths. Removing the logging code for production environments will keep the
|
||
* same logic and follow the same code paths.
|
||
*/
|
||
|
||
var warningWithoutStack = function () {};
|
||
|
||
{
|
||
warningWithoutStack = function (condition, format) {
|
||
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
||
args[_key - 2] = arguments[_key];
|
||
}
|
||
|
||
if (format === undefined) {
|
||
throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
|
||
}
|
||
if (args.length > 8) {
|
||
// Check before the condition to catch violations early.
|
||
throw new Error('warningWithoutStack() currently supports at most 8 arguments.');
|
||
}
|
||
if (condition) {
|
||
return;
|
||
}
|
||
if (typeof console !== 'undefined') {
|
||
var argsWithFormat = args.map(function (item) {
|
||
return '' + item;
|
||
});
|
||
argsWithFormat.unshift('Warning: ' + format);
|
||
|
||
// We intentionally don't use spread (or .apply) directly because it
|
||
// breaks IE9: https://github.com/facebook/react/issues/13610
|
||
Function.prototype.apply.call(console.error, console, argsWithFormat);
|
||
}
|
||
try {
|
||
// --- Welcome to debugging React ---
|
||
// This error was thrown as a convenience so that you can use this stack
|
||
// to find the callsite that caused this warning to fire.
|
||
var argIndex = 0;
|
||
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
||
return args[argIndex++];
|
||
});
|
||
throw new Error(message);
|
||
} catch (x) {}
|
||
};
|
||
}
|
||
|
||
var warningWithoutStack$1 = warningWithoutStack;
|
||
|
||
var didWarnStateUpdateForUnmountedComponent = {};
|
||
|
||
function warnNoop(publicInstance, callerName) {
|
||
{
|
||
var _constructor = publicInstance.constructor;
|
||
var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
|
||
var warningKey = componentName + '.' + callerName;
|
||
if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
|
||
return;
|
||
}
|
||
warningWithoutStack$1(false, "Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
|
||
didWarnStateUpdateForUnmountedComponent[warningKey] = true;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* This is the abstract API for an update queue.
|
||
*/
|
||
var ReactNoopUpdateQueue = {
|
||
/**
|
||
* Checks whether or not this composite component is mounted.
|
||
* @param {ReactClass} publicInstance The instance we want to test.
|
||
* @return {boolean} True if mounted, false otherwise.
|
||
* @protected
|
||
* @final
|
||
*/
|
||
isMounted: function (publicInstance) {
|
||
return false;
|
||
},
|
||
|
||
/**
|
||
* Forces an update. This should only be invoked when it is known with
|
||
* certainty that we are **not** in a DOM transaction.
|
||
*
|
||
* You may want to call this when you know that some deeper aspect of the
|
||
* component's state has changed but `setState` was not called.
|
||
*
|
||
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
||
* `componentWillUpdate` and `componentDidUpdate`.
|
||
*
|
||
* @param {ReactClass} publicInstance The instance that should rerender.
|
||
* @param {?function} callback Called after component is updated.
|
||
* @param {?string} callerName name of the calling function in the public API.
|
||
* @internal
|
||
*/
|
||
enqueueForceUpdate: function (publicInstance, callback, callerName) {
|
||
warnNoop(publicInstance, 'forceUpdate');
|
||
},
|
||
|
||
/**
|
||
* Replaces all of the state. Always use this or `setState` to mutate state.
|
||
* You should treat `this.state` as immutable.
|
||
*
|
||
* There is no guarantee that `this.state` will be immediately updated, so
|
||
* accessing `this.state` after calling this method may return the old value.
|
||
*
|
||
* @param {ReactClass} publicInstance The instance that should rerender.
|
||
* @param {object} completeState Next state.
|
||
* @param {?function} callback Called after component is updated.
|
||
* @param {?string} callerName name of the calling function in the public API.
|
||
* @internal
|
||
*/
|
||
enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
|
||
warnNoop(publicInstance, 'replaceState');
|
||
},
|
||
|
||
/**
|
||
* Sets a subset of the state. This only exists because _pendingState is
|
||
* internal. This provides a merging strategy that is not available to deep
|
||
* properties which is confusing. TODO: Expose pendingState or don't use it
|
||
* during the merge.
|
||
*
|
||
* @param {ReactClass} publicInstance The instance that should rerender.
|
||
* @param {object} partialState Next partial state to be merged with state.
|
||
* @param {?function} callback Called after component is updated.
|
||
* @param {?string} Name of the calling function in the public API.
|
||
* @internal
|
||
*/
|
||
enqueueSetState: function (publicInstance, partialState, callback, callerName) {
|
||
warnNoop(publicInstance, 'setState');
|
||
}
|
||
};
|
||
|
||
var emptyObject = {};
|
||
{
|
||
Object.freeze(emptyObject);
|
||
}
|
||
|
||
/**
|
||
* Base class helpers for the updating state of a component.
|
||
*/
|
||
function Component(props, context, updater) {
|
||
this.props = props;
|
||
this.context = context;
|
||
// If a component has string refs, we will assign a different object later.
|
||
this.refs = emptyObject;
|
||
// We initialize the default updater but the real one gets injected by the
|
||
// renderer.
|
||
this.updater = updater || ReactNoopUpdateQueue;
|
||
}
|
||
|
||
Component.prototype.isReactComponent = {};
|
||
|
||
/**
|
||
* Sets a subset of the state. Always use this to mutate
|
||
* state. You should treat `this.state` as immutable.
|
||
*
|
||
* There is no guarantee that `this.state` will be immediately updated, so
|
||
* accessing `this.state` after calling this method may return the old value.
|
||
*
|
||
* There is no guarantee that calls to `setState` will run synchronously,
|
||
* as they may eventually be batched together. You can provide an optional
|
||
* callback that will be executed when the call to setState is actually
|
||
* completed.
|
||
*
|
||
* When a function is provided to setState, it will be called at some point in
|
||
* the future (not synchronously). It will be called with the up to date
|
||
* component arguments (state, props, context). These values can be different
|
||
* from this.* because your function may be called after receiveProps but before
|
||
* shouldComponentUpdate, and this new state, props, and context will not yet be
|
||
* assigned to this.
|
||
*
|
||
* @param {object|function} partialState Next partial state or function to
|
||
* produce next partial state to be merged with current state.
|
||
* @param {?function} callback Called after state is updated.
|
||
* @final
|
||
* @protected
|
||
*/
|
||
Component.prototype.setState = function (partialState, callback) {
|
||
!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0;
|
||
this.updater.enqueueSetState(this, partialState, callback, 'setState');
|
||
};
|
||
|
||
/**
|
||
* Forces an update. This should only be invoked when it is known with
|
||
* certainty that we are **not** in a DOM transaction.
|
||
*
|
||
* You may want to call this when you know that some deeper aspect of the
|
||
* component's state has changed but `setState` was not called.
|
||
*
|
||
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
||
* `componentWillUpdate` and `componentDidUpdate`.
|
||
*
|
||
* @param {?function} callback Called after update is complete.
|
||
* @final
|
||
* @protected
|
||
*/
|
||
Component.prototype.forceUpdate = function (callback) {
|
||
this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
|
||
};
|
||
|
||
/**
|
||
* Deprecated APIs. These APIs used to exist on classic React classes but since
|
||
* we would like to deprecate them, we're not going to move them over to this
|
||
* modern base class. Instead, we define a getter that warns if it's accessed.
|
||
*/
|
||
{
|
||
var deprecatedAPIs = {
|
||
isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
|
||
replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
||
};
|
||
var defineDeprecationWarning = function (methodName, info) {
|
||
Object.defineProperty(Component.prototype, methodName, {
|
||
get: function () {
|
||
lowPriorityWarning$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
|
||
return undefined;
|
||
}
|
||
});
|
||
};
|
||
for (var fnName in deprecatedAPIs) {
|
||
if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
||
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
||
}
|
||
}
|
||
}
|
||
|
||
function ComponentDummy() {}
|
||
ComponentDummy.prototype = Component.prototype;
|
||
|
||
/**
|
||
* Convenience component with default shallow equality check for sCU.
|
||
*/
|
||
function PureComponent(props, context, updater) {
|
||
this.props = props;
|
||
this.context = context;
|
||
// If a component has string refs, we will assign a different object later.
|
||
this.refs = emptyObject;
|
||
this.updater = updater || ReactNoopUpdateQueue;
|
||
}
|
||
|
||
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
||
pureComponentPrototype.constructor = PureComponent;
|
||
// Avoid an extra prototype jump for these methods.
|
||
_assign(pureComponentPrototype, Component.prototype);
|
||
pureComponentPrototype.isPureReactComponent = true;
|
||
|
||
// an immutable object with a single mutable value
|
||
function createRef() {
|
||
var refObject = {
|
||
current: null
|
||
};
|
||
{
|
||
Object.seal(refObject);
|
||
}
|
||
return refObject;
|
||
}
|
||
|
||
/**
|
||
* Keeps track of the current owner.
|
||
*
|
||
* The current owner is the component who should own any components that are
|
||
* currently being constructed.
|
||
*/
|
||
var ReactCurrentOwner = {
|
||
/**
|
||
* @internal
|
||
* @type {ReactComponent}
|
||
*/
|
||
current: null,
|
||
currentDispatcher: null
|
||
};
|
||
|
||
var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
|
||
|
||
var describeComponentFrame = function (name, source, ownerName) {
|
||
var sourceInfo = '';
|
||
if (source) {
|
||
var path = source.fileName;
|
||
var fileName = path.replace(BEFORE_SLASH_RE, '');
|
||
{
|
||
// In DEV, include code for a common special case:
|
||
// prefer "folder/index.js" instead of just "index.js".
|
||
if (/^index\./.test(fileName)) {
|
||
var match = path.match(BEFORE_SLASH_RE);
|
||
if (match) {
|
||
var pathBeforeSlash = match[1];
|
||
if (pathBeforeSlash) {
|
||
var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
|
||
fileName = folderName + '/' + fileName;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
|
||
} else if (ownerName) {
|
||
sourceInfo = ' (created by ' + ownerName + ')';
|
||
}
|
||
return '\n in ' + (name || 'Unknown') + sourceInfo;
|
||
};
|
||
|
||
var Resolved = 1;
|
||
|
||
|
||
function refineResolvedLazyComponent(lazyComponent) {
|
||
return lazyComponent._status === Resolved ? lazyComponent._result : null;
|
||
}
|
||
|
||
function getWrappedName(outerType, innerType, wrapperName) {
|
||
var functionName = innerType.displayName || innerType.name || '';
|
||
return outerType.displayName || (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName);
|
||
}
|
||
|
||
function getComponentName(type) {
|
||
if (type == null) {
|
||
// Host root, text node or just invalid type.
|
||
return null;
|
||
}
|
||
{
|
||
if (typeof type.tag === 'number') {
|
||
warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
|
||
}
|
||
}
|
||
if (typeof type === 'function') {
|
||
return type.displayName || type.name || null;
|
||
}
|
||
if (typeof type === 'string') {
|
||
return type;
|
||
}
|
||
switch (type) {
|
||
case REACT_CONCURRENT_MODE_TYPE:
|
||
return 'ConcurrentMode';
|
||
case REACT_FRAGMENT_TYPE:
|
||
return 'Fragment';
|
||
case REACT_PORTAL_TYPE:
|
||
return 'Portal';
|
||
case REACT_PROFILER_TYPE:
|
||
return 'Profiler';
|
||
case REACT_STRICT_MODE_TYPE:
|
||
return 'StrictMode';
|
||
case REACT_SUSPENSE_TYPE:
|
||
return 'Suspense';
|
||
}
|
||
if (typeof type === 'object') {
|
||
switch (type.$$typeof) {
|
||
case REACT_CONTEXT_TYPE:
|
||
return 'Context.Consumer';
|
||
case REACT_PROVIDER_TYPE:
|
||
return 'Context.Provider';
|
||
case REACT_FORWARD_REF_TYPE:
|
||
return getWrappedName(type, type.render, 'ForwardRef');
|
||
case REACT_MEMO_TYPE:
|
||
return getComponentName(type.type);
|
||
case REACT_LAZY_TYPE:
|
||
{
|
||
var thenable = type;
|
||
var resolvedThenable = refineResolvedLazyComponent(thenable);
|
||
if (resolvedThenable) {
|
||
return getComponentName(resolvedThenable);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
|
||
var ReactDebugCurrentFrame = {};
|
||
|
||
var currentlyValidatingElement = null;
|
||
|
||
function setCurrentlyValidatingElement(element) {
|
||
{
|
||
currentlyValidatingElement = element;
|
||
}
|
||
}
|
||
|
||
{
|
||
// Stack implementation injected by the current renderer.
|
||
ReactDebugCurrentFrame.getCurrentStack = null;
|
||
|
||
ReactDebugCurrentFrame.getStackAddendum = function () {
|
||
var stack = '';
|
||
|
||
// Add an extra top frame while an element is being validated
|
||
if (currentlyValidatingElement) {
|
||
var name = getComponentName(currentlyValidatingElement.type);
|
||
var owner = currentlyValidatingElement._owner;
|
||
stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
|
||
}
|
||
|
||
// Delegate to the injected renderer-specific implementation
|
||
var impl = ReactDebugCurrentFrame.getCurrentStack;
|
||
if (impl) {
|
||
stack += impl() || '';
|
||
}
|
||
|
||
return stack;
|
||
};
|
||
}
|
||
|
||
var ReactSharedInternals = {
|
||
ReactCurrentOwner: ReactCurrentOwner,
|
||
// Used by renderers to avoid bundling object-assign twice in UMD bundles:
|
||
assign: _assign
|
||
};
|
||
|
||
{
|
||
_assign(ReactSharedInternals, {
|
||
// These should not be included in production.
|
||
ReactDebugCurrentFrame: ReactDebugCurrentFrame,
|
||
// Shim for React DOM 16.0.0 which still destructured (but not used) this.
|
||
// TODO: remove in React 17.0.
|
||
ReactComponentTreeHook: {}
|
||
});
|
||
}
|
||
|
||
/**
|
||
* Similar to invariant but only logs a warning if the condition is not met.
|
||
* This can be used to log issues in development environments in critical
|
||
* paths. Removing the logging code for production environments will keep the
|
||
* same logic and follow the same code paths.
|
||
*/
|
||
|
||
var warning = warningWithoutStack$1;
|
||
|
||
{
|
||
warning = function (condition, format) {
|
||
if (condition) {
|
||
return;
|
||
}
|
||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
||
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
||
// eslint-disable-next-line react-internal/warning-and-invariant-args
|
||
|
||
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
||
args[_key - 2] = arguments[_key];
|
||
}
|
||
|
||
warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));
|
||
};
|
||
}
|
||
|
||
var warning$1 = warning;
|
||
|
||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||
|
||
var RESERVED_PROPS = {
|
||
key: true,
|
||
ref: true,
|
||
__self: true,
|
||
__source: true
|
||
};
|
||
|
||
var specialPropKeyWarningShown = void 0;
|
||
var specialPropRefWarningShown = void 0;
|
||
|
||
function hasValidRef(config) {
|
||
{
|
||
if (hasOwnProperty.call(config, 'ref')) {
|
||
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
||
if (getter && getter.isReactWarning) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
return config.ref !== undefined;
|
||
}
|
||
|
||
function hasValidKey(config) {
|
||
{
|
||
if (hasOwnProperty.call(config, 'key')) {
|
||
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
||
if (getter && getter.isReactWarning) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
return config.key !== undefined;
|
||
}
|
||
|
||
function defineKeyPropWarningGetter(props, displayName) {
|
||
var warnAboutAccessingKey = function () {
|
||
if (!specialPropKeyWarningShown) {
|
||
specialPropKeyWarningShown = true;
|
||
warningWithoutStack$1(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
|
||
}
|
||
};
|
||
warnAboutAccessingKey.isReactWarning = true;
|
||
Object.defineProperty(props, 'key', {
|
||
get: warnAboutAccessingKey,
|
||
configurable: true
|
||
});
|
||
}
|
||
|
||
function defineRefPropWarningGetter(props, displayName) {
|
||
var warnAboutAccessingRef = function () {
|
||
if (!specialPropRefWarningShown) {
|
||
specialPropRefWarningShown = true;
|
||
warningWithoutStack$1(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
|
||
}
|
||
};
|
||
warnAboutAccessingRef.isReactWarning = true;
|
||
Object.defineProperty(props, 'ref', {
|
||
get: warnAboutAccessingRef,
|
||
configurable: true
|
||
});
|
||
}
|
||
|
||
/**
|
||
* Factory method to create a new React element. This no longer adheres to
|
||
* the class pattern, so do not use new to call it. Also, no instanceof check
|
||
* will work. Instead test $$typeof field against Symbol.for('react.element') to check
|
||
* if something is a React Element.
|
||
*
|
||
* @param {*} type
|
||
* @param {*} key
|
||
* @param {string|object} ref
|
||
* @param {*} self A *temporary* helper to detect places where `this` is
|
||
* different from the `owner` when React.createElement is called, so that we
|
||
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
||
* functions, and as long as `this` and owner are the same, there will be no
|
||
* change in behavior.
|
||
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
||
* indicating filename, line number, and/or other information.
|
||
* @param {*} owner
|
||
* @param {*} props
|
||
* @internal
|
||
*/
|
||
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
||
var element = {
|
||
// This tag allows us to uniquely identify this as a React Element
|
||
$$typeof: REACT_ELEMENT_TYPE,
|
||
|
||
// Built-in properties that belong on the element
|
||
type: type,
|
||
key: key,
|
||
ref: ref,
|
||
props: props,
|
||
|
||
// Record the component responsible for creating this element.
|
||
_owner: owner
|
||
};
|
||
|
||
{
|
||
// The validation flag is currently mutative. We put it on
|
||
// an external backing store so that we can freeze the whole object.
|
||
// This can be replaced with a WeakMap once they are implemented in
|
||
// commonly used development environments.
|
||
element._store = {};
|
||
|
||
// To make comparing ReactElements easier for testing purposes, we make
|
||
// the validation flag non-enumerable (where possible, which should
|
||
// include every environment we run tests in), so the test framework
|
||
// ignores it.
|
||
Object.defineProperty(element._store, 'validated', {
|
||
configurable: false,
|
||
enumerable: false,
|
||
writable: true,
|
||
value: false
|
||
});
|
||
// self and source are DEV only properties.
|
||
Object.defineProperty(element, '_self', {
|
||
configurable: false,
|
||
enumerable: false,
|
||
writable: false,
|
||
value: self
|
||
});
|
||
// Two elements created in two different places should be considered
|
||
// equal for testing purposes and therefore we hide it from enumeration.
|
||
Object.defineProperty(element, '_source', {
|
||
configurable: false,
|
||
enumerable: false,
|
||
writable: false,
|
||
value: source
|
||
});
|
||
if (Object.freeze) {
|
||
Object.freeze(element.props);
|
||
Object.freeze(element);
|
||
}
|
||
}
|
||
|
||
return element;
|
||
};
|
||
|
||
/**
|
||
* Create and return a new ReactElement of the given type.
|
||
* See https://reactjs.org/docs/react-api.html#createelement
|
||
*/
|
||
function createElement(type, config, children) {
|
||
var propName = void 0;
|
||
|
||
// Reserved names are extracted
|
||
var props = {};
|
||
|
||
var key = null;
|
||
var ref = null;
|
||
var self = null;
|
||
var source = null;
|
||
|
||
if (config != null) {
|
||
if (hasValidRef(config)) {
|
||
ref = config.ref;
|
||
}
|
||
if (hasValidKey(config)) {
|
||
key = '' + config.key;
|
||
}
|
||
|
||
self = config.__self === undefined ? null : config.__self;
|
||
source = config.__source === undefined ? null : config.__source;
|
||
// Remaining properties are added to a new props object
|
||
for (propName in config) {
|
||
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
||
props[propName] = config[propName];
|
||
}
|
||
}
|
||
}
|
||
|
||
// Children can be more than one argument, and those are transferred onto
|
||
// the newly allocated props object.
|
||
var childrenLength = arguments.length - 2;
|
||
if (childrenLength === 1) {
|
||
props.children = children;
|
||
} else if (childrenLength > 1) {
|
||
var childArray = Array(childrenLength);
|
||
for (var i = 0; i < childrenLength; i++) {
|
||
childArray[i] = arguments[i + 2];
|
||
}
|
||
{
|
||
if (Object.freeze) {
|
||
Object.freeze(childArray);
|
||
}
|
||
}
|
||
props.children = childArray;
|
||
}
|
||
|
||
// Resolve default props
|
||
if (type && type.defaultProps) {
|
||
var defaultProps = type.defaultProps;
|
||
for (propName in defaultProps) {
|
||
if (props[propName] === undefined) {
|
||
props[propName] = defaultProps[propName];
|
||
}
|
||
}
|
||
}
|
||
{
|
||
if (key || ref) {
|
||
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
||
if (key) {
|
||
defineKeyPropWarningGetter(props, displayName);
|
||
}
|
||
if (ref) {
|
||
defineRefPropWarningGetter(props, displayName);
|
||
}
|
||
}
|
||
}
|
||
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
||
}
|
||
|
||
/**
|
||
* Return a function that produces ReactElements of a given type.
|
||
* See https://reactjs.org/docs/react-api.html#createfactory
|
||
*/
|
||
|
||
|
||
function cloneAndReplaceKey(oldElement, newKey) {
|
||
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
|
||
|
||
return newElement;
|
||
}
|
||
|
||
/**
|
||
* Clone and return a new ReactElement using element as the starting point.
|
||
* See https://reactjs.org/docs/react-api.html#cloneelement
|
||
*/
|
||
function cloneElement(element, config, children) {
|
||
!!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;
|
||
|
||
var propName = void 0;
|
||
|
||
// Original props are copied
|
||
var props = _assign({}, element.props);
|
||
|
||
// Reserved names are extracted
|
||
var key = element.key;
|
||
var ref = element.ref;
|
||
// Self is preserved since the owner is preserved.
|
||
var self = element._self;
|
||
// Source is preserved since cloneElement is unlikely to be targeted by a
|
||
// transpiler, and the original source is probably a better indicator of the
|
||
// true owner.
|
||
var source = element._source;
|
||
|
||
// Owner will be preserved, unless ref is overridden
|
||
var owner = element._owner;
|
||
|
||
if (config != null) {
|
||
if (hasValidRef(config)) {
|
||
// Silently steal the ref from the parent.
|
||
ref = config.ref;
|
||
owner = ReactCurrentOwner.current;
|
||
}
|
||
if (hasValidKey(config)) {
|
||
key = '' + config.key;
|
||
}
|
||
|
||
// Remaining properties override existing props
|
||
var defaultProps = void 0;
|
||
if (element.type && element.type.defaultProps) {
|
||
defaultProps = element.type.defaultProps;
|
||
}
|
||
for (propName in config) {
|
||
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
||
if (config[propName] === undefined && defaultProps !== undefined) {
|
||
// Resolve default props
|
||
props[propName] = defaultProps[propName];
|
||
} else {
|
||
props[propName] = config[propName];
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
// Children can be more than one argument, and those are transferred onto
|
||
// the newly allocated props object.
|
||
var childrenLength = arguments.length - 2;
|
||
if (childrenLength === 1) {
|
||
props.children = children;
|
||
} else if (childrenLength > 1) {
|
||
var childArray = Array(childrenLength);
|
||
for (var i = 0; i < childrenLength; i++) {
|
||
childArray[i] = arguments[i + 2];
|
||
}
|
||
props.children = childArray;
|
||
}
|
||
|
||
return ReactElement(element.type, key, ref, self, source, owner, props);
|
||
}
|
||
|
||
/**
|
||
* Verifies the object is a ReactElement.
|
||
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
||
* @param {?object} object
|
||
* @return {boolean} True if `object` is a ReactElement.
|
||
* @final
|
||
*/
|
||
function isValidElement(object) {
|
||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
||
}
|
||
|
||
var SEPARATOR = '.';
|
||
var SUBSEPARATOR = ':';
|
||
|
||
/**
|
||
* Escape and wrap key so it is safe to use as a reactid
|
||
*
|
||
* @param {string} key to be escaped.
|
||
* @return {string} the escaped key.
|
||
*/
|
||
function escape(key) {
|
||
var escapeRegex = /[=:]/g;
|
||
var escaperLookup = {
|
||
'=': '=0',
|
||
':': '=2'
|
||
};
|
||
var escapedString = ('' + key).replace(escapeRegex, function (match) {
|
||
return escaperLookup[match];
|
||
});
|
||
|
||
return '$' + escapedString;
|
||
}
|
||
|
||
/**
|
||
* TODO: Test that a single child and an array with one item have the same key
|
||
* pattern.
|
||
*/
|
||
|
||
var didWarnAboutMaps = false;
|
||
|
||
var userProvidedKeyEscapeRegex = /\/+/g;
|
||
function escapeUserProvidedKey(text) {
|
||
return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
|
||
}
|
||
|
||
var POOL_SIZE = 10;
|
||
var traverseContextPool = [];
|
||
function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
|
||
if (traverseContextPool.length) {
|
||
var traverseContext = traverseContextPool.pop();
|
||
traverseContext.result = mapResult;
|
||
traverseContext.keyPrefix = keyPrefix;
|
||
traverseContext.func = mapFunction;
|
||
traverseContext.context = mapContext;
|
||
traverseContext.count = 0;
|
||
return traverseContext;
|
||
} else {
|
||
return {
|
||
result: mapResult,
|
||
keyPrefix: keyPrefix,
|
||
func: mapFunction,
|
||
context: mapContext,
|
||
count: 0
|
||
};
|
||
}
|
||
}
|
||
|
||
function releaseTraverseContext(traverseContext) {
|
||
traverseContext.result = null;
|
||
traverseContext.keyPrefix = null;
|
||
traverseContext.func = null;
|
||
traverseContext.context = null;
|
||
traverseContext.count = 0;
|
||
if (traverseContextPool.length < POOL_SIZE) {
|
||
traverseContextPool.push(traverseContext);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* @param {?*} children Children tree container.
|
||
* @param {!string} nameSoFar Name of the key path so far.
|
||
* @param {!function} callback Callback to invoke with each child found.
|
||
* @param {?*} traverseContext Used to pass information throughout the traversal
|
||
* process.
|
||
* @return {!number} The number of children in this subtree.
|
||
*/
|
||
function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
|
||
var type = typeof children;
|
||
|
||
if (type === 'undefined' || type === 'boolean') {
|
||
// All of the above are perceived as null.
|
||
children = null;
|
||
}
|
||
|
||
var invokeCallback = false;
|
||
|
||
if (children === null) {
|
||
invokeCallback = true;
|
||
} else {
|
||
switch (type) {
|
||
case 'string':
|
||
case 'number':
|
||
invokeCallback = true;
|
||
break;
|
||
case 'object':
|
||
switch (children.$$typeof) {
|
||
case REACT_ELEMENT_TYPE:
|
||
case REACT_PORTAL_TYPE:
|
||
invokeCallback = true;
|
||
}
|
||
}
|
||
}
|
||
|
||
if (invokeCallback) {
|
||
callback(traverseContext, children,
|
||
// If it's the only child, treat the name as if it was wrapped in an array
|
||
// so that it's consistent if the number of children grows.
|
||
nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
|
||
return 1;
|
||
}
|
||
|
||
var child = void 0;
|
||
var nextName = void 0;
|
||
var subtreeCount = 0; // Count of children found in the current subtree.
|
||
var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
||
|
||
if (Array.isArray(children)) {
|
||
for (var i = 0; i < children.length; i++) {
|
||
child = children[i];
|
||
nextName = nextNamePrefix + getComponentKey(child, i);
|
||
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
||
}
|
||
} else {
|
||
var iteratorFn = getIteratorFn(children);
|
||
if (typeof iteratorFn === 'function') {
|
||
{
|
||
// Warn about using Maps as children
|
||
if (iteratorFn === children.entries) {
|
||
!didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;
|
||
didWarnAboutMaps = true;
|
||
}
|
||
}
|
||
|
||
var iterator = iteratorFn.call(children);
|
||
var step = void 0;
|
||
var ii = 0;
|
||
while (!(step = iterator.next()).done) {
|
||
child = step.value;
|
||
nextName = nextNamePrefix + getComponentKey(child, ii++);
|
||
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
||
}
|
||
} else if (type === 'object') {
|
||
var addendum = '';
|
||
{
|
||
addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
|
||
}
|
||
var childrenString = '' + children;
|
||
invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum);
|
||
}
|
||
}
|
||
|
||
return subtreeCount;
|
||
}
|
||
|
||
/**
|
||
* Traverses children that are typically specified as `props.children`, but
|
||
* might also be specified through attributes:
|
||
*
|
||
* - `traverseAllChildren(this.props.children, ...)`
|
||
* - `traverseAllChildren(this.props.leftPanelChildren, ...)`
|
||
*
|
||
* The `traverseContext` is an optional argument that is passed through the
|
||
* entire traversal. It can be used to store accumulations or anything else that
|
||
* the callback might find relevant.
|
||
*
|
||
* @param {?*} children Children tree object.
|
||
* @param {!function} callback To invoke upon traversing each child.
|
||
* @param {?*} traverseContext Context for traversal.
|
||
* @return {!number} The number of children in this subtree.
|
||
*/
|
||
function traverseAllChildren(children, callback, traverseContext) {
|
||
if (children == null) {
|
||
return 0;
|
||
}
|
||
|
||
return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
||
}
|
||
|
||
/**
|
||
* Generate a key string that identifies a component within a set.
|
||
*
|
||
* @param {*} component A component that could contain a manual key.
|
||
* @param {number} index Index that is used if a manual key is not provided.
|
||
* @return {string}
|
||
*/
|
||
function getComponentKey(component, index) {
|
||
// Do some typechecking here since we call this blindly. We want to ensure
|
||
// that we don't block potential future ES APIs.
|
||
if (typeof component === 'object' && component !== null && component.key != null) {
|
||
// Explicit key
|
||
return escape(component.key);
|
||
}
|
||
// Implicit key determined by the index in the set
|
||
return index.toString(36);
|
||
}
|
||
|
||
function forEachSingleChild(bookKeeping, child, name) {
|
||
var func = bookKeeping.func,
|
||
context = bookKeeping.context;
|
||
|
||
func.call(context, child, bookKeeping.count++);
|
||
}
|
||
|
||
/**
|
||
* Iterates through children that are typically specified as `props.children`.
|
||
*
|
||
* See https://reactjs.org/docs/react-api.html#reactchildrenforeach
|
||
*
|
||
* The provided forEachFunc(child, index) will be called for each
|
||
* leaf child.
|
||
*
|
||
* @param {?*} children Children tree container.
|
||
* @param {function(*, int)} forEachFunc
|
||
* @param {*} forEachContext Context for forEachContext.
|
||
*/
|
||
function forEachChildren(children, forEachFunc, forEachContext) {
|
||
if (children == null) {
|
||
return children;
|
||
}
|
||
var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
|
||
traverseAllChildren(children, forEachSingleChild, traverseContext);
|
||
releaseTraverseContext(traverseContext);
|
||
}
|
||
|
||
function mapSingleChildIntoContext(bookKeeping, child, childKey) {
|
||
var result = bookKeeping.result,
|
||
keyPrefix = bookKeeping.keyPrefix,
|
||
func = bookKeeping.func,
|
||
context = bookKeeping.context;
|
||
|
||
|
||
var mappedChild = func.call(context, child, bookKeeping.count++);
|
||
if (Array.isArray(mappedChild)) {
|
||
mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
|
||
return c;
|
||
});
|
||
} else if (mappedChild != null) {
|
||
if (isValidElement(mappedChild)) {
|
||
mappedChild = cloneAndReplaceKey(mappedChild,
|
||
// Keep both the (mapped) and old keys if they differ, just as
|
||
// traverseAllChildren used to do for objects as children
|
||
keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
|
||
}
|
||
result.push(mappedChild);
|
||
}
|
||
}
|
||
|
||
function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
|
||
var escapedPrefix = '';
|
||
if (prefix != null) {
|
||
escapedPrefix = escapeUserProvidedKey(prefix) + '/';
|
||
}
|
||
var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
|
||
traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
|
||
releaseTraverseContext(traverseContext);
|
||
}
|
||
|
||
/**
|
||
* Maps children that are typically specified as `props.children`.
|
||
*
|
||
* See https://reactjs.org/docs/react-api.html#reactchildrenmap
|
||
*
|
||
* The provided mapFunction(child, key, index) will be called for each
|
||
* leaf child.
|
||
*
|
||
* @param {?*} children Children tree container.
|
||
* @param {function(*, int)} func The map function.
|
||
* @param {*} context Context for mapFunction.
|
||
* @return {object} Object containing the ordered map of results.
|
||
*/
|
||
function mapChildren(children, func, context) {
|
||
if (children == null) {
|
||
return children;
|
||
}
|
||
var result = [];
|
||
mapIntoWithKeyPrefixInternal(children, result, null, func, context);
|
||
return result;
|
||
}
|
||
|
||
/**
|
||
* Count the number of children that are typically specified as
|
||
* `props.children`.
|
||
*
|
||
* See https://reactjs.org/docs/react-api.html#reactchildrencount
|
||
*
|
||
* @param {?*} children Children tree container.
|
||
* @return {number} The number of children.
|
||
*/
|
||
function countChildren(children) {
|
||
return traverseAllChildren(children, function () {
|
||
return null;
|
||
}, null);
|
||
}
|
||
|
||
/**
|
||
* Flatten a children object (typically specified as `props.children`) and
|
||
* return an array with appropriately re-keyed children.
|
||
*
|
||
* See https://reactjs.org/docs/react-api.html#reactchildrentoarray
|
||
*/
|
||
function toArray(children) {
|
||
var result = [];
|
||
mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
|
||
return child;
|
||
});
|
||
return result;
|
||
}
|
||
|
||
/**
|
||
* Returns the first child in a collection of children and verifies that there
|
||
* is only one child in the collection.
|
||
*
|
||
* See https://reactjs.org/docs/react-api.html#reactchildrenonly
|
||
*
|
||
* The current implementation of this function assumes that a single child gets
|
||
* passed without a wrapper, but the purpose of this helper function is to
|
||
* abstract away the particular structure of children.
|
||
*
|
||
* @param {?object} children Child collection structure.
|
||
* @return {ReactElement} The first and only `ReactElement` contained in the
|
||
* structure.
|
||
*/
|
||
function onlyChild(children) {
|
||
!isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0;
|
||
return children;
|
||
}
|
||
|
||
function createContext(defaultValue, calculateChangedBits) {
|
||
if (calculateChangedBits === undefined) {
|
||
calculateChangedBits = null;
|
||
} else {
|
||
{
|
||
!(calculateChangedBits === null || typeof calculateChangedBits === 'function') ? warningWithoutStack$1(false, 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits) : void 0;
|
||
}
|
||
}
|
||
|
||
var context = {
|
||
$$typeof: REACT_CONTEXT_TYPE,
|
||
_calculateChangedBits: calculateChangedBits,
|
||
// As a workaround to support multiple concurrent renderers, we categorize
|
||
// some renderers as primary and others as secondary. We only expect
|
||
// there to be two concurrent renderers at most: React Native (primary) and
|
||
// Fabric (secondary); React DOM (primary) and React ART (secondary).
|
||
// Secondary renderers store their context values on separate fields.
|
||
_currentValue: defaultValue,
|
||
_currentValue2: defaultValue,
|
||
// Used to track how many concurrent renderers this context currently
|
||
// supports within in a single renderer. Such as parallel server rendering.
|
||
_threadCount: 0,
|
||
// These are circular
|
||
Provider: null,
|
||
Consumer: null
|
||
};
|
||
|
||
context.Provider = {
|
||
$$typeof: REACT_PROVIDER_TYPE,
|
||
_context: context
|
||
};
|
||
|
||
var hasWarnedAboutUsingNestedContextConsumers = false;
|
||
var hasWarnedAboutUsingConsumerProvider = false;
|
||
|
||
{
|
||
// A separate object, but proxies back to the original context object for
|
||
// backwards compatibility. It has a different $$typeof, so we can properly
|
||
// warn for the incorrect usage of Context as a Consumer.
|
||
var Consumer = {
|
||
$$typeof: REACT_CONTEXT_TYPE,
|
||
_context: context,
|
||
_calculateChangedBits: context._calculateChangedBits
|
||
};
|
||
// $FlowFixMe: Flow complains about not setting a value, which is intentional here
|
||
Object.defineProperties(Consumer, {
|
||
Provider: {
|
||
get: function () {
|
||
if (!hasWarnedAboutUsingConsumerProvider) {
|
||
hasWarnedAboutUsingConsumerProvider = true;
|
||
warning$1(false, 'Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
|
||
}
|
||
return context.Provider;
|
||
},
|
||
set: function (_Provider) {
|
||
context.Provider = _Provider;
|
||
}
|
||
},
|
||
_currentValue: {
|
||
get: function () {
|
||
return context._currentValue;
|
||
},
|
||
set: function (_currentValue) {
|
||
context._currentValue = _currentValue;
|
||
}
|
||
},
|
||
_currentValue2: {
|
||
get: function () {
|
||
return context._currentValue2;
|
||
},
|
||
set: function (_currentValue2) {
|
||
context._currentValue2 = _currentValue2;
|
||
}
|
||
},
|
||
_threadCount: {
|
||
get: function () {
|
||
return context._threadCount;
|
||
},
|
||
set: function (_threadCount) {
|
||
context._threadCount = _threadCount;
|
||
}
|
||
},
|
||
Consumer: {
|
||
get: function () {
|
||
if (!hasWarnedAboutUsingNestedContextConsumers) {
|
||
hasWarnedAboutUsingNestedContextConsumers = true;
|
||
warning$1(false, 'Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
|
||
}
|
||
return context.Consumer;
|
||
}
|
||
}
|
||
});
|
||
// $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
|
||
context.Consumer = Consumer;
|
||
}
|
||
|
||
{
|
||
context._currentRenderer = null;
|
||
context._currentRenderer2 = null;
|
||
}
|
||
|
||
return context;
|
||
}
|
||
|
||
function lazy(ctor) {
|
||
var lazyType = {
|
||
$$typeof: REACT_LAZY_TYPE,
|
||
_ctor: ctor,
|
||
// React uses these fields to store the result.
|
||
_status: -1,
|
||
_result: null
|
||
};
|
||
|
||
{
|
||
// In production, this would just set it on the object.
|
||
var defaultProps = void 0;
|
||
var propTypes = void 0;
|
||
Object.defineProperties(lazyType, {
|
||
defaultProps: {
|
||
configurable: true,
|
||
get: function () {
|
||
return defaultProps;
|
||
},
|
||
set: function (newDefaultProps) {
|
||
warning$1(false, 'React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
|
||
defaultProps = newDefaultProps;
|
||
// Match production behavior more closely:
|
||
Object.defineProperty(lazyType, 'defaultProps', {
|
||
enumerable: true
|
||
});
|
||
}
|
||
},
|
||
propTypes: {
|
||
configurable: true,
|
||
get: function () {
|
||
return propTypes;
|
||
},
|
||
set: function (newPropTypes) {
|
||
warning$1(false, 'React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
|
||
propTypes = newPropTypes;
|
||
// Match production behavior more closely:
|
||
Object.defineProperty(lazyType, 'propTypes', {
|
||
enumerable: true
|
||
});
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
return lazyType;
|
||
}
|
||
|
||
function forwardRef(render) {
|
||
{
|
||
if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
|
||
warningWithoutStack$1(false, 'forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
|
||
} else if (typeof render !== 'function') {
|
||
warningWithoutStack$1(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
|
||
} else {
|
||
!(
|
||
// Do not warn for 0 arguments because it could be due to usage of the 'arguments' object
|
||
render.length === 0 || render.length === 2) ? warningWithoutStack$1(false, 'forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.') : void 0;
|
||
}
|
||
|
||
if (render != null) {
|
||
!(render.defaultProps == null && render.propTypes == null) ? warningWithoutStack$1(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0;
|
||
}
|
||
}
|
||
|
||
return {
|
||
$$typeof: REACT_FORWARD_REF_TYPE,
|
||
render: render
|
||
};
|
||
}
|
||
|
||
function isValidElementType(type) {
|
||
return typeof type === 'string' || typeof type === 'function' ||
|
||
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
||
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
|
||
}
|
||
|
||
function memo(type, compare) {
|
||
{
|
||
if (!isValidElementType(type)) {
|
||
warningWithoutStack$1(false, 'memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
|
||
}
|
||
}
|
||
return {
|
||
$$typeof: REACT_MEMO_TYPE,
|
||
type: type,
|
||
compare: compare === undefined ? null : compare
|
||
};
|
||
}
|
||
|
||
function resolveDispatcher() {
|
||
var dispatcher = ReactCurrentOwner.currentDispatcher;
|
||
!(dispatcher !== null) ? invariant(false, 'Hooks can only be called inside the body of a function component.') : void 0;
|
||
return dispatcher;
|
||
}
|
||
|
||
function useContext(Context, observedBits) {
|
||
var dispatcher = resolveDispatcher();
|
||
{
|
||
// TODO: add a more generic warning for invalid values.
|
||
if (Context._context !== undefined) {
|
||
var realContext = Context._context;
|
||
// Don't deduplicate because this legitimately causes bugs
|
||
// and nobody should be using this in existing code.
|
||
if (realContext.Consumer === Context) {
|
||
warning$1(false, 'Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
|
||
} else if (realContext.Provider === Context) {
|
||
warning$1(false, 'Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
|
||
}
|
||
}
|
||
}
|
||
return dispatcher.useContext(Context, observedBits);
|
||
}
|
||
|
||
function useState(initialState) {
|
||
var dispatcher = resolveDispatcher();
|
||
return dispatcher.useState(initialState);
|
||
}
|
||
|
||
function useReducer(reducer, initialState, initialAction) {
|
||
var dispatcher = resolveDispatcher();
|
||
return dispatcher.useReducer(reducer, initialState, initialAction);
|
||
}
|
||
|
||
function useRef(initialValue) {
|
||
var dispatcher = resolveDispatcher();
|
||
return dispatcher.useRef(initialValue);
|
||
}
|
||
|
||
function useEffect(create, inputs) {
|
||
var dispatcher = resolveDispatcher();
|
||
return dispatcher.useEffect(create, inputs);
|
||
}
|
||
|
||
function useLayoutEffect(create, inputs) {
|
||
var dispatcher = resolveDispatcher();
|
||
return dispatcher.useLayoutEffect(create, inputs);
|
||
}
|
||
|
||
function useCallback(callback, inputs) {
|
||
var dispatcher = resolveDispatcher();
|
||
return dispatcher.useCallback(callback, inputs);
|
||
}
|
||
|
||
function useMemo(create, inputs) {
|
||
var dispatcher = resolveDispatcher();
|
||
return dispatcher.useMemo(create, inputs);
|
||
}
|
||
|
||
function useImperativeMethods(ref, create, inputs) {
|
||
var dispatcher = resolveDispatcher();
|
||
return dispatcher.useImperativeMethods(ref, create, inputs);
|
||
}
|
||
|
||
/**
|
||
* ReactElementValidator provides a wrapper around a element factory
|
||
* which validates the props passed to the element. This is intended to be
|
||
* used only in DEV and could be replaced by a static type checker for languages
|
||
* that support it.
|
||
*/
|
||
|
||
var propTypesMisspellWarningShown = void 0;
|
||
|
||
{
|
||
propTypesMisspellWarningShown = false;
|
||
}
|
||
|
||
function getDeclarationErrorAddendum() {
|
||
if (ReactCurrentOwner.current) {
|
||
var name = getComponentName(ReactCurrentOwner.current.type);
|
||
if (name) {
|
||
return '\n\nCheck the render method of `' + name + '`.';
|
||
}
|
||
}
|
||
return '';
|
||
}
|
||
|
||
function getSourceInfoErrorAddendum(elementProps) {
|
||
if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
|
||
var source = elementProps.__source;
|
||
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
|
||
var lineNumber = source.lineNumber;
|
||
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
|
||
}
|
||
return '';
|
||
}
|
||
|
||
/**
|
||
* Warn if there's no key explicitly set on dynamic arrays of children or
|
||
* object keys are not valid. This allows us to keep track of children between
|
||
* updates.
|
||
*/
|
||
var ownerHasKeyUseWarning = {};
|
||
|
||
function getCurrentComponentErrorInfo(parentType) {
|
||
var info = getDeclarationErrorAddendum();
|
||
|
||
if (!info) {
|
||
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
||
if (parentName) {
|
||
info = '\n\nCheck the top-level render call using <' + parentName + '>.';
|
||
}
|
||
}
|
||
return info;
|
||
}
|
||
|
||
/**
|
||
* Warn if the element doesn't have an explicit key assigned to it.
|
||
* This element is in an array. The array could grow and shrink or be
|
||
* reordered. All children that haven't already been validated are required to
|
||
* have a "key" property assigned to it. Error statuses are cached so a warning
|
||
* will only be shown once.
|
||
*
|
||
* @internal
|
||
* @param {ReactElement} element Element that requires a key.
|
||
* @param {*} parentType element's parent's type.
|
||
*/
|
||
function validateExplicitKey(element, parentType) {
|
||
if (!element._store || element._store.validated || element.key != null) {
|
||
return;
|
||
}
|
||
element._store.validated = true;
|
||
|
||
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
||
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
||
return;
|
||
}
|
||
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
|
||
|
||
// Usually the current owner is the offender, but if it accepts children as a
|
||
// property, it may be the creator of the child that's responsible for
|
||
// assigning it a key.
|
||
var childOwner = '';
|
||
if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
||
// Give the component that originally created this child.
|
||
childOwner = ' It was passed a child from ' + getComponentName(element._owner.type) + '.';
|
||
}
|
||
|
||
setCurrentlyValidatingElement(element);
|
||
{
|
||
warning$1(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
||
}
|
||
setCurrentlyValidatingElement(null);
|
||
}
|
||
|
||
/**
|
||
* Ensure that every element either is passed in a static location, in an
|
||
* array with an explicit keys property defined, or in an object literal
|
||
* with valid key property.
|
||
*
|
||
* @internal
|
||
* @param {ReactNode} node Statically passed child of any type.
|
||
* @param {*} parentType node's parent's type.
|
||
*/
|
||
function validateChildKeys(node, parentType) {
|
||
if (typeof node !== 'object') {
|
||
return;
|
||
}
|
||
if (Array.isArray(node)) {
|
||
for (var i = 0; i < node.length; i++) {
|
||
var child = node[i];
|
||
if (isValidElement(child)) {
|
||
validateExplicitKey(child, parentType);
|
||
}
|
||
}
|
||
} else if (isValidElement(node)) {
|
||
// This element was passed in a valid location.
|
||
if (node._store) {
|
||
node._store.validated = true;
|
||
}
|
||
} else if (node) {
|
||
var iteratorFn = getIteratorFn(node);
|
||
if (typeof iteratorFn === 'function') {
|
||
// Entry iterators used to provide implicit keys,
|
||
// but now we print a separate warning for them later.
|
||
if (iteratorFn !== node.entries) {
|
||
var iterator = iteratorFn.call(node);
|
||
var step = void 0;
|
||
while (!(step = iterator.next()).done) {
|
||
if (isValidElement(step.value)) {
|
||
validateExplicitKey(step.value, parentType);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Given an element, validate that its props follow the propTypes definition,
|
||
* provided by the type.
|
||
*
|
||
* @param {ReactElement} element
|
||
*/
|
||
function validatePropTypes(element) {
|
||
var type = element.type;
|
||
if (type === null || type === undefined || typeof type === 'string') {
|
||
return;
|
||
}
|
||
var name = getComponentName(type);
|
||
var propTypes = void 0;
|
||
if (typeof type === 'function') {
|
||
propTypes = type.propTypes;
|
||
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE ||
|
||
// Note: Memo only checks outer props here.
|
||
// Inner props are checked in the reconciler.
|
||
type.$$typeof === REACT_MEMO_TYPE)) {
|
||
propTypes = type.propTypes;
|
||
} else {
|
||
return;
|
||
}
|
||
if (propTypes) {
|
||
setCurrentlyValidatingElement(element);
|
||
checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
|
||
setCurrentlyValidatingElement(null);
|
||
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
||
propTypesMisspellWarningShown = true;
|
||
warningWithoutStack$1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
|
||
}
|
||
if (typeof type.getDefaultProps === 'function') {
|
||
!type.getDefaultProps.isReactClassApproved ? warningWithoutStack$1(false, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Given a fragment, validate that it can only be provided with fragment props
|
||
* @param {ReactElement} fragment
|
||
*/
|
||
function validateFragmentProps(fragment) {
|
||
setCurrentlyValidatingElement(fragment);
|
||
|
||
var keys = Object.keys(fragment.props);
|
||
for (var i = 0; i < keys.length; i++) {
|
||
var key = keys[i];
|
||
if (key !== 'children' && key !== 'key') {
|
||
warning$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
||
break;
|
||
}
|
||
}
|
||
|
||
if (fragment.ref !== null) {
|
||
warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.');
|
||
}
|
||
|
||
setCurrentlyValidatingElement(null);
|
||
}
|
||
|
||
function createElementWithValidation(type, props, children) {
|
||
var validType = isValidElementType(type);
|
||
|
||
// We warn in this case but don't throw. We expect the element creation to
|
||
// succeed and there will likely be errors in render.
|
||
if (!validType) {
|
||
var info = '';
|
||
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
||
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
|
||
}
|
||
|
||
var sourceInfo = getSourceInfoErrorAddendum(props);
|
||
if (sourceInfo) {
|
||
info += sourceInfo;
|
||
} else {
|
||
info += getDeclarationErrorAddendum();
|
||
}
|
||
|
||
var typeString = void 0;
|
||
if (type === null) {
|
||
typeString = 'null';
|
||
} else if (Array.isArray(type)) {
|
||
typeString = 'array';
|
||
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
|
||
typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />';
|
||
info = ' Did you accidentally export a JSX literal instead of a component?';
|
||
} else {
|
||
typeString = typeof type;
|
||
}
|
||
|
||
warning$1(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
|
||
}
|
||
|
||
var element = createElement.apply(this, arguments);
|
||
|
||
// The result can be nullish if a mock or a custom function is used.
|
||
// TODO: Drop this when these are no longer allowed as the type argument.
|
||
if (element == null) {
|
||
return element;
|
||
}
|
||
|
||
// Skip key warning if the type isn't valid since our key validation logic
|
||
// doesn't expect a non-string/function type and can throw confusing errors.
|
||
// We don't want exception behavior to differ between dev and prod.
|
||
// (Rendering will throw with a helpful message and as soon as the type is
|
||
// fixed, the key warnings will appear.)
|
||
if (validType) {
|
||
for (var i = 2; i < arguments.length; i++) {
|
||
validateChildKeys(arguments[i], type);
|
||
}
|
||
}
|
||
|
||
if (type === REACT_FRAGMENT_TYPE) {
|
||
validateFragmentProps(element);
|
||
} else {
|
||
validatePropTypes(element);
|
||
}
|
||
|
||
return element;
|
||
}
|
||
|
||
function createFactoryWithValidation(type) {
|
||
var validatedFactory = createElementWithValidation.bind(null, type);
|
||
validatedFactory.type = type;
|
||
// Legacy hook: remove it
|
||
{
|
||
Object.defineProperty(validatedFactory, 'type', {
|
||
enumerable: false,
|
||
get: function () {
|
||
lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
|
||
Object.defineProperty(this, 'type', {
|
||
value: type
|
||
});
|
||
return type;
|
||
}
|
||
});
|
||
}
|
||
|
||
return validatedFactory;
|
||
}
|
||
|
||
function cloneElementWithValidation(element, props, children) {
|
||
var newElement = cloneElement.apply(this, arguments);
|
||
for (var i = 2; i < arguments.length; i++) {
|
||
validateChildKeys(arguments[i], newElement.type);
|
||
}
|
||
validatePropTypes(newElement);
|
||
return newElement;
|
||
}
|
||
|
||
var React = {
|
||
Children: {
|
||
map: mapChildren,
|
||
forEach: forEachChildren,
|
||
count: countChildren,
|
||
toArray: toArray,
|
||
only: onlyChild
|
||
},
|
||
|
||
createRef: createRef,
|
||
Component: Component,
|
||
PureComponent: PureComponent,
|
||
|
||
createContext: createContext,
|
||
forwardRef: forwardRef,
|
||
lazy: lazy,
|
||
memo: memo,
|
||
|
||
Fragment: REACT_FRAGMENT_TYPE,
|
||
StrictMode: REACT_STRICT_MODE_TYPE,
|
||
Suspense: REACT_SUSPENSE_TYPE,
|
||
|
||
createElement: createElementWithValidation,
|
||
cloneElement: cloneElementWithValidation,
|
||
createFactory: createFactoryWithValidation,
|
||
isValidElement: isValidElement,
|
||
|
||
version: ReactVersion,
|
||
|
||
unstable_ConcurrentMode: REACT_CONCURRENT_MODE_TYPE,
|
||
unstable_Profiler: REACT_PROFILER_TYPE,
|
||
|
||
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals
|
||
};
|
||
|
||
// Note: some APIs are added with feature flags.
|
||
// Make sure that stable builds for open source
|
||
// don't modify the React object to avoid deopts.
|
||
// Also let's not expose their names in stable builds.
|
||
|
||
if (enableStableConcurrentModeAPIs) {
|
||
React.ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
||
React.Profiler = REACT_PROFILER_TYPE;
|
||
React.unstable_ConcurrentMode = undefined;
|
||
React.unstable_Profiler = undefined;
|
||
}
|
||
|
||
if (enableHooks) {
|
||
React.useCallback = useCallback;
|
||
React.useContext = useContext;
|
||
React.useEffect = useEffect;
|
||
React.useImperativeMethods = useImperativeMethods;
|
||
React.useLayoutEffect = useLayoutEffect;
|
||
React.useMemo = useMemo;
|
||
React.useReducer = useReducer;
|
||
React.useRef = useRef;
|
||
React.useState = useState;
|
||
}
|
||
|
||
|
||
|
||
var React$2 = Object.freeze({
|
||
default: React
|
||
});
|
||
|
||
var React$3 = ( React$2 && React ) || React$2;
|
||
|
||
// TODO: decide on the top-level export form.
|
||
// This is hacky but makes it work with both Rollup and Jest.
|
||
var react = React$3.default || React$3;
|
||
|
||
module.exports = react;
|
||
})();
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/react/index.js":
|
||
/*!*************************************!*\
|
||
!*** ./node_modules/react/index.js ***!
|
||
\*************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
if (false) {} else {
|
||
module.exports = __webpack_require__(/*! ./cjs/react.development.js */ "./node_modules/react/cjs/react.development.js");
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/redux-thunk/es/index.js":
|
||
/*!**********************************************!*\
|
||
!*** ./node_modules/redux-thunk/es/index.js ***!
|
||
\**********************************************/
|
||
/*! exports provided: default */
|
||
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/ts/app/index.tsx (referenced with cjs require) */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
function createThunkMiddleware(extraArgument) {
|
||
return function (_ref) {
|
||
var dispatch = _ref.dispatch,
|
||
getState = _ref.getState;
|
||
return function (next) {
|
||
return function (action) {
|
||
if (typeof action === 'function') {
|
||
return action(dispatch, getState, extraArgument);
|
||
}
|
||
|
||
return next(action);
|
||
};
|
||
};
|
||
};
|
||
}
|
||
|
||
var thunk = createThunkMiddleware();
|
||
thunk.withExtraArgument = createThunkMiddleware;
|
||
|
||
/* harmony default export */ __webpack_exports__["default"] = (thunk);
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/redux/es/redux.js":
|
||
/*!****************************************!*\
|
||
!*** ./node_modules/redux/es/redux.js ***!
|
||
\****************************************/
|
||
/*! exports provided: createStore, combineReducers, bindActionCreators, applyMiddleware, compose, __DO_NOT_USE__ActionTypes */
|
||
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/ts/app/index.tsx (referenced with cjs require) */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; });
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return combineReducers; });
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return bindActionCreators; });
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return applyMiddleware; });
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; });
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__DO_NOT_USE__ActionTypes", function() { return ActionTypes; });
|
||
/* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! symbol-observable */ "./node_modules/symbol-observable/es/index.js");
|
||
|
||
|
||
/**
|
||
* These are private action types reserved by Redux.
|
||
* For any unknown actions, you must return the current state.
|
||
* If the current state is undefined, you must return the initial state.
|
||
* Do not reference these action types directly in your code.
|
||
*/
|
||
var randomString = function randomString() {
|
||
return Math.random().toString(36).substring(7).split('').join('.');
|
||
};
|
||
|
||
var ActionTypes = {
|
||
INIT: "@@redux/INIT" + randomString(),
|
||
REPLACE: "@@redux/REPLACE" + randomString(),
|
||
PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
|
||
return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
|
||
}
|
||
};
|
||
|
||
/**
|
||
* @param {any} obj The object to inspect.
|
||
* @returns {boolean} True if the argument appears to be a plain object.
|
||
*/
|
||
function isPlainObject(obj) {
|
||
if (typeof obj !== 'object' || obj === null) return false;
|
||
var proto = obj;
|
||
|
||
while (Object.getPrototypeOf(proto) !== null) {
|
||
proto = Object.getPrototypeOf(proto);
|
||
}
|
||
|
||
return Object.getPrototypeOf(obj) === proto;
|
||
}
|
||
|
||
/**
|
||
* Creates a Redux store that holds the state tree.
|
||
* The only way to change the data in the store is to call `dispatch()` on it.
|
||
*
|
||
* There should only be a single store in your app. To specify how different
|
||
* parts of the state tree respond to actions, you may combine several reducers
|
||
* into a single reducer function by using `combineReducers`.
|
||
*
|
||
* @param {Function} reducer A function that returns the next state tree, given
|
||
* the current state tree and the action to handle.
|
||
*
|
||
* @param {any} [preloadedState] The initial state. You may optionally specify it
|
||
* to hydrate the state from the server in universal apps, or to restore a
|
||
* previously serialized user session.
|
||
* If you use `combineReducers` to produce the root reducer function, this must be
|
||
* an object with the same shape as `combineReducers` keys.
|
||
*
|
||
* @param {Function} [enhancer] The store enhancer. You may optionally specify it
|
||
* to enhance the store with third-party capabilities such as middleware,
|
||
* time travel, persistence, etc. The only store enhancer that ships with Redux
|
||
* is `applyMiddleware()`.
|
||
*
|
||
* @returns {Store} A Redux store that lets you read the state, dispatch actions
|
||
* and subscribe to changes.
|
||
*/
|
||
|
||
function createStore(reducer, preloadedState, enhancer) {
|
||
var _ref2;
|
||
|
||
if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
|
||
throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function');
|
||
}
|
||
|
||
if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
|
||
enhancer = preloadedState;
|
||
preloadedState = undefined;
|
||
}
|
||
|
||
if (typeof enhancer !== 'undefined') {
|
||
if (typeof enhancer !== 'function') {
|
||
throw new Error('Expected the enhancer to be a function.');
|
||
}
|
||
|
||
return enhancer(createStore)(reducer, preloadedState);
|
||
}
|
||
|
||
if (typeof reducer !== 'function') {
|
||
throw new Error('Expected the reducer to be a function.');
|
||
}
|
||
|
||
var currentReducer = reducer;
|
||
var currentState = preloadedState;
|
||
var currentListeners = [];
|
||
var nextListeners = currentListeners;
|
||
var isDispatching = false;
|
||
|
||
function ensureCanMutateNextListeners() {
|
||
if (nextListeners === currentListeners) {
|
||
nextListeners = currentListeners.slice();
|
||
}
|
||
}
|
||
/**
|
||
* Reads the state tree managed by the store.
|
||
*
|
||
* @returns {any} The current state tree of your application.
|
||
*/
|
||
|
||
|
||
function getState() {
|
||
if (isDispatching) {
|
||
throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
|
||
}
|
||
|
||
return currentState;
|
||
}
|
||
/**
|
||
* Adds a change listener. It will be called any time an action is dispatched,
|
||
* and some part of the state tree may potentially have changed. You may then
|
||
* call `getState()` to read the current state tree inside the callback.
|
||
*
|
||
* You may call `dispatch()` from a change listener, with the following
|
||
* caveats:
|
||
*
|
||
* 1. The subscriptions are snapshotted just before every `dispatch()` call.
|
||
* If you subscribe or unsubscribe while the listeners are being invoked, this
|
||
* will not have any effect on the `dispatch()` that is currently in progress.
|
||
* However, the next `dispatch()` call, whether nested or not, will use a more
|
||
* recent snapshot of the subscription list.
|
||
*
|
||
* 2. The listener should not expect to see all state changes, as the state
|
||
* might have been updated multiple times during a nested `dispatch()` before
|
||
* the listener is called. It is, however, guaranteed that all subscribers
|
||
* registered before the `dispatch()` started will be called with the latest
|
||
* state by the time it exits.
|
||
*
|
||
* @param {Function} listener A callback to be invoked on every dispatch.
|
||
* @returns {Function} A function to remove this change listener.
|
||
*/
|
||
|
||
|
||
function subscribe(listener) {
|
||
if (typeof listener !== 'function') {
|
||
throw new Error('Expected the listener to be a function.');
|
||
}
|
||
|
||
if (isDispatching) {
|
||
throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');
|
||
}
|
||
|
||
var isSubscribed = true;
|
||
ensureCanMutateNextListeners();
|
||
nextListeners.push(listener);
|
||
return function unsubscribe() {
|
||
if (!isSubscribed) {
|
||
return;
|
||
}
|
||
|
||
if (isDispatching) {
|
||
throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');
|
||
}
|
||
|
||
isSubscribed = false;
|
||
ensureCanMutateNextListeners();
|
||
var index = nextListeners.indexOf(listener);
|
||
nextListeners.splice(index, 1);
|
||
};
|
||
}
|
||
/**
|
||
* Dispatches an action. It is the only way to trigger a state change.
|
||
*
|
||
* The `reducer` function, used to create the store, will be called with the
|
||
* current state tree and the given `action`. Its return value will
|
||
* be considered the **next** state of the tree, and the change listeners
|
||
* will be notified.
|
||
*
|
||
* The base implementation only supports plain object actions. If you want to
|
||
* dispatch a Promise, an Observable, a thunk, or something else, you need to
|
||
* wrap your store creating function into the corresponding middleware. For
|
||
* example, see the documentation for the `redux-thunk` package. Even the
|
||
* middleware will eventually dispatch plain object actions using this method.
|
||
*
|
||
* @param {Object} action A plain object representing “what changed”. It is
|
||
* a good idea to keep actions serializable so you can record and replay user
|
||
* sessions, or use the time travelling `redux-devtools`. An action must have
|
||
* a `type` property which may not be `undefined`. It is a good idea to use
|
||
* string constants for action types.
|
||
*
|
||
* @returns {Object} For convenience, the same action object you dispatched.
|
||
*
|
||
* Note that, if you use a custom middleware, it may wrap `dispatch()` to
|
||
* return something else (for example, a Promise you can await).
|
||
*/
|
||
|
||
|
||
function dispatch(action) {
|
||
if (!isPlainObject(action)) {
|
||
throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
|
||
}
|
||
|
||
if (typeof action.type === 'undefined') {
|
||
throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
|
||
}
|
||
|
||
if (isDispatching) {
|
||
throw new Error('Reducers may not dispatch actions.');
|
||
}
|
||
|
||
try {
|
||
isDispatching = true;
|
||
currentState = currentReducer(currentState, action);
|
||
} finally {
|
||
isDispatching = false;
|
||
}
|
||
|
||
var listeners = currentListeners = nextListeners;
|
||
|
||
for (var i = 0; i < listeners.length; i++) {
|
||
var listener = listeners[i];
|
||
listener();
|
||
}
|
||
|
||
return action;
|
||
}
|
||
/**
|
||
* Replaces the reducer currently used by the store to calculate the state.
|
||
*
|
||
* You might need this if your app implements code splitting and you want to
|
||
* load some of the reducers dynamically. You might also need this if you
|
||
* implement a hot reloading mechanism for Redux.
|
||
*
|
||
* @param {Function} nextReducer The reducer for the store to use instead.
|
||
* @returns {void}
|
||
*/
|
||
|
||
|
||
function replaceReducer(nextReducer) {
|
||
if (typeof nextReducer !== 'function') {
|
||
throw new Error('Expected the nextReducer to be a function.');
|
||
}
|
||
|
||
currentReducer = nextReducer;
|
||
dispatch({
|
||
type: ActionTypes.REPLACE
|
||
});
|
||
}
|
||
/**
|
||
* Interoperability point for observable/reactive libraries.
|
||
* @returns {observable} A minimal observable of state changes.
|
||
* For more information, see the observable proposal:
|
||
* https://github.com/tc39/proposal-observable
|
||
*/
|
||
|
||
|
||
function observable() {
|
||
var _ref;
|
||
|
||
var outerSubscribe = subscribe;
|
||
return _ref = {
|
||
/**
|
||
* The minimal observable subscription method.
|
||
* @param {Object} observer Any object that can be used as an observer.
|
||
* The observer object should have a `next` method.
|
||
* @returns {subscription} An object with an `unsubscribe` method that can
|
||
* be used to unsubscribe the observable from the store, and prevent further
|
||
* emission of values from the observable.
|
||
*/
|
||
subscribe: function subscribe(observer) {
|
||
if (typeof observer !== 'object' || observer === null) {
|
||
throw new TypeError('Expected the observer to be an object.');
|
||
}
|
||
|
||
function observeState() {
|
||
if (observer.next) {
|
||
observer.next(getState());
|
||
}
|
||
}
|
||
|
||
observeState();
|
||
var unsubscribe = outerSubscribe(observeState);
|
||
return {
|
||
unsubscribe: unsubscribe
|
||
};
|
||
}
|
||
}, _ref[symbol_observable__WEBPACK_IMPORTED_MODULE_0__["default"]] = function () {
|
||
return this;
|
||
}, _ref;
|
||
} // When a store is created, an "INIT" action is dispatched so that every
|
||
// reducer returns their initial state. This effectively populates
|
||
// the initial state tree.
|
||
|
||
|
||
dispatch({
|
||
type: ActionTypes.INIT
|
||
});
|
||
return _ref2 = {
|
||
dispatch: dispatch,
|
||
subscribe: subscribe,
|
||
getState: getState,
|
||
replaceReducer: replaceReducer
|
||
}, _ref2[symbol_observable__WEBPACK_IMPORTED_MODULE_0__["default"]] = observable, _ref2;
|
||
}
|
||
|
||
/**
|
||
* Prints a warning in the console if it exists.
|
||
*
|
||
* @param {String} message The warning message.
|
||
* @returns {void}
|
||
*/
|
||
function warning(message) {
|
||
/* eslint-disable no-console */
|
||
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
||
console.error(message);
|
||
}
|
||
/* eslint-enable no-console */
|
||
|
||
|
||
try {
|
||
// This error was thrown as a convenience so that if you enable
|
||
// "break on all exceptions" in your console,
|
||
// it would pause the execution at this line.
|
||
throw new Error(message);
|
||
} catch (e) {} // eslint-disable-line no-empty
|
||
|
||
}
|
||
|
||
function getUndefinedStateErrorMessage(key, action) {
|
||
var actionType = action && action.type;
|
||
var actionDescription = actionType && "action \"" + String(actionType) + "\"" || 'an action';
|
||
return "Given " + actionDescription + ", reducer \"" + key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined.";
|
||
}
|
||
|
||
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
|
||
var reducerKeys = Object.keys(reducers);
|
||
var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
|
||
|
||
if (reducerKeys.length === 0) {
|
||
return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
|
||
}
|
||
|
||
if (!isPlainObject(inputState)) {
|
||
return "The " + argumentName + " has unexpected type of \"" + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
|
||
}
|
||
|
||
var unexpectedKeys = Object.keys(inputState).filter(function (key) {
|
||
return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
|
||
});
|
||
unexpectedKeys.forEach(function (key) {
|
||
unexpectedKeyCache[key] = true;
|
||
});
|
||
if (action && action.type === ActionTypes.REPLACE) return;
|
||
|
||
if (unexpectedKeys.length > 0) {
|
||
return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored.");
|
||
}
|
||
}
|
||
|
||
function assertReducerShape(reducers) {
|
||
Object.keys(reducers).forEach(function (key) {
|
||
var reducer = reducers[key];
|
||
var initialState = reducer(undefined, {
|
||
type: ActionTypes.INIT
|
||
});
|
||
|
||
if (typeof initialState === 'undefined') {
|
||
throw new Error("Reducer \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined.");
|
||
}
|
||
|
||
if (typeof reducer(undefined, {
|
||
type: ActionTypes.PROBE_UNKNOWN_ACTION()
|
||
}) === 'undefined') {
|
||
throw new Error("Reducer \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle " + ActionTypes.INIT + " or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null.");
|
||
}
|
||
});
|
||
}
|
||
/**
|
||
* Turns an object whose values are different reducer functions, into a single
|
||
* reducer function. It will call every child reducer, and gather their results
|
||
* into a single state object, whose keys correspond to the keys of the passed
|
||
* reducer functions.
|
||
*
|
||
* @param {Object} reducers An object whose values correspond to different
|
||
* reducer functions that need to be combined into one. One handy way to obtain
|
||
* it is to use ES6 `import * as reducers` syntax. The reducers may never return
|
||
* undefined for any action. Instead, they should return their initial state
|
||
* if the state passed to them was undefined, and the current state for any
|
||
* unrecognized action.
|
||
*
|
||
* @returns {Function} A reducer function that invokes every reducer inside the
|
||
* passed object, and builds a state object with the same shape.
|
||
*/
|
||
|
||
|
||
function combineReducers(reducers) {
|
||
var reducerKeys = Object.keys(reducers);
|
||
var finalReducers = {};
|
||
|
||
for (var i = 0; i < reducerKeys.length; i++) {
|
||
var key = reducerKeys[i];
|
||
|
||
if (true) {
|
||
if (typeof reducers[key] === 'undefined') {
|
||
warning("No reducer provided for key \"" + key + "\"");
|
||
}
|
||
}
|
||
|
||
if (typeof reducers[key] === 'function') {
|
||
finalReducers[key] = reducers[key];
|
||
}
|
||
}
|
||
|
||
var finalReducerKeys = Object.keys(finalReducers);
|
||
var unexpectedKeyCache;
|
||
|
||
if (true) {
|
||
unexpectedKeyCache = {};
|
||
}
|
||
|
||
var shapeAssertionError;
|
||
|
||
try {
|
||
assertReducerShape(finalReducers);
|
||
} catch (e) {
|
||
shapeAssertionError = e;
|
||
}
|
||
|
||
return function combination(state, action) {
|
||
if (state === void 0) {
|
||
state = {};
|
||
}
|
||
|
||
if (shapeAssertionError) {
|
||
throw shapeAssertionError;
|
||
}
|
||
|
||
if (true) {
|
||
var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
|
||
|
||
if (warningMessage) {
|
||
warning(warningMessage);
|
||
}
|
||
}
|
||
|
||
var hasChanged = false;
|
||
var nextState = {};
|
||
|
||
for (var _i = 0; _i < finalReducerKeys.length; _i++) {
|
||
var _key = finalReducerKeys[_i];
|
||
var reducer = finalReducers[_key];
|
||
var previousStateForKey = state[_key];
|
||
var nextStateForKey = reducer(previousStateForKey, action);
|
||
|
||
if (typeof nextStateForKey === 'undefined') {
|
||
var errorMessage = getUndefinedStateErrorMessage(_key, action);
|
||
throw new Error(errorMessage);
|
||
}
|
||
|
||
nextState[_key] = nextStateForKey;
|
||
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
|
||
}
|
||
|
||
return hasChanged ? nextState : state;
|
||
};
|
||
}
|
||
|
||
function bindActionCreator(actionCreator, dispatch) {
|
||
return function () {
|
||
return dispatch(actionCreator.apply(this, arguments));
|
||
};
|
||
}
|
||
/**
|
||
* Turns an object whose values are action creators, into an object with the
|
||
* same keys, but with every function wrapped into a `dispatch` call so they
|
||
* may be invoked directly. This is just a convenience method, as you can call
|
||
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
|
||
*
|
||
* For convenience, you can also pass a single function as the first argument,
|
||
* and get a function in return.
|
||
*
|
||
* @param {Function|Object} actionCreators An object whose values are action
|
||
* creator functions. One handy way to obtain it is to use ES6 `import * as`
|
||
* syntax. You may also pass a single function.
|
||
*
|
||
* @param {Function} dispatch The `dispatch` function available on your Redux
|
||
* store.
|
||
*
|
||
* @returns {Function|Object} The object mimicking the original object, but with
|
||
* every action creator wrapped into the `dispatch` call. If you passed a
|
||
* function as `actionCreators`, the return value will also be a single
|
||
* function.
|
||
*/
|
||
|
||
|
||
function bindActionCreators(actionCreators, dispatch) {
|
||
if (typeof actionCreators === 'function') {
|
||
return bindActionCreator(actionCreators, dispatch);
|
||
}
|
||
|
||
if (typeof actionCreators !== 'object' || actionCreators === null) {
|
||
throw new Error("bindActionCreators expected an object or a function, instead received " + (actionCreators === null ? 'null' : typeof actionCreators) + ". " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");
|
||
}
|
||
|
||
var keys = Object.keys(actionCreators);
|
||
var boundActionCreators = {};
|
||
|
||
for (var i = 0; i < keys.length; i++) {
|
||
var key = keys[i];
|
||
var actionCreator = actionCreators[key];
|
||
|
||
if (typeof actionCreator === 'function') {
|
||
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
|
||
}
|
||
}
|
||
|
||
return boundActionCreators;
|
||
}
|
||
|
||
function _defineProperty(obj, key, value) {
|
||
if (key in obj) {
|
||
Object.defineProperty(obj, key, {
|
||
value: value,
|
||
enumerable: true,
|
||
configurable: true,
|
||
writable: true
|
||
});
|
||
} else {
|
||
obj[key] = value;
|
||
}
|
||
|
||
return obj;
|
||
}
|
||
|
||
function _objectSpread(target) {
|
||
for (var i = 1; i < arguments.length; i++) {
|
||
var source = arguments[i] != null ? arguments[i] : {};
|
||
var ownKeys = Object.keys(source);
|
||
|
||
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
||
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||
}));
|
||
}
|
||
|
||
ownKeys.forEach(function (key) {
|
||
_defineProperty(target, key, source[key]);
|
||
});
|
||
}
|
||
|
||
return target;
|
||
}
|
||
|
||
/**
|
||
* Composes single-argument functions from right to left. The rightmost
|
||
* function can take multiple arguments as it provides the signature for
|
||
* the resulting composite function.
|
||
*
|
||
* @param {...Function} funcs The functions to compose.
|
||
* @returns {Function} A function obtained by composing the argument functions
|
||
* from right to left. For example, compose(f, g, h) is identical to doing
|
||
* (...args) => f(g(h(...args))).
|
||
*/
|
||
function compose() {
|
||
for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
|
||
funcs[_key] = arguments[_key];
|
||
}
|
||
|
||
if (funcs.length === 0) {
|
||
return function (arg) {
|
||
return arg;
|
||
};
|
||
}
|
||
|
||
if (funcs.length === 1) {
|
||
return funcs[0];
|
||
}
|
||
|
||
return funcs.reduce(function (a, b) {
|
||
return function () {
|
||
return a(b.apply(void 0, arguments));
|
||
};
|
||
});
|
||
}
|
||
|
||
/**
|
||
* Creates a store enhancer that applies middleware to the dispatch method
|
||
* of the Redux store. This is handy for a variety of tasks, such as expressing
|
||
* asynchronous actions in a concise manner, or logging every action payload.
|
||
*
|
||
* See `redux-thunk` package as an example of the Redux middleware.
|
||
*
|
||
* Because middleware is potentially asynchronous, this should be the first
|
||
* store enhancer in the composition chain.
|
||
*
|
||
* Note that each middleware will be given the `dispatch` and `getState` functions
|
||
* as named arguments.
|
||
*
|
||
* @param {...Function} middlewares The middleware chain to be applied.
|
||
* @returns {Function} A store enhancer applying the middleware.
|
||
*/
|
||
|
||
function applyMiddleware() {
|
||
for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
|
||
middlewares[_key] = arguments[_key];
|
||
}
|
||
|
||
return function (createStore) {
|
||
return function () {
|
||
var store = createStore.apply(void 0, arguments);
|
||
|
||
var _dispatch = function dispatch() {
|
||
throw new Error("Dispatching while constructing your middleware is not allowed. " + "Other middleware would not be applied to this dispatch.");
|
||
};
|
||
|
||
var middlewareAPI = {
|
||
getState: store.getState,
|
||
dispatch: function dispatch() {
|
||
return _dispatch.apply(void 0, arguments);
|
||
}
|
||
};
|
||
var chain = middlewares.map(function (middleware) {
|
||
return middleware(middlewareAPI);
|
||
});
|
||
_dispatch = compose.apply(void 0, chain)(store.dispatch);
|
||
return _objectSpread({}, store, {
|
||
dispatch: _dispatch
|
||
});
|
||
};
|
||
};
|
||
}
|
||
|
||
/*
|
||
* This is a dummy function to check if the function name has been altered by minification.
|
||
* If the function has been minified and NODE_ENV !== 'production', warn the user.
|
||
*/
|
||
|
||
function isCrushed() {}
|
||
|
||
if ( true && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
|
||
warning('You are currently using minified code outside of NODE_ENV === "production". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');
|
||
}
|
||
|
||
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js":
|
||
/*!*************************************************************************!*\
|
||
!*** ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js ***!
|
||
\*************************************************************************/
|
||
/*! exports provided: default */
|
||
/*! ModuleConcatenation bailout: Module uses injected variables (global) */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* WEBPACK VAR INJECTION */(function(global) {/**
|
||
* A collection of shims that provide minimal functionality of the ES6 collections.
|
||
*
|
||
* These implementations are not meant to be used outside of the ResizeObserver
|
||
* modules as they cover only a limited range of use cases.
|
||
*/
|
||
/* eslint-disable require-jsdoc, valid-jsdoc */
|
||
var MapShim = (function () {
|
||
if (typeof Map !== 'undefined') {
|
||
return Map;
|
||
}
|
||
/**
|
||
* Returns index in provided array that matches the specified key.
|
||
*
|
||
* @param {Array<Array>} arr
|
||
* @param {*} key
|
||
* @returns {number}
|
||
*/
|
||
function getIndex(arr, key) {
|
||
var result = -1;
|
||
arr.some(function (entry, index) {
|
||
if (entry[0] === key) {
|
||
result = index;
|
||
return true;
|
||
}
|
||
return false;
|
||
});
|
||
return result;
|
||
}
|
||
return /** @class */ (function () {
|
||
function class_1() {
|
||
this.__entries__ = [];
|
||
}
|
||
Object.defineProperty(class_1.prototype, "size", {
|
||
/**
|
||
* @returns {boolean}
|
||
*/
|
||
get: function () {
|
||
return this.__entries__.length;
|
||
},
|
||
enumerable: true,
|
||
configurable: true
|
||
});
|
||
/**
|
||
* @param {*} key
|
||
* @returns {*}
|
||
*/
|
||
class_1.prototype.get = function (key) {
|
||
var index = getIndex(this.__entries__, key);
|
||
var entry = this.__entries__[index];
|
||
return entry && entry[1];
|
||
};
|
||
/**
|
||
* @param {*} key
|
||
* @param {*} value
|
||
* @returns {void}
|
||
*/
|
||
class_1.prototype.set = function (key, value) {
|
||
var index = getIndex(this.__entries__, key);
|
||
if (~index) {
|
||
this.__entries__[index][1] = value;
|
||
}
|
||
else {
|
||
this.__entries__.push([key, value]);
|
||
}
|
||
};
|
||
/**
|
||
* @param {*} key
|
||
* @returns {void}
|
||
*/
|
||
class_1.prototype.delete = function (key) {
|
||
var entries = this.__entries__;
|
||
var index = getIndex(entries, key);
|
||
if (~index) {
|
||
entries.splice(index, 1);
|
||
}
|
||
};
|
||
/**
|
||
* @param {*} key
|
||
* @returns {void}
|
||
*/
|
||
class_1.prototype.has = function (key) {
|
||
return !!~getIndex(this.__entries__, key);
|
||
};
|
||
/**
|
||
* @returns {void}
|
||
*/
|
||
class_1.prototype.clear = function () {
|
||
this.__entries__.splice(0);
|
||
};
|
||
/**
|
||
* @param {Function} callback
|
||
* @param {*} [ctx=null]
|
||
* @returns {void}
|
||
*/
|
||
class_1.prototype.forEach = function (callback, ctx) {
|
||
if (ctx === void 0) { ctx = null; }
|
||
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
|
||
var entry = _a[_i];
|
||
callback.call(ctx, entry[1], entry[0]);
|
||
}
|
||
};
|
||
return class_1;
|
||
}());
|
||
})();
|
||
|
||
/**
|
||
* Detects whether window and document objects are available in current environment.
|
||
*/
|
||
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
|
||
|
||
// Returns global object of a current environment.
|
||
var global$1 = (function () {
|
||
if (typeof global !== 'undefined' && global.Math === Math) {
|
||
return global;
|
||
}
|
||
if (typeof self !== 'undefined' && self.Math === Math) {
|
||
return self;
|
||
}
|
||
if (typeof window !== 'undefined' && window.Math === Math) {
|
||
return window;
|
||
}
|
||
// eslint-disable-next-line no-new-func
|
||
return Function('return this')();
|
||
})();
|
||
|
||
/**
|
||
* A shim for the requestAnimationFrame which falls back to the setTimeout if
|
||
* first one is not supported.
|
||
*
|
||
* @returns {number} Requests' identifier.
|
||
*/
|
||
var requestAnimationFrame$1 = (function () {
|
||
if (typeof requestAnimationFrame === 'function') {
|
||
// It's required to use a bounded function because IE sometimes throws
|
||
// an "Invalid calling object" error if rAF is invoked without the global
|
||
// object on the left hand side.
|
||
return requestAnimationFrame.bind(global$1);
|
||
}
|
||
return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
|
||
})();
|
||
|
||
// Defines minimum timeout before adding a trailing call.
|
||
var trailingTimeout = 2;
|
||
/**
|
||
* Creates a wrapper function which ensures that provided callback will be
|
||
* invoked only once during the specified delay period.
|
||
*
|
||
* @param {Function} callback - Function to be invoked after the delay period.
|
||
* @param {number} delay - Delay after which to invoke callback.
|
||
* @returns {Function}
|
||
*/
|
||
function throttle (callback, delay) {
|
||
var leadingCall = false, trailingCall = false, lastCallTime = 0;
|
||
/**
|
||
* Invokes the original callback function and schedules new invocation if
|
||
* the "proxy" was called during current request.
|
||
*
|
||
* @returns {void}
|
||
*/
|
||
function resolvePending() {
|
||
if (leadingCall) {
|
||
leadingCall = false;
|
||
callback();
|
||
}
|
||
if (trailingCall) {
|
||
proxy();
|
||
}
|
||
}
|
||
/**
|
||
* Callback invoked after the specified delay. It will further postpone
|
||
* invocation of the original function delegating it to the
|
||
* requestAnimationFrame.
|
||
*
|
||
* @returns {void}
|
||
*/
|
||
function timeoutCallback() {
|
||
requestAnimationFrame$1(resolvePending);
|
||
}
|
||
/**
|
||
* Schedules invocation of the original function.
|
||
*
|
||
* @returns {void}
|
||
*/
|
||
function proxy() {
|
||
var timeStamp = Date.now();
|
||
if (leadingCall) {
|
||
// Reject immediately following calls.
|
||
if (timeStamp - lastCallTime < trailingTimeout) {
|
||
return;
|
||
}
|
||
// Schedule new call to be in invoked when the pending one is resolved.
|
||
// This is important for "transitions" which never actually start
|
||
// immediately so there is a chance that we might miss one if change
|
||
// happens amids the pending invocation.
|
||
trailingCall = true;
|
||
}
|
||
else {
|
||
leadingCall = true;
|
||
trailingCall = false;
|
||
setTimeout(timeoutCallback, delay);
|
||
}
|
||
lastCallTime = timeStamp;
|
||
}
|
||
return proxy;
|
||
}
|
||
|
||
// Minimum delay before invoking the update of observers.
|
||
var REFRESH_DELAY = 20;
|
||
// A list of substrings of CSS properties used to find transition events that
|
||
// might affect dimensions of observed elements.
|
||
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
|
||
// Check if MutationObserver is available.
|
||
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
|
||
/**
|
||
* Singleton controller class which handles updates of ResizeObserver instances.
|
||
*/
|
||
var ResizeObserverController = /** @class */ (function () {
|
||
/**
|
||
* Creates a new instance of ResizeObserverController.
|
||
*
|
||
* @private
|
||
*/
|
||
function ResizeObserverController() {
|
||
/**
|
||
* Indicates whether DOM listeners have been added.
|
||
*
|
||
* @private {boolean}
|
||
*/
|
||
this.connected_ = false;
|
||
/**
|
||
* Tells that controller has subscribed for Mutation Events.
|
||
*
|
||
* @private {boolean}
|
||
*/
|
||
this.mutationEventsAdded_ = false;
|
||
/**
|
||
* Keeps reference to the instance of MutationObserver.
|
||
*
|
||
* @private {MutationObserver}
|
||
*/
|
||
this.mutationsObserver_ = null;
|
||
/**
|
||
* A list of connected observers.
|
||
*
|
||
* @private {Array<ResizeObserverSPI>}
|
||
*/
|
||
this.observers_ = [];
|
||
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
|
||
this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
|
||
}
|
||
/**
|
||
* Adds observer to observers list.
|
||
*
|
||
* @param {ResizeObserverSPI} observer - Observer to be added.
|
||
* @returns {void}
|
||
*/
|
||
ResizeObserverController.prototype.addObserver = function (observer) {
|
||
if (!~this.observers_.indexOf(observer)) {
|
||
this.observers_.push(observer);
|
||
}
|
||
// Add listeners if they haven't been added yet.
|
||
if (!this.connected_) {
|
||
this.connect_();
|
||
}
|
||
};
|
||
/**
|
||
* Removes observer from observers list.
|
||
*
|
||
* @param {ResizeObserverSPI} observer - Observer to be removed.
|
||
* @returns {void}
|
||
*/
|
||
ResizeObserverController.prototype.removeObserver = function (observer) {
|
||
var observers = this.observers_;
|
||
var index = observers.indexOf(observer);
|
||
// Remove observer if it's present in registry.
|
||
if (~index) {
|
||
observers.splice(index, 1);
|
||
}
|
||
// Remove listeners if controller has no connected observers.
|
||
if (!observers.length && this.connected_) {
|
||
this.disconnect_();
|
||
}
|
||
};
|
||
/**
|
||
* Invokes the update of observers. It will continue running updates insofar
|
||
* it detects changes.
|
||
*
|
||
* @returns {void}
|
||
*/
|
||
ResizeObserverController.prototype.refresh = function () {
|
||
var changesDetected = this.updateObservers_();
|
||
// Continue running updates if changes have been detected as there might
|
||
// be future ones caused by CSS transitions.
|
||
if (changesDetected) {
|
||
this.refresh();
|
||
}
|
||
};
|
||
/**
|
||
* Updates every observer from observers list and notifies them of queued
|
||
* entries.
|
||
*
|
||
* @private
|
||
* @returns {boolean} Returns "true" if any observer has detected changes in
|
||
* dimensions of it's elements.
|
||
*/
|
||
ResizeObserverController.prototype.updateObservers_ = function () {
|
||
// Collect observers that have active observations.
|
||
var activeObservers = this.observers_.filter(function (observer) {
|
||
return observer.gatherActive(), observer.hasActive();
|
||
});
|
||
// Deliver notifications in a separate cycle in order to avoid any
|
||
// collisions between observers, e.g. when multiple instances of
|
||
// ResizeObserver are tracking the same element and the callback of one
|
||
// of them changes content dimensions of the observed target. Sometimes
|
||
// this may result in notifications being blocked for the rest of observers.
|
||
activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
|
||
return activeObservers.length > 0;
|
||
};
|
||
/**
|
||
* Initializes DOM listeners.
|
||
*
|
||
* @private
|
||
* @returns {void}
|
||
*/
|
||
ResizeObserverController.prototype.connect_ = function () {
|
||
// Do nothing if running in a non-browser environment or if listeners
|
||
// have been already added.
|
||
if (!isBrowser || this.connected_) {
|
||
return;
|
||
}
|
||
// Subscription to the "Transitionend" event is used as a workaround for
|
||
// delayed transitions. This way it's possible to capture at least the
|
||
// final state of an element.
|
||
document.addEventListener('transitionend', this.onTransitionEnd_);
|
||
window.addEventListener('resize', this.refresh);
|
||
if (mutationObserverSupported) {
|
||
this.mutationsObserver_ = new MutationObserver(this.refresh);
|
||
this.mutationsObserver_.observe(document, {
|
||
attributes: true,
|
||
childList: true,
|
||
characterData: true,
|
||
subtree: true
|
||
});
|
||
}
|
||
else {
|
||
document.addEventListener('DOMSubtreeModified', this.refresh);
|
||
this.mutationEventsAdded_ = true;
|
||
}
|
||
this.connected_ = true;
|
||
};
|
||
/**
|
||
* Removes DOM listeners.
|
||
*
|
||
* @private
|
||
* @returns {void}
|
||
*/
|
||
ResizeObserverController.prototype.disconnect_ = function () {
|
||
// Do nothing if running in a non-browser environment or if listeners
|
||
// have been already removed.
|
||
if (!isBrowser || !this.connected_) {
|
||
return;
|
||
}
|
||
document.removeEventListener('transitionend', this.onTransitionEnd_);
|
||
window.removeEventListener('resize', this.refresh);
|
||
if (this.mutationsObserver_) {
|
||
this.mutationsObserver_.disconnect();
|
||
}
|
||
if (this.mutationEventsAdded_) {
|
||
document.removeEventListener('DOMSubtreeModified', this.refresh);
|
||
}
|
||
this.mutationsObserver_ = null;
|
||
this.mutationEventsAdded_ = false;
|
||
this.connected_ = false;
|
||
};
|
||
/**
|
||
* "Transitionend" event handler.
|
||
*
|
||
* @private
|
||
* @param {TransitionEvent} event
|
||
* @returns {void}
|
||
*/
|
||
ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
|
||
var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
|
||
// Detect whether transition may affect dimensions of an element.
|
||
var isReflowProperty = transitionKeys.some(function (key) {
|
||
return !!~propertyName.indexOf(key);
|
||
});
|
||
if (isReflowProperty) {
|
||
this.refresh();
|
||
}
|
||
};
|
||
/**
|
||
* Returns instance of the ResizeObserverController.
|
||
*
|
||
* @returns {ResizeObserverController}
|
||
*/
|
||
ResizeObserverController.getInstance = function () {
|
||
if (!this.instance_) {
|
||
this.instance_ = new ResizeObserverController();
|
||
}
|
||
return this.instance_;
|
||
};
|
||
/**
|
||
* Holds reference to the controller's instance.
|
||
*
|
||
* @private {ResizeObserverController}
|
||
*/
|
||
ResizeObserverController.instance_ = null;
|
||
return ResizeObserverController;
|
||
}());
|
||
|
||
/**
|
||
* Defines non-writable/enumerable properties of the provided target object.
|
||
*
|
||
* @param {Object} target - Object for which to define properties.
|
||
* @param {Object} props - Properties to be defined.
|
||
* @returns {Object} Target object.
|
||
*/
|
||
var defineConfigurable = (function (target, props) {
|
||
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
|
||
var key = _a[_i];
|
||
Object.defineProperty(target, key, {
|
||
value: props[key],
|
||
enumerable: false,
|
||
writable: false,
|
||
configurable: true
|
||
});
|
||
}
|
||
return target;
|
||
});
|
||
|
||
/**
|
||
* Returns the global object associated with provided element.
|
||
*
|
||
* @param {Object} target
|
||
* @returns {Object}
|
||
*/
|
||
var getWindowOf = (function (target) {
|
||
// Assume that the element is an instance of Node, which means that it
|
||
// has the "ownerDocument" property from which we can retrieve a
|
||
// corresponding global object.
|
||
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
|
||
// Return the local global object if it's not possible extract one from
|
||
// provided element.
|
||
return ownerGlobal || global$1;
|
||
});
|
||
|
||
// Placeholder of an empty content rectangle.
|
||
var emptyRect = createRectInit(0, 0, 0, 0);
|
||
/**
|
||
* Converts provided string to a number.
|
||
*
|
||
* @param {number|string} value
|
||
* @returns {number}
|
||
*/
|
||
function toFloat(value) {
|
||
return parseFloat(value) || 0;
|
||
}
|
||
/**
|
||
* Extracts borders size from provided styles.
|
||
*
|
||
* @param {CSSStyleDeclaration} styles
|
||
* @param {...string} positions - Borders positions (top, right, ...)
|
||
* @returns {number}
|
||
*/
|
||
function getBordersSize(styles) {
|
||
var positions = [];
|
||
for (var _i = 1; _i < arguments.length; _i++) {
|
||
positions[_i - 1] = arguments[_i];
|
||
}
|
||
return positions.reduce(function (size, position) {
|
||
var value = styles['border-' + position + '-width'];
|
||
return size + toFloat(value);
|
||
}, 0);
|
||
}
|
||
/**
|
||
* Extracts paddings sizes from provided styles.
|
||
*
|
||
* @param {CSSStyleDeclaration} styles
|
||
* @returns {Object} Paddings box.
|
||
*/
|
||
function getPaddings(styles) {
|
||
var positions = ['top', 'right', 'bottom', 'left'];
|
||
var paddings = {};
|
||
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
||
var position = positions_1[_i];
|
||
var value = styles['padding-' + position];
|
||
paddings[position] = toFloat(value);
|
||
}
|
||
return paddings;
|
||
}
|
||
/**
|
||
* Calculates content rectangle of provided SVG element.
|
||
*
|
||
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
|
||
* to be calculated.
|
||
* @returns {DOMRectInit}
|
||
*/
|
||
function getSVGContentRect(target) {
|
||
var bbox = target.getBBox();
|
||
return createRectInit(0, 0, bbox.width, bbox.height);
|
||
}
|
||
/**
|
||
* Calculates content rectangle of provided HTMLElement.
|
||
*
|
||
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
|
||
* @returns {DOMRectInit}
|
||
*/
|
||
function getHTMLElementContentRect(target) {
|
||
// Client width & height properties can't be
|
||
// used exclusively as they provide rounded values.
|
||
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
|
||
// By this condition we can catch all non-replaced inline, hidden and
|
||
// detached elements. Though elements with width & height properties less
|
||
// than 0.5 will be discarded as well.
|
||
//
|
||
// Without it we would need to implement separate methods for each of
|
||
// those cases and it's not possible to perform a precise and performance
|
||
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
|
||
// gives wrong results for elements with width & height less than 0.5.
|
||
if (!clientWidth && !clientHeight) {
|
||
return emptyRect;
|
||
}
|
||
var styles = getWindowOf(target).getComputedStyle(target);
|
||
var paddings = getPaddings(styles);
|
||
var horizPad = paddings.left + paddings.right;
|
||
var vertPad = paddings.top + paddings.bottom;
|
||
// Computed styles of width & height are being used because they are the
|
||
// only dimensions available to JS that contain non-rounded values. It could
|
||
// be possible to utilize the getBoundingClientRect if only it's data wasn't
|
||
// affected by CSS transformations let alone paddings, borders and scroll bars.
|
||
var width = toFloat(styles.width), height = toFloat(styles.height);
|
||
// Width & height include paddings and borders when the 'border-box' box
|
||
// model is applied (except for IE).
|
||
if (styles.boxSizing === 'border-box') {
|
||
// Following conditions are required to handle Internet Explorer which
|
||
// doesn't include paddings and borders to computed CSS dimensions.
|
||
//
|
||
// We can say that if CSS dimensions + paddings are equal to the "client"
|
||
// properties then it's either IE, and thus we don't need to subtract
|
||
// anything, or an element merely doesn't have paddings/borders styles.
|
||
if (Math.round(width + horizPad) !== clientWidth) {
|
||
width -= getBordersSize(styles, 'left', 'right') + horizPad;
|
||
}
|
||
if (Math.round(height + vertPad) !== clientHeight) {
|
||
height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
|
||
}
|
||
}
|
||
// Following steps can't be applied to the document's root element as its
|
||
// client[Width/Height] properties represent viewport area of the window.
|
||
// Besides, it's as well not necessary as the <html> itself neither has
|
||
// rendered scroll bars nor it can be clipped.
|
||
if (!isDocumentElement(target)) {
|
||
// In some browsers (only in Firefox, actually) CSS width & height
|
||
// include scroll bars size which can be removed at this step as scroll
|
||
// bars are the only difference between rounded dimensions + paddings
|
||
// and "client" properties, though that is not always true in Chrome.
|
||
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
|
||
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
|
||
// Chrome has a rather weird rounding of "client" properties.
|
||
// E.g. for an element with content width of 314.2px it sometimes gives
|
||
// the client width of 315px and for the width of 314.7px it may give
|
||
// 314px. And it doesn't happen all the time. So just ignore this delta
|
||
// as a non-relevant.
|
||
if (Math.abs(vertScrollbar) !== 1) {
|
||
width -= vertScrollbar;
|
||
}
|
||
if (Math.abs(horizScrollbar) !== 1) {
|
||
height -= horizScrollbar;
|
||
}
|
||
}
|
||
return createRectInit(paddings.left, paddings.top, width, height);
|
||
}
|
||
/**
|
||
* Checks whether provided element is an instance of the SVGGraphicsElement.
|
||
*
|
||
* @param {Element} target - Element to be checked.
|
||
* @returns {boolean}
|
||
*/
|
||
var isSVGGraphicsElement = (function () {
|
||
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
|
||
// interface.
|
||
if (typeof SVGGraphicsElement !== 'undefined') {
|
||
return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
|
||
}
|
||
// If it's so, then check that element is at least an instance of the
|
||
// SVGElement and that it has the "getBBox" method.
|
||
// eslint-disable-next-line no-extra-parens
|
||
return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
|
||
typeof target.getBBox === 'function'); };
|
||
})();
|
||
/**
|
||
* Checks whether provided element is a document element (<html>).
|
||
*
|
||
* @param {Element} target - Element to be checked.
|
||
* @returns {boolean}
|
||
*/
|
||
function isDocumentElement(target) {
|
||
return target === getWindowOf(target).document.documentElement;
|
||
}
|
||
/**
|
||
* Calculates an appropriate content rectangle for provided html or svg element.
|
||
*
|
||
* @param {Element} target - Element content rectangle of which needs to be calculated.
|
||
* @returns {DOMRectInit}
|
||
*/
|
||
function getContentRect(target) {
|
||
if (!isBrowser) {
|
||
return emptyRect;
|
||
}
|
||
if (isSVGGraphicsElement(target)) {
|
||
return getSVGContentRect(target);
|
||
}
|
||
return getHTMLElementContentRect(target);
|
||
}
|
||
/**
|
||
* Creates rectangle with an interface of the DOMRectReadOnly.
|
||
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
|
||
*
|
||
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
|
||
* @returns {DOMRectReadOnly}
|
||
*/
|
||
function createReadOnlyRect(_a) {
|
||
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
||
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
|
||
var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
|
||
var rect = Object.create(Constr.prototype);
|
||
// Rectangle's properties are not writable and non-enumerable.
|
||
defineConfigurable(rect, {
|
||
x: x, y: y, width: width, height: height,
|
||
top: y,
|
||
right: x + width,
|
||
bottom: height + y,
|
||
left: x
|
||
});
|
||
return rect;
|
||
}
|
||
/**
|
||
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
|
||
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
|
||
*
|
||
* @param {number} x - X coordinate.
|
||
* @param {number} y - Y coordinate.
|
||
* @param {number} width - Rectangle's width.
|
||
* @param {number} height - Rectangle's height.
|
||
* @returns {DOMRectInit}
|
||
*/
|
||
function createRectInit(x, y, width, height) {
|
||
return { x: x, y: y, width: width, height: height };
|
||
}
|
||
|
||
/**
|
||
* Class that is responsible for computations of the content rectangle of
|
||
* provided DOM element and for keeping track of it's changes.
|
||
*/
|
||
var ResizeObservation = /** @class */ (function () {
|
||
/**
|
||
* Creates an instance of ResizeObservation.
|
||
*
|
||
* @param {Element} target - Element to be observed.
|
||
*/
|
||
function ResizeObservation(target) {
|
||
/**
|
||
* Broadcasted width of content rectangle.
|
||
*
|
||
* @type {number}
|
||
*/
|
||
this.broadcastWidth = 0;
|
||
/**
|
||
* Broadcasted height of content rectangle.
|
||
*
|
||
* @type {number}
|
||
*/
|
||
this.broadcastHeight = 0;
|
||
/**
|
||
* Reference to the last observed content rectangle.
|
||
*
|
||
* @private {DOMRectInit}
|
||
*/
|
||
this.contentRect_ = createRectInit(0, 0, 0, 0);
|
||
this.target = target;
|
||
}
|
||
/**
|
||
* Updates content rectangle and tells whether it's width or height properties
|
||
* have changed since the last broadcast.
|
||
*
|
||
* @returns {boolean}
|
||
*/
|
||
ResizeObservation.prototype.isActive = function () {
|
||
var rect = getContentRect(this.target);
|
||
this.contentRect_ = rect;
|
||
return (rect.width !== this.broadcastWidth ||
|
||
rect.height !== this.broadcastHeight);
|
||
};
|
||
/**
|
||
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
|
||
* from the corresponding properties of the last observed content rectangle.
|
||
*
|
||
* @returns {DOMRectInit} Last observed content rectangle.
|
||
*/
|
||
ResizeObservation.prototype.broadcastRect = function () {
|
||
var rect = this.contentRect_;
|
||
this.broadcastWidth = rect.width;
|
||
this.broadcastHeight = rect.height;
|
||
return rect;
|
||
};
|
||
return ResizeObservation;
|
||
}());
|
||
|
||
var ResizeObserverEntry = /** @class */ (function () {
|
||
/**
|
||
* Creates an instance of ResizeObserverEntry.
|
||
*
|
||
* @param {Element} target - Element that is being observed.
|
||
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
|
||
*/
|
||
function ResizeObserverEntry(target, rectInit) {
|
||
var contentRect = createReadOnlyRect(rectInit);
|
||
// According to the specification following properties are not writable
|
||
// and are also not enumerable in the native implementation.
|
||
//
|
||
// Property accessors are not being used as they'd require to define a
|
||
// private WeakMap storage which may cause memory leaks in browsers that
|
||
// don't support this type of collections.
|
||
defineConfigurable(this, { target: target, contentRect: contentRect });
|
||
}
|
||
return ResizeObserverEntry;
|
||
}());
|
||
|
||
var ResizeObserverSPI = /** @class */ (function () {
|
||
/**
|
||
* Creates a new instance of ResizeObserver.
|
||
*
|
||
* @param {ResizeObserverCallback} callback - Callback function that is invoked
|
||
* when one of the observed elements changes it's content dimensions.
|
||
* @param {ResizeObserverController} controller - Controller instance which
|
||
* is responsible for the updates of observer.
|
||
* @param {ResizeObserver} callbackCtx - Reference to the public
|
||
* ResizeObserver instance which will be passed to callback function.
|
||
*/
|
||
function ResizeObserverSPI(callback, controller, callbackCtx) {
|
||
/**
|
||
* Collection of resize observations that have detected changes in dimensions
|
||
* of elements.
|
||
*
|
||
* @private {Array<ResizeObservation>}
|
||
*/
|
||
this.activeObservations_ = [];
|
||
/**
|
||
* Registry of the ResizeObservation instances.
|
||
*
|
||
* @private {Map<Element, ResizeObservation>}
|
||
*/
|
||
this.observations_ = new MapShim();
|
||
if (typeof callback !== 'function') {
|
||
throw new TypeError('The callback provided as parameter 1 is not a function.');
|
||
}
|
||
this.callback_ = callback;
|
||
this.controller_ = controller;
|
||
this.callbackCtx_ = callbackCtx;
|
||
}
|
||
/**
|
||
* Starts observing provided element.
|
||
*
|
||
* @param {Element} target - Element to be observed.
|
||
* @returns {void}
|
||
*/
|
||
ResizeObserverSPI.prototype.observe = function (target) {
|
||
if (!arguments.length) {
|
||
throw new TypeError('1 argument required, but only 0 present.');
|
||
}
|
||
// Do nothing if current environment doesn't have the Element interface.
|
||
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
||
return;
|
||
}
|
||
if (!(target instanceof getWindowOf(target).Element)) {
|
||
throw new TypeError('parameter 1 is not of type "Element".');
|
||
}
|
||
var observations = this.observations_;
|
||
// Do nothing if element is already being observed.
|
||
if (observations.has(target)) {
|
||
return;
|
||
}
|
||
observations.set(target, new ResizeObservation(target));
|
||
this.controller_.addObserver(this);
|
||
// Force the update of observations.
|
||
this.controller_.refresh();
|
||
};
|
||
/**
|
||
* Stops observing provided element.
|
||
*
|
||
* @param {Element} target - Element to stop observing.
|
||
* @returns {void}
|
||
*/
|
||
ResizeObserverSPI.prototype.unobserve = function (target) {
|
||
if (!arguments.length) {
|
||
throw new TypeError('1 argument required, but only 0 present.');
|
||
}
|
||
// Do nothing if current environment doesn't have the Element interface.
|
||
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
||
return;
|
||
}
|
||
if (!(target instanceof getWindowOf(target).Element)) {
|
||
throw new TypeError('parameter 1 is not of type "Element".');
|
||
}
|
||
var observations = this.observations_;
|
||
// Do nothing if element is not being observed.
|
||
if (!observations.has(target)) {
|
||
return;
|
||
}
|
||
observations.delete(target);
|
||
if (!observations.size) {
|
||
this.controller_.removeObserver(this);
|
||
}
|
||
};
|
||
/**
|
||
* Stops observing all elements.
|
||
*
|
||
* @returns {void}
|
||
*/
|
||
ResizeObserverSPI.prototype.disconnect = function () {
|
||
this.clearActive();
|
||
this.observations_.clear();
|
||
this.controller_.removeObserver(this);
|
||
};
|
||
/**
|
||
* Collects observation instances the associated element of which has changed
|
||
* it's content rectangle.
|
||
*
|
||
* @returns {void}
|
||
*/
|
||
ResizeObserverSPI.prototype.gatherActive = function () {
|
||
var _this = this;
|
||
this.clearActive();
|
||
this.observations_.forEach(function (observation) {
|
||
if (observation.isActive()) {
|
||
_this.activeObservations_.push(observation);
|
||
}
|
||
});
|
||
};
|
||
/**
|
||
* Invokes initial callback function with a list of ResizeObserverEntry
|
||
* instances collected from active resize observations.
|
||
*
|
||
* @returns {void}
|
||
*/
|
||
ResizeObserverSPI.prototype.broadcastActive = function () {
|
||
// Do nothing if observer doesn't have active observations.
|
||
if (!this.hasActive()) {
|
||
return;
|
||
}
|
||
var ctx = this.callbackCtx_;
|
||
// Create ResizeObserverEntry instance for every active observation.
|
||
var entries = this.activeObservations_.map(function (observation) {
|
||
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
|
||
});
|
||
this.callback_.call(ctx, entries, ctx);
|
||
this.clearActive();
|
||
};
|
||
/**
|
||
* Clears the collection of active observations.
|
||
*
|
||
* @returns {void}
|
||
*/
|
||
ResizeObserverSPI.prototype.clearActive = function () {
|
||
this.activeObservations_.splice(0);
|
||
};
|
||
/**
|
||
* Tells whether observer has active observations.
|
||
*
|
||
* @returns {boolean}
|
||
*/
|
||
ResizeObserverSPI.prototype.hasActive = function () {
|
||
return this.activeObservations_.length > 0;
|
||
};
|
||
return ResizeObserverSPI;
|
||
}());
|
||
|
||
// Registry of internal observers. If WeakMap is not available use current shim
|
||
// for the Map collection as it has all required methods and because WeakMap
|
||
// can't be fully polyfilled anyway.
|
||
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
|
||
/**
|
||
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
|
||
* exposing only those methods and properties that are defined in the spec.
|
||
*/
|
||
var ResizeObserver = /** @class */ (function () {
|
||
/**
|
||
* Creates a new instance of ResizeObserver.
|
||
*
|
||
* @param {ResizeObserverCallback} callback - Callback that is invoked when
|
||
* dimensions of the observed elements change.
|
||
*/
|
||
function ResizeObserver(callback) {
|
||
if (!(this instanceof ResizeObserver)) {
|
||
throw new TypeError('Cannot call a class as a function.');
|
||
}
|
||
if (!arguments.length) {
|
||
throw new TypeError('1 argument required, but only 0 present.');
|
||
}
|
||
var controller = ResizeObserverController.getInstance();
|
||
var observer = new ResizeObserverSPI(callback, controller, this);
|
||
observers.set(this, observer);
|
||
}
|
||
return ResizeObserver;
|
||
}());
|
||
// Expose public methods of ResizeObserver.
|
||
[
|
||
'observe',
|
||
'unobserve',
|
||
'disconnect'
|
||
].forEach(function (method) {
|
||
ResizeObserver.prototype[method] = function () {
|
||
var _a;
|
||
return (_a = observers.get(this))[method].apply(_a, arguments);
|
||
};
|
||
});
|
||
|
||
var index = (function () {
|
||
// Export existing implementation if available.
|
||
if (typeof global$1.ResizeObserver !== 'undefined') {
|
||
return global$1.ResizeObserver;
|
||
}
|
||
return ResizeObserver;
|
||
})();
|
||
|
||
/* harmony default export */ __webpack_exports__["default"] = (index);
|
||
|
||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/scheduler/cjs/scheduler-tracing.development.js":
|
||
/*!*********************************************************************!*\
|
||
!*** ./node_modules/scheduler/cjs/scheduler-tracing.development.js ***!
|
||
\*********************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/** @license React v0.12.0
|
||
* scheduler-tracing.development.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
if (true) {
|
||
(function() {
|
||
'use strict';
|
||
|
||
Object.defineProperty(exports, '__esModule', { value: true });
|
||
|
||
// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
|
||
|
||
|
||
// In some cases, StrictMode should also double-render lifecycles.
|
||
// This can be confusing for tests though,
|
||
// And it can be bad for performance in production.
|
||
// This feature flag can be used to control the behavior:
|
||
|
||
|
||
// To preserve the "Pause on caught exceptions" behavior of the debugger, we
|
||
// replay the begin phase of a failed component inside invokeGuardedCallback.
|
||
|
||
|
||
// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
|
||
|
||
|
||
// Gather advanced timing metrics for Profiler subtrees.
|
||
|
||
|
||
// Trace which interactions trigger each commit.
|
||
var enableSchedulerTracing = true;
|
||
|
||
// Only used in www builds.
|
||
// TODO: true? Here it might just be false.
|
||
|
||
// Only used in www builds.
|
||
|
||
|
||
// Only used in www builds.
|
||
|
||
|
||
// React Fire: prevent the value and checked attributes from syncing
|
||
// with their related DOM properties
|
||
|
||
|
||
// These APIs will no longer be "unstable" in the upcoming 16.7 release,
|
||
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
|
||
|
||
var DEFAULT_THREAD_ID = 0;
|
||
|
||
// Counters used to generate unique IDs.
|
||
var interactionIDCounter = 0;
|
||
var threadIDCounter = 0;
|
||
|
||
// Set of currently traced interactions.
|
||
// Interactions "stack"–
|
||
// Meaning that newly traced interactions are appended to the previously active set.
|
||
// When an interaction goes out of scope, the previous set (if any) is restored.
|
||
exports.__interactionsRef = null;
|
||
|
||
// Listener(s) to notify when interactions begin and end.
|
||
exports.__subscriberRef = null;
|
||
|
||
if (enableSchedulerTracing) {
|
||
exports.__interactionsRef = {
|
||
current: new Set()
|
||
};
|
||
exports.__subscriberRef = {
|
||
current: null
|
||
};
|
||
}
|
||
|
||
function unstable_clear(callback) {
|
||
if (!enableSchedulerTracing) {
|
||
return callback();
|
||
}
|
||
|
||
var prevInteractions = exports.__interactionsRef.current;
|
||
exports.__interactionsRef.current = new Set();
|
||
|
||
try {
|
||
return callback();
|
||
} finally {
|
||
exports.__interactionsRef.current = prevInteractions;
|
||
}
|
||
}
|
||
|
||
function unstable_getCurrent() {
|
||
if (!enableSchedulerTracing) {
|
||
return null;
|
||
} else {
|
||
return exports.__interactionsRef.current;
|
||
}
|
||
}
|
||
|
||
function unstable_getThreadID() {
|
||
return ++threadIDCounter;
|
||
}
|
||
|
||
function unstable_trace(name, timestamp, callback) {
|
||
var threadID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;
|
||
|
||
if (!enableSchedulerTracing) {
|
||
return callback();
|
||
}
|
||
|
||
var interaction = {
|
||
__count: 1,
|
||
id: interactionIDCounter++,
|
||
name: name,
|
||
timestamp: timestamp
|
||
};
|
||
|
||
var prevInteractions = exports.__interactionsRef.current;
|
||
|
||
// Traced interactions should stack/accumulate.
|
||
// To do that, clone the current interactions.
|
||
// The previous set will be restored upon completion.
|
||
var interactions = new Set(prevInteractions);
|
||
interactions.add(interaction);
|
||
exports.__interactionsRef.current = interactions;
|
||
|
||
var subscriber = exports.__subscriberRef.current;
|
||
var returnValue = void 0;
|
||
|
||
try {
|
||
if (subscriber !== null) {
|
||
subscriber.onInteractionTraced(interaction);
|
||
}
|
||
} finally {
|
||
try {
|
||
if (subscriber !== null) {
|
||
subscriber.onWorkStarted(interactions, threadID);
|
||
}
|
||
} finally {
|
||
try {
|
||
returnValue = callback();
|
||
} finally {
|
||
exports.__interactionsRef.current = prevInteractions;
|
||
|
||
try {
|
||
if (subscriber !== null) {
|
||
subscriber.onWorkStopped(interactions, threadID);
|
||
}
|
||
} finally {
|
||
interaction.__count--;
|
||
|
||
// If no async work was scheduled for this interaction,
|
||
// Notify subscribers that it's completed.
|
||
if (subscriber !== null && interaction.__count === 0) {
|
||
subscriber.onInteractionScheduledWorkCompleted(interaction);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
return returnValue;
|
||
}
|
||
|
||
function unstable_wrap(callback) {
|
||
var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;
|
||
|
||
if (!enableSchedulerTracing) {
|
||
return callback;
|
||
}
|
||
|
||
var wrappedInteractions = exports.__interactionsRef.current;
|
||
|
||
var subscriber = exports.__subscriberRef.current;
|
||
if (subscriber !== null) {
|
||
subscriber.onWorkScheduled(wrappedInteractions, threadID);
|
||
}
|
||
|
||
// Update the pending async work count for the current interactions.
|
||
// Update after calling subscribers in case of error.
|
||
wrappedInteractions.forEach(function (interaction) {
|
||
interaction.__count++;
|
||
});
|
||
|
||
var hasRun = false;
|
||
|
||
function wrapped() {
|
||
var prevInteractions = exports.__interactionsRef.current;
|
||
exports.__interactionsRef.current = wrappedInteractions;
|
||
|
||
subscriber = exports.__subscriberRef.current;
|
||
|
||
try {
|
||
var returnValue = void 0;
|
||
|
||
try {
|
||
if (subscriber !== null) {
|
||
subscriber.onWorkStarted(wrappedInteractions, threadID);
|
||
}
|
||
} finally {
|
||
try {
|
||
returnValue = callback.apply(undefined, arguments);
|
||
} finally {
|
||
exports.__interactionsRef.current = prevInteractions;
|
||
|
||
if (subscriber !== null) {
|
||
subscriber.onWorkStopped(wrappedInteractions, threadID);
|
||
}
|
||
}
|
||
}
|
||
|
||
return returnValue;
|
||
} finally {
|
||
if (!hasRun) {
|
||
// We only expect a wrapped function to be executed once,
|
||
// But in the event that it's executed more than once–
|
||
// Only decrement the outstanding interaction counts once.
|
||
hasRun = true;
|
||
|
||
// Update pending async counts for all wrapped interactions.
|
||
// If this was the last scheduled async work for any of them,
|
||
// Mark them as completed.
|
||
wrappedInteractions.forEach(function (interaction) {
|
||
interaction.__count--;
|
||
|
||
if (subscriber !== null && interaction.__count === 0) {
|
||
subscriber.onInteractionScheduledWorkCompleted(interaction);
|
||
}
|
||
});
|
||
}
|
||
}
|
||
}
|
||
|
||
wrapped.cancel = function cancel() {
|
||
subscriber = exports.__subscriberRef.current;
|
||
|
||
try {
|
||
if (subscriber !== null) {
|
||
subscriber.onWorkCanceled(wrappedInteractions, threadID);
|
||
}
|
||
} finally {
|
||
// Update pending async counts for all wrapped interactions.
|
||
// If this was the last scheduled async work for any of them,
|
||
// Mark them as completed.
|
||
wrappedInteractions.forEach(function (interaction) {
|
||
interaction.__count--;
|
||
|
||
if (subscriber && interaction.__count === 0) {
|
||
subscriber.onInteractionScheduledWorkCompleted(interaction);
|
||
}
|
||
});
|
||
}
|
||
};
|
||
|
||
return wrapped;
|
||
}
|
||
|
||
var subscribers = null;
|
||
if (enableSchedulerTracing) {
|
||
subscribers = new Set();
|
||
}
|
||
|
||
function unstable_subscribe(subscriber) {
|
||
if (enableSchedulerTracing) {
|
||
subscribers.add(subscriber);
|
||
|
||
if (subscribers.size === 1) {
|
||
exports.__subscriberRef.current = {
|
||
onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,
|
||
onInteractionTraced: onInteractionTraced,
|
||
onWorkCanceled: onWorkCanceled,
|
||
onWorkScheduled: onWorkScheduled,
|
||
onWorkStarted: onWorkStarted,
|
||
onWorkStopped: onWorkStopped
|
||
};
|
||
}
|
||
}
|
||
}
|
||
|
||
function unstable_unsubscribe(subscriber) {
|
||
if (enableSchedulerTracing) {
|
||
subscribers.delete(subscriber);
|
||
|
||
if (subscribers.size === 0) {
|
||
exports.__subscriberRef.current = null;
|
||
}
|
||
}
|
||
}
|
||
|
||
function onInteractionTraced(interaction) {
|
||
var didCatchError = false;
|
||
var caughtError = null;
|
||
|
||
subscribers.forEach(function (subscriber) {
|
||
try {
|
||
subscriber.onInteractionTraced(interaction);
|
||
} catch (error) {
|
||
if (!didCatchError) {
|
||
didCatchError = true;
|
||
caughtError = error;
|
||
}
|
||
}
|
||
});
|
||
|
||
if (didCatchError) {
|
||
throw caughtError;
|
||
}
|
||
}
|
||
|
||
function onInteractionScheduledWorkCompleted(interaction) {
|
||
var didCatchError = false;
|
||
var caughtError = null;
|
||
|
||
subscribers.forEach(function (subscriber) {
|
||
try {
|
||
subscriber.onInteractionScheduledWorkCompleted(interaction);
|
||
} catch (error) {
|
||
if (!didCatchError) {
|
||
didCatchError = true;
|
||
caughtError = error;
|
||
}
|
||
}
|
||
});
|
||
|
||
if (didCatchError) {
|
||
throw caughtError;
|
||
}
|
||
}
|
||
|
||
function onWorkScheduled(interactions, threadID) {
|
||
var didCatchError = false;
|
||
var caughtError = null;
|
||
|
||
subscribers.forEach(function (subscriber) {
|
||
try {
|
||
subscriber.onWorkScheduled(interactions, threadID);
|
||
} catch (error) {
|
||
if (!didCatchError) {
|
||
didCatchError = true;
|
||
caughtError = error;
|
||
}
|
||
}
|
||
});
|
||
|
||
if (didCatchError) {
|
||
throw caughtError;
|
||
}
|
||
}
|
||
|
||
function onWorkStarted(interactions, threadID) {
|
||
var didCatchError = false;
|
||
var caughtError = null;
|
||
|
||
subscribers.forEach(function (subscriber) {
|
||
try {
|
||
subscriber.onWorkStarted(interactions, threadID);
|
||
} catch (error) {
|
||
if (!didCatchError) {
|
||
didCatchError = true;
|
||
caughtError = error;
|
||
}
|
||
}
|
||
});
|
||
|
||
if (didCatchError) {
|
||
throw caughtError;
|
||
}
|
||
}
|
||
|
||
function onWorkStopped(interactions, threadID) {
|
||
var didCatchError = false;
|
||
var caughtError = null;
|
||
|
||
subscribers.forEach(function (subscriber) {
|
||
try {
|
||
subscriber.onWorkStopped(interactions, threadID);
|
||
} catch (error) {
|
||
if (!didCatchError) {
|
||
didCatchError = true;
|
||
caughtError = error;
|
||
}
|
||
}
|
||
});
|
||
|
||
if (didCatchError) {
|
||
throw caughtError;
|
||
}
|
||
}
|
||
|
||
function onWorkCanceled(interactions, threadID) {
|
||
var didCatchError = false;
|
||
var caughtError = null;
|
||
|
||
subscribers.forEach(function (subscriber) {
|
||
try {
|
||
subscriber.onWorkCanceled(interactions, threadID);
|
||
} catch (error) {
|
||
if (!didCatchError) {
|
||
didCatchError = true;
|
||
caughtError = error;
|
||
}
|
||
}
|
||
});
|
||
|
||
if (didCatchError) {
|
||
throw caughtError;
|
||
}
|
||
}
|
||
|
||
exports.unstable_clear = unstable_clear;
|
||
exports.unstable_getCurrent = unstable_getCurrent;
|
||
exports.unstable_getThreadID = unstable_getThreadID;
|
||
exports.unstable_trace = unstable_trace;
|
||
exports.unstable_wrap = unstable_wrap;
|
||
exports.unstable_subscribe = unstable_subscribe;
|
||
exports.unstable_unsubscribe = unstable_unsubscribe;
|
||
})();
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/scheduler/cjs/scheduler.development.js":
|
||
/*!*************************************************************!*\
|
||
!*** ./node_modules/scheduler/cjs/scheduler.development.js ***!
|
||
\*************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/* WEBPACK VAR INJECTION */(function(global) {/** @license React v0.12.0
|
||
* scheduler.development.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
if (true) {
|
||
(function() {
|
||
'use strict';
|
||
|
||
Object.defineProperty(exports, '__esModule', { value: true });
|
||
|
||
// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
|
||
|
||
|
||
// In some cases, StrictMode should also double-render lifecycles.
|
||
// This can be confusing for tests though,
|
||
// And it can be bad for performance in production.
|
||
// This feature flag can be used to control the behavior:
|
||
|
||
|
||
// To preserve the "Pause on caught exceptions" behavior of the debugger, we
|
||
// replay the begin phase of a failed component inside invokeGuardedCallback.
|
||
|
||
|
||
// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
|
||
|
||
|
||
// Gather advanced timing metrics for Profiler subtrees.
|
||
|
||
|
||
// Trace which interactions trigger each commit.
|
||
|
||
|
||
// Only used in www builds.
|
||
// TODO: true? Here it might just be false.
|
||
|
||
// Only used in www builds.
|
||
var enableSchedulerDebugging = true;
|
||
|
||
// Only used in www builds.
|
||
|
||
|
||
// React Fire: prevent the value and checked attributes from syncing
|
||
// with their related DOM properties
|
||
|
||
|
||
// These APIs will no longer be "unstable" in the upcoming 16.7 release,
|
||
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
|
||
|
||
/* eslint-disable no-var */
|
||
|
||
// TODO: Use symbols?
|
||
var ImmediatePriority = 1;
|
||
var UserBlockingPriority = 2;
|
||
var NormalPriority = 3;
|
||
var LowPriority = 4;
|
||
var IdlePriority = 5;
|
||
|
||
// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
|
||
// Math.pow(2, 30) - 1
|
||
// 0b111111111111111111111111111111
|
||
var maxSigned31BitInt = 1073741823;
|
||
|
||
// Times out immediately
|
||
var IMMEDIATE_PRIORITY_TIMEOUT = -1;
|
||
// Eventually times out
|
||
var USER_BLOCKING_PRIORITY = 250;
|
||
var NORMAL_PRIORITY_TIMEOUT = 5000;
|
||
var LOW_PRIORITY_TIMEOUT = 10000;
|
||
// Never times out
|
||
var IDLE_PRIORITY = maxSigned31BitInt;
|
||
|
||
// Callbacks are stored as a circular, doubly linked list.
|
||
var firstCallbackNode = null;
|
||
|
||
var currentDidTimeout = false;
|
||
// Pausing the scheduler is useful for debugging.
|
||
var isSchedulerPaused = false;
|
||
|
||
var currentPriorityLevel = NormalPriority;
|
||
var currentEventStartTime = -1;
|
||
var currentExpirationTime = -1;
|
||
|
||
// This is set when a callback is being executed, to prevent re-entrancy.
|
||
var isExecutingCallback = false;
|
||
|
||
var isHostCallbackScheduled = false;
|
||
|
||
var hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
|
||
|
||
function ensureHostCallbackIsScheduled() {
|
||
if (isExecutingCallback) {
|
||
// Don't schedule work yet; wait until the next time we yield.
|
||
return;
|
||
}
|
||
// Schedule the host callback using the earliest expiration in the list.
|
||
var expirationTime = firstCallbackNode.expirationTime;
|
||
if (!isHostCallbackScheduled) {
|
||
isHostCallbackScheduled = true;
|
||
} else {
|
||
// Cancel the existing host callback.
|
||
cancelHostCallback();
|
||
}
|
||
requestHostCallback(flushWork, expirationTime);
|
||
}
|
||
|
||
function flushFirstCallback() {
|
||
var flushedNode = firstCallbackNode;
|
||
|
||
// Remove the node from the list before calling the callback. That way the
|
||
// list is in a consistent state even if the callback throws.
|
||
var next = firstCallbackNode.next;
|
||
if (firstCallbackNode === next) {
|
||
// This is the last callback in the list.
|
||
firstCallbackNode = null;
|
||
next = null;
|
||
} else {
|
||
var lastCallbackNode = firstCallbackNode.previous;
|
||
firstCallbackNode = lastCallbackNode.next = next;
|
||
next.previous = lastCallbackNode;
|
||
}
|
||
|
||
flushedNode.next = flushedNode.previous = null;
|
||
|
||
// Now it's safe to call the callback.
|
||
var callback = flushedNode.callback;
|
||
var expirationTime = flushedNode.expirationTime;
|
||
var priorityLevel = flushedNode.priorityLevel;
|
||
var previousPriorityLevel = currentPriorityLevel;
|
||
var previousExpirationTime = currentExpirationTime;
|
||
currentPriorityLevel = priorityLevel;
|
||
currentExpirationTime = expirationTime;
|
||
var continuationCallback;
|
||
try {
|
||
continuationCallback = callback();
|
||
} finally {
|
||
currentPriorityLevel = previousPriorityLevel;
|
||
currentExpirationTime = previousExpirationTime;
|
||
}
|
||
|
||
// A callback may return a continuation. The continuation should be scheduled
|
||
// with the same priority and expiration as the just-finished callback.
|
||
if (typeof continuationCallback === 'function') {
|
||
var continuationNode = {
|
||
callback: continuationCallback,
|
||
priorityLevel: priorityLevel,
|
||
expirationTime: expirationTime,
|
||
next: null,
|
||
previous: null
|
||
};
|
||
|
||
// Insert the new callback into the list, sorted by its expiration. This is
|
||
// almost the same as the code in `scheduleCallback`, except the callback
|
||
// is inserted into the list *before* callbacks of equal expiration instead
|
||
// of after.
|
||
if (firstCallbackNode === null) {
|
||
// This is the first callback in the list.
|
||
firstCallbackNode = continuationNode.next = continuationNode.previous = continuationNode;
|
||
} else {
|
||
var nextAfterContinuation = null;
|
||
var node = firstCallbackNode;
|
||
do {
|
||
if (node.expirationTime >= expirationTime) {
|
||
// This callback expires at or after the continuation. We will insert
|
||
// the continuation *before* this callback.
|
||
nextAfterContinuation = node;
|
||
break;
|
||
}
|
||
node = node.next;
|
||
} while (node !== firstCallbackNode);
|
||
|
||
if (nextAfterContinuation === null) {
|
||
// No equal or lower priority callback was found, which means the new
|
||
// callback is the lowest priority callback in the list.
|
||
nextAfterContinuation = firstCallbackNode;
|
||
} else if (nextAfterContinuation === firstCallbackNode) {
|
||
// The new callback is the highest priority callback in the list.
|
||
firstCallbackNode = continuationNode;
|
||
ensureHostCallbackIsScheduled();
|
||
}
|
||
|
||
var previous = nextAfterContinuation.previous;
|
||
previous.next = nextAfterContinuation.previous = continuationNode;
|
||
continuationNode.next = nextAfterContinuation;
|
||
continuationNode.previous = previous;
|
||
}
|
||
}
|
||
}
|
||
|
||
function flushImmediateWork() {
|
||
if (
|
||
// Confirm we've exited the outer most event handler
|
||
currentEventStartTime === -1 && firstCallbackNode !== null && firstCallbackNode.priorityLevel === ImmediatePriority) {
|
||
isExecutingCallback = true;
|
||
try {
|
||
do {
|
||
flushFirstCallback();
|
||
} while (
|
||
// Keep flushing until there are no more immediate callbacks
|
||
firstCallbackNode !== null && firstCallbackNode.priorityLevel === ImmediatePriority);
|
||
} finally {
|
||
isExecutingCallback = false;
|
||
if (firstCallbackNode !== null) {
|
||
// There's still work remaining. Request another callback.
|
||
ensureHostCallbackIsScheduled();
|
||
} else {
|
||
isHostCallbackScheduled = false;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
function flushWork(didTimeout) {
|
||
// Exit right away if we're currently paused
|
||
|
||
if (enableSchedulerDebugging && isSchedulerPaused) {
|
||
return;
|
||
}
|
||
|
||
isExecutingCallback = true;
|
||
var previousDidTimeout = currentDidTimeout;
|
||
currentDidTimeout = didTimeout;
|
||
try {
|
||
if (didTimeout) {
|
||
// Flush all the expired callbacks without yielding.
|
||
while (firstCallbackNode !== null && !(enableSchedulerDebugging && isSchedulerPaused)) {
|
||
// TODO Wrap i nfeature flag
|
||
// Read the current time. Flush all the callbacks that expire at or
|
||
// earlier than that time. Then read the current time again and repeat.
|
||
// This optimizes for as few performance.now calls as possible.
|
||
var currentTime = exports.unstable_now();
|
||
if (firstCallbackNode.expirationTime <= currentTime) {
|
||
do {
|
||
flushFirstCallback();
|
||
} while (firstCallbackNode !== null && firstCallbackNode.expirationTime <= currentTime && !(enableSchedulerDebugging && isSchedulerPaused));
|
||
continue;
|
||
}
|
||
break;
|
||
}
|
||
} else {
|
||
// Keep flushing callbacks until we run out of time in the frame.
|
||
if (firstCallbackNode !== null) {
|
||
do {
|
||
if (enableSchedulerDebugging && isSchedulerPaused) {
|
||
break;
|
||
}
|
||
flushFirstCallback();
|
||
} while (firstCallbackNode !== null && !shouldYieldToHost());
|
||
}
|
||
}
|
||
} finally {
|
||
isExecutingCallback = false;
|
||
currentDidTimeout = previousDidTimeout;
|
||
if (firstCallbackNode !== null) {
|
||
// There's still work remaining. Request another callback.
|
||
ensureHostCallbackIsScheduled();
|
||
} else {
|
||
isHostCallbackScheduled = false;
|
||
}
|
||
// Before exiting, flush all the immediate work that was scheduled.
|
||
flushImmediateWork();
|
||
}
|
||
}
|
||
|
||
function unstable_runWithPriority(priorityLevel, eventHandler) {
|
||
switch (priorityLevel) {
|
||
case ImmediatePriority:
|
||
case UserBlockingPriority:
|
||
case NormalPriority:
|
||
case LowPriority:
|
||
case IdlePriority:
|
||
break;
|
||
default:
|
||
priorityLevel = NormalPriority;
|
||
}
|
||
|
||
var previousPriorityLevel = currentPriorityLevel;
|
||
var previousEventStartTime = currentEventStartTime;
|
||
currentPriorityLevel = priorityLevel;
|
||
currentEventStartTime = exports.unstable_now();
|
||
|
||
try {
|
||
return eventHandler();
|
||
} finally {
|
||
currentPriorityLevel = previousPriorityLevel;
|
||
currentEventStartTime = previousEventStartTime;
|
||
|
||
// Before exiting, flush all the immediate work that was scheduled.
|
||
flushImmediateWork();
|
||
}
|
||
}
|
||
|
||
function unstable_wrapCallback(callback) {
|
||
var parentPriorityLevel = currentPriorityLevel;
|
||
return function () {
|
||
// This is a fork of runWithPriority, inlined for performance.
|
||
var previousPriorityLevel = currentPriorityLevel;
|
||
var previousEventStartTime = currentEventStartTime;
|
||
currentPriorityLevel = parentPriorityLevel;
|
||
currentEventStartTime = exports.unstable_now();
|
||
|
||
try {
|
||
return callback.apply(this, arguments);
|
||
} finally {
|
||
currentPriorityLevel = previousPriorityLevel;
|
||
currentEventStartTime = previousEventStartTime;
|
||
flushImmediateWork();
|
||
}
|
||
};
|
||
}
|
||
|
||
function unstable_scheduleCallback(callback, deprecated_options) {
|
||
var startTime = currentEventStartTime !== -1 ? currentEventStartTime : exports.unstable_now();
|
||
|
||
var expirationTime;
|
||
if (typeof deprecated_options === 'object' && deprecated_options !== null && typeof deprecated_options.timeout === 'number') {
|
||
// FIXME: Remove this branch once we lift expiration times out of React.
|
||
expirationTime = startTime + deprecated_options.timeout;
|
||
} else {
|
||
switch (currentPriorityLevel) {
|
||
case ImmediatePriority:
|
||
expirationTime = startTime + IMMEDIATE_PRIORITY_TIMEOUT;
|
||
break;
|
||
case UserBlockingPriority:
|
||
expirationTime = startTime + USER_BLOCKING_PRIORITY;
|
||
break;
|
||
case IdlePriority:
|
||
expirationTime = startTime + IDLE_PRIORITY;
|
||
break;
|
||
case LowPriority:
|
||
expirationTime = startTime + LOW_PRIORITY_TIMEOUT;
|
||
break;
|
||
case NormalPriority:
|
||
default:
|
||
expirationTime = startTime + NORMAL_PRIORITY_TIMEOUT;
|
||
}
|
||
}
|
||
|
||
var newNode = {
|
||
callback: callback,
|
||
priorityLevel: currentPriorityLevel,
|
||
expirationTime: expirationTime,
|
||
next: null,
|
||
previous: null
|
||
};
|
||
|
||
// Insert the new callback into the list, ordered first by expiration, then
|
||
// by insertion. So the new callback is inserted any other callback with
|
||
// equal expiration.
|
||
if (firstCallbackNode === null) {
|
||
// This is the first callback in the list.
|
||
firstCallbackNode = newNode.next = newNode.previous = newNode;
|
||
ensureHostCallbackIsScheduled();
|
||
} else {
|
||
var next = null;
|
||
var node = firstCallbackNode;
|
||
do {
|
||
if (node.expirationTime > expirationTime) {
|
||
// The new callback expires before this one.
|
||
next = node;
|
||
break;
|
||
}
|
||
node = node.next;
|
||
} while (node !== firstCallbackNode);
|
||
|
||
if (next === null) {
|
||
// No callback with a later expiration was found, which means the new
|
||
// callback has the latest expiration in the list.
|
||
next = firstCallbackNode;
|
||
} else if (next === firstCallbackNode) {
|
||
// The new callback has the earliest expiration in the entire list.
|
||
firstCallbackNode = newNode;
|
||
ensureHostCallbackIsScheduled();
|
||
}
|
||
|
||
var previous = next.previous;
|
||
previous.next = next.previous = newNode;
|
||
newNode.next = next;
|
||
newNode.previous = previous;
|
||
}
|
||
|
||
return newNode;
|
||
}
|
||
|
||
function unstable_pauseExecution() {
|
||
isSchedulerPaused = true;
|
||
}
|
||
|
||
function unstable_continueExecution() {
|
||
isSchedulerPaused = false;
|
||
if (firstCallbackNode !== null) {
|
||
ensureHostCallbackIsScheduled();
|
||
}
|
||
}
|
||
|
||
function unstable_getFirstCallbackNode() {
|
||
return firstCallbackNode;
|
||
}
|
||
|
||
function unstable_cancelCallback(callbackNode) {
|
||
var next = callbackNode.next;
|
||
if (next === null) {
|
||
// Already cancelled.
|
||
return;
|
||
}
|
||
|
||
if (next === callbackNode) {
|
||
// This is the only scheduled callback. Clear the list.
|
||
firstCallbackNode = null;
|
||
} else {
|
||
// Remove the callback from its position in the list.
|
||
if (callbackNode === firstCallbackNode) {
|
||
firstCallbackNode = next;
|
||
}
|
||
var previous = callbackNode.previous;
|
||
previous.next = next;
|
||
next.previous = previous;
|
||
}
|
||
|
||
callbackNode.next = callbackNode.previous = null;
|
||
}
|
||
|
||
function unstable_getCurrentPriorityLevel() {
|
||
return currentPriorityLevel;
|
||
}
|
||
|
||
function unstable_shouldYield() {
|
||
return !currentDidTimeout && (firstCallbackNode !== null && firstCallbackNode.expirationTime < currentExpirationTime || shouldYieldToHost());
|
||
}
|
||
|
||
// The remaining code is essentially a polyfill for requestIdleCallback. It
|
||
// works by scheduling a requestAnimationFrame, storing the time for the start
|
||
// of the frame, then scheduling a postMessage which gets scheduled after paint.
|
||
// Within the postMessage handler do as much work as possible until time + frame
|
||
// rate. By separating the idle call into a separate event tick we ensure that
|
||
// layout, paint and other browser work is counted against the available time.
|
||
// The frame rate is dynamically adjusted.
|
||
|
||
// We capture a local reference to any global, in case it gets polyfilled after
|
||
// this module is initially evaluated. We want to be using a
|
||
// consistent implementation.
|
||
var localDate = Date;
|
||
|
||
// This initialization code may run even on server environments if a component
|
||
// just imports ReactDOM (e.g. for findDOMNode). Some environments might not
|
||
// have setTimeout or clearTimeout. However, we always expect them to be defined
|
||
// on the client. https://github.com/facebook/react/pull/13088
|
||
var localSetTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;
|
||
var localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;
|
||
|
||
// We don't expect either of these to necessarily be defined, but we will error
|
||
// later if they are missing on the client.
|
||
var localRequestAnimationFrame = typeof requestAnimationFrame === 'function' ? requestAnimationFrame : undefined;
|
||
var localCancelAnimationFrame = typeof cancelAnimationFrame === 'function' ? cancelAnimationFrame : undefined;
|
||
|
||
// requestAnimationFrame does not run when the tab is in the background. If
|
||
// we're backgrounded we prefer for that work to happen so that the page
|
||
// continues to load in the background. So we also schedule a 'setTimeout' as
|
||
// a fallback.
|
||
// TODO: Need a better heuristic for backgrounded work.
|
||
var ANIMATION_FRAME_TIMEOUT = 100;
|
||
var rAFID;
|
||
var rAFTimeoutID;
|
||
var requestAnimationFrameWithTimeout = function (callback) {
|
||
// schedule rAF and also a setTimeout
|
||
rAFID = localRequestAnimationFrame(function (timestamp) {
|
||
// cancel the setTimeout
|
||
localClearTimeout(rAFTimeoutID);
|
||
callback(timestamp);
|
||
});
|
||
rAFTimeoutID = localSetTimeout(function () {
|
||
// cancel the requestAnimationFrame
|
||
localCancelAnimationFrame(rAFID);
|
||
callback(exports.unstable_now());
|
||
}, ANIMATION_FRAME_TIMEOUT);
|
||
};
|
||
|
||
if (hasNativePerformanceNow) {
|
||
var Performance = performance;
|
||
exports.unstable_now = function () {
|
||
return Performance.now();
|
||
};
|
||
} else {
|
||
exports.unstable_now = function () {
|
||
return localDate.now();
|
||
};
|
||
}
|
||
|
||
var requestHostCallback;
|
||
var cancelHostCallback;
|
||
var shouldYieldToHost;
|
||
|
||
var globalValue = null;
|
||
if (typeof window !== 'undefined') {
|
||
globalValue = window;
|
||
} else if (typeof global !== 'undefined') {
|
||
globalValue = global;
|
||
}
|
||
|
||
if (globalValue && globalValue._schedMock) {
|
||
// Dynamic injection, only for testing purposes.
|
||
var globalImpl = globalValue._schedMock;
|
||
requestHostCallback = globalImpl[0];
|
||
cancelHostCallback = globalImpl[1];
|
||
shouldYieldToHost = globalImpl[2];
|
||
exports.unstable_now = globalImpl[3];
|
||
} else if (
|
||
// If Scheduler runs in a non-DOM environment, it falls back to a naive
|
||
// implementation using setTimeout.
|
||
typeof window === 'undefined' ||
|
||
// Check if MessageChannel is supported, too.
|
||
typeof MessageChannel !== 'function') {
|
||
// If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,
|
||
// fallback to a naive implementation.
|
||
var _callback = null;
|
||
var _flushCallback = function (didTimeout) {
|
||
if (_callback !== null) {
|
||
try {
|
||
_callback(didTimeout);
|
||
} finally {
|
||
_callback = null;
|
||
}
|
||
}
|
||
};
|
||
requestHostCallback = function (cb, ms) {
|
||
if (_callback !== null) {
|
||
// Protect against re-entrancy.
|
||
setTimeout(requestHostCallback, 0, cb);
|
||
} else {
|
||
_callback = cb;
|
||
setTimeout(_flushCallback, 0, false);
|
||
}
|
||
};
|
||
cancelHostCallback = function () {
|
||
_callback = null;
|
||
};
|
||
shouldYieldToHost = function () {
|
||
return false;
|
||
};
|
||
} else {
|
||
if (typeof console !== 'undefined') {
|
||
// TODO: Remove fb.me link
|
||
if (typeof localRequestAnimationFrame !== 'function') {
|
||
console.error("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
|
||
}
|
||
if (typeof localCancelAnimationFrame !== 'function') {
|
||
console.error("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
|
||
}
|
||
}
|
||
|
||
var scheduledHostCallback = null;
|
||
var isMessageEventScheduled = false;
|
||
var timeoutTime = -1;
|
||
|
||
var isAnimationFrameScheduled = false;
|
||
|
||
var isFlushingHostCallback = false;
|
||
|
||
var frameDeadline = 0;
|
||
// We start out assuming that we run at 30fps but then the heuristic tracking
|
||
// will adjust this value to a faster fps if we get more frequent animation
|
||
// frames.
|
||
var previousFrameTime = 33;
|
||
var activeFrameTime = 33;
|
||
|
||
shouldYieldToHost = function () {
|
||
return frameDeadline <= exports.unstable_now();
|
||
};
|
||
|
||
// We use the postMessage trick to defer idle work until after the repaint.
|
||
var channel = new MessageChannel();
|
||
var port = channel.port2;
|
||
channel.port1.onmessage = function (event) {
|
||
isMessageEventScheduled = false;
|
||
|
||
var prevScheduledCallback = scheduledHostCallback;
|
||
var prevTimeoutTime = timeoutTime;
|
||
scheduledHostCallback = null;
|
||
timeoutTime = -1;
|
||
|
||
var currentTime = exports.unstable_now();
|
||
|
||
var didTimeout = false;
|
||
if (frameDeadline - currentTime <= 0) {
|
||
// There's no time left in this idle period. Check if the callback has
|
||
// a timeout and whether it's been exceeded.
|
||
if (prevTimeoutTime !== -1 && prevTimeoutTime <= currentTime) {
|
||
// Exceeded the timeout. Invoke the callback even though there's no
|
||
// time left.
|
||
didTimeout = true;
|
||
} else {
|
||
// No timeout.
|
||
if (!isAnimationFrameScheduled) {
|
||
// Schedule another animation callback so we retry later.
|
||
isAnimationFrameScheduled = true;
|
||
requestAnimationFrameWithTimeout(animationTick);
|
||
}
|
||
// Exit without invoking the callback.
|
||
scheduledHostCallback = prevScheduledCallback;
|
||
timeoutTime = prevTimeoutTime;
|
||
return;
|
||
}
|
||
}
|
||
|
||
if (prevScheduledCallback !== null) {
|
||
isFlushingHostCallback = true;
|
||
try {
|
||
prevScheduledCallback(didTimeout);
|
||
} finally {
|
||
isFlushingHostCallback = false;
|
||
}
|
||
}
|
||
};
|
||
|
||
var animationTick = function (rafTime) {
|
||
if (scheduledHostCallback !== null) {
|
||
// Eagerly schedule the next animation callback at the beginning of the
|
||
// frame. If the scheduler queue is not empty at the end of the frame, it
|
||
// will continue flushing inside that callback. If the queue *is* empty,
|
||
// then it will exit immediately. Posting the callback at the start of the
|
||
// frame ensures it's fired within the earliest possible frame. If we
|
||
// waited until the end of the frame to post the callback, we risk the
|
||
// browser skipping a frame and not firing the callback until the frame
|
||
// after that.
|
||
requestAnimationFrameWithTimeout(animationTick);
|
||
} else {
|
||
// No pending work. Exit.
|
||
isAnimationFrameScheduled = false;
|
||
return;
|
||
}
|
||
|
||
var nextFrameTime = rafTime - frameDeadline + activeFrameTime;
|
||
if (nextFrameTime < activeFrameTime && previousFrameTime < activeFrameTime) {
|
||
if (nextFrameTime < 8) {
|
||
// Defensive coding. We don't support higher frame rates than 120hz.
|
||
// If the calculated frame time gets lower than 8, it is probably a bug.
|
||
nextFrameTime = 8;
|
||
}
|
||
// If one frame goes long, then the next one can be short to catch up.
|
||
// If two frames are short in a row, then that's an indication that we
|
||
// actually have a higher frame rate than what we're currently optimizing.
|
||
// We adjust our heuristic dynamically accordingly. For example, if we're
|
||
// running on 120hz display or 90hz VR display.
|
||
// Take the max of the two in case one of them was an anomaly due to
|
||
// missed frame deadlines.
|
||
activeFrameTime = nextFrameTime < previousFrameTime ? previousFrameTime : nextFrameTime;
|
||
} else {
|
||
previousFrameTime = nextFrameTime;
|
||
}
|
||
frameDeadline = rafTime + activeFrameTime;
|
||
if (!isMessageEventScheduled) {
|
||
isMessageEventScheduled = true;
|
||
port.postMessage(undefined);
|
||
}
|
||
};
|
||
|
||
requestHostCallback = function (callback, absoluteTimeout) {
|
||
scheduledHostCallback = callback;
|
||
timeoutTime = absoluteTimeout;
|
||
if (isFlushingHostCallback || absoluteTimeout < 0) {
|
||
// Don't wait for the next frame. Continue working ASAP, in a new event.
|
||
port.postMessage(undefined);
|
||
} else if (!isAnimationFrameScheduled) {
|
||
// If rAF didn't already schedule one, we need to schedule a frame.
|
||
// TODO: If this rAF doesn't materialize because the browser throttles, we
|
||
// might want to still have setTimeout trigger rIC as a backup to ensure
|
||
// that we keep performing work.
|
||
isAnimationFrameScheduled = true;
|
||
requestAnimationFrameWithTimeout(animationTick);
|
||
}
|
||
};
|
||
|
||
cancelHostCallback = function () {
|
||
scheduledHostCallback = null;
|
||
isMessageEventScheduled = false;
|
||
timeoutTime = -1;
|
||
};
|
||
}
|
||
|
||
exports.unstable_ImmediatePriority = ImmediatePriority;
|
||
exports.unstable_UserBlockingPriority = UserBlockingPriority;
|
||
exports.unstable_NormalPriority = NormalPriority;
|
||
exports.unstable_IdlePriority = IdlePriority;
|
||
exports.unstable_LowPriority = LowPriority;
|
||
exports.unstable_runWithPriority = unstable_runWithPriority;
|
||
exports.unstable_scheduleCallback = unstable_scheduleCallback;
|
||
exports.unstable_cancelCallback = unstable_cancelCallback;
|
||
exports.unstable_wrapCallback = unstable_wrapCallback;
|
||
exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
|
||
exports.unstable_shouldYield = unstable_shouldYield;
|
||
exports.unstable_continueExecution = unstable_continueExecution;
|
||
exports.unstable_pauseExecution = unstable_pauseExecution;
|
||
exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
|
||
})();
|
||
}
|
||
|
||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/scheduler/index.js":
|
||
/*!*****************************************!*\
|
||
!*** ./node_modules/scheduler/index.js ***!
|
||
\*****************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
if (false) {} else {
|
||
module.exports = __webpack_require__(/*! ./cjs/scheduler.development.js */ "./node_modules/scheduler/cjs/scheduler.development.js");
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/scheduler/tracing.js":
|
||
/*!*******************************************!*\
|
||
!*** ./node_modules/scheduler/tracing.js ***!
|
||
\*******************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
if (false) {} else {
|
||
module.exports = __webpack_require__(/*! ./cjs/scheduler-tracing.development.js */ "./node_modules/scheduler/cjs/scheduler-tracing.development.js");
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/symbol-observable/es/index.js":
|
||
/*!****************************************************!*\
|
||
!*** ./node_modules/symbol-observable/es/index.js ***!
|
||
\****************************************************/
|
||
/*! exports provided: default */
|
||
/*! ModuleConcatenation bailout: Module uses injected variables (global, module) */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ponyfill.js */ "./node_modules/symbol-observable/es/ponyfill.js");
|
||
/* global window */
|
||
|
||
|
||
var root;
|
||
|
||
if (typeof self !== 'undefined') {
|
||
root = self;
|
||
} else if (typeof window !== 'undefined') {
|
||
root = window;
|
||
} else if (typeof global !== 'undefined') {
|
||
root = global;
|
||
} else if (true) {
|
||
root = module;
|
||
} else {}
|
||
|
||
var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__["default"])(root);
|
||
/* harmony default export */ __webpack_exports__["default"] = (result);
|
||
|
||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../webpack/buildin/harmony-module.js */ "./node_modules/webpack/buildin/harmony-module.js")(module)))
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/symbol-observable/es/ponyfill.js":
|
||
/*!*******************************************************!*\
|
||
!*** ./node_modules/symbol-observable/es/ponyfill.js ***!
|
||
\*******************************************************/
|
||
/*! exports provided: default */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return symbolObservablePonyfill; });
|
||
function symbolObservablePonyfill(root) {
|
||
var result;
|
||
var Symbol = root.Symbol;
|
||
|
||
if (typeof Symbol === 'function') {
|
||
if (Symbol.observable) {
|
||
result = Symbol.observable;
|
||
} else {
|
||
result = Symbol('observable');
|
||
Symbol.observable = result;
|
||
}
|
||
} else {
|
||
result = '@@observable';
|
||
}
|
||
|
||
return result;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/typesafe-actions/dist/index.umd.js":
|
||
/*!*********************************************************!*\
|
||
!*** ./node_modules/typesafe-actions/dist/index.umd.js ***!
|
||
\*********************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
!function(n,t){ true?t(exports):undefined}(this,function(n){"use strict";function t(n,t,r){return{type:n,payload:t,meta:r}}function r(n,t){if(void 0===t&&(t=1),null==n)throw new Error("Argument (#"+t+") is missing");if("string"!=typeof n&&"symbol"!=typeof n)throw new Error("Argument (#"+t+") should be of type: string | symbol")}function e(n,t){var r=null!=t?t(n):function(){return{type:n}};return Object.assign(r,{getType:function(){return n},toString:function(){return n}})}n.action=t,n.createAction=function(n,e){r(n);var i=null==e?function(){return t(n)}:e(t.bind(null,n));return Object.assign(i,{getType:function(){return n},toString:function(){return n}})},n.createStandardAction=function(n){return r(n),Object.assign(function(){return e(n,function(n){return function(t,r){return{type:n,payload:t,meta:r}}})},{map:function(t){return e(n,function(n){return function(r,e){return Object.assign(t(r,e),{type:n})}})}})},n.createAsyncAction=function(n,t,i){return[n,t,i].forEach(function(n,t){r(n,t+1)}),Object.assign(function(){return{request:e(n,function(t){return function(t){return{type:n,payload:t}}}),success:e(t,function(n){return function(n){return{type:t,payload:n}}}),failure:e(i,function(n){return function(n){return{type:i,payload:n}}})}},{})},n.getType=function(n){if(null==n)throw new Error("first argument is missing");if(null==n.getType)throw new Error('first argument is not an instance of "typesafe-actions"');return n.getType()},n.isOfType=function(n,t){Array.isArray(n)?n.forEach(function(n){return r(n)}):r(n);var e=Array.isArray(n)?function(t){return n.includes(t.type)}:function(t){return t.type===n};return null==t?e:e(t)},n.isActionOf=function(n,t){if(null==n)throw new Error("first argument is missing");if(Array.isArray(n))n.forEach(function(n,t){if(null==n.getType)throw new Error('first argument contains element\n that is not created with "typesafe-actions" at index ['+t+"]")});else if(null==n.getType)throw new Error('first argument is not created with "typesafe-actions"');var r=function(t){return(Array.isArray(n)?n:[n]).some(function(n,r){return n.getType()===t.type})};return null==t?r:r(t)},n.createActionDeprecated=function(n,t){var r;if(null!=t){if("function"!=typeof t)throw new Error("second argument is not a function");r=t}else r=function(){return{type:n}};if(null==n)throw new Error("first argument is missing");if("string"!=typeof n&&"symbol"!=typeof n)throw new Error("first argument should be type of: string | symbol");return r},Object.defineProperty(n,"__esModule",{value:!0})});
|
||
//# sourceMappingURL=index.umd.js.map
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/warning/warning.js":
|
||
/*!*****************************************!*\
|
||
!*** ./node_modules/warning/warning.js ***!
|
||
\*****************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
/**
|
||
* Copyright (c) 2014-present, Facebook, Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
/**
|
||
* Similar to invariant but only logs a warning if the condition is not met.
|
||
* This can be used to log issues in development environments in critical
|
||
* paths. Removing the logging code for production environments will keep the
|
||
* same logic and follow the same code paths.
|
||
*/
|
||
|
||
var __DEV__ = "development" !== 'production';
|
||
|
||
var warning = function() {};
|
||
|
||
if (__DEV__) {
|
||
var printWarning = function printWarning(format, args) {
|
||
var len = arguments.length;
|
||
args = new Array(len > 1 ? len - 1 : 0);
|
||
for (var key = 1; key < len; key++) {
|
||
args[key - 1] = arguments[key];
|
||
}
|
||
var argIndex = 0;
|
||
var message = 'Warning: ' +
|
||
format.replace(/%s/g, function() {
|
||
return args[argIndex++];
|
||
});
|
||
if (typeof console !== 'undefined') {
|
||
console.error(message);
|
||
}
|
||
try {
|
||
// --- Welcome to debugging React ---
|
||
// This error was thrown as a convenience so that you can use this stack
|
||
// to find the callsite that caused this warning to fire.
|
||
throw new Error(message);
|
||
} catch (x) {}
|
||
}
|
||
|
||
warning = function(condition, format, args) {
|
||
var len = arguments.length;
|
||
args = new Array(len > 2 ? len - 2 : 0);
|
||
for (var key = 2; key < len; key++) {
|
||
args[key - 2] = arguments[key];
|
||
}
|
||
if (format === undefined) {
|
||
throw new Error(
|
||
'`warning(condition, format, ...args)` requires a warning ' +
|
||
'message argument'
|
||
);
|
||
}
|
||
if (!condition) {
|
||
printWarning.apply(null, [format].concat(args));
|
||
}
|
||
};
|
||
}
|
||
|
||
module.exports = warning;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/webpack/buildin/global.js":
|
||
/*!***********************************!*\
|
||
!*** (webpack)/buildin/global.js ***!
|
||
\***********************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports) {
|
||
|
||
var g;
|
||
|
||
// This works in non-strict mode
|
||
g = (function() {
|
||
return this;
|
||
})();
|
||
|
||
try {
|
||
// This works if eval is allowed (see CSP)
|
||
g = g || new Function("return this")();
|
||
} catch (e) {
|
||
// This works if the window reference is available
|
||
if (typeof window === "object") g = window;
|
||
}
|
||
|
||
// g can still be undefined, but nothing to do about it...
|
||
// We return undefined, instead of nothing here, so it's
|
||
// easier to handle this case. if(!global) { ...}
|
||
|
||
module.exports = g;
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/webpack/buildin/harmony-module.js":
|
||
/*!*******************************************!*\
|
||
!*** (webpack)/buildin/harmony-module.js ***!
|
||
\*******************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports) {
|
||
|
||
module.exports = function(originalModule) {
|
||
if (!originalModule.webpackPolyfill) {
|
||
var module = Object.create(originalModule);
|
||
// module.parent = undefined by default
|
||
if (!module.children) module.children = [];
|
||
Object.defineProperty(module, "loaded", {
|
||
enumerable: true,
|
||
get: function() {
|
||
return module.l;
|
||
}
|
||
});
|
||
Object.defineProperty(module, "id", {
|
||
enumerable: true,
|
||
get: function() {
|
||
return module.i;
|
||
}
|
||
});
|
||
Object.defineProperty(module, "exports", {
|
||
enumerable: true
|
||
});
|
||
module.webpackPolyfill = 1;
|
||
}
|
||
return module;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/api/AjaxRequest.ts":
|
||
/*!***********************************!*\
|
||
!*** ./src/ts/api/AjaxRequest.ts ***!
|
||
\***********************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var AjaxRequest =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function AjaxRequest(xmlHttpRequest) {
|
||
_classCallCheck(this, AjaxRequest);
|
||
|
||
this.XMLHttpRequest = xmlHttpRequest;
|
||
}
|
||
|
||
_createClass(AjaxRequest, [{
|
||
key: "ajaxGet",
|
||
value: function ajaxGet(url, queryObject) {
|
||
var _this = this;
|
||
|
||
return new Promise(function (resolve, reject) {
|
||
var xhr = new _this.XMLHttpRequest();
|
||
var cacheBustingQueryObject = queryObject || {}; // IE 11 caches GET requests
|
||
|
||
cacheBustingQueryObject._cache_busting_arg_ = +new Date(); // this parameter name must be in the backend's excluded parameter set (see api_utils.py)
|
||
|
||
xhr.open('GET', url + _this.buildQueryString(cacheBustingQueryObject));
|
||
xhr.withCredentials = true;
|
||
|
||
xhr.onload = function () {
|
||
if (xhr.readyState === 4 && xhr.status === 200) {
|
||
try {
|
||
return resolve(JSON.parse(xhr.response));
|
||
} catch (e) {
|
||
var rejection = {
|
||
message: e.message,
|
||
status: xhr.status,
|
||
xhr: xhr,
|
||
error: e,
|
||
type: null,
|
||
content: null
|
||
}; // tslint:disable-next-line:no-console
|
||
|
||
console.error('Failure to parse response', xhr);
|
||
return reject(rejection);
|
||
}
|
||
} else {
|
||
return _this.handleXhrOnLoadCaughtException(reject, xhr);
|
||
}
|
||
};
|
||
|
||
xhr.onerror = function (e) {
|
||
return _this.handleXhrOnLoadCaughtException(reject, xhr);
|
||
};
|
||
|
||
xhr.send();
|
||
});
|
||
}
|
||
}, {
|
||
key: "ajaxPost",
|
||
value: function ajaxPost(url, postBody, queryObject, type) {
|
||
var _this2 = this;
|
||
|
||
return new Promise(function (resolve, reject) {
|
||
var xhr = new _this2.XMLHttpRequest();
|
||
xhr.open('POST', url + _this2.buildQueryString(queryObject));
|
||
xhr.withCredentials = true;
|
||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||
xhr.setRequestHeader('X-CSRFToken', window.CSRF_TOKEN);
|
||
|
||
xhr.onload = function () {
|
||
if (xhr.readyState === 4 && (xhr.status === 200 || xhr.status === 201)) {
|
||
if (type === 'text') {
|
||
return resolve(xhr.response);
|
||
}
|
||
|
||
try {
|
||
return resolve(JSON.parse(xhr.response));
|
||
} catch (e) {
|
||
var rejection = {
|
||
message: e.message,
|
||
status: xhr.status,
|
||
xhr: xhr,
|
||
error: e,
|
||
type: null,
|
||
content: null
|
||
}; // tslint:disable-next-line:no-console
|
||
|
||
console.error('Failure to parse response', xhr);
|
||
return reject(rejection);
|
||
}
|
||
} else {
|
||
return _this2.handleXhrOnLoadCaughtException(reject, xhr);
|
||
}
|
||
};
|
||
|
||
xhr.onerror = function (e) {
|
||
return _this2.handleXhrOnLoadCaughtException(reject, xhr);
|
||
};
|
||
|
||
xhr.send(JSON.stringify(postBody || undefined));
|
||
});
|
||
}
|
||
}, {
|
||
key: "ajaxPostForm",
|
||
value: function ajaxPostForm(url, formData, queryObject) {
|
||
var _this3 = this;
|
||
|
||
// Lesman 4/24/2017
|
||
// NOTE: you do not set the Content-Type on this request,
|
||
// the browser will automatically encode the form data and
|
||
// set the appropriate Content-Type. The encoding is browser
|
||
// specific so you MUST allow the browser to set the header
|
||
return new Promise(function (resolve, reject) {
|
||
var xhr = new _this3.XMLHttpRequest();
|
||
xhr.open('POST', url + _this3.buildQueryString(queryObject));
|
||
xhr.withCredentials = true;
|
||
xhr.setRequestHeader('X-CSRFToken', window.CSRF_TOKEN);
|
||
|
||
xhr.onload = function () {
|
||
return _this3.handleXhrOnLoad(resolve, reject, xhr);
|
||
};
|
||
|
||
xhr.onerror = function (e) {
|
||
return _this3.handleXhrOnLoadCaughtException(reject, xhr);
|
||
};
|
||
|
||
xhr.send(formData);
|
||
});
|
||
}
|
||
}, {
|
||
key: "ajaxPut",
|
||
value: function ajaxPut(url, postBody, queryObject) {
|
||
var _this4 = this;
|
||
|
||
return new Promise(function (resolve, reject) {
|
||
var xhr = new _this4.XMLHttpRequest();
|
||
xhr.open('PUT', url + _this4.buildQueryString(queryObject));
|
||
xhr.withCredentials = true;
|
||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||
xhr.setRequestHeader('X-CSRFToken', window.CSRF_TOKEN);
|
||
|
||
xhr.onload = function () {
|
||
return _this4.handleXhrOnLoad(resolve, reject, xhr);
|
||
};
|
||
|
||
xhr.onerror = function (e) {
|
||
return _this4.handleXhrOnLoadCaughtException(reject, xhr);
|
||
};
|
||
|
||
xhr.send(JSON.stringify(postBody || undefined));
|
||
});
|
||
}
|
||
}, {
|
||
key: "ajaxDelete",
|
||
value: function ajaxDelete(url, queryObject) {
|
||
var _this5 = this;
|
||
|
||
return new Promise(function (resolve, reject) {
|
||
var xhr = new _this5.XMLHttpRequest();
|
||
xhr.open('DELETE', url + _this5.buildQueryString(queryObject));
|
||
xhr.withCredentials = true;
|
||
xhr.setRequestHeader('X-CSRFToken', window.CSRF_TOKEN);
|
||
|
||
xhr.onload = function () {
|
||
return _this5.handleXhrOnLoad(resolve, reject, xhr);
|
||
};
|
||
|
||
xhr.onerror = function (e) {
|
||
return _this5.handleXhrOnLoadCaughtException(reject, xhr);
|
||
};
|
||
|
||
xhr.send();
|
||
});
|
||
}
|
||
}, {
|
||
key: "buildQueryString",
|
||
value: function buildQueryString(queryObject) {
|
||
var queryParameters = [];
|
||
var queryString = '';
|
||
Object.keys(queryObject || {}).forEach(function (key) {
|
||
queryParameters.push(key + '=' + encodeURIComponent(queryObject[key]));
|
||
});
|
||
|
||
if (queryParameters.length > 0) {
|
||
queryString = '?' + queryParameters.join('&');
|
||
}
|
||
|
||
return queryString;
|
||
}
|
||
}, {
|
||
key: "handleXhrOnLoad",
|
||
value: function handleXhrOnLoad(resolve, reject, xhr) {
|
||
if (xhr.readyState === 4 && (xhr.status === 200 || xhr.status === 204)) {
|
||
if (xhr.responseType === '' && xhr.responseText === '') {
|
||
return resolve(undefined);
|
||
}
|
||
|
||
if (xhr.responseType === 'text') {
|
||
return resolve(xhr.response);
|
||
}
|
||
|
||
try {
|
||
var responseJSON = JSON.parse(xhr.response);
|
||
|
||
if (typeof responseJSON.success !== 'undefined' && !responseJSON.success) {
|
||
if (responseJSON.error === 'user_required') {
|
||
window.location.reload();
|
||
}
|
||
}
|
||
|
||
return resolve(responseJSON);
|
||
} catch (e) {
|
||
var rejection = {
|
||
message: e.message,
|
||
status: xhr.status,
|
||
xhr: xhr,
|
||
error: e,
|
||
type: null,
|
||
content: null
|
||
}; // tslint:disable-next-line:no-console
|
||
|
||
console.error('Failed to parse response', xhr);
|
||
return reject(rejection);
|
||
}
|
||
} else {
|
||
return this.handleXhrOnLoadCaughtException(reject, xhr);
|
||
}
|
||
}
|
||
}, {
|
||
key: "handleXhrOnLoadCaughtException",
|
||
value: function handleXhrOnLoadCaughtException(reject, xhr) {
|
||
if (xhr.status === 401) {
|
||
window.location.reload();
|
||
}
|
||
|
||
if (xhr.responseType === 'text' || xhr.responseType === '') {
|
||
var rejection = {
|
||
message: xhr.responseText || xhr.statusText,
|
||
status: xhr.status,
|
||
xhr: xhr,
|
||
error: null,
|
||
type: null,
|
||
content: null
|
||
};
|
||
return reject(rejection);
|
||
}
|
||
|
||
try {
|
||
var responseJSON = JSON.parse(xhr.response);
|
||
var _rejection = {
|
||
message: responseJSON.message || xhr.statusText,
|
||
status: xhr.status,
|
||
xhr: xhr,
|
||
error: null,
|
||
type: responseJSON.exception_type,
|
||
content: responseJSON.content
|
||
};
|
||
return reject(_rejection);
|
||
} catch (e) {
|
||
var _rejection2 = {
|
||
message: e.message,
|
||
status: xhr.status,
|
||
xhr: xhr,
|
||
error: e,
|
||
type: null,
|
||
content: null
|
||
}; // tslint:disable-next-line:no-console
|
||
|
||
console.error('Failed to parse response', xhr);
|
||
return reject(_rejection2);
|
||
}
|
||
}
|
||
}]);
|
||
|
||
return AjaxRequest;
|
||
}();
|
||
|
||
exports.AjaxRequest = AjaxRequest;
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/api/PokemonService.ts":
|
||
/*!**************************************!*\
|
||
!*** ./src/ts/api/PokemonService.ts ***!
|
||
\**************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
||
return new (P || (P = Promise))(function (resolve, reject) {
|
||
function fulfilled(value) {
|
||
try {
|
||
step(generator.next(value));
|
||
} catch (e) {
|
||
reject(e);
|
||
}
|
||
}
|
||
|
||
function rejected(value) {
|
||
try {
|
||
step(generator["throw"](value));
|
||
} catch (e) {
|
||
reject(e);
|
||
}
|
||
}
|
||
|
||
function step(result) {
|
||
result.done ? resolve(result.value) : new P(function (resolve) {
|
||
resolve(result.value);
|
||
}).then(fulfilled, rejected);
|
||
}
|
||
|
||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||
});
|
||
};
|
||
|
||
var __importDefault = this && this.__importDefault || function (mod) {
|
||
return mod && mod.__esModule ? mod : {
|
||
"default": mod
|
||
};
|
||
};
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var pogo_protos_1 = __importDefault(__webpack_require__(/*! pogo-protos */ "./node_modules/pogo-protos/index.js"));
|
||
|
||
var AjaxRequest_1 = __webpack_require__(/*! api/AjaxRequest */ "./src/ts/api/AjaxRequest.ts");
|
||
|
||
var PokemonService =
|
||
/*#__PURE__*/
|
||
function () {
|
||
function PokemonService() {
|
||
_classCallCheck(this, PokemonService);
|
||
|
||
this.AjaxRequest = new AjaxRequest_1.AjaxRequest(XMLHttpRequest);
|
||
}
|
||
|
||
_createClass(PokemonService, [{
|
||
key: "getConfig",
|
||
value: function getConfig() {
|
||
return __awaiter(this, void 0, void 0,
|
||
/*#__PURE__*/
|
||
regeneratorRuntime.mark(function _callee() {
|
||
var queryParameters, response;
|
||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||
while (1) {
|
||
switch (_context.prev = _context.next) {
|
||
case 0:
|
||
queryParameters = {};
|
||
_context.next = 3;
|
||
return this.AjaxRequest.ajaxGet('/dist/db/config.json', queryParameters);
|
||
|
||
case 3:
|
||
response = _context.sent;
|
||
return _context.abrupt("return", response);
|
||
|
||
case 5:
|
||
case "end":
|
||
return _context.stop();
|
||
}
|
||
}
|
||
}, _callee, this);
|
||
}));
|
||
}
|
||
}, {
|
||
key: "getPokemonList",
|
||
value: function getPokemonList() {
|
||
return __awaiter(this, void 0, void 0,
|
||
/*#__PURE__*/
|
||
regeneratorRuntime.mark(function _callee2() {
|
||
var queryParameters, response;
|
||
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
||
while (1) {
|
||
switch (_context2.prev = _context2.next) {
|
||
case 0:
|
||
queryParameters = {};
|
||
_context2.next = 3;
|
||
return this.AjaxRequest.ajaxGet('/dist/db/order.json', queryParameters);
|
||
|
||
case 3:
|
||
response = _context2.sent;
|
||
return _context2.abrupt("return", response);
|
||
|
||
case 5:
|
||
case "end":
|
||
return _context2.stop();
|
||
}
|
||
}
|
||
}, _callee2, this);
|
||
}));
|
||
}
|
||
}, {
|
||
key: "getPokemonLeagueStats",
|
||
value: function getPokemonLeagueStats(pokemonId, form) {
|
||
return __awaiter(this, void 0, void 0,
|
||
/*#__PURE__*/
|
||
regeneratorRuntime.mark(function _callee3() {
|
||
var fileName, queryParameters, response;
|
||
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
||
while (1) {
|
||
switch (_context3.prev = _context3.next) {
|
||
case 0:
|
||
fileName = form === pogo_protos_1.default.Enums.Form.FORM_UNSET ? pogo_protos_1.default.Enums.PokemonId[pokemonId] : pogo_protos_1.default.Enums.Form[form];
|
||
queryParameters = {};
|
||
_context3.next = 4;
|
||
return this.AjaxRequest.ajaxGet("/dist/db/".concat(fileName, ".json"), queryParameters);
|
||
|
||
case 4:
|
||
response = _context3.sent;
|
||
return _context3.abrupt("return", response);
|
||
|
||
case 6:
|
||
case "end":
|
||
return _context3.stop();
|
||
}
|
||
}
|
||
}, _callee3, this);
|
||
}));
|
||
}
|
||
}]);
|
||
|
||
return PokemonService;
|
||
}();
|
||
|
||
exports.PokemonService = PokemonService;
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/PokemonApp.tsx":
|
||
/*!***********************************!*\
|
||
!*** ./src/ts/app/PokemonApp.tsx ***!
|
||
\***********************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
||
return new (P || (P = Promise))(function (resolve, reject) {
|
||
function fulfilled(value) {
|
||
try {
|
||
step(generator.next(value));
|
||
} catch (e) {
|
||
reject(e);
|
||
}
|
||
}
|
||
|
||
function rejected(value) {
|
||
try {
|
||
step(generator["throw"](value));
|
||
} catch (e) {
|
||
reject(e);
|
||
}
|
||
}
|
||
|
||
function step(result) {
|
||
result.done ? resolve(result.value) : new P(function (resolve) {
|
||
resolve(result.value);
|
||
}).then(fulfilled, rejected);
|
||
}
|
||
|
||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||
});
|
||
};
|
||
|
||
var __importDefault = this && this.__importDefault || function (mod) {
|
||
return mod && mod.__esModule ? mod : {
|
||
"default": mod
|
||
};
|
||
};
|
||
|
||
var __importStar = this && this.__importStar || function (mod) {
|
||
if (mod && mod.__esModule) return mod;
|
||
var result = {};
|
||
if (mod != null) for (var k in mod) {
|
||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||
}
|
||
result["default"] = mod;
|
||
return result;
|
||
};
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var pogo_protos_1 = __importDefault(__webpack_require__(/*! pogo-protos */ "./node_modules/pogo-protos/index.js"));
|
||
|
||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||
|
||
var react_redux_1 = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
|
||
|
||
var League_1 = __webpack_require__(/*! app/models/League */ "./src/ts/app/models/League.ts");
|
||
|
||
var ActionsPokemonExplorer = __importStar(__webpack_require__(/*! ./components/PokemonExplorer/actions */ "./src/ts/app/components/PokemonExplorer/actions.ts"));
|
||
|
||
var ActionsPokemonSelectList = __importStar(__webpack_require__(/*! ./components/PokemonSelectList/actions */ "./src/ts/app/components/PokemonSelectList/actions.ts"));
|
||
|
||
var Footer_1 = __webpack_require__(/*! ./components/Footer */ "./src/ts/app/components/Footer.tsx");
|
||
|
||
var Header_1 = __webpack_require__(/*! ./components/Header */ "./src/ts/app/components/Header.tsx");
|
||
|
||
var PokemonExplorer_1 = __webpack_require__(/*! ./components/PokemonExplorer/PokemonExplorer */ "./src/ts/app/components/PokemonExplorer/PokemonExplorer.tsx");
|
||
|
||
var PokemonSelectList_1 = __webpack_require__(/*! ./components/PokemonSelectList/PokemonSelectList */ "./src/ts/app/components/PokemonSelectList/PokemonSelectList.tsx");
|
||
|
||
var styles = __importStar(__webpack_require__(/*! ./styles/PokemonApp.scss */ "./src/ts/app/styles/PokemonApp.scss"));
|
||
|
||
var PokemonApp =
|
||
/*#__PURE__*/
|
||
function (_react_1$default$Comp) {
|
||
_inherits(PokemonApp, _react_1$default$Comp);
|
||
|
||
function PokemonApp(props) {
|
||
var _this;
|
||
|
||
_classCallCheck(this, PokemonApp);
|
||
|
||
_this = _possibleConstructorReturn(this, _getPrototypeOf(PokemonApp).call(this, props));
|
||
|
||
_this.handleActivatePokemon = function (pokemonId, form) {
|
||
var dispatch = _this.props.dispatch;
|
||
dispatch(ActionsPokemonSelectList.fetchPokemonLeagueStats(pokemonId, form)).then(function (leaguePokemon) {
|
||
dispatch(ActionsPokemonSelectList.setActivePokemonId(pokemonId, form));
|
||
dispatch(ActionsPokemonExplorer.setIvLevel(null));
|
||
dispatch(ActionsPokemonExplorer.setIvHp(null));
|
||
dispatch(ActionsPokemonExplorer.setIvAtk(null));
|
||
dispatch(ActionsPokemonExplorer.setIvDef(null));
|
||
dispatch(ActionsPokemonExplorer.setLeaguePokemon(leaguePokemon));
|
||
}).catch(function (error) {
|
||
// tslint:disable-next-line:no-console
|
||
console.error(error);
|
||
dispatch(ActionsPokemonExplorer.setLeaguePokemon(null));
|
||
}).then(function () {
|
||
return dispatch(ActionsPokemonExplorer.setIsLoading(false));
|
||
});
|
||
};
|
||
|
||
_this.handleChangeFilter = function (filterTerm) {
|
||
return _this.props.dispatch(ActionsPokemonSelectList.filterPokemonList(filterTerm));
|
||
};
|
||
|
||
_this.handleChangeIndividualValue = function (stat, value) {
|
||
var dispatch = _this.props.dispatch;
|
||
|
||
switch (stat) {
|
||
case 'level':
|
||
dispatch(ActionsPokemonExplorer.setIvLevel(value));
|
||
break;
|
||
|
||
case 'hp':
|
||
dispatch(ActionsPokemonExplorer.setIvHp(value));
|
||
break;
|
||
|
||
case 'atk':
|
||
dispatch(ActionsPokemonExplorer.setIvAtk(value));
|
||
break;
|
||
|
||
case 'def':
|
||
dispatch(ActionsPokemonExplorer.setIvDef(value));
|
||
break;
|
||
|
||
default:
|
||
break;
|
||
}
|
||
};
|
||
|
||
_this.handleMaximizeLevel = function () {
|
||
_this.props.dispatch(ActionsPokemonExplorer.maximizeLevel());
|
||
};
|
||
|
||
_this.handleChangeLeagueNavigation = function (league) {
|
||
var _this$props = _this.props,
|
||
history = _this$props.history,
|
||
location = _this$props.location;
|
||
var search = new URLSearchParams(location.search);
|
||
search.set('league', league.toString());
|
||
history.push({
|
||
search: search.toString()
|
||
});
|
||
|
||
_this.handleChangeLeague(league);
|
||
};
|
||
|
||
_this.handleChangeLeague = function (league) {
|
||
_this.props.dispatch(ActionsPokemonExplorer.setActiveLeague(league));
|
||
};
|
||
|
||
return _this;
|
||
}
|
||
|
||
_createClass(PokemonApp, [{
|
||
key: "componentWillMount",
|
||
value: function componentWillMount() {
|
||
return __awaiter(this, void 0, void 0,
|
||
/*#__PURE__*/
|
||
regeneratorRuntime.mark(function _callee() {
|
||
var _this$props2, location, dispatch, search, pokemonIdValue, pokemonId, pokemonFormValue, pokemonForm, activeLeagueValue, activeLeague;
|
||
|
||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||
while (1) {
|
||
switch (_context.prev = _context.next) {
|
||
case 0:
|
||
_this$props2 = this.props, location = _this$props2.location, dispatch = _this$props2.dispatch;
|
||
_context.next = 3;
|
||
return Promise.all([dispatch(ActionsPokemonExplorer.fetchConfig()), dispatch(ActionsPokemonSelectList.fetchPokemonList())]);
|
||
|
||
case 3:
|
||
dispatch(ActionsPokemonSelectList.setIsLoading(false));
|
||
search = new URLSearchParams(location.search);
|
||
pokemonIdValue = search.get('id');
|
||
pokemonId = pokemonIdValue !== null ? parseInt(pokemonIdValue, 10) : null;
|
||
pokemonFormValue = search.get('form');
|
||
pokemonForm = pokemonFormValue ? parseInt(pokemonFormValue, 10) : null;
|
||
|
||
if (pokemonId !== null && typeof pogo_protos_1.default.Enums.PokemonId[pokemonId] !== 'undefined' && pokemonForm !== null && typeof pogo_protos_1.default.Enums.Form[pokemonForm] !== 'undefined') {
|
||
this.handleActivatePokemon(pokemonId, pokemonForm);
|
||
}
|
||
|
||
activeLeagueValue = search.get('league');
|
||
activeLeague = activeLeagueValue ? parseInt(activeLeagueValue, 10) : null;
|
||
|
||
if (activeLeague !== null && typeof League_1.League[activeLeague] !== 'undefined') {
|
||
this.handleChangeLeague(activeLeague);
|
||
}
|
||
|
||
case 13:
|
||
case "end":
|
||
return _context.stop();
|
||
}
|
||
}
|
||
}, _callee, this);
|
||
}));
|
||
}
|
||
}, {
|
||
key: "render",
|
||
value: function render() {
|
||
var _this$props$pokemonSe = this.props.pokemonSelectListState,
|
||
activePokemonId = _this$props$pokemonSe.activePokemonId,
|
||
activePokemonForm = _this$props$pokemonSe.activePokemonForm,
|
||
pokemonList = _this$props$pokemonSe.pokemonList,
|
||
pokemonListFiltered = _this$props$pokemonSe.pokemonListFiltered,
|
||
filterTerm = _this$props$pokemonSe.filterTerm;
|
||
var _this$props$pokemonEx = this.props.pokemonExplorerState,
|
||
league = _this$props$pokemonEx.league,
|
||
individualValues = _this$props$pokemonEx.individualValues,
|
||
leaguePokemon = _this$props$pokemonEx.leaguePokemon;
|
||
return react_1.default.createElement("div", {
|
||
className: styles.wrapper
|
||
}, react_1.default.createElement(Header_1.Header, null), react_1.default.createElement("div", {
|
||
className: styles.body
|
||
}, react_1.default.createElement(PokemonSelectList_1.PokemonSelectList, {
|
||
isLoading: this.props.pokemonSelectListState.isLoading,
|
||
activePokemonId: activePokemonId,
|
||
activePokemonForm: activePokemonForm,
|
||
pokemonList: filterTerm === '' ? pokemonList : pokemonListFiltered,
|
||
filterTerm: this.props.pokemonSelectListState.filterTerm,
|
||
handleActivatePokemon: this.handleActivatePokemon,
|
||
handleChangeFilter: this.handleChangeFilter
|
||
}), leaguePokemon !== null && react_1.default.createElement(PokemonExplorer_1.PokemonExplorer, {
|
||
isLoading: this.props.pokemonExplorerState.isLoading,
|
||
activeLeague: league,
|
||
leaguePokemon: leaguePokemon,
|
||
individualValues: individualValues,
|
||
handleChangeIndividualValue: this.handleChangeIndividualValue,
|
||
handleMaximizeLevel: this.handleMaximizeLevel,
|
||
handleChangeLeague: this.handleChangeLeagueNavigation
|
||
})), react_1.default.createElement(Footer_1.Footer, null));
|
||
}
|
||
}]);
|
||
|
||
return PokemonApp;
|
||
}(react_1.default.Component);
|
||
|
||
var mapStateToProps = function mapStateToProps(state) {
|
||
return {
|
||
pokemonExplorerState: state.pokemonExplorerState,
|
||
pokemonSelectListState: state.pokemonSelectListState
|
||
};
|
||
};
|
||
|
||
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
||
return {
|
||
dispatch: dispatch
|
||
};
|
||
};
|
||
|
||
var mergeProps = function mergeProps(state, dispatchProps, ownProps) {
|
||
return Object.assign({}, state, dispatchProps, {
|
||
history: ownProps.history,
|
||
location: ownProps.location
|
||
});
|
||
};
|
||
|
||
exports.ConnectedPokemonApp = react_redux_1.connect(mapStateToProps, mapDispatchToProps, mergeProps)(PokemonApp);
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/Footer.tsx":
|
||
/*!******************************************!*\
|
||
!*** ./src/ts/app/components/Footer.tsx ***!
|
||
\******************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var __importDefault = this && this.__importDefault || function (mod) {
|
||
return mod && mod.__esModule ? mod : {
|
||
"default": mod
|
||
};
|
||
};
|
||
|
||
var __importStar = this && this.__importStar || function (mod) {
|
||
if (mod && mod.__esModule) return mod;
|
||
var result = {};
|
||
if (mod != null) for (var k in mod) {
|
||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||
}
|
||
result["default"] = mod;
|
||
return result;
|
||
};
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||
|
||
var styles = __importStar(__webpack_require__(/*! ../styles/PokemonApp.scss */ "./src/ts/app/styles/PokemonApp.scss"));
|
||
|
||
var Footer =
|
||
/*#__PURE__*/
|
||
function (_react_1$default$Comp) {
|
||
_inherits(Footer, _react_1$default$Comp);
|
||
|
||
function Footer() {
|
||
_classCallCheck(this, Footer);
|
||
|
||
return _possibleConstructorReturn(this, _getPrototypeOf(Footer).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(Footer, [{
|
||
key: "render",
|
||
value: function render() {
|
||
return react_1.default.createElement("footer", {
|
||
className: styles.footer
|
||
}, react_1.default.createElement("div", null));
|
||
}
|
||
}]);
|
||
|
||
return Footer;
|
||
}(react_1.default.Component);
|
||
|
||
exports.Footer = Footer;
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/Header.tsx":
|
||
/*!******************************************!*\
|
||
!*** ./src/ts/app/components/Header.tsx ***!
|
||
\******************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var __importDefault = this && this.__importDefault || function (mod) {
|
||
return mod && mod.__esModule ? mod : {
|
||
"default": mod
|
||
};
|
||
};
|
||
|
||
var __importStar = this && this.__importStar || function (mod) {
|
||
if (mod && mod.__esModule) return mod;
|
||
var result = {};
|
||
if (mod != null) for (var k in mod) {
|
||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||
}
|
||
result["default"] = mod;
|
||
return result;
|
||
};
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||
|
||
var styles = __importStar(__webpack_require__(/*! ../styles/PokemonApp.scss */ "./src/ts/app/styles/PokemonApp.scss"));
|
||
|
||
var Header =
|
||
/*#__PURE__*/
|
||
function (_react_1$default$Comp) {
|
||
_inherits(Header, _react_1$default$Comp);
|
||
|
||
function Header() {
|
||
_classCallCheck(this, Header);
|
||
|
||
return _possibleConstructorReturn(this, _getPrototypeOf(Header).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(Header, [{
|
||
key: "render",
|
||
value: function render() {
|
||
return react_1.default.createElement("header", {
|
||
className: styles.header
|
||
}, "Header");
|
||
}
|
||
}]);
|
||
|
||
return Header;
|
||
}(react_1.default.Component);
|
||
|
||
exports.Header = Header;
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonExplorer/IvForm.tsx":
|
||
/*!**********************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonExplorer/IvForm.tsx ***!
|
||
\**********************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var __importDefault = this && this.__importDefault || function (mod) {
|
||
return mod && mod.__esModule ? mod : {
|
||
"default": mod
|
||
};
|
||
};
|
||
|
||
var __importStar = this && this.__importStar || function (mod) {
|
||
if (mod && mod.__esModule) return mod;
|
||
var result = {};
|
||
if (mod != null) for (var k in mod) {
|
||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||
}
|
||
result["default"] = mod;
|
||
return result;
|
||
};
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||
|
||
var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"));
|
||
|
||
var styles = __importStar(__webpack_require__(/*! ./styles/IvForm.scss */ "./src/ts/app/components/PokemonExplorer/styles/IvForm.scss"));
|
||
|
||
var IvForm =
|
||
/*#__PURE__*/
|
||
function (_react_1$default$Comp) {
|
||
_inherits(IvForm, _react_1$default$Comp);
|
||
|
||
function IvForm(props) {
|
||
var _this;
|
||
|
||
_classCallCheck(this, IvForm);
|
||
|
||
_this = _possibleConstructorReturn(this, _getPrototypeOf(IvForm).call(this, props));
|
||
_this.MIN_LEVEL = 1;
|
||
_this.MAX_LEVEL = 40;
|
||
_this.MIN_IV = 0;
|
||
_this.MAX_IV = 15;
|
||
|
||
_this.handleChangeLevel = function (event) {
|
||
var raw = event.currentTarget.value;
|
||
var value = parseFloat(raw);
|
||
|
||
_this.setState({
|
||
form: {
|
||
level: ''
|
||
}
|
||
});
|
||
|
||
if (raw === '' + value && value >= _this.MIN_LEVEL && value <= _this.MAX_LEVEL && value % 0.5 === 0) {
|
||
_this.props.handleChangeIndividualValue('level', value);
|
||
} else if (raw === '') {
|
||
_this.props.handleChangeIndividualValue('level', null);
|
||
} else if (raw.charAt(raw.length) === '.') {
|
||
_this.setState({
|
||
form: {
|
||
level: raw
|
||
}
|
||
});
|
||
}
|
||
};
|
||
|
||
_this.handleClickMaximizeLevel = function () {
|
||
_this.props.handleMaximizeLevel();
|
||
};
|
||
|
||
_this.handleChangeIvFactory = function (type) {
|
||
return function (event) {
|
||
var raw = event.currentTarget.value;
|
||
var value = parseInt(raw, 10);
|
||
|
||
if (raw === '' + value && value >= _this.MIN_IV && value <= _this.MAX_IV) {
|
||
_this.props.handleChangeIndividualValue(type, value);
|
||
} else if (raw === '') {
|
||
_this.props.handleChangeIndividualValue(type, null);
|
||
}
|
||
};
|
||
};
|
||
|
||
_this.state = {
|
||
form: {
|
||
level: ''
|
||
}
|
||
};
|
||
_this.handleChangeHp = _this.handleChangeIvFactory('hp');
|
||
_this.handleChangeAtk = _this.handleChangeIvFactory('atk');
|
||
_this.handleChangeDef = _this.handleChangeIvFactory('def');
|
||
return _this;
|
||
}
|
||
|
||
_createClass(IvForm, [{
|
||
key: "render",
|
||
value: function render() {
|
||
var _this$props = this.props,
|
||
ivs = _this$props.ivs,
|
||
placeholder = _this$props.placeholder;
|
||
var idIvLevelInput = 'iv-level-input';
|
||
var idIvHpInput = 'iv-hp-input';
|
||
var idIvAtkInput = 'iv-atk-input';
|
||
var idIvDefInput = 'iv-def-input';
|
||
var fieldCss = classnames_1.default('nes-field');
|
||
var inlineFieldCss = classnames_1.default(fieldCss, 'is-inline', styles.fieldRow);
|
||
var inputTextCss = classnames_1.default('nes-input', styles.ivInput);
|
||
var inputTextLevelCss = classnames_1.default(inputTextCss, styles.levelInput);
|
||
var maxButtonCss = classnames_1.default('nes-btn', {
|
||
'is-primary': ivs.ivHp !== null && ivs.ivAtk !== null && ivs.ivDef !== null,
|
||
'is-disabled': ivs.ivHp === null || ivs.ivAtk === null || ivs.ivDef === null
|
||
});
|
||
var ivLevel = this.state.form.level !== '' ? parseInt(this.state.form.level, 10) : ivs.level;
|
||
var showPlaceholder = ivs.level === null && ivs.ivHp === null && ivs.ivAtk === null && ivs.ivDef === null;
|
||
return [react_1.default.createElement("div", {
|
||
key: "iv-form-row-1",
|
||
className: inlineFieldCss
|
||
}, react_1.default.createElement("label", {
|
||
htmlFor: idIvHpInput
|
||
}, "HP"), react_1.default.createElement("input", {
|
||
name: "hp",
|
||
type: "number",
|
||
id: idIvHpInput,
|
||
className: inputTextCss,
|
||
min: this.MIN_IV,
|
||
max: this.MAX_IV,
|
||
maxLength: 2,
|
||
onChange: this.handleChangeHp,
|
||
value: ivs.ivHp !== null ? ivs.ivHp : '',
|
||
placeholder: showPlaceholder ? '' + placeholder.ivHp : ''
|
||
}), react_1.default.createElement("label", {
|
||
htmlFor: idIvAtkInput
|
||
}, "ATK"), react_1.default.createElement("input", {
|
||
name: "atk",
|
||
type: "number",
|
||
id: idIvAtkInput,
|
||
className: inputTextCss,
|
||
min: this.MIN_IV,
|
||
max: this.MAX_IV,
|
||
maxLength: 2,
|
||
onChange: this.handleChangeAtk,
|
||
value: ivs.ivAtk !== null ? ivs.ivAtk : '',
|
||
placeholder: showPlaceholder ? '' + placeholder.ivAtk : ''
|
||
}), react_1.default.createElement("label", {
|
||
htmlFor: idIvDefInput
|
||
}, "DEF"), react_1.default.createElement("input", {
|
||
name: "def",
|
||
type: "number",
|
||
id: idIvDefInput,
|
||
className: inputTextCss,
|
||
min: this.MIN_IV,
|
||
max: this.MAX_IV,
|
||
maxLength: 2,
|
||
onChange: this.handleChangeDef,
|
||
value: ivs.ivDef !== null ? ivs.ivDef : '',
|
||
placeholder: showPlaceholder ? '' + placeholder.ivDef : ''
|
||
})), react_1.default.createElement("div", {
|
||
key: "iv-form-row-2",
|
||
className: inlineFieldCss
|
||
}, react_1.default.createElement("div", {
|
||
className: inlineFieldCss
|
||
}, react_1.default.createElement("label", {
|
||
htmlFor: idIvLevelInput
|
||
}, "Lv"), react_1.default.createElement("input", {
|
||
name: "level",
|
||
type: "number",
|
||
id: idIvLevelInput,
|
||
className: inputTextLevelCss,
|
||
min: this.MIN_LEVEL,
|
||
max: this.MAX_LEVEL,
|
||
step: 0.5,
|
||
onChange: this.handleChangeLevel,
|
||
value: ivLevel !== null ? ivLevel : '',
|
||
placeholder: showPlaceholder ? '' + placeholder.level : ''
|
||
})), react_1.default.createElement("button", {
|
||
type: "button",
|
||
className: maxButtonCss,
|
||
disabled: ivs.ivHp === null || ivs.ivAtk === null || ivs.ivDef === null,
|
||
onClick: this.handleClickMaximizeLevel
|
||
}, "MAX LEAGUE Lv"))];
|
||
}
|
||
}]);
|
||
|
||
return IvForm;
|
||
}(react_1.default.Component);
|
||
|
||
exports.IvForm = IvForm;
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonExplorer/LeagueSelector.tsx":
|
||
/*!******************************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonExplorer/LeagueSelector.tsx ***!
|
||
\******************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var __importDefault = this && this.__importDefault || function (mod) {
|
||
return mod && mod.__esModule ? mod : {
|
||
"default": mod
|
||
};
|
||
};
|
||
|
||
var __importStar = this && this.__importStar || function (mod) {
|
||
if (mod && mod.__esModule) return mod;
|
||
var result = {};
|
||
if (mod != null) for (var k in mod) {
|
||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||
}
|
||
result["default"] = mod;
|
||
return result;
|
||
};
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||
|
||
var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"));
|
||
|
||
var League_1 = __webpack_require__(/*! app/models/League */ "./src/ts/app/models/League.ts");
|
||
|
||
var styles = __importStar(__webpack_require__(/*! ./styles/LeagueSelector.scss */ "./src/ts/app/components/PokemonExplorer/styles/LeagueSelector.scss"));
|
||
|
||
var LeagueSelector =
|
||
/*#__PURE__*/
|
||
function (_react_1$default$Comp) {
|
||
_inherits(LeagueSelector, _react_1$default$Comp);
|
||
|
||
function LeagueSelector() {
|
||
var _this;
|
||
|
||
_classCallCheck(this, LeagueSelector);
|
||
|
||
_this = _possibleConstructorReturn(this, _getPrototypeOf(LeagueSelector).apply(this, arguments));
|
||
|
||
_this.handleLeagueSelectFactory = function (league) {
|
||
return function () {
|
||
_this.props.handleLeagueSelect(league);
|
||
};
|
||
};
|
||
|
||
return _this;
|
||
}
|
||
|
||
_createClass(LeagueSelector, [{
|
||
key: "render",
|
||
value: function render() {
|
||
var _this2 = this;
|
||
|
||
var activeLeague = this.props.activeLeague; // LeagueLabels.map((league, index) => {
|
||
// const buttonCss = classNames(
|
||
// 'nes-btn',
|
||
// {
|
||
// [ styles.greatLeagueButton ]: league.id === 'great',
|
||
// [ styles.ultraLeagueButton ]: league.id === 'ultra',
|
||
// [ styles.masterLeagueButton ]: league.id === 'master',
|
||
// [ styles.customLeagueButton ]: league.id === 'custom',
|
||
// [ styles.active ]: activeLeague === league.id,
|
||
// }
|
||
// );
|
||
// return <button
|
||
// key={ league.id + index }
|
||
// className={ buttonCss }
|
||
// onClick={ this.handleLeagueSelectFactory(league.id) }
|
||
// >
|
||
// <i className={ pokeballCss } />
|
||
// { league.label }
|
||
// </button>;
|
||
// })
|
||
|
||
return react_1.default.createElement("div", {
|
||
className: styles.wrapper
|
||
}, League_1.LeagueLabels.map(function (league, index) {
|
||
var pokeballCss = classnames_1.default('pokeball', {
|
||
// 'premier-ball': league.id === 'raid',
|
||
'great-ball': league.id === League_1.League.GREAT,
|
||
'ultra-ball': league.id === League_1.League.ULTRA,
|
||
'master-ball': league.id === League_1.League.MASTER,
|
||
'ball-open': activeLeague === league.id
|
||
});
|
||
return react_1.default.createElement("label", {
|
||
key: league.id + index,
|
||
className: styles.leagueRadioLabel
|
||
}, react_1.default.createElement("input", {
|
||
className: styles.leagueRadio,
|
||
type: "radio",
|
||
value: league.id,
|
||
checked: activeLeague === league.id,
|
||
onChange: _this2.handleLeagueSelectFactory(league.id)
|
||
}), react_1.default.createElement("i", {
|
||
className: pokeballCss
|
||
}), react_1.default.createElement("span", null, league.label));
|
||
}));
|
||
}
|
||
}]);
|
||
|
||
return LeagueSelector;
|
||
}(react_1.default.Component);
|
||
|
||
exports.LeagueSelector = LeagueSelector;
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonExplorer/LeagueStatsList.tsx":
|
||
/*!*******************************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonExplorer/LeagueStatsList.tsx ***!
|
||
\*******************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var __importDefault = this && this.__importDefault || function (mod) {
|
||
return mod && mod.__esModule ? mod : {
|
||
"default": mod
|
||
};
|
||
};
|
||
|
||
var __importStar = this && this.__importStar || function (mod) {
|
||
if (mod && mod.__esModule) return mod;
|
||
var result = {};
|
||
if (mod != null) for (var k in mod) {
|
||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||
}
|
||
result["default"] = mod;
|
||
return result;
|
||
};
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||
|
||
var react_measure_1 = __importDefault(__webpack_require__(/*! react-measure */ "./node_modules/react-measure/dist/index.esm.js"));
|
||
|
||
var react_window_1 = __webpack_require__(/*! react-window */ "./node_modules/react-window/dist/index.esm.js");
|
||
|
||
var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"));
|
||
|
||
var Pokemon_1 = __webpack_require__(/*! app/models/Pokemon */ "./src/ts/app/models/Pokemon.ts");
|
||
|
||
var styles = __importStar(__webpack_require__(/*! ./styles/LeagueStatsList.scss */ "./src/ts/app/components/PokemonExplorer/styles/LeagueStatsList.scss"));
|
||
|
||
var LeagueStatsList =
|
||
/*#__PURE__*/
|
||
function (_react_1$default$Comp) {
|
||
_inherits(LeagueStatsList, _react_1$default$Comp);
|
||
|
||
function LeagueStatsList(props) {
|
||
var _this;
|
||
|
||
_classCallCheck(this, LeagueStatsList);
|
||
|
||
_this = _possibleConstructorReturn(this, _getPrototypeOf(LeagueStatsList).call(this, props));
|
||
_this.state = {
|
||
activeIndex: -1,
|
||
dimensions: {
|
||
width: -1,
|
||
height: -1
|
||
}
|
||
};
|
||
_this.listRef = react_1.default.createRef();
|
||
return _this;
|
||
}
|
||
|
||
_createClass(LeagueStatsList, [{
|
||
key: "componentWillReceiveProps",
|
||
value: function componentWillReceiveProps(nextProps) {
|
||
var _this2 = this;
|
||
|
||
var activeIvs = nextProps.activeIndividualValues;
|
||
|
||
if (nextProps.activePokemonId !== this.props.activePokemonId || nextProps.activePokemonForm !== this.props.activePokemonForm) {
|
||
this.setState({
|
||
activeIndex: -1
|
||
});
|
||
|
||
if (this.listRef.current !== null) {
|
||
this.listRef.current.scrollToItem(0);
|
||
}
|
||
} else if (activeIvs.level !== null && activeIvs.ivHp !== null && activeIvs.ivAtk !== null && activeIvs.ivDef !== null) {
|
||
var activeIndex = this.state.activeIndex;
|
||
|
||
if (activeIndex === -1) {
|
||
// there is no current index, wich means the user is entering in the IVs by hand
|
||
// now we will look through the list to see if we can find a match
|
||
this.props.leagueStatsList.some(function (stats, index) {
|
||
if (activeIvs.ivHp === stats.ivHp && activeIvs.ivAtk === stats.ivAtk && activeIvs.ivDef === stats.ivDef) {
|
||
_this2.setState({
|
||
activeIndex: index
|
||
});
|
||
|
||
activeIndex = index;
|
||
return true;
|
||
}
|
||
|
||
return false;
|
||
});
|
||
}
|
||
|
||
if (activeIndex > -1) {
|
||
var stateStats = this.props.leagueStatsList[activeIndex];
|
||
|
||
if (activeIvs.ivHp === stateStats.ivHp && activeIvs.ivAtk === stateStats.ivAtk && activeIvs.ivDef === stateStats.ivDef) {
|
||
// the current IVs belong to the stats at the active index, so scroll to active stats
|
||
if (this.listRef.current !== null) {
|
||
this.listRef.current.scrollToItem(activeIndex, 'center');
|
||
}
|
||
} else {
|
||
// the current IVs have changed since we last scrolled to the active stats, so unset the active index
|
||
this.setState({
|
||
activeIndex: -1
|
||
});
|
||
}
|
||
}
|
||
} else {
|
||
this.setState({
|
||
activeIndex: -1
|
||
});
|
||
}
|
||
}
|
||
}, {
|
||
key: "render",
|
||
value: function render() {
|
||
var _this3 = this;
|
||
|
||
var _this$state$dimension = this.state.dimensions,
|
||
width = _this$state$dimension.width,
|
||
height = _this$state$dimension.height;
|
||
|
||
var onResize = function onResize(contentRect) {
|
||
if (typeof contentRect.bounds !== 'undefined') {
|
||
_this3.setState({
|
||
dimensions: contentRect.bounds
|
||
});
|
||
}
|
||
};
|
||
|
||
return react_1.default.createElement("div", {
|
||
className: styles.selectList
|
||
}, react_1.default.createElement(react_measure_1.default, {
|
||
bounds: true,
|
||
onResize: onResize
|
||
}, function (_ref) {
|
||
var measureRef = _ref.measureRef;
|
||
return react_1.default.createElement("div", {
|
||
ref: measureRef
|
||
}, react_1.default.createElement(react_window_1.FixedSizeList, {
|
||
ref: _this3.listRef,
|
||
height: height,
|
||
itemCount: _this3.props.leagueStatsList.length,
|
||
itemSize: 35,
|
||
width: width
|
||
}, _this3.rowFactory.bind(_this3)));
|
||
}));
|
||
}
|
||
}, {
|
||
key: "padString",
|
||
value: function padString(value, length) {
|
||
var output = value;
|
||
|
||
for (var i = length - value.length; i > 0; i--) {
|
||
output += String.fromCharCode(160);
|
||
}
|
||
|
||
return output;
|
||
}
|
||
}, {
|
||
key: "rowFactory",
|
||
value: function rowFactory(_ref2) {
|
||
var _this4 = this;
|
||
|
||
var index = _ref2.index,
|
||
style = _ref2.style;
|
||
var activeIvs = this.props.activeIndividualValues;
|
||
var stats = this.props.leagueStatsList[index];
|
||
var css = classnames_1.default('list-item', // global style
|
||
styles.listItem, {
|
||
active: activeIvs.level === stats.level && activeIvs.ivHp === stats.ivHp && activeIvs.ivAtk === stats.ivAtk && activeIvs.ivDef === stats.ivDef,
|
||
highlight: this.state.activeIndex === index
|
||
});
|
||
|
||
var onClick = function onClick() {
|
||
_this4.props.handleActivateLeagueStats(stats);
|
||
|
||
_this4.setState({
|
||
activeIndex: index
|
||
});
|
||
};
|
||
|
||
return react_1.default.createElement("a", {
|
||
key: index,
|
||
style: style,
|
||
className: css,
|
||
onClick: onClick
|
||
}, react_1.default.createElement("span", null, Pokemon_1.Grade[stats.speciesGrade]), react_1.default.createElement("span", null, this.padString(stats.cp.toString(), 4)), react_1.default.createElement("span", null, this.padString(stats.level.toString(), 4)), react_1.default.createElement("span", null, this.padString(stats.ivHp.toString(), 2)), react_1.default.createElement("span", null, this.padString(stats.ivAtk.toString(), 2)), react_1.default.createElement("span", null, this.padString(stats.ivDef.toString(), 2)));
|
||
}
|
||
}]);
|
||
|
||
return LeagueStatsList;
|
||
}(react_1.default.Component);
|
||
|
||
exports.LeagueStatsList = LeagueStatsList;
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonExplorer/PokemonExplorer.tsx":
|
||
/*!*******************************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonExplorer/PokemonExplorer.tsx ***!
|
||
\*******************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var __importDefault = this && this.__importDefault || function (mod) {
|
||
return mod && mod.__esModule ? mod : {
|
||
"default": mod
|
||
};
|
||
};
|
||
|
||
var __importStar = this && this.__importStar || function (mod) {
|
||
if (mod && mod.__esModule) return mod;
|
||
var result = {};
|
||
if (mod != null) for (var k in mod) {
|
||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||
}
|
||
result["default"] = mod;
|
||
return result;
|
||
};
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var pogo_protos_1 = __importDefault(__webpack_require__(/*! pogo-protos */ "./node_modules/pogo-protos/index.js"));
|
||
|
||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||
|
||
var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"));
|
||
|
||
var League_1 = __webpack_require__(/*! app/models/League */ "./src/ts/app/models/League.ts");
|
||
|
||
var Pokemon_1 = __webpack_require__(/*! app/models/Pokemon */ "./src/ts/app/models/Pokemon.ts");
|
||
|
||
var calculator_1 = __webpack_require__(/*! app/utils/calculator */ "./src/ts/app/utils/calculator.ts");
|
||
|
||
var formatter_1 = __webpack_require__(/*! app/utils/formatter */ "./src/ts/app/utils/formatter.ts");
|
||
|
||
var IvForm_1 = __webpack_require__(/*! ./IvForm */ "./src/ts/app/components/PokemonExplorer/IvForm.tsx");
|
||
|
||
var LeagueSelector_1 = __webpack_require__(/*! ./LeagueSelector */ "./src/ts/app/components/PokemonExplorer/LeagueSelector.tsx");
|
||
|
||
var LeagueStatsList_1 = __webpack_require__(/*! ./LeagueStatsList */ "./src/ts/app/components/PokemonExplorer/LeagueStatsList.tsx");
|
||
|
||
var StatDisplay_1 = __webpack_require__(/*! ./StatDisplay */ "./src/ts/app/components/PokemonExplorer/StatDisplay.tsx");
|
||
|
||
var styles = __importStar(__webpack_require__(/*! ./styles/PokemonExplorer.scss */ "./src/ts/app/components/PokemonExplorer/styles/PokemonExplorer.scss"));
|
||
|
||
var IvDisplayMode;
|
||
|
||
(function (IvDisplayMode) {
|
||
IvDisplayMode["MANUAL"] = "manual";
|
||
IvDisplayMode["LIST"] = "list";
|
||
})(IvDisplayMode || (IvDisplayMode = {}));
|
||
|
||
var PokemonExplorer =
|
||
/*#__PURE__*/
|
||
function (_react_1$default$Comp) {
|
||
_inherits(PokemonExplorer, _react_1$default$Comp);
|
||
|
||
function PokemonExplorer(props) {
|
||
var _this;
|
||
|
||
_classCallCheck(this, PokemonExplorer);
|
||
|
||
_this = _possibleConstructorReturn(this, _getPrototypeOf(PokemonExplorer).call(this, props));
|
||
|
||
_this.handleActivateLeagueStats = function (stats) {
|
||
var handleChangeIndividualValue = _this.props.handleChangeIndividualValue;
|
||
handleChangeIndividualValue('level', stats.level);
|
||
handleChangeIndividualValue('hp', stats.ivHp);
|
||
handleChangeIndividualValue('atk', stats.ivAtk);
|
||
handleChangeIndividualValue('def', stats.ivDef);
|
||
};
|
||
|
||
_this.handleLeagueSelect = function (league) {
|
||
_this.props.handleChangeLeague(league);
|
||
};
|
||
|
||
_this.handleIvDisplayModeManual = function () {
|
||
_this.setState({
|
||
ivDisplayMode: IvDisplayMode.MANUAL
|
||
});
|
||
};
|
||
|
||
_this.handleIvDisplayModeList = function () {
|
||
_this.setState({
|
||
ivDisplayMode: IvDisplayMode.LIST
|
||
});
|
||
};
|
||
|
||
_this.state = {
|
||
ivDisplayMode: IvDisplayMode.MANUAL
|
||
};
|
||
return _this;
|
||
}
|
||
|
||
_createClass(PokemonExplorer, [{
|
||
key: "render",
|
||
value: function render() {
|
||
var _this$props = this.props,
|
||
activeLeague = _this$props.activeLeague,
|
||
individualValues = _this$props.individualValues,
|
||
leaguePokemon = _this$props.leaguePokemon,
|
||
handleChangeIndividualValue = _this$props.handleChangeIndividualValue,
|
||
handleMaximizeLevel = _this$props.handleMaximizeLevel;
|
||
var ivDisplayMode = this.state.ivDisplayMode;
|
||
var rankedPokemon = null;
|
||
var dex = formatter_1.formatDexNumber(leaguePokemon.dex); // default to first pokemon (should be S tier)
|
||
|
||
if (individualValues.level === null && individualValues.ivHp === null && individualValues.ivAtk === null && individualValues.ivDef === null) {
|
||
rankedPokemon = leaguePokemon.pvp[activeLeague][0]; // a full spec'd pokemon has been entered
|
||
} else if (individualValues.level !== null && individualValues.ivHp !== null && individualValues.ivAtk !== null && individualValues.ivDef !== null) {
|
||
leaguePokemon.pvp[activeLeague].some(function (stats) {
|
||
if (individualValues.level === stats.level && individualValues.ivHp === stats.ivHp && individualValues.ivAtk === stats.ivAtk && individualValues.ivDef === stats.ivDef) {
|
||
rankedPokemon = stats;
|
||
return true;
|
||
}
|
||
|
||
return false;
|
||
}); // we don't have the data for this terrible mon
|
||
|
||
if (rankedPokemon === null) {
|
||
rankedPokemon = {
|
||
cp: calculator_1.calculateCp(leaguePokemon.stats, individualValues.level, individualValues.ivHp, individualValues.ivAtk, individualValues.ivDef),
|
||
level: individualValues.level,
|
||
ivHp: individualValues.ivHp,
|
||
ivAtk: individualValues.ivAtk,
|
||
ivDef: individualValues.ivDef,
|
||
hp: calculator_1.calculateStatAtLevel(individualValues.level, leaguePokemon.stats.baseStamina, individualValues.ivHp),
|
||
atk: calculator_1.calculateStatAtLevel(individualValues.level, leaguePokemon.stats.baseAttack, individualValues.ivAtk),
|
||
def: calculator_1.calculateStatAtLevel(individualValues.level, leaguePokemon.stats.baseDefense, individualValues.ivDef),
|
||
total: 0,
|
||
speciesGrade: Pokemon_1.Grade.F,
|
||
metaGrade: Pokemon_1.Grade.F
|
||
};
|
||
rankedPokemon.total = rankedPokemon.hp + rankedPokemon.atk + rankedPokemon.def;
|
||
}
|
||
}
|
||
|
||
var rankedGrade = rankedPokemon !== null ? Pokemon_1.Grade[rankedPokemon.speciesGrade] : '-';
|
||
var rankedCp = rankedPokemon !== null ? rankedPokemon.cp : '-';
|
||
|
||
var _PokemonExplorer$calc = PokemonExplorer.calculateStatRanks(rankedPokemon, leaguePokemon.statMax[activeLeague]),
|
||
rankedHp = _PokemonExplorer$calc.rankedHp,
|
||
rankedAtk = _PokemonExplorer$calc.rankedAtk,
|
||
rankedDef = _PokemonExplorer$calc.rankedDef,
|
||
staminaStatRank = _PokemonExplorer$calc.staminaStatRank,
|
||
attackStatRank = _PokemonExplorer$calc.attackStatRank,
|
||
defenseStatRank = _PokemonExplorer$calc.defenseStatRank;
|
||
|
||
var containerCss = classnames_1.default('nes-container', 'with-title');
|
||
var containerRoundCss = classnames_1.default(containerCss, 'is-rounded');
|
||
var pokemonType = classnames_1.default(containerRoundCss, styles.pokemonType);
|
||
var containerTitleCss = classnames_1.default('title');
|
||
var ivContainerTitleCss = classnames_1.default(containerTitleCss, styles.ivContainerTitle);
|
||
var baseStatsCss = classnames_1.default(styles.pokemonBaseStats, containerCss);
|
||
var formContainerCss = classnames_1.default(containerCss, styles.ivsContainer, 'form', _defineProperty({}, styles.diplayingIvList, ivDisplayMode === IvDisplayMode.LIST));
|
||
var leaugeRankCss = classnames_1.default(styles.leaguePokemonRank, containerCss, {
|
||
'with-title': false
|
||
});
|
||
var pokemonIconCss = classnames_1.default("pokemon-".concat(dex), {
|
||
normal: formatter_1.Forms.normal.indexOf(leaguePokemon.form) > -1,
|
||
alola: formatter_1.Forms.alola.indexOf(leaguePokemon.form) > -1,
|
||
plant: formatter_1.Forms.plant.indexOf(leaguePokemon.form) > -1,
|
||
sandy: formatter_1.Forms.sandy.indexOf(leaguePokemon.form) > -1,
|
||
trash: formatter_1.Forms.trash.indexOf(leaguePokemon.form) > -1,
|
||
'west-sea': formatter_1.Forms.westSea.indexOf(leaguePokemon.form) > -1,
|
||
'east-sea': formatter_1.Forms.eastSea.indexOf(leaguePokemon.form) > -1,
|
||
frost: formatter_1.Forms.frost.indexOf(leaguePokemon.form) > -1,
|
||
fan: formatter_1.Forms.fan.indexOf(leaguePokemon.form) > -1,
|
||
mow: formatter_1.Forms.mow.indexOf(leaguePokemon.form) > -1,
|
||
wash: formatter_1.Forms.wash.indexOf(leaguePokemon.form) > -1,
|
||
heat: formatter_1.Forms.heat.indexOf(leaguePokemon.form) > -1,
|
||
sky: formatter_1.Forms.sky.indexOf(leaguePokemon.form) > -1,
|
||
land: formatter_1.Forms.land.indexOf(leaguePokemon.form) > -1,
|
||
overcast: formatter_1.Forms.overcast.indexOf(leaguePokemon.form) > -1,
|
||
sunny: formatter_1.Forms.sunny.indexOf(leaguePokemon.form) > -1,
|
||
rainy: formatter_1.Forms.rainy.indexOf(leaguePokemon.form) > -1,
|
||
snowy: formatter_1.Forms.snowy.indexOf(leaguePokemon.form) > -1,
|
||
attack: formatter_1.Forms.attack.indexOf(leaguePokemon.form) > -1,
|
||
defense: formatter_1.Forms.defense.indexOf(leaguePokemon.form) > -1,
|
||
speed: formatter_1.Forms.speed.indexOf(leaguePokemon.form) > -1,
|
||
altered: formatter_1.Forms.altered.indexOf(leaguePokemon.form) > -1,
|
||
origin: formatter_1.Forms.origin.indexOf(leaguePokemon.form) > -1,
|
||
fighting: formatter_1.Forms.fighting.indexOf(leaguePokemon.form) > -1,
|
||
flying: formatter_1.Forms.flying.indexOf(leaguePokemon.form) > -1,
|
||
poison: formatter_1.Forms.poison.indexOf(leaguePokemon.form) > -1,
|
||
ground: formatter_1.Forms.ground.indexOf(leaguePokemon.form) > -1,
|
||
rock: formatter_1.Forms.rock.indexOf(leaguePokemon.form) > -1,
|
||
bug: formatter_1.Forms.bug.indexOf(leaguePokemon.form) > -1,
|
||
ghost: formatter_1.Forms.ghost.indexOf(leaguePokemon.form) > -1,
|
||
steel: formatter_1.Forms.steel.indexOf(leaguePokemon.form) > -1,
|
||
fire: formatter_1.Forms.fire.indexOf(leaguePokemon.form) > -1,
|
||
water: formatter_1.Forms.water.indexOf(leaguePokemon.form) > -1,
|
||
grass: formatter_1.Forms.grass.indexOf(leaguePokemon.form) > -1,
|
||
electric: formatter_1.Forms.electric.indexOf(leaguePokemon.form) > -1,
|
||
psychic: formatter_1.Forms.psychic.indexOf(leaguePokemon.form) > -1,
|
||
ice: formatter_1.Forms.ice.indexOf(leaguePokemon.form) > -1,
|
||
dragon: formatter_1.Forms.dragon.indexOf(leaguePokemon.form) > -1,
|
||
dark: formatter_1.Forms.dark.indexOf(leaguePokemon.form) > -1,
|
||
fairy: formatter_1.Forms.fairy.indexOf(leaguePokemon.form) > -1
|
||
});
|
||
var type1 = react_1.default.createElement("div", {
|
||
className: "".concat(pokemonType, " ").concat(formatter_1.formatType(leaguePokemon.types.type1))
|
||
}, formatter_1.formatType(leaguePokemon.types.type1));
|
||
var type2 = null;
|
||
|
||
if (leaguePokemon.types.type2) {
|
||
type2 = react_1.default.createElement("div", {
|
||
className: "".concat(pokemonType, " ").concat(formatter_1.formatType(leaguePokemon.types.type2))
|
||
}, formatter_1.formatType(leaguePokemon.types.type2));
|
||
}
|
||
|
||
return react_1.default.createElement("div", {
|
||
className: styles.wrapper
|
||
}, react_1.default.createElement("div", {
|
||
className: styles.pokemonInfoWrapper
|
||
}, react_1.default.createElement("div", {
|
||
className: styles.pokemonInfoLeftColumn
|
||
}, react_1.default.createElement("i", {
|
||
className: pokemonIconCss
|
||
}), react_1.default.createElement("h4", {
|
||
className: styles.dexHeader
|
||
}, "No.", dex), react_1.default.createElement("div", {
|
||
className: styles.pokemonTypeWrapper
|
||
}, type1, type2), leaguePokemon.form !== pogo_protos_1.default.Enums.Form.FORM_UNSET && react_1.default.createElement("h6", {
|
||
className: styles.formHeader
|
||
}, formatter_1.formatForm(leaguePokemon.form), " Form")), react_1.default.createElement("div", {
|
||
className: styles.pokemonInfoRightColumn
|
||
}, react_1.default.createElement("h2", {
|
||
className: styles.pokemonName
|
||
}, leaguePokemon.name), react_1.default.createElement("h5", null, leaguePokemon.genus), react_1.default.createElement("section", {
|
||
className: baseStatsCss
|
||
}, react_1.default.createElement("h3", {
|
||
className: containerTitleCss
|
||
}, "Base Stats"), react_1.default.createElement(StatDisplay_1.StatDisplay, {
|
||
statLabel: "HP".concat(String.fromCharCode(160)),
|
||
statValue: leaguePokemon.stats.baseStamina,
|
||
statRank: leaguePokemon.statsRank.staminaRank
|
||
}), react_1.default.createElement(StatDisplay_1.StatDisplay, {
|
||
statLabel: "ATK",
|
||
statValue: leaguePokemon.stats.baseAttack,
|
||
statRank: leaguePokemon.statsRank.attackRank
|
||
}), react_1.default.createElement(StatDisplay_1.StatDisplay, {
|
||
statLabel: "DEF",
|
||
statValue: leaguePokemon.stats.baseDefense,
|
||
statRank: leaguePokemon.statsRank.defenseRank
|
||
})))), react_1.default.createElement(LeagueSelector_1.LeagueSelector, {
|
||
activeLeague: activeLeague,
|
||
handleLeagueSelect: this.handleLeagueSelect
|
||
}), react_1.default.createElement("section", {
|
||
className: formContainerCss
|
||
}, react_1.default.createElement("h5", {
|
||
className: ivContainerTitleCss
|
||
}, react_1.default.createElement("span", null, "IVs"), react_1.default.createElement("label", null, react_1.default.createElement("input", {
|
||
className: "nes-radio",
|
||
type: "radio",
|
||
value: "manual",
|
||
checked: ivDisplayMode === IvDisplayMode.MANUAL,
|
||
onChange: this.handleIvDisplayModeManual
|
||
}), " ", react_1.default.createElement("span", null, "Manual")), react_1.default.createElement("label", null, react_1.default.createElement("input", {
|
||
className: "nes-radio",
|
||
type: "radio",
|
||
value: "list",
|
||
checked: ivDisplayMode === IvDisplayMode.LIST,
|
||
onChange: this.handleIvDisplayModeList
|
||
}), " ", react_1.default.createElement("span", null, "List"))), ivDisplayMode === IvDisplayMode.MANUAL && react_1.default.createElement(IvForm_1.IvForm, {
|
||
ivs: individualValues,
|
||
placeholder: leaguePokemon.pvp[activeLeague][0],
|
||
handleChangeIndividualValue: handleChangeIndividualValue,
|
||
handleMaximizeLevel: handleMaximizeLevel
|
||
}), ivDisplayMode === IvDisplayMode.LIST && react_1.default.createElement(LeagueStatsList_1.LeagueStatsList, {
|
||
activePokemonId: leaguePokemon.id,
|
||
activePokemonForm: leaguePokemon.form,
|
||
activeIndividualValues: individualValues,
|
||
leagueStatsList: leaguePokemon.pvp[activeLeague],
|
||
handleActivateLeagueStats: this.handleActivateLeagueStats
|
||
})), react_1.default.createElement("section", {
|
||
className: leaugeRankCss
|
||
}, react_1.default.createElement("h5", {
|
||
className: containerTitleCss
|
||
}, "Rank"), react_1.default.createElement("div", {
|
||
className: styles.pokemonInfoWraper
|
||
}, react_1.default.createElement("div", {
|
||
className: styles.pokemonInfoLeftColumn
|
||
}, rankedPokemon === null || rankedPokemon.cp > League_1.MaxCpByLeague[activeLeague] && react_1.default.createElement("div", null, react_1.default.createElement("h1", {
|
||
className: styles.pokemonRankValue
|
||
}, "N/A")), rankedPokemon !== null && rankedPokemon.cp <= League_1.MaxCpByLeague[activeLeague] && react_1.default.createElement("div", null, react_1.default.createElement("h1", {
|
||
className: styles.pokemonRankValue
|
||
}, rankedGrade), " Rank"), react_1.default.createElement("div", null, "CP ", react_1.default.createElement("h1", {
|
||
className: styles.pokemonRankValue
|
||
}, rankedCp))), react_1.default.createElement("div", {
|
||
className: styles.pokemonInfoRightColumn
|
||
}, react_1.default.createElement(StatDisplay_1.StatDisplay, {
|
||
statLabel: "HP".concat(String.fromCharCode(160)),
|
||
statValue: rankedHp,
|
||
statRank: staminaStatRank
|
||
}), react_1.default.createElement(StatDisplay_1.StatDisplay, {
|
||
statLabel: "ATK",
|
||
statValue: rankedAtk,
|
||
statRank: attackStatRank
|
||
}), react_1.default.createElement(StatDisplay_1.StatDisplay, {
|
||
statLabel: "DEF",
|
||
statValue: rankedDef,
|
||
statRank: defenseStatRank
|
||
})))));
|
||
}
|
||
}], [{
|
||
key: "calculateStatRanks",
|
||
value: function calculateStatRanks(rankedPokemon, stats) {
|
||
var rankedHp = rankedPokemon !== null ? rankedPokemon.hp : 0;
|
||
var rankedAtk = rankedPokemon !== null ? rankedPokemon.atk : 0;
|
||
var rankedDef = rankedPokemon !== null ? rankedPokemon.def : 0;
|
||
var maxStamina = stats.stamina;
|
||
var staminaStatRank = Math.floor((rankedHp - maxStamina.worst) / (maxStamina.best - maxStamina.worst) * 100);
|
||
var maxAttack = stats.attack;
|
||
var attackStatRank = Math.floor((rankedAtk - maxAttack.worst) / (maxAttack.best - maxAttack.worst) * 100);
|
||
var maxDefense = stats.defense;
|
||
var defenseStatRank = Math.floor((rankedDef - maxDefense.worst) / (maxDefense.best - maxDefense.worst) * 100);
|
||
return {
|
||
rankedHp: rankedHp,
|
||
rankedAtk: rankedAtk,
|
||
rankedDef: rankedDef,
|
||
staminaStatRank: staminaStatRank,
|
||
attackStatRank: attackStatRank,
|
||
defenseStatRank: defenseStatRank
|
||
};
|
||
}
|
||
}]);
|
||
|
||
return PokemonExplorer;
|
||
}(react_1.default.Component);
|
||
|
||
exports.PokemonExplorer = PokemonExplorer;
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonExplorer/StatDisplay.tsx":
|
||
/*!***************************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonExplorer/StatDisplay.tsx ***!
|
||
\***************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var __importDefault = this && this.__importDefault || function (mod) {
|
||
return mod && mod.__esModule ? mod : {
|
||
"default": mod
|
||
};
|
||
};
|
||
|
||
var __importStar = this && this.__importStar || function (mod) {
|
||
if (mod && mod.__esModule) return mod;
|
||
var result = {};
|
||
if (mod != null) for (var k in mod) {
|
||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||
}
|
||
result["default"] = mod;
|
||
return result;
|
||
};
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||
|
||
var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"));
|
||
|
||
var styles = __importStar(__webpack_require__(/*! ./styles/StatDisplay.scss */ "./src/ts/app/components/PokemonExplorer/styles/StatDisplay.scss"));
|
||
|
||
var StatDisplay =
|
||
/*#__PURE__*/
|
||
function (_react_1$default$Comp) {
|
||
_inherits(StatDisplay, _react_1$default$Comp);
|
||
|
||
function StatDisplay() {
|
||
_classCallCheck(this, StatDisplay);
|
||
|
||
return _possibleConstructorReturn(this, _getPrototypeOf(StatDisplay).apply(this, arguments));
|
||
}
|
||
|
||
_createClass(StatDisplay, [{
|
||
key: "render",
|
||
value: function render() {
|
||
var _this$props = this.props,
|
||
statLabel = _this$props.statLabel,
|
||
statValue = _this$props.statValue,
|
||
statRank = _this$props.statRank;
|
||
var progressStatCss = classnames_1.default('nes-progress', {
|
||
'is-success': statRank > 66,
|
||
'is-warning': statRank >= 34 && statRank <= 66,
|
||
'is-error': statRank < 34
|
||
});
|
||
var spacer = ' ';
|
||
var displayValue = statValue;
|
||
|
||
if (statValue === null) {
|
||
displayValue = '-';
|
||
spacer += String.fromCharCode(160) + String.fromCharCode(160);
|
||
} else if (statValue < 100) {
|
||
spacer += String.fromCharCode(160);
|
||
|
||
if (statValue < 10) {
|
||
spacer += String.fromCharCode(160);
|
||
}
|
||
}
|
||
|
||
return react_1.default.createElement("div", {
|
||
className: styles.baseStatRow
|
||
}, react_1.default.createElement("span", null, statLabel, spacer, displayValue), react_1.default.createElement("progress", {
|
||
className: progressStatCss,
|
||
max: 100,
|
||
value: statRank,
|
||
title: "".concat(statRank, "%")
|
||
}, statRank, "%"));
|
||
}
|
||
}]);
|
||
|
||
return StatDisplay;
|
||
}(react_1.default.Component);
|
||
|
||
exports.StatDisplay = StatDisplay;
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonExplorer/actions.ts":
|
||
/*!**********************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonExplorer/actions.ts ***!
|
||
\**********************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
var _this = this;
|
||
|
||
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
||
return new (P || (P = Promise))(function (resolve, reject) {
|
||
function fulfilled(value) {
|
||
try {
|
||
step(generator.next(value));
|
||
} catch (e) {
|
||
reject(e);
|
||
}
|
||
}
|
||
|
||
function rejected(value) {
|
||
try {
|
||
step(generator["throw"](value));
|
||
} catch (e) {
|
||
reject(e);
|
||
}
|
||
}
|
||
|
||
function step(result) {
|
||
result.done ? resolve(result.value) : new P(function (resolve) {
|
||
resolve(result.value);
|
||
}).then(fulfilled, rejected);
|
||
}
|
||
|
||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||
});
|
||
};
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var typesafe_actions_1 = __webpack_require__(/*! typesafe-actions */ "./node_modules/typesafe-actions/dist/index.umd.js");
|
||
|
||
var types_1 = __webpack_require__(/*! ./types */ "./src/ts/app/components/PokemonExplorer/types.ts");
|
||
|
||
var calculator_1 = __webpack_require__(/*! app/utils/calculator */ "./src/ts/app/utils/calculator.ts");
|
||
|
||
exports.setIsLoading = function (isLoading) {
|
||
return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_IS_LOADING, {
|
||
isLoading: isLoading
|
||
});
|
||
};
|
||
|
||
exports.setMaxPossibleStats = function (maxStats) {
|
||
return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_MAX_STATS, {
|
||
maxStats: maxStats
|
||
});
|
||
};
|
||
|
||
exports.setLeaguePokemon = function (leaguePokemon) {
|
||
return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_LEAGUE_POKEMON, {
|
||
leaguePokemon: leaguePokemon
|
||
});
|
||
};
|
||
|
||
exports.setIvLevel = function (level) {
|
||
return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_IV_LEVEL, {
|
||
level: level
|
||
});
|
||
};
|
||
|
||
exports.setIvHp = function (ivHp) {
|
||
return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_IV_HP, {
|
||
ivHp: ivHp
|
||
});
|
||
};
|
||
|
||
exports.setIvAtk = function (ivAtk) {
|
||
return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_IV_ATK, {
|
||
ivAtk: ivAtk
|
||
});
|
||
};
|
||
|
||
exports.setIvDef = function (ivDef) {
|
||
return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_IV_DEF, {
|
||
ivDef: ivDef
|
||
});
|
||
};
|
||
|
||
exports.setActiveLeague = function (league) {
|
||
return typesafe_actions_1.action(types_1.PokemonExplorerActionTypes.SET_ACTIVE_LEAGUE, {
|
||
league: league
|
||
});
|
||
};
|
||
|
||
exports.fetchConfig = function () {
|
||
return function (dispatch, getState, extraArguments) {
|
||
return __awaiter(_this, void 0, void 0,
|
||
/*#__PURE__*/
|
||
regeneratorRuntime.mark(function _callee() {
|
||
var config;
|
||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||
while (1) {
|
||
switch (_context.prev = _context.next) {
|
||
case 0:
|
||
_context.next = 2;
|
||
return extraArguments.services.pokemonService.getConfig();
|
||
|
||
case 2:
|
||
config = _context.sent;
|
||
dispatch(exports.setMaxPossibleStats(config.maxPossibleStats));
|
||
|
||
case 4:
|
||
case "end":
|
||
return _context.stop();
|
||
}
|
||
}
|
||
}, _callee, this);
|
||
}));
|
||
};
|
||
};
|
||
|
||
exports.maximizeLevel = function () {
|
||
return function (dispatch, getState, extraArguments) {
|
||
return __awaiter(_this, void 0, void 0,
|
||
/*#__PURE__*/
|
||
regeneratorRuntime.mark(function _callee2() {
|
||
var pokemonExplorerState, _pokemonExplorerState, ivHp, ivAtk, ivDef, pokemonLeagueValues, statsSet;
|
||
|
||
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
||
while (1) {
|
||
switch (_context2.prev = _context2.next) {
|
||
case 0:
|
||
pokemonExplorerState = getState().pokemonExplorerState;
|
||
_pokemonExplorerState = pokemonExplorerState.individualValues, ivHp = _pokemonExplorerState.ivHp, ivAtk = _pokemonExplorerState.ivAtk, ivDef = _pokemonExplorerState.ivDef;
|
||
|
||
if (pokemonExplorerState.leaguePokemon !== null) {
|
||
pokemonLeagueValues = pokemonExplorerState.leaguePokemon.pvp[pokemonExplorerState.league];
|
||
statsSet = pokemonLeagueValues.some(function (stats) {
|
||
if ((ivHp === null || stats.ivHp === ivHp) && (ivAtk === null || stats.ivAtk === ivAtk) && (ivDef === null || stats.ivDef === ivDef)) {
|
||
dispatch(exports.setIvHp(stats.ivHp));
|
||
dispatch(exports.setIvAtk(stats.ivAtk));
|
||
dispatch(exports.setIvDef(stats.ivDef));
|
||
dispatch(exports.setIvLevel(stats.level));
|
||
return true;
|
||
}
|
||
|
||
return false;
|
||
});
|
||
|
||
if (!statsSet && ivHp !== null && ivAtk !== null && ivDef !== null) {
|
||
dispatch(exports.setIvLevel(calculator_1.calculateMaxLevelForLeague(pokemonExplorerState.leaguePokemon.stats, ivHp, ivAtk, ivDef, pokemonExplorerState.league)));
|
||
}
|
||
}
|
||
|
||
case 3:
|
||
case "end":
|
||
return _context2.stop();
|
||
}
|
||
}
|
||
}, _callee2, this);
|
||
}));
|
||
};
|
||
};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonExplorer/reducers.ts":
|
||
/*!***********************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonExplorer/reducers.ts ***!
|
||
\***********************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var League_1 = __webpack_require__(/*! app/models/League */ "./src/ts/app/models/League.ts");
|
||
|
||
var types_1 = __webpack_require__(/*! ./types */ "./src/ts/app/components/PokemonExplorer/types.ts");
|
||
|
||
exports.initialState = {
|
||
isLoading: false,
|
||
leaguePokemon: null,
|
||
maxPossibleStats: {
|
||
baseStamina: 0,
|
||
baseAttack: 0,
|
||
baseDefense: 0,
|
||
level: 0
|
||
},
|
||
individualValues: {
|
||
level: null,
|
||
ivHp: null,
|
||
ivAtk: null,
|
||
ivDef: null
|
||
},
|
||
league: League_1.League.GREAT
|
||
};
|
||
|
||
var reduceSetIsLoading = function reduceSetIsLoading(state, action) {
|
||
return Object.assign({}, state, {
|
||
isLoading: action.payload.isLoading
|
||
});
|
||
};
|
||
|
||
var reduceSetMaxPossibleStats = function reduceSetMaxPossibleStats(state, action) {
|
||
return Object.assign({}, state, {
|
||
maxPossibleStats: Object.assign({}, action.payload.maxStats)
|
||
});
|
||
};
|
||
|
||
var reduceSetLeaguePokemon = function reduceSetLeaguePokemon(state, action) {
|
||
return Object.assign({}, state, {
|
||
leaguePokemon: action.payload.leaguePokemon
|
||
});
|
||
};
|
||
|
||
var reduceSetIvLevel = function reduceSetIvLevel(state, action) {
|
||
return Object.assign({}, state, {
|
||
individualValues: Object.assign({}, state.individualValues, {
|
||
level: action.payload.level
|
||
})
|
||
});
|
||
};
|
||
|
||
var reduceSetIvHp = function reduceSetIvHp(state, action) {
|
||
return Object.assign({}, state, {
|
||
individualValues: Object.assign({}, state.individualValues, {
|
||
ivHp: action.payload.ivHp
|
||
})
|
||
});
|
||
};
|
||
|
||
var reduceSetIvAtk = function reduceSetIvAtk(state, action) {
|
||
return Object.assign({}, state, {
|
||
individualValues: Object.assign({}, state.individualValues, {
|
||
ivAtk: action.payload.ivAtk
|
||
})
|
||
});
|
||
};
|
||
|
||
var reduceSetIvDef = function reduceSetIvDef(state, action) {
|
||
return Object.assign({}, state, {
|
||
individualValues: Object.assign({}, state.individualValues, {
|
||
ivDef: action.payload.ivDef
|
||
})
|
||
});
|
||
};
|
||
|
||
var reduceSetActiveLeague = function reduceSetActiveLeague(state, action) {
|
||
return Object.assign({}, state, {
|
||
league: action.payload.league
|
||
});
|
||
};
|
||
|
||
exports.PokemonExplorerReducers = function () {
|
||
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : exports.initialState;
|
||
var action = arguments.length > 1 ? arguments[1] : undefined;
|
||
|
||
switch (action.type) {
|
||
case types_1.PokemonExplorerActionTypes.SET_IS_LOADING:
|
||
return reduceSetIsLoading(state, action);
|
||
|
||
case types_1.PokemonExplorerActionTypes.SET_MAX_STATS:
|
||
return reduceSetMaxPossibleStats(state, action);
|
||
|
||
case types_1.PokemonExplorerActionTypes.SET_LEAGUE_POKEMON:
|
||
return reduceSetLeaguePokemon(state, action);
|
||
|
||
case types_1.PokemonExplorerActionTypes.SET_IV_LEVEL:
|
||
return reduceSetIvLevel(state, action);
|
||
|
||
case types_1.PokemonExplorerActionTypes.SET_IV_HP:
|
||
return reduceSetIvHp(state, action);
|
||
|
||
case types_1.PokemonExplorerActionTypes.SET_IV_ATK:
|
||
return reduceSetIvAtk(state, action);
|
||
|
||
case types_1.PokemonExplorerActionTypes.SET_IV_DEF:
|
||
return reduceSetIvDef(state, action);
|
||
|
||
case types_1.PokemonExplorerActionTypes.SET_ACTIVE_LEAGUE:
|
||
return reduceSetActiveLeague(state, action);
|
||
|
||
default:
|
||
return state;
|
||
}
|
||
};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonExplorer/styles/IvForm.scss":
|
||
/*!******************************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonExplorer/styles/IvForm.scss ***!
|
||
\******************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// extracted by mini-css-extract-plugin
|
||
module.exports = {"ivInput":"xR5IU7T9gOSfM0SfGIQhQ","levelInput":"_1n6We_Quu_avj4L41Kkbtk","fieldRow":"_3HcBNOX-63uaMhKMcyqjfE"};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonExplorer/styles/LeagueSelector.scss":
|
||
/*!**************************************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonExplorer/styles/LeagueSelector.scss ***!
|
||
\**************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// extracted by mini-css-extract-plugin
|
||
module.exports = {"wrapper":"fxmRzaLeAlGkUTNdUOxgm","leagueRadioLabel":"_3aPV9cOW-imhyR5agCsjEu","leagueRadio":"_3hY7BDtDAfAPH8KOgGB9GS"};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonExplorer/styles/LeagueStatsList.scss":
|
||
/*!***************************************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonExplorer/styles/LeagueStatsList.scss ***!
|
||
\***************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// extracted by mini-css-extract-plugin
|
||
module.exports = {"selectList":"_1FBILDo_TwNPvQhOicM4JN","listItem":"oCOvr7z4TRcLWwXOjMDgf"};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonExplorer/styles/PokemonExplorer.scss":
|
||
/*!***************************************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonExplorer/styles/PokemonExplorer.scss ***!
|
||
\***************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// extracted by mini-css-extract-plugin
|
||
module.exports = {"wrapper":"_3U9PuqYc3wBzWrjcTwdxMR","pokemonName":"_2Jl9u0Rt3EygHBywm6mwlQ","pokemonInfoWrapper":"_1oqey4MeNnownRjDwdb5wd","leaguePokemonRank":"_2Oq1Dli-WwzjV6T64vXOzV","pokemonInfoLeftColumn":"_2k9b7P7Zx3Mf1yPshzRfcX","pokemonInfoRightColumn":"t82k7iU2OohnGxjTSzpHc","pokemonTypeWrapper":"ssJiJppwhUdU2IkJ0CDKC","pokemonInfoWraper":"_1NNutSxk-Wine80rCFQ2Y5","pokemonRankValue":"_11Y0L0ujOb6_8Eo-RpkmDR","pokemonType":"_24Fhlh0L3vMIxt6SKXuQVP","dexHeader":"_3OvHBl54ghOYBZyNUSPVq0","formHeader":"_1vejYO8_ODs6splJ_aknlw","pokemonBaseStats":"IOi6Q7si1wd_2wlKaMwIy","ivsContainer":"Jh0Sr2lP-XeN0ntnXVeN2","ivContainerTitle":"_3cq4PWq3t2F7caqPlILUkk","diplayingIvList":"_3Ii7DWWVzHBEDAk08dT0pN"};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonExplorer/styles/StatDisplay.scss":
|
||
/*!***********************************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonExplorer/styles/StatDisplay.scss ***!
|
||
\***********************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// extracted by mini-css-extract-plugin
|
||
module.exports = {"baseStatRow":"_1B60AdbQ9qZ10PWcMNDjwK"};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonExplorer/types.ts":
|
||
/*!********************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonExplorer/types.ts ***!
|
||
\********************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.PokemonExplorerActionTypes = {
|
||
SET_IS_LOADING: 'POKEMON_EXPLORER/SET_IS_LOADING',
|
||
SET_MAX_STATS: 'POKEMON_EXPLORER/SET_MAX_STATS',
|
||
SET_LEAGUE_POKEMON: 'POKEMON_EXPLORER/SET_LEAGUE_POKEMON',
|
||
SET_IV_LEVEL: 'POKEMON_EXPLORER/SET_IV_LEVEL',
|
||
SET_IV_HP: 'POKEMON_EXPLORER/SET_IV_HP',
|
||
SET_IV_ATK: 'POKEMON_EXPLORER/SET_IV_ATK',
|
||
SET_IV_DEF: 'POKEMON_EXPLORER/SET_IV_DEF',
|
||
SET_ACTIVE_LEAGUE: 'POKEMON_EXPLORER/SET_ACTIVE_LEAGUE'
|
||
};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonSelectList/PokemonSelectList.tsx":
|
||
/*!***********************************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonSelectList/PokemonSelectList.tsx ***!
|
||
\***********************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||
|
||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||
|
||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||
|
||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||
|
||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||
|
||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||
|
||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||
|
||
var __importDefault = this && this.__importDefault || function (mod) {
|
||
return mod && mod.__esModule ? mod : {
|
||
"default": mod
|
||
};
|
||
};
|
||
|
||
var __importStar = this && this.__importStar || function (mod) {
|
||
if (mod && mod.__esModule) return mod;
|
||
var result = {};
|
||
if (mod != null) for (var k in mod) {
|
||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||
}
|
||
result["default"] = mod;
|
||
return result;
|
||
};
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var pogo_protos_1 = __importDefault(__webpack_require__(/*! pogo-protos */ "./node_modules/pogo-protos/index.js"));
|
||
|
||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||
|
||
var react_measure_1 = __importDefault(__webpack_require__(/*! react-measure */ "./node_modules/react-measure/dist/index.esm.js"));
|
||
|
||
var react_router_dom_1 = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
|
||
|
||
var react_window_1 = __webpack_require__(/*! react-window */ "./node_modules/react-window/dist/index.esm.js");
|
||
|
||
var classnames_1 = __importDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"));
|
||
|
||
var formatter_1 = __webpack_require__(/*! app/utils/formatter */ "./src/ts/app/utils/formatter.ts");
|
||
|
||
var Pokemon_1 = __webpack_require__(/*! app/models/Pokemon */ "./src/ts/app/models/Pokemon.ts");
|
||
|
||
var styles = __importStar(__webpack_require__(/*! ./styles/PokemonSelectList.scss */ "./src/ts/app/components/PokemonSelectList/styles/PokemonSelectList.scss"));
|
||
|
||
var PokemonSelectList =
|
||
/*#__PURE__*/
|
||
function (_react_1$default$Comp) {
|
||
_inherits(PokemonSelectList, _react_1$default$Comp);
|
||
|
||
function PokemonSelectList(props) {
|
||
var _this;
|
||
|
||
_classCallCheck(this, PokemonSelectList);
|
||
|
||
_this = _possibleConstructorReturn(this, _getPrototypeOf(PokemonSelectList).call(this, props));
|
||
|
||
_this.getListItemKey = function (index) {
|
||
var pokemonList = _this.props.pokemonList;
|
||
var pokemon = pokemonList[index];
|
||
return "".concat(index, "-").concat(pokemon.id, "-").concat(pokemon.form);
|
||
};
|
||
|
||
_this.calculateRowHeight = function (index) {
|
||
return _this.props.pokemonList[index].form === pogo_protos_1.default.Enums.Form.FORM_UNSET ? 25 : 40;
|
||
};
|
||
|
||
_this.handleChangeFilter = function (event) {
|
||
_this.props.handleChangeFilter(event.currentTarget.value).then(function () {
|
||
if (_this.listRef.current !== null) {
|
||
_this.listRef.current.resetAfterIndex(0, true);
|
||
}
|
||
});
|
||
};
|
||
|
||
_this.handleClickClearFilter = function () {
|
||
_this.props.handleChangeFilter('').then(function () {
|
||
if (_this.listRef.current !== null) {
|
||
_this.listRef.current.resetAfterIndex(0, true);
|
||
}
|
||
});
|
||
};
|
||
|
||
_this.state = {
|
||
dimensions: {
|
||
width: -1,
|
||
height: -1
|
||
}
|
||
};
|
||
_this.listRef = react_1.default.createRef();
|
||
return _this;
|
||
}
|
||
|
||
_createClass(PokemonSelectList, [{
|
||
key: "render",
|
||
value: function render() {
|
||
var _this2 = this;
|
||
|
||
var _this$state$dimension = this.state.dimensions,
|
||
width = _this$state$dimension.width,
|
||
height = _this$state$dimension.height;
|
||
var listLength = this.props.pokemonList.length;
|
||
|
||
var onResize = function onResize(contentRect) {
|
||
if (typeof contentRect.bounds !== 'undefined') {
|
||
_this2.setState({
|
||
dimensions: contentRect.bounds
|
||
});
|
||
}
|
||
};
|
||
|
||
var wrapperCss = classnames_1.default(styles.leftPanel, {
|
||
loading: this.props.isLoading
|
||
});
|
||
var listWrapperCss = classnames_1.default('nes-container', styles.listWrapper, _defineProperty({}, styles.emptyList, listLength === 0));
|
||
var inputTextCss = classnames_1.default('nes-input', styles.filterInput);
|
||
return react_1.default.createElement("div", {
|
||
id: "pokemon-select-list",
|
||
className: wrapperCss
|
||
}, react_1.default.createElement("div", {
|
||
className: styles.filterWrapper
|
||
}, react_1.default.createElement("input", {
|
||
name: "filter",
|
||
type: "text",
|
||
className: inputTextCss,
|
||
onChange: this.handleChangeFilter,
|
||
value: this.props.filterTerm,
|
||
placeholder: "Search"
|
||
}), this.props.filterTerm !== '' && react_1.default.createElement("i", {
|
||
className: "nes-icon close is-small",
|
||
onClick: this.handleClickClearFilter
|
||
})), react_1.default.createElement("div", {
|
||
className: listWrapperCss
|
||
}, listLength > 0 && react_1.default.createElement(react_measure_1.default, {
|
||
bounds: true,
|
||
onResize: onResize
|
||
}, function (_ref) {
|
||
var measureRef = _ref.measureRef;
|
||
return react_1.default.createElement("div", {
|
||
ref: measureRef
|
||
}, react_1.default.createElement(react_window_1.VariableSizeList, {
|
||
ref: _this2.listRef,
|
||
height: height,
|
||
itemKey: _this2.getListItemKey,
|
||
itemCount: listLength,
|
||
estimatedItemSize: 25,
|
||
itemSize: _this2.calculateRowHeight,
|
||
width: width
|
||
}, _this2.rowFactory.bind(_this2)));
|
||
}), listLength === 0 && this.props.filterTerm !== '' && react_1.default.createElement("div", {
|
||
className: styles.emptyState
|
||
}, react_1.default.createElement("i", {
|
||
className: "pokemon-missing-no"
|
||
}), react_1.default.createElement("h3", null, Pokemon_1.DEFAULT_POKEMON_NAME))));
|
||
}
|
||
}, {
|
||
key: "rowFactory",
|
||
value: function rowFactory(_ref2) {
|
||
var _this3 = this;
|
||
|
||
var index = _ref2.index,
|
||
style = _ref2.style;
|
||
var pokemon = this.props.pokemonList[index];
|
||
var dex = formatter_1.formatDexNumber(pokemon.dex);
|
||
var anchorCss = classnames_1.default('list-item', {
|
||
active: this.props.activePokemonId === pokemon.id && this.props.activePokemonForm === pokemon.form
|
||
});
|
||
var menuIconCss = classnames_1.default(styles.menuIcon, 'menu', "pokemon-".concat(dex));
|
||
var dexCss = classnames_1.default('de-emphasize', styles.dex);
|
||
var formCss = classnames_1.default('de-emphasize', styles.form);
|
||
|
||
var onClick = function onClick() {
|
||
return _this3.props.handleActivatePokemon(pokemon.id, pokemon.form);
|
||
};
|
||
|
||
var linkTo = {
|
||
// pathname: '/courses',
|
||
search: "?id=".concat(pokemon.id, "&form=").concat(pokemon.form)
|
||
};
|
||
return react_1.default.createElement(react_router_dom_1.Link, {
|
||
to: linkTo,
|
||
key: this.getListItemKey(index),
|
||
style: style,
|
||
className: anchorCss,
|
||
onClick: onClick
|
||
}, react_1.default.createElement("span", null, pokemon.name), react_1.default.createElement("span", {
|
||
className: dexCss
|
||
}, "#", dex), react_1.default.createElement("i", {
|
||
className: menuIconCss
|
||
}), pokemon.form !== pogo_protos_1.default.Enums.Form.FORM_UNSET && react_1.default.createElement("span", {
|
||
className: formCss
|
||
}, formatter_1.formatForm(pokemon.form), " Form"));
|
||
}
|
||
}]);
|
||
|
||
return PokemonSelectList;
|
||
}(react_1.default.Component);
|
||
|
||
exports.PokemonSelectList = PokemonSelectList;
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonSelectList/actions.ts":
|
||
/*!************************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonSelectList/actions.ts ***!
|
||
\************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
var _this = this;
|
||
|
||
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
||
return new (P || (P = Promise))(function (resolve, reject) {
|
||
function fulfilled(value) {
|
||
try {
|
||
step(generator.next(value));
|
||
} catch (e) {
|
||
reject(e);
|
||
}
|
||
}
|
||
|
||
function rejected(value) {
|
||
try {
|
||
step(generator["throw"](value));
|
||
} catch (e) {
|
||
reject(e);
|
||
}
|
||
}
|
||
|
||
function step(result) {
|
||
result.done ? resolve(result.value) : new P(function (resolve) {
|
||
resolve(result.value);
|
||
}).then(fulfilled, rejected);
|
||
}
|
||
|
||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||
});
|
||
};
|
||
|
||
var __importDefault = this && this.__importDefault || function (mod) {
|
||
return mod && mod.__esModule ? mod : {
|
||
"default": mod
|
||
};
|
||
};
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var pogo_protos_1 = __importDefault(__webpack_require__(/*! pogo-protos */ "./node_modules/pogo-protos/index.js"));
|
||
|
||
var typesafe_actions_1 = __webpack_require__(/*! typesafe-actions */ "./node_modules/typesafe-actions/dist/index.umd.js");
|
||
|
||
var types_1 = __webpack_require__(/*! ./types */ "./src/ts/app/components/PokemonSelectList/types.ts");
|
||
|
||
exports.setIsLoading = function (isLoading) {
|
||
return typesafe_actions_1.action(types_1.PokemonSelectListActionTypes.SET_IS_LOADING, {
|
||
isLoading: isLoading
|
||
});
|
||
};
|
||
|
||
exports.setPokemonList = function (pokemonList) {
|
||
return typesafe_actions_1.action(types_1.PokemonSelectListActionTypes.SET_POKEMON_LIST, {
|
||
pokemonList: pokemonList
|
||
});
|
||
};
|
||
|
||
exports.setPokemonListFiltered = function (filterTerm, pokemonListFiltered) {
|
||
return typesafe_actions_1.action(types_1.PokemonSelectListActionTypes.SET_POKEMON_LIST_FILTERED, {
|
||
filterTerm: filterTerm,
|
||
pokemonListFiltered: pokemonListFiltered
|
||
});
|
||
};
|
||
|
||
exports.setActivePokemonId = function (activePokemonId, activePokemonForm) {
|
||
return typesafe_actions_1.action(types_1.PokemonSelectListActionTypes.SET_ACTIVE_POKEMON_ID, {
|
||
activePokemonId: activePokemonId,
|
||
activePokemonForm: activePokemonForm
|
||
});
|
||
};
|
||
|
||
exports.setPokemonLeagueStats = function (pokemonId, pokemonLeagueStats) {
|
||
return typesafe_actions_1.action(types_1.PokemonSelectListActionTypes.SET_POKEMON_LEAGUE_STATS, {
|
||
pokemonId: pokemonId,
|
||
pokemonLeagueStats: pokemonLeagueStats
|
||
});
|
||
};
|
||
|
||
exports.filterPokemonList = function (filterTerm) {
|
||
return function (dispatch, getState, extraArguments) {
|
||
return __awaiter(_this, void 0, void 0,
|
||
/*#__PURE__*/
|
||
regeneratorRuntime.mark(function _callee() {
|
||
var pokemonListFiltered, pokemonList, normalizedFilterTerm;
|
||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||
while (1) {
|
||
switch (_context.prev = _context.next) {
|
||
case 0:
|
||
pokemonListFiltered = [];
|
||
|
||
if (filterTerm !== '') {
|
||
pokemonList = getState().pokemonSelectListState.pokemonList;
|
||
normalizedFilterTerm = filterTerm.toLowerCase();
|
||
pokemonListFiltered = pokemonList.reduce(function (result, pokemon) {
|
||
var pokemonName = pokemon.name.toLowerCase();
|
||
var pokemonDex = '' + pokemon.dex;
|
||
var pokemonForm = pokemon.form === null ? '' : pogo_protos_1.default.Enums.Form[pokemon.form].toLowerCase();
|
||
|
||
if (pokemonName.indexOf(normalizedFilterTerm) === 0 || pokemonDex.indexOf(normalizedFilterTerm) === 0 || normalizedFilterTerm === pokemonForm) {
|
||
result.push(pokemon);
|
||
}
|
||
|
||
return result;
|
||
}, []);
|
||
}
|
||
|
||
dispatch(exports.setPokemonListFiltered(filterTerm, pokemonListFiltered));
|
||
|
||
case 3:
|
||
case "end":
|
||
return _context.stop();
|
||
}
|
||
}
|
||
}, _callee, this);
|
||
}));
|
||
};
|
||
};
|
||
|
||
exports.fetchPokemonList = function () {
|
||
return function (dispatch, getState, extraArguments) {
|
||
return __awaiter(_this, void 0, void 0,
|
||
/*#__PURE__*/
|
||
regeneratorRuntime.mark(function _callee2() {
|
||
var pokemonList;
|
||
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
||
while (1) {
|
||
switch (_context2.prev = _context2.next) {
|
||
case 0:
|
||
_context2.next = 2;
|
||
return extraArguments.services.pokemonService.getPokemonList();
|
||
|
||
case 2:
|
||
pokemonList = _context2.sent;
|
||
dispatch(exports.setPokemonList(pokemonList));
|
||
|
||
case 4:
|
||
case "end":
|
||
return _context2.stop();
|
||
}
|
||
}
|
||
}, _callee2, this);
|
||
}));
|
||
};
|
||
};
|
||
|
||
exports.fetchPokemonLeagueStats = function (pokemonId, form) {
|
||
return function (dispatch, getState, extraArguments) {
|
||
return __awaiter(_this, void 0, void 0,
|
||
/*#__PURE__*/
|
||
regeneratorRuntime.mark(function _callee3() {
|
||
var pokemonLeagueStats;
|
||
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
||
while (1) {
|
||
switch (_context3.prev = _context3.next) {
|
||
case 0:
|
||
_context3.next = 2;
|
||
return extraArguments.services.pokemonService.getPokemonLeagueStats(pokemonId, form);
|
||
|
||
case 2:
|
||
pokemonLeagueStats = _context3.sent;
|
||
dispatch(exports.setPokemonLeagueStats(pokemonId, pokemonLeagueStats));
|
||
return _context3.abrupt("return", pokemonLeagueStats);
|
||
|
||
case 5:
|
||
case "end":
|
||
return _context3.stop();
|
||
}
|
||
}
|
||
}, _callee3, this);
|
||
}));
|
||
};
|
||
};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonSelectList/reducers.ts":
|
||
/*!*************************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonSelectList/reducers.ts ***!
|
||
\*************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var types_1 = __webpack_require__(/*! ./types */ "./src/ts/app/components/PokemonSelectList/types.ts");
|
||
|
||
exports.initialState = {
|
||
isLoading: true,
|
||
activePokemonId: null,
|
||
activePokemonForm: null,
|
||
pokemonList: [],
|
||
pokemonListFiltered: [],
|
||
filterTerm: '',
|
||
pokemonLeagueStats: {}
|
||
};
|
||
|
||
var reduceSetIsLoading = function reduceSetIsLoading(state, action) {
|
||
return Object.assign({}, state, {
|
||
isLoading: action.payload.isLoading
|
||
});
|
||
};
|
||
|
||
var reduceSetPokemonList = function reduceSetPokemonList(state, action) {
|
||
return Object.assign({}, state, {
|
||
pokemonList: action.payload.pokemonList
|
||
});
|
||
};
|
||
|
||
var reduceSetPokemonListFiltered = function reduceSetPokemonListFiltered(state, action) {
|
||
return Object.assign({}, state, {
|
||
filterTerm: action.payload.filterTerm,
|
||
pokemonListFiltered: action.payload.pokemonListFiltered
|
||
});
|
||
};
|
||
|
||
var reduceSetActivePokemonId = function reduceSetActivePokemonId(state, action) {
|
||
return Object.assign({}, state, {
|
||
activePokemonId: action.payload.activePokemonId,
|
||
activePokemonForm: action.payload.activePokemonForm
|
||
});
|
||
};
|
||
|
||
var reduceSetPokemonLeagueStats = function reduceSetPokemonLeagueStats(state, action) {
|
||
return Object.assign({}, state, {
|
||
pokemonLeagueStats: Object.assign({}, state.pokemonLeagueStats, _defineProperty({}, action.payload.pokemonId, action.payload.pokemonLeagueStats))
|
||
});
|
||
};
|
||
|
||
exports.PokemonSelectListReducers = function () {
|
||
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : exports.initialState;
|
||
var action = arguments.length > 1 ? arguments[1] : undefined;
|
||
|
||
switch (action.type) {
|
||
case types_1.PokemonSelectListActionTypes.SET_IS_LOADING:
|
||
return reduceSetIsLoading(state, action);
|
||
|
||
case types_1.PokemonSelectListActionTypes.SET_POKEMON_LIST:
|
||
return reduceSetPokemonList(state, action);
|
||
|
||
case types_1.PokemonSelectListActionTypes.SET_POKEMON_LIST_FILTERED:
|
||
return reduceSetPokemonListFiltered(state, action);
|
||
|
||
case types_1.PokemonSelectListActionTypes.SET_ACTIVE_POKEMON_ID:
|
||
return reduceSetActivePokemonId(state, action);
|
||
|
||
case types_1.PokemonSelectListActionTypes.SET_POKEMON_LEAGUE_STATS:
|
||
return reduceSetPokemonLeagueStats(state, action);
|
||
|
||
default:
|
||
return state;
|
||
}
|
||
};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonSelectList/styles/PokemonSelectList.scss":
|
||
/*!*******************************************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonSelectList/styles/PokemonSelectList.scss ***!
|
||
\*******************************************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// extracted by mini-css-extract-plugin
|
||
module.exports = {"leftPanel":"_2ktnAYaWPic5tHP0KElljW","listWrapper":"bBtO6ahHT_r4-uv_TkNmI","emptyList":"_1vgpKPYgwFLERwugPpgKhY","emptyState":"_3sBmbmGuMfRoF2_Ka1Rv3","menuIcon":"_1I2_TyDiVHGjCIjuw9tCdD","filterWrapper":"_1d1WlVgaHsGjR2VF30_8DY","filterInput":"_1z_s2_gxSg8Whcx8VpQ2DU","dex":"_1QHutfOezRS5QUHULllnCh","form":"VIw8QGHXA_izXov4a8xKt"};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/components/PokemonSelectList/types.ts":
|
||
/*!**********************************************************!*\
|
||
!*** ./src/ts/app/components/PokemonSelectList/types.ts ***!
|
||
\**********************************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.PokemonSelectListActionTypes = {
|
||
SET_IS_LOADING: 'POKEMON_SELECT_LIST/SET_IS_LOADING',
|
||
SET_POKEMON_LIST: 'POKEMON_SELECT_LIST/SET_POKEMON_LIST',
|
||
SET_POKEMON_LIST_FILTERED: 'POKEMON_SELECT_LIST/SET_POKEMON_LIST_FILTERED',
|
||
SET_ACTIVE_POKEMON_ID: 'POKEMON_SELECT_LIST/SET_ACTIVE_POKEMON_ID',
|
||
SET_POKEMON_LEAGUE_STATS: 'POKEMON_SELECT_LIST/SET_POKEMON_LEAGUE_STATS'
|
||
};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/index.tsx":
|
||
/*!******************************!*\
|
||
!*** ./src/ts/app/index.tsx ***!
|
||
\******************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
var __importDefault = this && this.__importDefault || function (mod) {
|
||
return mod && mod.__esModule ? mod : {
|
||
"default": mod
|
||
};
|
||
};
|
||
|
||
var __importStar = this && this.__importStar || function (mod) {
|
||
if (mod && mod.__esModule) return mod;
|
||
var result = {};
|
||
if (mod != null) for (var k in mod) {
|
||
if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||
}
|
||
result["default"] = mod;
|
||
return result;
|
||
};
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var react_1 = __importDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js"));
|
||
|
||
var react_dom_1 = __importDefault(__webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js"));
|
||
|
||
var react_redux_1 = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
|
||
|
||
var react_router_dom_1 = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
|
||
|
||
var Redux = __importStar(__webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js"));
|
||
|
||
var redux_thunk_1 = __importDefault(__webpack_require__(/*! redux-thunk */ "./node_modules/redux-thunk/es/index.js"));
|
||
|
||
var PokemonService_1 = __webpack_require__(/*! api/PokemonService */ "./src/ts/api/PokemonService.ts");
|
||
|
||
var reducers_1 = __webpack_require__(/*! ./components/PokemonExplorer/reducers */ "./src/ts/app/components/PokemonExplorer/reducers.ts");
|
||
|
||
var reducers_2 = __webpack_require__(/*! ./components/PokemonSelectList/reducers */ "./src/ts/app/components/PokemonSelectList/reducers.ts");
|
||
|
||
var PokemonApp_1 = __webpack_require__(/*! ./PokemonApp */ "./src/ts/app/PokemonApp.tsx");
|
||
|
||
exports.appReducers = Redux.combineReducers({
|
||
pokemonSelectListState: reducers_2.PokemonSelectListReducers,
|
||
pokemonExplorerState: reducers_1.PokemonExplorerReducers
|
||
});
|
||
var extraArguments = {
|
||
services: {
|
||
pokemonService: new PokemonService_1.PokemonService()
|
||
}
|
||
};
|
||
var store = Redux.createStore(exports.appReducers, // enableBatching(appReducers),
|
||
Redux.applyMiddleware(redux_thunk_1.default.withExtraArgument(extraArguments)));
|
||
react_dom_1.default.render(react_1.default.createElement(react_redux_1.Provider, {
|
||
store: store
|
||
}, react_1.default.createElement(react_router_dom_1.BrowserRouter, null, react_1.default.createElement("div", null, react_1.default.createElement(react_router_dom_1.Route, {
|
||
exact: true,
|
||
path: "/",
|
||
component: PokemonApp_1.ConnectedPokemonApp
|
||
})))), document.getElementById('pokemon-mount')); // const BATCH_ACTION_TYPE = '_BATCHING_REDUCER_BATCH_ACTION_';
|
||
// // TODO Allow this to also take ThunkAction<any, any, any>
|
||
// export function batchActions(actions : Array<Redux.Action>) : Redux.Action {
|
||
// return action(BATCH_ACTION_TYPE, actions);
|
||
// }
|
||
// // This is called in the Provider on all Reducers
|
||
// export function enableBatching(reducer : Redux.Reducer<any>) {
|
||
// return function batchingReducer(state : any, action : Redux.Action) {
|
||
// if (action && (action.type === BATCH_ACTION_TYPE)) {
|
||
// const payload = (action as Redux.Action).payload;
|
||
// return payload.reduce(batchingReducer, state);
|
||
// }
|
||
// return reducer(state, action);
|
||
// };
|
||
// }
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/models/League.ts":
|
||
/*!*************************************!*\
|
||
!*** ./src/ts/app/models/League.ts ***!
|
||
\*************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
var _exports$MaxCpByLeagu;
|
||
|
||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
var League;
|
||
|
||
(function (League) {
|
||
League[League["GREAT"] = 0] = "GREAT";
|
||
League[League["ULTRA"] = 1] = "ULTRA";
|
||
League[League["MASTER"] = 2] = "MASTER";
|
||
League[League["CUSTOM"] = 3] = "CUSTOM";
|
||
})(League = exports.League || (exports.League = {}));
|
||
|
||
exports.LeagueLabels = [{
|
||
id: League.GREAT,
|
||
label: 'Great'
|
||
}, {
|
||
id: League.ULTRA,
|
||
label: 'Ultra'
|
||
}, {
|
||
id: League.MASTER,
|
||
label: 'Master'
|
||
}, {
|
||
id: League.CUSTOM,
|
||
label: 'Custom'
|
||
}];
|
||
exports.MaxCpByLeague = (_exports$MaxCpByLeagu = {}, _defineProperty(_exports$MaxCpByLeagu, League.GREAT, 1500), _defineProperty(_exports$MaxCpByLeagu, League.ULTRA, 2500), _defineProperty(_exports$MaxCpByLeagu, League.MASTER, Infinity), _defineProperty(_exports$MaxCpByLeagu, League.CUSTOM, Infinity), _exports$MaxCpByLeagu);
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/models/LevelMultipliers.ts":
|
||
/*!***********************************************!*\
|
||
!*** ./src/ts/app/models/LevelMultipliers.ts ***!
|
||
\***********************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.LevelMultipliers = [0.094, 0.135137432, 0.16639787, 0.192650919, 0.21573247, 0.236572661, 0.25572005, 0.273530381, 0.29024988, 0.306057377, 0.3210876, 0.335445036, 0.34921268, 0.362457751, 0.37523559, 0.387592406, 0.39956728, 0.411193551, 0.42250001, 0.432926419, 0.44310755, 0.4530599578, 0.46279839, 0.472336083, 0.48168495, 0.4908558, 0.49985844, 0.508701765, 0.51739395, 0.525942511, 0.53435433, 0.542635767, 0.55079269, 0.558830576, 0.56675452, 0.574569153, 0.58227891, 0.589887917, 0.59740001, 0.604818814, 0.61215729, 0.619399365, 0.62656713, 0.633644533, 0.64065295, 0.647576426, 0.65443563, 0.661214806, 0.667934, 0.674577537, 0.68116492, 0.687680648, 0.69414365, 0.700538673, 0.70688421, 0.713164996, 0.71939909, 0.725571552, 0.7317, 0.734741009, 0.73776948, 0.740785574, 0.74378943, 0.746781211, 0.74976104, 0.752729087, 0.75568551, 0.758630378, 0.76156384, 0.764486065, 0.76739717, 0.770297266, 0.7731865, 0.776064962, 0.77893275, 0.781790055, 0.78463697, 0.787473578, 0.79030001];
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/models/Pokemon.ts":
|
||
/*!**************************************!*\
|
||
!*** ./src/ts/app/models/Pokemon.ts ***!
|
||
\**************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
exports.DEFAULT_POKEMON_NAME = 'MissingNo.';
|
||
var Grade;
|
||
|
||
(function (Grade) {
|
||
Grade[Grade["S"] = 0] = "S";
|
||
Grade[Grade["A"] = 1] = "A";
|
||
Grade[Grade["B"] = 2] = "B";
|
||
Grade[Grade["C"] = 3] = "C";
|
||
Grade[Grade["D"] = 4] = "D";
|
||
Grade[Grade["F"] = 5] = "F";
|
||
})(Grade = exports.Grade || (exports.Grade = {}));
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/styles/PokemonApp.scss":
|
||
/*!*******************************************!*\
|
||
!*** ./src/ts/app/styles/PokemonApp.scss ***!
|
||
\*******************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
// extracted by mini-css-extract-plugin
|
||
module.exports = {"wrapper":"_3ZEoC8iBGCLG7l6yLZ5xto","body":"_23cv_xbRz92BiCJWhfDAvo","header":"_2s_s2Qq6lMCrAFywqXmkG4","footer":"_3q19QD159aLyJOAJXwRJpW"};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/utils/calculator.ts":
|
||
/*!****************************************!*\
|
||
!*** ./src/ts/app/utils/calculator.ts ***!
|
||
\****************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var League_1 = __webpack_require__(/*! app/models/League */ "./src/ts/app/models/League.ts");
|
||
|
||
var LevelMultipliers_1 = __webpack_require__(/*! app/models/LevelMultipliers */ "./src/ts/app/models/LevelMultipliers.ts");
|
||
|
||
var calculateStatsFormula = function calculateStatsFormula(baseStats, ivHp, ivAtk, ivDef) {
|
||
return Math.sqrt(baseStats.baseStamina + ivHp) * Math.sqrt(baseStats.baseDefense + ivDef) * (baseStats.baseAttack + ivAtk);
|
||
};
|
||
|
||
var calculateCpByLevelMultiplier = function calculateCpByLevelMultiplier(statsFormula, levelMultiplier) {
|
||
return Math.floor(statsFormula * Math.pow(levelMultiplier, 2) / 10);
|
||
};
|
||
|
||
exports.calculateCp = function (baseStats, level, ivHp, ivAtk, ivDef) {
|
||
var statsFormula = calculateStatsFormula(baseStats, ivHp, ivAtk, ivDef);
|
||
var levelMultiplier = LevelMultipliers_1.LevelMultipliers[(level - 1) * 2];
|
||
var cp = calculateCpByLevelMultiplier(statsFormula, levelMultiplier);
|
||
return cp;
|
||
};
|
||
|
||
exports.calculateStatAtLevel = function (level, baseStatValue, ivStat) {
|
||
var levelMultiplier = LevelMultipliers_1.LevelMultipliers[(level - 1) * 2];
|
||
var calculatedStat = Math.floor((baseStatValue + ivStat) * levelMultiplier);
|
||
return calculatedStat;
|
||
};
|
||
|
||
exports.calculateMaxLevelForLeague = function (baseStats, ivHp, ivAtk, ivDef, league) {
|
||
var maxCp = League_1.MaxCpByLeague[league];
|
||
var statsFormula = calculateStatsFormula(baseStats, ivHp, ivAtk, ivDef);
|
||
var level = 1;
|
||
|
||
for (var i = LevelMultipliers_1.LevelMultipliers.length - 1; i >= 0; i--) {
|
||
var cp = calculateCpByLevelMultiplier(statsFormula, LevelMultipliers_1.LevelMultipliers[i]);
|
||
|
||
if (cp <= maxCp) {
|
||
level = i / 2 + 1;
|
||
break;
|
||
}
|
||
}
|
||
|
||
return level;
|
||
};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./src/ts/app/utils/formatter.ts":
|
||
/*!***************************************!*\
|
||
!*** ./src/ts/app/utils/formatter.ts ***!
|
||
\***************************************/
|
||
/*! no static exports found */
|
||
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
|
||
/***/ (function(module, exports, __webpack_require__) {
|
||
|
||
"use strict";
|
||
|
||
|
||
var __importDefault = this && this.__importDefault || function (mod) {
|
||
return mod && mod.__esModule ? mod : {
|
||
"default": mod
|
||
};
|
||
};
|
||
|
||
Object.defineProperty(exports, "__esModule", {
|
||
value: true
|
||
});
|
||
|
||
var pogo_protos_1 = __importDefault(__webpack_require__(/*! pogo-protos */ "./node_modules/pogo-protos/index.js"));
|
||
|
||
exports.formatDexNumber = function (dex) {
|
||
var prefix = '';
|
||
|
||
if (dex < 100) {
|
||
prefix += '0';
|
||
}
|
||
|
||
if (dex < 10) {
|
||
prefix += '0';
|
||
}
|
||
|
||
return prefix + dex;
|
||
};
|
||
|
||
exports.formatType = function (type) {
|
||
switch (type) {
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_NORMAL:
|
||
return 'normal';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_FIGHTING:
|
||
return 'fighting';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_FLYING:
|
||
return 'flying';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_POISON:
|
||
return 'poison';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_GROUND:
|
||
return 'ground';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_ROCK:
|
||
return 'rock';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_BUG:
|
||
return 'bug';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_GHOST:
|
||
return 'ghost';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_STEEL:
|
||
return 'steel';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_FIRE:
|
||
return 'fire';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_WATER:
|
||
return 'water';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_GRASS:
|
||
return 'grass';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_ELECTRIC:
|
||
return 'electric';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_PSYCHIC:
|
||
return 'psychic';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_ICE:
|
||
return 'ice';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_DRAGON:
|
||
return 'dragon';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_DARK:
|
||
return 'dark';
|
||
|
||
case pogo_protos_1.default.Enums.PokemonType.POKEMON_TYPE_FAIRY:
|
||
return 'fairy';
|
||
|
||
default:
|
||
return '';
|
||
}
|
||
};
|
||
|
||
exports.Forms = {
|
||
normal: [pogo_protos_1.default.Enums.Form.CASTFORM_NORMAL, pogo_protos_1.default.Enums.Form.DEOXYS_NORMAL, pogo_protos_1.default.Enums.Form.RATTATA_NORMAL, pogo_protos_1.default.Enums.Form.RATICATE_NORMAL, pogo_protos_1.default.Enums.Form.RAICHU_NORMAL, pogo_protos_1.default.Enums.Form.SANDSHREW_NORMAL, pogo_protos_1.default.Enums.Form.SANDSLASH_NORMAL, pogo_protos_1.default.Enums.Form.VULPIX_NORMAL, pogo_protos_1.default.Enums.Form.NINETALES_NORMAL, pogo_protos_1.default.Enums.Form.DIGLETT_NORMAL, pogo_protos_1.default.Enums.Form.DUGTRIO_NORMAL, pogo_protos_1.default.Enums.Form.MEOWTH_NORMAL, pogo_protos_1.default.Enums.Form.PERSIAN_NORMAL, pogo_protos_1.default.Enums.Form.GEODUDE_NORMAL, pogo_protos_1.default.Enums.Form.GRAVELER_NORMAL, pogo_protos_1.default.Enums.Form.GOLEM_NORMAL, pogo_protos_1.default.Enums.Form.GRIMER_NORMAL, pogo_protos_1.default.Enums.Form.MUK_NORMAL, pogo_protos_1.default.Enums.Form.EXEGGUTOR_NORMAL, pogo_protos_1.default.Enums.Form.MAROWAK_NORMAL, pogo_protos_1.default.Enums.Form.ROTOM_NORMAL, pogo_protos_1.default.Enums.Form.ARCEUS_NORMAL],
|
||
alola: [pogo_protos_1.default.Enums.Form.RATTATA_ALOLA, pogo_protos_1.default.Enums.Form.RATICATE_ALOLA, pogo_protos_1.default.Enums.Form.RAICHU_ALOLA, pogo_protos_1.default.Enums.Form.SANDSHREW_ALOLA, pogo_protos_1.default.Enums.Form.SANDSLASH_ALOLA, pogo_protos_1.default.Enums.Form.VULPIX_ALOLA, pogo_protos_1.default.Enums.Form.NINETALES_ALOLA, pogo_protos_1.default.Enums.Form.DIGLETT_ALOLA, pogo_protos_1.default.Enums.Form.DUGTRIO_ALOLA, pogo_protos_1.default.Enums.Form.MEOWTH_ALOLA, pogo_protos_1.default.Enums.Form.PERSIAN_ALOLA, pogo_protos_1.default.Enums.Form.GEODUDE_ALOLA, pogo_protos_1.default.Enums.Form.GRAVELER_ALOLA, pogo_protos_1.default.Enums.Form.GOLEM_ALOLA, pogo_protos_1.default.Enums.Form.GRIMER_ALOLA, pogo_protos_1.default.Enums.Form.MUK_ALOLA, pogo_protos_1.default.Enums.Form.EXEGGUTOR_ALOLA, pogo_protos_1.default.Enums.Form.MAROWAK_ALOLA],
|
||
plant: [pogo_protos_1.default.Enums.Form.WORMADAM_PLANT, pogo_protos_1.default.Enums.Form.BURMY_PLANT],
|
||
sandy: [pogo_protos_1.default.Enums.Form.WORMADAM_SANDY, pogo_protos_1.default.Enums.Form.BURMY_SANDY],
|
||
trash: [pogo_protos_1.default.Enums.Form.WORMADAM_TRASH, pogo_protos_1.default.Enums.Form.BURMY_TRASH],
|
||
westSea: [pogo_protos_1.default.Enums.Form.SHELLOS_WEST_SEA, pogo_protos_1.default.Enums.Form.GASTRODON_WEST_SEA],
|
||
eastSea: [pogo_protos_1.default.Enums.Form.SHELLOS_EAST_SEA, pogo_protos_1.default.Enums.Form.GASTRODON_EAST_SEA],
|
||
altered: [pogo_protos_1.default.Enums.Form.GIRATINA_ALTERED],
|
||
origin: [pogo_protos_1.default.Enums.Form.GIRATINA_ORIGIN],
|
||
frost: [pogo_protos_1.default.Enums.Form.ROTOM_FROST],
|
||
fan: [pogo_protos_1.default.Enums.Form.ROTOM_FAN],
|
||
mow: [pogo_protos_1.default.Enums.Form.ROTOM_MOW],
|
||
wash: [pogo_protos_1.default.Enums.Form.ROTOM_WASH],
|
||
heat: [pogo_protos_1.default.Enums.Form.ROTOM_HEAT],
|
||
sky: [pogo_protos_1.default.Enums.Form.SHAYMIN_SKY],
|
||
land: [pogo_protos_1.default.Enums.Form.SHAYMIN_LAND],
|
||
overcast: [pogo_protos_1.default.Enums.Form.CHERRIM_OVERCAST],
|
||
sunny: [pogo_protos_1.default.Enums.Form.CASTFORM_SUNNY, pogo_protos_1.default.Enums.Form.CHERRIM_SUNNY],
|
||
rainy: [pogo_protos_1.default.Enums.Form.CASTFORM_RAINY],
|
||
snowy: [pogo_protos_1.default.Enums.Form.CASTFORM_SNOWY],
|
||
attack: [pogo_protos_1.default.Enums.Form.DEOXYS_ATTACK],
|
||
defense: [pogo_protos_1.default.Enums.Form.DEOXYS_DEFENSE],
|
||
speed: [pogo_protos_1.default.Enums.Form.DEOXYS_SPEED],
|
||
fighting: [pogo_protos_1.default.Enums.Form.ARCEUS_FIGHTING],
|
||
flying: [pogo_protos_1.default.Enums.Form.ARCEUS_FLYING],
|
||
poison: [pogo_protos_1.default.Enums.Form.ARCEUS_POISON],
|
||
ground: [pogo_protos_1.default.Enums.Form.ARCEUS_GROUND],
|
||
rock: [pogo_protos_1.default.Enums.Form.ARCEUS_ROCK],
|
||
bug: [pogo_protos_1.default.Enums.Form.ARCEUS_BUG],
|
||
ghost: [pogo_protos_1.default.Enums.Form.ARCEUS_GHOST],
|
||
steel: [pogo_protos_1.default.Enums.Form.ARCEUS_STEEL],
|
||
fire: [pogo_protos_1.default.Enums.Form.ARCEUS_FIRE],
|
||
water: [pogo_protos_1.default.Enums.Form.ARCEUS_WATER],
|
||
grass: [pogo_protos_1.default.Enums.Form.ARCEUS_GRASS],
|
||
electric: [pogo_protos_1.default.Enums.Form.ARCEUS_ELECTRIC],
|
||
psychic: [pogo_protos_1.default.Enums.Form.ARCEUS_PSYCHIC],
|
||
ice: [pogo_protos_1.default.Enums.Form.ARCEUS_ICE],
|
||
dragon: [pogo_protos_1.default.Enums.Form.ARCEUS_DRAGON],
|
||
dark: [pogo_protos_1.default.Enums.Form.ARCEUS_DARK],
|
||
fairy: [pogo_protos_1.default.Enums.Form.ARCEUS_FAIRY]
|
||
};
|
||
|
||
exports.formatForm = function (form) {
|
||
if (exports.Forms.normal.indexOf(form) > -1) {
|
||
return 'Normal';
|
||
} else if (exports.Forms.alola.indexOf(form) > -1) {
|
||
return 'Alola';
|
||
} else if (exports.Forms.plant.indexOf(form) > -1) {
|
||
return 'Plant';
|
||
} else if (exports.Forms.sandy.indexOf(form) > -1) {
|
||
return 'Sandy';
|
||
} else if (exports.Forms.trash.indexOf(form) > -1) {
|
||
return 'Trash';
|
||
} else if (exports.Forms.westSea.indexOf(form) > -1) {
|
||
return 'West Sea';
|
||
} else if (exports.Forms.eastSea.indexOf(form) > -1) {
|
||
return 'East Sea';
|
||
} else if (exports.Forms.frost.indexOf(form) > -1) {
|
||
return 'Frost';
|
||
} else if (exports.Forms.fan.indexOf(form) > -1) {
|
||
return 'Fan';
|
||
} else if (exports.Forms.mow.indexOf(form) > -1) {
|
||
return 'Mow';
|
||
} else if (exports.Forms.wash.indexOf(form) > -1) {
|
||
return 'Wash';
|
||
} else if (exports.Forms.heat.indexOf(form) > -1) {
|
||
return 'Heat';
|
||
} else if (exports.Forms.sky.indexOf(form) > -1) {
|
||
return 'Sky';
|
||
} else if (exports.Forms.land.indexOf(form) > -1) {
|
||
return 'Land';
|
||
} else if (exports.Forms.overcast.indexOf(form) > -1) {
|
||
return 'Overcast';
|
||
} else if (exports.Forms.sunny.indexOf(form) > -1) {
|
||
return 'Sunny';
|
||
} else if (exports.Forms.rainy.indexOf(form) > -1) {
|
||
return 'Rainy';
|
||
} else if (exports.Forms.snowy.indexOf(form) > -1) {
|
||
return 'Snowy';
|
||
} else if (exports.Forms.attack.indexOf(form) > -1) {
|
||
return 'Attack';
|
||
} else if (exports.Forms.defense.indexOf(form) > -1) {
|
||
return 'Defense';
|
||
} else if (exports.Forms.speed.indexOf(form) > -1) {
|
||
return 'Speed';
|
||
} else if (exports.Forms.altered.indexOf(form) > -1) {
|
||
return 'Altered';
|
||
} else if (exports.Forms.origin.indexOf(form) > -1) {
|
||
return 'Origin';
|
||
} else if (exports.Forms.fighting.indexOf(form) > -1) {
|
||
return 'Fighting';
|
||
} else if (exports.Forms.flying.indexOf(form) > -1) {
|
||
return 'Flying';
|
||
} else if (exports.Forms.poison.indexOf(form) > -1) {
|
||
return 'Poison';
|
||
} else if (exports.Forms.ground.indexOf(form) > -1) {
|
||
return 'Fround';
|
||
} else if (exports.Forms.rock.indexOf(form) > -1) {
|
||
return 'Rock';
|
||
} else if (exports.Forms.bug.indexOf(form) > -1) {
|
||
return 'Bug';
|
||
} else if (exports.Forms.ghost.indexOf(form) > -1) {
|
||
return 'Ghost';
|
||
} else if (exports.Forms.steel.indexOf(form) > -1) {
|
||
return 'Steel';
|
||
} else if (exports.Forms.fire.indexOf(form) > -1) {
|
||
return 'Fire';
|
||
} else if (exports.Forms.water.indexOf(form) > -1) {
|
||
return 'Water';
|
||
} else if (exports.Forms.grass.indexOf(form) > -1) {
|
||
return 'Grass';
|
||
} else if (exports.Forms.electric.indexOf(form) > -1) {
|
||
return 'Electric';
|
||
} else if (exports.Forms.psychic.indexOf(form) > -1) {
|
||
return 'Psychic';
|
||
} else if (exports.Forms.ice.indexOf(form) > -1) {
|
||
return 'Ice';
|
||
} else if (exports.Forms.dragon.indexOf(form) > -1) {
|
||
return 'Dragon';
|
||
} else if (exports.Forms.dark.indexOf(form) > -1) {
|
||
return 'Dark';
|
||
} else if (exports.Forms.fairy.indexOf(form) > -1) {
|
||
return 'Fairy';
|
||
} else {
|
||
return '';
|
||
}
|
||
};
|
||
|
||
/***/ })
|
||
|
||
/******/ });
|
||
//# sourceMappingURL=main-bundle.js.map |