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C,EAAiBD,EAAOl+B,QAAQ8xB,GAEtC,OAAwB,IAApBqM,EACI,CAACD,GAGF,CACNA,EAAOx7B,MAAM,EAAGy7B,GAChBD,EAAOx7B,MAAMy7B,EAAiBrM,EAAU3xB,QACxC,kCCnBF8C,EAAOhE,QAAUm/B,GAAO3qB,mBAAmB2qB,GAAKh7B,QAAQ,YAAYk6B,GAAK,IAAIA,EAAE91B,WAAW,GAAGkI,SAAS,IAAI2uB","sources":["webpack:///./node_modules/@ant-design/icons-svg/es/asn/UserOutlined.js","webpack:///./node_modules/@ant-design/icons/es/icons/UserOutlined.js","webpack:///./node_modules/antd/lib/popover/index.js","webpack:///./node_modules/decode-uri-component/index.js","webpack:///./node_modules/filter-obj/index.js","webpack:///./node_modules/pusher-js/dist/web/pusher.js","webpack:///./node_modules/query-string/index.js","webpack:///./node_modules/split-on-first/index.js","webpack:///./node_modules/strict-uri-encode/index.js"],"sourcesContent":["// This icon file is generated automatically.\nvar UserOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z\" } }] }, \"name\": \"user\", \"theme\": \"outlined\" };\nexport default UserOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport UserOutlinedSvg from \"@ant-design/icons-svg/es/asn/UserOutlined\";\nimport AntdIcon from '../components/AntdIcon';\n\nvar UserOutlined = function UserOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: UserOutlinedSvg\n }));\n};\n\nUserOutlined.displayName = 'UserOutlined';\nexport default /*#__PURE__*/React.forwardRef(UserOutlined);","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _tooltip = _interopRequireDefault(require(\"../tooltip\"));\n\nvar _configProvider = require(\"../config-provider\");\n\nvar _getRenderPropValue = require(\"../_util/getRenderPropValue\");\n\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\nvar Popover = /*#__PURE__*/React.forwardRef(function (_a, ref) {\n var customizePrefixCls = _a.prefixCls,\n title = _a.title,\n content = _a.content,\n otherProps = __rest(_a, [\"prefixCls\", \"title\", \"content\"]);\n\n var _React$useContext = React.useContext(_configProvider.ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls;\n\n var getOverlay = function getOverlay(prefixCls) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, title && /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-title\")\n }, (0, _getRenderPropValue.getRenderPropValue)(title)), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-inner-content\")\n }, (0, _getRenderPropValue.getRenderPropValue)(content)));\n };\n\n var prefixCls = getPrefixCls('popover', customizePrefixCls);\n return /*#__PURE__*/React.createElement(_tooltip[\"default\"], (0, _extends2[\"default\"])({}, otherProps, {\n prefixCls: prefixCls,\n ref: ref,\n overlay: getOverlay(prefixCls)\n }));\n});\nPopover.displayName = 'Popover';\nPopover.defaultProps = {\n placement: 'top',\n transitionName: 'zoom-big',\n trigger: 'hover',\n mouseEnterDelay: 0.1,\n mouseLeaveDelay: 0.1,\n overlayStyle: {}\n};\nvar _default = Popover;\nexports[\"default\"] = _default;","'use strict';\nvar token = '%[a-f0-9]{2}';\nvar singleMatcher = new RegExp(token, 'gi');\nvar multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn decodeURIComponent(components.join(''));\n\t} catch (err) {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tvar left = components.slice(0, split);\n\tvar right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch (err) {\n\t\tvar tokens = input.match(singleMatcher);\n\n\t\tfor (var i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher);\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tvar replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD'\n\t};\n\n\tvar match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch (err) {\n\t\t\tvar result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tvar entries = Object.keys(replaceMap);\n\n\tfor (var i = 0; i < entries.length; i++) {\n\t\t// Replace all decoded components\n\t\tvar key = entries[i];\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nmodule.exports = function (encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\tencodedURI = encodedURI.replace(/\\+/g, ' ');\n\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch (err) {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n};\n","'use strict';\nmodule.exports = function (obj, predicate) {\n\tvar ret = {};\n\tvar keys = Object.keys(obj);\n\tvar isArr = Array.isArray(predicate);\n\n\tfor (var i = 0; i < keys.length; i++) {\n\t\tvar key = keys[i];\n\t\tvar val = obj[key];\n\n\t\tif (isArr ? predicate.indexOf(key) !== -1 : predicate(key, val, obj)) {\n\t\t\tret[key] = val;\n\t\t}\n\t}\n\n\treturn ret;\n};\n","/*!\n * Pusher JavaScript Library v7.4.0\n * https://pusher.com/\n *\n * Copyright 2020, Pusher\n * Released under the MIT licence.\n */\n\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Pusher\"] = factory();\n\telse\n\t\troot[\"Pusher\"] = factory();\n})(window, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 2);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package base64 implements Base64 encoding and decoding.\n */\n// Invalid character used in decoding to indicate\n// that the character to decode is out of range of\n// alphabet and cannot be decoded.\nvar INVALID_BYTE = 256;\n/**\n * Implements standard Base64 encoding.\n *\n * Operates in constant time.\n */\nvar Coder = /** @class */ (function () {\n // TODO(dchest): methods to encode chunk-by-chunk.\n function Coder(_paddingCharacter) {\n if (_paddingCharacter === void 0) { _paddingCharacter = \"=\"; }\n this._paddingCharacter = _paddingCharacter;\n }\n Coder.prototype.encodedLength = function (length) {\n if (!this._paddingCharacter) {\n return (length * 8 + 5) / 6 | 0;\n }\n return (length + 2) / 3 * 4 | 0;\n };\n Coder.prototype.encode = function (data) {\n var out = \"\";\n var i = 0;\n for (; i < data.length - 2; i += 3) {\n var c = (data[i] << 16) | (data[i + 1] << 8) | (data[i + 2]);\n out += this._encodeByte((c >>> 3 * 6) & 63);\n out += this._encodeByte((c >>> 2 * 6) & 63);\n out += this._encodeByte((c >>> 1 * 6) & 63);\n out += this._encodeByte((c >>> 0 * 6) & 63);\n }\n var left = data.length - i;\n if (left > 0) {\n var c = (data[i] << 16) | (left === 2 ? data[i + 1] << 8 : 0);\n out += this._encodeByte((c >>> 3 * 6) & 63);\n out += this._encodeByte((c >>> 2 * 6) & 63);\n if (left === 2) {\n out += this._encodeByte((c >>> 1 * 6) & 63);\n }\n else {\n out += this._paddingCharacter || \"\";\n }\n out += this._paddingCharacter || \"\";\n }\n return out;\n };\n Coder.prototype.maxDecodedLength = function (length) {\n if (!this._paddingCharacter) {\n return (length * 6 + 7) / 8 | 0;\n }\n return length / 4 * 3 | 0;\n };\n Coder.prototype.decodedLength = function (s) {\n return this.maxDecodedLength(s.length - this._getPaddingLength(s));\n };\n Coder.prototype.decode = function (s) {\n if (s.length === 0) {\n return new Uint8Array(0);\n }\n var paddingLength = this._getPaddingLength(s);\n var length = s.length - paddingLength;\n var out = new Uint8Array(this.maxDecodedLength(length));\n var op = 0;\n var i = 0;\n var haveBad = 0;\n var v0 = 0, v1 = 0, v2 = 0, v3 = 0;\n for (; i < length - 4; i += 4) {\n v0 = this._decodeChar(s.charCodeAt(i + 0));\n v1 = this._decodeChar(s.charCodeAt(i + 1));\n v2 = this._decodeChar(s.charCodeAt(i + 2));\n v3 = this._decodeChar(s.charCodeAt(i + 3));\n out[op++] = (v0 << 2) | (v1 >>> 4);\n out[op++] = (v1 << 4) | (v2 >>> 2);\n out[op++] = (v2 << 6) | v3;\n haveBad |= v0 & INVALID_BYTE;\n haveBad |= v1 & INVALID_BYTE;\n haveBad |= v2 & INVALID_BYTE;\n haveBad |= v3 & INVALID_BYTE;\n }\n if (i < length - 1) {\n v0 = this._decodeChar(s.charCodeAt(i));\n v1 = this._decodeChar(s.charCodeAt(i + 1));\n out[op++] = (v0 << 2) | (v1 >>> 4);\n haveBad |= v0 & INVALID_BYTE;\n haveBad |= v1 & INVALID_BYTE;\n }\n if (i < length - 2) {\n v2 = this._decodeChar(s.charCodeAt(i + 2));\n out[op++] = (v1 << 4) | (v2 >>> 2);\n haveBad |= v2 & INVALID_BYTE;\n }\n if (i < length - 3) {\n v3 = this._decodeChar(s.charCodeAt(i + 3));\n out[op++] = (v2 << 6) | v3;\n haveBad |= v3 & INVALID_BYTE;\n }\n if (haveBad !== 0) {\n throw new Error(\"Base64Coder: incorrect characters for decoding\");\n }\n return out;\n };\n // Standard encoding have the following encoded/decoded ranges,\n // which we need to convert between.\n //\n // ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 + /\n // Index: 0 - 25 26 - 51 52 - 61 62 63\n // ASCII: 65 - 90 97 - 122 48 - 57 43 47\n //\n // Encode 6 bits in b into a new character.\n Coder.prototype._encodeByte = function (b) {\n // Encoding uses constant time operations as follows:\n //\n // 1. Define comparison of A with B using (A - B) >>> 8:\n // if A > B, then result is positive integer\n // if A <= B, then result is 0\n //\n // 2. Define selection of C or 0 using bitwise AND: X & C:\n // if X == 0, then result is 0\n // if X != 0, then result is C\n //\n // 3. Start with the smallest comparison (b >= 0), which is always\n // true, so set the result to the starting ASCII value (65).\n //\n // 4. Continue comparing b to higher ASCII values, and selecting\n // zero if comparison isn't true, otherwise selecting a value\n // to add to result, which:\n //\n // a) undoes the previous addition\n // b) provides new value to add\n //\n var result = b;\n // b >= 0\n result += 65;\n // b > 25\n result += ((25 - b) >>> 8) & ((0 - 65) - 26 + 97);\n // b > 51\n result += ((51 - b) >>> 8) & ((26 - 97) - 52 + 48);\n // b > 61\n result += ((61 - b) >>> 8) & ((52 - 48) - 62 + 43);\n // b > 62\n result += ((62 - b) >>> 8) & ((62 - 43) - 63 + 47);\n return String.fromCharCode(result);\n };\n // Decode a character code into a byte.\n // Must return 256 if character is out of alphabet range.\n Coder.prototype._decodeChar = function (c) {\n // Decoding works similar to encoding: using the same comparison\n // function, but now it works on ranges: result is always incremented\n // by value, but this value becomes zero if the range is not\n // satisfied.\n //\n // Decoding starts with invalid value, 256, which is then\n // subtracted when the range is satisfied. If none of the ranges\n // apply, the function returns 256, which is then checked by\n // the caller to throw error.\n var result = INVALID_BYTE; // start with invalid character\n // c == 43 (c > 42 and c < 44)\n result += (((42 - c) & (c - 44)) >>> 8) & (-INVALID_BYTE + c - 43 + 62);\n // c == 47 (c > 46 and c < 48)\n result += (((46 - c) & (c - 48)) >>> 8) & (-INVALID_BYTE + c - 47 + 63);\n // c > 47 and c < 58\n result += (((47 - c) & (c - 58)) >>> 8) & (-INVALID_BYTE + c - 48 + 52);\n // c > 64 and c < 91\n result += (((64 - c) & (c - 91)) >>> 8) & (-INVALID_BYTE + c - 65 + 0);\n // c > 96 and c < 123\n result += (((96 - c) & (c - 123)) >>> 8) & (-INVALID_BYTE + c - 97 + 26);\n return result;\n };\n Coder.prototype._getPaddingLength = function (s) {\n var paddingLength = 0;\n if (this._paddingCharacter) {\n for (var i = s.length - 1; i >= 0; i--) {\n if (s[i] !== this._paddingCharacter) {\n break;\n }\n paddingLength++;\n }\n if (s.length < 4 || paddingLength > 2) {\n throw new Error(\"Base64Coder: incorrect padding\");\n }\n }\n return paddingLength;\n };\n return Coder;\n}());\nexports.Coder = Coder;\nvar stdCoder = new Coder();\nfunction encode(data) {\n return stdCoder.encode(data);\n}\nexports.encode = encode;\nfunction decode(s) {\n return stdCoder.decode(s);\n}\nexports.decode = decode;\n/**\n * Implements URL-safe Base64 encoding.\n * (Same as Base64, but '+' is replaced with '-', and '/' with '_').\n *\n * Operates in constant time.\n */\nvar URLSafeCoder = /** @class */ (function (_super) {\n __extends(URLSafeCoder, _super);\n function URLSafeCoder() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // URL-safe encoding have the following encoded/decoded ranges:\n //\n // ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 - _\n // Index: 0 - 25 26 - 51 52 - 61 62 63\n // ASCII: 65 - 90 97 - 122 48 - 57 45 95\n //\n URLSafeCoder.prototype._encodeByte = function (b) {\n var result = b;\n // b >= 0\n result += 65;\n // b > 25\n result += ((25 - b) >>> 8) & ((0 - 65) - 26 + 97);\n // b > 51\n result += ((51 - b) >>> 8) & ((26 - 97) - 52 + 48);\n // b > 61\n result += ((61 - b) >>> 8) & ((52 - 48) - 62 + 45);\n // b > 62\n result += ((62 - b) >>> 8) & ((62 - 45) - 63 + 95);\n return String.fromCharCode(result);\n };\n URLSafeCoder.prototype._decodeChar = function (c) {\n var result = INVALID_BYTE;\n // c == 45 (c > 44 and c < 46)\n result += (((44 - c) & (c - 46)) >>> 8) & (-INVALID_BYTE + c - 45 + 62);\n // c == 95 (c > 94 and c < 96)\n result += (((94 - c) & (c - 96)) >>> 8) & (-INVALID_BYTE + c - 95 + 63);\n // c > 47 and c < 58\n result += (((47 - c) & (c - 58)) >>> 8) & (-INVALID_BYTE + c - 48 + 52);\n // c > 64 and c < 91\n result += (((64 - c) & (c - 91)) >>> 8) & (-INVALID_BYTE + c - 65 + 0);\n // c > 96 and c < 123\n result += (((96 - c) & (c - 123)) >>> 8) & (-INVALID_BYTE + c - 97 + 26);\n return result;\n };\n return URLSafeCoder;\n}(Coder));\nexports.URLSafeCoder = URLSafeCoder;\nvar urlSafeCoder = new URLSafeCoder();\nfunction encodeURLSafe(data) {\n return urlSafeCoder.encode(data);\n}\nexports.encodeURLSafe = encodeURLSafe;\nfunction decodeURLSafe(s) {\n return urlSafeCoder.decode(s);\n}\nexports.decodeURLSafe = decodeURLSafe;\nexports.encodedLength = function (length) {\n return stdCoder.encodedLength(length);\n};\nexports.maxDecodedLength = function (length) {\n return stdCoder.maxDecodedLength(length);\n};\nexports.decodedLength = function (s) {\n return stdCoder.decodedLength(s);\n};\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Package utf8 implements UTF-8 encoding and decoding.\n */\nvar INVALID_UTF16 = \"utf8: invalid string\";\nvar INVALID_UTF8 = \"utf8: invalid source encoding\";\n/**\n * Encodes the given string into UTF-8 byte array.\n * Throws if the source string has invalid UTF-16 encoding.\n */\nfunction encode(s) {\n // Calculate result length and allocate output array.\n // encodedLength() also validates string and throws errors,\n // so we don't need repeat validation here.\n var arr = new Uint8Array(encodedLength(s));\n var pos = 0;\n for (var i = 0; i < s.length; i++) {\n var c = s.charCodeAt(i);\n if (c < 0x80) {\n arr[pos++] = c;\n }\n else if (c < 0x800) {\n arr[pos++] = 0xc0 | c >> 6;\n arr[pos++] = 0x80 | c & 0x3f;\n }\n else if (c < 0xd800) {\n arr[pos++] = 0xe0 | c >> 12;\n arr[pos++] = 0x80 | (c >> 6) & 0x3f;\n arr[pos++] = 0x80 | c & 0x3f;\n }\n else {\n i++; // get one more character\n c = (c & 0x3ff) << 10;\n c |= s.charCodeAt(i) & 0x3ff;\n c += 0x10000;\n arr[pos++] = 0xf0 | c >> 18;\n arr[pos++] = 0x80 | (c >> 12) & 0x3f;\n arr[pos++] = 0x80 | (c >> 6) & 0x3f;\n arr[pos++] = 0x80 | c & 0x3f;\n }\n }\n return arr;\n}\nexports.encode = encode;\n/**\n * Returns the number of bytes required to encode the given string into UTF-8.\n * Throws if the source string has invalid UTF-16 encoding.\n */\nfunction encodedLength(s) {\n var result = 0;\n for (var i = 0; i < s.length; i++) {\n var c = s.charCodeAt(i);\n if (c < 0x80) {\n result += 1;\n }\n else if (c < 0x800) {\n result += 2;\n }\n else if (c < 0xd800) {\n result += 3;\n }\n else if (c <= 0xdfff) {\n if (i >= s.length - 1) {\n throw new Error(INVALID_UTF16);\n }\n i++; // \"eat\" next character\n result += 4;\n }\n else {\n throw new Error(INVALID_UTF16);\n }\n }\n return result;\n}\nexports.encodedLength = encodedLength;\n/**\n * Decodes the given byte array from UTF-8 into a string.\n * Throws if encoding is invalid.\n */\nfunction decode(arr) {\n var chars = [];\n for (var i = 0; i < arr.length; i++) {\n var b = arr[i];\n if (b & 0x80) {\n var min = void 0;\n if (b < 0xe0) {\n // Need 1 more byte.\n if (i >= arr.length) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n if ((n1 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x1f) << 6 | (n1 & 0x3f);\n min = 0x80;\n }\n else if (b < 0xf0) {\n // Need 2 more bytes.\n if (i >= arr.length - 1) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 12 | (n1 & 0x3f) << 6 | (n2 & 0x3f);\n min = 0x800;\n }\n else if (b < 0xf8) {\n // Need 3 more bytes.\n if (i >= arr.length - 2) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n var n3 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80 || (n3 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 18 | (n1 & 0x3f) << 12 | (n2 & 0x3f) << 6 | (n3 & 0x3f);\n min = 0x10000;\n }\n else {\n throw new Error(INVALID_UTF8);\n }\n if (b < min || (b >= 0xd800 && b <= 0xdfff)) {\n throw new Error(INVALID_UTF8);\n }\n if (b >= 0x10000) {\n // Surrogate pair.\n if (b > 0x10ffff) {\n throw new Error(INVALID_UTF8);\n }\n b -= 0x10000;\n chars.push(String.fromCharCode(0xd800 | (b >> 10)));\n b = 0xdc00 | (b & 0x3ff);\n }\n }\n chars.push(String.fromCharCode(b));\n }\n return chars.join(\"\");\n}\nexports.decode = decode;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// required so we don't have to do require('pusher').default etc.\nmodule.exports = __webpack_require__(3).default;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// CONCATENATED MODULE: ./src/runtimes/web/dom/script_receiver_factory.ts\nvar ScriptReceiverFactory = (function () {\n function ScriptReceiverFactory(prefix, name) {\n this.lastId = 0;\n this.prefix = prefix;\n this.name = name;\n }\n ScriptReceiverFactory.prototype.create = function (callback) {\n this.lastId++;\n var number = this.lastId;\n var id = this.prefix + number;\n var name = this.name + '[' + number + ']';\n var called = false;\n var callbackWrapper = function () {\n if (!called) {\n callback.apply(null, arguments);\n called = true;\n }\n };\n this[number] = callbackWrapper;\n return { number: number, id: id, name: name, callback: callbackWrapper };\n };\n ScriptReceiverFactory.prototype.remove = function (receiver) {\n delete this[receiver.number];\n };\n return ScriptReceiverFactory;\n}());\n\nvar ScriptReceivers = new ScriptReceiverFactory('_pusher_script_', 'Pusher.ScriptReceivers');\n\n// CONCATENATED MODULE: ./src/core/defaults.ts\nvar Defaults = {\n VERSION: \"7.4.0\",\n PROTOCOL: 7,\n wsPort: 80,\n wssPort: 443,\n wsPath: '',\n httpHost: 'sockjs.pusher.com',\n httpPort: 80,\n httpsPort: 443,\n httpPath: '/pusher',\n stats_host: 'stats.pusher.com',\n authEndpoint: '/pusher/auth',\n authTransport: 'ajax',\n activityTimeout: 120000,\n pongTimeout: 30000,\n unavailableTimeout: 10000,\n cluster: 'mt1',\n userAuthentication: {\n endpoint: '/pusher/user-auth',\n transport: 'ajax'\n },\n channelAuthorization: {\n endpoint: '/pusher/auth',\n transport: 'ajax'\n },\n cdn_http: \"http://js.pusher.com\",\n cdn_https: \"https://js.pusher.com\",\n dependency_suffix: \"\"\n};\n/* harmony default export */ var defaults = (Defaults);\n\n// CONCATENATED MODULE: ./src/runtimes/web/dom/dependency_loader.ts\n\n\nvar dependency_loader_DependencyLoader = (function () {\n function DependencyLoader(options) {\n this.options = options;\n this.receivers = options.receivers || ScriptReceivers;\n this.loading = {};\n }\n DependencyLoader.prototype.load = function (name, options, callback) {\n var self = this;\n if (self.loading[name] && self.loading[name].length > 0) {\n self.loading[name].push(callback);\n }\n else {\n self.loading[name] = [callback];\n var request = runtime.createScriptRequest(self.getPath(name, options));\n var receiver = self.receivers.create(function (error) {\n self.receivers.remove(receiver);\n if (self.loading[name]) {\n var callbacks = self.loading[name];\n delete self.loading[name];\n var successCallback = function (wasSuccessful) {\n if (!wasSuccessful) {\n request.cleanup();\n }\n };\n for (var i = 0; i < callbacks.length; i++) {\n callbacks[i](error, successCallback);\n }\n }\n });\n request.send(receiver);\n }\n };\n DependencyLoader.prototype.getRoot = function (options) {\n var cdn;\n var protocol = runtime.getDocument().location.protocol;\n if ((options && options.useTLS) || protocol === 'https:') {\n cdn = this.options.cdn_https;\n }\n else {\n cdn = this.options.cdn_http;\n }\n return cdn.replace(/\\/*$/, '') + '/' + this.options.version;\n };\n DependencyLoader.prototype.getPath = function (name, options) {\n return this.getRoot(options) + '/' + name + this.options.suffix + '.js';\n };\n return DependencyLoader;\n}());\n/* harmony default export */ var dependency_loader = (dependency_loader_DependencyLoader);\n\n// CONCATENATED MODULE: ./src/runtimes/web/dom/dependencies.ts\n\n\n\nvar DependenciesReceivers = new ScriptReceiverFactory('_pusher_dependencies', 'Pusher.DependenciesReceivers');\nvar Dependencies = new dependency_loader({\n cdn_http: defaults.cdn_http,\n cdn_https: defaults.cdn_https,\n version: defaults.VERSION,\n suffix: defaults.dependency_suffix,\n receivers: DependenciesReceivers\n});\n\n// CONCATENATED MODULE: ./src/core/utils/url_store.ts\nvar urlStore = {\n baseUrl: 'https://pusher.com',\n urls: {\n authenticationEndpoint: {\n path: '/docs/channels/server_api/authenticating_users'\n },\n authorizationEndpoint: {\n path: '/docs/channels/server_api/authorizing-users/'\n },\n javascriptQuickStart: {\n path: '/docs/javascript_quick_start'\n },\n triggeringClientEvents: {\n path: '/docs/client_api_guide/client_events#trigger-events'\n },\n encryptedChannelSupport: {\n fullUrl: 'https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support'\n }\n }\n};\nvar buildLogSuffix = function (key) {\n var urlPrefix = 'See:';\n var urlObj = urlStore.urls[key];\n if (!urlObj)\n return '';\n var url;\n if (urlObj.fullUrl) {\n url = urlObj.fullUrl;\n }\n else if (urlObj.path) {\n url = urlStore.baseUrl + urlObj.path;\n }\n if (!url)\n return '';\n return urlPrefix + \" \" + url;\n};\n/* harmony default export */ var url_store = ({ buildLogSuffix: buildLogSuffix });\n\n// CONCATENATED MODULE: ./src/core/auth/options.ts\nvar AuthRequestType;\n(function (AuthRequestType) {\n AuthRequestType[\"UserAuthentication\"] = \"user-authentication\";\n AuthRequestType[\"ChannelAuthorization\"] = \"channel-authorization\";\n})(AuthRequestType || (AuthRequestType = {}));\n\n// CONCATENATED MODULE: ./src/core/errors.ts\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar BadEventName = (function (_super) {\n __extends(BadEventName, _super);\n function BadEventName(msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return BadEventName;\n}(Error));\n\nvar BadChannelName = (function (_super) {\n __extends(BadChannelName, _super);\n function BadChannelName(msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return BadChannelName;\n}(Error));\n\nvar RequestTimedOut = (function (_super) {\n __extends(RequestTimedOut, _super);\n function RequestTimedOut(msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return RequestTimedOut;\n}(Error));\n\nvar TransportPriorityTooLow = (function (_super) {\n __extends(TransportPriorityTooLow, _super);\n function TransportPriorityTooLow(msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TransportPriorityTooLow;\n}(Error));\n\nvar TransportClosed = (function (_super) {\n __extends(TransportClosed, _super);\n function TransportClosed(msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return TransportClosed;\n}(Error));\n\nvar UnsupportedFeature = (function (_super) {\n __extends(UnsupportedFeature, _super);\n function UnsupportedFeature(msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return UnsupportedFeature;\n}(Error));\n\nvar UnsupportedTransport = (function (_super) {\n __extends(UnsupportedTransport, _super);\n function UnsupportedTransport(msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return UnsupportedTransport;\n}(Error));\n\nvar UnsupportedStrategy = (function (_super) {\n __extends(UnsupportedStrategy, _super);\n function UnsupportedStrategy(msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return UnsupportedStrategy;\n}(Error));\n\nvar HTTPAuthError = (function (_super) {\n __extends(HTTPAuthError, _super);\n function HTTPAuthError(status, msg) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, msg) || this;\n _this.status = status;\n Object.setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return HTTPAuthError;\n}(Error));\n\n\n// CONCATENATED MODULE: ./src/runtimes/isomorphic/auth/xhr_auth.ts\n\n\n\n\nvar ajax = function (context, query, authOptions, authRequestType, callback) {\n var xhr = runtime.createXHR();\n xhr.open('POST', authOptions.endpoint, true);\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n for (var headerName in authOptions.headers) {\n xhr.setRequestHeader(headerName, authOptions.headers[headerName]);\n }\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n var data = void 0;\n var parsed = false;\n try {\n data = JSON.parse(xhr.responseText);\n parsed = true;\n }\n catch (e) {\n callback(new HTTPAuthError(200, \"JSON returned from \" + authRequestType.toString() + \" endpoint was invalid, yet status code was 200. Data was: \" + xhr.responseText), null);\n }\n if (parsed) {\n callback(null, data);\n }\n }\n else {\n var suffix = '';\n switch (authRequestType) {\n case AuthRequestType.UserAuthentication:\n suffix = url_store.buildLogSuffix('authenticationEndpoint');\n break;\n case AuthRequestType.ChannelAuthorization:\n suffix = \"Clients must be authenticated to join private or presence channels. \" + url_store.buildLogSuffix('authorizationEndpoint');\n break;\n }\n callback(new HTTPAuthError(xhr.status, \"Unable to retrieve auth string from \" + authRequestType.toString() + \" endpoint - \" +\n (\"received status: \" + xhr.status + \" from \" + authOptions.endpoint + \". \" + suffix)), null);\n }\n }\n };\n xhr.send(query);\n return xhr;\n};\n/* harmony default export */ var xhr_auth = (ajax);\n\n// CONCATENATED MODULE: ./src/core/base64.ts\nfunction encode(s) {\n return btoa(utob(s));\n}\nvar fromCharCode = String.fromCharCode;\nvar b64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nvar b64tab = {};\nfor (var base64_i = 0, l = b64chars.length; base64_i < l; base64_i++) {\n b64tab[b64chars.charAt(base64_i)] = base64_i;\n}\nvar cb_utob = function (c) {\n var cc = c.charCodeAt(0);\n return cc < 0x80\n ? c\n : cc < 0x800\n ? fromCharCode(0xc0 | (cc >>> 6)) + fromCharCode(0x80 | (cc & 0x3f))\n : fromCharCode(0xe0 | ((cc >>> 12) & 0x0f)) +\n fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) +\n fromCharCode(0x80 | (cc & 0x3f));\n};\nvar utob = function (u) {\n return u.replace(/[^\\x00-\\x7F]/g, cb_utob);\n};\nvar cb_encode = function (ccc) {\n var padlen = [0, 2, 1][ccc.length % 3];\n var ord = (ccc.charCodeAt(0) << 16) |\n ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8) |\n (ccc.length > 2 ? ccc.charCodeAt(2) : 0);\n var chars = [\n b64chars.charAt(ord >>> 18),\n b64chars.charAt((ord >>> 12) & 63),\n padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),\n padlen >= 1 ? '=' : b64chars.charAt(ord & 63)\n ];\n return chars.join('');\n};\nvar btoa = window.btoa ||\n function (b) {\n return b.replace(/[\\s\\S]{1,3}/g, cb_encode);\n };\n\n// CONCATENATED MODULE: ./src/core/utils/timers/abstract_timer.ts\nvar Timer = (function () {\n function Timer(set, clear, delay, callback) {\n var _this = this;\n this.clear = clear;\n this.timer = set(function () {\n if (_this.timer) {\n _this.timer = callback(_this.timer);\n }\n }, delay);\n }\n Timer.prototype.isRunning = function () {\n return this.timer !== null;\n };\n Timer.prototype.ensureAborted = function () {\n if (this.timer) {\n this.clear(this.timer);\n this.timer = null;\n }\n };\n return Timer;\n}());\n/* harmony default export */ var abstract_timer = (Timer);\n\n// CONCATENATED MODULE: ./src/core/utils/timers/index.ts\nvar timers_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\nfunction timers_clearTimeout(timer) {\n window.clearTimeout(timer);\n}\nfunction timers_clearInterval(timer) {\n window.clearInterval(timer);\n}\nvar OneOffTimer = (function (_super) {\n timers_extends(OneOffTimer, _super);\n function OneOffTimer(delay, callback) {\n return _super.call(this, setTimeout, timers_clearTimeout, delay, function (timer) {\n callback();\n return null;\n }) || this;\n }\n return OneOffTimer;\n}(abstract_timer));\n\nvar PeriodicTimer = (function (_super) {\n timers_extends(PeriodicTimer, _super);\n function PeriodicTimer(delay, callback) {\n return _super.call(this, setInterval, timers_clearInterval, delay, function (timer) {\n callback();\n return timer;\n }) || this;\n }\n return PeriodicTimer;\n}(abstract_timer));\n\n\n// CONCATENATED MODULE: ./src/core/util.ts\n\nvar Util = {\n now: function () {\n if (Date.now) {\n return Date.now();\n }\n else {\n return new Date().valueOf();\n }\n },\n defer: function (callback) {\n return new OneOffTimer(0, callback);\n },\n method: function (name) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var boundArguments = Array.prototype.slice.call(arguments, 1);\n return function (object) {\n return object[name].apply(object, boundArguments.concat(arguments));\n };\n }\n};\n/* harmony default export */ var util = (Util);\n\n// CONCATENATED MODULE: ./src/core/utils/collections.ts\n\n\nfunction extend(target) {\n var sources = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n sources[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < sources.length; i++) {\n var extensions = sources[i];\n for (var property in extensions) {\n if (extensions[property] &&\n extensions[property].constructor &&\n extensions[property].constructor === Object) {\n target[property] = extend(target[property] || {}, extensions[property]);\n }\n else {\n target[property] = extensions[property];\n }\n }\n }\n return target;\n}\nfunction stringify() {\n var m = ['Pusher'];\n for (var i = 0; i < arguments.length; i++) {\n if (typeof arguments[i] === 'string') {\n m.push(arguments[i]);\n }\n else {\n m.push(safeJSONStringify(arguments[i]));\n }\n }\n return m.join(' : ');\n}\nfunction arrayIndexOf(array, item) {\n var nativeIndexOf = Array.prototype.indexOf;\n if (array === null) {\n return -1;\n }\n if (nativeIndexOf && array.indexOf === nativeIndexOf) {\n return array.indexOf(item);\n }\n for (var i = 0, l = array.length; i < l; i++) {\n if (array[i] === item) {\n return i;\n }\n }\n return -1;\n}\nfunction objectApply(object, f) {\n for (var key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n f(object[key], key, object);\n }\n }\n}\nfunction keys(object) {\n var keys = [];\n objectApply(object, function (_, key) {\n keys.push(key);\n });\n return keys;\n}\nfunction values(object) {\n var values = [];\n objectApply(object, function (value) {\n values.push(value);\n });\n return values;\n}\nfunction apply(array, f, context) {\n for (var i = 0; i < array.length; i++) {\n f.call(context || window, array[i], i, array);\n }\n}\nfunction map(array, f) {\n var result = [];\n for (var i = 0; i < array.length; i++) {\n result.push(f(array[i], i, array, result));\n }\n return result;\n}\nfunction mapObject(object, f) {\n var result = {};\n objectApply(object, function (value, key) {\n result[key] = f(value);\n });\n return result;\n}\nfunction filter(array, test) {\n test =\n test ||\n function (value) {\n return !!value;\n };\n var result = [];\n for (var i = 0; i < array.length; i++) {\n if (test(array[i], i, array, result)) {\n result.push(array[i]);\n }\n }\n return result;\n}\nfunction filterObject(object, test) {\n var result = {};\n objectApply(object, function (value, key) {\n if ((test && test(value, key, object, result)) || Boolean(value)) {\n result[key] = value;\n }\n });\n return result;\n}\nfunction flatten(object) {\n var result = [];\n objectApply(object, function (value, key) {\n result.push([key, value]);\n });\n return result;\n}\nfunction any(array, test) {\n for (var i = 0; i < array.length; i++) {\n if (test(array[i], i, array)) {\n return true;\n }\n }\n return false;\n}\nfunction collections_all(array, test) {\n for (var i = 0; i < array.length; i++) {\n if (!test(array[i], i, array)) {\n return false;\n }\n }\n return true;\n}\nfunction encodeParamsObject(data) {\n return mapObject(data, function (value) {\n if (typeof value === 'object') {\n value = safeJSONStringify(value);\n }\n return encodeURIComponent(encode(value.toString()));\n });\n}\nfunction buildQueryString(data) {\n var params = filterObject(data, function (value) {\n return value !== undefined;\n });\n var query = map(flatten(encodeParamsObject(params)), util.method('join', '=')).join('&');\n return query;\n}\nfunction decycleObject(object) {\n var objects = [], paths = [];\n return (function derez(value, path) {\n var i, name, nu;\n switch (typeof value) {\n case 'object':\n if (!value) {\n return null;\n }\n for (i = 0; i < objects.length; i += 1) {\n if (objects[i] === value) {\n return { $ref: paths[i] };\n }\n }\n objects.push(value);\n paths.push(path);\n if (Object.prototype.toString.apply(value) === '[object Array]') {\n nu = [];\n for (i = 0; i < value.length; i += 1) {\n nu[i] = derez(value[i], path + '[' + i + ']');\n }\n }\n else {\n nu = {};\n for (name in value) {\n if (Object.prototype.hasOwnProperty.call(value, name)) {\n nu[name] = derez(value[name], path + '[' + JSON.stringify(name) + ']');\n }\n }\n }\n return nu;\n case 'number':\n case 'string':\n case 'boolean':\n return value;\n }\n })(object, '$');\n}\nfunction safeJSONStringify(source) {\n try {\n return JSON.stringify(source);\n }\n catch (e) {\n return JSON.stringify(decycleObject(source));\n }\n}\n\n// CONCATENATED MODULE: ./src/core/logger.ts\n\n\nvar logger_Logger = (function () {\n function Logger() {\n this.globalLog = function (message) {\n if (window.console && window.console.log) {\n window.console.log(message);\n }\n };\n }\n Logger.prototype.debug = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this.log(this.globalLog, args);\n };\n Logger.prototype.warn = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this.log(this.globalLogWarn, args);\n };\n Logger.prototype.error = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this.log(this.globalLogError, args);\n };\n Logger.prototype.globalLogWarn = function (message) {\n if (window.console && window.console.warn) {\n window.console.warn(message);\n }\n else {\n this.globalLog(message);\n }\n };\n Logger.prototype.globalLogError = function (message) {\n if (window.console && window.console.error) {\n window.console.error(message);\n }\n else {\n this.globalLogWarn(message);\n }\n };\n Logger.prototype.log = function (defaultLoggingFunction) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var message = stringify.apply(this, arguments);\n if (core_pusher.log) {\n core_pusher.log(message);\n }\n else if (core_pusher.logToConsole) {\n var log = defaultLoggingFunction.bind(this);\n log(message);\n }\n };\n return Logger;\n}());\n/* harmony default export */ var logger = (new logger_Logger());\n\n// CONCATENATED MODULE: ./src/runtimes/web/auth/jsonp_auth.ts\n\nvar jsonp = function (context, query, authOptions, authRequestType, callback) {\n if (authOptions.headers !== undefined) {\n logger.warn(\"To send headers with the \" + authRequestType.toString() + \" request, you must use AJAX, rather than JSONP.\");\n }\n var callbackName = context.nextAuthCallbackID.toString();\n context.nextAuthCallbackID++;\n var document = context.getDocument();\n var script = document.createElement('script');\n context.auth_callbacks[callbackName] = function (data) {\n callback(null, data);\n };\n var callback_name = \"Pusher.auth_callbacks['\" + callbackName + \"']\";\n script.src =\n authOptions.endpoint +\n '?callback=' +\n encodeURIComponent(callback_name) +\n '&' +\n query;\n var head = document.getElementsByTagName('head')[0] || document.documentElement;\n head.insertBefore(script, head.firstChild);\n};\n/* harmony default export */ var jsonp_auth = (jsonp);\n\n// CONCATENATED MODULE: ./src/runtimes/web/dom/script_request.ts\nvar ScriptRequest = (function () {\n function ScriptRequest(src) {\n this.src = src;\n }\n ScriptRequest.prototype.send = function (receiver) {\n var self = this;\n var errorString = 'Error loading ' + self.src;\n self.script = document.createElement('script');\n self.script.id = receiver.id;\n self.script.src = self.src;\n self.script.type = 'text/javascript';\n self.script.charset = 'UTF-8';\n if (self.script.addEventListener) {\n self.script.onerror = function () {\n receiver.callback(errorString);\n };\n self.script.onload = function () {\n receiver.callback(null);\n };\n }\n else {\n self.script.onreadystatechange = function () {\n if (self.script.readyState === 'loaded' ||\n self.script.readyState === 'complete') {\n receiver.callback(null);\n }\n };\n }\n if (self.script.async === undefined &&\n document.attachEvent &&\n /opera/i.test(navigator.userAgent)) {\n self.errorScript = document.createElement('script');\n self.errorScript.id = receiver.id + '_error';\n self.errorScript.text = receiver.name + \"('\" + errorString + \"');\";\n self.script.async = self.errorScript.async = false;\n }\n else {\n self.script.async = true;\n }\n var head = document.getElementsByTagName('head')[0];\n head.insertBefore(self.script, head.firstChild);\n if (self.errorScript) {\n head.insertBefore(self.errorScript, self.script.nextSibling);\n }\n };\n ScriptRequest.prototype.cleanup = function () {\n if (this.script) {\n this.script.onload = this.script.onerror = null;\n this.script.onreadystatechange = null;\n }\n if (this.script && this.script.parentNode) {\n this.script.parentNode.removeChild(this.script);\n }\n if (this.errorScript && this.errorScript.parentNode) {\n this.errorScript.parentNode.removeChild(this.errorScript);\n }\n this.script = null;\n this.errorScript = null;\n };\n return ScriptRequest;\n}());\n/* harmony default export */ var script_request = (ScriptRequest);\n\n// CONCATENATED MODULE: ./src/runtimes/web/dom/jsonp_request.ts\n\n\nvar jsonp_request_JSONPRequest = (function () {\n function JSONPRequest(url, data) {\n this.url = url;\n this.data = data;\n }\n JSONPRequest.prototype.send = function (receiver) {\n if (this.request) {\n return;\n }\n var query = buildQueryString(this.data);\n var url = this.url + '/' + receiver.number + '?' + query;\n this.request = runtime.createScriptRequest(url);\n this.request.send(receiver);\n };\n JSONPRequest.prototype.cleanup = function () {\n if (this.request) {\n this.request.cleanup();\n }\n };\n return JSONPRequest;\n}());\n/* harmony default export */ var jsonp_request = (jsonp_request_JSONPRequest);\n\n// CONCATENATED MODULE: ./src/runtimes/web/timeline/jsonp_timeline.ts\n\n\nvar getAgent = function (sender, useTLS) {\n return function (data, callback) {\n var scheme = 'http' + (useTLS ? 's' : '') + '://';\n var url = scheme + (sender.host || sender.options.host) + sender.options.path;\n var request = runtime.createJSONPRequest(url, data);\n var receiver = runtime.ScriptReceivers.create(function (error, result) {\n ScriptReceivers.remove(receiver);\n request.cleanup();\n if (result && result.host) {\n sender.host = result.host;\n }\n if (callback) {\n callback(error, result);\n }\n });\n request.send(receiver);\n };\n};\nvar jsonp_timeline_jsonp = {\n name: 'jsonp',\n getAgent: getAgent\n};\n/* harmony default export */ var jsonp_timeline = (jsonp_timeline_jsonp);\n\n// CONCATENATED MODULE: ./src/core/transports/url_schemes.ts\n\nfunction getGenericURL(baseScheme, params, path) {\n var scheme = baseScheme + (params.useTLS ? 's' : '');\n var host = params.useTLS ? params.hostTLS : params.hostNonTLS;\n return scheme + '://' + host + path;\n}\nfunction getGenericPath(key, queryString) {\n var path = '/app/' + key;\n var query = '?protocol=' +\n defaults.PROTOCOL +\n '&client=js' +\n '&version=' +\n defaults.VERSION +\n (queryString ? '&' + queryString : '');\n return path + query;\n}\nvar ws = {\n getInitial: function (key, params) {\n var path = (params.httpPath || '') + getGenericPath(key, 'flash=false');\n return getGenericURL('ws', params, path);\n }\n};\nvar http = {\n getInitial: function (key, params) {\n var path = (params.httpPath || '/pusher') + getGenericPath(key);\n return getGenericURL('http', params, path);\n }\n};\nvar sockjs = {\n getInitial: function (key, params) {\n return getGenericURL('http', params, params.httpPath || '/pusher');\n },\n getPath: function (key, params) {\n return getGenericPath(key);\n }\n};\n\n// CONCATENATED MODULE: ./src/core/events/callback_registry.ts\n\nvar callback_registry_CallbackRegistry = (function () {\n function CallbackRegistry() {\n this._callbacks = {};\n }\n CallbackRegistry.prototype.get = function (name) {\n return this._callbacks[prefix(name)];\n };\n CallbackRegistry.prototype.add = function (name, callback, context) {\n var prefixedEventName = prefix(name);\n this._callbacks[prefixedEventName] =\n this._callbacks[prefixedEventName] || [];\n this._callbacks[prefixedEventName].push({\n fn: callback,\n context: context\n });\n };\n CallbackRegistry.prototype.remove = function (name, callback, context) {\n if (!name && !callback && !context) {\n this._callbacks = {};\n return;\n }\n var names = name ? [prefix(name)] : keys(this._callbacks);\n if (callback || context) {\n this.removeCallback(names, callback, context);\n }\n else {\n this.removeAllCallbacks(names);\n }\n };\n CallbackRegistry.prototype.removeCallback = function (names, callback, context) {\n apply(names, function (name) {\n this._callbacks[name] = filter(this._callbacks[name] || [], function (binding) {\n return ((callback && callback !== binding.fn) ||\n (context && context !== binding.context));\n });\n if (this._callbacks[name].length === 0) {\n delete this._callbacks[name];\n }\n }, this);\n };\n CallbackRegistry.prototype.removeAllCallbacks = function (names) {\n apply(names, function (name) {\n delete this._callbacks[name];\n }, this);\n };\n return CallbackRegistry;\n}());\n/* harmony default export */ var callback_registry = (callback_registry_CallbackRegistry);\nfunction prefix(name) {\n return '_' + name;\n}\n\n// CONCATENATED MODULE: ./src/core/events/dispatcher.ts\n\n\nvar dispatcher_Dispatcher = (function () {\n function Dispatcher(failThrough) {\n this.callbacks = new callback_registry();\n this.global_callbacks = [];\n this.failThrough = failThrough;\n }\n Dispatcher.prototype.bind = function (eventName, callback, context) {\n this.callbacks.add(eventName, callback, context);\n return this;\n };\n Dispatcher.prototype.bind_global = function (callback) {\n this.global_callbacks.push(callback);\n return this;\n };\n Dispatcher.prototype.unbind = function (eventName, callback, context) {\n this.callbacks.remove(eventName, callback, context);\n return this;\n };\n Dispatcher.prototype.unbind_global = function (callback) {\n if (!callback) {\n this.global_callbacks = [];\n return this;\n }\n this.global_callbacks = filter(this.global_callbacks || [], function (c) { return c !== callback; });\n return this;\n };\n Dispatcher.prototype.unbind_all = function () {\n this.unbind();\n this.unbind_global();\n return this;\n };\n Dispatcher.prototype.emit = function (eventName, data, metadata) {\n for (var i = 0; i < this.global_callbacks.length; i++) {\n this.global_callbacks[i](eventName, data);\n }\n var callbacks = this.callbacks.get(eventName);\n var args = [];\n if (metadata) {\n args.push(data, metadata);\n }\n else if (data) {\n args.push(data);\n }\n if (callbacks && callbacks.length > 0) {\n for (var i = 0; i < callbacks.length; i++) {\n callbacks[i].fn.apply(callbacks[i].context || window, args);\n }\n }\n else if (this.failThrough) {\n this.failThrough(eventName, data);\n }\n return this;\n };\n return Dispatcher;\n}());\n/* harmony default export */ var dispatcher = (dispatcher_Dispatcher);\n\n// CONCATENATED MODULE: ./src/core/transports/transport_connection.ts\nvar transport_connection_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\nvar transport_connection_TransportConnection = (function (_super) {\n transport_connection_extends(TransportConnection, _super);\n function TransportConnection(hooks, name, priority, key, options) {\n var _this = _super.call(this) || this;\n _this.initialize = runtime.transportConnectionInitializer;\n _this.hooks = hooks;\n _this.name = name;\n _this.priority = priority;\n _this.key = key;\n _this.options = options;\n _this.state = 'new';\n _this.timeline = options.timeline;\n _this.activityTimeout = options.activityTimeout;\n _this.id = _this.timeline.generateUniqueID();\n return _this;\n }\n TransportConnection.prototype.handlesActivityChecks = function () {\n return Boolean(this.hooks.handlesActivityChecks);\n };\n TransportConnection.prototype.supportsPing = function () {\n return Boolean(this.hooks.supportsPing);\n };\n TransportConnection.prototype.connect = function () {\n var _this = this;\n if (this.socket || this.state !== 'initialized') {\n return false;\n }\n var url = this.hooks.urls.getInitial(this.key, this.options);\n try {\n this.socket = this.hooks.getSocket(url, this.options);\n }\n catch (e) {\n util.defer(function () {\n _this.onError(e);\n _this.changeState('closed');\n });\n return false;\n }\n this.bindListeners();\n logger.debug('Connecting', { transport: this.name, url: url });\n this.changeState('connecting');\n return true;\n };\n TransportConnection.prototype.close = function () {\n if (this.socket) {\n this.socket.close();\n return true;\n }\n else {\n return false;\n }\n };\n TransportConnection.prototype.send = function (data) {\n var _this = this;\n if (this.state === 'open') {\n util.defer(function () {\n if (_this.socket) {\n _this.socket.send(data);\n }\n });\n return true;\n }\n else {\n return false;\n }\n };\n TransportConnection.prototype.ping = function () {\n if (this.state === 'open' && this.supportsPing()) {\n this.socket.ping();\n }\n };\n TransportConnection.prototype.onOpen = function () {\n if (this.hooks.beforeOpen) {\n this.hooks.beforeOpen(this.socket, this.hooks.urls.getPath(this.key, this.options));\n }\n this.changeState('open');\n this.socket.onopen = undefined;\n };\n TransportConnection.prototype.onError = function (error) {\n this.emit('error', { type: 'WebSocketError', error: error });\n this.timeline.error(this.buildTimelineMessage({ error: error.toString() }));\n };\n TransportConnection.prototype.onClose = function (closeEvent) {\n if (closeEvent) {\n this.changeState('closed', {\n code: closeEvent.code,\n reason: closeEvent.reason,\n wasClean: closeEvent.wasClean\n });\n }\n else {\n this.changeState('closed');\n }\n this.unbindListeners();\n this.socket = undefined;\n };\n TransportConnection.prototype.onMessage = function (message) {\n this.emit('message', message);\n };\n TransportConnection.prototype.onActivity = function () {\n this.emit('activity');\n };\n TransportConnection.prototype.bindListeners = function () {\n var _this = this;\n this.socket.onopen = function () {\n _this.onOpen();\n };\n this.socket.onerror = function (error) {\n _this.onError(error);\n };\n this.socket.onclose = function (closeEvent) {\n _this.onClose(closeEvent);\n };\n this.socket.onmessage = function (message) {\n _this.onMessage(message);\n };\n if (this.supportsPing()) {\n this.socket.onactivity = function () {\n _this.onActivity();\n };\n }\n };\n TransportConnection.prototype.unbindListeners = function () {\n if (this.socket) {\n this.socket.onopen = undefined;\n this.socket.onerror = undefined;\n this.socket.onclose = undefined;\n this.socket.onmessage = undefined;\n if (this.supportsPing()) {\n this.socket.onactivity = undefined;\n }\n }\n };\n TransportConnection.prototype.changeState = function (state, params) {\n this.state = state;\n this.timeline.info(this.buildTimelineMessage({\n state: state,\n params: params\n }));\n this.emit(state, params);\n };\n TransportConnection.prototype.buildTimelineMessage = function (message) {\n return extend({ cid: this.id }, message);\n };\n return TransportConnection;\n}(dispatcher));\n/* harmony default export */ var transport_connection = (transport_connection_TransportConnection);\n\n// CONCATENATED MODULE: ./src/core/transports/transport.ts\n\nvar transport_Transport = (function () {\n function Transport(hooks) {\n this.hooks = hooks;\n }\n Transport.prototype.isSupported = function (environment) {\n return this.hooks.isSupported(environment);\n };\n Transport.prototype.createConnection = function (name, priority, key, options) {\n return new transport_connection(this.hooks, name, priority, key, options);\n };\n return Transport;\n}());\n/* harmony default export */ var transports_transport = (transport_Transport);\n\n// CONCATENATED MODULE: ./src/runtimes/isomorphic/transports/transports.ts\n\n\n\n\nvar WSTransport = new transports_transport({\n urls: ws,\n handlesActivityChecks: false,\n supportsPing: false,\n isInitialized: function () {\n return Boolean(runtime.getWebSocketAPI());\n },\n isSupported: function () {\n return Boolean(runtime.getWebSocketAPI());\n },\n getSocket: function (url) {\n return runtime.createWebSocket(url);\n }\n});\nvar httpConfiguration = {\n urls: http,\n handlesActivityChecks: false,\n supportsPing: true,\n isInitialized: function () {\n return true;\n }\n};\nvar streamingConfiguration = extend({\n getSocket: function (url) {\n return runtime.HTTPFactory.createStreamingSocket(url);\n }\n}, httpConfiguration);\nvar pollingConfiguration = extend({\n getSocket: function (url) {\n return runtime.HTTPFactory.createPollingSocket(url);\n }\n}, httpConfiguration);\nvar xhrConfiguration = {\n isSupported: function () {\n return runtime.isXHRSupported();\n }\n};\nvar XHRStreamingTransport = new transports_transport((extend({}, streamingConfiguration, xhrConfiguration)));\nvar XHRPollingTransport = new transports_transport(extend({}, pollingConfiguration, xhrConfiguration));\nvar Transports = {\n ws: WSTransport,\n xhr_streaming: XHRStreamingTransport,\n xhr_polling: XHRPollingTransport\n};\n/* harmony default export */ var transports = (Transports);\n\n// CONCATENATED MODULE: ./src/runtimes/web/transports/transports.ts\n\n\n\n\n\n\nvar SockJSTransport = new transports_transport({\n file: 'sockjs',\n urls: sockjs,\n handlesActivityChecks: true,\n supportsPing: false,\n isSupported: function () {\n return true;\n },\n isInitialized: function () {\n return window.SockJS !== undefined;\n },\n getSocket: function (url, options) {\n return new window.SockJS(url, null, {\n js_path: Dependencies.getPath('sockjs', {\n useTLS: options.useTLS\n }),\n ignore_null_origin: options.ignoreNullOrigin\n });\n },\n beforeOpen: function (socket, path) {\n socket.send(JSON.stringify({\n path: path\n }));\n }\n});\nvar xdrConfiguration = {\n isSupported: function (environment) {\n var yes = runtime.isXDRSupported(environment.useTLS);\n return yes;\n }\n};\nvar XDRStreamingTransport = new transports_transport((extend({}, streamingConfiguration, xdrConfiguration)));\nvar XDRPollingTransport = new transports_transport(extend({}, pollingConfiguration, xdrConfiguration));\ntransports.xdr_streaming = XDRStreamingTransport;\ntransports.xdr_polling = XDRPollingTransport;\ntransports.sockjs = SockJSTransport;\n/* harmony default export */ var transports_transports = (transports);\n\n// CONCATENATED MODULE: ./src/runtimes/web/net_info.ts\nvar net_info_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\nvar NetInfo = (function (_super) {\n net_info_extends(NetInfo, _super);\n function NetInfo() {\n var _this = _super.call(this) || this;\n var self = _this;\n if (window.addEventListener !== undefined) {\n window.addEventListener('online', function () {\n self.emit('online');\n }, false);\n window.addEventListener('offline', function () {\n self.emit('offline');\n }, false);\n }\n return _this;\n }\n NetInfo.prototype.isOnline = function () {\n if (window.navigator.onLine === undefined) {\n return true;\n }\n else {\n return window.navigator.onLine;\n }\n };\n return NetInfo;\n}(dispatcher));\n\nvar net_info_Network = new NetInfo();\n\n// CONCATENATED MODULE: ./src/core/transports/assistant_to_the_transport_manager.ts\n\n\nvar assistant_to_the_transport_manager_AssistantToTheTransportManager = (function () {\n function AssistantToTheTransportManager(manager, transport, options) {\n this.manager = manager;\n this.transport = transport;\n this.minPingDelay = options.minPingDelay;\n this.maxPingDelay = options.maxPingDelay;\n this.pingDelay = undefined;\n }\n AssistantToTheTransportManager.prototype.createConnection = function (name, priority, key, options) {\n var _this = this;\n options = extend({}, options, {\n activityTimeout: this.pingDelay\n });\n var connection = this.transport.createConnection(name, priority, key, options);\n var openTimestamp = null;\n var onOpen = function () {\n connection.unbind('open', onOpen);\n connection.bind('closed', onClosed);\n openTimestamp = util.now();\n };\n var onClosed = function (closeEvent) {\n connection.unbind('closed', onClosed);\n if (closeEvent.code === 1002 || closeEvent.code === 1003) {\n _this.manager.reportDeath();\n }\n else if (!closeEvent.wasClean && openTimestamp) {\n var lifespan = util.now() - openTimestamp;\n if (lifespan < 2 * _this.maxPingDelay) {\n _this.manager.reportDeath();\n _this.pingDelay = Math.max(lifespan / 2, _this.minPingDelay);\n }\n }\n };\n connection.bind('open', onOpen);\n return connection;\n };\n AssistantToTheTransportManager.prototype.isSupported = function (environment) {\n return this.manager.isAlive() && this.transport.isSupported(environment);\n };\n return AssistantToTheTransportManager;\n}());\n/* harmony default export */ var assistant_to_the_transport_manager = (assistant_to_the_transport_manager_AssistantToTheTransportManager);\n\n// CONCATENATED MODULE: ./src/core/connection/protocol/protocol.ts\nvar Protocol = {\n decodeMessage: function (messageEvent) {\n try {\n var messageData = JSON.parse(messageEvent.data);\n var pusherEventData = messageData.data;\n if (typeof pusherEventData === 'string') {\n try {\n pusherEventData = JSON.parse(messageData.data);\n }\n catch (e) { }\n }\n var pusherEvent = {\n event: messageData.event,\n channel: messageData.channel,\n data: pusherEventData\n };\n if (messageData.user_id) {\n pusherEvent.user_id = messageData.user_id;\n }\n return pusherEvent;\n }\n catch (e) {\n throw { type: 'MessageParseError', error: e, data: messageEvent.data };\n }\n },\n encodeMessage: function (event) {\n return JSON.stringify(event);\n },\n processHandshake: function (messageEvent) {\n var message = Protocol.decodeMessage(messageEvent);\n if (message.event === 'pusher:connection_established') {\n if (!message.data.activity_timeout) {\n throw 'No activity timeout specified in handshake';\n }\n return {\n action: 'connected',\n id: message.data.socket_id,\n activityTimeout: message.data.activity_timeout * 1000\n };\n }\n else if (message.event === 'pusher:error') {\n return {\n action: this.getCloseAction(message.data),\n error: this.getCloseError(message.data)\n };\n }\n else {\n throw 'Invalid handshake';\n }\n },\n getCloseAction: function (closeEvent) {\n if (closeEvent.code < 4000) {\n if (closeEvent.code >= 1002 && closeEvent.code <= 1004) {\n return 'backoff';\n }\n else {\n return null;\n }\n }\n else if (closeEvent.code === 4000) {\n return 'tls_only';\n }\n else if (closeEvent.code < 4100) {\n return 'refused';\n }\n else if (closeEvent.code < 4200) {\n return 'backoff';\n }\n else if (closeEvent.code < 4300) {\n return 'retry';\n }\n else {\n return 'refused';\n }\n },\n getCloseError: function (closeEvent) {\n if (closeEvent.code !== 1000 && closeEvent.code !== 1001) {\n return {\n type: 'PusherError',\n data: {\n code: closeEvent.code,\n message: closeEvent.reason || closeEvent.message\n }\n };\n }\n else {\n return null;\n }\n }\n};\n/* harmony default export */ var protocol_protocol = (Protocol);\n\n// CONCATENATED MODULE: ./src/core/connection/connection.ts\nvar connection_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\nvar connection_Connection = (function (_super) {\n connection_extends(Connection, _super);\n function Connection(id, transport) {\n var _this = _super.call(this) || this;\n _this.id = id;\n _this.transport = transport;\n _this.activityTimeout = transport.activityTimeout;\n _this.bindListeners();\n return _this;\n }\n Connection.prototype.handlesActivityChecks = function () {\n return this.transport.handlesActivityChecks();\n };\n Connection.prototype.send = function (data) {\n return this.transport.send(data);\n };\n Connection.prototype.send_event = function (name, data, channel) {\n var event = { event: name, data: data };\n if (channel) {\n event.channel = channel;\n }\n logger.debug('Event sent', event);\n return this.send(protocol_protocol.encodeMessage(event));\n };\n Connection.prototype.ping = function () {\n if (this.transport.supportsPing()) {\n this.transport.ping();\n }\n else {\n this.send_event('pusher:ping', {});\n }\n };\n Connection.prototype.close = function () {\n this.transport.close();\n };\n Connection.prototype.bindListeners = function () {\n var _this = this;\n var listeners = {\n message: function (messageEvent) {\n var pusherEvent;\n try {\n pusherEvent = protocol_protocol.decodeMessage(messageEvent);\n }\n catch (e) {\n _this.emit('error', {\n type: 'MessageParseError',\n error: e,\n data: messageEvent.data\n });\n }\n if (pusherEvent !== undefined) {\n logger.debug('Event recd', pusherEvent);\n switch (pusherEvent.event) {\n case 'pusher:error':\n _this.emit('error', {\n type: 'PusherError',\n data: pusherEvent.data\n });\n break;\n case 'pusher:ping':\n _this.emit('ping');\n break;\n case 'pusher:pong':\n _this.emit('pong');\n break;\n }\n _this.emit('message', pusherEvent);\n }\n },\n activity: function () {\n _this.emit('activity');\n },\n error: function (error) {\n _this.emit('error', error);\n },\n closed: function (closeEvent) {\n unbindListeners();\n if (closeEvent && closeEvent.code) {\n _this.handleCloseEvent(closeEvent);\n }\n _this.transport = null;\n _this.emit('closed');\n }\n };\n var unbindListeners = function () {\n objectApply(listeners, function (listener, event) {\n _this.transport.unbind(event, listener);\n });\n };\n objectApply(listeners, function (listener, event) {\n _this.transport.bind(event, listener);\n });\n };\n Connection.prototype.handleCloseEvent = function (closeEvent) {\n var action = protocol_protocol.getCloseAction(closeEvent);\n var error = protocol_protocol.getCloseError(closeEvent);\n if (error) {\n this.emit('error', error);\n }\n if (action) {\n this.emit(action, { action: action, error: error });\n }\n };\n return Connection;\n}(dispatcher));\n/* harmony default export */ var connection_connection = (connection_Connection);\n\n// CONCATENATED MODULE: ./src/core/connection/handshake/index.ts\n\n\n\nvar handshake_Handshake = (function () {\n function Handshake(transport, callback) {\n this.transport = transport;\n this.callback = callback;\n this.bindListeners();\n }\n Handshake.prototype.close = function () {\n this.unbindListeners();\n this.transport.close();\n };\n Handshake.prototype.bindListeners = function () {\n var _this = this;\n this.onMessage = function (m) {\n _this.unbindListeners();\n var result;\n try {\n result = protocol_protocol.processHandshake(m);\n }\n catch (e) {\n _this.finish('error', { error: e });\n _this.transport.close();\n return;\n }\n if (result.action === 'connected') {\n _this.finish('connected', {\n connection: new connection_connection(result.id, _this.transport),\n activityTimeout: result.activityTimeout\n });\n }\n else {\n _this.finish(result.action, { error: result.error });\n _this.transport.close();\n }\n };\n this.onClosed = function (closeEvent) {\n _this.unbindListeners();\n var action = protocol_protocol.getCloseAction(closeEvent) || 'backoff';\n var error = protocol_protocol.getCloseError(closeEvent);\n _this.finish(action, { error: error });\n };\n this.transport.bind('message', this.onMessage);\n this.transport.bind('closed', this.onClosed);\n };\n Handshake.prototype.unbindListeners = function () {\n this.transport.unbind('message', this.onMessage);\n this.transport.unbind('closed', this.onClosed);\n };\n Handshake.prototype.finish = function (action, params) {\n this.callback(extend({ transport: this.transport, action: action }, params));\n };\n return Handshake;\n}());\n/* harmony default export */ var connection_handshake = (handshake_Handshake);\n\n// CONCATENATED MODULE: ./src/core/timeline/timeline_sender.ts\n\nvar timeline_sender_TimelineSender = (function () {\n function TimelineSender(timeline, options) {\n this.timeline = timeline;\n this.options = options || {};\n }\n TimelineSender.prototype.send = function (useTLS, callback) {\n if (this.timeline.isEmpty()) {\n return;\n }\n this.timeline.send(runtime.TimelineTransport.getAgent(this, useTLS), callback);\n };\n return TimelineSender;\n}());\n/* harmony default export */ var timeline_sender = (timeline_sender_TimelineSender);\n\n// CONCATENATED MODULE: ./src/core/channels/channel.ts\nvar channel_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\nvar channel_Channel = (function (_super) {\n channel_extends(Channel, _super);\n function Channel(name, pusher) {\n var _this = _super.call(this, function (event, data) {\n logger.debug('No callbacks on ' + name + ' for ' + event);\n }) || this;\n _this.name = name;\n _this.pusher = pusher;\n _this.subscribed = false;\n _this.subscriptionPending = false;\n _this.subscriptionCancelled = false;\n return _this;\n }\n Channel.prototype.authorize = function (socketId, callback) {\n return callback(null, { auth: '' });\n };\n Channel.prototype.trigger = function (event, data) {\n if (event.indexOf('client-') !== 0) {\n throw new BadEventName(\"Event '\" + event + \"' does not start with 'client-'\");\n }\n if (!this.subscribed) {\n var suffix = url_store.buildLogSuffix('triggeringClientEvents');\n logger.warn(\"Client event triggered before channel 'subscription_succeeded' event . \" + suffix);\n }\n return this.pusher.send_event(event, data, this.name);\n };\n Channel.prototype.disconnect = function () {\n this.subscribed = false;\n this.subscriptionPending = false;\n };\n Channel.prototype.handleEvent = function (event) {\n var eventName = event.event;\n var data = event.data;\n if (eventName === 'pusher_internal:subscription_succeeded') {\n this.handleSubscriptionSucceededEvent(event);\n }\n else if (eventName === 'pusher_internal:subscription_count') {\n this.handleSubscriptionCountEvent(event);\n }\n else if (eventName.indexOf('pusher_internal:') !== 0) {\n var metadata = {};\n this.emit(eventName, data, metadata);\n }\n };\n Channel.prototype.handleSubscriptionSucceededEvent = function (event) {\n this.subscriptionPending = false;\n this.subscribed = true;\n if (this.subscriptionCancelled) {\n this.pusher.unsubscribe(this.name);\n }\n else {\n this.emit('pusher:subscription_succeeded', event.data);\n }\n };\n Channel.prototype.handleSubscriptionCountEvent = function (event) {\n if (event.data.subscription_count) {\n this.subscriptionCount = event.data.subscription_count;\n }\n this.emit('pusher:subscription_count', event.data);\n };\n Channel.prototype.subscribe = function () {\n var _this = this;\n if (this.subscribed) {\n return;\n }\n this.subscriptionPending = true;\n this.subscriptionCancelled = false;\n this.authorize(this.pusher.connection.socket_id, function (error, data) {\n if (error) {\n _this.subscriptionPending = false;\n logger.error(error.toString());\n _this.emit('pusher:subscription_error', Object.assign({}, {\n type: 'AuthError',\n error: error.message\n }, error instanceof HTTPAuthError ? { status: error.status } : {}));\n }\n else {\n _this.pusher.send_event('pusher:subscribe', {\n auth: data.auth,\n channel_data: data.channel_data,\n channel: _this.name\n });\n }\n });\n };\n Channel.prototype.unsubscribe = function () {\n this.subscribed = false;\n this.pusher.send_event('pusher:unsubscribe', {\n channel: this.name\n });\n };\n Channel.prototype.cancelSubscription = function () {\n this.subscriptionCancelled = true;\n };\n Channel.prototype.reinstateSubscription = function () {\n this.subscriptionCancelled = false;\n };\n return Channel;\n}(dispatcher));\n/* harmony default export */ var channels_channel = (channel_Channel);\n\n// CONCATENATED MODULE: ./src/core/channels/private_channel.ts\nvar private_channel_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\nvar PrivateChannel = (function (_super) {\n private_channel_extends(PrivateChannel, _super);\n function PrivateChannel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PrivateChannel.prototype.authorize = function (socketId, callback) {\n return this.pusher.config.channelAuthorizer({\n channelName: this.name,\n socketId: socketId\n }, callback);\n };\n return PrivateChannel;\n}(channels_channel));\n/* harmony default export */ var private_channel = (PrivateChannel);\n\n// CONCATENATED MODULE: ./src/core/channels/members.ts\n\nvar members_Members = (function () {\n function Members() {\n this.reset();\n }\n Members.prototype.get = function (id) {\n if (Object.prototype.hasOwnProperty.call(this.members, id)) {\n return {\n id: id,\n info: this.members[id]\n };\n }\n else {\n return null;\n }\n };\n Members.prototype.each = function (callback) {\n var _this = this;\n objectApply(this.members, function (member, id) {\n callback(_this.get(id));\n });\n };\n Members.prototype.setMyID = function (id) {\n this.myID = id;\n };\n Members.prototype.onSubscription = function (subscriptionData) {\n this.members = subscriptionData.presence.hash;\n this.count = subscriptionData.presence.count;\n this.me = this.get(this.myID);\n };\n Members.prototype.addMember = function (memberData) {\n if (this.get(memberData.user_id) === null) {\n this.count++;\n }\n this.members[memberData.user_id] = memberData.user_info;\n return this.get(memberData.user_id);\n };\n Members.prototype.removeMember = function (memberData) {\n var member = this.get(memberData.user_id);\n if (member) {\n delete this.members[memberData.user_id];\n this.count--;\n }\n return member;\n };\n Members.prototype.reset = function () {\n this.members = {};\n this.count = 0;\n this.myID = null;\n this.me = null;\n };\n return Members;\n}());\n/* harmony default export */ var members = (members_Members);\n\n// CONCATENATED MODULE: ./src/core/channels/presence_channel.ts\nvar presence_channel_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\nvar presence_channel_PresenceChannel = (function (_super) {\n presence_channel_extends(PresenceChannel, _super);\n function PresenceChannel(name, pusher) {\n var _this = _super.call(this, name, pusher) || this;\n _this.members = new members();\n return _this;\n }\n PresenceChannel.prototype.authorize = function (socketId, callback) {\n var _this = this;\n _super.prototype.authorize.call(this, socketId, function (error, authData) { return __awaiter(_this, void 0, void 0, function () {\n var channelData, suffix;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!error) return [3, 3];\n authData = authData;\n if (!(authData.channel_data != null)) return [3, 1];\n channelData = JSON.parse(authData.channel_data);\n this.members.setMyID(channelData.user_id);\n return [3, 3];\n case 1: return [4, this.pusher.user.signinDonePromise];\n case 2:\n _a.sent();\n if (this.pusher.user.user_data != null) {\n this.members.setMyID(this.pusher.user.user_data.id);\n }\n else {\n suffix = url_store.buildLogSuffix('authorizationEndpoint');\n logger.error(\"Invalid auth response for channel '\" + this.name + \"', \" +\n (\"expected 'channel_data' field. \" + suffix + \", \") +\n \"or the user should be signed in.\");\n callback('Invalid auth response');\n return [2];\n }\n _a.label = 3;\n case 3:\n callback(error, authData);\n return [2];\n }\n });\n }); });\n };\n PresenceChannel.prototype.handleEvent = function (event) {\n var eventName = event.event;\n if (eventName.indexOf('pusher_internal:') === 0) {\n this.handleInternalEvent(event);\n }\n else {\n var data = event.data;\n var metadata = {};\n if (event.user_id) {\n metadata.user_id = event.user_id;\n }\n this.emit(eventName, data, metadata);\n }\n };\n PresenceChannel.prototype.handleInternalEvent = function (event) {\n var eventName = event.event;\n var data = event.data;\n switch (eventName) {\n case 'pusher_internal:subscription_succeeded':\n this.handleSubscriptionSucceededEvent(event);\n break;\n case 'pusher_internal:subscription_count':\n this.handleSubscriptionCountEvent(event);\n break;\n case 'pusher_internal:member_added':\n var addedMember = this.members.addMember(data);\n this.emit('pusher:member_added', addedMember);\n break;\n case 'pusher_internal:member_removed':\n var removedMember = this.members.removeMember(data);\n if (removedMember) {\n this.emit('pusher:member_removed', removedMember);\n }\n break;\n }\n };\n PresenceChannel.prototype.handleSubscriptionSucceededEvent = function (event) {\n this.subscriptionPending = false;\n this.subscribed = true;\n if (this.subscriptionCancelled) {\n this.pusher.unsubscribe(this.name);\n }\n else {\n this.members.onSubscription(event.data);\n this.emit('pusher:subscription_succeeded', this.members);\n }\n };\n PresenceChannel.prototype.disconnect = function () {\n this.members.reset();\n _super.prototype.disconnect.call(this);\n };\n return PresenceChannel;\n}(private_channel));\n/* harmony default export */ var presence_channel = (presence_channel_PresenceChannel);\n\n// EXTERNAL MODULE: ./node_modules/@stablelib/utf8/lib/utf8.js\nvar utf8 = __webpack_require__(1);\n\n// EXTERNAL MODULE: ./node_modules/@stablelib/base64/lib/base64.js\nvar base64 = __webpack_require__(0);\n\n// CONCATENATED MODULE: ./src/core/channels/encrypted_channel.ts\nvar encrypted_channel_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\nvar encrypted_channel_EncryptedChannel = (function (_super) {\n encrypted_channel_extends(EncryptedChannel, _super);\n function EncryptedChannel(name, pusher, nacl) {\n var _this = _super.call(this, name, pusher) || this;\n _this.key = null;\n _this.nacl = nacl;\n return _this;\n }\n EncryptedChannel.prototype.authorize = function (socketId, callback) {\n var _this = this;\n _super.prototype.authorize.call(this, socketId, function (error, authData) {\n if (error) {\n callback(error, authData);\n return;\n }\n var sharedSecret = authData['shared_secret'];\n if (!sharedSecret) {\n callback(new Error(\"No shared_secret key in auth payload for encrypted channel: \" + _this.name), null);\n return;\n }\n _this.key = Object(base64[\"decode\"])(sharedSecret);\n delete authData['shared_secret'];\n callback(null, authData);\n });\n };\n EncryptedChannel.prototype.trigger = function (event, data) {\n throw new UnsupportedFeature('Client events are not currently supported for encrypted channels');\n };\n EncryptedChannel.prototype.handleEvent = function (event) {\n var eventName = event.event;\n var data = event.data;\n if (eventName.indexOf('pusher_internal:') === 0 ||\n eventName.indexOf('pusher:') === 0) {\n _super.prototype.handleEvent.call(this, event);\n return;\n }\n this.handleEncryptedEvent(eventName, data);\n };\n EncryptedChannel.prototype.handleEncryptedEvent = function (event, data) {\n var _this = this;\n if (!this.key) {\n logger.debug('Received encrypted event before key has been retrieved from the authEndpoint');\n return;\n }\n if (!data.ciphertext || !data.nonce) {\n logger.error('Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: ' +\n data);\n return;\n }\n var cipherText = Object(base64[\"decode\"])(data.ciphertext);\n if (cipherText.length < this.nacl.secretbox.overheadLength) {\n logger.error(\"Expected encrypted event ciphertext length to be \" + this.nacl.secretbox.overheadLength + \", got: \" + cipherText.length);\n return;\n }\n var nonce = Object(base64[\"decode\"])(data.nonce);\n if (nonce.length < this.nacl.secretbox.nonceLength) {\n logger.error(\"Expected encrypted event nonce length to be \" + this.nacl.secretbox.nonceLength + \", got: \" + nonce.length);\n return;\n }\n var bytes = this.nacl.secretbox.open(cipherText, nonce, this.key);\n if (bytes === null) {\n logger.debug('Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint...');\n this.authorize(this.pusher.connection.socket_id, function (error, authData) {\n if (error) {\n logger.error(\"Failed to make a request to the authEndpoint: \" + authData + \". Unable to fetch new key, so dropping encrypted event\");\n return;\n }\n bytes = _this.nacl.secretbox.open(cipherText, nonce, _this.key);\n if (bytes === null) {\n logger.error(\"Failed to decrypt event with new key. Dropping encrypted event\");\n return;\n }\n _this.emit(event, _this.getDataToEmit(bytes));\n return;\n });\n return;\n }\n this.emit(event, this.getDataToEmit(bytes));\n };\n EncryptedChannel.prototype.getDataToEmit = function (bytes) {\n var raw = Object(utf8[\"decode\"])(bytes);\n try {\n return JSON.parse(raw);\n }\n catch (_a) {\n return raw;\n }\n };\n return EncryptedChannel;\n}(private_channel));\n/* harmony default export */ var encrypted_channel = (encrypted_channel_EncryptedChannel);\n\n// CONCATENATED MODULE: ./src/core/connection/connection_manager.ts\nvar connection_manager_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\nvar connection_manager_ConnectionManager = (function (_super) {\n connection_manager_extends(ConnectionManager, _super);\n function ConnectionManager(key, options) {\n var _this = _super.call(this) || this;\n _this.state = 'initialized';\n _this.connection = null;\n _this.key = key;\n _this.options = options;\n _this.timeline = _this.options.timeline;\n _this.usingTLS = _this.options.useTLS;\n _this.errorCallbacks = _this.buildErrorCallbacks();\n _this.connectionCallbacks = _this.buildConnectionCallbacks(_this.errorCallbacks);\n _this.handshakeCallbacks = _this.buildHandshakeCallbacks(_this.errorCallbacks);\n var Network = runtime.getNetwork();\n Network.bind('online', function () {\n _this.timeline.info({ netinfo: 'online' });\n if (_this.state === 'connecting' || _this.state === 'unavailable') {\n _this.retryIn(0);\n }\n });\n Network.bind('offline', function () {\n _this.timeline.info({ netinfo: 'offline' });\n if (_this.connection) {\n _this.sendActivityCheck();\n }\n });\n _this.updateStrategy();\n return _this;\n }\n ConnectionManager.prototype.connect = function () {\n if (this.connection || this.runner) {\n return;\n }\n if (!this.strategy.isSupported()) {\n this.updateState('failed');\n return;\n }\n this.updateState('connecting');\n this.startConnecting();\n this.setUnavailableTimer();\n };\n ConnectionManager.prototype.send = function (data) {\n if (this.connection) {\n return this.connection.send(data);\n }\n else {\n return false;\n }\n };\n ConnectionManager.prototype.send_event = function (name, data, channel) {\n if (this.connection) {\n return this.connection.send_event(name, data, channel);\n }\n else {\n return false;\n }\n };\n ConnectionManager.prototype.disconnect = function () {\n this.disconnectInternally();\n this.updateState('disconnected');\n };\n ConnectionManager.prototype.isUsingTLS = function () {\n return this.usingTLS;\n };\n ConnectionManager.prototype.startConnecting = function () {\n var _this = this;\n var callback = function (error, handshake) {\n if (error) {\n _this.runner = _this.strategy.connect(0, callback);\n }\n else {\n if (handshake.action === 'error') {\n _this.emit('error', {\n type: 'HandshakeError',\n error: handshake.error\n });\n _this.timeline.error({ handshakeError: handshake.error });\n }\n else {\n _this.abortConnecting();\n _this.handshakeCallbacks[handshake.action](handshake);\n }\n }\n };\n this.runner = this.strategy.connect(0, callback);\n };\n ConnectionManager.prototype.abortConnecting = function () {\n if (this.runner) {\n this.runner.abort();\n this.runner = null;\n }\n };\n ConnectionManager.prototype.disconnectInternally = function () {\n this.abortConnecting();\n this.clearRetryTimer();\n this.clearUnavailableTimer();\n if (this.connection) {\n var connection = this.abandonConnection();\n connection.close();\n }\n };\n ConnectionManager.prototype.updateStrategy = function () {\n this.strategy = this.options.getStrategy({\n key: this.key,\n timeline: this.timeline,\n useTLS: this.usingTLS\n });\n };\n ConnectionManager.prototype.retryIn = function (delay) {\n var _this = this;\n this.timeline.info({ action: 'retry', delay: delay });\n if (delay > 0) {\n this.emit('connecting_in', Math.round(delay / 1000));\n }\n this.retryTimer = new OneOffTimer(delay || 0, function () {\n _this.disconnectInternally();\n _this.connect();\n });\n };\n ConnectionManager.prototype.clearRetryTimer = function () {\n if (this.retryTimer) {\n this.retryTimer.ensureAborted();\n this.retryTimer = null;\n }\n };\n ConnectionManager.prototype.setUnavailableTimer = function () {\n var _this = this;\n this.unavailableTimer = new OneOffTimer(this.options.unavailableTimeout, function () {\n _this.updateState('unavailable');\n });\n };\n ConnectionManager.prototype.clearUnavailableTimer = function () {\n if (this.unavailableTimer) {\n this.unavailableTimer.ensureAborted();\n }\n };\n ConnectionManager.prototype.sendActivityCheck = function () {\n var _this = this;\n this.stopActivityCheck();\n this.connection.ping();\n this.activityTimer = new OneOffTimer(this.options.pongTimeout, function () {\n _this.timeline.error({ pong_timed_out: _this.options.pongTimeout });\n _this.retryIn(0);\n });\n };\n ConnectionManager.prototype.resetActivityCheck = function () {\n var _this = this;\n this.stopActivityCheck();\n if (this.connection && !this.connection.handlesActivityChecks()) {\n this.activityTimer = new OneOffTimer(this.activityTimeout, function () {\n _this.sendActivityCheck();\n });\n }\n };\n ConnectionManager.prototype.stopActivityCheck = function () {\n if (this.activityTimer) {\n this.activityTimer.ensureAborted();\n }\n };\n ConnectionManager.prototype.buildConnectionCallbacks = function (errorCallbacks) {\n var _this = this;\n return extend({}, errorCallbacks, {\n message: function (message) {\n _this.resetActivityCheck();\n _this.emit('message', message);\n },\n ping: function () {\n _this.send_event('pusher:pong', {});\n },\n activity: function () {\n _this.resetActivityCheck();\n },\n error: function (error) {\n _this.emit('error', error);\n },\n closed: function () {\n _this.abandonConnection();\n if (_this.shouldRetry()) {\n _this.retryIn(1000);\n }\n }\n });\n };\n ConnectionManager.prototype.buildHandshakeCallbacks = function (errorCallbacks) {\n var _this = this;\n return extend({}, errorCallbacks, {\n connected: function (handshake) {\n _this.activityTimeout = Math.min(_this.options.activityTimeout, handshake.activityTimeout, handshake.connection.activityTimeout || Infinity);\n _this.clearUnavailableTimer();\n _this.setConnection(handshake.connection);\n _this.socket_id = _this.connection.id;\n _this.updateState('connected', { socket_id: _this.socket_id });\n }\n });\n };\n ConnectionManager.prototype.buildErrorCallbacks = function () {\n var _this = this;\n var withErrorEmitted = function (callback) {\n return function (result) {\n if (result.error) {\n _this.emit('error', { type: 'WebSocketError', error: result.error });\n }\n callback(result);\n };\n };\n return {\n tls_only: withErrorEmitted(function () {\n _this.usingTLS = true;\n _this.updateStrategy();\n _this.retryIn(0);\n }),\n refused: withErrorEmitted(function () {\n _this.disconnect();\n }),\n backoff: withErrorEmitted(function () {\n _this.retryIn(1000);\n }),\n retry: withErrorEmitted(function () {\n _this.retryIn(0);\n })\n };\n };\n ConnectionManager.prototype.setConnection = function (connection) {\n this.connection = connection;\n for (var event in this.connectionCallbacks) {\n this.connection.bind(event, this.connectionCallbacks[event]);\n }\n this.resetActivityCheck();\n };\n ConnectionManager.prototype.abandonConnection = function () {\n if (!this.connection) {\n return;\n }\n this.stopActivityCheck();\n for (var event in this.connectionCallbacks) {\n this.connection.unbind(event, this.connectionCallbacks[event]);\n }\n var connection = this.connection;\n this.connection = null;\n return connection;\n };\n ConnectionManager.prototype.updateState = function (newState, data) {\n var previousState = this.state;\n this.state = newState;\n if (previousState !== newState) {\n var newStateDescription = newState;\n if (newStateDescription === 'connected') {\n newStateDescription += ' with new socket ID ' + data.socket_id;\n }\n logger.debug('State changed', previousState + ' -> ' + newStateDescription);\n this.timeline.info({ state: newState, params: data });\n this.emit('state_change', { previous: previousState, current: newState });\n this.emit(newState, data);\n }\n };\n ConnectionManager.prototype.shouldRetry = function () {\n return this.state === 'connecting' || this.state === 'connected';\n };\n return ConnectionManager;\n}(dispatcher));\n/* harmony default export */ var connection_manager = (connection_manager_ConnectionManager);\n\n// CONCATENATED MODULE: ./src/core/channels/channels.ts\n\n\n\n\nvar channels_Channels = (function () {\n function Channels() {\n this.channels = {};\n }\n Channels.prototype.add = function (name, pusher) {\n if (!this.channels[name]) {\n this.channels[name] = createChannel(name, pusher);\n }\n return this.channels[name];\n };\n Channels.prototype.all = function () {\n return values(this.channels);\n };\n Channels.prototype.find = function (name) {\n return this.channels[name];\n };\n Channels.prototype.remove = function (name) {\n var channel = this.channels[name];\n delete this.channels[name];\n return channel;\n };\n Channels.prototype.disconnect = function () {\n objectApply(this.channels, function (channel) {\n channel.disconnect();\n });\n };\n return Channels;\n}());\n/* harmony default export */ var channels = (channels_Channels);\nfunction createChannel(name, pusher) {\n if (name.indexOf('private-encrypted-') === 0) {\n if (pusher.config.nacl) {\n return factory.createEncryptedChannel(name, pusher, pusher.config.nacl);\n }\n var errMsg = 'Tried to subscribe to a private-encrypted- channel but no nacl implementation available';\n var suffix = url_store.buildLogSuffix('encryptedChannelSupport');\n throw new UnsupportedFeature(errMsg + \". \" + suffix);\n }\n else if (name.indexOf('private-') === 0) {\n return factory.createPrivateChannel(name, pusher);\n }\n else if (name.indexOf('presence-') === 0) {\n return factory.createPresenceChannel(name, pusher);\n }\n else if (name.indexOf('#') === 0) {\n throw new BadChannelName('Cannot create a channel with name \"' + name + '\".');\n }\n else {\n return factory.createChannel(name, pusher);\n }\n}\n\n// CONCATENATED MODULE: ./src/core/utils/factory.ts\n\n\n\n\n\n\n\n\n\nvar Factory = {\n createChannels: function () {\n return new channels();\n },\n createConnectionManager: function (key, options) {\n return new connection_manager(key, options);\n },\n createChannel: function (name, pusher) {\n return new channels_channel(name, pusher);\n },\n createPrivateChannel: function (name, pusher) {\n return new private_channel(name, pusher);\n },\n createPresenceChannel: function (name, pusher) {\n return new presence_channel(name, pusher);\n },\n createEncryptedChannel: function (name, pusher, nacl) {\n return new encrypted_channel(name, pusher, nacl);\n },\n createTimelineSender: function (timeline, options) {\n return new timeline_sender(timeline, options);\n },\n createHandshake: function (transport, callback) {\n return new connection_handshake(transport, callback);\n },\n createAssistantToTheTransportManager: function (manager, transport, options) {\n return new assistant_to_the_transport_manager(manager, transport, options);\n }\n};\n/* harmony default export */ var factory = (Factory);\n\n// CONCATENATED MODULE: ./src/core/transports/transport_manager.ts\n\nvar transport_manager_TransportManager = (function () {\n function TransportManager(options) {\n this.options = options || {};\n this.livesLeft = this.options.lives || Infinity;\n }\n TransportManager.prototype.getAssistant = function (transport) {\n return factory.createAssistantToTheTransportManager(this, transport, {\n minPingDelay: this.options.minPingDelay,\n maxPingDelay: this.options.maxPingDelay\n });\n };\n TransportManager.prototype.isAlive = function () {\n return this.livesLeft > 0;\n };\n TransportManager.prototype.reportDeath = function () {\n this.livesLeft -= 1;\n };\n return TransportManager;\n}());\n/* harmony default export */ var transport_manager = (transport_manager_TransportManager);\n\n// CONCATENATED MODULE: ./src/core/strategies/sequential_strategy.ts\n\n\n\nvar sequential_strategy_SequentialStrategy = (function () {\n function SequentialStrategy(strategies, options) {\n this.strategies = strategies;\n this.loop = Boolean(options.loop);\n this.failFast = Boolean(options.failFast);\n this.timeout = options.timeout;\n this.timeoutLimit = options.timeoutLimit;\n }\n SequentialStrategy.prototype.isSupported = function () {\n return any(this.strategies, util.method('isSupported'));\n };\n SequentialStrategy.prototype.connect = function (minPriority, callback) {\n var _this = this;\n var strategies = this.strategies;\n var current = 0;\n var timeout = this.timeout;\n var runner = null;\n var tryNextStrategy = function (error, handshake) {\n if (handshake) {\n callback(null, handshake);\n }\n else {\n current = current + 1;\n if (_this.loop) {\n current = current % strategies.length;\n }\n if (current < strategies.length) {\n if (timeout) {\n timeout = timeout * 2;\n if (_this.timeoutLimit) {\n timeout = Math.min(timeout, _this.timeoutLimit);\n }\n }\n runner = _this.tryStrategy(strategies[current], minPriority, { timeout: timeout, failFast: _this.failFast }, tryNextStrategy);\n }\n else {\n callback(true);\n }\n }\n };\n runner = this.tryStrategy(strategies[current], minPriority, { timeout: timeout, failFast: this.failFast }, tryNextStrategy);\n return {\n abort: function () {\n runner.abort();\n },\n forceMinPriority: function (p) {\n minPriority = p;\n if (runner) {\n runner.forceMinPriority(p);\n }\n }\n };\n };\n SequentialStrategy.prototype.tryStrategy = function (strategy, minPriority, options, callback) {\n var timer = null;\n var runner = null;\n if (options.timeout > 0) {\n timer = new OneOffTimer(options.timeout, function () {\n runner.abort();\n callback(true);\n });\n }\n runner = strategy.connect(minPriority, function (error, handshake) {\n if (error && timer && timer.isRunning() && !options.failFast) {\n return;\n }\n if (timer) {\n timer.ensureAborted();\n }\n callback(error, handshake);\n });\n return {\n abort: function () {\n if (timer) {\n timer.ensureAborted();\n }\n runner.abort();\n },\n forceMinPriority: function (p) {\n runner.forceMinPriority(p);\n }\n };\n };\n return SequentialStrategy;\n}());\n/* harmony default export */ var sequential_strategy = (sequential_strategy_SequentialStrategy);\n\n// CONCATENATED MODULE: ./src/core/strategies/best_connected_ever_strategy.ts\n\n\nvar best_connected_ever_strategy_BestConnectedEverStrategy = (function () {\n function BestConnectedEverStrategy(strategies) {\n this.strategies = strategies;\n }\n BestConnectedEverStrategy.prototype.isSupported = function () {\n return any(this.strategies, util.method('isSupported'));\n };\n BestConnectedEverStrategy.prototype.connect = function (minPriority, callback) {\n return connect(this.strategies, minPriority, function (i, runners) {\n return function (error, handshake) {\n runners[i].error = error;\n if (error) {\n if (allRunnersFailed(runners)) {\n callback(true);\n }\n return;\n }\n apply(runners, function (runner) {\n runner.forceMinPriority(handshake.transport.priority);\n });\n callback(null, handshake);\n };\n });\n };\n return BestConnectedEverStrategy;\n}());\n/* harmony default export */ var best_connected_ever_strategy = (best_connected_ever_strategy_BestConnectedEverStrategy);\nfunction connect(strategies, minPriority, callbackBuilder) {\n var runners = map(strategies, function (strategy, i, _, rs) {\n return strategy.connect(minPriority, callbackBuilder(i, rs));\n });\n return {\n abort: function () {\n apply(runners, abortRunner);\n },\n forceMinPriority: function (p) {\n apply(runners, function (runner) {\n runner.forceMinPriority(p);\n });\n }\n };\n}\nfunction allRunnersFailed(runners) {\n return collections_all(runners, function (runner) {\n return Boolean(runner.error);\n });\n}\nfunction abortRunner(runner) {\n if (!runner.error && !runner.aborted) {\n runner.abort();\n runner.aborted = true;\n }\n}\n\n// CONCATENATED MODULE: ./src/core/strategies/cached_strategy.ts\n\n\n\n\nvar cached_strategy_CachedStrategy = (function () {\n function CachedStrategy(strategy, transports, options) {\n this.strategy = strategy;\n this.transports = transports;\n this.ttl = options.ttl || 1800 * 1000;\n this.usingTLS = options.useTLS;\n this.timeline = options.timeline;\n }\n CachedStrategy.prototype.isSupported = function () {\n return this.strategy.isSupported();\n };\n CachedStrategy.prototype.connect = function (minPriority, callback) {\n var usingTLS = this.usingTLS;\n var info = fetchTransportCache(usingTLS);\n var strategies = [this.strategy];\n if (info && info.timestamp + this.ttl >= util.now()) {\n var transport = this.transports[info.transport];\n if (transport) {\n this.timeline.info({\n cached: true,\n transport: info.transport,\n latency: info.latency\n });\n strategies.push(new sequential_strategy([transport], {\n timeout: info.latency * 2 + 1000,\n failFast: true\n }));\n }\n }\n var startTimestamp = util.now();\n var runner = strategies\n .pop()\n .connect(minPriority, function cb(error, handshake) {\n if (error) {\n flushTransportCache(usingTLS);\n if (strategies.length > 0) {\n startTimestamp = util.now();\n runner = strategies.pop().connect(minPriority, cb);\n }\n else {\n callback(error);\n }\n }\n else {\n storeTransportCache(usingTLS, handshake.transport.name, util.now() - startTimestamp);\n callback(null, handshake);\n }\n });\n return {\n abort: function () {\n runner.abort();\n },\n forceMinPriority: function (p) {\n minPriority = p;\n if (runner) {\n runner.forceMinPriority(p);\n }\n }\n };\n };\n return CachedStrategy;\n}());\n/* harmony default export */ var cached_strategy = (cached_strategy_CachedStrategy);\nfunction getTransportCacheKey(usingTLS) {\n return 'pusherTransport' + (usingTLS ? 'TLS' : 'NonTLS');\n}\nfunction fetchTransportCache(usingTLS) {\n var storage = runtime.getLocalStorage();\n if (storage) {\n try {\n var serializedCache = storage[getTransportCacheKey(usingTLS)];\n if (serializedCache) {\n return JSON.parse(serializedCache);\n }\n }\n catch (e) {\n flushTransportCache(usingTLS);\n }\n }\n return null;\n}\nfunction storeTransportCache(usingTLS, transport, latency) {\n var storage = runtime.getLocalStorage();\n if (storage) {\n try {\n storage[getTransportCacheKey(usingTLS)] = safeJSONStringify({\n timestamp: util.now(),\n transport: transport,\n latency: latency\n });\n }\n catch (e) {\n }\n }\n}\nfunction flushTransportCache(usingTLS) {\n var storage = runtime.getLocalStorage();\n if (storage) {\n try {\n delete storage[getTransportCacheKey(usingTLS)];\n }\n catch (e) {\n }\n }\n}\n\n// CONCATENATED MODULE: ./src/core/strategies/delayed_strategy.ts\n\nvar delayed_strategy_DelayedStrategy = (function () {\n function DelayedStrategy(strategy, _a) {\n var number = _a.delay;\n this.strategy = strategy;\n this.options = { delay: number };\n }\n DelayedStrategy.prototype.isSupported = function () {\n return this.strategy.isSupported();\n };\n DelayedStrategy.prototype.connect = function (minPriority, callback) {\n var strategy = this.strategy;\n var runner;\n var timer = new OneOffTimer(this.options.delay, function () {\n runner = strategy.connect(minPriority, callback);\n });\n return {\n abort: function () {\n timer.ensureAborted();\n if (runner) {\n runner.abort();\n }\n },\n forceMinPriority: function (p) {\n minPriority = p;\n if (runner) {\n runner.forceMinPriority(p);\n }\n }\n };\n };\n return DelayedStrategy;\n}());\n/* harmony default export */ var delayed_strategy = (delayed_strategy_DelayedStrategy);\n\n// CONCATENATED MODULE: ./src/core/strategies/if_strategy.ts\nvar IfStrategy = (function () {\n function IfStrategy(test, trueBranch, falseBranch) {\n this.test = test;\n this.trueBranch = trueBranch;\n this.falseBranch = falseBranch;\n }\n IfStrategy.prototype.isSupported = function () {\n var branch = this.test() ? this.trueBranch : this.falseBranch;\n return branch.isSupported();\n };\n IfStrategy.prototype.connect = function (minPriority, callback) {\n var branch = this.test() ? this.trueBranch : this.falseBranch;\n return branch.connect(minPriority, callback);\n };\n return IfStrategy;\n}());\n/* harmony default export */ var if_strategy = (IfStrategy);\n\n// CONCATENATED MODULE: ./src/core/strategies/first_connected_strategy.ts\nvar FirstConnectedStrategy = (function () {\n function FirstConnectedStrategy(strategy) {\n this.strategy = strategy;\n }\n FirstConnectedStrategy.prototype.isSupported = function () {\n return this.strategy.isSupported();\n };\n FirstConnectedStrategy.prototype.connect = function (minPriority, callback) {\n var runner = this.strategy.connect(minPriority, function (error, handshake) {\n if (handshake) {\n runner.abort();\n }\n callback(error, handshake);\n });\n return runner;\n };\n return FirstConnectedStrategy;\n}());\n/* harmony default export */ var first_connected_strategy = (FirstConnectedStrategy);\n\n// CONCATENATED MODULE: ./src/runtimes/web/default_strategy.ts\n\n\n\n\n\n\n\nfunction testSupportsStrategy(strategy) {\n return function () {\n return strategy.isSupported();\n };\n}\nvar getDefaultStrategy = function (config, baseOptions, defineTransport) {\n var definedTransports = {};\n function defineTransportStrategy(name, type, priority, options, manager) {\n var transport = defineTransport(config, name, type, priority, options, manager);\n definedTransports[name] = transport;\n return transport;\n }\n var ws_options = Object.assign({}, baseOptions, {\n hostNonTLS: config.wsHost + ':' + config.wsPort,\n hostTLS: config.wsHost + ':' + config.wssPort,\n httpPath: config.wsPath\n });\n var wss_options = Object.assign({}, ws_options, {\n useTLS: true\n });\n var sockjs_options = Object.assign({}, baseOptions, {\n hostNonTLS: config.httpHost + ':' + config.httpPort,\n hostTLS: config.httpHost + ':' + config.httpsPort,\n httpPath: config.httpPath\n });\n var timeouts = {\n loop: true,\n timeout: 15000,\n timeoutLimit: 60000\n };\n var ws_manager = new transport_manager({\n lives: 2,\n minPingDelay: 10000,\n maxPingDelay: config.activityTimeout\n });\n var streaming_manager = new transport_manager({\n lives: 2,\n minPingDelay: 10000,\n maxPingDelay: config.activityTimeout\n });\n var ws_transport = defineTransportStrategy('ws', 'ws', 3, ws_options, ws_manager);\n var wss_transport = defineTransportStrategy('wss', 'ws', 3, wss_options, ws_manager);\n var sockjs_transport = defineTransportStrategy('sockjs', 'sockjs', 1, sockjs_options);\n var xhr_streaming_transport = defineTransportStrategy('xhr_streaming', 'xhr_streaming', 1, sockjs_options, streaming_manager);\n var xdr_streaming_transport = defineTransportStrategy('xdr_streaming', 'xdr_streaming', 1, sockjs_options, streaming_manager);\n var xhr_polling_transport = defineTransportStrategy('xhr_polling', 'xhr_polling', 1, sockjs_options);\n var xdr_polling_transport = defineTransportStrategy('xdr_polling', 'xdr_polling', 1, sockjs_options);\n var ws_loop = new sequential_strategy([ws_transport], timeouts);\n var wss_loop = new sequential_strategy([wss_transport], timeouts);\n var sockjs_loop = new sequential_strategy([sockjs_transport], timeouts);\n var streaming_loop = new sequential_strategy([\n new if_strategy(testSupportsStrategy(xhr_streaming_transport), xhr_streaming_transport, xdr_streaming_transport)\n ], timeouts);\n var polling_loop = new sequential_strategy([\n new if_strategy(testSupportsStrategy(xhr_polling_transport), xhr_polling_transport, xdr_polling_transport)\n ], timeouts);\n var http_loop = new sequential_strategy([\n new if_strategy(testSupportsStrategy(streaming_loop), new best_connected_ever_strategy([\n streaming_loop,\n new delayed_strategy(polling_loop, { delay: 4000 })\n ]), polling_loop)\n ], timeouts);\n var http_fallback_loop = new if_strategy(testSupportsStrategy(http_loop), http_loop, sockjs_loop);\n var wsStrategy;\n if (baseOptions.useTLS) {\n wsStrategy = new best_connected_ever_strategy([\n ws_loop,\n new delayed_strategy(http_fallback_loop, { delay: 2000 })\n ]);\n }\n else {\n wsStrategy = new best_connected_ever_strategy([\n ws_loop,\n new delayed_strategy(wss_loop, { delay: 2000 }),\n new delayed_strategy(http_fallback_loop, { delay: 5000 })\n ]);\n }\n return new cached_strategy(new first_connected_strategy(new if_strategy(testSupportsStrategy(ws_transport), wsStrategy, http_fallback_loop)), definedTransports, {\n ttl: 1800000,\n timeline: baseOptions.timeline,\n useTLS: baseOptions.useTLS\n });\n};\n/* harmony default export */ var default_strategy = (getDefaultStrategy);\n\n// CONCATENATED MODULE: ./src/runtimes/web/transports/transport_connection_initializer.ts\n\n/* harmony default export */ var transport_connection_initializer = (function () {\n var self = this;\n self.timeline.info(self.buildTimelineMessage({\n transport: self.name + (self.options.useTLS ? 's' : '')\n }));\n if (self.hooks.isInitialized()) {\n self.changeState('initialized');\n }\n else if (self.hooks.file) {\n self.changeState('initializing');\n Dependencies.load(self.hooks.file, { useTLS: self.options.useTLS }, function (error, callback) {\n if (self.hooks.isInitialized()) {\n self.changeState('initialized');\n callback(true);\n }\n else {\n if (error) {\n self.onError(error);\n }\n self.onClose();\n callback(false);\n }\n });\n }\n else {\n self.onClose();\n }\n});\n\n// CONCATENATED MODULE: ./src/runtimes/web/http/http_xdomain_request.ts\n\nvar http_xdomain_request_hooks = {\n getRequest: function (socket) {\n var xdr = new window.XDomainRequest();\n xdr.ontimeout = function () {\n socket.emit('error', new RequestTimedOut());\n socket.close();\n };\n xdr.onerror = function (e) {\n socket.emit('error', e);\n socket.close();\n };\n xdr.onprogress = function () {\n if (xdr.responseText && xdr.responseText.length > 0) {\n socket.onChunk(200, xdr.responseText);\n }\n };\n xdr.onload = function () {\n if (xdr.responseText && xdr.responseText.length > 0) {\n socket.onChunk(200, xdr.responseText);\n }\n socket.emit('finished', 200);\n socket.close();\n };\n return xdr;\n },\n abortRequest: function (xdr) {\n xdr.ontimeout = xdr.onerror = xdr.onprogress = xdr.onload = null;\n xdr.abort();\n }\n};\n/* harmony default export */ var http_xdomain_request = (http_xdomain_request_hooks);\n\n// CONCATENATED MODULE: ./src/core/http/http_request.ts\nvar http_request_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\nvar MAX_BUFFER_LENGTH = 256 * 1024;\nvar http_request_HTTPRequest = (function (_super) {\n http_request_extends(HTTPRequest, _super);\n function HTTPRequest(hooks, method, url) {\n var _this = _super.call(this) || this;\n _this.hooks = hooks;\n _this.method = method;\n _this.url = url;\n return _this;\n }\n HTTPRequest.prototype.start = function (payload) {\n var _this = this;\n this.position = 0;\n this.xhr = this.hooks.getRequest(this);\n this.unloader = function () {\n _this.close();\n };\n runtime.addUnloadListener(this.unloader);\n this.xhr.open(this.method, this.url, true);\n if (this.xhr.setRequestHeader) {\n this.xhr.setRequestHeader('Content-Type', 'application/json');\n }\n this.xhr.send(payload);\n };\n HTTPRequest.prototype.close = function () {\n if (this.unloader) {\n runtime.removeUnloadListener(this.unloader);\n this.unloader = null;\n }\n if (this.xhr) {\n this.hooks.abortRequest(this.xhr);\n this.xhr = null;\n }\n };\n HTTPRequest.prototype.onChunk = function (status, data) {\n while (true) {\n var chunk = this.advanceBuffer(data);\n if (chunk) {\n this.emit('chunk', { status: status, data: chunk });\n }\n else {\n break;\n }\n }\n if (this.isBufferTooLong(data)) {\n this.emit('buffer_too_long');\n }\n };\n HTTPRequest.prototype.advanceBuffer = function (buffer) {\n var unreadData = buffer.slice(this.position);\n var endOfLinePosition = unreadData.indexOf('\\n');\n if (endOfLinePosition !== -1) {\n this.position += endOfLinePosition + 1;\n return unreadData.slice(0, endOfLinePosition);\n }\n else {\n return null;\n }\n };\n HTTPRequest.prototype.isBufferTooLong = function (buffer) {\n return this.position === buffer.length && buffer.length > MAX_BUFFER_LENGTH;\n };\n return HTTPRequest;\n}(dispatcher));\n/* harmony default export */ var http_request = (http_request_HTTPRequest);\n\n// CONCATENATED MODULE: ./src/core/http/state.ts\nvar State;\n(function (State) {\n State[State[\"CONNECTING\"] = 0] = \"CONNECTING\";\n State[State[\"OPEN\"] = 1] = \"OPEN\";\n State[State[\"CLOSED\"] = 3] = \"CLOSED\";\n})(State || (State = {}));\n/* harmony default export */ var state = (State);\n\n// CONCATENATED MODULE: ./src/core/http/http_socket.ts\n\n\n\nvar autoIncrement = 1;\nvar http_socket_HTTPSocket = (function () {\n function HTTPSocket(hooks, url) {\n this.hooks = hooks;\n this.session = randomNumber(1000) + '/' + randomString(8);\n this.location = getLocation(url);\n this.readyState = state.CONNECTING;\n this.openStream();\n }\n HTTPSocket.prototype.send = function (payload) {\n return this.sendRaw(JSON.stringify([payload]));\n };\n HTTPSocket.prototype.ping = function () {\n this.hooks.sendHeartbeat(this);\n };\n HTTPSocket.prototype.close = function (code, reason) {\n this.onClose(code, reason, true);\n };\n HTTPSocket.prototype.sendRaw = function (payload) {\n if (this.readyState === state.OPEN) {\n try {\n runtime.createSocketRequest('POST', getUniqueURL(getSendURL(this.location, this.session))).start(payload);\n return true;\n }\n catch (e) {\n return false;\n }\n }\n else {\n return false;\n }\n };\n HTTPSocket.prototype.reconnect = function () {\n this.closeStream();\n this.openStream();\n };\n HTTPSocket.prototype.onClose = function (code, reason, wasClean) {\n this.closeStream();\n this.readyState = state.CLOSED;\n if (this.onclose) {\n this.onclose({\n code: code,\n reason: reason,\n wasClean: wasClean\n });\n }\n };\n HTTPSocket.prototype.onChunk = function (chunk) {\n if (chunk.status !== 200) {\n return;\n }\n if (this.readyState === state.OPEN) {\n this.onActivity();\n }\n var payload;\n var type = chunk.data.slice(0, 1);\n switch (type) {\n case 'o':\n payload = JSON.parse(chunk.data.slice(1) || '{}');\n this.onOpen(payload);\n break;\n case 'a':\n payload = JSON.parse(chunk.data.slice(1) || '[]');\n for (var i = 0; i < payload.length; i++) {\n this.onEvent(payload[i]);\n }\n break;\n case 'm':\n payload = JSON.parse(chunk.data.slice(1) || 'null');\n this.onEvent(payload);\n break;\n case 'h':\n this.hooks.onHeartbeat(this);\n break;\n case 'c':\n payload = JSON.parse(chunk.data.slice(1) || '[]');\n this.onClose(payload[0], payload[1], true);\n break;\n }\n };\n HTTPSocket.prototype.onOpen = function (options) {\n if (this.readyState === state.CONNECTING) {\n if (options && options.hostname) {\n this.location.base = replaceHost(this.location.base, options.hostname);\n }\n this.readyState = state.OPEN;\n if (this.onopen) {\n this.onopen();\n }\n }\n else {\n this.onClose(1006, 'Server lost session', true);\n }\n };\n HTTPSocket.prototype.onEvent = function (event) {\n if (this.readyState === state.OPEN && this.onmessage) {\n this.onmessage({ data: event });\n }\n };\n HTTPSocket.prototype.onActivity = function () {\n if (this.onactivity) {\n this.onactivity();\n }\n };\n HTTPSocket.prototype.onError = function (error) {\n if (this.onerror) {\n this.onerror(error);\n }\n };\n HTTPSocket.prototype.openStream = function () {\n var _this = this;\n this.stream = runtime.createSocketRequest('POST', getUniqueURL(this.hooks.getReceiveURL(this.location, this.session)));\n this.stream.bind('chunk', function (chunk) {\n _this.onChunk(chunk);\n });\n this.stream.bind('finished', function (status) {\n _this.hooks.onFinished(_this, status);\n });\n this.stream.bind('buffer_too_long', function () {\n _this.reconnect();\n });\n try {\n this.stream.start();\n }\n catch (error) {\n util.defer(function () {\n _this.onError(error);\n _this.onClose(1006, 'Could not start streaming', false);\n });\n }\n };\n HTTPSocket.prototype.closeStream = function () {\n if (this.stream) {\n this.stream.unbind_all();\n this.stream.close();\n this.stream = null;\n }\n };\n return HTTPSocket;\n}());\nfunction getLocation(url) {\n var parts = /([^\\?]*)\\/*(\\??.*)/.exec(url);\n return {\n base: parts[1],\n queryString: parts[2]\n };\n}\nfunction getSendURL(url, session) {\n return url.base + '/' + session + '/xhr_send';\n}\nfunction getUniqueURL(url) {\n var separator = url.indexOf('?') === -1 ? '?' : '&';\n return url + separator + 't=' + +new Date() + '&n=' + autoIncrement++;\n}\nfunction replaceHost(url, hostname) {\n var urlParts = /(https?:\\/\\/)([^\\/:]+)((\\/|:)?.*)/.exec(url);\n return urlParts[1] + hostname + urlParts[3];\n}\nfunction randomNumber(max) {\n return Math.floor(Math.random() * max);\n}\nfunction randomString(length) {\n var result = [];\n for (var i = 0; i < length; i++) {\n result.push(randomNumber(32).toString(32));\n }\n return result.join('');\n}\n/* harmony default export */ var http_socket = (http_socket_HTTPSocket);\n\n// CONCATENATED MODULE: ./src/core/http/http_streaming_socket.ts\nvar http_streaming_socket_hooks = {\n getReceiveURL: function (url, session) {\n return url.base + '/' + session + '/xhr_streaming' + url.queryString;\n },\n onHeartbeat: function (socket) {\n socket.sendRaw('[]');\n },\n sendHeartbeat: function (socket) {\n socket.sendRaw('[]');\n },\n onFinished: function (socket, status) {\n socket.onClose(1006, 'Connection interrupted (' + status + ')', false);\n }\n};\n/* harmony default export */ var http_streaming_socket = (http_streaming_socket_hooks);\n\n// CONCATENATED MODULE: ./src/core/http/http_polling_socket.ts\nvar http_polling_socket_hooks = {\n getReceiveURL: function (url, session) {\n return url.base + '/' + session + '/xhr' + url.queryString;\n },\n onHeartbeat: function () {\n },\n sendHeartbeat: function (socket) {\n socket.sendRaw('[]');\n },\n onFinished: function (socket, status) {\n if (status === 200) {\n socket.reconnect();\n }\n else {\n socket.onClose(1006, 'Connection interrupted (' + status + ')', false);\n }\n }\n};\n/* harmony default export */ var http_polling_socket = (http_polling_socket_hooks);\n\n// CONCATENATED MODULE: ./src/runtimes/isomorphic/http/http_xhr_request.ts\n\nvar http_xhr_request_hooks = {\n getRequest: function (socket) {\n var Constructor = runtime.getXHRAPI();\n var xhr = new Constructor();\n xhr.onreadystatechange = xhr.onprogress = function () {\n switch (xhr.readyState) {\n case 3:\n if (xhr.responseText && xhr.responseText.length > 0) {\n socket.onChunk(xhr.status, xhr.responseText);\n }\n break;\n case 4:\n if (xhr.responseText && xhr.responseText.length > 0) {\n socket.onChunk(xhr.status, xhr.responseText);\n }\n socket.emit('finished', xhr.status);\n socket.close();\n break;\n }\n };\n return xhr;\n },\n abortRequest: function (xhr) {\n xhr.onreadystatechange = null;\n xhr.abort();\n }\n};\n/* harmony default export */ var http_xhr_request = (http_xhr_request_hooks);\n\n// CONCATENATED MODULE: ./src/runtimes/isomorphic/http/http.ts\n\n\n\n\n\nvar HTTP = {\n createStreamingSocket: function (url) {\n return this.createSocket(http_streaming_socket, url);\n },\n createPollingSocket: function (url) {\n return this.createSocket(http_polling_socket, url);\n },\n createSocket: function (hooks, url) {\n return new http_socket(hooks, url);\n },\n createXHR: function (method, url) {\n return this.createRequest(http_xhr_request, method, url);\n },\n createRequest: function (hooks, method, url) {\n return new http_request(hooks, method, url);\n }\n};\n/* harmony default export */ var http_http = (HTTP);\n\n// CONCATENATED MODULE: ./src/runtimes/web/http/http.ts\n\n\nhttp_http.createXDR = function (method, url) {\n return this.createRequest(http_xdomain_request, method, url);\n};\n/* harmony default export */ var web_http_http = (http_http);\n\n// CONCATENATED MODULE: ./src/runtimes/web/runtime.ts\n\n\n\n\n\n\n\n\n\n\n\n\nvar Runtime = {\n nextAuthCallbackID: 1,\n auth_callbacks: {},\n ScriptReceivers: ScriptReceivers,\n DependenciesReceivers: DependenciesReceivers,\n getDefaultStrategy: default_strategy,\n Transports: transports_transports,\n transportConnectionInitializer: transport_connection_initializer,\n HTTPFactory: web_http_http,\n TimelineTransport: jsonp_timeline,\n getXHRAPI: function () {\n return window.XMLHttpRequest;\n },\n getWebSocketAPI: function () {\n return window.WebSocket || window.MozWebSocket;\n },\n setup: function (PusherClass) {\n var _this = this;\n window.Pusher = PusherClass;\n var initializeOnDocumentBody = function () {\n _this.onDocumentBody(PusherClass.ready);\n };\n if (!window.JSON) {\n Dependencies.load('json2', {}, initializeOnDocumentBody);\n }\n else {\n initializeOnDocumentBody();\n }\n },\n getDocument: function () {\n return document;\n },\n getProtocol: function () {\n return this.getDocument().location.protocol;\n },\n getAuthorizers: function () {\n return { ajax: xhr_auth, jsonp: jsonp_auth };\n },\n onDocumentBody: function (callback) {\n var _this = this;\n if (document.body) {\n callback();\n }\n else {\n setTimeout(function () {\n _this.onDocumentBody(callback);\n }, 0);\n }\n },\n createJSONPRequest: function (url, data) {\n return new jsonp_request(url, data);\n },\n createScriptRequest: function (src) {\n return new script_request(src);\n },\n getLocalStorage: function () {\n try {\n return window.localStorage;\n }\n catch (e) {\n return undefined;\n }\n },\n createXHR: function () {\n if (this.getXHRAPI()) {\n return this.createXMLHttpRequest();\n }\n else {\n return this.createMicrosoftXHR();\n }\n },\n createXMLHttpRequest: function () {\n var Constructor = this.getXHRAPI();\n return new Constructor();\n },\n createMicrosoftXHR: function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n },\n getNetwork: function () {\n return net_info_Network;\n },\n createWebSocket: function (url) {\n var Constructor = this.getWebSocketAPI();\n return new Constructor(url);\n },\n createSocketRequest: function (method, url) {\n if (this.isXHRSupported()) {\n return this.HTTPFactory.createXHR(method, url);\n }\n else if (this.isXDRSupported(url.indexOf('https:') === 0)) {\n return this.HTTPFactory.createXDR(method, url);\n }\n else {\n throw 'Cross-origin HTTP requests are not supported';\n }\n },\n isXHRSupported: function () {\n var Constructor = this.getXHRAPI();\n return (Boolean(Constructor) && new Constructor().withCredentials !== undefined);\n },\n isXDRSupported: function (useTLS) {\n var protocol = useTLS ? 'https:' : 'http:';\n var documentProtocol = this.getProtocol();\n return (Boolean(window['XDomainRequest']) && documentProtocol === protocol);\n },\n addUnloadListener: function (listener) {\n if (window.addEventListener !== undefined) {\n window.addEventListener('unload', listener, false);\n }\n else if (window.attachEvent !== undefined) {\n window.attachEvent('onunload', listener);\n }\n },\n removeUnloadListener: function (listener) {\n if (window.addEventListener !== undefined) {\n window.removeEventListener('unload', listener, false);\n }\n else if (window.detachEvent !== undefined) {\n window.detachEvent('onunload', listener);\n }\n }\n};\n/* harmony default export */ var runtime = (Runtime);\n\n// CONCATENATED MODULE: ./src/core/timeline/level.ts\nvar TimelineLevel;\n(function (TimelineLevel) {\n TimelineLevel[TimelineLevel[\"ERROR\"] = 3] = \"ERROR\";\n TimelineLevel[TimelineLevel[\"INFO\"] = 6] = \"INFO\";\n TimelineLevel[TimelineLevel[\"DEBUG\"] = 7] = \"DEBUG\";\n})(TimelineLevel || (TimelineLevel = {}));\n/* harmony default export */ var timeline_level = (TimelineLevel);\n\n// CONCATENATED MODULE: ./src/core/timeline/timeline.ts\n\n\n\nvar timeline_Timeline = (function () {\n function Timeline(key, session, options) {\n this.key = key;\n this.session = session;\n this.events = [];\n this.options = options || {};\n this.sent = 0;\n this.uniqueID = 0;\n }\n Timeline.prototype.log = function (level, event) {\n if (level <= this.options.level) {\n this.events.push(extend({}, event, { timestamp: util.now() }));\n if (this.options.limit && this.events.length > this.options.limit) {\n this.events.shift();\n }\n }\n };\n Timeline.prototype.error = function (event) {\n this.log(timeline_level.ERROR, event);\n };\n Timeline.prototype.info = function (event) {\n this.log(timeline_level.INFO, event);\n };\n Timeline.prototype.debug = function (event) {\n this.log(timeline_level.DEBUG, event);\n };\n Timeline.prototype.isEmpty = function () {\n return this.events.length === 0;\n };\n Timeline.prototype.send = function (sendfn, callback) {\n var _this = this;\n var data = extend({\n session: this.session,\n bundle: this.sent + 1,\n key: this.key,\n lib: 'js',\n version: this.options.version,\n cluster: this.options.cluster,\n features: this.options.features,\n timeline: this.events\n }, this.options.params);\n this.events = [];\n sendfn(data, function (error, result) {\n if (!error) {\n _this.sent++;\n }\n if (callback) {\n callback(error, result);\n }\n });\n return true;\n };\n Timeline.prototype.generateUniqueID = function () {\n this.uniqueID++;\n return this.uniqueID;\n };\n return Timeline;\n}());\n/* harmony default export */ var timeline_timeline = (timeline_Timeline);\n\n// CONCATENATED MODULE: ./src/core/strategies/transport_strategy.ts\n\n\n\n\nvar transport_strategy_TransportStrategy = (function () {\n function TransportStrategy(name, priority, transport, options) {\n this.name = name;\n this.priority = priority;\n this.transport = transport;\n this.options = options || {};\n }\n TransportStrategy.prototype.isSupported = function () {\n return this.transport.isSupported({\n useTLS: this.options.useTLS\n });\n };\n TransportStrategy.prototype.connect = function (minPriority, callback) {\n var _this = this;\n if (!this.isSupported()) {\n return failAttempt(new UnsupportedStrategy(), callback);\n }\n else if (this.priority < minPriority) {\n return failAttempt(new TransportPriorityTooLow(), callback);\n }\n var connected = false;\n var transport = this.transport.createConnection(this.name, this.priority, this.options.key, this.options);\n var handshake = null;\n var onInitialized = function () {\n transport.unbind('initialized', onInitialized);\n transport.connect();\n };\n var onOpen = function () {\n handshake = factory.createHandshake(transport, function (result) {\n connected = true;\n unbindListeners();\n callback(null, result);\n });\n };\n var onError = function (error) {\n unbindListeners();\n callback(error);\n };\n var onClosed = function () {\n unbindListeners();\n var serializedTransport;\n serializedTransport = safeJSONStringify(transport);\n callback(new TransportClosed(serializedTransport));\n };\n var unbindListeners = function () {\n transport.unbind('initialized', onInitialized);\n transport.unbind('open', onOpen);\n transport.unbind('error', onError);\n transport.unbind('closed', onClosed);\n };\n transport.bind('initialized', onInitialized);\n transport.bind('open', onOpen);\n transport.bind('error', onError);\n transport.bind('closed', onClosed);\n transport.initialize();\n return {\n abort: function () {\n if (connected) {\n return;\n }\n unbindListeners();\n if (handshake) {\n handshake.close();\n }\n else {\n transport.close();\n }\n },\n forceMinPriority: function (p) {\n if (connected) {\n return;\n }\n if (_this.priority < p) {\n if (handshake) {\n handshake.close();\n }\n else {\n transport.close();\n }\n }\n }\n };\n };\n return TransportStrategy;\n}());\n/* harmony default export */ var transport_strategy = (transport_strategy_TransportStrategy);\nfunction failAttempt(error, callback) {\n util.defer(function () {\n callback(error);\n });\n return {\n abort: function () { },\n forceMinPriority: function () { }\n };\n}\n\n// CONCATENATED MODULE: ./src/core/strategies/strategy_builder.ts\n\n\n\n\n\nvar strategy_builder_Transports = runtime.Transports;\nvar strategy_builder_defineTransport = function (config, name, type, priority, options, manager) {\n var transportClass = strategy_builder_Transports[type];\n if (!transportClass) {\n throw new UnsupportedTransport(type);\n }\n var enabled = (!config.enabledTransports ||\n arrayIndexOf(config.enabledTransports, name) !== -1) &&\n (!config.disabledTransports ||\n arrayIndexOf(config.disabledTransports, name) === -1);\n var transport;\n if (enabled) {\n options = Object.assign({ ignoreNullOrigin: config.ignoreNullOrigin }, options);\n transport = new transport_strategy(name, priority, manager ? manager.getAssistant(transportClass) : transportClass, options);\n }\n else {\n transport = strategy_builder_UnsupportedStrategy;\n }\n return transport;\n};\nvar strategy_builder_UnsupportedStrategy = {\n isSupported: function () {\n return false;\n },\n connect: function (_, callback) {\n var deferred = util.defer(function () {\n callback(new UnsupportedStrategy());\n });\n return {\n abort: function () {\n deferred.ensureAborted();\n },\n forceMinPriority: function () { }\n };\n }\n};\n\n// CONCATENATED MODULE: ./src/core/auth/user_authenticator.ts\n\n\nvar composeChannelQuery = function (params, authOptions) {\n var query = 'socket_id=' + encodeURIComponent(params.socketId);\n for (var i in authOptions.params) {\n query +=\n '&' +\n encodeURIComponent(i) +\n '=' +\n encodeURIComponent(authOptions.params[i]);\n }\n return query;\n};\nvar UserAuthenticator = function (authOptions) {\n if (typeof runtime.getAuthorizers()[authOptions.transport] === 'undefined') {\n throw \"'\" + authOptions.transport + \"' is not a recognized auth transport\";\n }\n return function (params, callback) {\n var query = composeChannelQuery(params, authOptions);\n runtime.getAuthorizers()[authOptions.transport](runtime, query, authOptions, AuthRequestType.UserAuthentication, callback);\n };\n};\n/* harmony default export */ var user_authenticator = (UserAuthenticator);\n\n// CONCATENATED MODULE: ./src/core/auth/channel_authorizer.ts\n\n\nvar channel_authorizer_composeChannelQuery = function (params, authOptions) {\n var query = 'socket_id=' + encodeURIComponent(params.socketId);\n query += '&channel_name=' + encodeURIComponent(params.channelName);\n for (var i in authOptions.params) {\n query +=\n '&' +\n encodeURIComponent(i) +\n '=' +\n encodeURIComponent(authOptions.params[i]);\n }\n return query;\n};\nvar ChannelAuthorizer = function (authOptions) {\n if (typeof runtime.getAuthorizers()[authOptions.transport] === 'undefined') {\n throw \"'\" + authOptions.transport + \"' is not a recognized auth transport\";\n }\n return function (params, callback) {\n var query = channel_authorizer_composeChannelQuery(params, authOptions);\n runtime.getAuthorizers()[authOptions.transport](runtime, query, authOptions, AuthRequestType.ChannelAuthorization, callback);\n };\n};\n/* harmony default export */ var channel_authorizer = (ChannelAuthorizer);\n\n// CONCATENATED MODULE: ./src/core/auth/deprecated_channel_authorizer.ts\nvar ChannelAuthorizerProxy = function (pusher, authOptions, channelAuthorizerGenerator) {\n var deprecatedAuthorizerOptions = {\n authTransport: authOptions.transport,\n authEndpoint: authOptions.endpoint,\n auth: {\n params: authOptions.params,\n headers: authOptions.headers\n }\n };\n return function (params, callback) {\n var channel = pusher.channel(params.channelName);\n var channelAuthorizer = channelAuthorizerGenerator(channel, deprecatedAuthorizerOptions);\n channelAuthorizer.authorize(params.socketId, callback);\n };\n};\n\n// CONCATENATED MODULE: ./src/core/config.ts\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n\n\n\n\nfunction getConfig(opts, pusher) {\n var config = {\n activityTimeout: opts.activityTimeout || defaults.activityTimeout,\n cluster: opts.cluster || defaults.cluster,\n httpPath: opts.httpPath || defaults.httpPath,\n httpPort: opts.httpPort || defaults.httpPort,\n httpsPort: opts.httpsPort || defaults.httpsPort,\n pongTimeout: opts.pongTimeout || defaults.pongTimeout,\n statsHost: opts.statsHost || defaults.stats_host,\n unavailableTimeout: opts.unavailableTimeout || defaults.unavailableTimeout,\n wsPath: opts.wsPath || defaults.wsPath,\n wsPort: opts.wsPort || defaults.wsPort,\n wssPort: opts.wssPort || defaults.wssPort,\n enableStats: getEnableStatsConfig(opts),\n httpHost: getHttpHost(opts),\n useTLS: shouldUseTLS(opts),\n wsHost: getWebsocketHost(opts),\n userAuthenticator: buildUserAuthenticator(opts),\n channelAuthorizer: buildChannelAuthorizer(opts, pusher)\n };\n if ('disabledTransports' in opts)\n config.disabledTransports = opts.disabledTransports;\n if ('enabledTransports' in opts)\n config.enabledTransports = opts.enabledTransports;\n if ('ignoreNullOrigin' in opts)\n config.ignoreNullOrigin = opts.ignoreNullOrigin;\n if ('timelineParams' in opts)\n config.timelineParams = opts.timelineParams;\n if ('nacl' in opts) {\n config.nacl = opts.nacl;\n }\n return config;\n}\nfunction getHttpHost(opts) {\n if (opts.httpHost) {\n return opts.httpHost;\n }\n if (opts.cluster) {\n return \"sockjs-\" + opts.cluster + \".pusher.com\";\n }\n return defaults.httpHost;\n}\nfunction getWebsocketHost(opts) {\n if (opts.wsHost) {\n return opts.wsHost;\n }\n if (opts.cluster) {\n return getWebsocketHostFromCluster(opts.cluster);\n }\n return getWebsocketHostFromCluster(defaults.cluster);\n}\nfunction getWebsocketHostFromCluster(cluster) {\n return \"ws-\" + cluster + \".pusher.com\";\n}\nfunction shouldUseTLS(opts) {\n if (runtime.getProtocol() === 'https:') {\n return true;\n }\n else if (opts.forceTLS === false) {\n return false;\n }\n return true;\n}\nfunction getEnableStatsConfig(opts) {\n if ('enableStats' in opts) {\n return opts.enableStats;\n }\n if ('disableStats' in opts) {\n return !opts.disableStats;\n }\n return false;\n}\nfunction buildUserAuthenticator(opts) {\n var userAuthentication = __assign({}, defaults.userAuthentication, opts.userAuthentication);\n if ('customHandler' in userAuthentication &&\n userAuthentication['customHandler'] != null) {\n return userAuthentication['customHandler'];\n }\n return user_authenticator(userAuthentication);\n}\nfunction buildChannelAuth(opts, pusher) {\n var channelAuthorization;\n if ('channelAuthorization' in opts) {\n channelAuthorization = __assign({}, defaults.channelAuthorization, opts.channelAuthorization);\n }\n else {\n channelAuthorization = {\n transport: opts.authTransport || defaults.authTransport,\n endpoint: opts.authEndpoint || defaults.authEndpoint\n };\n if ('auth' in opts) {\n if ('params' in opts.auth)\n channelAuthorization.params = opts.auth.params;\n if ('headers' in opts.auth)\n channelAuthorization.headers = opts.auth.headers;\n }\n if ('authorizer' in opts)\n channelAuthorization.customHandler = ChannelAuthorizerProxy(pusher, channelAuthorization, opts.authorizer);\n }\n return channelAuthorization;\n}\nfunction buildChannelAuthorizer(opts, pusher) {\n var channelAuthorization = buildChannelAuth(opts, pusher);\n if ('customHandler' in channelAuthorization &&\n channelAuthorization['customHandler'] != null) {\n return channelAuthorization['customHandler'];\n }\n return channel_authorizer(channelAuthorization);\n}\n\n// CONCATENATED MODULE: ./src/core/utils/flat_promise.ts\nfunction flatPromise() {\n var resolve, reject;\n var promise = new Promise(function (res, rej) {\n resolve = res;\n reject = rej;\n });\n return { promise: promise, resolve: resolve, reject: reject };\n}\n/* harmony default export */ var flat_promise = (flatPromise);\n\n// CONCATENATED MODULE: ./src/core/user.ts\nvar user_extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\nvar user_UserFacade = (function (_super) {\n user_extends(UserFacade, _super);\n function UserFacade(pusher) {\n var _this = _super.call(this, function (eventName, data) {\n logger.debug('No callbacks on user for ' + eventName);\n }) || this;\n _this.signin_requested = false;\n _this.user_data = null;\n _this.serverToUserChannel = null;\n _this.signinDonePromise = null;\n _this._signinDoneResolve = null;\n _this._onAuthorize = function (err, authData) {\n if (err) {\n logger.warn(\"Error during signin: \" + err);\n _this._cleanup();\n return;\n }\n _this.pusher.send_event('pusher:signin', {\n auth: authData.auth,\n user_data: authData.user_data\n });\n };\n _this.pusher = pusher;\n _this.pusher.connection.bind('state_change', function (_a) {\n var previous = _a.previous, current = _a.current;\n if (previous !== 'connected' && current === 'connected') {\n _this._signin();\n }\n if (previous === 'connected' && current !== 'connected') {\n _this._cleanup();\n _this._newSigninPromiseIfNeeded();\n }\n });\n _this.pusher.connection.bind('message', function (event) {\n var eventName = event.event;\n if (eventName === 'pusher:signin_success') {\n _this._onSigninSuccess(event.data);\n }\n if (_this.serverToUserChannel &&\n _this.serverToUserChannel.name === event.channel) {\n _this.serverToUserChannel.handleEvent(event);\n }\n });\n return _this;\n }\n UserFacade.prototype.signin = function () {\n if (this.signin_requested) {\n return;\n }\n this.signin_requested = true;\n this._signin();\n };\n UserFacade.prototype._signin = function () {\n if (!this.signin_requested) {\n return;\n }\n this._newSigninPromiseIfNeeded();\n if (this.pusher.connection.state !== 'connected') {\n return;\n }\n this.pusher.config.userAuthenticator({\n socketId: this.pusher.connection.socket_id\n }, this._onAuthorize);\n };\n UserFacade.prototype._onSigninSuccess = function (data) {\n try {\n this.user_data = JSON.parse(data.user_data);\n }\n catch (e) {\n logger.error(\"Failed parsing user data after signin: \" + data.user_data);\n this._cleanup();\n return;\n }\n if (typeof this.user_data.id !== 'string' || this.user_data.id === '') {\n logger.error(\"user_data doesn't contain an id. user_data: \" + this.user_data);\n this._cleanup();\n return;\n }\n this._signinDoneResolve();\n this._subscribeChannels();\n };\n UserFacade.prototype._subscribeChannels = function () {\n var _this = this;\n var ensure_subscribed = function (channel) {\n if (channel.subscriptionPending && channel.subscriptionCancelled) {\n channel.reinstateSubscription();\n }\n else if (!channel.subscriptionPending &&\n _this.pusher.connection.state === 'connected') {\n channel.subscribe();\n }\n };\n this.serverToUserChannel = new channels_channel(\"#server-to-user-\" + this.user_data.id, this.pusher);\n this.serverToUserChannel.bind_global(function (eventName, data) {\n if (eventName.indexOf('pusher_internal:') === 0 ||\n eventName.indexOf('pusher:') === 0) {\n return;\n }\n _this.emit(eventName, data);\n });\n ensure_subscribed(this.serverToUserChannel);\n };\n UserFacade.prototype._cleanup = function () {\n this.user_data = null;\n if (this.serverToUserChannel) {\n this.serverToUserChannel.unbind_all();\n this.serverToUserChannel.disconnect();\n this.serverToUserChannel = null;\n }\n if (this.signin_requested) {\n this._signinDoneResolve();\n }\n };\n UserFacade.prototype._newSigninPromiseIfNeeded = function () {\n if (!this.signin_requested) {\n return;\n }\n if (this.signinDonePromise && !this.signinDonePromise.done) {\n return;\n }\n var _a = flat_promise(), promise = _a.promise, resolve = _a.resolve, _ = _a.reject;\n promise.done = false;\n var setDone = function () {\n promise.done = true;\n };\n promise.then(setDone)[\"catch\"](setDone);\n this.signinDonePromise = promise;\n this._signinDoneResolve = resolve;\n };\n return UserFacade;\n}(dispatcher));\n/* harmony default export */ var user = (user_UserFacade);\n\n// CONCATENATED MODULE: ./src/core/pusher.ts\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar pusher_Pusher = (function () {\n function Pusher(app_key, options) {\n var _this = this;\n checkAppKey(app_key);\n options = options || {};\n if (!options.cluster && !(options.wsHost || options.httpHost)) {\n var suffix = url_store.buildLogSuffix('javascriptQuickStart');\n logger.warn(\"You should always specify a cluster when connecting. \" + suffix);\n }\n if ('disableStats' in options) {\n logger.warn('The disableStats option is deprecated in favor of enableStats');\n }\n this.key = app_key;\n this.config = getConfig(options, this);\n this.channels = factory.createChannels();\n this.global_emitter = new dispatcher();\n this.sessionID = Math.floor(Math.random() * 1000000000);\n this.timeline = new timeline_timeline(this.key, this.sessionID, {\n cluster: this.config.cluster,\n features: Pusher.getClientFeatures(),\n params: this.config.timelineParams || {},\n limit: 50,\n level: timeline_level.INFO,\n version: defaults.VERSION\n });\n if (this.config.enableStats) {\n this.timelineSender = factory.createTimelineSender(this.timeline, {\n host: this.config.statsHost,\n path: '/timeline/v2/' + runtime.TimelineTransport.name\n });\n }\n var getStrategy = function (options) {\n return runtime.getDefaultStrategy(_this.config, options, strategy_builder_defineTransport);\n };\n this.connection = factory.createConnectionManager(this.key, {\n getStrategy: getStrategy,\n timeline: this.timeline,\n activityTimeout: this.config.activityTimeout,\n pongTimeout: this.config.pongTimeout,\n unavailableTimeout: this.config.unavailableTimeout,\n useTLS: Boolean(this.config.useTLS)\n });\n this.connection.bind('connected', function () {\n _this.subscribeAll();\n if (_this.timelineSender) {\n _this.timelineSender.send(_this.connection.isUsingTLS());\n }\n });\n this.connection.bind('message', function (event) {\n var eventName = event.event;\n var internal = eventName.indexOf('pusher_internal:') === 0;\n if (event.channel) {\n var channel = _this.channel(event.channel);\n if (channel) {\n channel.handleEvent(event);\n }\n }\n if (!internal) {\n _this.global_emitter.emit(event.event, event.data);\n }\n });\n this.connection.bind('connecting', function () {\n _this.channels.disconnect();\n });\n this.connection.bind('disconnected', function () {\n _this.channels.disconnect();\n });\n this.connection.bind('error', function (err) {\n logger.warn(err);\n });\n Pusher.instances.push(this);\n this.timeline.info({ instances: Pusher.instances.length });\n this.user = new user(this);\n if (Pusher.isReady) {\n this.connect();\n }\n }\n Pusher.ready = function () {\n Pusher.isReady = true;\n for (var i = 0, l = Pusher.instances.length; i < l; i++) {\n Pusher.instances[i].connect();\n }\n };\n Pusher.getClientFeatures = function () {\n return keys(filterObject({ ws: runtime.Transports.ws }, function (t) {\n return t.isSupported({});\n }));\n };\n Pusher.prototype.channel = function (name) {\n return this.channels.find(name);\n };\n Pusher.prototype.allChannels = function () {\n return this.channels.all();\n };\n Pusher.prototype.connect = function () {\n this.connection.connect();\n if (this.timelineSender) {\n if (!this.timelineSenderTimer) {\n var usingTLS = this.connection.isUsingTLS();\n var timelineSender = this.timelineSender;\n this.timelineSenderTimer = new PeriodicTimer(60000, function () {\n timelineSender.send(usingTLS);\n });\n }\n }\n };\n Pusher.prototype.disconnect = function () {\n this.connection.disconnect();\n if (this.timelineSenderTimer) {\n this.timelineSenderTimer.ensureAborted();\n this.timelineSenderTimer = null;\n }\n };\n Pusher.prototype.bind = function (event_name, callback, context) {\n this.global_emitter.bind(event_name, callback, context);\n return this;\n };\n Pusher.prototype.unbind = function (event_name, callback, context) {\n this.global_emitter.unbind(event_name, callback, context);\n return this;\n };\n Pusher.prototype.bind_global = function (callback) {\n this.global_emitter.bind_global(callback);\n return this;\n };\n Pusher.prototype.unbind_global = function (callback) {\n this.global_emitter.unbind_global(callback);\n return this;\n };\n Pusher.prototype.unbind_all = function (callback) {\n this.global_emitter.unbind_all();\n return this;\n };\n Pusher.prototype.subscribeAll = function () {\n var channelName;\n for (channelName in this.channels.channels) {\n if (this.channels.channels.hasOwnProperty(channelName)) {\n this.subscribe(channelName);\n }\n }\n };\n Pusher.prototype.subscribe = function (channel_name) {\n var channel = this.channels.add(channel_name, this);\n if (channel.subscriptionPending && channel.subscriptionCancelled) {\n channel.reinstateSubscription();\n }\n else if (!channel.subscriptionPending &&\n this.connection.state === 'connected') {\n channel.subscribe();\n }\n return channel;\n };\n Pusher.prototype.unsubscribe = function (channel_name) {\n var channel = this.channels.find(channel_name);\n if (channel && channel.subscriptionPending) {\n channel.cancelSubscription();\n }\n else {\n channel = this.channels.remove(channel_name);\n if (channel && channel.subscribed) {\n channel.unsubscribe();\n }\n }\n };\n Pusher.prototype.send_event = function (event_name, data, channel) {\n return this.connection.send_event(event_name, data, channel);\n };\n Pusher.prototype.shouldUseTLS = function () {\n return this.config.useTLS;\n };\n Pusher.prototype.signin = function () {\n this.user.signin();\n };\n Pusher.instances = [];\n Pusher.isReady = false;\n Pusher.logToConsole = false;\n Pusher.Runtime = runtime;\n Pusher.ScriptReceivers = runtime.ScriptReceivers;\n Pusher.DependenciesReceivers = runtime.DependenciesReceivers;\n Pusher.auth_callbacks = runtime.auth_callbacks;\n return Pusher;\n}());\n/* harmony default export */ var core_pusher = __webpack_exports__[\"default\"] = (pusher_Pusher);\nfunction checkAppKey(key) {\n if (key === null || key === undefined) {\n throw 'You must pass your app key when you instantiate Pusher.';\n }\n}\nruntime.setup(pusher_Pusher);\n\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=pusher.js.map","'use strict';\nconst strictUriEncode = require('strict-uri-encode');\nconst decodeComponent = require('decode-uri-component');\nconst splitOnFirst = require('split-on-first');\nconst filterObject = require('filter-obj');\n\nconst isNullOrUndefined = value => value === null || value === undefined;\n\nconst encodeFragmentIdentifier = Symbol('encodeFragmentIdentifier');\n\nfunction encoderForArrayFormat(options) {\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tconst index = result.length;\n\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[', index, ']'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')\n\t\t\t\t];\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[]'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '[]=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'colon-list-separator':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), ':list='].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), ':list=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\tcase 'bracket-separator': {\n\t\t\tconst keyValueSep = options.arrayFormat === 'bracket-separator' ?\n\t\t\t\t'[]=' :\n\t\t\t\t'=';\n\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\t// Translate null to an empty string so that it doesn't serialize as 'null'\n\t\t\t\tvalue = value === null ? '' : value;\n\n\t\t\t\tif (result.length === 0) {\n\t\t\t\t\treturn [[encode(key, options), keyValueSep, encode(value, options)].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [[result, encode(value, options)].join(options.arrayFormatSeparator)];\n\t\t\t};\n\t\t}\n\n\t\tdefault:\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, encode(key, options)];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(options) {\n\tlet result;\n\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'colon-list-separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(:list)$/.exec(key);\n\t\t\t\tkey = key.replace(/:list$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);\n\t\t\t\tconst isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));\n\t\t\t\tvalue = isEncodedArray ? decode(value, options) : value;\n\t\t\t\tconst newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options);\n\t\t\t\taccumulator[key] = newValue;\n\t\t\t};\n\n\t\tcase 'bracket-separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = /(\\[\\])$/.test(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!isArray) {\n\t\t\t\t\taccumulator[key] = value ? decode(value, options) : value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst arrayValue = value === null ?\n\t\t\t\t\t[] :\n\t\t\t\t\tvalue.split(options.arrayFormatSeparator).map(item => decode(item, options));\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = arrayValue;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], arrayValue);\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction validateArrayFormatSeparator(value) {\n\tif (typeof value !== 'string' || value.length !== 1) {\n\t\tthrow new TypeError('arrayFormatSeparator must be single character string');\n\t}\n}\n\nfunction encode(value, options) {\n\tif (options.encode) {\n\t\treturn options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction decode(value, options) {\n\tif (options.decode) {\n\t\treturn decodeComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t}\n\n\tif (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input))\n\t\t\t.sort((a, b) => Number(a) - Number(b))\n\t\t\t.map(key => input[key]);\n\t}\n\n\treturn input;\n}\n\nfunction removeHash(input) {\n\tconst hashStart = input.indexOf('#');\n\tif (hashStart !== -1) {\n\t\tinput = input.slice(0, hashStart);\n\t}\n\n\treturn input;\n}\n\nfunction getHash(url) {\n\tlet hash = '';\n\tconst hashStart = url.indexOf('#');\n\tif (hashStart !== -1) {\n\t\thash = url.slice(hashStart);\n\t}\n\n\treturn hash;\n}\n\nfunction extract(input) {\n\tinput = removeHash(input);\n\tconst queryStart = input.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\n\treturn input.slice(queryStart + 1);\n}\n\nfunction parseValue(value, options) {\n\tif (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\tvalue = Number(value);\n\t} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\tvalue = value.toLowerCase() === 'true';\n\t}\n\n\treturn value;\n}\n\nfunction parse(query, options) {\n\toptions = Object.assign({\n\t\tdecode: true,\n\t\tsort: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',',\n\t\tparseNumbers: false,\n\t\tparseBooleans: false\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst formatter = parserForArrayFormat(options);\n\n\t// Create an object with no prototype\n\tconst ret = Object.create(null);\n\n\tif (typeof query !== 'string') {\n\t\treturn ret;\n\t}\n\n\tquery = query.trim().replace(/^[?#&]/, '');\n\n\tif (!query) {\n\t\treturn ret;\n\t}\n\n\tfor (const param of query.split('&')) {\n\t\tif (param === '') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet [key, value] = splitOnFirst(options.decode ? param.replace(/\\+/g, ' ') : param, '=');\n\n\t\t// Missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tvalue = value === undefined ? null : ['comma', 'separator', 'bracket-separator'].includes(options.arrayFormat) ? value : decode(value, options);\n\t\tformatter(decode(key, options), value, ret);\n\t}\n\n\tfor (const key of Object.keys(ret)) {\n\t\tconst value = ret[key];\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfor (const k of Object.keys(value)) {\n\t\t\t\tvalue[k] = parseValue(value[k], options);\n\t\t\t}\n\t\t} else {\n\t\t\tret[key] = parseValue(value, options);\n\t\t}\n\t}\n\n\tif (options.sort === false) {\n\t\treturn ret;\n\t}\n\n\treturn (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => {\n\t\tconst value = ret[key];\n\t\tif (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(value);\n\t\t} else {\n\t\t\tresult[key] = value;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexports.extract = extract;\nexports.parse = parse;\n\nexports.stringify = (object, options) => {\n\tif (!object) {\n\t\treturn '';\n\t}\n\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ','\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst shouldFilter = key => (\n\t\t(options.skipNull && isNullOrUndefined(object[key])) ||\n\t\t(options.skipEmptyString && object[key] === '')\n\t);\n\n\tconst formatter = encoderForArrayFormat(options);\n\n\tconst objectCopy = {};\n\n\tfor (const key of Object.keys(object)) {\n\t\tif (!shouldFilter(key)) {\n\t\t\tobjectCopy[key] = object[key];\n\t\t}\n\t}\n\n\tconst keys = Object.keys(objectCopy);\n\n\tif (options.sort !== false) {\n\t\tkeys.sort(options.sort);\n\t}\n\n\treturn keys.map(key => {\n\t\tconst value = object[key];\n\n\t\tif (value === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn encode(key, options);\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\tif (value.length === 0 && options.arrayFormat === 'bracket-separator') {\n\t\t\t\treturn encode(key, options) + '[]';\n\t\t\t}\n\n\t\t\treturn value\n\t\t\t\t.reduce(formatter(key), [])\n\t\t\t\t.join('&');\n\t\t}\n\n\t\treturn encode(key, options) + '=' + encode(value, options);\n\t}).filter(x => x.length > 0).join('&');\n};\n\nexports.parseUrl = (url, options) => {\n\toptions = Object.assign({\n\t\tdecode: true\n\t}, options);\n\n\tconst [url_, hash] = splitOnFirst(url, '#');\n\n\treturn Object.assign(\n\t\t{\n\t\t\turl: url_.split('?')[0] || '',\n\t\t\tquery: parse(extract(url), options)\n\t\t},\n\t\toptions && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}\n\t);\n};\n\nexports.stringifyUrl = (object, options) => {\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\t[encodeFragmentIdentifier]: true\n\t}, options);\n\n\tconst url = removeHash(object.url).split('?')[0] || '';\n\tconst queryFromUrl = exports.extract(object.url);\n\tconst parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false});\n\n\tconst query = Object.assign(parsedQueryFromUrl, object.query);\n\tlet queryString = exports.stringify(query, options);\n\tif (queryString) {\n\t\tqueryString = `?${queryString}`;\n\t}\n\n\tlet hash = getHash(object.url);\n\tif (object.fragmentIdentifier) {\n\t\thash = `#${options[encodeFragmentIdentifier] ? encode(object.fragmentIdentifier, options) : object.fragmentIdentifier}`;\n\t}\n\n\treturn `${url}${queryString}${hash}`;\n};\n\nexports.pick = (input, filter, options) => {\n\toptions = Object.assign({\n\t\tparseFragmentIdentifier: true,\n\t\t[encodeFragmentIdentifier]: false\n\t}, options);\n\n\tconst {url, query, fragmentIdentifier} = exports.parseUrl(input, options);\n\treturn exports.stringifyUrl({\n\t\turl,\n\t\tquery: filterObject(query, filter),\n\t\tfragmentIdentifier\n\t}, options);\n};\n\nexports.exclude = (input, filter, options) => {\n\tconst exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value);\n\n\treturn exports.pick(input, exclusionFilter, options);\n};\n","'use strict';\n\nmodule.exports = (string, separator) => {\n\tif (!(typeof string === 'string' && typeof separator === 'string')) {\n\t\tthrow new TypeError('Expected the arguments to be of type `string`');\n\t}\n\n\tif (separator === '') {\n\t\treturn [string];\n\t}\n\n\tconst separatorIndex = string.indexOf(separator);\n\n\tif (separatorIndex === -1) {\n\t\treturn [string];\n\t}\n\n\treturn [\n\t\tstring.slice(0, separatorIndex),\n\t\tstring.slice(separatorIndex + separator.length)\n\t];\n};\n","'use strict';\nmodule.exports = str => encodeURIComponent(str).replace(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);\n"],"names":["props","ref","AntdIcon","icon","displayName","_interopRequireWildcard","_interopRequireDefault","Object","defineProperty","exports","value","_extends2","React","_tooltip","_configProvider","_getRenderPropValue","__rest","s","e","t","p","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","Popover","forwardRef","_a","customizePrefixCls","prefixCls","title","content","otherProps","getPrefixCls","useContext","ConfigContext","createElement","overlay","Fragment","className","concat","getRenderPropValue","getOverlay","defaultProps","placement","transitionName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","_default","token","singleMatcher","RegExp","multiMatcher","decodeComponents","components","split","decodeURIComponent","join","err","left","slice","right","Array","decode","input","tokens","match","module","encodedURI","TypeError","replace","replaceMap","exec","result","entries","keys","key","customDecodeURIComponent","obj","predicate","ret","isArr","isArray","val","factory","window","modules","installedModules","moduleId","l","m","c","d","name","getter","o","enumerable","get","r","Symbol","toStringTag","mode","__esModule","ns","create","bind","n","object","property","__webpack_require__","extendStatics","__extends","this","b","setPrototypeOf","__proto__","__","constructor","INVALID_BYTE","Coder","_paddingCharacter","encodedLength","encode","data","out","_encodeByte","maxDecodedLength","decodedLength","_getPaddingLength","Uint8Array","paddingLength","op","haveBad","v0","v1","v2","v3","_decodeChar","charCodeAt","Error","String","fromCharCode","stdCoder","URLSafeCoder","_super","apply","arguments","urlSafeCoder","encodeURLSafe","decodeURLSafe","INVALID_UTF16","INVALID_UTF8","arr","pos","chars","min","n1","n2","n3","push","default","AuthRequestType","ScriptReceiverFactory","prefix","lastId","callback","number","id","called","callbackWrapper","remove","receiver","ScriptReceivers","defaults","VERSION","PROTOCOL","wsPort","wssPort","wsPath","httpHost","httpPort","httpsPort","httpPath","stats_host","authEndpoint","authTransport","activityTimeout","pongTimeout","unavailableTimeout","cluster","userAuthentication","endpoint","transport","channelAuthorization","cdn_http","cdn_https","dependency_suffix","dependency_loader","DependencyLoader","options","receivers","loading","load","self","request","runtime","createScriptRequest","getPath","error","callbacks","successCallback","wasSuccessful","cleanup","send","getRoot","protocol","getDocument","location","useTLS","version","suffix","DependenciesReceivers","Dependencies","urlStore","baseUrl","urls","authenticationEndpoint","path","authorizationEndpoint","javascriptQuickStart","triggeringClientEvents","encryptedChannelSupport","fullUrl","url_store","buildLogSuffix","url","urlObj","urlPrefix","BadEventName","msg","_newTarget","_this","BadChannelName","RequestTimedOut","TransportPriorityTooLow","TransportClosed","UnsupportedFeature","UnsupportedTransport","UnsupportedStrategy","HTTPAuthError","status","xhr_auth","context","query","authOptions","authRequestType","xhr","createXHR","headerName","open","setRequestHeader","headers","onreadystatechange","readyState","parsed","JSON","parse","responseText","toString","UserAuthentication","ChannelAuthorization","b64chars","b64tab","base64_i","charAt","cb_utob","cc","utob","u","cb_encode","ccc","padlen","ord","btoa","abstract_timer","Timer","set","clear","delay","timer","isRunning","ensureAborted","timers_extends","timers_clearTimeout","clearTimeout","timers_clearInterval","clearInterval","OneOffTimer","setTimeout","PeriodicTimer","setInterval","Util","now","Date","valueOf","defer","method","args","_i","boundArguments","util","extend","target","sources","extensions","stringify","safeJSONStringify","arrayIndexOf","array","item","nativeIndexOf","objectApply","f","_","map","filter","test","filterObject","Boolean","any","encodeParamsObject","encodeURIComponent","buildQueryString","params","undefined","source","objects","paths","derez","nu","$ref","logger_Logger","Logger","globalLog","message","console","log","debug","warn","globalLogWarn","globalLogError","defaultLoggingFunction","core_pusher","logToConsole","logger","jsonp_auth","callbackName","nextAuthCallbackID","document","script","auth_callbacks","callback_name","src","head","getElementsByTagName","documentElement","insertBefore","firstChild","script_request","ScriptRequest","errorString","type","charset","addEventListener","onerror","onload","async","attachEvent","navigator","userAgent","errorScript","text","nextSibling","parentNode","removeChild","jsonp_request","JSONPRequest","jsonp_timeline","getAgent","sender","host","createJSONPRequest","getGenericURL","baseScheme","hostTLS","hostNonTLS","getGenericPath","queryString","ws","getInitial","http","sockjs","callback_registry","CallbackRegistry","_callbacks","add","prefixedEventName","fn","names","removeCallback","removeAllCallbacks","binding","dispatcher","Dispatcher","failThrough","global_callbacks","eventName","bind_global","unbind","unbind_global","unbind_all","emit","metadata","transport_connection_extends","transport_connection_TransportConnection","TransportConnection","hooks","priority","initialize","transportConnectionInitializer","state","timeline","generateUniqueID","handlesActivityChecks","supportsPing","connect","socket","getSocket","onError","changeState","bindListeners","close","ping","onOpen","beforeOpen","onopen","buildTimelineMessage","onClose","closeEvent","code","reason","wasClean","unbindListeners","onMessage","onActivity","onclose","onmessage","onactivity","info","cid","transport_connection","transports_transport","Transport","isSupported","environment","createConnection","WSTransport","isInitialized","getWebSocketAPI","createWebSocket","httpConfiguration","streamingConfiguration","HTTPFactory","createStreamingSocket","pollingConfiguration","createPollingSocket","xhrConfiguration","isXHRSupported","transports","xhr_streaming","xhr_polling","SockJSTransport","file","SockJS","js_path","ignore_null_origin","ignoreNullOrigin","xdrConfiguration","isXDRSupported","XDRStreamingTransport","XDRPollingTransport","xdr_streaming","xdr_polling","transports_transports","net_info_extends","net_info_Network","NetInfo","isOnline","onLine","assistant_to_the_transport_manager","AssistantToTheTransportManager","manager","minPingDelay","maxPingDelay","pingDelay","connection","openTimestamp","onClosed","reportDeath","lifespan","Math","max","isAlive","Protocol","decodeMessage","messageEvent","messageData","pusherEventData","pusherEvent","event","channel","user_id","encodeMessage","processHandshake","activity_timeout","action","socket_id","getCloseAction","getCloseError","protocol_protocol","connection_extends","connection_connection","Connection","send_event","listeners","activity","closed","handleCloseEvent","listener","connection_handshake","Handshake","finish","timeline_sender","TimelineSender","isEmpty","TimelineTransport","channel_extends","channels_channel","Channel","pusher","subscribed","subscriptionPending","subscriptionCancelled","authorize","socketId","auth","disconnect","handleEvent","handleSubscriptionSucceededEvent","handleSubscriptionCountEvent","unsubscribe","subscription_count","subscriptionCount","subscribe","assign","channel_data","cancelSubscription","reinstateSubscription","private_channel_extends","PrivateChannel","config","channelAuthorizer","channelName","private_channel","members","Members","reset","each","member","setMyID","myID","onSubscription","subscriptionData","presence","hash","count","me","addMember","memberData","user_info","removeMember","presence_channel_extends","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","rejected","done","then","__generator","body","y","g","label","sent","trys","ops","verb","iterator","v","pop","presence_channel","PresenceChannel","authData","channelData","user","signinDonePromise","user_data","handleInternalEvent","addedMember","removedMember","utf8","base64","encrypted_channel_extends","encrypted_channel","EncryptedChannel","nacl","sharedSecret","handleEncryptedEvent","ciphertext","nonce","cipherText","secretbox","overheadLength","nonceLength","bytes","getDataToEmit","raw","connection_manager_extends","connection_manager","ConnectionManager","usingTLS","errorCallbacks","buildErrorCallbacks","connectionCallbacks","buildConnectionCallbacks","handshakeCallbacks","buildHandshakeCallbacks","Network","getNetwork","netinfo","retryIn","sendActivityCheck","updateStrategy","runner","strategy","updateState","startConnecting","setUnavailableTimer","disconnectInternally","isUsingTLS","handshake","handshakeError","abortConnecting","abort","clearRetryTimer","clearUnavailableTimer","abandonConnection","getStrategy","round","retryTimer","unavailableTimer","stopActivityCheck","activityTimer","pong_timed_out","resetActivityCheck","shouldRetry","connected","Infinity","setConnection","withErrorEmitted","tls_only","refused","backoff","retry","newState","previousState","newStateDescription","previous","current","channels_Channels","Channels","channels","createEncryptedChannel","errMsg","createPrivateChannel","createPresenceChannel","createChannel","all","values","find","createChannels","createConnectionManager","createTimelineSender","createHandshake","createAssistantToTheTransportManager","transport_manager","TransportManager","livesLeft","lives","getAssistant","sequential_strategy","SequentialStrategy","strategies","loop","failFast","timeout","timeoutLimit","minPriority","tryNextStrategy","tryStrategy","forceMinPriority","best_connected_ever_strategy","BestConnectedEverStrategy","callbackBuilder","runners","rs","abortRunner","collections_all","allRunnersFailed","aborted","cached_strategy_CachedStrategy","CachedStrategy","ttl","storage","getLocalStorage","serializedCache","getTransportCacheKey","flushTransportCache","fetchTransportCache","timestamp","cached","latency","startTimestamp","cb","storeTransportCache","cached_strategy","delayed_strategy","DelayedStrategy","if_strategy","IfStrategy","trueBranch","falseBranch","first_connected_strategy","FirstConnectedStrategy","testSupportsStrategy","State","default_strategy","baseOptions","defineTransport","definedTransports","defineTransportStrategy","wsStrategy","ws_options","wsHost","wss_options","sockjs_options","timeouts","ws_manager","streaming_manager","ws_transport","wss_transport","sockjs_transport","xhr_streaming_transport","xdr_streaming_transport","xhr_polling_transport","xdr_polling_transport","ws_loop","wss_loop","sockjs_loop","streaming_loop","polling_loop","http_loop","http_fallback_loop","http_xdomain_request","getRequest","xdr","XDomainRequest","ontimeout","onprogress","onChunk","abortRequest","http_request_extends","http_request","HTTPRequest","start","payload","position","unloader","addUnloadListener","removeUnloadListener","chunk","advanceBuffer","isBufferTooLong","buffer","unreadData","endOfLinePosition","autoIncrement","getUniqueURL","separator","randomNumber","floor","random","TimelineLevel","http_socket","HTTPSocket","session","randomString","parts","base","getLocation","CONNECTING","openStream","sendRaw","sendHeartbeat","OPEN","createSocketRequest","reconnect","closeStream","CLOSED","onEvent","onHeartbeat","hostname","urlParts","stream","getReceiveURL","onFinished","http_streaming_socket","http_polling_socket","http_xhr_request","getXHRAPI","http_http","createSocket","createRequest","getDefaultStrategy","Transports","XMLHttpRequest","WebSocket","MozWebSocket","setup","PusherClass","Pusher","initializeOnDocumentBody","onDocumentBody","ready","getProtocol","getAuthorizers","ajax","jsonp","localStorage","createXMLHttpRequest","createMicrosoftXHR","ActiveXObject","createXDR","Constructor","withCredentials","documentProtocol","removeEventListener","detachEvent","timeline_level","timeline_timeline","Timeline","events","uniqueID","level","limit","shift","ERROR","INFO","DEBUG","sendfn","bundle","lib","features","transport_strategy","TransportStrategy","failAttempt","onInitialized","serializedTransport","strategy_builder_Transports","strategy_builder_defineTransport","transportClass","enabledTransports","disabledTransports","strategy_builder_UnsupportedStrategy","deferred","user_authenticator","composeChannelQuery","channel_authorizer","channel_authorizer_composeChannelQuery","ChannelAuthorizerProxy","channelAuthorizerGenerator","deprecatedAuthorizerOptions","__assign","getHttpHost","opts","getWebsocketHost","getWebsocketHostFromCluster","shouldUseTLS","forceTLS","getEnableStatsConfig","enableStats","disableStats","buildUserAuthenticator","buildChannelAuthorizer","customHandler","authorizer","buildChannelAuth","flat_promise","promise","res","rej","user_extends","UserFacade","signin_requested","serverToUserChannel","_signinDoneResolve","_onAuthorize","_cleanup","_signin","_newSigninPromiseIfNeeded","_onSigninSuccess","signin","userAuthenticator","_subscribeChannels","setDone","pusher_Pusher","app_key","checkAppKey","statsHost","timelineParams","global_emitter","sessionID","getClientFeatures","timelineSender","subscribeAll","internal","instances","isReady","allChannels","timelineSenderTimer","event_name","channel_name","Runtime","strictUriEncode","decodeComponent","splitOnFirst","encodeFragmentIdentifier","validateArrayFormatSeparator","strict","keysSorter","sort","a","Number","removeHash","hashStart","extract","queryStart","parseValue","parseNumbers","isNaN","trim","parseBooleans","toLowerCase","arrayFormat","arrayFormatSeparator","formatter","accumulator","includes","isEncodedArray","newValue","arrayValue","parserForArrayFormat","param","k","reduce","shouldFilter","skipNull","skipEmptyString","index","keyValueSep","encoderForArrayFormat","objectCopy","x","parseUrl","url_","parseFragmentIdentifier","fragmentIdentifier","stringifyUrl","queryFromUrl","parsedQueryFromUrl","getHash","pick","exclude","exclusionFilter","string","separatorIndex","str","toUpperCase"],"sourceRoot":""}