a zip code crypto-currency system good for red ONLY

testing.js 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  1. /**
  2. * @license Angular v5.2.11
  3. * (c) 2010-2018 Google, Inc. https://angular.io/
  4. * License: MIT
  5. */
  6. import { __extends } from 'tslib';
  7. import { AUTO_STYLE, NoopAnimationPlayer } from '@angular/animations';
  8. /**
  9. * @fileoverview added by tsickle
  10. * @suppress {checkTypes} checked by tsc
  11. */
  12. /**
  13. * @param {?} players
  14. * @return {?}
  15. */
  16. /**
  17. * @param {?} driver
  18. * @param {?} normalizer
  19. * @param {?} element
  20. * @param {?} keyframes
  21. * @param {?=} preStyles
  22. * @param {?=} postStyles
  23. * @return {?}
  24. */
  25. /**
  26. * @param {?} player
  27. * @param {?} eventName
  28. * @param {?} event
  29. * @param {?} callback
  30. * @return {?}
  31. */
  32. /**
  33. * @param {?} e
  34. * @param {?=} phaseName
  35. * @param {?=} totalTime
  36. * @return {?}
  37. */
  38. /**
  39. * @param {?} element
  40. * @param {?} triggerName
  41. * @param {?} fromState
  42. * @param {?} toState
  43. * @param {?=} phaseName
  44. * @param {?=} totalTime
  45. * @return {?}
  46. */
  47. /**
  48. * @param {?} map
  49. * @param {?} key
  50. * @param {?} defaultValue
  51. * @return {?}
  52. */
  53. /**
  54. * @param {?} command
  55. * @return {?}
  56. */
  57. var _contains = function (elm1, elm2) { return false; };
  58. var _matches = function (element, selector) {
  59. return false;
  60. };
  61. var _query = function (element, selector, multi) {
  62. return [];
  63. };
  64. if (typeof Element != 'undefined') {
  65. // this is well supported in all browsers
  66. _contains = function (elm1, elm2) { return /** @type {?} */ (elm1.contains(elm2)); };
  67. if (Element.prototype.matches) {
  68. _matches = function (element, selector) { return element.matches(selector); };
  69. }
  70. else {
  71. var /** @type {?} */ proto = /** @type {?} */ (Element.prototype);
  72. var /** @type {?} */ fn_1 = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector ||
  73. proto.oMatchesSelector || proto.webkitMatchesSelector;
  74. if (fn_1) {
  75. _matches = function (element, selector) { return fn_1.apply(element, [selector]); };
  76. }
  77. }
  78. _query = function (element, selector, multi) {
  79. var /** @type {?} */ results = [];
  80. if (multi) {
  81. results.push.apply(results, element.querySelectorAll(selector));
  82. }
  83. else {
  84. var /** @type {?} */ elm = element.querySelector(selector);
  85. if (elm) {
  86. results.push(elm);
  87. }
  88. }
  89. return results;
  90. };
  91. }
  92. /**
  93. * @param {?} prop
  94. * @return {?}
  95. */
  96. function containsVendorPrefix(prop) {
  97. // Webkit is the only real popular vendor prefix nowadays
  98. // cc: http://shouldiprefix.com/
  99. return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit
  100. }
  101. var _CACHED_BODY = null;
  102. var _IS_WEBKIT = false;
  103. /**
  104. * @param {?} prop
  105. * @return {?}
  106. */
  107. function validateStyleProperty(prop) {
  108. if (!_CACHED_BODY) {
  109. _CACHED_BODY = getBodyNode() || {};
  110. _IS_WEBKIT = /** @type {?} */ ((_CACHED_BODY)).style ? ('WebkitAppearance' in /** @type {?} */ ((_CACHED_BODY)).style) : false;
  111. }
  112. var /** @type {?} */ result = true;
  113. if (/** @type {?} */ ((_CACHED_BODY)).style && !containsVendorPrefix(prop)) {
  114. result = prop in /** @type {?} */ ((_CACHED_BODY)).style;
  115. if (!result && _IS_WEBKIT) {
  116. var /** @type {?} */ camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.substr(1);
  117. result = camelProp in /** @type {?} */ ((_CACHED_BODY)).style;
  118. }
  119. }
  120. return result;
  121. }
  122. /**
  123. * @return {?}
  124. */
  125. function getBodyNode() {
  126. if (typeof document != 'undefined') {
  127. return document.body;
  128. }
  129. return null;
  130. }
  131. var matchesElement = _matches;
  132. var containsElement = _contains;
  133. var invokeQuery = _query;
  134. /**
  135. * @fileoverview added by tsickle
  136. * @suppress {checkTypes} checked by tsc
  137. */
  138. /**
  139. * @param {?} value
  140. * @return {?}
  141. */
  142. /**
  143. * @param {?} timings
  144. * @param {?} errors
  145. * @param {?=} allowNegativeValues
  146. * @return {?}
  147. */
  148. /**
  149. * @param {?} obj
  150. * @param {?=} destination
  151. * @return {?}
  152. */
  153. /**
  154. * @param {?} styles
  155. * @return {?}
  156. */
  157. /**
  158. * @param {?} styles
  159. * @param {?} readPrototype
  160. * @param {?=} destination
  161. * @return {?}
  162. */
  163. /**
  164. * @param {?} element
  165. * @param {?} styles
  166. * @return {?}
  167. */
  168. /**
  169. * @param {?} element
  170. * @param {?} styles
  171. * @return {?}
  172. */
  173. /**
  174. * @param {?} steps
  175. * @return {?}
  176. */
  177. /**
  178. * @param {?} value
  179. * @param {?} options
  180. * @param {?} errors
  181. * @return {?}
  182. */
  183. /**
  184. * @param {?} value
  185. * @return {?}
  186. */
  187. /**
  188. * @param {?} value
  189. * @param {?} params
  190. * @param {?} errors
  191. * @return {?}
  192. */
  193. /**
  194. * @param {?} iterator
  195. * @return {?}
  196. */
  197. /**
  198. * @param {?} source
  199. * @param {?} destination
  200. * @return {?}
  201. */
  202. /**
  203. * @param {?} input
  204. * @return {?}
  205. */
  206. /**
  207. * @param {?} duration
  208. * @param {?} delay
  209. * @return {?}
  210. */
  211. function allowPreviousPlayerStylesMerge(duration, delay) {
  212. return duration === 0 || delay === 0;
  213. }
  214. /**
  215. * @param {?} visitor
  216. * @param {?} node
  217. * @param {?} context
  218. * @return {?}
  219. */
  220. /**
  221. * @fileoverview added by tsickle
  222. * @suppress {checkTypes} checked by tsc
  223. */
  224. /**
  225. * \@experimental Animation support is experimental.
  226. */
  227. var MockAnimationDriver = /** @class */ (function () {
  228. function MockAnimationDriver() {
  229. }
  230. /**
  231. * @param {?} prop
  232. * @return {?}
  233. */
  234. MockAnimationDriver.prototype.validateStyleProperty = /**
  235. * @param {?} prop
  236. * @return {?}
  237. */
  238. function (prop) { return validateStyleProperty(prop); };
  239. /**
  240. * @param {?} element
  241. * @param {?} selector
  242. * @return {?}
  243. */
  244. MockAnimationDriver.prototype.matchesElement = /**
  245. * @param {?} element
  246. * @param {?} selector
  247. * @return {?}
  248. */
  249. function (element, selector) {
  250. return matchesElement(element, selector);
  251. };
  252. /**
  253. * @param {?} elm1
  254. * @param {?} elm2
  255. * @return {?}
  256. */
  257. MockAnimationDriver.prototype.containsElement = /**
  258. * @param {?} elm1
  259. * @param {?} elm2
  260. * @return {?}
  261. */
  262. function (elm1, elm2) { return containsElement(elm1, elm2); };
  263. /**
  264. * @param {?} element
  265. * @param {?} selector
  266. * @param {?} multi
  267. * @return {?}
  268. */
  269. MockAnimationDriver.prototype.query = /**
  270. * @param {?} element
  271. * @param {?} selector
  272. * @param {?} multi
  273. * @return {?}
  274. */
  275. function (element, selector, multi) {
  276. return invokeQuery(element, selector, multi);
  277. };
  278. /**
  279. * @param {?} element
  280. * @param {?} prop
  281. * @param {?=} defaultValue
  282. * @return {?}
  283. */
  284. MockAnimationDriver.prototype.computeStyle = /**
  285. * @param {?} element
  286. * @param {?} prop
  287. * @param {?=} defaultValue
  288. * @return {?}
  289. */
  290. function (element, prop, defaultValue) {
  291. return defaultValue || '';
  292. };
  293. /**
  294. * @param {?} element
  295. * @param {?} keyframes
  296. * @param {?} duration
  297. * @param {?} delay
  298. * @param {?} easing
  299. * @param {?=} previousPlayers
  300. * @return {?}
  301. */
  302. MockAnimationDriver.prototype.animate = /**
  303. * @param {?} element
  304. * @param {?} keyframes
  305. * @param {?} duration
  306. * @param {?} delay
  307. * @param {?} easing
  308. * @param {?=} previousPlayers
  309. * @return {?}
  310. */
  311. function (element, keyframes, duration, delay, easing, previousPlayers) {
  312. if (previousPlayers === void 0) { previousPlayers = []; }
  313. var /** @type {?} */ player = new MockAnimationPlayer(element, keyframes, duration, delay, easing, previousPlayers);
  314. MockAnimationDriver.log.push(/** @type {?} */ (player));
  315. return player;
  316. };
  317. MockAnimationDriver.log = [];
  318. return MockAnimationDriver;
  319. }());
  320. /**
  321. * \@experimental Animation support is experimental.
  322. */
  323. var MockAnimationPlayer = /** @class */ (function (_super) {
  324. __extends(MockAnimationPlayer, _super);
  325. function MockAnimationPlayer(element, keyframes, duration, delay, easing, previousPlayers) {
  326. var _this = _super.call(this) || this;
  327. _this.element = element;
  328. _this.keyframes = keyframes;
  329. _this.duration = duration;
  330. _this.delay = delay;
  331. _this.easing = easing;
  332. _this.previousPlayers = previousPlayers;
  333. _this.__finished = false;
  334. _this.__started = false;
  335. _this.previousStyles = {};
  336. _this._onInitFns = [];
  337. _this.currentSnapshot = {};
  338. if (allowPreviousPlayerStylesMerge(duration, delay)) {
  339. previousPlayers.forEach(function (player) {
  340. if (player instanceof MockAnimationPlayer) {
  341. var /** @type {?} */ styles_1 = player.currentSnapshot;
  342. Object.keys(styles_1).forEach(function (prop) { return _this.previousStyles[prop] = styles_1[prop]; });
  343. }
  344. });
  345. }
  346. _this.totalTime = delay + duration;
  347. return _this;
  348. }
  349. /* @internal */
  350. /**
  351. * @param {?} fn
  352. * @return {?}
  353. */
  354. MockAnimationPlayer.prototype.onInit = /**
  355. * @param {?} fn
  356. * @return {?}
  357. */
  358. function (fn) { this._onInitFns.push(fn); };
  359. /* @internal */
  360. /**
  361. * @return {?}
  362. */
  363. MockAnimationPlayer.prototype.init = /**
  364. * @return {?}
  365. */
  366. function () {
  367. _super.prototype.init.call(this);
  368. this._onInitFns.forEach(function (fn) { return fn(); });
  369. this._onInitFns = [];
  370. };
  371. /**
  372. * @return {?}
  373. */
  374. MockAnimationPlayer.prototype.finish = /**
  375. * @return {?}
  376. */
  377. function () {
  378. _super.prototype.finish.call(this);
  379. this.__finished = true;
  380. };
  381. /**
  382. * @return {?}
  383. */
  384. MockAnimationPlayer.prototype.destroy = /**
  385. * @return {?}
  386. */
  387. function () {
  388. _super.prototype.destroy.call(this);
  389. this.__finished = true;
  390. };
  391. /* @internal */
  392. /**
  393. * @return {?}
  394. */
  395. MockAnimationPlayer.prototype.triggerMicrotask = /**
  396. * @return {?}
  397. */
  398. function () { };
  399. /**
  400. * @return {?}
  401. */
  402. MockAnimationPlayer.prototype.play = /**
  403. * @return {?}
  404. */
  405. function () {
  406. _super.prototype.play.call(this);
  407. this.__started = true;
  408. };
  409. /**
  410. * @return {?}
  411. */
  412. MockAnimationPlayer.prototype.hasStarted = /**
  413. * @return {?}
  414. */
  415. function () { return this.__started; };
  416. /**
  417. * @return {?}
  418. */
  419. MockAnimationPlayer.prototype.beforeDestroy = /**
  420. * @return {?}
  421. */
  422. function () {
  423. var _this = this;
  424. var /** @type {?} */ captures = {};
  425. Object.keys(this.previousStyles).forEach(function (prop) {
  426. captures[prop] = _this.previousStyles[prop];
  427. });
  428. if (this.hasStarted()) {
  429. // when assembling the captured styles, it's important that
  430. // we build the keyframe styles in the following order:
  431. // {other styles within keyframes, ... previousStyles }
  432. this.keyframes.forEach(function (kf) {
  433. Object.keys(kf).forEach(function (prop) {
  434. if (prop != 'offset') {
  435. captures[prop] = _this.__finished ? kf[prop] : AUTO_STYLE;
  436. }
  437. });
  438. });
  439. }
  440. this.currentSnapshot = captures;
  441. };
  442. return MockAnimationPlayer;
  443. }(NoopAnimationPlayer));
  444. /**
  445. * @fileoverview added by tsickle
  446. * @suppress {checkTypes} checked by tsc
  447. */
  448. /**
  449. * @fileoverview added by tsickle
  450. * @suppress {checkTypes} checked by tsc
  451. */
  452. /**
  453. * @license
  454. * Copyright Google Inc. All Rights Reserved.
  455. *
  456. * Use of this source code is governed by an MIT-style license that can be
  457. * found in the LICENSE file at https://angular.io/license
  458. */
  459. /**
  460. * @module
  461. * @description
  462. * Entry point for all public APIs of this package.
  463. */
  464. /**
  465. * @fileoverview added by tsickle
  466. * @suppress {checkTypes} checked by tsc
  467. */
  468. /**
  469. * Generated bundle index. Do not edit.
  470. */
  471. export { MockAnimationDriver, MockAnimationPlayer };
  472. //# sourceMappingURL=testing.js.map