Nenhuma descrição
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

tslib.es6.js 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. /******************************************************************************
  2. Copyright (c) Microsoft Corporation.
  3. Permission to use, copy, modify, and/or distribute this software for any
  4. purpose with or without fee is hereby granted.
  5. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  6. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  7. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  8. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  9. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  10. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  11. PERFORMANCE OF THIS SOFTWARE.
  12. ***************************************************************************** */
  13. /* global Reflect, Promise */
  14. var extendStatics = function(d, b) {
  15. extendStatics = Object.setPrototypeOf ||
  16. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  17. function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
  18. return extendStatics(d, b);
  19. };
  20. export function __extends(d, b) {
  21. if (typeof b !== "function" && b !== null)
  22. throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
  23. extendStatics(d, b);
  24. function __() { this.constructor = d; }
  25. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  26. }
  27. export var __assign = function() {
  28. __assign = Object.assign || function __assign(t) {
  29. for (var s, i = 1, n = arguments.length; i < n; i++) {
  30. s = arguments[i];
  31. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
  32. }
  33. return t;
  34. }
  35. return __assign.apply(this, arguments);
  36. }
  37. export function __rest(s, e) {
  38. var t = {};
  39. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
  40. t[p] = s[p];
  41. if (s != null && typeof Object.getOwnPropertySymbols === "function")
  42. for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  43. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
  44. t[p[i]] = s[p[i]];
  45. }
  46. return t;
  47. }
  48. export function __decorate(decorators, target, key, desc) {
  49. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  50. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  51. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  52. return c > 3 && r && Object.defineProperty(target, key, r), r;
  53. }
  54. export function __param(paramIndex, decorator) {
  55. return function (target, key) { decorator(target, key, paramIndex); }
  56. }
  57. export function __metadata(metadataKey, metadataValue) {
  58. if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
  59. }
  60. export function __awaiter(thisArg, _arguments, P, generator) {
  61. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  62. return new (P || (P = Promise))(function (resolve, reject) {
  63. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  64. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  65. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  66. step((generator = generator.apply(thisArg, _arguments || [])).next());
  67. });
  68. }
  69. export function __generator(thisArg, body) {
  70. var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
  71. return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
  72. function verb(n) { return function (v) { return step([n, v]); }; }
  73. function step(op) {
  74. if (f) throw new TypeError("Generator is already executing.");
  75. while (g && (g = 0, op[0] && (_ = 0)), _) try {
  76. 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;
  77. if (y = 0, t) op = [op[0] & 2, t.value];
  78. switch (op[0]) {
  79. case 0: case 1: t = op; break;
  80. case 4: _.label++; return { value: op[1], done: false };
  81. case 5: _.label++; y = op[1]; op = [0]; continue;
  82. case 7: op = _.ops.pop(); _.trys.pop(); continue;
  83. default:
  84. if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
  85. if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
  86. if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
  87. if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
  88. if (t[2]) _.ops.pop();
  89. _.trys.pop(); continue;
  90. }
  91. op = body.call(thisArg, _);
  92. } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
  93. if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
  94. }
  95. }
  96. export var __createBinding = Object.create ? (function(o, m, k, k2) {
  97. if (k2 === undefined) k2 = k;
  98. var desc = Object.getOwnPropertyDescriptor(m, k);
  99. if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
  100. desc = { enumerable: true, get: function() { return m[k]; } };
  101. }
  102. Object.defineProperty(o, k2, desc);
  103. }) : (function(o, m, k, k2) {
  104. if (k2 === undefined) k2 = k;
  105. o[k2] = m[k];
  106. });
  107. export function __exportStar(m, o) {
  108. for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
  109. }
  110. export function __values(o) {
  111. var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
  112. if (m) return m.call(o);
  113. if (o && typeof o.length === "number") return {
  114. next: function () {
  115. if (o && i >= o.length) o = void 0;
  116. return { value: o && o[i++], done: !o };
  117. }
  118. };
  119. throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
  120. }
  121. export function __read(o, n) {
  122. var m = typeof Symbol === "function" && o[Symbol.iterator];
  123. if (!m) return o;
  124. var i = m.call(o), r, ar = [], e;
  125. try {
  126. while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
  127. }
  128. catch (error) { e = { error: error }; }
  129. finally {
  130. try {
  131. if (r && !r.done && (m = i["return"])) m.call(i);
  132. }
  133. finally { if (e) throw e.error; }
  134. }
  135. return ar;
  136. }
  137. /** @deprecated */
  138. export function __spread() {
  139. for (var ar = [], i = 0; i < arguments.length; i++)
  140. ar = ar.concat(__read(arguments[i]));
  141. return ar;
  142. }
  143. /** @deprecated */
  144. export function __spreadArrays() {
  145. for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
  146. for (var r = Array(s), k = 0, i = 0; i < il; i++)
  147. for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
  148. r[k] = a[j];
  149. return r;
  150. }
  151. export function __spreadArray(to, from, pack) {
  152. if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
  153. if (ar || !(i in from)) {
  154. if (!ar) ar = Array.prototype.slice.call(from, 0, i);
  155. ar[i] = from[i];
  156. }
  157. }
  158. return to.concat(ar || Array.prototype.slice.call(from));
  159. }
  160. export function __await(v) {
  161. return this instanceof __await ? (this.v = v, this) : new __await(v);
  162. }
  163. export function __asyncGenerator(thisArg, _arguments, generator) {
  164. if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  165. var g = generator.apply(thisArg, _arguments || []), i, q = [];
  166. return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
  167. function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
  168. function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
  169. function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
  170. function fulfill(value) { resume("next", value); }
  171. function reject(value) { resume("throw", value); }
  172. function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
  173. }
  174. export function __asyncDelegator(o) {
  175. var i, p;
  176. return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
  177. function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
  178. }
  179. export function __asyncValues(o) {
  180. if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  181. var m = o[Symbol.asyncIterator], i;
  182. return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
  183. function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
  184. function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
  185. }
  186. export function __makeTemplateObject(cooked, raw) {
  187. if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
  188. return cooked;
  189. };
  190. var __setModuleDefault = Object.create ? (function(o, v) {
  191. Object.defineProperty(o, "default", { enumerable: true, value: v });
  192. }) : function(o, v) {
  193. o["default"] = v;
  194. };
  195. export function __importStar(mod) {
  196. if (mod && mod.__esModule) return mod;
  197. var result = {};
  198. if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
  199. __setModuleDefault(result, mod);
  200. return result;
  201. }
  202. export function __importDefault(mod) {
  203. return (mod && mod.__esModule) ? mod : { default: mod };
  204. }
  205. export function __classPrivateFieldGet(receiver, state, kind, f) {
  206. if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
  207. if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
  208. return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
  209. }
  210. export function __classPrivateFieldSet(receiver, state, value, kind, f) {
  211. if (kind === "m") throw new TypeError("Private method is not writable");
  212. if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
  213. if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
  214. return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
  215. }
  216. export function __classPrivateFieldIn(state, receiver) {
  217. if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
  218. return typeof state === "function" ? receiver === state : state.has(receiver);
  219. }