Second frontend, written in Next.JS + Typescript.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

0 lines
74 KiB

4 years ago
  1. {"ast":null,"code":"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\n\nvar _unfetch = _interopRequireDefault(require(\"next/dist/build/polyfills/unfetch\"));\n/* eslint-disable */\n// Improved version of https://github.com/Yaffle/EventSource/\n// Available under MIT License (MIT)\n// Only tries to support IE11 and nothing below\n\n\nvar document = window.document;\nvar Response = window.Response;\nvar TextDecoder = window.TextDecoder;\nvar TextEncoder = window.TextEncoder;\nvar AbortController = window.AbortController;\n\nif (AbortController == undefined) {\n AbortController = function AbortController() {\n this.signal = null;\n\n this.abort = function () {};\n };\n}\n\nfunction TextDecoderPolyfill() {\n this.bitsNeeded = 0;\n this.codePoint = 0;\n}\n\nTextDecoderPolyfill.prototype.decode = function (octets) {\n function valid(codePoint, shift, octetsCount) {\n if (octetsCount === 1) {\n return codePoint >= 0x0080 >> shift && codePoint << shift <= 0x07ff;\n }\n\n if (octetsCount === 2) {\n return codePoint >= 0x0800 >> shift && codePoint << shift <= 0xd7ff || codePoint >= 0xe000 >> shift && codePoint << shift <= 0xffff;\n }\n\n if (octetsCount === 3) {\n return codePoint >= 0x010000 >> shift && codePoint << shift <= 0x10ffff;\n }\n\n throw new Error();\n }\n\n function octetsCount(bitsNeeded, codePoint) {\n if (bitsNeeded === 6 * 1) {\n return codePoint >> 6 > 15 ? 3 : codePoint > 31 ? 2 : 1;\n }\n\n if (bitsNeeded === 6 * 2) {\n return codePoint > 15 ? 3 : 2;\n }\n\n if (bitsNeeded === 6 * 3) {\n return 3;\n }\n\n throw new Error();\n }\n\n var REPLACER = 0xfffd;\n var string = '';\n var bitsNeeded = this.bitsNeeded;\n var codePoint = this.codePoint;\n\n for (var i = 0; i < octets.length; i += 1) {\n var octet = octets[i];\n\n if (bitsNeeded !== 0) {\n if (octet < 128 || octet > 191 || !valid(codePoint << 6 | octet & 63, bitsNeeded - 6, octetsCount(bitsNeeded, codePoint))) {\n bitsNeeded = 0;\n codePoint = REPLACER;\n string += String.fromCharCode(codePoint);\n }\n }\n\n if (bitsNeeded === 0) {\n if (octet >= 0 && octet <= 127) {\n bitsNeeded = 0;\n codePoint = octet;\n } else if (octet >= 192 && octet <= 223) {\n bitsNeeded = 6 * 1;\n codePoint = octet & 31;\n } else if (octet >= 224 && octet <= 239) {\n bitsNeeded = 6 * 2;\n codePoint = octet & 15;\n } else if (octet >= 240 && octet <= 247) {\n bitsNeeded = 6 * 3;\n codePoint = octet & 7;\n } else {\n bitsNeeded = 0;\n codePoint = REPLACER;\n }\n\n if (bitsNeeded !== 0 && !valid(codePoint, bitsNeeded, octetsCount(bitsNeeded, codePoint))) {\n bitsNeeded = 0;\n codePoint = REPLACER;\n }\n } else {\n bitsNeeded -= 6;\n codePoint = codePoint << 6 | octet & 63;\n }\n\n if (bitsNeeded === 0) {\n if (codePoint <= 0xffff) {\n string += String.fromCharCode(codePoint);\n } else {\n string += String.fromCharCode(0xd800 + (codePoint - 0xffff - 1 >> 10));\n string += String.fromCharCode(0xdc00 + (codePoint - 0xffff - 1 & 0x3ff));\n }\n }\n }\n\n this.bitsNeeded = bitsNeeded;\n this.codePoint = codePoint;\n return string;\n}; // Firefox < 38 throws an error with stream option\n\n\nvar supportsStreamOption = function supportsStreamOption() {\n try {\n return new TextDecoder().decode(new TextEncoder().encode('test'), {\n stream: true\n }) === 'test';\n } catch (error) {\n console.log(error);\n }\n\n return false;\n}; // IE, Edge\n\n\nif (TextDecoder == undefined || TextEncoder == undefined || !supportsStreamOption()) {\n TextDecoder = TextDecoderPolyfill;\n}\n\nvar k = function k() {};\n\nfunction XHRWrapper(xhr) {\n this.withCredentials = false;\n this.responseType = '';\n this.readyState = 0;\n this.status = 0;\n this.status